201041
authorhgs
Mon, 18 Oct 2010 16:30:05 +0300
changeset 55 2d9cac8919d3
parent 53 819e59dfc032
child 56 392f7045e621
201041
creator/creator.pro
creator/data/datacreator.rss
creator/engine/inc/creator.hrh
creator/engine/inc/creator.pan
creator/engine/inc/creator_accesspoint.h
creator/engine/inc/creator_browser.h
creator/engine/inc/creator_browserelement.h
creator/engine/inc/creator_calendar.h
creator/engine/inc/creator_calendarbase.h
creator/engine/inc/creator_calendarelement.h
creator/engine/inc/creator_cmdscriptrun.h
creator/engine/inc/creator_connectionmethod.h
creator/engine/inc/creator_connectionmethodbase.h
creator/engine/inc/creator_connectionmethodelement.h
creator/engine/inc/creator_contactelement.h
creator/engine/inc/creator_contactsetcache.h
creator/engine/inc/creator_factory.h
creator/engine/inc/creator_file.h
creator/engine/inc/creator_fileelement.h
creator/engine/inc/creator_landmark.h
creator/engine/inc/creator_landmarkelement.h
creator/engine/inc/creator_log.h
creator/engine/inc/creator_logelement.h
creator/engine/inc/creator_mailbox.h
creator/engine/inc/creator_mailboxelement.h
creator/engine/inc/creator_message.h
creator/engine/inc/creator_messageelement.h
creator/engine/inc/creator_modulebase.h
creator/engine/inc/creator_note.h
creator/engine/inc/creator_noteelement.h
creator/engine/inc/creator_notepadwrapper.h
creator/engine/inc/creator_phonebook.h
creator/engine/inc/creator_phonebookapi.h
creator/engine/inc/creator_phonebookbase.h
creator/engine/inc/creator_phonebookwrapper.h
creator/engine/inc/creator_randomdatafield.h
creator/engine/inc/creator_randomdataparser.h
creator/engine/inc/creator_scriptelement.h
creator/engine/inc/creator_scriptelementfactory.h
creator/engine/inc/creator_scriptentry.h
creator/engine/inc/creator_scriptparser.h
creator/engine/inc/creator_std.h
creator/engine/inc/creator_traces.h
creator/engine/inc/creator_wepsecuritysettings.h
creator/engine/inc/randomdata.txt
creator/engine/src/creator_accesspoint.cpp
creator/engine/src/creator_browser.cpp
creator/engine/src/creator_browserelement.cpp
creator/engine/src/creator_calendar.cpp
creator/engine/src/creator_calendarelement.cpp
creator/engine/src/creator_cmdscriptrun.cpp
creator/engine/src/creator_connectionmethod.cpp
creator/engine/src/creator_connectionmethodelement.cpp
creator/engine/src/creator_contactelement.cpp
creator/engine/src/creator_contactsetcache.cpp
creator/engine/src/creator_factory.cpp
creator/engine/src/creator_file.cpp
creator/engine/src/creator_fileelement.cpp
creator/engine/src/creator_landmark.cpp
creator/engine/src/creator_landmarkelement.cpp
creator/engine/src/creator_log.cpp
creator/engine/src/creator_logelement.cpp
creator/engine/src/creator_mailbox.cpp
creator/engine/src/creator_mailboxelement.cpp
creator/engine/src/creator_message.cpp
creator/engine/src/creator_messageelement.cpp
creator/engine/src/creator_note.cpp
creator/engine/src/creator_noteelement.cpp
creator/engine/src/creator_notepadwrapper.cpp
creator/engine/src/creator_phonebook.cpp
creator/engine/src/creator_phonebookapi.cpp
creator/engine/src/creator_phonebookbase.cpp
creator/engine/src/creator_phonebookwrapper.cpp
creator/engine/src/creator_randomdataparser.cpp
creator/engine/src/creator_scriptelement.cpp
creator/engine/src/creator_scriptelementfactory.cpp
creator/engine/src/creator_scriptentry.cpp
creator/engine/src/creator_scriptparser.cpp
creator/engine/src/creator_wepsecuritysettings.cpp
creator/files/3GPP-70kB.dat
creator/files/AAC-100kB.dat
creator/files/AMR-20kB.dat
creator/files/BMP-25kB.dat
creator/files/DOC-20kB.dat
creator/files/Deck-1kB.dat
creator/files/GIF-2kB.dat
creator/files/HTML-20kB.dat
creator/files/JAD-1kB.dat
creator/files/JAR-10kB.dat
creator/files/JP2-65kB.dat
creator/files/JPEG-200kB.dat
creator/files/JPEG-25kB.dat
creator/files/JPEG-500kB.dat
creator/files/MIDI-10kB.dat
creator/files/MP3-250kB.dat
creator/files/MP4-200kB.dat
creator/files/MXMF-40kB.dat
creator/files/PNG-15kB.dat
creator/files/PPT-40kB.dat
creator/files/RAM-1kB.dat
creator/files/RM-95kB.dat
creator/files/RNG-1kB.dat
creator/files/SISX-10kB.dat
creator/files/SVG-15kB.dat
creator/files/SWF-15kB.dat
creator/files/TIF-25kB.dat
creator/files/TXT-10kB.dat
creator/files/TXT-70kB.dat
creator/files/VCF-1kB.dat
creator/files/VCS-1kB.dat
creator/files/WAV-20kB.dat
creator/files/WMA-50kB.dat
creator/files/WMV-200kB.dat
creator/files/XLS-15kB.dat
creator/files/backup_registration.xml
creator/icons/qgn_menu_creator.svg
creator/inc/engine.h
creator/inc/enginewrapper.h
creator/inc/mainview.h
creator/inc/notifications.h
creator/rom/creator.iby
creator/scripts/browserEx.creatorxml
creator/scripts/calendarEx.creatorxml
creator/scripts/connectionmethodEx.creatorxml
creator/scripts/contactEx.creatorxml
creator/scripts/creator.xsd
creator/scripts/filesEx.creatorxml
creator/scripts/impsEx.creatorxml
creator/scripts/landmarkEx.creatorxml
creator/scripts/logEx.creatorxml
creator/scripts/mailboxEx.creatorxml
creator/scripts/messagesEx.creatorxml
creator/scripts/notepadEx.creatorxml
creator/sis/Creator_stub.pkg
creator/src/engine.cpp
creator/src/enginewrapper.cpp
creator/src/main.cpp
creator/src/mainview.cpp
creator/src/notifications.cpp
filebrowser/engine/FB.hrh
filebrowser/engine/FBFileOps.cpp
filebrowser/engine/FBFileOps.h
filebrowser/engine/FBFileUtils.cpp
filebrowser/engine/FBFileUtils.h
filebrowser/engine/FBFolderSelector.cpp
filebrowser/engine/FBFolderSelector.h
filebrowser/engine/FBStd.h
filebrowser/engine/FBTraces.h
filebrowser/engine/engine.cpp
filebrowser/engine/engine.h
filebrowser/filebrowser.pro
filebrowser/fileopclient/BWINS/FileBrowserFileOpClientU.DEF
filebrowser/fileopclient/eabi/FileBrowserFileOpClientu.def
filebrowser/fileopclient/group/FBFileOpClient.mmp
filebrowser/fileopclient/group/bld.inf
filebrowser/fileopclient/inc/FBFileOpClient.h
filebrowser/fileopclient/inc/FBFileOpClientServer.h
filebrowser/fileopclient/src/FBFileOpClient.cpp
filebrowser/fileopserver/group/FBFileOpServer.mmp
filebrowser/fileopserver/group/bld.inf
filebrowser/fileopserver/inc/FBDrivePartitioner.h
filebrowser/fileopserver/inc/FBFileOpServer.h
filebrowser/fileopserver/src/FBDrivePartitioner.cpp
filebrowser/fileopserver/src/FBFileOpServer.cpp
filebrowser/group/ReleaseNotes_FileBrowser.txt
filebrowser/group/backup_registration.xml
filebrowser/group/bld_generic.inf
filebrowser/group/filebrowser_stub_sis.mk
filebrowser/group/group.pro
filebrowser/icons/qgn_indi_tb_filebrowser_find.svg
filebrowser/icons/qgn_indi_tb_filebrowser_folder_parent.svg
filebrowser/icons/qgn_indi_tb_filebrowser_selection.svg
filebrowser/icons/qgn_indi_tb_filebrowser_selection_active.svg
filebrowser/icons/qgn_menu_filebrowser.svg
filebrowser/icons/qtg_indi_status_back.svg
filebrowser/rom/filebrowser.iby
filebrowser/sis/FileBrowser_stub.pkg
filebrowser/ui/inc/enginewrapper.h
filebrowser/ui/inc/fbattributesview.h
filebrowser/ui/inc/fbdriveentry.h
filebrowser/ui/inc/fbdrivelistviewitem.h
filebrowser/ui/inc/fbdrivemodel.h
filebrowser/ui/inc/fbdriveview.h
filebrowser/ui/inc/fbeditorview.h
filebrowser/ui/inc/fbfileentry.h
filebrowser/ui/inc/fbfilelistviewitem.h
filebrowser/ui/inc/fbfilemodel.h
filebrowser/ui/inc/fbfileview.h
filebrowser/ui/inc/fbfolderselectiondialog.h
filebrowser/ui/inc/fbfolderselectorwrapper.h
filebrowser/ui/inc/fbmainwindow.h
filebrowser/ui/inc/fbsearchview.h
filebrowser/ui/inc/fbsettingsview.h
filebrowser/ui/inc/filebrowsersettings.h
filebrowser/ui/inc/filebrowsersortfilterproxymodel.h
filebrowser/ui/inc/menuaction.h
filebrowser/ui/inc/notifications.h
filebrowser/ui/src/enginewrapper.cpp
filebrowser/ui/src/fbattributesview.cpp
filebrowser/ui/src/fbdriveentry.cpp
filebrowser/ui/src/fbdrivelistviewitem.cpp
filebrowser/ui/src/fbdrivemodel.cpp
filebrowser/ui/src/fbdriveview.cpp
filebrowser/ui/src/fbeditorview.cpp
filebrowser/ui/src/fbfileentry.cpp
filebrowser/ui/src/fbfilelistviewitem.cpp
filebrowser/ui/src/fbfilemodel.cpp
filebrowser/ui/src/fbfileview.cpp
filebrowser/ui/src/fbfolderselectiondialog.cpp
filebrowser/ui/src/fbfolderselectorwrapper.cpp
filebrowser/ui/src/fbmainwindow.cpp
filebrowser/ui/src/fbsearchview.cpp
filebrowser/ui/src/fbsettingsview.cpp
filebrowser/ui/src/filebrowser.cpp
filebrowser/ui/src/filebrowsersortfilterproxymodel.cpp
filebrowser/ui/src/notifications.cpp
filebrowser/ui/ui.pro
filebrowser/ui/ui.qrc
launcher/ReleaseNotes_Launcher.txt
launcher/engine/inc/e32image.h
launcher/engine/inc/e32imageheaders.h
launcher/engine/inc/launcherdllelement.h
launcher/engine/inc/launcherdllparser.h
launcher/engine/inc/launcherengine.h
launcher/engine/inc/launcherparserobserver.h
launcher/engine/inc/launchertraces.h
launcher/engine/inc/launcherxmlparser.h
launcher/engine/src/e32image.cpp
launcher/engine/src/launcherdllelement.cpp
launcher/engine/src/launcherdllparser.cpp
launcher/engine/src/launcherengine.cpp
launcher/engine/src/launcherxmlparser.cpp
launcher/icons/check.svg
launcher/icons/qgn_menu_launcher.svg
launcher/inc/applicationview.h
launcher/inc/commonActions.h
launcher/inc/enginewrapper.h
launcher/inc/launchermainwindow.h
launcher/inc/notifications.h
launcher/inc/outputview.h
launcher/launcher.pro
launcher/launcher.qrc
launcher/rom/Launcher.iby
launcher/rom/backup_registration.xml
launcher/sis/Launcher_S60-5x.pkg
launcher/sis/Launcher_stub.pkg
launcher/sis/launcher_stub_sis.mk
launcher/src/applicationview.cpp
launcher/src/applicationview.xml
launcher/src/commonActions.cpp
launcher/src/enginewrapper.cpp
launcher/src/launchermainwindow.cpp
launcher/src/main.cpp
launcher/src/notifications.cpp
launcher/src/outputview.cpp
launcher/src/outputview.xml
loadgen/engine/inc/loadgen.hrh
loadgen/engine/inc/loadgen_applications.h
loadgen/engine/inc/loadgen_bluetooth.h
loadgen/engine/inc/loadgen_cpuload.h
loadgen/engine/inc/loadgen_httpreceiver.h
loadgen/engine/inc/loadgen_keypress.h
loadgen/engine/inc/loadgen_loadattributes.h
loadgen/engine/inc/loadgen_loadbase.h
loadgen/engine/inc/loadgen_memoryeat.h
loadgen/engine/inc/loadgen_messages.h
loadgen/engine/inc/loadgen_netconn.h
loadgen/engine/inc/loadgen_phonecall.h
loadgen/engine/inc/loadgen_photocapture.h
loadgen/engine/inc/loadgen_pointerevent.h
loadgen/engine/inc/loadgen_std.h
loadgen/engine/inc/loadgen_traces.h
loadgen/engine/inc/loadgen_utils.h
loadgen/engine/src/loadgen_applications.cpp
loadgen/engine/src/loadgen_bluetooth.cpp
loadgen/engine/src/loadgen_cpuload.cpp
loadgen/engine/src/loadgen_httpreceiver.cpp
loadgen/engine/src/loadgen_keypress.cpp
loadgen/engine/src/loadgen_loadbase.cpp
loadgen/engine/src/loadgen_memoryeat.cpp
loadgen/engine/src/loadgen_messages.cpp
loadgen/engine/src/loadgen_netconn.cpp
loadgen/engine/src/loadgen_phonecall.cpp
loadgen/engine/src/loadgen_photocapture.cpp
loadgen/engine/src/loadgen_pointerevent.cpp
loadgen/engine/src/loadgen_utils.cpp
loadgen/envpatcher/EnvPatcher.pl
loadgen/envpatcher/ReadMe.txt
loadgen/group/ReleaseNotes_LoadGen.txt
loadgen/group/backup_registration.xml
loadgen/group/bld.inf
loadgen/group/bld_generic.inf
loadgen/group/group.pro
loadgen/group/loadgen_extraicons.mk
loadgen/group/loadgen_icons_aif.mk
loadgen/group/loadgen_stub_sis.mk
loadgen/icons/qgn_menu_loadgen.svg
loadgen/icons/qgn_prob_status_green.svg
loadgen/icons/qgn_prob_status_red.svg
loadgen/loadgen.pro
loadgen/sis/LoadGen_S60-30.pkg
loadgen/sis/LoadGen_S60-30.sis
loadgen/sis/LoadGen_stub.pkg
loadgen/ui/avkon/data/loadgen.rss
loadgen/ui/avkon/data/loadgen_reg.rss
loadgen/ui/avkon/group/bld.inf
loadgen/ui/avkon/group/loadgen.mmp
loadgen/ui/avkon/inc/loadgen_app.h
loadgen/ui/avkon/inc/loadgen_appui.h
loadgen/ui/avkon/inc/loadgen_document.h
loadgen/ui/avkon/inc/loadgen_editors.h
loadgen/ui/avkon/inc/loadgen_maincontainer.h
loadgen/ui/avkon/inc/loadgen_mainview.h
loadgen/ui/avkon/inc/loadgen_model.h
loadgen/ui/avkon/inc/loadgen_settingsviewdlg.h
loadgen/ui/avkon/rom/loadgen.iby
loadgen/ui/avkon/src/loadgen_app.cpp
loadgen/ui/avkon/src/loadgen_appui.cpp
loadgen/ui/avkon/src/loadgen_document.cpp
loadgen/ui/avkon/src/loadgen_editors.cpp
loadgen/ui/avkon/src/loadgen_maincontainer.cpp
loadgen/ui/avkon/src/loadgen_mainview.cpp
loadgen/ui/avkon/src/loadgen_model.cpp
loadgen/ui/avkon/src/loadgen_settingsviewdlg.cpp
loadgen/ui/hb/hb.pro
loadgen/ui/hb/inc/engine.h
loadgen/ui/hb/inc/enginewrapper.h
loadgen/ui/hb/inc/mainview.h
loadgen/ui/hb/inc/notifications.h
loadgen/ui/hb/inc/settingsview.h
loadgen/ui/hb/loadgen.qrc
loadgen/ui/hb/rom/loadgen.iby
loadgen/ui/hb/src/engine.cpp
loadgen/ui/hb/src/enginewrapper.cpp
loadgen/ui/hb/src/main.cpp
loadgen/ui/hb/src/mainview.cpp
loadgen/ui/hb/src/notifications.cpp
loadgen/ui/hb/src/settingsview.cpp
perfapps/perfmon/icons/PerfMon_application_icon_svgt.svg
perfapps/perfmon/ui/avkon/group/perfmon.mmp
perfapps/perfmon/ui/hb/app/app.pro
screengrabber/ReleaseNotes_ScreenGrabber.txt
screengrabber/icons/qgn_menu_screengrabber.svg
screengrabber/inc/application.h
screengrabber/inc/enginewrapper.h
screengrabber/inc/gifanimator.h
screengrabber/inc/mainview.h
screengrabber/inc/notifications.h
screengrabber/inc/settingsview.h
screengrabber/inc/sgengine.h
screengrabber/rom/backup_registration.xml
screengrabber/rom/screengrabber.iby
screengrabber/screengrabber.pro
screengrabber/sis/ScreenGrabber_stub.pkg
screengrabber/src/application.cpp
screengrabber/src/enginewrapper.cpp
screengrabber/src/gifanimator.cpp
screengrabber/src/main.cpp
screengrabber/src/mainview.cpp
screengrabber/src/notifications.cpp
screengrabber/src/settingsview.cpp
screengrabber/src/sgengine.cpp
utilityapps/creator/creator.pro
utilityapps/creator/data/datacreator.rss
utilityapps/creator/engine/inc/creator.hrh
utilityapps/creator/engine/inc/creator.pan
utilityapps/creator/engine/inc/creator_accesspoint.h
utilityapps/creator/engine/inc/creator_browser.h
utilityapps/creator/engine/inc/creator_browserelement.h
utilityapps/creator/engine/inc/creator_calendar.h
utilityapps/creator/engine/inc/creator_calendarbase.h
utilityapps/creator/engine/inc/creator_calendarelement.h
utilityapps/creator/engine/inc/creator_cmdscriptrun.h
utilityapps/creator/engine/inc/creator_connectionmethod.h
utilityapps/creator/engine/inc/creator_connectionmethodbase.h
utilityapps/creator/engine/inc/creator_connectionmethodelement.h
utilityapps/creator/engine/inc/creator_contactelement.h
utilityapps/creator/engine/inc/creator_contactsetcache.h
utilityapps/creator/engine/inc/creator_factory.h
utilityapps/creator/engine/inc/creator_file.h
utilityapps/creator/engine/inc/creator_fileelement.h
utilityapps/creator/engine/inc/creator_landmark.h
utilityapps/creator/engine/inc/creator_landmarkelement.h
utilityapps/creator/engine/inc/creator_log.h
utilityapps/creator/engine/inc/creator_logelement.h
utilityapps/creator/engine/inc/creator_mailbox.h
utilityapps/creator/engine/inc/creator_mailboxelement.h
utilityapps/creator/engine/inc/creator_message.h
utilityapps/creator/engine/inc/creator_messageelement.h
utilityapps/creator/engine/inc/creator_modulebase.h
utilityapps/creator/engine/inc/creator_note.h
utilityapps/creator/engine/inc/creator_noteelement.h
utilityapps/creator/engine/inc/creator_notepadwrapper.h
utilityapps/creator/engine/inc/creator_phonebook.h
utilityapps/creator/engine/inc/creator_phonebookapi.h
utilityapps/creator/engine/inc/creator_phonebookbase.h
utilityapps/creator/engine/inc/creator_phonebookwrapper.h
utilityapps/creator/engine/inc/creator_randomdatafield.h
utilityapps/creator/engine/inc/creator_randomdataparser.h
utilityapps/creator/engine/inc/creator_scriptelement.h
utilityapps/creator/engine/inc/creator_scriptelementfactory.h
utilityapps/creator/engine/inc/creator_scriptentry.h
utilityapps/creator/engine/inc/creator_scriptparser.h
utilityapps/creator/engine/inc/creator_std.h
utilityapps/creator/engine/inc/creator_traces.h
utilityapps/creator/engine/inc/creator_wepsecuritysettings.h
utilityapps/creator/engine/inc/randomdata.txt
utilityapps/creator/engine/src/creator_accesspoint.cpp
utilityapps/creator/engine/src/creator_browser.cpp
utilityapps/creator/engine/src/creator_browserelement.cpp
utilityapps/creator/engine/src/creator_calendar.cpp
utilityapps/creator/engine/src/creator_calendarelement.cpp
utilityapps/creator/engine/src/creator_cmdscriptrun.cpp
utilityapps/creator/engine/src/creator_connectionmethod.cpp
utilityapps/creator/engine/src/creator_connectionmethodelement.cpp
utilityapps/creator/engine/src/creator_contactelement.cpp
utilityapps/creator/engine/src/creator_contactsetcache.cpp
utilityapps/creator/engine/src/creator_factory.cpp
utilityapps/creator/engine/src/creator_file.cpp
utilityapps/creator/engine/src/creator_fileelement.cpp
utilityapps/creator/engine/src/creator_landmark.cpp
utilityapps/creator/engine/src/creator_landmarkelement.cpp
utilityapps/creator/engine/src/creator_log.cpp
utilityapps/creator/engine/src/creator_logelement.cpp
utilityapps/creator/engine/src/creator_mailbox.cpp
utilityapps/creator/engine/src/creator_mailboxelement.cpp
utilityapps/creator/engine/src/creator_message.cpp
utilityapps/creator/engine/src/creator_messageelement.cpp
utilityapps/creator/engine/src/creator_note.cpp
utilityapps/creator/engine/src/creator_noteelement.cpp
utilityapps/creator/engine/src/creator_notepadwrapper.cpp
utilityapps/creator/engine/src/creator_phonebook.cpp
utilityapps/creator/engine/src/creator_phonebookapi.cpp
utilityapps/creator/engine/src/creator_phonebookbase.cpp
utilityapps/creator/engine/src/creator_phonebookwrapper.cpp
utilityapps/creator/engine/src/creator_randomdataparser.cpp
utilityapps/creator/engine/src/creator_scriptelement.cpp
utilityapps/creator/engine/src/creator_scriptelementfactory.cpp
utilityapps/creator/engine/src/creator_scriptentry.cpp
utilityapps/creator/engine/src/creator_scriptparser.cpp
utilityapps/creator/engine/src/creator_wepsecuritysettings.cpp
utilityapps/creator/files/3GPP-70kB.dat
utilityapps/creator/files/AAC-100kB.dat
utilityapps/creator/files/AMR-20kB.dat
utilityapps/creator/files/BMP-25kB.dat
utilityapps/creator/files/DOC-20kB.dat
utilityapps/creator/files/Deck-1kB.dat
utilityapps/creator/files/GIF-2kB.dat
utilityapps/creator/files/HTML-20kB.dat
utilityapps/creator/files/JAD-1kB.dat
utilityapps/creator/files/JAR-10kB.dat
utilityapps/creator/files/JP2-65kB.dat
utilityapps/creator/files/JPEG-200kB.dat
utilityapps/creator/files/JPEG-25kB.dat
utilityapps/creator/files/JPEG-500kB.dat
utilityapps/creator/files/MIDI-10kB.dat
utilityapps/creator/files/MP3-250kB.dat
utilityapps/creator/files/MP4-200kB.dat
utilityapps/creator/files/MXMF-40kB.dat
utilityapps/creator/files/PNG-15kB.dat
utilityapps/creator/files/PPT-40kB.dat
utilityapps/creator/files/RAM-1kB.dat
utilityapps/creator/files/RM-95kB.dat
utilityapps/creator/files/RNG-1kB.dat
utilityapps/creator/files/SISX-10kB.dat
utilityapps/creator/files/SVG-15kB.dat
utilityapps/creator/files/SWF-15kB.dat
utilityapps/creator/files/TIF-25kB.dat
utilityapps/creator/files/TXT-10kB.dat
utilityapps/creator/files/TXT-70kB.dat
utilityapps/creator/files/VCF-1kB.dat
utilityapps/creator/files/VCS-1kB.dat
utilityapps/creator/files/WAV-20kB.dat
utilityapps/creator/files/WMA-50kB.dat
utilityapps/creator/files/WMV-200kB.dat
utilityapps/creator/files/XLS-15kB.dat
utilityapps/creator/files/backup_registration.xml
utilityapps/creator/icons/Creator_application_icon_svgt.svg
utilityapps/creator/icons/qgn_menu_creator.svg
utilityapps/creator/inc/engine.h
utilityapps/creator/inc/enginewrapper.h
utilityapps/creator/inc/mainview.h
utilityapps/creator/inc/notifications.h
utilityapps/creator/rom/creator.iby
utilityapps/creator/scripts/browserEx.creatorxml
utilityapps/creator/scripts/calendarEx.creatorxml
utilityapps/creator/scripts/connectionmethodEx.creatorxml
utilityapps/creator/scripts/contactEx.creatorxml
utilityapps/creator/scripts/creator.xsd
utilityapps/creator/scripts/filesEx.creatorxml
utilityapps/creator/scripts/impsEx.creatorxml
utilityapps/creator/scripts/landmarkEx.creatorxml
utilityapps/creator/scripts/logEx.creatorxml
utilityapps/creator/scripts/mailboxEx.creatorxml
utilityapps/creator/scripts/messagesEx.creatorxml
utilityapps/creator/scripts/notepadEx.creatorxml
utilityapps/creator/sis/Creator_stub.pkg
utilityapps/creator/src/engine.cpp
utilityapps/creator/src/enginewrapper.cpp
utilityapps/creator/src/main.cpp
utilityapps/creator/src/mainview.cpp
utilityapps/creator/src/notifications.cpp
utilityapps/filebrowser/engine/FB.hrh
utilityapps/filebrowser/engine/FBFileOps.cpp
utilityapps/filebrowser/engine/FBFileOps.h
utilityapps/filebrowser/engine/FBFileUtils.cpp
utilityapps/filebrowser/engine/FBFileUtils.h
utilityapps/filebrowser/engine/FBFolderSelector.cpp
utilityapps/filebrowser/engine/FBFolderSelector.h
utilityapps/filebrowser/engine/FBStd.h
utilityapps/filebrowser/engine/FBTraces.h
utilityapps/filebrowser/engine/engine.cpp
utilityapps/filebrowser/engine/engine.h
utilityapps/filebrowser/filebrowser.pro
utilityapps/filebrowser/fileopclient/BWINS/FileBrowserFileOpClientU.DEF
utilityapps/filebrowser/fileopclient/eabi/FileBrowserFileOpClientu.def
utilityapps/filebrowser/fileopclient/group/FBFileOpClient.mmp
utilityapps/filebrowser/fileopclient/group/bld.inf
utilityapps/filebrowser/fileopclient/inc/FBFileOpClient.h
utilityapps/filebrowser/fileopclient/inc/FBFileOpClientServer.h
utilityapps/filebrowser/fileopclient/src/FBFileOpClient.cpp
utilityapps/filebrowser/fileopserver/group/FBFileOpServer.mmp
utilityapps/filebrowser/fileopserver/group/bld.inf
utilityapps/filebrowser/fileopserver/inc/FBDrivePartitioner.h
utilityapps/filebrowser/fileopserver/inc/FBFileOpServer.h
utilityapps/filebrowser/fileopserver/src/FBDrivePartitioner.cpp
utilityapps/filebrowser/fileopserver/src/FBFileOpServer.cpp
utilityapps/filebrowser/group/ReleaseNotes_FileBrowser.txt
utilityapps/filebrowser/group/backup_registration.xml
utilityapps/filebrowser/group/bld_generic.inf
utilityapps/filebrowser/group/filebrowser_stub_sis.mk
utilityapps/filebrowser/group/group.pro
utilityapps/filebrowser/icons/qgn_menu_filebrowser.svg
utilityapps/filebrowser/icons/qtg_indi_status_back.svg
utilityapps/filebrowser/icons/qtg_mono_filebrowser_parent_folder.svg
utilityapps/filebrowser/icons/qtg_mono_filebrowser_paste.svg
utilityapps/filebrowser/icons/qtg_mono_filebrowser_search.svg
utilityapps/filebrowser/icons/qtg_mono_filebrowser_selection_mode.svg
utilityapps/filebrowser/icons/qtg_mono_filebrowser_selection_mode_off.svg
utilityapps/filebrowser/rom/filebrowser.iby
utilityapps/filebrowser/sis/FileBrowser_stub.pkg
utilityapps/filebrowser/ui/inc/enginewrapper.h
utilityapps/filebrowser/ui/inc/fbattributesview.h
utilityapps/filebrowser/ui/inc/fbdriveentry.h
utilityapps/filebrowser/ui/inc/fbdrivelistviewitem.h
utilityapps/filebrowser/ui/inc/fbdrivemodel.h
utilityapps/filebrowser/ui/inc/fbdriveview.h
utilityapps/filebrowser/ui/inc/fbeditorview.h
utilityapps/filebrowser/ui/inc/fbfileentry.h
utilityapps/filebrowser/ui/inc/fbfilelistviewitem.h
utilityapps/filebrowser/ui/inc/fbfilemodel.h
utilityapps/filebrowser/ui/inc/fbfileview.h
utilityapps/filebrowser/ui/inc/fbfolderselectiondialog.h
utilityapps/filebrowser/ui/inc/fbfolderselectorwrapper.h
utilityapps/filebrowser/ui/inc/fbmainwindow.h
utilityapps/filebrowser/ui/inc/fbpropertiesdialog.h
utilityapps/filebrowser/ui/inc/fbsearchview.h
utilityapps/filebrowser/ui/inc/fbsettingsview.h
utilityapps/filebrowser/ui/inc/filebrowsersettings.h
utilityapps/filebrowser/ui/inc/filebrowsersortfilterproxymodel.h
utilityapps/filebrowser/ui/inc/menuaction.h
utilityapps/filebrowser/ui/inc/notifications.h
utilityapps/filebrowser/ui/src/enginewrapper.cpp
utilityapps/filebrowser/ui/src/fbattributesview.cpp
utilityapps/filebrowser/ui/src/fbdriveentry.cpp
utilityapps/filebrowser/ui/src/fbdrivelistviewitem.cpp
utilityapps/filebrowser/ui/src/fbdrivemodel.cpp
utilityapps/filebrowser/ui/src/fbdriveview.cpp
utilityapps/filebrowser/ui/src/fbeditorview.cpp
utilityapps/filebrowser/ui/src/fbfileentry.cpp
utilityapps/filebrowser/ui/src/fbfilelistviewitem.cpp
utilityapps/filebrowser/ui/src/fbfilemodel.cpp
utilityapps/filebrowser/ui/src/fbfileview.cpp
utilityapps/filebrowser/ui/src/fbfolderselectiondialog.cpp
utilityapps/filebrowser/ui/src/fbfolderselectorwrapper.cpp
utilityapps/filebrowser/ui/src/fbmainwindow.cpp
utilityapps/filebrowser/ui/src/fbpropertiesdialog.cpp
utilityapps/filebrowser/ui/src/fbsearchview.cpp
utilityapps/filebrowser/ui/src/fbsettingsview.cpp
utilityapps/filebrowser/ui/src/filebrowser.cpp
utilityapps/filebrowser/ui/src/filebrowsersortfilterproxymodel.cpp
utilityapps/filebrowser/ui/src/notifications.cpp
utilityapps/filebrowser/ui/ui.pro
utilityapps/filebrowser/ui/ui.qrc
utilityapps/launcher/ReleaseNotes_Launcher.txt
utilityapps/launcher/engine/inc/e32image.h
utilityapps/launcher/engine/inc/e32imageheaders.h
utilityapps/launcher/engine/inc/launcherdllelement.h
utilityapps/launcher/engine/inc/launcherdllparser.h
utilityapps/launcher/engine/inc/launcherengine.h
utilityapps/launcher/engine/inc/launcherparserobserver.h
utilityapps/launcher/engine/inc/launchertraces.h
utilityapps/launcher/engine/inc/launcherxmlparser.h
utilityapps/launcher/engine/src/e32image.cpp
utilityapps/launcher/engine/src/launcherdllelement.cpp
utilityapps/launcher/engine/src/launcherdllparser.cpp
utilityapps/launcher/engine/src/launcherengine.cpp
utilityapps/launcher/engine/src/launcherxmlparser.cpp
utilityapps/launcher/icons/check.svg
utilityapps/launcher/icons/qgn_menu_launcher.svg
utilityapps/launcher/inc/applicationview.h
utilityapps/launcher/inc/commonActions.h
utilityapps/launcher/inc/enginewrapper.h
utilityapps/launcher/inc/launchermainwindow.h
utilityapps/launcher/inc/notifications.h
utilityapps/launcher/inc/outputview.h
utilityapps/launcher/launcher.pro
utilityapps/launcher/launcher.qrc
utilityapps/launcher/rom/Launcher.iby
utilityapps/launcher/rom/backup_registration.xml
utilityapps/launcher/sis/Launcher_S60-5x.pkg
utilityapps/launcher/sis/Launcher_stub.pkg
utilityapps/launcher/sis/launcher_stub_sis.mk
utilityapps/launcher/src/applicationview.cpp
utilityapps/launcher/src/applicationview.xml
utilityapps/launcher/src/commonActions.cpp
utilityapps/launcher/src/enginewrapper.cpp
utilityapps/launcher/src/launchermainwindow.cpp
utilityapps/launcher/src/main.cpp
utilityapps/launcher/src/notifications.cpp
utilityapps/launcher/src/outputview.cpp
utilityapps/launcher/src/outputview.xml
utilityapps/loadgen/engine/inc/loadgen.hrh
utilityapps/loadgen/engine/inc/loadgen_applications.h
utilityapps/loadgen/engine/inc/loadgen_bluetooth.h
utilityapps/loadgen/engine/inc/loadgen_cpuload.h
utilityapps/loadgen/engine/inc/loadgen_httpreceiver.h
utilityapps/loadgen/engine/inc/loadgen_keypress.h
utilityapps/loadgen/engine/inc/loadgen_loadattributes.h
utilityapps/loadgen/engine/inc/loadgen_loadbase.h
utilityapps/loadgen/engine/inc/loadgen_memoryeat.h
utilityapps/loadgen/engine/inc/loadgen_messages.h
utilityapps/loadgen/engine/inc/loadgen_netconn.h
utilityapps/loadgen/engine/inc/loadgen_phonecall.h
utilityapps/loadgen/engine/inc/loadgen_photocapture.h
utilityapps/loadgen/engine/inc/loadgen_pointerevent.h
utilityapps/loadgen/engine/inc/loadgen_std.h
utilityapps/loadgen/engine/inc/loadgen_traces.h
utilityapps/loadgen/engine/inc/loadgen_utils.h
utilityapps/loadgen/engine/src/loadgen_applications.cpp
utilityapps/loadgen/engine/src/loadgen_bluetooth.cpp
utilityapps/loadgen/engine/src/loadgen_cpuload.cpp
utilityapps/loadgen/engine/src/loadgen_httpreceiver.cpp
utilityapps/loadgen/engine/src/loadgen_keypress.cpp
utilityapps/loadgen/engine/src/loadgen_loadbase.cpp
utilityapps/loadgen/engine/src/loadgen_memoryeat.cpp
utilityapps/loadgen/engine/src/loadgen_messages.cpp
utilityapps/loadgen/engine/src/loadgen_netconn.cpp
utilityapps/loadgen/engine/src/loadgen_phonecall.cpp
utilityapps/loadgen/engine/src/loadgen_photocapture.cpp
utilityapps/loadgen/engine/src/loadgen_pointerevent.cpp
utilityapps/loadgen/engine/src/loadgen_utils.cpp
utilityapps/loadgen/envpatcher/EnvPatcher.pl
utilityapps/loadgen/envpatcher/ReadMe.txt
utilityapps/loadgen/group/ReleaseNotes_LoadGen.txt
utilityapps/loadgen/group/backup_registration.xml
utilityapps/loadgen/group/bld.inf
utilityapps/loadgen/group/bld_generic.inf
utilityapps/loadgen/group/group.pro
utilityapps/loadgen/group/loadgen_extraicons.mk
utilityapps/loadgen/group/loadgen_icons_aif.mk
utilityapps/loadgen/group/loadgen_stub_sis.mk
utilityapps/loadgen/icons/LoadGen_application_icon_svgt.svg
utilityapps/loadgen/icons/mono_new_load.svg
utilityapps/loadgen/icons/mono_resume_all.svg
utilityapps/loadgen/icons/mono_stop_all.svg
utilityapps/loadgen/icons/mono_suspend_all.svg
utilityapps/loadgen/icons/qgn_menu_loadgen.svg
utilityapps/loadgen/icons/qgn_prob_status_green.svg
utilityapps/loadgen/icons/qgn_prob_status_red.svg
utilityapps/loadgen/loadgen.pro
utilityapps/loadgen/sis/LoadGen_S60-30.pkg
utilityapps/loadgen/sis/LoadGen_S60-30.sis
utilityapps/loadgen/sis/LoadGen_stub.pkg
utilityapps/loadgen/ui/avkon/data/loadgen.rss
utilityapps/loadgen/ui/avkon/data/loadgen_reg.rss
utilityapps/loadgen/ui/avkon/group/bld.inf
utilityapps/loadgen/ui/avkon/group/loadgen.mmp
utilityapps/loadgen/ui/avkon/inc/loadgen_app.h
utilityapps/loadgen/ui/avkon/inc/loadgen_appui.h
utilityapps/loadgen/ui/avkon/inc/loadgen_document.h
utilityapps/loadgen/ui/avkon/inc/loadgen_editors.h
utilityapps/loadgen/ui/avkon/inc/loadgen_maincontainer.h
utilityapps/loadgen/ui/avkon/inc/loadgen_mainview.h
utilityapps/loadgen/ui/avkon/inc/loadgen_model.h
utilityapps/loadgen/ui/avkon/inc/loadgen_settingsviewdlg.h
utilityapps/loadgen/ui/avkon/rom/loadgen.iby
utilityapps/loadgen/ui/avkon/src/loadgen_app.cpp
utilityapps/loadgen/ui/avkon/src/loadgen_appui.cpp
utilityapps/loadgen/ui/avkon/src/loadgen_document.cpp
utilityapps/loadgen/ui/avkon/src/loadgen_editors.cpp
utilityapps/loadgen/ui/avkon/src/loadgen_maincontainer.cpp
utilityapps/loadgen/ui/avkon/src/loadgen_mainview.cpp
utilityapps/loadgen/ui/avkon/src/loadgen_model.cpp
utilityapps/loadgen/ui/avkon/src/loadgen_settingsviewdlg.cpp
utilityapps/loadgen/ui/hb/hb.pro
utilityapps/loadgen/ui/hb/hb_.mmp
utilityapps/loadgen/ui/hb/inc/engine.h
utilityapps/loadgen/ui/hb/inc/enginewrapper.h
utilityapps/loadgen/ui/hb/inc/loadgenlistitem.h
utilityapps/loadgen/ui/hb/inc/loadgenloaditem.h
utilityapps/loadgen/ui/hb/inc/mainview.h
utilityapps/loadgen/ui/hb/inc/notifications.h
utilityapps/loadgen/ui/hb/inc/settingsview.h
utilityapps/loadgen/ui/hb/loadgen.qrc
utilityapps/loadgen/ui/hb/rom/loadgen.iby
utilityapps/loadgen/ui/hb/src/engine.cpp
utilityapps/loadgen/ui/hb/src/enginewrapper.cpp
utilityapps/loadgen/ui/hb/src/loadgenlistitem.cpp
utilityapps/loadgen/ui/hb/src/loadgenloaditem.cpp
utilityapps/loadgen/ui/hb/src/main.cpp
utilityapps/loadgen/ui/hb/src/mainview.cpp
utilityapps/loadgen/ui/hb/src/notifications.cpp
utilityapps/loadgen/ui/hb/src/settingsview.cpp
utilityapps/screengrabber/ReleaseNotes_ScreenGrabber.txt
utilityapps/screengrabber/icons/ScreenGrabber_application_icon_final_svgt.svg
utilityapps/screengrabber/icons/qgn_menu_screengrabber.svg
utilityapps/screengrabber/inc/application.h
utilityapps/screengrabber/inc/enginewrapper.h
utilityapps/screengrabber/inc/gifanimator.h
utilityapps/screengrabber/inc/mainview.h
utilityapps/screengrabber/inc/notifications.h
utilityapps/screengrabber/inc/settingsview.h
utilityapps/screengrabber/inc/sgengine.h
utilityapps/screengrabber/rom/backup_registration.xml
utilityapps/screengrabber/rom/screengrabber.iby
utilityapps/screengrabber/screengrabber.pro
utilityapps/screengrabber/sis/ScreenGrabber_stub.pkg
utilityapps/screengrabber/src/application.cpp
utilityapps/screengrabber/src/enginewrapper.cpp
utilityapps/screengrabber/src/gifanimator.cpp
utilityapps/screengrabber/src/main.cpp
utilityapps/screengrabber/src/mainview.cpp
utilityapps/screengrabber/src/notifications.cpp
utilityapps/screengrabber/src/settingsview.cpp
utilityapps/screengrabber/src/sgengine.cpp
--- a/creator/creator.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-TEMPLATE = app
-TARGET = Creator
-
-DEPENDPATH += .
-DEPENDPATH += src engine/src
-INCLUDEPATH += inc engine/inc
-
-load(hb.prf)
-symbian:CONFIG -= symbian_i18n
-
-HEADERS += \
-	inc/mainview.h \
-	inc/notifications.h
-
-SOURCES += main.cpp \
-	src/mainview.cpp \
-	src/notifications.cpp
-
-symbian: {
-        INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-	HEADERS += engine/inc/creator.hrh \
-			engine/inc/creator_calendar.h \
-			engine/inc/creator_calendarbase.h \
-			engine/inc/creator_calendarelement.h \
-			engine/inc/creator_cmdscriptrun.h \
-			engine/inc/creator_contactelement.h \
-			engine/inc/creator_contactsetcache.h \
-			engine/inc/creator_factory.h \
-			engine/inc/creator_file.h \
-			engine/inc/creator_fileelement.h \
-			engine/inc/creator_landmark.h \
-			engine/inc/creator_landmarkelement.h \
-			engine/inc/creator_log.h \
-			engine/inc/creator_logelement.h \
-			engine/inc/creator_mailbox.h \
-			engine/inc/creator_mailboxelement.h \
-			engine/inc/creator_message.h \
-			engine/inc/creator_messageelement.h \
-			engine/inc/creator_modulebase.h \
-			engine/inc/creator_note.h \
-			engine/inc/creator_notepadwrapper.h \
-			engine/inc/creator_phonebook.h \
-			engine/inc/creator_phonebookwrapper.h \
-			engine/inc/creator_phonebookapi.h \
-			engine/inc/creator_phonebookbase.h \
-			engine/inc/creator_randomdatafield.h \
-			engine/inc/creator_randomdataparser.h \
-			engine/inc/creator_scriptelement.h \
-			engine/inc/creator_scriptelementfactory.h \
-			engine/inc/creator_scriptentry.h \
-			engine/inc/creator_scriptparser.h \
-			engine/inc/creator_std.h \
-			engine/inc/creator_traces.h \
-			engine/inc/creator_wepsecuritysettings.h \
-			engine/inc/randomdata.txt \
-			inc/engine.h \
-			inc/enginewrapper.h
-
-	SOURCES += engine/src/creator_calendar.cpp \
-			engine/src/creator_calendarelement.cpp \
-			engine/src/creator_cmdscriptrun.cpp \
-			engine/src/creator_contactelement.cpp \
-			engine/src/creator_contactsetcache.cpp \
-			engine/src/creator_factory.cpp \
-			engine/src/creator_file.cpp \
-			engine/src/creator_fileelement.cpp \
-			engine/src/creator_landmark.cpp \
-			engine/src/creator_landmarkelement.cpp \
-			engine/src/creator_log.cpp \
-			engine/src/creator_logelement.cpp \
-			engine/src/creator_mailbox.cpp \
-			engine/src/creator_mailboxelement.cpp \
-			engine/src/creator_message.cpp \
-			engine/src/creator_messageelement.cpp \
-			engine/src/creator_note.cpp \
-			engine/src/creator_notepadwrapper.cpp \
-			engine/src/creator_phonebook.cpp \
-			engine/src/creator_phonebookwrapper.cpp \
-			engine/src/creator_phonebookapi.cpp \
-			engine/src/creator_phonebookbase.cpp \
-			engine/src/creator_randomdataparser.cpp \
-			engine/src/creator_scriptelement.cpp \
-			engine/src/creator_scriptelementfactory.cpp \
-			engine/src/creator_scriptentry.cpp \
-			engine/src/creator_scriptparser.cpp \
-			src/engine.cpp \
-			src/enginewrapper.cpp
-
-	LIBS += -lestor \
-			-lws32 \
-			-lPlatformEnv \
-			-limageconversion \
-			-leikcore \
-			-leuser \
-			-lapparc \
-			-lcone \ 
-			-lcntmodel \
-			-lmsgs \
-			-llogwrap \
-			-llogcli \
-			-lefsrv \
-			-lgsmu \
-			-limcm \
-			-lbafl \ 
-			-leikcoctl \ 
-			-leikctl \
-			-lcommdb \
-			-letext \ 
-			-lcommonengine \ 
-			-lcommonui \ 
-			-lplatformenv \ 
-			-lapgrfx \
-			-lapmime \
-			-lobexmtmutil \
-			-lsmcm \
-			-laknskins \
-			-laknskinsrv \ 
-			-lflogger \
-			-letel \
-			-letelmm \
-			-lxmlframework \
-			-lcharconv \ 
-			-lsenutils \
-			-lcalinterimapi \
-			-leposlandmarks \
-			-llbs \
-			-lecom \
-			-lcaf \
-			-lcafutils \ 
-			-ldrmrights \
-			-ledbms \
-			-lfbscli \
-			-lbitmaptransforms \
-			-lcmmanager \
-			-lcmmanagerdatabase \
-			-lnoteseditor \
-			-lxqservice \
-		    -lQtContacts \
-			-lagendainterface 
-
-	creatorDataBlock = \
-			"SOURCEPATH ." \
-			"START RESOURCE data/datacreator.rss" \
-			"HEADER" \
-			"TARGETPATH /resource/apps" \
-			"END"
-
-	MMP_RULES += creatorDataBlock
-	MMP_RULES -= PAGED
-  MMP_RULES *= UNPAGED
-
-    BLD_INF_RULES.prj_exports += "./rom/creator.iby CORE_IBY_EXPORT_PATH(tools,creator.iby)
-	BLD_INF_RULES.prj_exports += \
-				"./files/backup_registration.xml    Z:/private/20011383/backup_registration.xml" \
-				"./files/3GPP-70kB.dat              Z:/private/20011383/3GPP-70kB.3gpp" \
-				"./files/AAC-100kB.dat              Z:/private/20011383/AAC-100kB.aac" \
-				"./files/AMR-20kB.dat               Z:/private/20011383/AMR-20kB.amr" \
-				"./files/BMP-25kB.dat               Z:/private/20011383/BMP-25kB.bmp" \
-				"./files/Deck-1kB.dat               Z:/private/20011383/Deck-1kB.saveddeck" \
-				"./files/DOC-20kB.dat               Z:/private/20011383/DOC-20kB.doc" \
-				"./files/GIF-2kB.dat                Z:/private/20011383/GIF-2kB.gif" \
-				"./files/HTML-20kB.dat              Z:/private/20011383/HTML-20kB.html" \
-				"./files/JAD-1kB.dat                Z:/private/20011383/JAD-1kB.jad" \
-				"./files/JAR-10kB.dat               Z:/private/20011383/JAR-10kB.jar" \
-				"./files/JP2-65kB.dat               Z:/private/20011383/JP2-65kB.jp2" \
-				"./files/JPEG-200kB.dat             Z:/private/20011383/JPEG-200kB.jpg" \
-				"./files/JPEG-25kB.dat              Z:/private/20011383/JPEG-25kB.jpg" \
-				"./files/JPEG-500kB.dat             Z:/private/20011383/JPEG-500kB.jpg" \
-				"./files/MIDI-10kB.dat              Z:/private/20011383/MIDI-10kB.mid" \
-				"./files/MP3-250kB.dat              Z:/private/20011383/MP3-250kB.mp3" \
-				"./files/MP4-200kB.dat              Z:/private/20011383/MP4-200kB.mp4" \
-				"./files/MXMF-40kB.dat              Z:/private/20011383/MXMF-40kB.mxmf" \
-				"./files/PNG-15kB.dat               Z:/private/20011383/PNG-15kB.png" \
-				"./files/PPT-40kB.dat               Z:/private/20011383/PPT-40kB.ppt" \
-				"./files/RAM-1kB.dat                Z:/private/20011383/RAM-1kB.ram" \
-				"./files/RM-95kB.dat                Z:/private/20011383/RM-95kB.rm" \
-				"./files/RNG-1kB.dat                Z:/private/20011383/RNG-1kB.rng" \
-				"./files/SVG-15kB.dat               Z:/private/20011383/SVG-15kB.svg" \
-				"./files/SWF-15kB.dat               Z:/private/20011383/SWF-15kB.swf" \
-				"./files/TIF-25kB.dat               Z:/private/20011383/TIF-25kB.tif" \
-				"./files/TXT-10kB.dat               Z:/private/20011383/TXT-10kB.txt" \
-				"./files/TXT-70kB.dat               Z:/private/20011383/TXT-70kB.txt" \
-				"./files/VCF-1kB.dat                Z:/private/20011383/VCF-1kB.vcf" \
-				"./files/VCS-1kB.dat                Z:/private/20011383/VCS-1kB.vcs" \
-				"./files/WAV-20kB.dat               Z:/private/20011383/WAV-20kB.wav" \
-				"./files/XLS-15kB.dat               Z:/private/20011383/XLS-15kB.xls" \
-				"./files/SISX-10kB.dat              Z:/private/20011383/SISX-10kB.sisx" \
-				"./files/WMA-50kB.dat               Z:/private/20011383/WMA-50kB.wma" \
-				"./files/WMV-200kB.dat              Z:/private/20011383/WMV-200kB.wmv" \
-				"./scripts/creator.xsd                   +/tools/s60rndtools/creator/creator.xsd" \
-				"./scripts/browserEx.creatorxml          +/tools/s60rndtools/creator/browserEx.creatorxml" \
-				"./scripts/calendarEx.creatorxml         +/tools/s60rndtools/creator/calendarEx.creatorxml" \
-				"./scripts/connectionmethodEx.creatorxml +/tools/s60rndtools/creator/connectionmethodEx.creatorxml" \
-				"./scripts/contactEx.creatorxml          +/tools/s60rndtools/creator/contactEx.creatorxml" \
-				"./scripts/filesEx.creatorxml            +/tools/s60rndtools/creator/filesEx.creatorxml" \
-				"./scripts/landmarkEx.creatorxml         +/tools/s60rndtools/creator/landmarkEx.creatorxml" \
-				"./scripts/logEx.creatorxml              +/tools/s60rndtools/creator/logEx.creatorxml" \
-				"./scripts/mailboxEx.creatorxml          +/tools/s60rndtools/creator/mailboxEx.creatorxml" \
-				"./scripts/messagesEx.creatorxml         +/tools/s60rndtools/creator/messagesEx.creatorxml" \
-				"./scripts/notepadEx.creatorxml          +/tools/s60rndtools/creator/notepadEx.creatorxml" 
-    
-    creator_buildstubsis_extension = \
-        "$${LITERAL_HASH}ifdef MARM" \
-        "    START EXTENSION app-services/buildstubsis" \
-        "    OPTION SRCDIR sis" \
-        "    OPTION SISNAME creator_stub" \
-        "    END" \
-        "$${LITERAL_HASH}endif" 
-        
-    BLD_INF_RULES.prj_extensions += creator_buildstubsis_extension
-    
-	RSS_RULES += "group_name = \"RnD Tools\"";
-	TARGET.CAPABILITY = CAP_APPLICATION AllFiles
-
-	TARGET.UID2 = 0x100039CE
-	TARGET.UID3 = 0x20011383
-	TARGET.SID = 0x20011383
-	TARGET.VID = 0x101FB657 // Nokia
-	TARGET.EPOCHEAPSIZE = 0x20000 0x1000000  // Min 128Kb, Max 16Mb
-
-	ICON = icons/qgn_menu_creator.svg 
-
-} else {
-	error("Only Symbian supported!")
-}
--- a/creator/data/datacreator.rss	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,665 +0,0 @@
-NAME ORBT
-
-#include <appinfo.rh>
-#include <eikon.rh>
-#include <eikon.rsg>
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE ARRAY r_data_firstnames
-    {
-    items=
-        {
-        LBUF { txt="John"; },
-        LBUF { txt="Francis"; },
-        LBUF { txt="Andrew"; },
-        LBUF { txt="Lawrence"; },
-        LBUF { txt="Gregory"; },
-        LBUF { txt="Fulke"; },
-        LBUF { txt="Thomas"; },
-        LBUF { txt="Nicholas"; },
-        LBUF { txt="Hakle"; },
-        LBUF { txt="Roger"; },
-        LBUF { txt="Nathaniel"; },
-        LBUF { txt="Luke"; },
-        LBUF { txt="William"; },
-        LBUF { txt="Ralph"; },
-        LBUF { txt="Leonar"; },
-        LBUF { txt="Daniel"; },
-        LBUF { txt="Aban"; },
-        LBUF { txt="Mathias"; },
-        LBUF { txt="Robert"; },
-        LBUF { txt="Christopher"; },
-        LBUF { txt="Martin"; },
-        LBUF { txt="Michael"; },
-        LBUF { txt="Barnaby"; },
-        LBUF { txt="Tobias"; },
-        LBUF { txt="Richard"; },
-        LBUF { txt="Anthony"; },
-        LBUF { txt="Simon"; },
-        LBUF { txt="Samuel"; },
-        LBUF { txt="Geoffrey"; },
-        LBUF { txt="Isaac"; },
-        LBUF { txt="Henry"; },
-        LBUF { txt="Matthew"; },
-        LBUF { txt="Peter"; },
-        LBUF { txt="Allen"; },
-        LBUF { txt="Reynold"; },
-        LBUF { txt="Jerome"; },
-        LBUF { txt="Elizabeth"; },
-        LBUF { txt="Catherine"; },
-        LBUF { txt="Frances"; },
-        LBUF { txt="Cecily"; },
-        LBUF { txt="Millicent"; },
-        LBUF { txt="Audrey"; },
-        LBUF { txt="Joan"; },
-        LBUF { txt="Elinor"; },
-        LBUF { txt="Joyce"; },
-        LBUF { txt="Frideswide"; },
-        LBUF { txt="Rose"; },
-        LBUF { txt="Helen"; },
-        LBUF { txt="Margaret"; },
-        LBUF { txt="Isabel"; },
-        LBUF { txt="Bridget"; },
-        LBUF { txt="Grace"; },
-        LBUF { txt="Thomasin"; },
-        LBUF { txt="Janet"; },
-        LBUF { txt="Agnes"; },
-        LBUF { txt="Dorothy"; },
-        LBUF { txt="Christian"; },
-        LBUF { txt="Amy"; },
-        LBUF { txt="Fortune"; },
-        LBUF { txt="Sybil"; },
-        LBUF { txt="Alice"; },
-        LBUF { txt="Margery"; },
-        LBUF { txt="Edith"; },
-        LBUF { txt="Barbara"; },
-        LBUF { txt="Gillian"; },
-        LBUF { txt="Ursula"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_surnames
-    {
-    items=
-        {
-        LBUF { txt="Lux"; },
-        LBUF { txt="Mandot"; },
-        LBUF { txt="Mansfield"; },
-        LBUF { txt="Mayberry"; },
-        LBUF { txt="McCarrel"; },
-        LBUF { txt="McDaniel"; },
-        LBUF { txt="Mefford"; },
-        LBUF { txt="Metcalf"; },
-        LBUF { txt="Metchell"; },
-        LBUF { txt="Moller"; },
-        LBUF { txt="Margan"; },
-        LBUF { txt="Keaney"; },
-        LBUF { txt="Kenyon"; },
-        LBUF { txt="Kesler"; },
-        LBUF { txt="Kinman"; },
-        LBUF { txt="Kreinert"; },
-        LBUF { txt="Kummerlin"; },
-        LBUF { txt="Lamgley"; },
-        LBUF { txt="Leas"; },
-        LBUF { txt="Leighton"; },
-        LBUF { txt="Lillie"; },
-        LBUF { txt="Hilms"; },
-        LBUF { txt="Holt"; },
-        LBUF { txt="Hosier"; },
-        LBUF { txt="Howard"; },
-        LBUF { txt="Hypes"; },
-        LBUF { txt="Jacmor"; },
-        LBUF { txt="Behnson"; },
-        LBUF { txt="Kammer"; },
-        LBUF { txt="Patts"; },
-        LBUF { txt="West"; },
-        LBUF { txt="Wilbar"; },
-        LBUF { txt="Witsan"; },
-        LBUF { txt="Gillams"; },
-        LBUF { txt="Good"; },
-        LBUF { txt="Wreght"; },
-        LBUF { txt="Worthley"; },
-        LBUF { txt="Adams"; },
-        LBUF { txt="Allen"; },
-        LBUF { txt="Ansley"; },
-        LBUF { txt="Ayries"; },
-        LBUF { txt="Bartlett"; },
-        LBUF { txt="Barton"; },
-        LBUF { txt="Payne"; },
-        LBUF { txt="Pintard"; },
-        LBUF { txt="Prence"; },
-        LBUF { txt="Richards"; },
-        LBUF { txt="Dillman"; },
-        LBUF { txt="Dory"; },
-        LBUF { txt="Edgards"; },
-        LBUF { txt="Engell"; },
-        LBUF { txt="Farprington"; },
-        LBUF { txt="Fisher"; },
-        LBUF { txt="Foed"; },
-        LBUF { txt="Burges"; },
-        LBUF { txt="Childwall"; },
-        LBUF { txt="Smith"; },
-        LBUF { txt="Sipon"; },
-        LBUF { txt="Simmons"; },
-        LBUF { txt="Stewert"; },
-        LBUF { txt="Stiles"; },
-        LBUF { txt="Stratton"; },
-        LBUF { txt="Dennis"; },
-        LBUF { txt="Talmot"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_companies
-    {
-    items=
-        {
-        LBUF { txt="CDP"; },
-        LBUF { txt="Exbox"; },
-        LBUF { txt="Munro"; },
-        LBUF { txt="Majaka"; },
-        LBUF { txt="Bitzumi"; },
-        LBUF { txt="Melroy"; },
-        LBUF { txt="Matal"; },
-        LBUF { txt="Japponi"; },
-        LBUF { txt="Siwaka"; },
-        LBUF { txt="Keiku"; },
-        LBUF { txt="Naamate"; },
-        LBUF { txt="Remonti"; },
-        LBUF { txt="Melleva"; },
-        LBUF { txt="WEX"; },
-        LBUF { txt="Chataz"; },
-        LBUF { txt="Ponly"; },
-        LBUF { txt="Alriva"; },
-        LBUF { txt="Giate"; },
-        LBUF { txt="Kesso"; },
-        LBUF { txt="Nyssa"; },
-        LBUF { txt="Peger"; },
-        LBUF { txt="Metrio"; },
-        LBUF { txt="Mitchitatchi"; },
-        LBUF { txt="Neppari"; },
-        LBUF { txt="Amcuila"; },
-        LBUF { txt="Muipitsu"; },
-        LBUF { txt="Redex"; },
-        LBUF { txt="Maariz"; },
-        LBUF { txt="Swerck"; },
-        LBUF { txt="Makiac"; },
-        LBUF { txt="Dumpia"; },
-        LBUF { txt="Worldmom"; },
-        LBUF { txt="Renfaul"; },
-        LBUF { txt="Kmartissori"; },
-        LBUF { txt="Findo"; },
-        LBUF { txt="Samsanc"; },
-        LBUF { txt="Dellervo"; },
-        LBUF { txt="Manrel"; },
-        LBUF { txt="WSMRL"; },
-        LBUF { txt="Eripox"; },
-        LBUF { txt="Abiturien"; },
-        LBUF { txt="Vesus"; },
-        LBUF { txt="MI4"; },
-        LBUF { txt="Overhiba"; },
-        LBUF { txt="Tridune"; },
-        LBUF { txt="Kyomcera"; },
-        LBUF { txt="Praston"; },
-        LBUF { txt="Gapmis"; },
-        LBUF { txt="WPPDCD"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_addresses
-    {
-    items=
-        {
-        LBUF { txt="Barnes Street"; },
-        LBUF { txt="Barnes Place"; },
-        LBUF { txt="Eastman Street"; },
-        LBUF { txt="West Park"; },
-        LBUF { txt="South Park"; },
-        LBUF { txt="Park Avenue"; },
-        LBUF { txt="Richards Court"; },
-        LBUF { txt="Pukershire Avenue"; },
-        LBUF { txt="Ellis Avenue"; },
-        LBUF { txt="East Mountain"; },
-        LBUF { txt="Chestnut Hill"; },
-        LBUF { txt="Plains Road"; },
-        LBUF { txt="Fremont Street"; },
-        LBUF { txt="Heritage Court"; },
-        LBUF { txt="Highland Avenue Extension"; },
-        LBUF { txt="Maple Heights"; },
-        LBUF { txt="McKenzie Avenue"; },
-        LBUF { txt="McKenzie Lane"; },
-        LBUF { txt="West Terrace Street"; },
-        LBUF { txt="Windsor Avenue"; },
-        LBUF { txt="Windsor Road"; },
-        LBUF { txt="Mechanic Street Extension"; },
-        LBUF { txt="Granite Place"; },
-        LBUF { txt="Meadow Street"; },
-        LBUF { txt="Sugar River"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_cities
-    {
-    items=
-        {
-        LBUF { txt="Kuopio"; },       
-        LBUF { txt="Los Angeles"; },        
-        LBUF { txt="Lappeenranta"; },
-        LBUF { txt="London"; },        
-        LBUF { txt="Bangkok"; },
-        LBUF { txt="St. Michel"; },                
-        LBUF { txt="St. Petersburg"; },        
-        LBUF { txt="Tokyo"; },
-        LBUF { txt="Helsinki"; },
-        LBUF { txt="Trondheim"; },        
-        LBUF { txt="Nairobi"; },
-        LBUF { txt="Havana"; }        
-        };
-    }
-
-RESOURCE ARRAY r_data_countries
-    {
-    items=
-        {
-        LBUF { txt="Finland"; },
-        LBUF { txt="Cuba"; },
-        LBUF { txt="United States of America"; },
-        LBUF { txt="Thailand"; },
-        LBUF { txt="Sweden"; },
-        LBUF { txt="Russia"; },
-        LBUF { txt="Japan"; },
-        LBUF { txt="Norway"; },
-        LBUF { txt="Kenya"; }                
-        };
-    }
-
-RESOURCE ARRAY r_data_postcodes
-    {
-    items=
-        {
-        LBUF { txt="00310"; },
-        LBUF { txt="FI-70100"; },
-        LBUF { txt="99002"; },
-        LBUF { txt="11233"; }            
-        };
-    }
-
-RESOURCE ARRAY r_data_states
-    {
-    items=
-        {
-        LBUF { txt="California state"; }, 
-        LBUF { txt="Alaska state"; },
-        LBUF { txt="Florida state"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_poboxes
-    {
-    items=
-        {
-        LBUF { txt="P.O BOX 5532"; },
-        LBUF { txt="P.O BOX 701"; },
-        LBUF { txt="99"; },
-        LBUF { txt="1133"; },
-        LBUF { txt="P.O. BOX 113322"; },
-        LBUF { txt="112"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_prefixes
-    {
-    items=
-        {
-        LBUF { txt="Ms."; },
-        LBUF { txt="Mrs."; }, 
-        LBUF { txt="Mr."; },
-        LBUF { txt="Dr."; }
-        
-        };
-    }
-
-RESOURCE ARRAY r_data_suffixes
-    {
-    items=
-        {
-        LBUF { txt="Jr."; },
-        LBUF { txt="Sr."; }        
-        };
-    }
-
-RESOURCE ARRAY r_data_jobtitles
-    {
-    items=
-        {
-        LBUF { txt="Doctor"; },
-        LBUF { txt="SW Engineer"; },
-        LBUF { txt="Administrative Assistant"; },
-        LBUF { txt="Bookkeeper"; },
-        LBUF { txt="Credit Controller"; },
-        LBUF { txt="Data Entry Operator"; },
-        LBUF { txt="Payroll Officer"; },
-        LBUF { txt="Receptionist"; },
-        LBUF { txt="Trainee"; },
-        LBUF { txt="Accounts Clerk"; },
-        LBUF { txt="Administrator"; },
-        LBUF { txt="Taxation Assistant"; },
-        LBUF { txt="Financial Director"; },
-        LBUF { txt="Bank Manager"; },
-        LBUF { txt="Mobile Lending"; },
-        LBUF { txt="Overseas Transactions"; },
-        LBUF { txt="Restructuring"; },
-        LBUF { txt="Business Analyst"; },
-        LBUF { txt="Call Centre Manager"; },
-        LBUF { txt="Administration"; },
-        LBUF { txt="Manager"; },
-        LBUF { txt="Student"; },
-        LBUF { txt="Mail Sorter"; },
-        LBUF { txt="Mayor"; },
-        LBUF { txt="Account Servicing"; },
-        LBUF { txt="Management"; },
-        LBUF { txt="Media Consultant"; },
-        LBUF { txt="Newsagent"; },
-        LBUF { txt="Librarian"; },
-        LBUF { txt="Creative Director"; },
-        LBUF { txt="Announcer"; },
-        LBUF { txt="Copywriter"; },
-        LBUF { txt="Presenter"; },
-        LBUF { txt="Promotions Manager"; },
-        LBUF { txt="Advertising Sales Representative"; },
-        LBUF { txt="Editor"; },
-        LBUF { txt="Marketing, Sales & Publicity"; },
-        LBUF { txt="Publisher"; },
-        LBUF { txt="Gallery Assistant"; },
-        LBUF { txt="Photographer"; },
-        LBUF { txt="Storyboard Artist"; },
-        LBUF { txt="Events Manager"; },
-        LBUF { txt="Cameraman"; },
-        LBUF { txt="Technician"; },
-        LBUF { txt="Producer"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_phonenumbers
-    {
-    items=
-        {
-        LBUF { txt="0307834387"; },
-        LBUF { txt="0230328732"; },
-        LBUF { txt="0430365562"; },
-        LBUF { txt="0530328732"; },
-        LBUF { txt="0433032865"; },
-        LBUF { txt="0542306532"; },
-        LBUF { txt="0342303777"; },
-        LBUF { txt="0250235603"; },
-        LBUF { txt="0492303652"; },
-        LBUF { txt="0542303286"; },
-        LBUF { txt="0543656546"; },
-        LBUF { txt="0545545454"; },
-        LBUF { txt="0543444454"; },
-        LBUF { txt="0776463255"; },
-        LBUF { txt="0432443343"; },
-        LBUF { txt="0243334344"; },
-        LBUF { txt="0544543443"; },
-        LBUF { txt="0231343243"; },
-        LBUF { txt="0213443434"; },
-        LBUF { txt="0143234476"; },
-        LBUF { txt="0785434444"; },
-        LBUF { txt="0454445345"; },
-        LBUF { txt="0342443433"; },
-        LBUF { txt="0432434454"; },
-        LBUF { txt="0455454454"; },
-        LBUF { txt="0656565655"; },
-        LBUF { txt="0343434443"; },
-        LBUF { txt="0565645455"; },
-        LBUF { txt="0343243243"; },
-        LBUF { txt="0565466565"; },
-        LBUF { txt="0465565655"; },
-        LBUF { txt="0435445454"; },
-        LBUF { txt="+35854553456"; },
-        LBUF { txt="+35878453486"; },
-        LBUF { txt="+35876653456"; },
-        LBUF { txt="+35834435486"; },
-        LBUF { txt="+35876766466"; },
-        LBUF { txt="+4465665456"; },
-        LBUF { txt="+4432434334"; },
-        LBUF { txt="+4488776776"; },
-        LBUF { txt="+4465655656"; },
-        LBUF { txt="+4443433434"; },
-        LBUF { txt="+4465656565"; },
-        LBUF { txt="+4454454354"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_groupnames
-    {
-    items=
-        {
-        LBUF { txt="Nice guys"; },
-        LBUF { txt="Repairs"; },
-        LBUF { txt="Office works"; },
-        LBUF { txt="The buddies"; },
-        LBUF { txt="Football team"; },
-        LBUF { txt="Gold club"; },
-        LBUF { txt="Silver club"; },
-        LBUF { txt="Bronze club"; },
-        LBUF { txt="Best buddies"; },
-        LBUF { txt="Rockers"; },
-        LBUF { txt="Science group"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_meetingreasons
-    {
-    items=
-        {
-        LBUF { txt="Security issues"; },
-        LBUF { txt="Team meeting"; },
-        LBUF { txt="Discussion about"; },
-        LBUF { txt="Work plans"; },
-        LBUF { txt="Meeting with the professor"; },
-        LBUF { txt="Meeting with the boss"; },
-        LBUF { txt="Work issues"; },
-        LBUF { txt="New workers"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_meetingplaces
-    {
-    items=
-        {
-        LBUF { txt="Room"; },
-        LBUF { txt="Home"; },
-        LBUF { txt="Auditorium"; },
-        LBUF { txt="Company"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_landmark_names
-    {
-    items=
-        {
-        LBUF { txt="Good place to fish";},
-        LBUF { txt="Uncle over board";},
-        LBUF { txt="Best food ever!";},
-        LBUF { txt="Nice beach";},
-        LBUF { txt="Good hamburgers";},
-        LBUF { txt="Nice view";},
-        LBUF { txt="John's home";},
-        LBUF { txt="Carage";},
-        LBUF { txt="Gas station";},
-        LBUF { txt="Food store";},
-        LBUF { txt="Car wash";},
-        LBUF { txt="Summer cottage";},
-        LBUF { txt="My home";},
-        LBUF { txt="Bank";},
-        LBUF { txt="Hospital";},
-        LBUF { txt="Ice hall";},
-        LBUF { txt="Work place";}
-        };
-    }
-
-RESOURCE ARRAY r_data_landmark_descriptions
-    {
-    items=
-        {
-        LBUF { txt="The salmons were really big here!";},        
-        LBUF { txt="Delicious strawberries sold here. Must visit again sometime!";},
-        LBUF { txt="Place looks really nice.";},
-        LBUF { txt="This is my favorite place";},
-        LBUF { txt="Words are not enough to describe this landmark";},        
-        LBUF { txt="What a shocking place to visit! Remember to bring camera next time :-)";}
-        };
-    }
-
-RESOURCE ARRAY r_data_memos
-    {
-    items=
-        {
-        LBUF { txt="No work today!"; },
-        LBUF { txt="Movies tonight"; },
-        LBUF { txt="Ship new binaries"; },
-        LBUF { txt="New works"; },
-        LBUF { txt="Exam"; },
-        LBUF { txt="Community service"; },
-        LBUF { txt="Volunteer work"; },
-        LBUF { txt="Don't forget the dinner at the restaurant"; },
-        LBUF { txt="Go the bank"; },
-        LBUF { txt="Go to the store"; },
-        LBUF { txt="Buy goods"; },
-        LBUF { txt="Buy food"; },
-        LBUF { txt="Buy new pair of socks"; },
-        LBUF { txt="Buy vegetables"; },
-        LBUF { txt="Buy fruits"; },
-        LBUF { txt="Umbrella"; },
-        LBUF { txt="New shoes"; },
-        LBUF { txt="New suit"; },
-        LBUF { txt="Buy flowers"; },
-        LBUF { txt="School day"; }
-        };
-    }
-RESOURCE ARRAY r_data_anniversaries
-    {
-    items=
-        {
-        LBUF { txt="birthday"; },
-        LBUF { txt="anniversary"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_todos
-    {
-    items=
-        {
-        LBUF { txt="Watch for gum on my shoe"; },
-        LBUF { txt="Watch my step in the hall"; },
-        LBUF { txt="Always think big"; },
-        LBUF { txt="Don't ever think small"; },
-        LBUF { txt="Keep pedaling my bike"; },
-        LBUF { txt="Watch for bees in my pop"; },
-        LBUF { txt="Keep moving forward"; },
-        LBUF { txt="Don't ever stop"; },
-        LBUF { txt="Keep my sled underneath me"; },
-        LBUF { txt="Keep my stick on the ice"; },
-        LBUF { txt="Don't swim in a whirlpool"; },
-        LBUF { txt="Don't look for a fight"; },
-        LBUF { txt="Don't spit in the wind"; },
-        LBUF { txt="Just do what is right"; },
-        LBUF { txt="Go out in the world"; },
-        LBUF { txt="Enjoy a warm rain"; },
-        LBUF { txt="Don't worship TV"; },
-        LBUF { txt="Keep my oars in the water"; },
-        LBUF { txt="Point my boat right downstream"; },
-        LBUF { txt="Face head on my problems"; },
-        LBUF { txt="Change underwear daily"; },
-        LBUF { txt="Believe myself first"; },
-        LBUF { txt="Go out and have fun"; },
-        LBUF { txt="Turn the cards one by one"; },
-        LBUF { txt="Get out and do something"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_reminders
-    {
-    items=
-        {
-        LBUF { txt="Remeber to fix car"; },
-        LBUF { txt="Remeber to eat vegetables"; },
-        LBUF { txt="Remeber to go shopping"; },
-        LBUF { txt="Remeber to buy boxes for moving"; },
-        LBUF { txt="Remeber to fix bike"; },
-        LBUF { txt="Remeber to buy christmast presents"; },
-        LBUF { txt="Remeber to send flowers to grandmother"; },
-        LBUF { txt="Remeber to talk with son"; },
-        LBUF { txt="Remeber to cut hedge"; },
-        LBUF { txt="Remeber to bumper potatoes"; },
-        LBUF { txt="Remeber to harvest corn field"; },
-        LBUF { txt="Remeber to sleep enaugh"; },
-        LBUF { txt="Remeber to wash teeths ewery morning"; },
-        LBUF { txt="Remeber to get sleep early"; },
-        LBUF { txt="Remeber to give some wather to flowers"; },
-        LBUF { txt="Remeber to wax snowboard"; },
-        LBUF { txt="Remeber to wax skiis"; },
-        LBUF { txt="Remeber to wax cross country skiis"; },
-        LBUF { txt="Remeber to call mother"; },
-        LBUF { txt="Remeber to call father"; },
-        LBUF { txt="Remeber to call brother"; },
-        LBUF { txt="Remeber to call sister"; },
-        LBUF { txt="Remeber to call daughter"; },
-        LBUF { txt="Remeber to call son"; },
-        LBUF { txt="Remeber to rent villa"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_messagesubjects
-    {
-    items=
-        {
-        LBUF { txt="Whaaasssaaap!!??"; },
-        LBUF { txt="Hello"; },
-        LBUF { txt="How are you doing?"; },
-        LBUF { txt="You will win the battle, GUARANTEED!"; },
-        LBUF { txt="Why pay more for something if you don't have to?"; },
-        LBUF { txt="You can afford health care now"; },
-        LBUF { txt="Re: *Buddy* *Lists*!!~ (it's soooo cool)!!~"; },
-        LBUF { txt="Weedmon say: call, we be open 7 days, mon"; },
-        LBUF { txt="Want her to look better?"; },
-        LBUF { txt="Good Morning andyw, how are you?"; },
-        LBUF { txt="Happy Assumption"; },
-        LBUF { txt="There is NO Risk involved"; },
-        LBUF { txt="Free Bottle Offer!"; },
-        LBUF { txt="Introduction on MDSL"; },
-        LBUF { txt="Theres Help out there for you"; },
-        LBUF { txt="hello there - check this out"; },
-        LBUF { txt="Darling"; },
-        LBUF { txt="It doesn't have to be that way"; },
-        LBUF { txt="Webmaster, Free health insurance quotes!"; },
-        LBUF { txt="Join us at the OSGi 2003 World Congress"; },
-        LBUF { txt="Put your subject line here"; },
-        LBUF { txt="You are not protected"; },
-        LBUF { txt="Please try again"; },
-        LBUF { txt="you didn't reply my email ? why ? ???"; },
-        LBUF { txt="A very funny game"; },
-        LBUF { txt="Meeting notice"; },
-        LBUF { txt="Opportunities"; }
-        };
-    }
-
-RESOURCE ARRAY r_data_messagetexts
-    {
-    items=
-        {
-        LBUF { txt="The contents of these pages are copyrighted. Any rights not expressly granted herein are reserved. The use of this site is permitted to private use."; },
-        LBUF { txt="Reproduction, transfer, distribution or storage of part or all of the contents in any form without the prior written permission is prohibited."; },
-        LBUF { txt="We consents to you browsing the pages on your computer or printing copies of extracts from these pages for your personal use only."; },
-        LBUF { txt="If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information."; },
-        LBUF { txt="The use of press releases and other documents classified as public is permitted in public communications if the source for the information has been stated."; },
-        LBUF { txt="For your easy accessibility we may include links to sites on the Internet that are owned or operated by third parties."; },
-        LBUF { txt="You also agree that we have no control over the content of that site and cannot assume any responsibility for material by such third-party sites."; },
-        LBUF { txt="In addition, a link to a such site does not imply that we endorses the site or the products or services referenced in such third party site."; },
-        LBUF { txt="In order to respond to your questions or manage interactive customer programs, it may be necessary to ask for personal information."; },
-        LBUF { txt="We may use this information to respond to your requests, or to contact you via mail, e-mail or phone to inform you of new products."; },
-        LBUF { txt="If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information."; }
-        };
-    }
-
--- a/creator/engine/inc/creator.hrh	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +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 __CREATOR_HRH__
-#define __CREATOR_HRH__
-
-
-enum TCreatorIds
-    {
-
-    // Phonebook entries shuld be the first, bacause some other entries references them
-    ECmdCreatePhoneBookEntries = 1,
-    ECmdCreatePhoneBookEntryContacts,
-    ECmdCreatePhoneBookEntryGroups,
-    ECmdCreatePhoneBookEntrySubscribedContacts,
-    
-    ECmdCreateFromFile,
-
-    ECmdCreateCalendarEntries,
-    ECmdCreateCalendarEntryAppointments,
-    ECmdCreateCalendarEntryEvents,
-    ECmdCreateCalendarEntryAnniversaries,
-    ECmdCreateCalendarEntryToDos,
-    ECmdCreateCalendarEntryReminders,
-
-    ECmdCreateBrowserEntries,
-    ECmdCreateBrowserBookmarkEntries,
-    ECmdCreateBrowserBookmarkFolderEntries,
-    ECmdCreateBrowserSavedPageEntries,
-    ECmdCreateBrowserSavedPageFolderEntries,
-
-    ECmdCreateFileEntries,
-    ECmdCreateFileEntryEmptyFolder,
-
-    ECmdCreateFileEntry3GPP_70kB,
-    ECmdCreateFileEntryAAC_100kB,
-    ECmdCreateFileEntryAMR_20kB,
-    ECmdCreateFileEntryBMP_25kB,
-    ECmdCreateFileEntryDeck_1kB,
-    ECmdCreateFileEntryDOC_20kB,
-    ECmdCreateFileEntryGIF_2kB,
-    ECmdCreateFileEntryHTML_20kB,
-    ECmdCreateFileEntryJAD_1kB,
-    ECmdCreateFileEntryJAR_10kB,
-    ECmdCreateFileEntryJP2_65kB,
-    ECmdCreateFileEntryJPEG_200kB,
-    ECmdCreateFileEntryJPEG_25kB,
-    ECmdCreateFileEntryJPEG_500kB,
-    ECmdCreateFileEntryMIDI_10kB,
-    ECmdCreateFileEntryMP3_250kB,
-    ECmdCreateFileEntryMP4_200kB,
-    ECmdCreateFileEntryMXMF_40kB,
-    ECmdCreateFileEntryPNG_15kB,
-    ECmdCreateFileEntryPPT_40kB,
-    ECmdCreateFileEntryRAM_1kB,
-    ECmdCreateFileEntryRM_95kB,
-    ECmdCreateFileEntryRNG_1kB,
-    ECmdCreateFileEntrySVG_15kB,
-    ECmdCreateFileEntrySWF_15kB,
-    ECmdCreateFileEntryTIF_25kB,
-    ECmdCreateFileEntryTXT_10kB,
-    ECmdCreateFileEntryTXT_70kB,
-    ECmdCreateFileEntryVCF_1kB,
-    ECmdCreateFileEntryVCS_1kB,
-    ECmdCreateFileEntryWAV_20kB,
-    ECmdCreateFileEntryXLS_15kB,
-    ECmdCreateFileEntrySISX_10kB,
-    ECmdCreateFileEntryWMA_50kB,
-    ECmdCreateFileEntryWMV_200kB,
-
-    ECmdCreateLogEntries,
-    ECmdCreateLogEntryMissedCalls,
-    ECmdCreateLogEntryReceivedCalls,
-    ECmdCreateLogEntryDialledNumbers,
-
-    ECmdCreateMessagingEntries,
-    ECmdCreateMessagingEntryCBSTopics,
-    ECmdCreateMessagingEntryDocumentsFolders,
-    ECmdCreateMessagingEntrySMSMessageCenters,
-    ECmdCreateMessagingEntryMailboxes,
-    ECmdCreateMessagingEntryMessages,
-    ECmdCreateMessagingEntryMessagesViaScript,
-    ECmdCreateMessagingEntryTemplates,
-
-    ECmdCreateRandomEntrySMSInbox,
-    ECmdCreateRandomEntrySMSDrafts,
-    ECmdCreateRandomEntrySMSOutbox,
-    ECmdCreateRandomEntrySMSSent,
-    ECmdCreateRandomEntryMMSInbox,
-    ECmdCreateRandomEntryMMSDrafts,
-    ECmdCreateRandomEntryMMSOutbox,
-    ECmdCreateRandomEntryMMSSent,
-    ECmdCreateRandomEntryAMSInbox,
-    ECmdCreateRandomEntryAMSDrafts,
-    ECmdCreateRandomEntryAMSOutbox,
-    ECmdCreateRandomEntryAMSSent,
-    ECmdCreateRandomEntryEmailInbox,
-    ECmdCreateRandomEntryEmailDrafts,
-    ECmdCreateRandomEntryEmailOutbox,
-    ECmdCreateRandomEntryEmailSent,
-    ECmdCreateRandomEntryBIOInbox,
-    ECmdCreateRandomEntryBIODrafts,
-    ECmdCreateRandomEntryBIOOutbox,
-    ECmdCreateRandomEntryBIOSent,
-    ECmdCreateRandomEntryIRInbox,
-    ECmdCreateRandomEntryIRDrafts,
-    ECmdCreateRandomEntryIROutbox,
-    ECmdCreateRandomEntryIRSent,
-    ECmdCreateRandomEntryBTInbox,
-    ECmdCreateRandomEntryBTDrafts,
-    ECmdCreateRandomEntryBTOutbox,
-    ECmdCreateRandomEntryBTSent,
-
-    ECmdCreateMiscEntries,
-    ECmdCreateMiscEntryAccessPoints,
-    ECmdCreateMiscEntryAppMenuFolders,
-    ECmdCreateMiscEntryIMPSServers,
-    ECmdCreateMiscEntryNotes,
-    ECmdCreateMiscEntrySyncSettings,
-    ECmdCreateMiscEntryLandmarks,
-
-    ECmdDeleteEntries,
-    ECmdDeleteAllEntries,
-    ECmdDeleteAllCreatorEntries,
-    ECmdDeleteContacts,
-    ECmdDeleteCreatorContacts,
-    ECmdDeleteContactGroups,
-    ECmdDeleteCreatorContactGroups,
-    ECmdDeleteCalendarEntries,
-    ECmdDeleteCreatorCalendarEntries,
-    ECmdDeleteBrowserBookmarks,
-    ECmdDeleteCreatorBrowserBookmarks,
-    ECmdDeleteBrowserBookmarkFolders,
-    ECmdDeleteCreatorBrowserBookmarkFolders,
-    ECmdDeleteBrowserSavedPages,
-    ECmdDeleteCreatorBrowserSavedPages,
-    ECmdDeleteBrowserSavedPageFolders,
-    ECmdDeleteCreatorBrowserSavedPageFolders,
-    ECmdDeleteCreatorFiles,
-    ECmdDeleteLogs,
-    ECmdDeleteCreatorLogs,
-    ECmdDeleteMessages,
-    ECmdDeleteCreatorMessages,
-    ECmdDeleteMailboxes,
-    ECmdDeleteCreatorMailboxes,
-    ECmdDeleteIAPs,
-    ECmdDeleteCreatorIAPs,
-    ECmdDeleteIMPSs,
-    ECmdDeleteCreatorIMPSs,
-    ECmdDeleteNotes,
-    // ECmdDeleteCreatorNotes, not supported
-    ECmdDeleteLandmarks,
-    ECmdDeleteCreatorLandmarks,
-
-    ECmdAboutCreator,
-
-    ECmdSelectRandomDataFile,
-
-    EProgressNote
-
-    };
-
-#endif // __CREATOR_HRH__
--- a/creator/engine/inc/creator.pan	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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 __CREATOR_PAN__
-#define __CREATOR_PAN__
-
-
-/** Creator application panic codes */
-enum TCreatorPanics 
-    {
-    ECreatorBasicUi = 1
-    // add further panics here
-    };
-
-#endif // __CREATOR_PAN__
--- a/creator/engine/inc/creator_accesspoint.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +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 __CREATORACCESSPOINTS_H__
-#define __CREATORACCESSPOINTS_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-#include "creator_connectionmethodbase.h"
-
-#include <e32base.h>
-#include <commdb.h>
-//#include <ApSelect.h>
-//#include <ApDataHandler.h>
-//#include <ApAccessPointItem.h>
-//#include <ApUtils.h>
-//#include <ApEngineConsts.h>
-#include <msvapi.h>
-#include <mtclreg.h>
-#include <mmsclient.h>
-
-
-class CCreatorEngine;
-class CAccessPointsParameters;
-
-
-
-class CCreatorAccessPoints : public CCreatorConnectionSettingsBase, public MMsvSessionObserver
-    {
-public: 
-    static CCreatorAccessPoints* NewL(CCreatorEngine* aEngine);
-    static CCreatorAccessPoints* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorAccessPoints();
-
-private:
-    CCreatorAccessPoints();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
-
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    
-    TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters);    
-    TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse );
-    
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-private:
-    CCommsDatabase* iCommsDb;
-    CApDataHandler* iApDataHandler;
-    CApUtils* iApUtils;
-    CAccessPointsParameters* iParameters;
-    RArray<TUint32> iEntryIds; // TUint32 CApDataHandler::CreateFromDataL
-
-public:
-    };
-
-
-class CAccessPointsParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    HBufC*          iConnectionName; // connection name
-    TApBearerType   iBearerType; // bearer type
-    HBufC*          iWapStartPage; // WAP start page
-    TUint32         iWapWspOption; // connection type
-    HBufC*          iGprsAcessPointName; // access point name
-    HBufC*          iIspLoginName; // username
-    TBool           iSecureAuthentication; // password authentication
-    HBufC*          iIspLoginPass; // password
-    TBool           iPromptPassword; // prompt password
-    HBufC*          iWapGatewayAddress; // WAP gateway address
-    HBufC*          iIspIPAddr; // phone IP
-    HBufC*          iIspIPNameServer1;  // primary name server
-    HBufC*          iIspIPNameServer2;  // secondary name server
-    HBufC*          iIspDefaultTelNumber; // datacall number
-    TUint32         iIspBearerCallTypeIsdn; // datacall type
-    TUint32         iIspBearerSpeed;  // max connection speed
-    HBufC*          iProxyServerAddress;  // proxy address
-    TUint32         iProxyPortNumber; // proxy number
-    
-    void SetRandomCMNameL(CCreatorEngine& aEngine);
-    void SetRandomLoginNameL(CCreatorEngine& aEngine);
-    void SetRandomLoginPassL(CCreatorEngine& aEngine);
-    void SetRandomSecureAuthenticationL(CCreatorEngine& aEngine);
-    void SetRandomPromptPasswordL(CCreatorEngine& aEngine);
-    void SetRandomProxyAddressL(CCreatorEngine& aEngine);
-    void SetRandomProxyPortL(CCreatorEngine& aEngine);
-    void SetRandomStartPageL(CCreatorEngine& aEngine);
-    void SetRandomIPAddressL(CCreatorEngine& aEngine);
-    void SetRandomIP4NameServer1L(CCreatorEngine& aEngine);
-    void SetRandomIP4NameServer2L(CCreatorEngine& aEngine);
-    void SetRandomTelephoneNumberL(CCreatorEngine& aEngine);
-    void SetRandomBearerTypeIsdnL(CCreatorEngine& aEngine);
-    void SetRandomBearerSpeedL(CCreatorEngine& aEngine);
-    void SetRandomWapWspOptionL(CCreatorEngine& aEngine);
-    void SetRandomGatewayAddressL(CCreatorEngine& aEngine);
-    
-
-public:
-    CAccessPointsParameters();
-    ~CAccessPointsParameters();
-    };
-
-
-
-#endif // __CREATORACCESSPOINTS_H__
--- a/creator/engine/inc/creator_browser.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +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 __CREATORBROWSER_H__
-#define __CREATORBROWSER_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-
-#include <e32base.h>
-//#include <FavouritesItem.h>
-//#include <FavouritesDb.h>
-//#include <FavouritesFile.h>
-
-
-
-class CCreatorEngine;
-class CBrowserParameters;
-
-
-class CCreatorBrowser : public CCreatorModuleBase
-    {
-public: 
-    static CCreatorBrowser* NewL(CCreatorEngine* aEngine);
-    static CCreatorBrowser* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorBrowser();
-
-private:
-    CCreatorBrowser();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-
-    TInt CreateBookmarkEntryL(CBrowserParameters *aParameters);    
-    TInt CreateBookmarkFolderEntryL(CBrowserParameters *aParameters);
-    TInt CreateSavedDeckEntryL(CBrowserParameters *aParameters); 
-    TInt CreateSavedDeckFolderEntryL(CBrowserParameters *aParameters);
-    
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-    
-    void DeleteAllBookmarksL();
-    void DeleteAllBookmarksCreatedByCreatorL();
-    void DeleteAllBookmarkFoldersL();
-    void DeleteAllBookmarkFoldersCreatedByCreatorL();
-    void DeleteAllSavedPagesL();
-    void DeleteAllSavedPagesCreatedByCreatorL();
-    void DeleteAllSavedPageFoldersL();
-    void DeleteAllSavedPageFoldersCreatedByCreatorL();
-
-private:
-    void DeleteAllItemsL( const TDesC& aDbName, CFavouritesItem::TType aTypeFilter, TBool aOnlyCreatedWithCreator, RArray<TInt>& aEntryIds, const TUid aDictUid );
-    
-
-
-private:
-    CBrowserParameters* iParameters;
-    RArray<TInt> iBmEntryIds;
-    RArray<TInt> iBmFEntryIds;
-    RArray<TInt> iSpEntryIds;
-    RArray<TInt> iSpFEntryIds;
-public:
-    };
-
-
-class CBrowserParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    HBufC*              iBookmarkName;
-    HBufC*              iBookmarkAddress;
-    TFavouritesWapAp    iBookmarkAccessPoint;
-    HBufC*              iBookmarkUsername;
-    HBufC*              iBookmarkPassword;    
-
-    HBufC*              iBookmarkFolderName;
-    
-    HBufC*              iSavedDeckLinkName;
-    HBufC*              iSavedDeckLocalAddress;
-            
-    HBufC*              iSavedDeckFolderName;
-
-public:
-    CBrowserParameters();
-    ~CBrowserParameters();
-    };
-
-
-
-#endif // __CREATORBROWSER_H__
--- a/creator/engine/inc/creator_browserelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +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 CREATORBROWSERELEMENT_H_
-#define CREATORBROWSERELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-namespace creatorbrowser
-{
-_LIT(KBookmark, "bookmark");
-_LIT(KBookmarkFolder, "bookmarkfolder");
-_LIT(KSavedPage, "savedpage");
-_LIT(KSavedPageFolder, "savedpagefolder");
-
-_LIT(KName, "name");
-_LIT(KPath, "path");
-_LIT(KUsername, "username");
-_LIT(KPassword, "password");
-_LIT(KUrl, "url");
-}
-
-class CCreatorBrowserElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorBrowserElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    
-protected:
-    CCreatorBrowserElement(CCreatorEngine* aEngine);    
-    TInt GetBrowserCommandL() const;
-};
-#endif /*CREATORBROWSERELEMENT_H_*/
--- a/creator/engine/inc/creator_calendar.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +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 __CREATORCALENDARINTERIM_H__
-#define __CREATORCALENDARINTERIM_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-#include "creator_calendarbase.h"
-
-#include <e32base.h>
-#include <e32std.h>
-
-//#include <calenlauncher.h> 
-#include <calentry.h>
-#include <calentryview.h>
-#include <caltime.h>
-#include <calsession.h>
-#include <calprogresscallback.h>
-#include <calcategory.h>
-#include <caluser.h>
-#include <calrrule.h>
-
-
-class CCreatorEngine;
-class CCalenderInterimParameters;
-class CAsyncWaiter;
-
-class CCreatorInterimCalendar : public CCreatorCalendarBase, public MCalProgressCallBack
-    {
-enum TCreatorCalendarStatus{
-    ECreatorCalendarDelete = 0,
-    ECreatorCalendarStart, 
-    ECreatorCalendarGetWeeklyEntries,
-    ECreatorCalendarGetAttendies,
-    ECreatorCalendarGetStartDate,
-    ECreatorCalendarGetEndDate, 
-    ECreatorCalendarAddDefaultAlarm
-};
-
-public: 
-    static CCreatorInterimCalendar* NewL(CCreatorEngine* aEngine);
-    static CCreatorInterimCalendar* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorInterimCalendar();
-
-private:
-    CCreatorInterimCalendar();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-    void AddRepeatingRuleL(const TCalTime& aStartTime, CCalEntry& aCalEntry, CCalenderInterimParameters* parameters=0);
-    void SetRandomAlarmL(CCalEntry& aCalEntry);
-    void SetAlarmL(CCalEntry& aCalEntry, CCalenderInterimParameters* params);
-    void AddAttendeesL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters=0);
-    void SetPhoneOwnerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy );
-    void SetOrganizerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy);
-    void SetOrganizerL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters );
-    
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
-    
-    TInt CreateAppointmentEntryL(CCreatorModuleBaseParameters *aParameters);    
-    TInt CreateEventEntryL(CCreatorModuleBaseParameters *aParameters);
-    TInt CreateAnniversaryEntryL(CCreatorModuleBaseParameters *aParameters); 
-    TInt CreateTodoEntryL(CCreatorModuleBaseParameters *aParameters);
-    TInt CreateReminderEntryL(CCreatorModuleBaseParameters *aParameters);
-    
-    void GenerateRandomId(TDes8& aText);
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-private:
-
-    CCalenderInterimParameters* iParameters;
-    TTime   iRandomModeStartTime;
-    TTime   iRandomModeEndTime;
-    TInt    iNumberRepeatingEntries;
-    TInt    iNumberOfAttendees;
-    CCalEntryView* 		iCalEntryView;
-    CCalSession* 		iCalSession;
-    TBool iSetAlarm;
-    CDesCArrayFlat* iSoundFileArray;
-    CAsyncWaiter* iWaiter;
-    HBufC* iTmpCN;
-    HBufC* iTmpEmail;
-    RArray<TUint32> iEntryIds; // TCalLocalUid ( == TUint32 ) CCalEntry::LocalUidL
-
-public:
-
-    //Observer implementation for MCalProgressCallBack
-	void Progress(TInt aPercentageCompleted);
-	
-	void Completed(TInt aError);
-	
-	TBool NotifyProgress();
-
-    };
-
-class CCreatorCalenderAttendee : public CBase
-{
-public:
-    virtual ~CCreatorCalenderAttendee();
-    static CCreatorCalenderAttendee* NewL();
-    void SetCommonNameL(const TDesC& aName);
-    void SetEmailAddressL(const TDesC& aEmail);
-    void SetRole(CCalAttendee::TCalRole aRole);
-    void SetStatus(CCalAttendee::TCalStatus);
-    
-    const TDesC& CommonName() const;
-    const TDesC& EmailAddress() const;
-    CCalAttendee::TCalRole Role() const;
-    CCalAttendee::TCalStatus Status() const;
-    
-private:
-    CCreatorCalenderAttendee();
-    TPtrC  iDummy;
-    HBufC* iCommonName;
-    HBufC* iEmailAddress;
-    CCalAttendee::TCalRole iRole;
-    CCalAttendee::TCalStatus iStatus;
-};
-
-class CCalenderInterimParameters : public CCreatorModuleBaseParameters
-    {
-public:
-
-	void ParseL(CCommandParser* parser, TParseParams aCase);
-	TBool IsAllowedEntryStatus(CCalEntry::TType aType, CCalEntry::TStatus aStatus);
-
-	TCalRRule::TType iRecurrentFrequency;
-	TInt iRecurrentInterval;
-	TTime iRecurrentStartTime;
-	TTime iRecurrentEndTime;
-	TInt iRepeatingCount; // This is used when running a script...
-	TTime iAlarmTime; // NullTTime means no alarm
-	TBool iUseRandomAlarmTime; // ETrue if random alarm should be set. Overwrites the iAlarmTime.
-	
-	RPointerArray<CCreatorCalenderAttendee> iAttendees;
-	RArray<TLinkIdParam> iAttendeeLinkIds; // For attendees. Stores the linked contact ids.
-	HBufC* iOrganizerName;
-	HBufC* iOrganizerEmail;
-		 
-	HBufC*  iDescription;
-	HBufC*  iSummary;
-	HBufC*  iLocation;
-	TTime   iStartTime;
-	TTime   iEndTime;
-	TInt    iNumberRepeatingEntries; // This is used when user input is used...
-	TInt    iNumberOfAttendees; // Number of randomly generated attendees
-	TInt    iNumberOfExistingAttendees; // Number of attendees selected from existing contacts.
-	
-	//An appointment, which has a start time and end time.
-    TTime   iAppointmentStartTime;
-    TTime   iAppointmentEndTime;
-    HBufC*  iAppointmentLocation;
-    HBufC*  iAppointmentReason;
-
-    //An event, which has a start time and end time.
-    
-    TTime   iEventStartTime;
-    TTime   iEventEndTime;
-    HBufC*  iEventReason;
-
-    //A reminder, which has a start time only.
-    TTime   iReminderStartTime;
-    HBufC*  iReminderReason;
-    
-    //An anniversary, which has a start time and end time.
-    TTime   iAnniversaryStartTime;
-    TTime   iAnniversaryEndTime;
-    HBufC*  iAnniversaryReason;
-
-    //A to-do, which can have a start time and end time (the end time is the due date), or can be undated.
-    TTime   iTodoStartTime;//optional
-    TTime   iTodoDueTime;//also end time (optional)
-    HBufC*  iTodoTask;
-    TInt    iTodoPriority;
-
-    TTime   iRandomModeStartTime;
-    TTime   iRandomModeEndTime;
-    
-    CCalEntry::TStatus iStatus;
-    
-public:
-	CCalenderInterimParameters();
-    ~CCalenderInterimParameters();   
-    
-    };
-
-
-
-#endif // __CREATORCALENDARINTERIM_H__
--- a/creator/engine/inc/creator_calendarbase.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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 CCREATORCALENDARBASE_
-#define CCREATORCALENDARBASE_
-
-#include "creator_modulebase.h"
-
-class CCreatorModuleBaseParameters;
-
-class CCreatorCalendarBase : public CCreatorModuleBase{
-public:
-
-
-    //An appointment, which has a start time and end time. EAppt.
-    virtual TInt CreateAppointmentEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
-    //An event, which has a start time and end time. EEvent.
-    virtual TInt CreateEventEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
-    //An anniversary, which has a start time and end time. EAnniv.
-    virtual TInt CreateAnniversaryEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
-    //A to-do, which can have a start time and end time (the end time is the due date), or can be undated. ETodo.
-    virtual TInt CreateTodoEntryL(CCreatorModuleBaseParameters *aParameters) = 0;     
-    //A reminder, which has a start time only. EReminder.
-    virtual TInt CreateReminderEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
-
-};
-
-#endif /*CCREATORCALENDARBASE_*/
--- a/creator/engine/inc/creator_calendarelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +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 CREATORCALENDARELEMENT_H_
-#define CREATORCALENDARELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-class CCalenderInterimParameters;
-
-// Calendar elements:
-namespace creatorcalendar
-{
-    _LIT(KCalendar, "calendar");
-
-    // Calendar entry types:
-    _LIT(KType, "type");
-    _LIT(KCalTypeAppointment, "appointment");
-    _LIT(KCalTypeEvent, "event");
-    _LIT(KCalTypeReminder, "reminder");
-    _LIT(KCalTypeAnniversary, "anniversary");
-    _LIT(KCalTypeTodo, "todo");
-
-    // Calendar entry field elements:
-    _LIT(KSummary, "summary");
-    _LIT(KDescription, "description");
-    _LIT(KLocation, "location");
-    _LIT(KStarttime, "starttime");
-    _LIT(KEndtime, "endtime");
-    _LIT(KRecurrentFreq, "recurrentfrequency");
-    _LIT(KRecurrentInterval, "recurrentinterval");
-    _LIT(KRecurrentFrom, "recurrentfrom");
-    _LIT(KRecurrentTo, "recurrentto");
-    _LIT(KRepeatingCount, "repeatingcount");
-    _LIT(KAlarmtime, "alarmtime");
-    _LIT(KSynchronization, "synchronization");
-    _LIT(KOrganizername, "organizername");
-    _LIT(KOrganizeremail, "organizeremail");
-    _LIT(KAttendees, "attendees");
-    _LIT(KAttendee, "attendee");
-    _LIT(KCommonname, "commonname");
-    _LIT(KEmail, "email");
-    _LIT(KRole, "role");
-    _LIT(KStatus, "status");
-    _LIT(KPriority, "priority");
-
-    // Recurrency frequency values:
-    _LIT(KNotRepeated, "not-repeated");
-    _LIT(KWeekly, "weekly");
-    _LIT(KDaily, "daily");
-    _LIT(KMonthly, "monthly");
-    _LIT(KYearly, "yearly");
-
-    // Attendee role values:
-    _LIT(KRoleRequired, "required");
-    _LIT(KRoleOptional, "optional");
-    _LIT(KRoleNonPart, "non-participant");
-    _LIT(KRoleChair, "chair");
-    
-    // Calendar entry status values:
-    _LIT(KCalStatusTentative, "tentative");
-    _LIT(KCalStatusConfirmed, "confirmed");
-    _LIT(KCalStatusCancelled, "cancelled");
-    _LIT(KCalStatusNeedsAction, "todoneedsaction");
-    _LIT(KCalStatusCompleted, "todocompleted");
-    _LIT(KCalStatusInProcess, "todoinprocess");
-
-    // Attendee status values:
-    _LIT(KStatusNeedsAction, "needsaction");
-    _LIT(KStatusAccepted, "accepted");
-    _LIT(KStatusTentative, "tentative");
-    _LIT(KStatusConfirmed, "confirmed");
-    _LIT(KStatusDeclined, "declined");
-    _LIT(KStatusCompleted, "completed");
-    _LIT(KStatusDelegated, "delegated");
-    _LIT(KStatusInProcess, "inprocess");
-    
-    // Priority values:
-    _LIT(KPriorityHigh, "high");
-    _LIT(KPriorityMedium, "medium");
-    _LIT(KPriorityLow, "low");
-}
-
-class CCreatorCalendarElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorCalendarElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-protected:
-    CCreatorCalendarElement(CCreatorEngine* aEngine);
-    
-    enum TEntryType {
-        EAppointment,
-        EEvent,
-        EReminder,
-        EAnniversary,
-        ETodo
-    };
-    
-    void FillEntryParamsL(TEntryType aType, const RPointerArray<CCreatorScriptElement>& fields, CCalenderInterimParameters* parameters); 
-};
-
-#endif /*CREATORCALENDARELEMENT_H_*/
--- a/creator/engine/inc/creator_cmdscriptrun.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#ifndef __CREATORCMDSCRIPTRUN_H__
-#define __CREATORCMDSCRIPTRUN_H__
-
-#include "engine.h"
-
-class CCreatorCmdScriptRun : public CBase, public MBeating
-    {
-public:
-
-    static CCreatorCmdScriptRun* NewL(CCreatorEngine* aEngine);
-	static CCreatorCmdScriptRun* NewLC(CCreatorEngine* aEngine);
-	~CCreatorCmdScriptRun();
-
-    // callback from engine when the commands from the script file have been executed
-    void RunScriptDone();
-
-    // from MBeating
-    void Beat();
-    void Synchronize();
-	
-private:
-    CCreatorCmdScriptRun();
-    void ConstructL(CCreatorEngine* aEngine);
-	void TickL();
-	
-private:
-    CCreatorEngine* iEngine;
-	HBufC* iCommandLineScriptName;
-	HBufC* iCommandLineRandomDataFileName;
-	CHeartbeat* iTimer;
-	enum TTimerMode
-		{
-		ETimerModeNone,
-		ETimerModeStartScript,
-		ETimerModeExitAppUi
-		};
-	TTimerMode iMode;
-	TInt iTickCount;
-    };
-	
-#endif // __CREATORCMDSCRIPTRUN_H__	
--- a/creator/engine/inc/creator_connectionmethod.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +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 __CREATORCONNECTIONSETTINGS_H__
-#define __CREATORCONNECTIONSETTINGS_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-#include "creator_connectionmethodbase.h"
-
-#include <e32base.h>
-#include <commdb.h>
-#include <msvapi.h>
-#include <mtclreg.h>
-#include <mmsclient.h>
-
-#include <cmconnectionmethoddef.h>
-#include <cmmanagerext.h>
-#include <cmpluginwlandef.h>
-using namespace CMManager;
-
-#include <etelpckt.h>//ETel Packet API needed for enums
-
-class CCreatorEngine;
-class CConnectionSettingsParameters;
-
-class CCreatorConnectionSettings : public CCreatorConnectionSettingsBase, public MMsvSessionObserver
-    {
-public: 
-    static CCreatorConnectionSettings* NewL(CCreatorEngine* aEngine);
-    static CCreatorConnectionSettings* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorConnectionSettings();
-
-private:
-    CCreatorConnectionSettings();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
-        
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    
-    TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters);    
-    TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse );
-    
-    //Setting default connection method, if not set
-    void SetDefaultCML(RCmConnectionMethodExt conMethod);
-    //Set random parameters
-    void SetRandomParametersL(CConnectionSettingsParameters& parameters);
-    void SetRandomBearerTypeL(CConnectionSettingsParameters& parameters);
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-private:
-    void DeleteAllDestinationsL( TBool aOnlyCreatedWithCreator );
-private:
-    CCommsDatabase* iCommsDb;
-    
-    RCmManagerExt iCmManagerExt;
-
-    CConnectionSettingsParameters* iParameters;
-    
-    RArray<TUint32> iEntryIds; // TUint32 RCmDestinationExt::Id()
-
-public:
-    };
-
-   
-class CConnectionSettingsParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    HBufC*          iConnectionName; // connection name
-    TUint           iBearerType; // bearer type
-    HBufC*          iStartPage; // start page
-    TWapWSPOption   iWapWspOption; // Indicating whether connection-oriented  or connectionless API should be used.
-    
-    RPacketContext::TProtocolType iProtocolType; //Type of protocol EPdpTypeIPv4 or EPdpTypeIPv4
-    
-    HBufC*          iLoginName; // username
-    TBool           iSecureAuthentication; // password authentication
-    HBufC*          iLoginPass; // password
-    TBool           iPromptPassword; // prompt password
-    HBufC*          iGatewayAddress; // gateway address
-    HBufC*          iSubnetMask;  // subnet mask
-    HBufC*          iIPAddr; // phone IP
-    HBufC*          iIP4NameServer1;  // primary name server
-    HBufC*          iIP4NameServer2;  // secondary name server
-    HBufC*          iDefaultTelNumber; // datacall number
-    TUint32         iBearerCallTypeIsdn; // datacall type
-    TUint32         iBearerSpeed;  // max connection speed
-    TBool           iUseProxy; //Use proxy or not
-    HBufC*          iProxyServerAddress;  // proxy address
-    TUint32         iProxyPortNumber; // proxy number
-    HBufC*          iWLANName;//WLAN network name
-    HBufC*          iWlanIpAddr;//IP address of EPOC.
-    TWlanSecMode    iWLanSecMode;//WLAN security modes
-    TWlanNetMode    iWlanNetMode;//WLAN connection mode. Ad-hoc or infrastructure.
-
-    HBufC*          iIP6NameServer1;  // primary name server for IP v6
-    HBufC*          iIP6NameServer2;  // secondary name server for IP v6
-    TBool           iDisableTextAuth; // Disable plaintext authentication 
-    
-    CCreatorEngine* iEngine;
-    
-public:
-    CConnectionSettingsParameters();
-    ~CConnectionSettingsParameters();   
-    
-    void SetRandomCMNameL(CCreatorEngine& aEngine);
-    void SetRandomWLANNameL(CCreatorEngine& aEngine);
-    void SetRandomWLANNetModeL(CCreatorEngine& aEngine);
-    void SetRandomWLANSecurityModeL(CCreatorEngine& aEngine);
-    void SetRandomLoginNameL(CCreatorEngine& aEngine);
-    void SetRandomLoginPassL(CCreatorEngine& aEngine);
-    void SetRandomSecureAuthenticationL(CCreatorEngine& aEngine);
-    void SetRandomPromptPasswordL(CCreatorEngine& aEngine);
-    void SetRandomUseProxyL(CCreatorEngine& aEngine);
-    void SetRandomProxyAddressL(CCreatorEngine& aEngine);
-    void SetRandomProxyPortL(CCreatorEngine& aEngine);
-    void SetRandomStartPageL(CCreatorEngine& aEngine);
-    void SetRandomIPAddressL(CCreatorEngine& aEngine);
-    void SetRandomIP4NameServer1L(CCreatorEngine& aEngine);
-    void SetRandomIP4NameServer2L(CCreatorEngine& aEngine);
-    void SetRandomProtocolTypeL(CCreatorEngine& aEngine);
-    void SetRandomTelephoneNumberL(CCreatorEngine& aEngine);
-    void SetRandomBearerTypeIsdnL(CCreatorEngine& aEngine);
-    void SetRandomBearerSpeedL(CCreatorEngine& aEngine);
-    void SetRandomWapWspOptionL(CCreatorEngine& aEngine);
-    void SetRandomSubnetMaskL(CCreatorEngine& aEngine);
-    void SetRandomGatewayAddressL(CCreatorEngine& aEngine);
-    void SetRandomWlanIpAddrL(CCreatorEngine& aEngine);
-    void SetRandomIPv6NameServer1L(CCreatorEngine& aEngine);
-    void SetRandomIPv6NameServer2L(CCreatorEngine& aEngine);
-    void SetRandomDisableTextAuthL(CCreatorEngine& aEngine);
-    };
-
-
-
-#endif // __CREATORCONNECTIONSETTINGS_H__
--- a/creator/engine/inc/creator_connectionmethodbase.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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 __CCREATORCONNECTIONSETTINGSBASE_H_
-#define __CCREATORCONNECTIONSETTINGSBASE_H_
-
-#include "creator_modulebase.h"
-
-class CCreatorModuleBaseParameters;
-
-const TUint KRandomBearerType = 0xEEEEEEEE;
-
-class CCreatorConnectionSettingsBase : public CCreatorModuleBase
-    {
-public:
-    
-    virtual ~CCreatorConnectionSettingsBase(){};
-
-    virtual TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters) = 0;    
-    virtual TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse ) = 0;
-    virtual void DeleteAllConnectionMethodsL(){};
-    };
-
-#endif /*__CCREATORCONNECTIONSETTINGSBASE_H_*/
--- a/creator/engine/inc/creator_connectionmethodelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +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 CREATORCONNECTIONMETHODELEMENT_H_
-#define CREATORCONNECTIONMETHODELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-namespace creatorconnectionmethod
-{
-    _LIT(KCm, "connectionmethod");
-    _LIT(Kconnectionname, "connectionname");
-    _LIT(Kbearertype, "bearertype");
-    _LIT(Kstartpage, "startpage");
-    _LIT(Kwapwspoption, "wapwspoption");
-    _LIT(Kprotocoltype, "protocoltype");
-    _LIT(Kloginname, "loginname");
-    _LIT(Ksecureauthentication, "secureauthentication");
-    _LIT(Kloginpass, "loginpass");
-    _LIT(Kpromptpassword, "promptpassword");
-    _LIT(Kgatewayaddress, "gatewayaddress");
-    _LIT(Ksubnetmask, "subnetmask");
-    _LIT(Kdeviceipaddr, "deviceipaddr");
-    _LIT(Kip4nameserver1, "ip4nameserver1");
-    _LIT(Kip4nameserver2, "ip4nameserver2");
-    _LIT(Kdatacalltelnumber, "datacalltelnumber");
-    _LIT(Kdatacalltypeisdn, "datacalltypeisdn");
-    _LIT(Kdatacalllinespeed, "datacalllinespeed");
-    _LIT(Kuseproxy, "useproxy");
-    _LIT(Kproxyserveraddress, "proxyserveraddress");
-    _LIT(Kproxyportnumber, "proxyportnumber");
-    _LIT(Kip6nameserver1, "ip6nameserver1");
-    _LIT(Kip6nameserver2, "ip6nameserver2");
-    _LIT(Kdisabletextauth, "disabletextauth");
-    _LIT(Kwlanname, "wlanname");
-    _LIT(Kwlanipaddr, "wlanipaddr");
-    _LIT(Kwlansecmode, "wlansecmode");
-    _LIT(Kwlannetmode, "wlannetmode");
-    
-    // Bearer type:
-    _LIT(Kwlan, "wlan");
-    _LIT(Kgprs, "gprs");
-    _LIT(Kdatacall, "datacall");
-    _LIT(Khsgsm, "hsgsm");
-    _LIT(Kembedded, "embedded");
-    _LIT(Kvpn, "vpn");
-    _LIT(Klan, "lan");
-    
-    // Data call type isdn:
-    _LIT(Kanalogue, "analogue");
-    _LIT(Kisdnv110, "isdnv110");
-    _LIT(Kisdnv120, "isdnv120");
-    
-    // Line speed:
-    _LIT(Kautomatic, "automatic");
-    // WAP wps options:
-    _LIT(Kconnectionless, "connectionless"); // ECmWapWspOptionConnectionless
-    _LIT(Kconnectionoriented, "connectionoriented"); // ECmWapWspOptionConnectionOriented
-    
-    // Protocol
-    _LIT(Kipv4, "ipv4");
-    _LIT(Kipv6, "ipv6");
-
-    // WLAN security mode:
-    _LIT(Kopen, "open");
-    _LIT(Kwep, "wep");
-    _LIT(Ke802_1x, "e802_1x");
-    _LIT(Kwpa, "wpa");
-    _LIT(Kwpa2, "wpa2");
-}
-
-class CCreatorConnectionMethodElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorConnectionMethodElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    
-protected:
-    CCreatorConnectionMethodElement(CCreatorEngine* aEngine);
-};
-
-#endif /*CREATORCONNECTIONMETHODELEMENT_H_*/
--- a/creator/engine/inc/creator_contactelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +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 CREATORCONTACTELEMENT_H_
-#define CREATORCONTACTELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-namespace creatorcontact
-{ 
-    _LIT(KContact, "contact");
-    _LIT(KContactSet, "contact-set");
-    _LIT(KContactGroup, "contactgroup");
-    _LIT(KMembers, "members");
-    _LIT(KName, "name");
-    
-    // Contact field elements:
-    _LIT(KFirstname, "firstname");
-    _LIT(KLastname, "lastname");
-    _LIT(KFirstnameReading, "firstnamereading");
-    _LIT(KLastnameReading, "lastnamereading");
-    _LIT(KPrefix, "prefix");
-    _LIT(KSuffix, "suffix");
-    _LIT(KSecondname, "secondname");
-    _LIT(KLandphoneHome, "landphonehome");
-    
-    _LIT(KMobilephoneHome, "mobilephonehome");
-    _LIT(KVideonumberHome, "videonumberhome");
-    _LIT(KFaxnumberHome, "faxnumberhome");
-    _LIT(KVoipHome, "voiphome");
-    _LIT(KEmailHome, "emailhome");
-    _LIT(KUrlHome, "urlhome");
-    _LIT(KAddrlabelHome, "addrlabelhome");
-    _LIT(KAddrpoHome, "addrpohome");
-    
-    _LIT(KAddrextHome, "addrexthome");
-    _LIT(KAddrstreetHome, "addrstreethome");
-    _LIT(KAddrlocalHome, "addrlocalhome");
-    _LIT(KAddrregionHome, "addrregionhome");
-    _LIT(KAddrpostcodeHome, "addrpostcodehome");
-    _LIT(KAddrcountryHome, "addrcountryhome");
-    _LIT(KJobtitle, "jobtitle");
-    _LIT(KCompanyname, "company");
-    
-    _LIT(KLandphoneWork, "landphonework");
-    _LIT(KMobilephoneWork, "mobilephonework");
-    _LIT(KVideonumberWork, "videonumberwork");
-    _LIT(KFaxnumberWork, "faxnumberwork");
-    _LIT(KVoipWork, "voipwork");
-    _LIT(KEmailWork, "emailwork");
-    _LIT(KUrlWork, "urlwork");
-    _LIT(KAddrlabelWork, "addrlabelwork");
-    
-    _LIT(KAddrpoWork, "addrpowork");
-    _LIT(KAddrextWork, "addrextwork");
-    _LIT(KAddrstreetWork, "addrstreetwork");
-    _LIT(KAddrlocalWork, "addrlocalwork");
-    _LIT(KAddrregionWork, "addrregionwork");
-    _LIT(KAddrpostcodeWork, "addrpostcodework");
-    _LIT(KAddrcountryWork, "addrcountrywork");
-    _LIT(KLandphoneGen, "landphonegen");
-    
-    _LIT(KMobilephoneGen, "mobilephonegen");
-    _LIT(KVideonumberGen, "videonumbergen");
-    _LIT(KFaxnumberGen, "faxnumbergen");
-    _LIT(KVoipGen, "voipgen");
-    _LIT(KPoc, "poc");
-    _LIT(KSwis, "swis");
-    _LIT(KSip, "sip");
-    _LIT(KEmailGen, "emailgen");
-    
-    _LIT(KUrlGen, "urlgen");
-    _LIT(KAddrlabelGen, "addrlabelgen");
-    _LIT(KAddrpoGen, "addrpogen");
-    _LIT(KAddrextGen, "addrextgen");
-    _LIT(KAddrstreetGen, "addrstreetgen");
-    _LIT(KAddrlocalGen, "addrlocalgen");
-    _LIT(KAddrregionGen, "addrregiongen");
-    _LIT(KAddrpostcodeGen, "addrpostcodegen");
-    
-    _LIT(KAddrcountryGen, "addrcountrygen");
-    _LIT(KPagerNumber, "pagernumber");
-    _LIT(KDtmfString, "dtmfstring");
-    _LIT(KWvAddress, "wvaddress");
-    _LIT(KDate, "date");
-    _LIT(KNote, "note");
-    _LIT(KThumbnailPath, "thumbnailpath");
-    _LIT(KThumbnailId, "thumbnailid");
-    _LIT(KRingTone, "ringtonepath");
-    _LIT(KRingToneId, "ringtoneid");
-    
-    _LIT(KCallerobjImg, "callerobjimg");
-    _LIT(KCallerobjText, "callerobjtext");
-    _LIT(KMiddlename, "middlename");
-    _LIT(KDepartment, "department");
-    _LIT(KAsstname, "asstname");
-    _LIT(KSpouse, "spouse");
-    _LIT(KChildren, "children");
-    _LIT(KAsstphone, "asstphone");
-    
-    _LIT(KCarphone, "caphone");
-    _LIT(KAnniversary, "anniversary");
-    _LIT(KSyncclass, "synchronization");
-    _LIT(KLocPrivacy, "locprivacy");
-    _LIT(KGenlabel, "genlabel");
-}
-/**
- * Contact elements
- */
-
-/**
- * Base class for contact elements
- */
-class CCreatorContactElementBase : public CCreatorScriptElement
-{
-public:
-    static CCreatorContactElementBase* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-protected:
-    CCreatorContactElementBase(CCreatorEngine* aEngine);
-};
-
-/**
- * Contact element
- */
-class CCreatorContactElement : public CCreatorContactElementBase
-{
-public:
-    static CCreatorContactElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-protected:
-    CCreatorContactElement(CCreatorEngine* aEngine);
-};
-
-/**
- * Contact-set element
- */
-class CCreatorContactSetElement : public CCreatorContactElementBase
-{
-public:
-    static CCreatorContactSetElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    virtual void AddToCacheL();
-protected:
-    CCreatorContactSetElement(CCreatorEngine* aEngine);
-};
-
-/**
- * Contact group element
- */
-class CCreatorContactGroupElement : public CCreatorContactElementBase
-{
-public:
-    static CCreatorContactGroupElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-protected:
-    CCreatorContactGroupElement(CCreatorEngine* aEngine);
-};
-
-/**
- * Contact field element
- */
-class CCreatorContactFieldElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorContactFieldElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-protected:
-    CCreatorContactFieldElement(CCreatorEngine* aEngine);
-};
-
-#endif /*CREATORCONTACTELEMENT_H_*/
--- a/creator/engine/inc/creator_contactsetcache.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-
-#ifndef CREATORCONTACTSETCACHE_H_
-#define CREATORCONTACTSETCACHE_H_
-
-#include <e32base.h>
-
-// Forward declarations
-class CContactLinkCacheImp;
-
-class CCreatorContactSet : public CBase
-{
-public:
-    static CCreatorContactSet* NewL(TInt aLinkId, TInt aNumOfExistingContacts);
-    virtual ~CCreatorContactSet();
-    void AppendL(TUint32);
-    TInt NumberOfExistingContacts() const;
-    RArray<TUint32> ContactLinks();
-    const RArray<TUint32> ContactLinks() const;
-
-    TInt LinkId() const;
-
-private:
-    CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts);    
-    //void ConstructL();
-    TInt iLinkId;
-    TInt iNumOfExistingContacts;
-    RArray<TUint32> iContactLinks;
-};
-
-class MContactLinkCache
-{
-public:
-    virtual void AppendL(CCreatorContactSet* aContactSet) = 0;
-    virtual RArray<TUint32> ContactLinks(TInt aLinkId) = 0;
-    virtual const RArray<TUint32> ContactLinks(TInt aLinkId) const = 0;    
-    virtual RPointerArray<CCreatorContactSet>& ContactSets() = 0;
-    virtual const RPointerArray<CCreatorContactSet>& ContactSets() const = 0;
-    virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const = 0;
-    virtual CCreatorContactSet& ContactSet(TInt aLinkId) = 0;
-};
-
-class ContactLinkCache
-{
-public:
-    static void InitializeL();
-    static void DestroyL();
-    
-    static MContactLinkCache* Instance();
-    
-private:
-    ContactLinkCache(){};
-    static CContactLinkCacheImp* iImp;
-};
-
-#endif /*CREATORCONTACTSETCACHE_H_*/
--- a/creator/engine/inc/creator_factory.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-
-
-#ifndef TCREATORFACTORY_H_
-#define TCREATORFACTORY_H_
-
-#include "creator_modulebase.h"
-
-class CCreatorEngine;
-class CCreatorPhonebookBase;
-//class CCreatorConnectionSettingsBase;
-
-
-class TCreatorFactory{
-
-public: 
-	static CCreatorPhonebookBase* CreatePhoneBookL(CCreatorEngine* aEngine);
-	static CCreatorModuleBaseParameters* CreatePhoneBookParametersL();
-
-//    static CCreatorConnectionSettingsBase* CreateConnectionSettingsL(CCreatorEngine* aEngine);
-//    static CCreatorModuleBaseParameters* CreateConnectionSettingsParametersL();
-	
-
-};
-
-#endif /*TCREATORFACTORY_H_*/
--- a/creator/engine/inc/creator_file.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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 __CREATORFiles_H__
-#define __CREATORFiles_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-
-#include <caf/cafplatform.h>
-using namespace ContentAccess;
-#include <DRMRights.h>
-
-#include <e32base.h>
-#include <bautils.h>
-#include <pathinfo.h>
-#include <apgcli.h> // RApaLsSession
-
-class CCreatorEngine;
-class CFilesParameters;
-class CDRMPermission;
-class CDRMConstraint;
-
-class CCreatorFiles : public CCreatorModuleBase
-    {
-enum TCreatorFilesState{
-    ECreatorFilesDelete,
-    ECreatorFilesStart,
-    ECreatorFilesGetDirectory,
-    ECreatorFilesAskDRMData,
-    ECreatorFilesAskDRM_CD_Counts,
-    ECreatorFilesAskDRM_CD_Minutes
-};
-public: 
-    static CCreatorFiles* NewL(CCreatorEngine* aEngine);
-    static CCreatorFiles* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorFiles();
-
-private:
-    CCreatorFiles();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
-    TInt CreateFileEntryL(CFilesParameters *aParameters, TInt aCommand);    
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-private:
-    
-    void EncryptFileL( const TDesC& aFileName, const TDesC& aOutFileName, CFilesParameters *aParameters );
-    void SetPermissionsL( CMetaDataArray* aMetaData, const TDesC& aOutFileName, CFilesParameters *aParameters );
-    void SetMimeTypeL( const TDesC& aFileName, TDes8& aMime, CFilesParameters *aParameters );
-    TBool AskDRMDataFromUserL();
-    void StorePathsForDeleteL( CDesCArray& aPaths );
-    void GenerateFileNameL( TFileName& aRootName );
-    
-private:
-    CFilesParameters* iParameters;
-    CFilesParameters* iUserParameters;
-    TFileName iDirectoryQueriedFromUser;
-    RFs& iFs;
-    RApaLsSession iApaLs;
-    CDesCArray* iFilePaths;
-    TInt iFileId;
-
-public:
-    };
-
-
-class CFilesParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    HBufC*          iFullFilePath;
-    TInt            iFileCommand;
-    CDRMPermission* iPermission;
-    TBool           iEncrypt;
-    
-public:
-    CFilesParameters();
-    CFilesParameters( CFilesParameters& aCopy );
-    ~CFilesParameters();
-    };
-
-
-
-#endif // __CREATORFiles_H__
--- a/creator/engine/inc/creator_fileelement.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-
-#ifndef CREATORFILEELEMENT_H_
-#define CREATORFILEELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-namespace creatorfile
-{
-    _LIT(KFile, "file");
-    _LIT(KType, "type");
-    _LIT(KDirectory, "directory");
-    _LIT(KDefaultDir, "c:\\data");
-    _LIT(KEncryption, "encryption");
-    _LIT(KDRMRight, "right");
-    _LIT(KDRMFL, "DRM-FL");
-    _LIT(KDRMCD, "DRM-CD");
-    _LIT(KDRMPlayRight, "play");
-    _LIT(KDRMDisplayRight, "display");
-    _LIT(KDRMPrintRight, "print");
-    _LIT(KDRMExecuteRight, "execute");
-    _LIT(KDRMCount, "count");
-    _LIT(KDRMInterval, "interval");
-    _LIT(KDRMStartTime, "starttime");
-    _LIT(KDRMEndTime, "endtime");
-    _LIT(KDRMAccumulated, "accumulated");
-}
-
-class CDRMConstraint;
-class CFilesParameters;
-
-class CCreatorFileElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorFileElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    
-protected:
-    CCreatorFileElement(CCreatorEngine* aEngine);
-    TInt GetFileCommandL( const TDesC& aFileIdStr, TBool aRandom ) const;
-private:
-    void ParseDRMElementsL( CCreatorScriptElement* aField, CFilesParameters* aParam );
-    void ParseDRMConstraintsL( CCreatorScriptElement* aRight, CDRMConstraint* aConstraint );
-    TTimeIntervalSeconds ParseTimeInterval( TDesC& aTimeString );
-private: // Data
-    TInt64 iTimeZone;
-};
-
-#endif // CREATORFILEELEMENT_H_
\ No newline at end of file
--- a/creator/engine/inc/creator_landmark.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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 LANDMARKS_H_
-#define LANDMARKS_H_
-
-#include "engine.h"
-#include "creator_modulebase.h"
-
-#include <e32base.h>
-#include <EPos_Landmarks.h>
-
-class CLandmarkParameters;
-class CPosLandmarkDatabase;
-class CPosLmOperation;
-
-static const TInt KLandmarkFieldLength = 256;
-
-class CCreatorLandmarks : public CCreatorModuleBase
-    {
-public: 
-    static CCreatorLandmarks* NewL(CCreatorEngine* aEngine);
-    static CCreatorLandmarks* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorLandmarks();
-
-private:
-    CCreatorLandmarks();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase    
-    TPosLmItemId GetCategoryIdL( TPosLmGlobalCategory aGlobalCategoryID );
-
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    
-    TInt CreateLandmarkEntryL(CLandmarkParameters *aParameters);
-    static TPosLmGlobalCategory GetCategoryIdL(const TDesC& aCategoryStr);
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-private:
-    CPosLandmarkDatabase* iLandmarkDb;    
-    CLandmarkParameters* iParameters;
-    CPosLmOperation* iLmOperation;
-    RArray<TPosLmItemId> iEntryIds; // TPosLmItemId (==TUint32) CPosLandmark::LandmarkId()
-public:
-    };
-
-
-class CLandmarkParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    HBufC*              iName;
-    RArray<TUint>       iCategories;
-    HBufC*              iStreet;
-    HBufC*              iCity;    
-    HBufC*              iState;
-    HBufC*              iCountry;
-    HBufC*              iPostCode;    
-    HBufC*              iDescription;
-    HBufC*              iPhonenumber;
-    HBufC*              iUrl;
-    TReal64             iLatitude;
-    TReal64             iLongitude;
-    TReal32             iPositionAccuracy;
-    TReal32             iAltitude;
-    TReal32             iAltitudeAccuracy;
-    
-    void SetRandomNameL(CCreatorEngine& aEngine);
-    void SetRandomUrlL(CCreatorEngine& aEngine);
-    void AddRandomCategoryL(CCreatorEngine& aEngine);
-    void SetRandomStreetL(CCreatorEngine& aEngine);
-    void SetRandomCityL(CCreatorEngine& aEngine);
-    void SetRandomStateL(CCreatorEngine& aEngine);
-    void SetRandomCountryL(CCreatorEngine& aEngine);
-    void SetRandomPostCodeL(CCreatorEngine& aEngine);
-    void SetRandomLatitudeL(CCreatorEngine& aEngine);
-    void SetRandomLongitudeL(CCreatorEngine& aEngine);
-    void SetRandomPositionAccuracyL(CCreatorEngine& aEngine);
-    void SetRandomAltitudeL(CCreatorEngine& aEngine);
-    void SetRandomAltitudeAccuracyL(CCreatorEngine& aEngine);
-    void SetRandomDescriptionL(CCreatorEngine& aEngine);
-    void SetRandomPhoneNumberL(CCreatorEngine& aEngine);
-    
-private:
-    
-public:
-    CLandmarkParameters();
-    ~CLandmarkParameters();
-    };
-#endif /*LANDMARKS_H_*/
--- a/creator/engine/inc/creator_landmarkelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-
-
-#ifndef CREATORLANDMARKELEMENT_H_
-#define CREATORLANDMARKELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-namespace creatorlandmark
-{
-    _LIT(KLandmark, "landmark");
-    _LIT(KName, "name");
-    _LIT(KCategory, "category");
-    _LIT(KDescription, "description");
-    _LIT(KStreet, "street");
-    _LIT(KPostalcode, "postalcode");
-    _LIT(KCity, "city");
-    _LIT(KState, "state");
-    _LIT(KCountry, "country");
-    _LIT(KPhonenumber, "phonenbr");
-    _LIT(KUrl, "url");
-    _LIT(KLatitude, "latitude");
-    _LIT(KLongitude, "longitude");
-    _LIT(KPositionaccuracy, "positionaccuracy");
-    _LIT(KAltitude, "altitude");
-    _LIT(KAltitudeaccuracy, "altitudeaccuracy");
-}
-
-class CCreatorLandmarkElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorLandmarkElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    
-protected:
-    CCreatorLandmarkElement(CCreatorEngine* aEngine);
-};
-
-#endif /*CREATORLANDMARKELEMENT_H_*/
--- a/creator/engine/inc/creator_log.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +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 __CREATORLOGS_H__
-#define __CREATORLOGS_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-
-
-#include <e32base.h>
-//#include <logwrap.h>
-#include <logwraplimits.h>
-#include <logcli.h>
-//#include <logeng.h>
-#include <logengdurations.h>
-
-
-
-class CCreatorEngine;
-class CLogsParameters;
-
-
-class CCreatorLogs : public CActive, public MCreatorModuleBase, public MUIObserver
-    {
-enum TCreatorLogsStatus{
-    ECreatorLogsDelete = 0,
-    ECreatorLogsStart
-};
-
-public: 
-    static CCreatorLogs* NewL(CCreatorEngine* aEngine);
-    static CCreatorLogs* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorLogs();
-
-private:
-    CCreatorLogs();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-    void RunL();  // from CActive
-	void DoCancel();  // from CActive
-
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData);    
-    
-    TInt CreateMissedCallEntryL(CLogsParameters *aParameters);    
-    TInt CreateReceivedCallEntryL(CLogsParameters *aParameters);
-    TInt CreateDialledNumberEntryL(CLogsParameters *aParameters);
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-private:
-    CCreatorEngine* iEngine;
-    TInt iCommand;
-    TInt iEntriesToBeCreated;
-    TInt iDummy;
-
-    CLogClient* iLogClient;
-    CLogEvent* iLogEvent;
-    CActiveSchedulerWait iLogWriteWait;
-
-    CLogsParameters* iParameters;
-    RArray<TInt> iEntryIds; // TLogId ( == TInt32) CLogEvent::Id()
-
-public:
-    };
-
-
-class CLogsParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    /*HBufC*              iMissedCallPhoneNumber;
-    TTime               iMissedCallEventTime;
-	
-    HBufC*              iReceivedCallPhoneNumber;
-    TTime               iReceivedCallEventTime;
-    TLogDuration        iReceivedCallDuration;
-
-    HBufC*              iDialledNumberPhoneNumber;
-    TTime               iDialledNumberEventTime;
-    TLogDuration        iDialledNumberDuration;*/
-    HBufC*              iPhoneNumber;
-    TTime               iEventTime;
-    TLogDuration        iDuration;
-
-public:
-    CLogsParameters();
-    ~CLogsParameters();
-    };
-
-
-
-#endif // __CREATORLOGS_H__
--- a/creator/engine/inc/creator_logelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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 CREATORLOGELEMENT_H_
-#define CREATORLOGELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-namespace creatorlog
-{
-    _LIT(KLog, "log");
-    _LIT(KDirection, "direction");
-    _LIT(KDuration, "duration");
-    _LIT(KPhonenumber, "phonenumber");
-    _LIT(KDatetime, "datetime");
-    _LIT(KMissed, "missed");
-    _LIT(KIn, "in");
-    _LIT(KOut, "out");
-}
-
-class CCreatorLogElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorLogElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    
-protected:
-    CCreatorLogElement(CCreatorEngine* aEngine);
-    TInt GetLogCommandL( const TDesC& aFileIdStr, TBool aRandom ) const;
-};
-
-#endif /*CREATORLOGELEMENT_H_*/
--- a/creator/engine/inc/creator_mailbox.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +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 __CREATORMAILBOXES_H__
-#define __CREATORMAILBOXES_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-
-
-#include <e32base.h>
-#include <SenduiMtmUids.h>
-#include <smtpset.h>
-#include <imapset.h>
-#include <pop3set.h>
-#include <mtmuibas.h>
-#include <iapprefs.h>
-#include <cemailaccounts.h>
-
-class CCreatorEngine;
-class CMailboxesParameters;
-
-const TInt KDefaultSmtpPort = 25;
-
-enum TMailboxType
-    {
-    EMailboxPOP3,
-    EMailboxIMAP4
-    };
-
-class CCreatorMailboxes : public CCreatorModuleBase, public MMsvSessionObserver
-    {
-public: 
-    static CCreatorMailboxes* NewL(CCreatorEngine* aEngine);
-    static CCreatorMailboxes* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorMailboxes();
-
-private:
-    CCreatorMailboxes();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
-    void StoreIMEIToEntryL(const TMsvId aMailboxId);
-    void GetIMEIFromThePhoneL();
-    
-    void PopulateSmtpSettingsL( 
-            CEmailAccounts& aEmailAccount, 
-            CImSmtpSettings& aSmtpSettings, 
-            CImIAPPreferences& aIApSettings, 
-            const CMailboxesParameters& aParameters );
-    
-    void PopulateImapSettingsL( 
-            CEmailAccounts& aEmailAccount, 
-            CImImap4Settings& aImapSettings, 
-            CImIAPPreferences& aIApSettings, 
-            const CMailboxesParameters& aParameters );
-    
-    void PopulatePopSettingsL( 
-            CEmailAccounts& aEmailAccount, 
-            CImPop3Settings& aPopSettings, 
-            CImIAPPreferences& aIApSettings, 
-            const CMailboxesParameters& aParameters );
-
-
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    
-    TInt CreateMailboxEntryL(CMailboxesParameters *aParameters);
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-
-private:
-    CMailboxesParameters* iParameters;
-    TBuf<50> iIMEI;
-    RArray<TInt> iEntryIds;
-
-public:
-    };
-
-
-class CMailboxesParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-//    HBufC*          iMailboxName;
-//    HBufC*          iAccessPoint;
-//    HBufC*          iMyMailAddress;
-//    HBufC*          iOutgoingMailServer;
-//    TBool           iSendMessageImmediately;
-//    TBool           iSendCopyToSelf;
-//    TBool           iIncludeSignature;
-//    HBufC*          iUserName;
-//    HBufC*          iPassword;
-//    HBufC*          iIncomingMailServer;
-//    TMailboxType    iMailboxType;  // IMAP4 or POP3
-//    TBool           iSecurityOn; // SecureSockets
-//    TBool           iSSLWrapper; // SSL Wrapper
-//    TBool           iAPOPSecureLogin; // POP3 only
-//    TBool           iRetrieveAttachment; // IMAP4 only
-//    TInt32          iRetrieveHeaders;  // IMAP4 only
-
-    enum TGetEmailOption
-    {
-    EUndef = 0,
-    EGetHeaders,
-    EGetBodyText,
-    EGetBodyTextAndAttachments,
-    EGetAttachments,
-    EGetBodyAlternativeText,
-    EGetEmailOptionLast
-    };
-
-    HBufC*  iMailboxName;    
-    HBufC*  iIncomingLoginName;
-    HBufC*  iIncomingPassword;
-    HBufC*  iIncomingServerName;
-    HBufC*  iIncomingConnectionMethod;
-    HBufC*  iIncomingFolderPath;
-    HBufC*  iPathSeparator;
-    HBufC*  iOutgoingLoginName;
-    HBufC*  iOutgoingPassword;
-    HBufC*  iOutgoingServerName;
-    HBufC*  iOutgoingConnectionMethod;
-    HBufC*  iOwnEmailAddress;
-    HBufC*  iOwnEmailAlias;
-    HBufC*  iReceiptAddress;
-    HBufC*  iReplyToAddress;
-    
-    TInt    iIncomingPort;
-    TInt    iAttachmentSizeLimit;
-    TInt    iBodyTextSizeLimit;
-    TInt    iAttachmentFetchSize;
-    TInt    iImapIdleTimeout;
-    TInt    iMaxEmailSize;
-    TInt    iSyncRate;
-    TInt    iInboxSyncLimit; // -1 = All
-    TInt    iMailboxSyncLimit; // -1 = All
-    TInt    iOutgoingPort;
-    TInt    iToCCIncludeLimit;
-    
-    TBool   iIncomingSSLWrapper;
-    TBool   iIncomingSecureSockets;
-    TBool   iAcknowledgeReceipts;
-    TBool   iAutoSendOnConnect;
-    TBool   iDeleteEmailsAtDisconnect;
-    TBool   iImapIdleCommand;
-    TBool   iMarkSeenInSync;
-    TBool   iEnableExpungeMode;
-    TBool   iUseApop;
-    TBool   iDisconnectedUserMode;
-    TBool   iOutgoingSSLWrapper;
-    TBool   iOutgoingSecureSockets;
-    TBool   iIncludeSignature;
-    TBool   iAddVCard;
-    TBool   iRequestReceipts;
-    TBool   iSmtpAuth;
-    
-    TGetEmailOption iGetEmailOptions;   
-    TFolderSubscribeType iSubscribeType;    
-    TFolderSyncType iSyncType;  
-    TImSMTPSendCopyToSelf iSendCopyToSelf;
-    TImSMTPSendMessageOption iSendOption;    
-    TMailboxType iMailboxType;  // IMAP4 or POP3
-    
-public:
-    CMailboxesParameters();
-    ~CMailboxesParameters();
-    };
-
-
-
-#endif // __CREATORMAILBOXES_H__
--- a/creator/engine/inc/creator_mailboxelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +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 CREATORMAILBOXELEMENT_H_
-#define CREATORMAILBOXELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-class CMailboxesParameters;
-
-namespace creatormailbox
-{
-    _LIT(Kmailbox, "mailbox");
-    _LIT(Kname, "name");
-    _LIT(Kincomingport, "incomingport");
-    _LIT(Kincomingsslwrapper, "incomingsslwrapper");
-    _LIT(Kincomingsecuresockets, "incomingsecuresockets");
-    _LIT(Kincomingloginname, "incomingloginname");
-    _LIT(Kincomingpassword, "incomingpassword");
-    _LIT(Kincomingservername, "incomingservername");
-    _LIT(Kincomingconnectionmethod, "incomingconnectionmethod");
-    _LIT(Kacknowledgereceipts, "acknowledgereceipts");
-    _LIT(Kattachmentsizelimit, "attachmentsizelimit");
-    _LIT(Kautosendonconnect, "autosendonconnect");
-    _LIT(Kbodytextsizelimit, "bodytextsizelimit");
-    _LIT(Kdeletemailsatdisconnect, "deletemailsatdisconnect");
-    _LIT(Kattachmentfetchsize, "attachmentfetchsize");
-    _LIT(Kincomingfolderpath, "incomingfolderpath");
-    _LIT(Kpathseparator, "pathseparator");
-    _LIT(Kgetemailoptions, "getemailoptions");
-    _LIT(Kimapidlecommand, "imapidlecommand");
-    _LIT(Kimapidletimeout, "imapidletimeout");
-    _LIT(Kmaxemailsize, "maxemailsize");
-    _LIT(Ksubscribetype, "subscribetype");
-    _LIT(Ksyncrate, "syncrate");
-    _LIT(Kfoldersynctype, "foldersynctype");
-    _LIT(Kmarkseeninsync, "markseeninsync");
-    _LIT(Kenableexpungemode, "enableexpungemode");
-    _LIT(Kuseapopsecurelogin, "useapopsecurelogin");
-    _LIT(Kinboxsynclimit, "inboxsynclimit");
-    _LIT(Kmailboxsynclimit, "mailboxsynclimit");
-    _LIT(Kdisconnectedusermode, "disconnectedusermode");
-    _LIT(Koutgoingport, "outgoingport");
-    _LIT(Koutgoingsslwrapper, "outgoingsslwrapper");
-    _LIT(Koutgoingsecuresockets, "outgoingsecuresockets");
-    _LIT(Koutgoingloginname, "outgoingloginname");
-    _LIT(Koutgoingpassword, "outgoingpassword");
-    _LIT(Koutgoingservername, "outgoingservername");
-    _LIT(Koutgoingconnectionmethod, "outgoingconnectionmethod");
-    _LIT(Kincludesignature, "includesignature");
-    _LIT(Kaddvcard, "addvcard");
-    _LIT(Kownemail, "ownemail");
-    _LIT(Kemailalias, "emailalias");
-    _LIT(Kreceiptaddress, "receiptaddress");
-    _LIT(Kreplytoaddress, "replytoaddress");
-    _LIT(Krequestreceipts, "requestreceipts");
-    _LIT(Ksmtpauth, "smtpauth");
-    _LIT(Kcopytoself, "copytoself");
-    _LIT(Ksendoption, "sendoption");
-    _LIT(Ktoccincludelimit, "toccincludelimit");
-    
-    
-    // Get email options:
-    _LIT(Kgetheaders, "getheaders");
-    _LIT(Kgetbodytext, "getbodytext");
-    _LIT(Kgetbodytextandattachments, "getbodytextandattachments");
-    _LIT(Kgetattachments, "getattachments");
-    _LIT(Kgetbodyalternativetext, "getbodyalternativetext");
-    
-    // Subscribe types:
-    _LIT(Kupdateneither, "updateneither");
-    _LIT(Kupdatelocal, "updatelocal");
-    _LIT(Kupdateremote, "updateremote");
-    _LIT(Kupdateboth, "updateboth");
-    
-    // Folder sync. types:
-    _LIT(Kusecombination, "usecombination");
-    _LIT(Kuselocal, "uselocal");
-    _LIT(Kuseremote, "useremote");
-    
-    // Send copy to self option:
-    _LIT(Kno, "no");
-    _LIT(Kto, "to");
-    _LIT(Kcc, "cc");
-    _LIT(Kbcc, "bcc");
-    
-    // Send option:
-    _LIT(Kimmediately, "immediately");
-    _LIT(Konnextconnection, "onnextconnection");
-    _LIT(Konrequest, "onrequest");
-    
-    // Mailbox types:
-    _LIT(KMailboxType, "type");
-    _LIT(Kpop3, "pop3");
-    _LIT(Kimap4, "imap4");
-    _LIT(Ksyncml, "syncml");
-}
-
-class CCreatorMailboxElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorMailboxElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    
-protected:
-    CCreatorMailboxElement(CCreatorEngine* aEngine);
-    TBool SetTextParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
-    TBool SetBooleanParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
-    TBool SetIntegerParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
-    TBool SetEnumParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
-    
-    TBool GetBooleanValueL(const TDesC& aElemContent, TBool aSetRandom);
-};
-
-#endif /*CREATORMAILBOXELEMENT_H_*/
--- a/creator/engine/inc/creator_message.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +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 __CREATORMESSAGES_H__
-#define __CREATORMESSAGES_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-
-#include <e32base.h>
-#include <e32std.h>
-#include <msvapi.h>
-#include <mtclbase.h>
-#include <mtclreg.h>
-#include <smut.h>
-#include <smuthdr.h>
-#include <smsclnt.h>
-#include <miutset.h>
-#include <mmsclient.h>
-#include <ircmtm.h>
-#include <irmsgtypeuid.h>
-#include <btmsgtypeuid.h>
-#include <bif.h>
-#include <biouids.h>
-#include <miuthdr.h>
-
-#include <cmsvmimeheaders.h>
-#include <smtcmtm.h>
-#include <ircmtm.h>
-#include <btcmtm.h>
-#include <mmsvattachmentmanager.h>
-
-
-class CCreatorEngine;
-class CMessagesParameters;
-class CAsyncWaiter; 
-
-enum TMessageType
-    {
-    ESMS = 0,
-    EMMS,
-    EAMS,
-    EEmail,
-    ESmartMessage,
-    EIrMessage,
-    EBTMessage
-    };
-
-enum TFolderType
-    {
-    EInbox = 0,
-    EDrafts,
-    EOutbox,
-    ESent,
-    EMailbox
-    };
-    
-class CRecipientInfo : public CBase
-{
-public:
-    CRecipientInfo();
-    virtual ~CRecipientInfo();
-    
-    void SetPhoneNumber(HBufC* aPhone);
-    void SetEmailAddress(HBufC* aEmail);
-    const HBufC* PhoneNumber() const;
-    const HBufC* EmailAddress() const;
-    
-private:
-    HBufC* iPhoneNumber;
-    HBufC* iEmailAddress;
-};
-
-class CCreatorMessages : public CCreatorModuleBase, public MMsvSessionObserver
-    {
-enum TCreatorMessagesStatus{
-    ECreatorMessagesDelete = 0,
-    ECreatorMessagesStart, 
-    ECreatorMessagesMessageType,
-    ECreatorMessagesFolderType,
-    ECreatorMessagesMessageStatus, 
-    ECreatorMessagesCharsInBody,
-    ECreatorMessagesAttachment,
-};
-
-public: 
-    static CCreatorMessages* NewL(CCreatorEngine* aEngine);
-    static CCreatorMessages* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorMessages();
-
-private:
-    CCreatorMessages();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-    TInt CreateSMSEntryL(const CMessagesParameters& parameters);
-    TInt CreateMMSEntryL(const CMessagesParameters& parameters);
-    TInt CreateAMSEntryL(const CMessagesParameters& parameters);
-    TInt CreateEmailEntryL(const CMessagesParameters& parameters);
-    TInt CreateSmartMessageEntryL(const CMessagesParameters& parameters);
-    TInt CreateObexEntryL(TUid aMtm, const CMessagesParameters& parameters);
-    void HandleAttachementsL(const CMessagesParameters& parameters, CMsvStore* store, TInt err );
-    void HandleAttachementL(CMsvStore* store, TInt err, TFileName& sourceFileName );
-
-    CMsvEntrySelection* DoGetListOfAccountsL(CMsvSession& aSession, TUid aMtm, TBool aAlwaysListHidden);
-    TMsvId DefaultServiceForMTML(CMsvSession& aSession, TUid aMtm, TBool aFindFirstServiceIfNoDefault);
-
-    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
-    
-    void AddRecipientsL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
-    void GetLinkedAddressesL(   RPointerArray<HBufC>& aAddressArray, 
-                                const RArray<TLinkIdParam>& aLinkIds, 
-                                TBool aUseEmailAddress,
-                                TInt aNumOfExistingAddresses );
-    
-    void GetAllRecipientsL(RPointerArray<HBufC>& aRecipientArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
-    void SetSenderToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress);
-    void SetRecipientToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress);
-    void AddSenderToMtmAddresseeL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
-    void AddMtmSenderL(CMmsClientMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
-    void GetSendersL(RPointerArray<HBufC>& aSenderArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress, TInt aMaxNum );
-    void DeleteAllMessagesL( TBool aOnlyCreatedWithCreator );
-    void DeleteAllFromFolderL( const TMsvId aContext, CMsvSession* aSession, CSmsClientMtm* aClientMtm, TBool aOnlyCreatedWithCreator = EFalse );
-    
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
-    
-    TInt CreateMessageEntryL(CMessagesParameters *aParameters, TBool aTakeUserGivenParameters=EFalse);    
-    TInt CreateRandomMessageEntryL(TInt aCommand);
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-private:
-    CMessagesParameters*    iParameters;
-    TMessageType            iMessageType;
-    TFolderType             iFolderType;
-    TInt                    iDefinedMessageLength;
-    CArrayFixFlat<TInt>*    iAttachments; 
-    //RPointerArray<HBufC>    iAttachmentPaths;
-    TBool                   iCreateAsUnread;
-    TMsvId                  iUserSelectedMailbox;
-    HBufC*                  iTmpPhoneNumber;
-    HBufC*                  iTmpEmail;
-    RArray<TInt>            iEntryIds; // TMsvId ( == TInt32 ) TMsvEntry::Id()
-    CAsyncWaiter* iWaiter;
-    RPointerArray<HBufC>    iSenderArray;
-    RPointerArray<HBufC>    iRecipientArray;
-public:
-    };
-
-
-class CMessagesParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    TMessageType            iMessageType;
-    TFolderType             iFolderType;
-    HBufC*                  iSenderAddress;    
-    HBufC*                  iRecipientAddress;
-    RPointerArray<HBufC>    iRecipientAddressArray;
-    HBufC*                  iMessageSubject;
-    HBufC*                  iMessageBodyText;
-    CArrayFixFlat<TInt>*    iAttachments; 
-    RPointerArray<HBufC>    iAttachmentPaths;
-    TInt                    iDefinedMessageLength;
-    TUid                    iBIOMessageType;
-    TBool                   iCreateAsUnread;
-    RArray<TLinkIdParam>    iRecipientLinkIds;
-    RArray<TLinkIdParam>    iSenderLinkIds;
-    TInt                    iNumberOfExistingRecipients;
-    TInt                    iNumberOfExistingSenders;
-
-public:
-    CMessagesParameters();
-    ~CMessagesParameters();
-    };
-
-
-
-#endif // __CREATORMESSAGES_H__
--- a/creator/engine/inc/creator_messageelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-
-#ifndef CREATORMESSAGEELEMENT_H_
-#define CREATORMESSAGEELEMENT_H_
-
-#include "creator_scriptelement.h"
-#include "creator_message.h"
-
-namespace creatormsg
-{
-    _LIT(KMessage, "message");
-    _LIT(KType, "type");
-    _LIT(KTo, "to");
-    _LIT(KFrom, "from");
-    _LIT(KFolder, "folder");
-    _LIT(KSubject, "subject");
-    _LIT(KText, "text");
-    _LIT(KAttachmentPath, "attachmentpath");
-    _LIT(KAttachmentId, "attachmentid");
-    _LIT(KStatus, "status");
-    _LIT(KSms, "sms");
-    _LIT(KMms, "mms");
-    _LIT(KAms, "ams");
-    _LIT(KEmail, "email");
-    _LIT(KSmart, "smart");
-    _LIT(KBt, "bt");
-    _LIT(KIr, "ir");
-    _LIT(KSent, "sent");
-    _LIT(KInbox, "inbox");
-    _LIT(KDraft, "draft");
-    _LIT(KOutbox, "outbox");
-    _LIT(KMailbox, "mailbox");
-    _LIT(KRead, "read");
-    _LIT(KNew, "new");
-}
-
-/*
- * Builds message parameters from the parsed script and adds a command to the engine 
- */
-class CCreatorMessageElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorMessageElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-protected:    
-    CCreatorMessageElement(CCreatorEngine* aEngine);
-    /*
-     * Creates message address. The address type is based on the message type.
-     * @return Phone number string for SMS, MMS, AMS and Smart messages. Email address for other types.
-     * @param msgType Message type.
-     */
-    HBufC* CreateMessageAddressLC(const TDesC& msgType);
-    /*
-     * Sets message type to parameters
-     * @param aParameters Message parameters
-     * @param aMsgTypeStr Message type string
-     */
-    void SetMessageTypeL(CMessagesParameters& aParameters, const TDesC& aMsgTypeStr ) const;
-    /*
-     * Gets length of the random data
-     * @return Length of the random data
-     * @param aRandomLenStr String defining the random length (from the script)
-     * @param aMsgType Message type string
-     */
-    TInt GetRandomBodyLengthL(const TDesC& aRandomLenStr, const TDesC& aMsgType ) const;
-    /*
-     * Gets maximum length of the body text
-     * @return Maximum length of the body text
-     * @param aMsgType Message type string
-     */
-    TInt GetMaxBodyLength( const TDesC& aMsgType ) const;
-
-};
-    
-
-#endif /*CREATORMESSAGEELEMENT_H_*/
--- a/creator/engine/inc/creator_modulebase.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +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 __CREATOR_MODULEBASE_H__
-#define __CREATOR_MODULEBASE_H__
-
-#include <e32base.h>
-
-#include "engine.h"
-#include "creator_traces.h"
-
-// Dictionary uids for each Creator module.
-// Dictionaries are for storing item identifiers created by Creator.
-// Item identifiers are for enabling deletion of only items created by Creator. 
-const TUid KUidDictionaryUidContacts         = { 0x00 };
-const TUid KUidDictionaryUidContactGroups    = { 0x01 };
-const TUid KUidDictionaryUidCalendar         = { 0x02 };
-const TUid KUidDictionaryUidBrowserBookmarks = { 0x03 };
-const TUid KUidDictionaryUidFiles            = { 0x04 };
-const TUid KUidDictionaryUidLogs             = { 0x05 };
-const TUid KUidDictionaryUidMessages         = { 0x06 };
-const TUid KUidDictionaryUidMailbox          = { 0x07 };
-const TUid KUidDictionaryUidIAP              = { 0x08 };
-const TUid KUidDictionaryUidIMPS             = { 0x09 };
-const TUid KUidDictionaryUidNotes            = { 0x0A };
-const TUid KUidDictionaryUidLandmarks        = { 0x0B };
-const TUid KUidDictionaryUidBrowserSavedPg   = { 0x0C };
-const TUid KUidDictionaryUidBrowserBookmarkF = { 0x0D };
-const TUid KUidDictionaryUidBrowserSavedPgF  = { 0x0E };
-
-class CCreatorEngine;
-class MCreatorModuleBaseParameters;
-class CCommandParser;
-
-_LIT(KSavingText, "Saving");
-_LIT(KDeletingText, "Deleting");
-
-class MCreatorModuleBase
-    {
-public:
-
-private:
-    // constructs the module, add "iEngine = aEngine" and other construction stuff to the body
-    virtual void ConstructL( CCreatorEngine* aEngine ) = 0;
-
-public:
-    // this one is called when user select some features directly from menu, not running a script
-    // should call CreateRandomData() function
-    // returns ETrue when success, EFalse when user has cancelled
-    virtual TBool AskDataFromUserL( TInt aCommand ) = 0;
-    virtual void DeleteAllL() = 0;
-    virtual void DeleteAllCreatedByCreatorL() = 0;
-    };
-
-
-class CCreatorModuleBase : public CBase, public MCreatorModuleBase, public MUIObserver
-    {
-
-public:
-    enum TCreatorModuleStatus
-        {
-        ECreatorModuleDelete = 0, 
-        ECreatorModuleStart
-        };
-    
-    CCreatorModuleBase()
-        {
-        iEntriesToBeCreated = 1; 
-        }
-    
-    virtual TBool AskDataFromUserL(TInt aCommand)
-        {
-        iCommand = aCommand;
-        return EFalse;// will finish user interaction and engine will shutdown modules
-        }
-    
-    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
-        {
-        LOGSTRING("Creator: CCreatorModuleBase::QueryDialogClosedL");
-        
-        if( aPositiveAction == EFalse )
-            {
-            iEngine->ShutDownEnginesL();
-            return;
-            }
-        const TDesC* showText = &KSavingText;
-        TBool finished(EFalse);
-        TBool retval(ETrue);
-        switch(aUserData)
-            {
-            case ECreatorModuleDelete:
-                showText = &KDeletingText;
-                iEntriesToBeCreated = 1;
-                finished = ETrue;
-                break;
-            case ECreatorModuleStart:
-                finished = ETrue;
-                break;
-            default:
-                //some error
-                retval = EFalse;
-                break;
-            }
-        if( retval == EFalse )
-            {
-            iEngine->ShutDownEnginesL();
-            }
-        else if( finished )
-            {
-            // add this command to command array
-            iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
-            // started exucuting commands
-            iEngine->ExecuteFirstCommandL( *showText );
-            }
-        }
-
-protected:
-    // constructs the module, add "iEngine = aEngine" and other construction stuff to the body
-    virtual void ConstructL(CCreatorEngine* aEngine)
-        {
-        iEngine = aEngine;
-        };
-    
-protected:
-    CCreatorEngine* iEngine;
-    TInt iCommand;
-    TInt iEntriesToBeCreated;
-    TInt iDummy;
-    };
-
-class MCreatorModuleBaseParameters
-    {
-    // a base class for the parameters, no default implementation
-    
-    public:
-    	enum TParseParams
-    	{
-    	EParamNone = 0,
-    	ECalendarMeeting,
-    	ECalendarMemo,
-    	ECalendarAnniv,
-    	ECalendarTodo
-    	};
-    
-public:
-	virtual void ParseL(CCommandParser* /*aParser*/, TParseParams /*aCase = 0*/) = 0;
-
-	
-    };
-    
-// Following struct represents the parameters that links for example contact groups
-// to contac-sets.
-typedef struct 
-    {
-    TInt iLinkId; // ID
-    TInt iLinkAmount; // Amount of elements in linked set 
-    } TLinkIdParam;
-
-        
-class CCreatorModuleBaseParameters : public CBase, public MCreatorModuleBaseParameters
-        {
-        public:
-        virtual void ParseL(CCommandParser* /*aParser*/, TParseParams /*aCase = 0*/){};
-        virtual TInt ScriptLinkId() const {return -1;};
-        virtual void SetScriptLinkId(TInt) {};
-        // a base class for the parameters, no default implementation
-        };
-        
-
-
-
-#endif  // __CREATOR_MODULEBASE_H__
- 
--- a/creator/engine/inc/creator_note.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +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 __CREATORNOTEPAD_H__
-#define __CREATORNOTEPAD_H__
-
-#include "engine.h"
-#include "creator_modulebase.h"
-#include "creator_notepadwrapper.h"
-
-#include <e32base.h>
-
-static const TInt KNotepadFieldLength = 1024;
-
-class CCreatorEngine;
-class CNotepadParameters;
-class CCreatorNotepadWrapper;
-
-
-class CCreatorNotepad : public CCreatorModuleBase
-    {
-public: 
-    static CCreatorNotepad* NewL(CCreatorEngine* aEngine);
-    static CCreatorNotepad* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorNotepad();
-
-private:
-    CCreatorNotepad();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-public:
-    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    
-    TInt CreateNoteEntryL(CNotepadParameters *aParameters);
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-
-private:
-    CCreatorNotepadWrapper* iNotepadWrapper;
-
-    CNotepadParameters* iParameters;
-    RFs& iFs;
-
-public:
-    };
-
-
-class CNotepadParameters : public CCreatorModuleBaseParameters
-    {
-public: 
-    HBufC*              iNoteText;
-
-public:
-    CNotepadParameters();
-    ~CNotepadParameters();
-    };
-
-
-
-#endif // __CREATORNOTEPAD_H__
--- a/creator/engine/inc/creator_noteelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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 CREATORNOTEELEMENT_H_
-#define CREATORNOTEELEMENT_H_
-
-#include "creator_scriptelement.h"
-
-namespace creatornote
-{
-    _LIT(KNote, "note");
-    _LIT(KText, "text");
-}
-
-class CCreatorNoteElement : public CCreatorScriptElement
-{
-public:
-    static CCreatorNoteElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-    void ExecuteCommandL();
-    
-protected:
-    CCreatorNoteElement(CCreatorEngine* aEngine);
-};
-
-#endif /*CREATORNOTEELEMENT_H_*/
--- a/creator/engine/inc/creator_notepadwrapper.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef __CREATORNOTEPADWRAPPER_H__
-#define __CREATORNOTEPADWRAPPER_H__
-
-//#include "engine.h"
-//#include "creator_modulebase.h"
-
-
-#include <e32base.h>
-#include <QPluginLoader>
-#include <NotesEditorInterface>
-#include <AgendaUtil>
-#include <AgendaEntry>
-
-
-class CCreatorNotepadWrapper : public CBase
-	{
-	public:
-		static CCreatorNotepadWrapper* NewL();
-		static CCreatorNotepadWrapper* NewLC();
-		~CCreatorNotepadWrapper();
-		
-	private:
-		CCreatorNotepadWrapper();
-		void ConstructL();
-		
-	public:
-		TInt CreateNoteL( const TDesC& aText );
-		void DeleteAllL();
-		
-	private:
-		AgendaUtil *iAgendaUtil;
-		NotesEditorInterface *iNotepadApi;	//QT Notes api
-		QPluginLoader* iNotesEditorPluginLoader; // for loading QT Notes api
-	};
-
-#endif // __CREATORNOTEPADWRAPPER_H__
--- a/creator/engine/inc/creator_phonebook.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +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 __CREATORPHONEBOOK_H__
-#define __CREATORPHONEBOOK_H__
-
-#include "creator_phonebookbase.h"
-#include "creator_randomdatafield.h"
-#include "creator_phonebookwrapper.h"
-
-
-
-class CCreatorEngine;
-class CCreatorModuleBaseParameters;
-
-class CContactDatabase;	
-class CPhonebookParameters;	
-class CCreatorPhonebookWrapper;
-
-class CCreatorPhonebook : public CCreatorPhonebookBase 
-    {
-public: 
-    static CCreatorPhonebook* NewL(CCreatorEngine* aEngine);
-    static CCreatorPhonebook* NewLC(CCreatorEngine* aEngine);
-    ~CCreatorPhonebook();
-
-private:
-    CCreatorPhonebook();
-    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
-
-public:  
-    TInt CreateContactEntryL(CCreatorModuleBaseParameters *aParameters);    
-    TInt CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters);
-    TInt CreateSubscribedContactEntryL(CCreatorModuleBaseParameters *aParameters); 
-
-    
-    void DeleteAllL();
-    void DeleteAllCreatedByCreatorL();
-    void DeleteAllGroupsL();
-    void DeleteAllGroupsCreatedByCreatorL();
-    
-    void TestPrintOut(CPhonebookParameters* aParam);
-    inline CCreatorPhonebookWrapper* GetPhonebookWrapper(){ return iPhonebookWrapper; };
-private:
-    
-    void InitializeContactParamsL();
-    TBool IsContactGroupL( TUint32& aLink );
-    void StoreLinksForDeleteL( RArray<TUint32>& aLinks, TUid aStoreUid );
-    void DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid );
-    void DeleteItemsCreatedWithCreatorL( TUid aStoreUid );
-    void DoDeleteItemsCreatedWithCreatorL( TUid aStoreUid, CDictionaryFileStore* aStore );
-    TBool HasOtherThanGroupsL();
-    
-
-private:
-	CCreatorPhonebookWrapper* iPhonebookWrapper;
-    TInt iOpCounter;
-    
-    CPhonebookParameters* iParameters;
-    
-    static TInt iUrlFields[];
-    static TInt iEmailFields[];
-    
-    RArray<TUint32> iContactLinkArray;
-    RArray<TUint32>  iContactsToDelete;	
-    RArray<TUint32>  iContactGroupsToDelete;	
-    
-    RArray<TUint32> iPreviousDeleteLinks;
-    
-private:
-	//new variables
-	/// Ref: the target of the copy
-  
-    
-    /// Own: Contact database for this store
-    CContactDatabase* iContactDb;    
-    //Contacts found in contacts db.
-    
-    };
-
-/**
- * phonebook parameters
- */
-    
-
-class CPhonebookParameters : public CCreatorModuleBaseParameters
-    {
-public:
-	void ParseL(CCommandParser* parser, TParseParams /*aCase = 0*/);
-	
-	TInt CPhonebookParameters::ScriptLinkId() const;
-	void CPhonebookParameters::SetScriptLinkId(TInt aLinkId);
-
-	TCreatorContactFields iContactFields;
-
-    HBufC*  iGroupName; 	
-    TInt iContactsInGroup;
-    TInt iNumberOfPhoneNumberFields;
-    TInt iNumberOfURLFields;
-    TInt iNumberOfEmailAddressFields;
-    TInt iContactSetPtr;
-    RArray<TLinkIdParam> iLinkIds; // For contactgroup. Stores the linked contact ids.
-    
-    
-public:
-    CPhonebookParameters();
-    ~CPhonebookParameters();
-    
-private:
-    TInt iLinkId; // For contact. Stores the contact id
-    };
-
-
-class CCreatorContactField : public CBase				//, public MCreatorRandomDataField
-    {
-public:    
-    static CCreatorContactField* NewL();
-    void AddFieldToParamL( CCreatorEngine* aEngine, CPhonebookParameters* aParam, TInt aType, TInt aRand = KErrNotFound );
-    void AddFieldToParamL( CPhonebookParameters* aParam, TInt aType, TPtrC aContent );
-    ~CCreatorContactField();
-private:
-    CCreatorContactField();
-    void ConstructL();
-    };
-
-#endif // __CREATORPHONEBOOK_H__
--- a/creator/engine/inc/creator_phonebookapi.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef CREATOR_PHONEBOOKAPI_H_
-#define CREATOR_PHONEBOOKAPI_H_
-
-#include <QString>
-#include <qglobal.h>
-#include <QTime>
-#include <qtcontacts.h>
-QTM_USE_NAMESPACE
-
-
-class CCreatorPhonebookAPI
-    {
-public:
-    CCreatorPhonebookAPI ();
-    ~CCreatorPhonebookAPI ();
-
-    quint32 saveContact( const QList<QContactDetail>& list );
-    quint32 createGroup( const QString& groupName );
-    int numberOfContacts();
-    int addContactToGroup( QContactLocalId group, QContactLocalId contact );
-    int addToGroup(QContactLocalId group, int amount);
-    bool deleteAllContacts();
-    bool deleteAllContacts( const QString& type );
-    bool deleteContacts( const QList<QContactLocalId>& list );
-    QContact contact( const QContactLocalId& contactId );
-
-    QString phoneNumber( const QContactLocalId& contactId );
-    bool contactDetails( const QContactLocalId& contactId, QString& name, QString& phoneNumber, QString& email );
-    
-private:
-    bool IsContactGroupL( const QContact& contact );
-    
-private:
-    QContactManager* mContactMngr;
-
-    };
-
-#endif /* CREATOR_PHONEBOOKAPI_H_ */
--- a/creator/engine/inc/creator_phonebookbase.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-
-#ifndef __CCREATORPHONEBOOKBASE_H_
-#define __CCREATORPHONEBOOKBASE_H_
-
-#include "creator_modulebase.h"
-
-static const TInt KPhonebookFieldLength = 128;
-static const TInt KCreateRandomAmountOfGroups = 1;
-
-class CCreatorModuleBaseParameters;
-
-class CCreatorPhonebookBase : public CCreatorModuleBase
-{
-enum TCreatorPhonebookStatus{
-    ECreatorPhonebookDelete = 0,
-    ECreatorPhonebookStart,
-    ECreatorPhonebookGetContactFields,
-    ECreatorPhonebookGetPhoneNumbersCount,
-    ECreatorPhonebookGetUrlsCount,
-    ECreatorPhonebookGetEmailsCount,
-    ECreatorPhonebookContactsAllFields,
-    ECreatorPhonebookGetGroupFields,
-    ECreatorPhonebookGetContactsInGroup
-};
-
-public:
-
-    virtual TInt CreateContactEntryL(CCreatorModuleBaseParameters *aParameters) = 0;    
-    virtual TInt CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
-    virtual TInt CreateSubscribedContactEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
-    virtual TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
-    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
-
-//    virtual TBool IsActive() = 0;
-//    virtual void CancelOperation() = 0;
-    virtual void DeleteAllGroupsL() = 0;
-    virtual void DeleteAllGroupsCreatedByCreatorL() = 0;
-    
-protected:
-
-    virtual void SetDefaultParameters();    
-    TInt iNumberOfPhoneNumberFields;
-    TInt iNumberOfURLFields;
-    TInt iNumberOfEmailAddressFields;
-    TInt iContactsInGroup;    
-    TBool iDefaultFieldsSelected;
-    TBool iAddAllFields;
-};
-
-
-#endif /*__CCREATORPHONEBOOKBASE_H_*/
--- a/creator/engine/inc/creator_phonebookwrapper.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +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 __CREATORPHONEBOOKWRAPPER_H__
-#define __CREATORPHONEBOOKWRAPPER_H__
-
-#include "creator_phonebookbase.h"
-#include "creator_randomdatafield.h"
-
-#include <map>
-
-#include "creator_phonebookapi.h"
-
-class CCreatorEngine;
-class CCreatorModuleBaseParameters;
-
-class CContactDatabase;	
-//class CPhonebookWrapperParameters;	
-class CPhonebookParameters;
-
-typedef typename std::map<const TInt, HBufC*> TCreatorContactFields;
-typedef typename std::pair<const TInt, HBufC*> TCreatorContactField;
-
-class CCreatorPhonebookWrapper : public CBase 
-    {
-public:
-	enum ContactDetailType{
-	ELastName,					//0
-	ELastNameReading,			//1
-	EFirstName,
-	EFirstNameReading,
-	EPrefix,
-	ESuffix,					//5
-	ESecondName,
-	ELandPhoneHome,
-	EMobilePhoneHome,
-	EVideoNumberHome,
-	EFaxNumberHome,				//10
-	EVoipHome,
-	EEmailHome,
-	EUrlHome,
-	EAddrLabelHome,
-	EAddrPoHome,				//15
-	EAddrExtHome,
-	EAddrStreetHome,
-	EAddrLocalHome,
-	EAddrRegionHome,
-	EAddrPostCodeHome,			//20
-	EAddrCountryHome,
-	EJobTitle,
-	ECompanyName,
-	ELandPhoneWork,
-	EMobilePhoneWork,			//25
-	EVideoNumberWork,
-	EFaxNumberWork,
-	EVoipWork,
-	EEmailWork,
-	EUrlWork,					//30
-	EAddrLabelWork,
-	EAddrPoWork,
-	EAddrExtWork,
-	EAddrStreetWork,
-	EAddrLocalWork,				//35
-	EAddrRegionWork,
-	EAddrPostCodeWork,
-	EAddrCountryWork,
-	ELandPhoneGen,
-	EMobilePhoneGen,			//40
-	EVideoNumberGen,
-	EFaxNumberGen,
-	EVoipGen,
-	EPoc,
-	ESwis,						//45
-	ESip,
-	EEmailGen,
-	EUrlGen,
-	EAddrLabelGen,
-	EAddrPoGen,					//50
-	EAddrExtGen,
-	EAddrStreetGen,
-	EAddrLocalGen,
-	EAddrRegionGen,
-	EAddrPostCodeGen,			//55
-	EAddrCountryGen,
-	EPagerNumber,
-	EDtmfString,
-	EWVAddress,
-	EDate,						//60
-	ENote,
-	EThumbnailPic,
-	ERingTone,
-	ECallerObjImg,
-	ECallerObjText,				//65
-	EMiddleName,
-	EDepartment,
-	EAsstName,
-	ESpouse,
-	EChildren,					//70
-	EAsstPhone,
-	ECarPhone,
-	EAnniversary,
-	ESyncClass,
-	ELocPrivacy,				//75
-	EGenLabel,
-	ETopContact,
-	EIMPP,
-	};
-
-	
-public: 
-    static CCreatorPhonebookWrapper* NewL();
-    static CCreatorPhonebookWrapper* NewLC();
-    ~CCreatorPhonebookWrapper();
-
-private:
-    CCreatorPhonebookWrapper();
-    void ConstructL();
-
-public:  
-    TUint32 CreateContactEntryL(const TCreatorContactFields& Map);    
-    TUint32 CreateGroupEntryL( HBufC* aGroupName );
-    TInt CreateSubscribedContactEntryL(); 
-
-    /**
-     * NumberOfContacts() will return all contacts from Contact API
-     */
-    TInt NumberOfContacts();
-    
-    TInt AddContactToGroup( TUint32 aGroupId, TUint32 aContact );
-    TInt AddToGroup( TUint32 aGroupId, TInt aAmount );
-    
-    
-    void DeleteAllL();
-    void DeleteAllGroupsL();
-    void DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid );
-    
-    HBufC* GetPhoneNumberL( TUint32 aContactId );
-    TBool GetContactDetailsL( TUint32 aContactId, TDes& aName, TDes& aPhoneNumber, TDes& aEmail );
-    
-private:
-    QList<QContactDetail> CreateContactDetailsFromParameters( const TCreatorContactFields& Map );
-    QContactDetail CreateContactDetail( QList<QContactDetail>& aContactDetailList,QString aDetail, QString aFieldContext, QString aFieldString, QString aData );
-    void AddFieldToList( QList<QContactDetail>& aDetailList, QContactDetail aDetail);
-    
-    TBool IsContactGroupL( TUint32& aLink );
-    
-    void DeleteItemsCreatedWithCreatorL( TUid aStoreUid );
-    void DoDeleteItemsCreatedWithCreatorL( TUid aStoreUid, CDictionaryFileStore* aStore );
-    TBool HasOtherThanGroupsL();
-    
-
-private:
-	
-    TInt iOpCounter;
-    
-    static QString iPhoneNumberFields[];
-    static TInt iUrlFields[];
-    static TInt iEmailFields[];
-    
-    RArray<TUint32> iContactLinkArray;
-    RArray<TUint32>  iContactsToDelete;	
-    RArray<TUint32>  iContactGroupsToDelete;	
-    
-    RArray<TUint32> iPreviousDeleteLinks;
-    //RPointerArray<MVPbkContactLinkArray> iPreviousDeleteLinks;  //modify
-    
-private:
-	//new variables
-	/// Ref: the target of the copy
-	QContact* iStore;       
-    
-    /// Own: Contact database for this store
-    CContactDatabase* iContactDb;    
-    
-    //Contacts found in contacts db.
-    QList<QContactId>* iContactResults;
-    // Contact groups that are found in the store. These are used in filtering
-    // the groups from the find results.
-    QList<QContactId>* iContactGroupsInStore;
-    
-    CCreatorPhonebookAPI* iPhonebookAPI;
-    };
-
-#endif // __CREATORPHONEBOOKWRAPPER_H__
--- a/creator/engine/inc/creator_randomdatafield.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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 CREATORDATAFIELD_H_
-#define CREATORDATAFIELD_H_
-
-#include <e32base.h>
-
-class MCreatorRandomDataField
-{
-public:
-    enum TRandomLengthType
-    {
-    ERandomLengthUndefined,
-    ERandomLengthDefault, // Default length (use data from engine)
-    ERandomLengthMax,     // Maximum length
-    ERandomLengthExplicit // Explicitly defined length
-    };
-    
-    /**
-     * Set field content to random.     
-     * @param aRandomLenType Random length type
-     * @param aExplicitRandomLen Random length when ERandomLengthExplicit is used. Ignored otherwise.
-     */
-    virtual void SetRandomParametersL( TRandomLengthType aRandomLenType, TInt aRandomLen ) = 0;
-};
-
-#endif /*CREATORDATAFIELD_H_*/
--- a/creator/engine/inc/creator_randomdataparser.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +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 CREATORRANDOMDATAPARSER_H_
-#define CREATORRANDOMDATAPARSER_H_
-
-#include <e32base.h>
-#include <badesca.h>
-#include <xml/contenthandler.h>
-#include <xml/parser.h>
-
-//using namespace Xml;
-
-class CCreatorRandomDataParser : public CBase, public Xml::MContentHandler
-	{
-
-public:
-    enum TRandomDataType
-    	{
-    	EFirstName,
-    	ESurname,
-    	ECompany,
-    	EAddress,
-    	EJobTitle,
-    	EPhoneNumber,
-    	EGroupName,
-    	EMeetingReason,
-    	EMeetingPlace,
-    	EMemoText,
-    	EAnniversaryReason,
-    	EToDoText,
-    	EReminderText,
-    	EMessageSubject,
-    	EMessageText,
-    	ECity,
-    	ECountry,
-    	EPostcode,
-    	EState,
-    	EPobox,
-    	EPrefix,
-    	ESuffix,
-    	ELandmarkName,
-    	ELandmarkDescription
-    	};
-
-public:
-
-    virtual ~CCreatorRandomDataParser();
-    static CCreatorRandomDataParser* NewL();
-    static CCreatorRandomDataParser* NewLC();    
-    CDesCArrayFlat* ParseL(const TDesC& aFileName, const TRandomDataType aDataType);
-    
-    TInt GetError() const;
-    
-private:
-
-    CCreatorRandomDataParser();
-    void ConstructL();
-    
-    /**
-     * Converts 8 bit descriptor to 16 bit descriptor
-     * @param aDes 8 bit descriptor to be converted
-     * @return Pointer to the new 16 bit descriptor     
-     */
-    HBufC* Convert8BitTo16BitLC(const TDesC8& aInput);
-    void GetTextFileMode(RFile& aFile, TInt& aFileSize);
-
-    
-public:
-    // From MContentHandler:    
-    void OnStartDocumentL(const Xml::RDocumentParameters &aDocParam, TInt aErrorCode);
-    void OnEndDocumentL(TInt aErrorCode);
-    void OnStartElementL(const Xml::RTagInfo& aElement, 
-                         const Xml::RAttributeArray& aAttributes, 
-                         TInt aErrorCode);
-    void OnEndElementL(const Xml::RTagInfo& aElement, TInt aErrorCode);
-    void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
-    void OnStartPrefixMappingL(const RString& aPrefix, 
-                               const RString& aUri, 
-                               TInt aErrorCode);
-    void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
-    void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
-    void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
-    void OnProcessingInstructionL(const TDesC8& aTarget, 
-                                  const TDesC8& aData, 
-                                  TInt aErrorCode);
-    void OnError(TInt aErrorCode);
-    TAny* GetExtendedInterface(const TInt32 aUid);
-    
-private:
-	TRandomDataType iDataType;
-	CDesCArray* iElementNameArray;
-	HBufC* iContentData;
-	TBool iInsideRootElement;
-	TBool iContentParsingActive;
-
-	CDesCArrayFlat* iResultArray;
-	
-    enum TFileFormat
-        {
-        EFormatANSIASCII,
-        EFormatUTF8,
-        EFormatUTF16LE,
-        EFormatUTF16BE
-        };
-    
-    // XML parser
-    Xml::CParser* iParser;
-    
-    TFileFormat iScriptTextFormat;
-    TInt iLastError;
-};
-
-#endif /*CREATORRANDOMDATAPARSER_H_*/
--- a/creator/engine/inc/creator_scriptelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,350 +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 CREATORSCRIPTELEMENT_H_
-#define CREATORSCRIPTELEMENT_H_
-
-#include "creator_randomdatafield.h"
-#include "creator_modulebase.h"
-#include "engine.h"
-#include <e32base.h>
-
-class CCreatorScriptElement;
-class CCreatorEngine;
-
-_LIT(KEmpty, "");
-_LIT(KContextSep, "::");
-
-// Common attributes:
-_LIT(KAmount, "amount");
-_LIT(KRandomLength, "randomlength");
-_LIT(KId, "id");
-_LIT(KMaxAmount, "maxamount");
-
-// Common element names:
-_LIT(KScript, "creatorscript");
-_LIT(KFields, "fields");
-_LIT(KContactSetRef, "contact-set-reference");
-_LIT(KExistingContacts, "numberofexistingcontacts");
-
-// Common attribute values:
-_LIT(KMax, "max");
-_LIT(KDefault, "default");
-_LIT(KIncrease, "incvalueforeachcopy");
-
-class CCreatorScriptElementCache : public CBase
-{
-public:
-    static CCreatorScriptElementCache* CCreatorScriptElementCache::NewL();
-    virtual ~CCreatorScriptElementCache();    
-        
-    void RemoveElements();    
-    void AddElementL(CCreatorScriptElement* aElement);
-private:
-    CCreatorScriptElementCache();
-    void ConstructL();
-    RPointerArray<CCreatorScriptElement> iElementCache;
-
-};
-
-
-class CCreatorScriptAttribute : public CBase
-{
-public:
-    static CCreatorScriptAttribute* NewL(const TDesC& aName, const TDesC& aValue);
-    static CCreatorScriptAttribute* NewLC(const TDesC& aName, const TDesC& aValue);
-    virtual ~CCreatorScriptAttribute();    
-    
-    TPtrC Name() const;
-    void SetNameL(const TDesC& aName);      
-    TPtrC Value() const;
-    void SetValueL(const TDesC& aValue);
-    
-protected:
-
-    CCreatorScriptAttribute();
-    virtual void ConstructL(const TDesC& aName, const TDesC& aValue);
-    
-private:
-    HBufC* iName;
-    HBufC* iValue;    
-};
-
-/**
- * Base class for all elements
- */
-class CCreatorScriptElement : public CBase
-{
-public:
-
-    static CCreatorScriptElement* CCreatorScriptElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-
-    /**
-     * Destructor
-     */
-    virtual ~CCreatorScriptElement();
-    
-    /**
-     * Returns the array of sub-elements.
-     * @return Reference to the sub-element array.
-     */
-    virtual RPointerArray<CCreatorScriptElement> const& SubElements() const;
-    virtual RPointerArray<CCreatorScriptElement>& SubElements();
-    
-    /**
-     * Returns a sub-element.
-     * @param aIndex Sub-element array index.
-     * @return Pointer to a sub-element
-     */ 
-    virtual CCreatorScriptElement* SubElement(TInt aIndex);
-    
-    /**
-     * Finds a sub-element by a name.
-     * @param aName Name of the sub-element
-     * @return Pointer to the first matching sub-element. NULL if not found.
-     */
-    virtual CCreatorScriptElement* FindSubElement(const TDesC& aName);
-    
-    /**
-     * Removes all sub-elements.
-     */
-    virtual void RemoveSubElements();
-    
-    /**
-     * Removes a sub-element
-     * @param aIndex Index of the element to be removed
-     */
-    virtual void RemoveSubElementL(TInt aIndex);
-    
-    /**
-     * Adds an element to the sub-element list. 
-     * Leaves with error KErrNotSupported, if sub-element is illegal.
-     * Leaves with error KErrArgument, if the index in out of bounds.
-     * @param aElem Pointer to the element to be added. Takes ownership of the pointer.
-     * @param aIndex Sub-element array index where to add the element. -1 means that
-     * the element is added to the end of the array.
-     */
-    virtual void AddSubElementL(CCreatorScriptElement* aElem, TInt aIndex = -1);
-  
-    /**
-     * Returns the array of attributes.
-     * @return Reference to the attribute array.
-     */
-    virtual RPointerArray<CCreatorScriptAttribute> const& Attributes() const;
-        
-    /**
-     * Returns an attribute.
-     * @param aIndex Attribute array index.
-     * @return Pointer to a attribute
-     */ 
-    virtual CCreatorScriptAttribute* Attribute(TInt aIndex);
-    
-    /**
-     * Removes all attributes.
-     */
-    virtual void RemoveAttributes();
-    
-    /**
-     * Removes an attribute
-     * @param aIndex Index of the attribute to be removed
-     */
-    virtual void RemoveAttributeL(TInt aIndex);
-    
-    /**
-     * Adds an attribute to the attribute list. 
-     * Leaves with error KErrNotSupported, if attribute is illegal.
-     * @param aAttribute Pointer to the element to be added. Takes ownership of the pointer.
-     * @param aIndex Attribute array index where to add the attribute. -1 means that
-     * the attribute is added to the end of the array.
-     */
-    virtual void AddAttributeL(CCreatorScriptAttribute* aAttribute, TInt aIndex = -1);
-    
-    /**
-     * Finds attribute with the given name. First match is returned.
-     */
-    virtual const CCreatorScriptAttribute* FindAttributeByName(const TDesC& aName) const;
-    virtual CCreatorScriptAttribute* FindAttributeByName(const TDesC& aName);
-
-    /**
-     * Returns element name
-     * @return Element name
-     */
-    virtual TPtrC Name() const;
-    
-    /**
-     * Sets the element name.
-     * @param aName Element name
-     */
-    virtual void SetNameL(const TDesC& aName);
-    
-    /**
-     * Returns element content
-     * @return Element content
-     */
-    virtual TPtrC Content() const;
-    
-    /**
-     * Set the content of the element.
-     * @param aContenct Element content
-     */
-    virtual void SetContentL(const TDesC& aContent);
-    virtual void AppendContentL(const TDesC& aContent);
-    
-    /**
-     * Returns element context
-     * @return Element context
-     */
-    virtual TPtrC Context() const;
-        
-    /**
-     * Set the context of the element.
-     * @param aContenct Element context
-     */
-    virtual void SetContextL(const TDesC& aContext);
-    
-    /**
-     * Tells whether the element should be cached for future use.
-     * @return ETrue if the element should be cached for future use, EFalse otherwise.
-     */
-    virtual TBool IsCacheNeeded();
-    virtual void AddToCacheL(CCreatorScriptElementCache& aCache);
-    virtual void AddToCacheL();
-    virtual TBool IsCommandElement() const;
-    virtual void ExecuteCommandL();
-    //virtual void SaveCommandResultsL();
-    //virtual void DiscardCommandResultsL();
-    virtual TBool IsRoot() const;
-    virtual RPointerArray<CCreatorModuleBaseParameters>& CommandParameters();
-    virtual const RPointerArray<CCreatorModuleBaseParameters>& CommandParameters() const;
-    
-protected:
-
-    /**
-     * Constructors. 
-     */    
-    CCreatorScriptElement(CCreatorEngine* aEngine = 0);
-    
-    /**
-     * @param aName Name of the element.
-     */
-    virtual void ConstructL(const TDesC& aName, const TDesC& aContext = KNullDesC);
-    
-    /**
-     * Tells whethet the sub-element is allowed or not.
-     * @param aElem Sub-element to be tested.
-     * @return Boolean value telling whether the sub-element is allowed 
-     * to be added or not.
-     */
-    virtual TBool IsSubElementSupported(const CCreatorScriptElement& aElem) const;
-    
-    virtual MCreatorRandomDataField::TRandomLengthType ResolveRandomDataTypeL(const CCreatorScriptAttribute& aAttr, TInt& aRandomLen ) const;
-    
-    virtual TBool ConvertStrToBooleanL(const TDesC& aStr) const;
-    virtual TInt ConvertStrToIntL(const TDesC& aStr) const;
-    virtual TUint ConvertStrToUintL(const TDesC& aStr) const;
-    virtual void ConvertStrToReal64L(const TDesC& aStr, TReal64& aVal) const;
-    virtual void ConvertStrToReal32L(const TDesC& aStr, TReal32& aVal) const;
-    
-    virtual void AppendContactSetReferenceL(const CCreatorScriptElement& aContactSetRefElem, RArray<TLinkIdParam>& aLinkArray ) const;    
-    
-    virtual void SetContentToTextParamL(HBufC*& aPtr, const TDesC& aContent );
-    
-    virtual TTime ConvertToDateTimeL(const TDesC& aDtStr) const;
-    
-    virtual TInt CompareIgnoreCase(const TDesC& aStr1, const TDesC& aStr2 ) const;
-    
-    /**
-     * Increases phonenumber by aDelta.
-     * 
-     * Special cases, that are handled:
-     * +9          -> +9, +10, +11...
-     * +3584098#99 -> +3584098#99, +3584098#100, +3584098#101...
-     * #           -> #0, #1, #2...
-     * 123#        -> 123#0, 123#1, 123#2...
-     * 099         -> 099, 100, 101...
-     * 
-     * @param aOriginal original phonenumber
-     * @param aDelta number to be added to original number. Must be >= 0.
-     * @param aIncreased on return contains the increased number.
-     *        The buffer must be allocated by the caller.
-     */
-    void IncreasePhoneNumL( const TDesC& aOriginal, TInt aDelta, HBufC* aIncreased ) const;
-    
-protected:
-    
-    // Sub-element array
-    RPointerArray<CCreatorScriptElement> iSubElements;
-    // Attribute array
-    RPointerArray<CCreatorScriptAttribute> iAttributes;
-    // Element name (e.g. "contact")
-    HBufC* iName;
-    // Element content
-    HBufC* iContent;
-    // Context
-    HBufC* iContext;
-    
-    TBool iIsCommandElement;
-    TBool iIsRoot;
-    CCreatorEngine* iEngine;
-    RPointerArray<CCreatorModuleBaseParameters> iParameters;
-};
-
-/**
- * Script element
- */
-class CCreatorScriptRoot : public CCreatorScriptElement
-{
-public:
-    static CCreatorScriptRoot* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-protected:
-    CCreatorScriptRoot(CCreatorEngine* aEngine);
-};
-
-/**
- * Calendar elements
- */
-
-/**
- * Base class for calendar elements
- */
-class CCreatorCalendarElementBase : public CCreatorScriptElement
-{
-public:
-    static CCreatorCalendarElementBase* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-protected:
-    CCreatorCalendarElementBase(CCreatorEngine* aEngine);
-};
-
-/**
- * Message elements
- */
-
-/**
- * Base class for message elements
- */
-class CCreatorMessageElementBase : public CCreatorScriptElement
-{
-public:
-    static CCreatorMessageElementBase* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
-protected:
-    CCreatorMessageElementBase(CCreatorEngine* aEngine);
-};
-
-#endif /*CREATORSCRIPTELEMENT_H_*/
--- a/creator/engine/inc/creator_scriptelementfactory.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-
-#ifndef CREATORSCRIPTELEMENTFACTORY_H_
-#define CREATORSCRIPTELEMENTFACTORY_H_
-
-#include "creator_scriptelement.h"
-
-/**
- * Creates script element instance based on the element name and context.
- */
-class TCreatorScriptElementFactory
-{
-public:
-    static CCreatorScriptElement* CreateElementL(CCreatorEngine* aEngine, const TDesC& aElementName, const TDesC& aContext = KNullDesC);
-};
-
-#endif /*CREATORSCRIPTELEMENTFACTORY_H_*/
--- a/creator/engine/inc/creator_scriptentry.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-
-
-
-#ifndef __FILEUTILS_H__
-#define __FILEUTILS_H__
-
-
-#include <e32base.h>
-#include <f32file.h>
-#include <badesca.h>
-#include <AknGlobalNote.h>
-#include <AknIconArray.h> 
-#include <aknmemorycardui.mbg>
-#include <msvapi.h>
-
-
-class CCreatorEngine;
-
-class CreatorFileUtils
-{
-public:
-    static TInt FindFiles(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
-    static TInt FindFilesRecursiveL(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
-};
-
-class CCommandParser : public CBase, public MMsvSessionObserver, MUIObserver
-    {
-enum TCommandParserStatus{
-    EGetingScript,
-    EGetingRandomDataFile
-};
-
-public:
-    static CCommandParser* NewL(CCreatorEngine* aEngine);
-    static CCommandParser* NewLC(CCreatorEngine* aEngine);
-    ~CCommandParser();
-    
-    void StrParserL(HBufC*& aDestinationBuf, TUint aToken);
-    void StrParserL(HBufC8*& aDestinationBuf, TUint aToken);
-
-private:
-    CCommandParser();
-    void ConstructL(CCreatorEngine* aEngine);
-
-    TInt FindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath);
-    TInt FindFiles(const TDesC& aFileName, const TDesC& aPath);
-    TInt ReadLineFromFileL(RFile& aInputFile);    
-    //void ParseCommandFromDescriptorL();
-
-    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
-
-public:
-    /**
-     * Called when some dialog in UI is closed
-     *
-     * @since S60 10.1
-     * @param aPositiveAction ETrue if "Ok", "Yes" or other "positive" button was pressed
-     * @param aUserData number that was passed to UI before dialog was opened
-     * @return None.
-     */
-    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData);
-    
-public:
-    void OpenScriptL();
-    TBool OpenScriptL(MCommandParserObserver* aObserver);
-    TBool GetRandomDataFilenameL(MCommandParserObserver* aObserver);
-
-private:
-    CCreatorEngine* iEngine;
-    CDesCArrayFlat* iSearchArray;
-    TInt iSelectedItem;
-    
-    TInt iParserPosition;
-    TInt iParserOldPosition;
-
-    HBufC8* iReadBuf;
-
-    MCommandParserObserver* iObserver;
-    };
-
-
-
-#endif // __FILEUTILS_H__
-
--- a/creator/engine/inc/creator_scriptparser.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +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 CREATORSCRIPTPARSER_H_
-#define CREATORSCRIPTPARSER_H_
-
-#include <e32base.h>
-#include <xml/contenthandler.h>
-#include <xml/parser.h>
-
-using namespace Xml;
-
-class CCreatorScriptElement;
-class CCreatorEngine;
-class CCreatorScriptElementCache;
-
-class TCreatorScriptElementInfo
-{
-public:
-    enum TElementStatus
-    {
-    EStatusUndefined,   // undefined
-    EStatusParsing,     // currently being parsed
-    EStatusParsed       // parsed
-    };
-    TCreatorScriptElementInfo()
-        {
-        iStatus = EStatusUndefined;
-        iElement = 0;
-        }
-    TCreatorScriptElementInfo(TElementStatus aStatus, CCreatorScriptElement* aElement)
-        {
-        iStatus = aStatus;
-        iElement = aElement;
-        };
-    
-    TElementStatus iStatus;    
-    CCreatorScriptElement* iElement;
-};
-
-class CCreatorScriptParser : public CBase, public MContentHandler
-{
-public:
-
-    virtual ~CCreatorScriptParser();
-    static CCreatorScriptParser* NewL(CCreatorEngine* aEngine);
-    static CCreatorScriptParser* NewLC(CCreatorEngine* aEngine);    
-    void ParseL(const TDesC& aFileName);
-    void ParseL(RFile& aFile);
-    
-    TInt GetError() const;
-    
-private:
-
-    CCreatorScriptParser();
-    void ConstructL(CCreatorEngine* aEngine);
-    
-    /**
-     * Converts 8 bit descriptor to 16 bit descriptor
-     * @param aDes 8 bit descriptor to be converted
-     * @return Pointer to the new 16 bit descriptor     
-     */
-    HBufC* Convert8BitTo16BitLC(const TDesC8& aInput);
-    const TCreatorScriptElementInfo& LastElementInfo() const;
-    void GetTextFileMode(RFile& aFile, TInt& aFileSize);
-
-    
-public:
-    // From MContentHandler:    
-    void OnStartDocumentL(const RDocumentParameters &aDocParam, TInt aErrorCode);
-    void OnEndDocumentL(TInt aErrorCode);
-    void OnStartElementL(   const RTagInfo& aElement, 
-                            const RAttributeArray& aAttributes, 
-                            TInt aErrorCode);
-    void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
-    void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
-    void OnStartPrefixMappingL( const RString& aPrefix, 
-                                const RString& aUri, 
-                                TInt aErrorCode);
-    void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
-    void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
-    void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
-    void OnProcessingInstructionL(  const TDesC8& aTarget, 
-                                    const TDesC8& aData, 
-                                    TInt aErrorCode);
-    void OnError(TInt aErrorCode);
-    TAny* GetExtendedInterface(const TInt32 aUid);
-    
-private:
-
-    enum TFileFormat
-        {
-        EFormatANSIASCII,
-        EFormatUTF8,
-        EFormatUTF16LE,
-        EFormatUTF16BE
-        };
-    // XML parser
-    CParser* iParser;
-    
-    /**
-     * Element stack holding the elements that are currently being parsed.
-     */
-    RArray<TCreatorScriptElementInfo> iElementStack;
-    
-    /**
-     * Cache object containig the elements that are referred in future and thus should
-     * not be deleted after parsing.
-     */
-    CCreatorScriptElementCache* iElementCache;
-    
-    /**
-     * Pointer to the engine
-     */
-    CCreatorEngine* iEngine;
-    
-    TCreatorScriptElementInfo iDefaultElement;
-    
-    TFileFormat iScriptTextFormat;
-    TInt iLastError;
-};
-
-#endif /*CREATORSCRIPTPARSER_H_*/
--- a/creator/engine/inc/creator_std.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-
-#ifndef __CREATOR_STD_H__
-#define __CREATOR_STD_H__
-
-#include <e32base.h>
-
-class TCommand;
-typedef CArrayFixSeg<TCommand> CCommandArray;
-
-
-#endif // __CREATOR_STD_H__
--- a/creator/engine/inc/creator_traces.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-
-
-
-#ifndef __CREATOR_TRACES_H__
-#define __CREATOR_TRACES_H__
-
-#include <e32def.h>
-
-
-// ---------------------------------------------------------------------------
-// You change these logging method values below! Recompile the application to take changes effect.
-
-    // logging methods
-    // 0 = No logging
-    // 1 = Flogger
-    // 2 = RDebug
-    // 3 = Flogger and RDebug
-    
-    #ifndef _DEBUG
-        
-        // Logging method for UREL builds:
-        #define CREATOR_LOGGING_METHOD  3
-
-    #else
-
-        // Logging method for UDEB builds:
-        #define CREATOR_LOGGING_METHOD  3
-
-    #endif    
-    
-
-
-// ---------------------------------------------------------------------------
-// Do not make any changes to lines below...
-
-    #if CREATOR_LOGGING_METHOD == 1 || CREATOR_LOGGING_METHOD == 3
-
-        #include <flogger.h>
-        _LIT(KLogFolder,"Creator");
-        _LIT(KLogFile,"Creator_Trace.txt");
-
-    #endif
-
-    #if CREATOR_LOGGING_METHOD == 2 || CREATOR_LOGGING_METHOD == 3
-
-        #include <e32debug.h>
-
-    #endif
-
-
-    #if CREATOR_LOGGING_METHOD == 0
-    
-        #define LOGTEXT(AAA)
-        #define LOGSTRING(AAA)
-        #define LOGSTRING2(AAA,BBB)
-        #define LOGSTRING3(AAA,BBB,CCC)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD)
-    
-    
-    #elif CREATOR_LOGGING_METHOD == 1
-    
-        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-   
-    #elif CREATOR_LOGGING_METHOD == 2
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
-    
-    #elif CREATOR_LOGGING_METHOD == 3
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-
-    #endif
-
-// ---------------------------------------------------------------------------
-
-#endif // __LAUNCHER_TRACES_H__
-
--- a/creator/engine/inc/creator_wepsecuritysettings.h	Mon Oct 04 10:09:02 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 CREATORWEPSECURITYSETTINGS_H_
-#define CREATORWEPSECURITYSETTINGS_H_
-
-//
-// Methods copied from WEPSecuritySettingsImpl.h 
-// (Part of  : WEP Security Settings UI)
-// @see \s60\mw\networking\networkingutilities\WEPSecuritySettingsUI\inc\WEPSecuritySettingsImpl.h
-//
-
-
-// INCLUDES
-
-//#include "engine.h"
-
-#include <e32base.h>
-#include <metadatabase.h>
-using namespace CommsDat;
-
-// FORWARD DECLARATIONS
-
-class CCommsDatabase;
-
-// Index of first key
-const TInt KFirstKey = 0;
-
-// Index of second key
-const TInt KSecondKey = 1;
-
-// Index of third key
-const TInt KThirdKey = 2;
-
-// Index of fourth key
-const TInt KFourthKey = 3;
-
-const TInt KMaxNumberofKeys = 4;
-
-// Number of characters for a 232 bits key
-const TUint KKeyDataLength232Bits = 58;
-
-// The maximum length of key data
-const TUint KMaxLengthOfKeyData = KKeyDataLength232Bits;
-
-
-
-
-class CCreatorWEPSecuritySettings : public CBase
-    {
-public: 
-    static CCreatorWEPSecuritySettings* NewL();
-    static CCreatorWEPSecuritySettings* NewLC();
-    ~CCreatorWEPSecuritySettings();
-
-private:
-    CCreatorWEPSecuritySettings();
-    void ConstructL();
-
-
-public:
-/**
-* Save to database.
-* @param aIapId Wlan Service Table Id of the IAP to be saved
-* @param aCommsDb Comms database.
-*/
-void SaveL( TUint32 aIapId, CCommsDatabase& aCommsDb ) const;
-
-public:
-// Enumeration of the possible keys in use
-enum TWEPKeyInUse
-    {
-    EKeyNumber1,            // Key number 1
-    EKeyNumber2,            // Key number 2
-    EKeyNumber3,            // Key number 3
-    EKeyNumber4             // Key number 4
-    };
-
-
-// Enumeration of the possible authentication types
-enum TWEPAuthentication
-    {
-    EAuthOpen,              // Open authentication
-    EAuthShared             // Shared authentication
-    };
-
-
-// Possible lengths of the keys
-enum TWEPKeyLength
-    {
-    E40Bits,                // 40 bits
-    E104Bits,               // 104 bits
-    E232Bits                // 232 bits
-    };
-
-
-// Possible formats of the keys
-enum TWEPKeyFormat
-    {
-    EAscii,                 // Ascii format
-    EHexadecimal            // Hex format
-    };
-    
-    
-
-private:
-
-// Index of the key currently in use (EKeyNumber1, EKeyNumber2, 
-// EKeyNumber3, EKeyNumber4
-CCreatorWEPSecuritySettings::TWEPKeyInUse iKeyInUse;
-
-// Type of authentication (EAuthOpen, EAuthShared)
-CCreatorWEPSecuritySettings::TWEPAuthentication iAuthentication;
-
-// Length of the key (E40Bits, E104Bits, E232Bits)
-CCreatorWEPSecuritySettings::TWEPKeyLength iKeyLength[KMaxNumberofKeys];
-
-// Format of the key (EAscii, EHexadecimal)
-CCreatorWEPSecuritySettings::TWEPKeyFormat iKeyFormat[KMaxNumberofKeys];
-
-
-    };
-
-
-
-#endif /*CREATORWEPSECURITYSETTINGS_H_*/
--- a/creator/engine/inc/randomdata.txt	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,589 +0,0 @@
-// ---------------------------------------------------------
-
-struct r_data_firstnames
-        {
-        "John";
-        "Francis";
-        "Andrew";
-        "Lawrence";
-        "Gregory";
-        "Fulke";
-        "Thomas";
-        "Nicholas";
-        "Hakle";
-        "Roger";
-        "Nathaniel";
-        "Luke";
-        "William";
-        "Ralph";
-        "Leonar";
-        "Daniel";
-        "Aban";
-        "Mathias";
-        "Robert";
-        "Christopher";
-        "Martin";
-        "Michael";
-        "Barnaby";
-        "Tobias";
-        "Richard";
-        "Anthony";
-        "Simon";
-        "Samuel";
-        "Geoffrey";
-        "Isaac";
-        "Henry";
-        "Matthew";
-        "Peter";
-        "Allen";
-        "Reynold";
-        "Jerome";
-        "Elizabeth";
-        "Catherine";
-        "Frances";
-        "Cecily";
-        "Millicent";
-        "Audrey";
-        "Joan";
-        "Elinor";
-        "Joyce";
-        "Frideswide";
-        "Rose";
-        "Helen";
-        "Margaret";
-        "Isabel";
-        "Bridget";
-        "Grace";
-        "Thomasin";
-        "Janet";
-        "Agnes";
-        "Dorothy";
-        "Christian";
-        "Amy";
-        "Fortune";
-        "Sybil";
-        "Alice";
-        "Margery";
-        "Edith";
-        "Barbara";
-        "Gillian";
-        "Ursula";
-        };
-
-struct r_data_surnames
-        {
-        "Lux";
-        "Mandot";
-        "Mansfield";
-        "Mayberry";
-        "McCarrel";
-        "McDaniel";
-        "Mefford";
-        "Metcalf";
-        "Metchell";
-        "Moller";
-        "Margan";
-        "Keaney";
-        "Kenyon";
-        "Kesler";
-        "Kinman";
-        "Kreinert";
-        "Kummerlin";
-        "Lamgley";
-        "Leas";
-        "Leighton";
-        "Lillie";
-        "Hilms";
-        "Holt";
-        "Hosier";
-        "Howard";
-        "Hypes";
-        "Jacmor";
-        "Behnson";
-        "Kammer";
-        "Patts";
-        "West";
-        "Wilbar";
-        "Witsan";
-        "Gillams";
-        "Good";
-        "Wreght";
-        "Worthley";
-        "Adams";
-        "Allen";
-        "Ansley";
-        "Ayries";
-        "Bartlett";
-        "Barton";
-        "Payne";
-        "Pintard";
-        "Prence";
-        "Richards";
-        "Dillman";
-        "Dory";
-        "Edgards";
-        "Engell";
-        "Farprington";
-        "Fisher";
-        "Foed";
-        "Burges";
-        "Childwall";
-        "Smith";
-        "Sipon";
-        "Simmons";
-        "Stewert";
-        "Stiles";
-        "Stratton";
-        "Dennis";
-        "Talmot";
-        };
-    }
-
-struct r_data_companies
-        {
-        "CDP";
-        "Exbox";
-        "Munro";
-        "Majaka";
-        "Bitzumi";
-        "Melroy";
-        "Matal";
-        "Japponi";
-        "Siwaka";
-        "Keiku";
-        "Naamate";
-        "Remonti";
-        "Melleva";
-        "WEX";
-        "Chataz";
-        "Ponly";
-        "Alriva";
-        "Giate";
-        "Kesso";
-        "Nyssa";
-        "Peger";
-        "Metrio";
-        "Mitchitatchi";
-        "Neppari";
-        "Amcuila";
-        "Muipitsu";
-        "Redex";
-        "Maariz";
-        "Swerck";
-        "Makiac";
-        "Dumpia";
-        "Worldmom";
-        "Renfaul";
-        "Kmartissori";
-        "Findo";
-        "Samsanc";
-        "Dellervo";
-        "Manrel";
-        "WSMRL";
-        "Eripox";
-        "Abiturien";
-        "Vesus";
-        "MI4";
-        "Overhiba";
-        "Tridune";
-        "Kyomcera";
-        "Praston";
-        "Gapmis";
-        "WPPDCD";
-        };
-
-struct r_data_addresses
-        {
-        "Barnes Street";
-        "Barnes Place";
-        "Eastman Street";
-        "West Park";
-        "South Park";
-        "Park Avenue";
-        "Richards Court";
-        "Pukershire Avenue";
-        "Ellis Avenue";
-        "East Mountain";
-        "Chestnut Hill";
-        "Plains Road";
-        "Fremont Street";
-        "Heritage Court";
-        "Highland Avenue Extension";
-        "Maple Heights";
-        "McKenzie Avenue";
-        "McKenzie Lane";
-        "West Terrace Street";
-        "Windsor Avenue";
-        "Windsor Road";
-        "Mechanic Street Extension";
-        "Granite Place";
-        "Meadow Street";
-        "Sugar River";
-        };
-
-struct r_data_cities
-        {
-        "Kuopio";       
-        "Los Angeles";        
-        "Lappeenranta";
-        "London";        
-        "Bangkok";
-        "St. Michel";                
-        "St. Petersburg";        
-        "Tokyo";
-        "Helsinki";
-        "Trondheim";        
-        "Nairobi";
-        "Havana";        
-        };
-
-struct r_data_countries
-        {
-        "Finland";
-        "Cuba";
-        "United States of America";
-        "Thailand";
-        "Sweden";
-        "Russia";
-        "Japan";
-        "Norway";
-        "Kenya";                
-        };
-
-struct r_data_postcodes
-        {
-        "00310";
-        "FI-70100";
-        "99002";
-        "11233";            
-        };
-
-struct r_data_states
-        {
-        "California state"; 
-        "Alaska state";
-        "Florida state";
-        };
-
-struct r_data_poboxes
-        {
-        "P.O BOX 5532";
-        "P.O BOX 701";
-        "99";
-        "1133";
-        "P.O. BOX 113322";
-        "112";
-        };
-
-struct r_data_prefixes
-        {
-        "Ms.";
-        "Mrs."; 
-        "Mr.";
-        "Dr.";
-        };
-
-struct r_data_suffixes
-        {
-        "Jr.";
-        "Sr.";        
-        };
-
-struct r_data_jobtitles
-        {
-        "Doctor";
-        "SW Engineer";
-        "Administrative Assistant";
-        "Bookkeeper";
-        "Credit Controller";
-        "Data Entry Operator";
-        "Payroll Officer";
-        "Receptionist";
-        "Trainee";
-        "Accounts Clerk";
-        "Administrator";
-        "Taxation Assistant";
-        "Financial Director";
-        "Bank Manager";
-        "Mobile Lending";
-        "Overseas Transactions";
-        "Restructuring";
-        "Business Analyst";
-        "Call Centre Manager";
-        "Administration";
-        "Manager";
-        "Student";
-        "Mail Sorter";
-        "Mayor";
-        "Account Servicing";
-        "Management";
-        "Media Consultant";
-        "Newsagent";
-        "Librarian";
-        "Creative Director";
-        "Announcer";
-        "Copywriter";
-        "Presenter";
-        "Promotions Manager";
-        "Advertising Sales Representative";
-        "Editor";
-        "Marketing, Sales & Publicity";
-        "Publisher";
-        "Gallery Assistant";
-        "Photographer";
-        "Storyboard Artist";
-        "Events Manager";
-        "Cameraman";
-        "Technician";
-        "Producer";
-        };
- 
-struct r_data_phonenumbers
-        {
-        "0307834387";
-        "0230328732";
-        "0430365562";
-        "0530328732";
-        "0433032865";
-        "0542306532";
-        "0342303777";
-        "0250235603";
-        "0492303652";
-        "0542303286";
-        "0543656546";
-        "0545545454";
-        "0543444454";
-        "0776463255";
-        "0432443343";
-        "0243334344";
-        "0544543443";
-        "0231343243";
-        "0213443434";
-        "0143234476";
-        "0785434444";
-        "0454445345";
-        "0342443433";
-        "0432434454";
-        "0455454454";
-        "0656565655";
-        "0343434443";
-        "0565645455";
-        "0343243243";
-        "0565466565";
-        "0465565655";
-        "0435445454";
-        "+35854553456";
-        "+35878453486";
-        "+35876653456";
-        "+35834435486";
-        "+35876766466";
-        "+4465665456";
-        "+4432434334";
-        "+4488776776";
-        "+4465655656";
-        "+4443433434";
-        "+4465656565";
-        "+4454454354";
-        };
-
-struct r_data_groupnames
-        {
-        "Nice guys";
-        "Repairs";
-        "Office works";
-        "The buddies";
-        "Football team";
-        "Gold club";
-        "Silver club";
-        "Bronze club";
-        "Best buddies";
-        "Rockers";
-        "Science group";
-        };
-
-struct r_data_meetingreasons
-        {
-        "Security issues";
-        "Team meeting";
-        "Discussion about";
-        "Work plans";
-        "Meeting with the professor";
-        "Meeting with the boss";
-        "Work issues";
-        "New workers";
-        };
-
-struct r_data_meetingplaces
-        {
-        "Room";
-        "Home";
-        "Auditorium";
-        "Company";
-        };
-
-struct r_data_landmark_names
-        {
-        "Good place to fish";},
-        "Uncle over board";},
-        "Best food ever!";},
-        "Nice beach";},
-        "Good hamburgers";},
-        "Nice view";},
-        "John's home";},
-        "Carage";},
-        "Gas station";},
-        "Food store";},
-        "Car wash";},
-        "Summer cottage";},
-        "My home";},
-        "Bank";},
-        "Hospital";},
-        "Ice hall";},
-        "Work place";}
-        };
-
-struct r_data_landmark_descriptions
-        {
-        "The salmons were really big here!";},        
-        "Delicious strawberries sold here. Must visit again sometime!";},
-        "Place looks really nice.";},
-        "This is my favorite place";},
-        "Words are not enough to describe this landmark";},        
-        "What a shocking place to visit! Remember to bring camera next time :-)";}
-        };
-
-struct r_data_memos
-        {
-        "No work today!";
-        "Movies tonight";
-        "Ship new binaries";
-        "New works";
-        "Exam";
-        "Community service";
-        "Volunteer work";
-        "Don't forget the dinner at the restaurant";
-        "Go the bank";
-        "Go to the store";
-        "Buy goods";
-        "Buy food";
-        "Buy new pair of socks";
-        "Buy vegetables";
-        "Buy fruits";
-        "Umbrella";
-        "New shoes";
-        "New suit";
-        "Buy flowers";
-        "School day";
-        };
-
-struct r_data_anniversaries
-        {
-        "birthday";
-        "anniversary";
-        };
-
-struct r_data_todos
-        {
-        "Watch for gum on my shoe";
-        "Watch my step in the hall";
-        "Always think big";
-        "Don't ever think small";
-        "Keep pedaling my bike";
-        "Watch for bees in my pop";
-        "Keep moving forward";
-        "Don't ever stop";
-        "Keep my sled underneath me";
-        "Keep my stick on the ice";
-        "Don't swim in a whirlpool";
-        "Don't look for a fight";
-        "Don't spit in the wind";
-        "Just do what is right";
-        "Go out in the world";
-        "Enjoy a warm rain";
-        "Don't worship TV";
-        "Keep my oars in the water";
-        "Point my boat right downstream";
-        "Face head on my problems";
-        "Change underwear daily";
-        "Believe myself first";
-        "Go out and have fun";
-        "Turn the cards one by one";
-        "Get out and do something";
-        };
-
-struct r_data_reminders
-        {
-        "Remeber to fix car";
-        "Remeber to eat vegetables";
-        "Remeber to go shopping";
-        "Remeber to buy boxes for moving";
-        "Remeber to fix bike";
-        "Remeber to buy christmast presents";
-        "Remeber to send flowers to grandmother";
-        "Remeber to talk with son";
-        "Remeber to cut hedge";
-        "Remeber to bumper potatoes";
-        "Remeber to harvest corn field";
-        "Remeber to sleep enaugh";
-        "Remeber to wash teeths ewery morning";
-        "Remeber to get sleep early";
-        "Remeber to give some wather to flowers";
-        "Remeber to wax snowboard";
-        "Remeber to wax skiis";
-        "Remeber to wax cross country skiis";
-        "Remeber to call mother";
-        "Remeber to call father";
-        "Remeber to call brother";
-        "Remeber to call sister";
-        "Remeber to call daughter";
-        "Remeber to call son";
-        "Remeber to rent villa";
-        };
-
-struct r_data_messagesubjects
-        {
-        "Whaaasssaaap!!??";
-        "Hello";
-        "How are you doing?";
-        "You will win the battle, GUARANTEED!";
-        "Why pay more for something if you don't have to?";
-        "You can afford health care now";
-        "Re: *Buddy* *Lists*!!~ (it's soooo cool)!!~";
-        "Weedmon say: call, we be open 7 days, mon";
-        "Want her to look better?";
-        "Good Morning andyw, how are you?";
-        "Happy Assumption";
-        "There is NO Risk involved";
-        "Free Bottle Offer!";
-        "Introduction on MDSL";
-        "Theres Help out there for you";
-        "hello there - check this out";
-        "Darling";
-        "It doesn't have to be that way";
-        "Webmaster, Free health insurance quotes!";
-        "Join us at the OSGi 2003 World Congress";
-        "Put your subject line here";
-        "You are not protected";
-        "Please try again";
-        "you didn't reply my email ? why ? ???";
-        "A very funny game";
-        "Meeting notice";
-        "Opportunities";
-        };
-
-struct r_data_messagetexts
-        {
-        "The contents of these pages are copyrighted. Any rights not expressly granted herein are reserved. The use of this site is permitted to private use.";
-        "Reproduction, transfer, distribution or storage of part or all of the contents in any form without the prior written permission is prohibited.";
-        "We consents to you browsing the pages on your computer or printing copies of extracts from these pages for your personal use only.";
-        "If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information.";
-        "The use of press releases and other documents classified as public is permitted in public communications if the source for the information has been stated.";
-        "For your easy accessibility we may include links to sites on the Internet that are owned or operated by third parties.";
-        "You also agree that we have no control over the content of that site and cannot assume any responsibility for material by such third-party sites.";
-        "In addition, a link to a such site does not imply that we endorses the site or the products or services referenced in such third party site.";
-        "In order to respond to your questions or manage interactive customer programs, it may be necessary to ask for personal information.";
-        "We may use this information to respond to your requests, or to contact you via mail, e-mail or phone to inform you of new products.";
-        "If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information.";
-        };
-
-
--- a/creator/engine/src/creator_accesspoint.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,473 +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 "creator_accesspoint.h" 
-#include "creator_traces.h"
-#include <ApListItemList.h>
-#include <ApListItem.h> 
-#include "enginewrapper.h"
-
-static const TInt KAccessPointsFieldLength = 128;
-
-_LIT(KCreatorAccessPointsPrefixName, "CR_");
-_LIT(KZeroIP, "0.0.0.0");
-
-//----------------------------------------------------------------------------
-
-CAccessPointsParameters::CAccessPointsParameters()
-    {
-    LOGSTRING("Creator: CAccessPointsParameters::CAccessPointsParameters");
-
-    iConnectionName = HBufC::New(KAccessPointsFieldLength);
-    iWapStartPage = HBufC::New(KAccessPointsFieldLength);
-    iGprsAcessPointName = HBufC::New(KAccessPointsFieldLength);
-    iIspLoginName = HBufC::New(KAccessPointsFieldLength);
-    iIspLoginPass = HBufC::New(KAccessPointsFieldLength);
-    iWapGatewayAddress = HBufC::New(KAccessPointsFieldLength);
-    iIspIPAddr = HBufC::New(KAccessPointsFieldLength);
-    iIspIPNameServer1 = HBufC::New(KAccessPointsFieldLength);
-    iIspIPNameServer2 = HBufC::New(KAccessPointsFieldLength);
-    iIspDefaultTelNumber = HBufC::New(KAccessPointsFieldLength);
-    iProxyServerAddress = HBufC::New(KAccessPointsFieldLength);
-    }
-
-CAccessPointsParameters::~CAccessPointsParameters()
-    {
-    LOGSTRING("Creator: CAccessPointsParameters::~CAccessPointsParameters");
-
-    delete iProxyServerAddress;
-    delete iIspDefaultTelNumber;
-    delete iIspIPNameServer2;
-    delete iIspIPNameServer1;
-    delete iIspIPAddr;
-    delete iWapGatewayAddress;
-    delete iIspLoginPass;
-    delete iIspLoginName;
-    delete iGprsAcessPointName;
-    delete iWapStartPage;
-    delete iConnectionName;
-    }
-
-void CAccessPointsParameters::SetRandomCMNameL(CCreatorEngine& aEngine)
-	{
-	TInt num = aEngine.RandomNumber(1, 3);
-	TBuf<10> apType;
-
-	if (num==1)
-		apType = _L("mms");
-	else if (num==2)
-		apType = _L("wap");
-	else
-		apType = _L("internet");
-
-	TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);
-
-	iConnectionName->Des() = KCreatorAccessPointsPrefixName;
-	iConnectionName->Des().Append( company );
-	iConnectionName->Des().Append(_L(" "));
-	iConnectionName->Des().Append(apType);
-	}
-
-void CAccessPointsParameters::SetRandomLoginNameL(CCreatorEngine& aEngine)
-	{
-	iIspLoginName->Des() = aEngine.RandomString(CCreatorEngine::EFirstName);
-	iIspLoginName->Des().LowerCase();
-	}
-
-void CAccessPointsParameters::SetRandomLoginPassL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomSecureAuthenticationL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomPromptPasswordL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomProxyAddressL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomProxyPortL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomStartPageL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomIPAddressL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomIP4NameServer1L(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomIP4NameServer2L(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomTelephoneNumberL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomBearerTypeIsdnL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomBearerSpeedL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomWapWspOptionL(CCreatorEngine& /*aEngine*/)
-	{}
-
-void CAccessPointsParameters::SetRandomGatewayAddressL(CCreatorEngine& /*aEngine*/)
-	{}
-
-//----------------------------------------------------------------------------
-
-CCreatorAccessPoints* CCreatorAccessPoints::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorAccessPoints* self = CCreatorAccessPoints::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorAccessPoints* CCreatorAccessPoints::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorAccessPoints* self = new (ELeave) CCreatorAccessPoints;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorAccessPoints::CCreatorAccessPoints()
-    {
-    }
-
-void CCreatorAccessPoints::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorAccessPoints::ConstructL");
-
-    iEngine = aEngine;
-
-    iCommsDb = CCommsDatabase::NewL();;
-    iApDataHandler = CApDataHandler::NewLC(*iCommsDb);
-    CleanupStack::Pop();
-    iApUtils = CApUtils::NewLC(*iCommsDb);
-    CleanupStack::Pop();
-    }
-
-CCreatorAccessPoints::~CCreatorAccessPoints()
-    {
-    LOGSTRING("Creator: CCreatorAccessPoints::~CCreatorAccessPoints");
-
-    if ( iEngine && iEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidIAP ) );
-        }
-    iEntryIds.Reset();
-    iEntryIds.Close();
-    
-    delete iApUtils;
-    delete iApDataHandler;
-    delete iCommsDb;
-
-    if (iParameters)
-        delete iParameters;
-    }
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorAccessPoints::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorAccessPoints::AskDataFromUserL");
-    
-    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
-    
-    if( aCommand == ECmdDeleteIAPs )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Access Points?"), this, ECreatorModuleDelete );
-        }
-    else if( aCommand == ECmdDeleteCreatorIAPs )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Access Points created with Creator?"), this, ECreatorModuleDelete );
-        }
-
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
-    }
-
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorAccessPoints::CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorAccessPoints::CreateAccessPointEntryL");
-
-    CAccessPointsParameters* parameters = (CAccessPointsParameters*) aParameters;
-    
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    
-            
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        TBuf<160> company = iEngine->RandomString(CCreatorEngine::ECompany);
-        TInt num = iEngine->RandomNumber(1, 3);
-        TBuf<10> apType;
-        
-        if (num==1)
-            apType = _L("mms");
-        else if (num==2)
-            apType = _L("wap");
-        else
-            apType = _L("internet");
-        
-        iParameters = new(ELeave) CAccessPointsParameters;
-        parameters = iParameters;
-
-        parameters->SetRandomCMNameL(*iEngine);
-
-        // in random mode just create GPRS access points
-        parameters->iBearerType = EApBearerTypeGPRS;
-
-        parameters->SetRandomLoginNameL(*iEngine);
-
-        iParameters->iIspLoginPass->Des() = iEngine->RandomString(CCreatorEngine::ESurname);
-        iParameters->iIspLoginPass->Des().LowerCase();
-
-        iParameters->iSecureAuthentication = EFalse;
-        iParameters->iPromptPassword = EFalse;
-
-        iParameters->iProxyServerAddress->Des() = _L("127.0.0.1");
-        iParameters->iProxyPortNumber = 80;
-
-        iParameters->iWapStartPage->Des() = _L("http://");
-        iParameters->iWapStartPage->Des().Append(apType);
-        iParameters->iWapStartPage->Des().Append(_L("."));
-        iParameters->iWapStartPage->Des().Append(company);
-        iParameters->iWapStartPage->Des().Append(_L(".com"));
-        iParameters->iWapStartPage->Des().LowerCase();
-
-        iParameters->iIspIPAddr->Des() = KZeroIP;
-        iParameters->iIspIPNameServer1->Des() = KZeroIP;
-        iParameters->iIspIPNameServer1->Des() = KZeroIP;
-        iParameters->iGprsAcessPointName->Des() = apType;
-        iParameters->iIspDefaultTelNumber->Des() = iEngine->RandomString(CCreatorEngine::EPhoneNumber);
-        iParameters->iIspBearerCallTypeIsdn = ECallTypeISDNv110;
-        iParameters->iIspBearerSpeed = KSpeed14400;
-
-        iParameters->iWapWspOption = EWapWspOptionConnectionOriented;
-        iParameters->iWapGatewayAddress->Des() = KZeroIP;
-        }
-    else
-        {
-        // otherwise replace the parameters object
-        iParameters = parameters;
-        }
-
-    TInt err = KErrNone;
-
-    // access point item
-    CApAccessPointItem* apItem = CApAccessPointItem::NewLC();
-
-    // set the bearer type, if it fails try to set a default type
-    TRAPD(bearerErr, apItem->SetBearerTypeL(iParameters->iBearerType));
-    if (bearerErr != KErrNone)
-        {
-        iParameters->iBearerType = EApBearerTypeGPRS;
-        TRAPD(bearerErr2, apItem->SetBearerTypeL(iParameters->iBearerType));
-        bearerErr2=bearerErr2;
-        }
-
-    if (iParameters->iBearerType == EApBearerTypeGPRS) // GPRS
-        {
-        err = apItem->WriteLongTextL(EApGprsAccessPointName, iParameters->iGprsAcessPointName->Des());
-        }
-    else  // CSD or HCSD
-        {
-        err = apItem->WriteTextL(EApIspDefaultTelNumber, iParameters->iIspDefaultTelNumber->Des());
-        err = apItem->WriteUint(EApIspBearerCallTypeIsdn, iParameters->iIspBearerCallTypeIsdn);
-        err = apItem->WriteUint(EApIspBearerSpeed, iParameters->iIspBearerSpeed);
-        }
-
-    err = apItem->WriteTextL(EApIspLoginName, iParameters->iIspLoginName->Des());
-    err = apItem->WriteTextL(EApIspIfAuthName, iParameters->iIspLoginName->Des());
-    err = apItem->WriteTextL(EApIspLoginPass, iParameters->iIspLoginPass->Des());
-    err = apItem->WriteTextL(EApIspIfAuthPass, iParameters->iIspLoginPass->Des());
-    err = apItem->WriteTextL(EApGprsIfAuthPassword, iParameters->iIspLoginPass->Des());
-    err = apItem->WriteBool(EApIspDisablePlainTextAuth, iParameters->iSecureAuthentication);
-    err = apItem->WriteBool(EApIspPromptForLogin, iParameters->iPromptPassword);
-    err = apItem->WriteTextL(EApWapGatewayAddress, iParameters->iWapGatewayAddress->Des());
-    err = apItem->WriteLongTextL(EApProxyServerAddress, iParameters->iProxyServerAddress->Des());
-    err = apItem->WriteUint(EApProxyPortNumber, iParameters->iProxyPortNumber);
-    err = apItem->WriteLongTextL(EApWapStartPage, iParameters->iWapStartPage->Des());
-    err = apItem->WriteUint(EApWapWspOption, iParameters->iWapWspOption);
-    err = apItem->WriteTextL(EApGprsIPNameServer1, iParameters->iIspIPNameServer1->Des());
-    err = apItem->WriteTextL(EApGprsIPNameServer2, iParameters->iIspIPNameServer2->Des());
-    err = apItem->WriteTextL(EApIspIPAddr, iParameters->iIspIPAddr->Des());
-
-
-    TUint32 uid = iApDataHandler->CreateFromDataL(*apItem);  // save the access point, returns the uid of the AP
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    iEntryIds.AppendL( uid );
-        
-    TBuf<256> name = iParameters->iConnectionName->Des();
-    iApUtils->SetNameL(name, uid); // sets the AP name
-
-
-    // if no defaults set, set the created AP as a default
-
-    // MMS access point
-    if (iParameters->iWapStartPage->Des().FindF(_L("mms")) >=0  ||  iParameters->iConnectionName->Des().FindF(_L("mms")) >=0 )
-        {
-        //User::Panic(_L("Not done yet..."), 123);
-        }
-
-
-    // WAP access point
-    else if (iParameters->iConnectionName->Des().FindF(_L("wap")) >=0  ||  iParameters->iGprsAcessPointName->Des().FindF(_L("wap")) >= 0)
-        {
-        TUint32 defID = 0;
-        TRAP( err, defID = iApDataHandler->DefaultL(ETrue) );  // ETrue==WAP
-
-        if (defID <= 1)
-            TRAP( err, iApDataHandler->SetAsDefaultL(uid, EIspTypeWAPOnly) );
-
-        }
-
-    // Internet access point
-    else if (iParameters->iConnectionName->Des().FindF(_L("internet")) >=0  ||  iParameters->iGprsAcessPointName->Des().FindF(_L("internet")) >= 0)
-        {
-        TUint32 defID = 0;
-        TRAP( err, defID = iApDataHandler->DefaultL(EFalse) );  // EFalse==IAP
-
-        if (defID <= 1)
-            TRAP( err, iApDataHandler->SetAsDefaultL(uid, EIspTypeInternetOnly) );  //  <--  POSSIBLY NOT CORRECT, NEEDS MORE TESTING
-        }
-
-
-
-    CleanupStack::PopAndDestroy(); //apItem
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TUint32 CCreatorAccessPoints::AccessPointNameToIdL(const TDesC& aAPName, TBool /*aAnyIfNotFound*/ )
-    {
-    LOGSTRING("Creator: CCreatorEngine::AccessPointNameToIdL");
-
-    TBuf<256> apName = aAPName.Left(256);
-    apName.Trim();
-
-    TUint32 APId = iEngine->GetDefaultIAPL();
-
-    // return default IAP if requested
-    if (apName.CompareF(_L("DEFAULT-IAP")) == 0 || apName.CompareF(_L("DEFAULT")) == 0)
-        {
-        return APId;
-        }
-
-    CCommsDatabase* db = CCommsDatabase::NewL(EDatabaseTypeIAP);
-    CleanupStack::PushL(db);
-    CApUtils* apUtils = CApUtils::NewLC(*db);
-    CApSelect* apSelect = CApSelect::NewLC(*db, KEApIspTypeAll, EApBearerTypeAll, KEApSortNameAscending);
-
-
-    // loop through all access points and try to find a matching name
-    if (apSelect->MoveToFirst())
-        {
-        do
-            {
-            TBuf<256> apName2;
-            apUtils->NameL(apSelect->Uid(), apName2);
-            apName2.Trim();
-
-            if (apName2.CompareF( apName ) == 0)
-                {
-                // match found, get uid and break the loop
-                TRAPD( err, APId = apUtils->IapIdFromWapIdL(apSelect->Uid()) );
-                err=err;
-                break;
-                }
-            }
-        while (apSelect->MoveNext());
-        }
-
-    CleanupStack::PopAndDestroy(3);  //apSelect, apUtils, db
-
-    return APId;
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorAccessPoints::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
-    {
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorAccessPoints::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::DeleteAllL");
-    
-    CApSelect* selector = CApSelect::NewLC( *iCommsDb, 
-                                            KEApIspTypeAll,
-                                            EApBearerTypeAllBearers,
-                                            KEApSortUidAscending );
-    
-    CApListItemList* list = new (ELeave) CApListItemList();
-    CleanupStack::PushL( list );
-    TInt count = selector->AllListItemDataL( *list );
-    for ( TInt i = 0; i < count; i++ )
-        {
-        TRAP_IGNORE( iApDataHandler->RemoveAPL( (*list)[i]->Uid() ) );
-        }
-
-    CleanupStack::PopAndDestroy( list );
-    CleanupStack::PopAndDestroy( selector );
-
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Logs related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidIAP );
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorAccessPoints::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::DeleteAllCreatedByCreatorL");
-    iEntryIds.Reset();
-    
-    // fetch ids of entries created by Creator
-    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidIAP );
-    
-    // delete entries
-    for ( TInt i = 0; i < iEntryIds.Count(); i++ )
-        {
-        TRAP_IGNORE( iApDataHandler->RemoveAPL( iEntryIds[i] ) );
-        }
-    
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Logs related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidIAP );
-    }
--- a/creator/engine/src/creator_browser.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,595 +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 <FavouritesWapAp.h> 
-
-#include "engine.h"
-#include "enginewrapper.h"
-#include "creator_browser.h" 
-#include "creator_traces.h"
-
-
-static const TInt KBrowserFieldLength = 128;
-
-_LIT(KCreatorBrowserPrefixName, "CR_");
-_LIT(KCreatorBrowserPrefixFolderName, "CR_FLDR_");
-
-//----------------------------------------------------------------------------
-
-CBrowserParameters::CBrowserParameters()
-    {
-    LOGSTRING("Creator: CBrowserParameters::CBrowserParameters");
-
-    iBookmarkName = HBufC::New(KBrowserFieldLength);
-    iBookmarkAddress = HBufC::New(KBrowserFieldLength);
-    iBookmarkUsername = HBufC::New(KBrowserFieldLength);
-    iBookmarkPassword = HBufC::New(KBrowserFieldLength);    
-    iBookmarkFolderName = HBufC::New(KBrowserFieldLength);
-    iSavedDeckLinkName = HBufC::New(KBrowserFieldLength);
-    iSavedDeckLocalAddress = HBufC::New(KBrowserFieldLength);
-    iSavedDeckFolderName = HBufC::New(KBrowserFieldLength);
-    }
-
-CBrowserParameters::~CBrowserParameters()
-    {
-    LOGSTRING("Creator: CBrowserParameters::~CBrowserParameters");
-
-    delete iSavedDeckFolderName;
-    delete iSavedDeckLocalAddress;
-    delete iSavedDeckLinkName;
-    delete iBookmarkFolderName;
-    delete iBookmarkPassword;    
-    delete iBookmarkUsername;
-    delete iBookmarkAddress;
-    delete iBookmarkName;
-
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorBrowser* CCreatorBrowser::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorBrowser* self = CCreatorBrowser::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorBrowser* CCreatorBrowser::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorBrowser* self = new (ELeave) CCreatorBrowser;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorBrowser::CCreatorBrowser()
-    {
-    }
-
-void CCreatorBrowser::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorBrowser::ConstructL");
-
-    iEngine = aEngine;
-    }
-
-CCreatorBrowser::~CCreatorBrowser()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::~CCreatorBrowser");
-    if ( iEngine && iBmEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iBmEntryIds, KUidDictionaryUidBrowserBookmarks ) );
-        }
-    iBmEntryIds.Reset();
-    iBmEntryIds.Close();
-
-    if ( iEngine && iBmFEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iBmFEntryIds, KUidDictionaryUidBrowserBookmarkF ) );
-        }
-    iBmFEntryIds.Reset();
-    iBmFEntryIds.Close();
-
-    if ( iEngine && iSpEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iSpEntryIds, KUidDictionaryUidBrowserSavedPg ) );
-        }
-    iSpEntryIds.Reset();
-    iSpEntryIds.Close();
-
-    if ( iEngine && iSpFEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iSpFEntryIds, KUidDictionaryUidBrowserSavedPgF ) );
-        }
-    iSpFEntryIds.Reset();
-    iSpFEntryIds.Close();
-
-    delete iParameters;
-    }
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorBrowser::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorBrowser::AskDataFromUserL");
-
-    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
-    
-    TBool result( EFalse );
-    switch ( aCommand )
-        {
-        case ECmdDeleteBrowserBookmarks:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmarks?"), this, ECreatorModuleDelete );
-            break;
-            }
-        case ECmdDeleteCreatorBrowserBookmarks:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmarks created with Creator?"), this, ECreatorModuleDelete );
-            break;
-            }
-        case ECmdDeleteBrowserBookmarkFolders:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmark folders?"), this, ECreatorModuleDelete );
-            break;
-            }
-        case ECmdDeleteCreatorBrowserBookmarkFolders:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmark folders created with Creator?"), this, ECreatorModuleDelete );
-            break;
-            }
-        case ECmdDeleteBrowserSavedPages:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages?"), this, ECreatorModuleDelete );
-            break;
-            }
-        case ECmdDeleteCreatorBrowserSavedPages:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages created with Creator?"), this, ECreatorModuleDelete );
-            break;
-            }
-        case ECmdDeleteBrowserSavedPageFolders:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages folders?"), this, ECreatorModuleDelete );
-            break;
-            }
-        case ECmdDeleteCreatorBrowserSavedPageFolders:
-            {
-            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages folders created with Creator?"), this, ECreatorModuleDelete );
-            break;
-            }
-        default:
-            {
-            result = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
-            break;
-            }
-        }
-    return result;
-    }
-
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorBrowser::CreateBookmarkEntryL(CBrowserParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorBrowser::CreateBookmarkEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    CBrowserParameters* parameters = aParameters;
-        
-    // random data needed if no predefined data available
-    if( !parameters )
-        {
-        iParameters = new(ELeave) CBrowserParameters;
-        parameters = iParameters; 
-
-        TFileName userAndPassword = iEngine->RandomString(CCreatorEngine::EFirstName);
-        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
-        TFileName url = name;
-        url.Insert(0, _L("http://www."));
-        url.Append(_L(".com/"));
-        name.Insert(0, KCreatorBrowserPrefixName);
-
-        parameters->iBookmarkName->Des() = name;
-        parameters->iBookmarkAddress->Des() = url;
-        parameters->iBookmarkUsername->Des() = userAndPassword;
-        parameters->iBookmarkPassword->Des() = userAndPassword;
-        }
-   
-    TInt err = KErrNone;
-
-    RFavouritesSession session;
-    User::LeaveIfError( session.Connect() );
-    CleanupClosePushL<RFavouritesSession>(session);
-    RFavouritesDb db;
-    User::LeaveIfError( db.Open(session, KBrowserBookmarks) );
-    CleanupClosePushL<RFavouritesDb>(db);
-
-    CFavouritesItem* item = CFavouritesItem::NewLC();
-    item->SetType( CFavouritesItem::EItem );
-    item->SetParentFolder( KFavouritesRootUid ) ;
-    item->SetNameL( parameters->iBookmarkName->Des() );
-    item->SetUrlL( parameters->iBookmarkAddress->Des() );
-    item->SetUserNameL( parameters->iBookmarkUsername->Des() );
-    item->SetPasswordL( parameters->iBookmarkPassword->Des() );
-    err = db.Add(*item, /*aAutoRename=*/ETrue);
-    if (err)
-        db.Commit();
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iBmEntryIds.AppendL( item->Uid() );
-    
-    CleanupStack::PopAndDestroy(3); //db, session, item
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorBrowser::CreateBookmarkFolderEntryL(CBrowserParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorBrowser::CreateBookmarkFolderEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    CBrowserParameters* parameters = aParameters;
-    
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CBrowserParameters;
-        parameters = iParameters;
-
-        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
-        name.Insert(0, KCreatorBrowserPrefixFolderName);
-
-        parameters->iBookmarkFolderName->Des() = name;
-        }
-    
-    TInt err = KErrNone;
-
-    RFavouritesSession session;
-    User::LeaveIfError( session.Connect() );
-    CleanupClosePushL<RFavouritesSession>(session);
-    RFavouritesDb db;
-    User::LeaveIfError( db.Open(session, KBrowserBookmarks) );
-    CleanupClosePushL<RFavouritesDb>(db);
-
-    CFavouritesItem* item = CFavouritesItem::NewLC();
-    item->SetType( CFavouritesItem::EFolder );
-    item->SetParentFolder( KFavouritesRootUid ) ;
-    item->SetNameL( parameters->iBookmarkFolderName->Des() );
-    
-    err = db.Add(*item, /*aAutoRename=*/ETrue);
-    if (err)
-        db.Commit();
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iBmFEntryIds.AppendL( item->Uid() );
-    
-    CleanupStack::PopAndDestroy(3); //db, session, item
-            
-
-    return err;
-    
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorBrowser::CreateSavedDeckEntryL(CBrowserParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorBrowser::CreateSavedDeckEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    CBrowserParameters* parameters = aParameters;
-    
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CBrowserParameters;
-        parameters = iParameters;
-
-        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
-        name.Insert(0, KCreatorBrowserPrefixName);
-
-        parameters->iSavedDeckLinkName->Des() = name;
-        parameters->iSavedDeckLocalAddress->Des() = iEngine->TestDataPathL(CCreatorEngine::ESavedDeck_1kB);
-        }
-   
-    TInt err = KErrNone;
-
-    // check the deck address is correct
-    if ( parameters->iSavedDeckLocalAddress->Des().Length() == 0 ||
-    		!BaflUtils::FileExists( CEikonEnv::Static()->FsSession(), parameters->iSavedDeckLocalAddress->Des() ))
-        {
-        // not found, use a default deck instead
-        delete parameters->iSavedDeckLocalAddress;
-        parameters->iSavedDeckLocalAddress = 0;
-        TPtrC tmp = iEngine->TestDataPathL(CCreatorEngine::ESavedDeck_1kB);
-        parameters->iSavedDeckLocalAddress = HBufC::NewL(tmp.Length());
-        parameters->iSavedDeckLocalAddress->Des() = tmp;
-        }
-
-
-    RFavouritesSession session;
-    User::LeaveIfError( session.Connect() );
-    CleanupClosePushL<RFavouritesSession>(session);
-    RFavouritesDb db;
-    User::LeaveIfError( db.Open(session, KBrowserSavedPages) );
-    CleanupClosePushL<RFavouritesDb>(db);
-
-    CFavouritesItem* item = CFavouritesItem::NewLC();
-    item->SetType( CFavouritesItem::EItem );
-    item->SetParentFolder( KFavouritesRootUid ) ;
-    item->SetNameL( parameters->iSavedDeckLinkName->Des() );
-    item->SetUrlL( _L(" ") );
-
-    TFavouritesWapAp favouritesAp;
-    favouritesAp.SetDefault();
-    item->SetWapAp( favouritesAp );
-
-    
-    err = db.Add(*item, /*aAutoRename=*/ETrue);
-    if (err)
-        db.Commit();
-    
-    // read the source deck to buffer
-    RFile sourceFile;
-    User::LeaveIfError( sourceFile.Open(CEikonEnv::Static()->FsSession(), parameters->iSavedDeckLocalAddress->Des(), EFileRead) );
-    CleanupClosePushL<RFile>(sourceFile);
-    TInt sourceFileSize(0);
-    err = sourceFile.Size(sourceFileSize);
-    HBufC8* sourceBuf = HBufC8::NewLC(sourceFileSize);
-    TPtr8 sourcePtr = sourceBuf->Des();
-    sourceFile.Read(sourcePtr);
-    
-    // write the deck
-    RFavouritesFile destinationFile;
-    User::LeaveIfError( destinationFile.Replace(db, item->Uid() ));
-    CleanupClosePushL<RFavouritesFile>(destinationFile);
-    err = destinationFile.Write(sourceBuf->Des());
-
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iSpEntryIds.AppendL( item->Uid() );
-
- 
-    CleanupStack::PopAndDestroy(6); //db, session, item, sourceFile, destinationFile, sourceBuf    
-    
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorBrowser::CreateSavedDeckFolderEntryL(CBrowserParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorBrowser::CreateSavedDeckFolderEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-            
-    CBrowserParameters* parameters = aParameters;
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CBrowserParameters;
-        parameters = iParameters;
-        
-        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
-        name.Insert(0, KCreatorBrowserPrefixFolderName);
-
-        parameters->iSavedDeckFolderName->Des() = name;
-        }
-   
-    TInt err = KErrNone;
-
-    RFavouritesSession session;
-    User::LeaveIfError( session.Connect() );
-    CleanupClosePushL<RFavouritesSession>(session);
-    RFavouritesDb db;
-    User::LeaveIfError( db.Open(session, KBrowserSavedPages) );
-    CleanupClosePushL<RFavouritesDb>(db);
-
-    CFavouritesItem* item = CFavouritesItem::NewLC();
-    item->SetType( CFavouritesItem::EFolder );
-    item->SetParentFolder( KFavouritesRootUid ) ;
-    item->SetNameL( parameters->iSavedDeckFolderName->Des() );
-    
-    err = db.Add(*item, /*aAutoRename=*/ETrue);
-    if (err)
-        db.Commit();
-
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iSpFEntryIds.AppendL( item->Uid() );
-
-    CleanupStack::PopAndDestroy(3); //db, session, item
-                
-    return err;
-    
-    }
-
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllL");
-    User::Leave( KErrNotSupported );
-    // will not be supported, see separate implementations below
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllCreatedByCreatorL");
-    User::Leave( KErrNotSupported );
-    // will not be supported, see separate implementations below
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllBookmarksL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarksL");
-    DeleteAllItemsL( KBrowserBookmarks,
-                     CFavouritesItem::EItem,
-                     EFalse,
-                     iBmEntryIds, // ignored, because deleting all
-                     KUidDictionaryUidBrowserBookmarks );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllBookmarksCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarksCreatedByCreatorL");
-    DeleteAllItemsL( KBrowserBookmarks,
-                     CFavouritesItem::EItem,
-                     ETrue,
-                     iBmEntryIds,
-                     KUidDictionaryUidBrowserBookmarks );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllBookmarkFoldersL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarkFoldersL");
-    DeleteAllItemsL( KBrowserBookmarks,
-                     CFavouritesItem::EFolder,
-                     EFalse,
-                     iBmFEntryIds, // ignored, because deleting all
-                     KUidDictionaryUidBrowserBookmarkF );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllBookmarkFoldersCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarkFoldersCreatedByCreatorL");
-    DeleteAllItemsL( KBrowserBookmarks,
-                     CFavouritesItem::EFolder,
-                     ETrue,
-                     iBmFEntryIds,
-                     KUidDictionaryUidBrowserBookmarkF );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllSavedPagesL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPagesL");
-    DeleteAllItemsL( KBrowserSavedPages,
-                     CFavouritesItem::EItem,
-                     EFalse,
-                     iSpEntryIds, // ignored, because deleting all
-                     KUidDictionaryUidBrowserSavedPg );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllSavedPagesCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPagesCreatedByCreatorL");
-    DeleteAllItemsL( KBrowserSavedPages,
-                     CFavouritesItem::EItem,
-                     ETrue,
-                     iSpEntryIds,
-                     KUidDictionaryUidBrowserSavedPg );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllSavedPageFoldersL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPageFoldersL");
-    DeleteAllItemsL( KBrowserSavedPages,
-                     CFavouritesItem::EFolder,
-                     EFalse,
-                     iSpFEntryIds, // ignored, because deleting all
-                     KUidDictionaryUidBrowserSavedPgF );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllSavedPageFoldersCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPageFolderssCreatedByCreatorL");
-    DeleteAllItemsL( KBrowserSavedPages,
-                     CFavouritesItem::EFolder,
-                     ETrue,
-                     iSpFEntryIds,
-                     KUidDictionaryUidBrowserSavedPgF );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorBrowser::DeleteAllItemsL( const TDesC& aDbName, 
-                                       CFavouritesItem::TType aTypeFilter,
-                                       TBool aOnlyCreatedWithCreator,
-                                       RArray<TInt>& aEntryIds,
-                                       const TUid aDictUid )
-    {
-    LOGSTRING("Creator: CCreatorBrowser::DeleteItemL");
-    RFavouritesSession session;
-    User::LeaveIfError( session.Connect() );
-    CleanupClosePushL( session );
-    RFavouritesDb db;
-    User::LeaveIfError( db.Open( session, aDbName ) );
-    CleanupClosePushL( db );
-       
-    if ( aOnlyCreatedWithCreator )
-        {
-        // read uids from Creator internal store
-        aEntryIds.Reset();
-        iEngine->ReadEntryIdsFromStoreL( aEntryIds, aDictUid );
-        
-        // delete entries from db
-        for ( TInt i = 0; i < aEntryIds.Count(); i++ )
-            {
-            db.Delete( aEntryIds[i] );
-            }
-        }
-    else
-        {
-        CArrayFixFlat<TInt>* uids = new (ELeave) CArrayFixFlat<TInt>(64);
-        CleanupStack::PushL( uids );
-        
-        // read uids from browser db
-        User::LeaveIfError( db.GetUids( *uids, KFavouritesRootUid, aTypeFilter ) );
-
-        // delete entries from db
-        for ( TInt i = 0; i < uids->Count(); i++ )
-            {
-            db.Delete( uids->At(i) );
-            }
-        
-        // db.Commit() seems to panic with EFavouritesNoTransaction
-        // deletion is successful even without commit, so not calling it
-        CleanupStack::PopAndDestroy( uids );
-        }
-       
-    // entries deleted, remove the Browser related registry
-    aEntryIds.Reset();
-    iEngine->RemoveStoreL( aDictUid );
-
-    CleanupStack::PopAndDestroy( &db );
-    CleanupStack::PopAndDestroy( &session );
-    }
--- a/creator/engine/src/creator_browserelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +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 "creator_browserelement.h"
-#include "creator_traces.h"
-#include "creator_browser.h"
-
-using namespace creatorbrowser;
-
-/*
- * 
- */
-CCreatorBrowserElement* CCreatorBrowserElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorBrowserElement* self = new (ELeave) CCreatorBrowserElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorBrowserElement::CCreatorBrowserElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
-
-
-/*
- * 
- */
-void CCreatorBrowserElement::ExecuteCommandL()
-    {
-    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
-    TInt entryAmount = 1;
-    TBool addAll = EFalse;
-    if( amountAttr )
-        {
-        entryAmount = ConvertStrToIntL(amountAttr->Value());
-        }
-    // Get 'fields' element 
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    if( fieldsElement )
-        {
-        // Get sub-elements
-        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();
-        // Create browser entries, the amount of entries is defined by entryAmount:
-        for( TInt cI = 0; cI < entryAmount; ++cI )
-            {
-            CBrowserParameters* param = 0;
-            
-            if( fields.Count() > 0 )
-            	param = new (ELeave) CBrowserParameters;
-            else
-            	{
-            	// No fields defined --> Add all fields with random values:
-            	addAll = ETrue;
-            	break;
-            	}
-            
-            CleanupStack::PushL(param);
-            
-            for( TInt i = 0; i < fields.Count(); ++i )
-                {
-                CCreatorScriptElement* field = fields[i];
-                TPtrC elemName = field->Name();                
-                TPtrC elemContent = field->Content();
-                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
-                if( elemName == KName )
-                    {
-                    if( randomAttr || elemContent.Length() == 0)
-                        {
-                        elemContent.Set(iEngine->RandomString(CCreatorEngine::ECompany));
-                        }
-                    if( iName->Des() == KBookmark )
-                        {
-                        SetContentToTextParamL(param->iBookmarkName, elemContent);                        
-                        }
-                    else if( iName->Des() == KBookmarkFolder )
-                        {
-                        SetContentToTextParamL(param->iBookmarkFolderName, elemContent);
-                        }
-                    else if( iName->Des() == KSavedPage )
-                        {
-                        SetContentToTextParamL(param->iSavedDeckLinkName, elemContent);
-                        }
-                    else if( iName->Des() == KSavedPageFolder )
-                        {
-                        SetContentToTextParamL(param->iSavedDeckFolderName, elemContent);
-                        }
-                    }
-                
-                else if( elemName == KPath )
-                    {                    
-                    if( randomAttr || elemContent.Length() == 0)
-                        {
-                        SetContentToTextParamL(param->iSavedDeckLocalAddress, iEngine->TestDataPathL(CCreatorEngine::ESavedDeck_1kB));
-                        }
-                    else
-                        {
-                        SetContentToTextParamL(param->iSavedDeckLocalAddress, elemContent);
-                        }
-                    }
-                else if( elemName == KUsername )
-                    {
-                    if( randomAttr || elemContent.Length() == 0)
-                        {
-                        // Set username and password to same string
-                        if( param->iBookmarkPassword && param->iBookmarkPassword->Length() > 0 )
-                            {
-                            SetContentToTextParamL(param->iBookmarkUsername, param->iBookmarkPassword->Des());
-                            }
-                        else
-                            {
-                            SetContentToTextParamL(param->iBookmarkUsername, iEngine->RandomString(CCreatorEngine::EFirstName));
-                            }
-                        }
-                    else
-                        {
-                        SetContentToTextParamL(param->iBookmarkUsername, elemContent);
-                        }
-                    }
-                else if( elemName == KPassword )
-                    {
-                    if( randomAttr || elemContent.Length() == 0)
-                        {
-                        // Set username and password to same string
-                        if( param->iBookmarkUsername && param->iBookmarkUsername->Length() > 0 )
-                            {
-                            SetContentToTextParamL(param->iBookmarkPassword, param->iBookmarkUsername->Des());
-                            }
-                        else
-                            {
-                            SetContentToTextParamL(param->iBookmarkPassword, iEngine->RandomString(CCreatorEngine::EFirstName));                                                    
-                            }
-                        }
-                    else
-                        {
-                        SetContentToTextParamL(param->iBookmarkPassword, elemContent);
-                        }
-                    }
-                else if( elemName == KUrl )
-                    {
-                    if( randomAttr || elemContent.Length() == 0)
-                        {
-                        TDesC* tmpUrl = iEngine->CreateHTTPUrlLC();
-                        if( tmpUrl )
-                            {
-                            SetContentToTextParamL(param->iBookmarkAddress, *tmpUrl );
-                            }
-                        CleanupStack::PopAndDestroy(); // tmpUrl                        
-                        }
-                    else
-                        {
-                        SetContentToTextParamL(param->iBookmarkAddress, elemContent);
-                        }
-                    }
-                }
-            iEngine->AppendToCommandArrayL(GetBrowserCommandL(), param);
-            CleanupStack::Pop(); // param
-            }
-        }
-    else
-    	{
-    	addAll = ETrue;
-    	}
-    
-    if( addAll )
-    	{
-    	iEngine->AppendToCommandArrayL(GetBrowserCommandL(), 0, entryAmount);
-    	}
-    }
-
-TInt CCreatorBrowserElement::GetBrowserCommandL() const
-    {
-    if( iName->Des() == KBookmark )
-        {
-        return ECmdCreateBrowserBookmarkEntries;
-        }
-    else if( iName->Des() == KBookmarkFolder )
-        {
-        return ECmdCreateBrowserBookmarkFolderEntries;
-        }
-    else if( iName->Des() == KSavedPage )
-        {
-        return ECmdCreateBrowserSavedPageEntries;
-        }
-    else if( iName->Des() == KSavedPageFolder )
-        {
-        return ECmdCreateBrowserSavedPageFolderEntries;
-        }
-    
-    LOGSTRING("CCreatorFileElement::GetBrowserCommandL: Unknown browser entry");
-    User::Leave(KErrGeneral);
-    return 0; // Not reached, but disables compiler warning...
-    }
--- a/creator/engine/src/creator_calendar.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1373 +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 "engine.h"
-#include "enginewrapper.h"
-
-#include "creator_calendar.h" 
-#include "creator_traces.h"
-#include "creator_scriptentry.h"
-#include <e32base.h>
-#include <e32math.h>
-#include <calrrule.h> 
-#include <calalarm.h>
-#include "creator_contactsetcache.h"
-#include "creator_phonebook.h"
-
-static const TInt KCalendarFieldLength = 128;
-
-
-CCreatorCalenderAttendee::CCreatorCalenderAttendee() 
-    {}
-
-CCreatorCalenderAttendee::~CCreatorCalenderAttendee()
-    {
-    delete iCommonName;
-    delete iEmailAddress;
-    }
-
-CCreatorCalenderAttendee* CCreatorCalenderAttendee::NewL()
-    {
-    CCreatorCalenderAttendee* self = new (ELeave) CCreatorCalenderAttendee;
-    return self;
-    }
-
-void CCreatorCalenderAttendee::SetCommonNameL(const TDesC& aName)
-    {
-    delete iCommonName;
-    iCommonName = 0;
-    iCommonName = HBufC::NewL(aName.Length());
-    iCommonName->Des().Copy(aName);
-    }
-
-void CCreatorCalenderAttendee::SetEmailAddressL(const TDesC& aEmail)
-    {
-    delete iEmailAddress;
-    iEmailAddress = 0;
-    iEmailAddress = HBufC::NewL(aEmail.Length());
-    iEmailAddress->Des().Copy(aEmail);
-    }
-
-void CCreatorCalenderAttendee::SetRole(CCalAttendee::TCalRole aRole)
-    {
-    iRole = aRole;
-    }
-
-void CCreatorCalenderAttendee::SetStatus(CCalAttendee::TCalStatus aStatus)
-    {
-    iStatus = aStatus;
-    }
-
-const TDesC& CCreatorCalenderAttendee::CommonName() const
-    {
-    if( iCommonName == 0 )
-    	return iDummy;
-    return *iCommonName;
-    }
-
-const TDesC& CCreatorCalenderAttendee::EmailAddress() const
-    {
-    if( iEmailAddress == 0 )
-    	return iDummy;
-    
-    return *iEmailAddress;
-    }
-
-CCalAttendee::TCalRole CCreatorCalenderAttendee::Role() const
-    {
-    return iRole;
-    }
-
-CCalAttendee::TCalStatus CCreatorCalenderAttendee::Status() const
-    {
-    return iStatus;
-    }
-
-TBool CCalenderInterimParameters::IsAllowedEntryStatus(CCalEntry::TType aType, CCalEntry::TStatus aStatus)
-    {
-    if( aType == CCalEntry::ETodo )
-        {
-        return  aStatus == CCalEntry::ECancelled ||
-                aStatus == CCalEntry::ETodoNeedsAction ||
-                aStatus == CCalEntry::ETodoCompleted ||
-                aStatus == CCalEntry::ETodoInProcess;
-        }
-    
-    return  aStatus == CCalEntry::ETentative ||
-            aStatus == CCalEntry::EConfirmed ||
-            aStatus == CCalEntry::ECancelled;
-    }
-
-//----------------------------------------------------------------------------
-
-CCalenderInterimParameters::CCalenderInterimParameters ( )
-    {
-    LOGSTRING("Creator: CCalenderInterimParameters::CCalenderInterimParameters");
-
-    iAppointmentLocation = HBufC::New (KCalendarFieldLength );
-    iAppointmentReason = HBufC::New (KCalendarFieldLength );
-    iEventReason = HBufC::New (KCalendarFieldLength );
-    iAnniversaryReason = HBufC::New (KCalendarFieldLength );
-    iTodoTask = HBufC::New (KCalendarFieldLength );
-    iReminderReason = HBufC::New (KCalendarFieldLength );
-    iDescription = HBufC::New (KCalendarFieldLength );
-    iSummary = HBufC::New (KCalendarFieldLength );
-    iLocation = HBufC::New (KCalendarFieldLength );
-    iOrganizerName = HBufC::New (KCalendarFieldLength );
-    iOrganizerEmail = HBufC::New (KCalendarFieldLength );
-
-    // set defaults, start date today and end date = today + 1 month
-    iRandomModeStartTime.HomeTime ( );
-    iRandomModeEndTime = iRandomModeStartTime;
-    iRandomModeEndTime += TTimeIntervalMonths (1 );
-    iAlarmTime = Time::NullTTime();
-    iUseRandomAlarmTime = EFalse;
-    iStatus = CCalEntry::ENullStatus;
-    }
-
-CCalenderInterimParameters::~CCalenderInterimParameters ( )
-    {
-    LOGSTRING("Creator: CCalenderInterimParameters::~CCalenderInterimParameters");
-
-    delete iTodoTask;
-    delete iAnniversaryReason;
-    delete iEventReason;
-    delete iAppointmentReason;
-    delete iAppointmentLocation;
-    delete iReminderReason;
-    delete iDescription;
-    delete iSummary;
-    delete iLocation;
-    delete iOrganizerName;
-    delete iOrganizerEmail;
-    iAttendees.ResetAndDestroy();
-    iAttendees.Close();
-    iAttendeeLinkIds.Reset();
-    iAttendeeLinkIds.Close();
-    }
-
-void CCalenderInterimParameters::ParseL (CCommandParser* parser,
-        TParseParams aCase )
-    {
-    LOGSTRING("Creator: CCalenderInterimParameters::ParseL");
-
-    HBufC* tempBuf= NULL;
-
-    switch (aCase )
-        {
-
-        case MCreatorModuleBaseParameters::ECalendarTodo:
-            {
-
-            parser->StrParserL (tempBuf, '|' );
-
-            CleanupStack::PushL (tempBuf );
-
-            this->iTodoDueTime = TTime (tempBuf->Des ( ) );
-
-            parser->StrParserL (this->iTodoTask, '|' );
-
-            parser->StrParserL (tempBuf, ';' );
-            this->iTodoPriority = 2;
-            if (tempBuf->Compare (_L("LOW") ) == 0 )
-                this->iTodoPriority = 3;
-            else
-                if (tempBuf->Compare (_L("HIGH") ) == 0 )
-                    this->iTodoPriority = 1;
-
-            CleanupStack::PopAndDestroy (tempBuf );
-
-            }
-            break;
-
-        case MCreatorModuleBaseParameters::ECalendarMemo:
-            {
-
-            parser->StrParserL (tempBuf, '|' );
-
-            this->iStartTime = TTime (tempBuf->Des ( ) );
-
-            parser->StrParserL (tempBuf, '|' );
-            this->iEndTime = TTime (tempBuf->Des ( ) );
-
-            parser->StrParserL (this->iDescription, ';' );
-
-            CleanupStack::PopAndDestroy (tempBuf );
-            }
-            break;
-
-        case MCreatorModuleBaseParameters::ECalendarMeeting:
-            {
-
-            parser->StrParserL (tempBuf, '|' );
-
-            CleanupStack::PushL (tempBuf );
-
-            this->iStartTime = TTime (tempBuf->Des ( ) );
-
-            parser->StrParserL (tempBuf, '|' );
-            this->iEndTime = TTime (tempBuf->Des ( ) );
-
-            parser->StrParserL (this->iLocation, '|' );
-            parser->StrParserL (this->iDescription, ';' );
-
-            CleanupStack::PopAndDestroy (tempBuf );
-            }
-            break;
-
-        case MCreatorModuleBaseParameters::ECalendarAnniv:
-            {
-
-            parser->StrParserL (tempBuf, '|' );
-
-            CleanupStack::PushL (tempBuf );
-
-            this->iStartTime = TTime (tempBuf->Des ( ) );
-
-            parser->StrParserL (this->iDescription, ';' );
-
-            CleanupStack::PopAndDestroy (tempBuf );
-
-            }
-            break;
-        default:
-            {
-            //implement 
-            }
-            break;
-        }
-    }
-//----------------------------------------------------------------------------
-
-CCreatorInterimCalendar* CCreatorInterimCalendar::NewL (CCreatorEngine* aEngine )
-    {
-    CCreatorInterimCalendar* self = CCreatorInterimCalendar::NewLC (aEngine );
-    CleanupStack::Pop (self );
-    return self;
-    }
-
-CCreatorInterimCalendar* CCreatorInterimCalendar::NewLC (CCreatorEngine* aEngine )
-    {
-    CCreatorInterimCalendar* self = new (ELeave) CCreatorInterimCalendar;
-    CleanupStack::PushL (self );
-    self->ConstructL (aEngine );
-    return self;
-    }
-
-CCreatorInterimCalendar::CCreatorInterimCalendar ( )
-    {
-    }
-
-void CCreatorInterimCalendar::ConstructL (CCreatorEngine* aEngine )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::ConstructL");
-
-    iEngine = aEngine;
-
-    // set defaults, start date today and end date = today + 1 month
-    iRandomModeStartTime.HomeTime ( );
-    iRandomModeEndTime = iRandomModeStartTime;
-    iRandomModeEndTime += TTimeIntervalMonths (1 );
-
-    iCalSession = CCalSession::NewL ( );
-    // Create and open a calendar file
-    const TDesC& fileName = iCalSession->DefaultFileNameL ( );//default filename is: "C:Calendar"
-    TRAPD(err, iCalSession->CreateCalFileL(fileName))
-    ;
-    // ignore KErrAlreadyExists leave code
-    if (err != KErrAlreadyExists )
-        {
-        User::LeaveIfError (err );
-        }
-    // Open the calendar file
-    iCalSession->OpenL (fileName );
-    iCalEntryView = CCalEntryView::NewL (*iCalSession, *this );
-    iNumberRepeatingEntries = 0;
-    iNumberOfAttendees = 0; //iEngine->RandomNumber(2, 15);
-    iSetAlarm = EFalse;
-    iWaiter = CAsyncWaiter::NewL();
-    }
-
-CCreatorInterimCalendar::~CCreatorInterimCalendar ( )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::~CCreatorInterimCalendar");
-
-    if ( iEngine && iEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidCalendar ) );
-        }
-        
-    iEntryIds.Reset();
-    iEntryIds.Close();
-        
-    if (iParameters )
-        {
-        delete iParameters;
-        }
-
-    if (iCalEntryView )
-        {
-        delete iCalEntryView;
-        }
-
-    if (iCalSession )
-        {
-        delete iCalSession;
-        }
-    delete iSoundFileArray;
-    delete iWaiter;
-    delete iTmpCN;
-    delete iTmpEmail;
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorInterimCalendar::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::QueryDialogClosedL");
-    
-    if( aPositiveAction == EFalse && aUserData != ECreatorCalendarAddDefaultAlarm )
-        {
-        iEngine->ShutDownEnginesL();
-        return;
-        }
-    
-    const TDesC* showText = &KSavingText;
-    TBool finished(EFalse);
-    TBool retval(ETrue);
-    switch(aUserData)
-        {
-        case ECreatorCalendarDelete:
-            iEntriesToBeCreated = 1;
-            showText = &KDeletingText;
-            finished = ETrue;
-            break;
-        case ECreatorCalendarStart:
-            if( iCommand == ECmdCreateCalendarEntryEvents || iCommand == ECmdCreateCalendarEntryAppointments )
-                {
-                _LIT(KRepeatingNum, "How many repeating (weekly) entries");
-                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberRepeatingEntries, KRepeatingNum, ETrue, this, ECreatorCalendarGetWeeklyEntries);
-                }
-            else
-                {
-                _LIT(KStartPeriodDate, "Start date of creation period");// \n dd/mm/yyyy
-                retval = iEngine->GetEngineWrapper()->TimeQueryDialog(&iRandomModeStartTime, KStartPeriodDate, this, ECreatorCalendarGetStartDate); // ask start date
-                }
-            break;
-        case ECreatorCalendarGetWeeklyEntries:
-            _LIT(KAttendeesNum, "How many attendees to create");
-            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfAttendees, KAttendeesNum, ETrue, this, ECreatorCalendarGetAttendies);
-            break;
-        case ECreatorCalendarGetAttendies:
-            {
-            // ask start date
-            _LIT(KStartPeriodDate, "Start date of creation period");
-            retval = iEngine->GetEngineWrapper()->TimeQueryDialog(&iRandomModeStartTime, KStartPeriodDate, this, ECreatorCalendarGetStartDate ); 
-            }
-            break;
-        case ECreatorCalendarGetStartDate:
-            {
-            _LIT(KEndPeriodDate, "End date of creation period\n dd/mm/yyyy");
-            iEngine->GetEngineWrapper()->TimeQueryDialog (&iRandomModeEndTime, KEndPeriodDate, this, ECreatorCalendarGetEndDate ); // ask end date
-            }
-            break;
-        case ECreatorCalendarGetEndDate:
-           if (iRandomModeStartTime > iRandomModeEndTime ) // check end date is ok
-                {
-                iEngine->GetEngineWrapper()->ShowNote(_L("End date must be after start date") );
-                retval = EFalse;
-                }
-            else 
-                {
-                retval = iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Add default alarm?"), this, ECreatorCalendarAddDefaultAlarm);
-                }
-           break;
-        case ECreatorCalendarAddDefaultAlarm:
-            iSetAlarm = aPositiveAction;
-            finished = ETrue;
-            break;
-        default:
-            //some error
-            retval = EFalse;
-            break;
-        }
-    if( retval == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        }
-    else if( finished )
-        {
-        // add this command to command array
-        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
-        // started exucuting commands
-        iEngine->ExecuteFirstCommandL( *showText );
-        }
-    }
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorInterimCalendar::AskDataFromUserL( TInt aCommand )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::AskDataFromUserL");
-    
-    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
-    
-    if( aCommand == ECmdDeleteCalendarEntries )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all calendar entries?"), this, ECreatorCalendarDelete );
-        }
-    if( aCommand == ECmdDeleteCreatorCalendarEntries )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all calendar entries created with Creator?"), this, ECreatorCalendarDelete ); 
-        }
-
-    // display queries
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorCalendarStart ); // ask number of entries to create
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorInterimCalendar::CreateAppointmentEntryL (
-        CCreatorModuleBaseParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::CreateAppointmentEntryL");
-        
-    delete iParameters;
-    iParameters = 0;
-    
-    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;   
-    
-    if( !parameters )
-        {
-        iParameters = new(ELeave) CCalenderInterimParameters;
-        parameters = iParameters;  
-        parameters->iRandomModeStartTime = iRandomModeStartTime;
-        parameters->iRandomModeEndTime = iRandomModeEndTime;    
-    
-        // difference between start and end times
-        TTimeIntervalMinutes differenceInMinutes;
-        parameters->iRandomModeEndTime.MinutesFrom (
-                parameters->iRandomModeStartTime, differenceInMinutes );
-
-        // start time (= something between the period start and end date)        
-        parameters->iStartTime = parameters->iRandomModeStartTime;
-        parameters->iStartTime
-                += TTimeIntervalMinutes (iEngine->RandomNumber (differenceInMinutes.Int ( ) ) );   
-        // set end time (= start time + some random time)    
-        parameters->iEndTime = parameters->iStartTime;    
-        parameters->iEndTime
-                += TTimeIntervalMinutes (iEngine->RandomNumber (5, 500 ) );
-        
-
-        // strings        
-        parameters->iLocation->Des ( )
-                = iEngine->RandomString (CCreatorEngine::EMeetingPlace );
-        parameters->iDescription->Des ( )
-                = iEngine->RandomString (CCreatorEngine::EMeetingReason );
-        
-        parameters->iSummary->Des()
-                        = parameters->iDescription->Des();
-        
-        parameters->iNumberRepeatingEntries = iNumberRepeatingEntries;
-        parameters->iNumberOfAttendees = iNumberOfAttendees;
-        }
-
-    TInt err = KErrNone;
-    HBufC8* guid = HBufC8::NewLC (255 );
-    TPtr8 uidP=guid->Des ( );
-    GenerateRandomId (uidP );
-    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EAppt, guid,
-            CCalEntry::EMethodAdd, 0 );
-    CleanupStack::PushL (entry );
-
-    //Using same text as description and summary	
-    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
-    entry->SetSummaryL (parameters->iSummary->Des ( ) );
-    entry->SetLocationL (parameters->iLocation->Des ( ) );
-
-    TCalTime startTime;
-    TCalTime endTime;
-    // Set the start and end times using time values local to the current system time zone
-    TInt month = (TInt) parameters->iStartTime.DateTime().Month();
-    TInt date = parameters->iStartTime.DateTime().Day();
-    startTime.SetTimeLocalL (parameters->iStartTime );
-    endTime.SetTimeLocalL (parameters->iEndTime );
-    entry->SetStartAndEndTimeL (startTime, endTime );       
-    
-    if( parameters->IsAllowedEntryStatus(CCalEntry::EAppt, parameters->iStatus))
-        {
-        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateAppointmentEntryL setting entry status: %d", parameters->iStatus);
-        entry->SetStatusL(parameters->iStatus);
-        }
-    
-    // Repeating times:
-    AddRepeatingRuleL(startTime, *entry, parameters);
-    SetOrganizerL(*entry, parameters);
-    
-    // Alarm:    
-    if( iSetAlarm || parameters->iUseRandomAlarmTime )
-        {        
-        SetRandomAlarmL(*entry);
-        }
-    else
-        {
-        SetAlarmL(*entry, parameters);
-        }
-        
-    // Add attendees:
-    AddAttendeesL(*entry, parameters);
-    
-    RPointerArray<CCalEntry> array;
-    CleanupClosePushL (array );
-    array.AppendL (entry );
-    
-    TInt success(0);
-    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
-    iCalEntryView->StoreL (array, success );
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    iEntryIds.AppendL( entry->LocalUidL() );
-    
-    //One item should be added at time
-    if (success != 1 )
-        {
-        err = 1;
-        }
-
-    CleanupStack::PopAndDestroy (&array );
-    CleanupStack::PopAndDestroy (entry );
-    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
-
-    return err;
-    }
-
-void CCreatorInterimCalendar::SetOrganizerL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters )
-    {    
-    HBufC* orgName = 0;
-    HBufC* orgEmail = 0;
-    _LIT(KSpace, " ");
-    
-    //
-    // Common name
-    //
-    if( parameters == 0 || 
-        parameters->iOrganizerName == 0 || 
-        parameters->iOrganizerName->Length() == 0 )
-        {     
-        // Random:
-        TPtrC firstname  = iEngine->RandomString(CCreatorEngine::EFirstName);
-        TPtrC lastname = iEngine->RandomString(CCreatorEngine::ESurname);
-        orgName = HBufC::NewL(firstname.Length() + lastname.Length() + 1 );
-        CleanupStack::PushL(orgName);
-        orgName->Des().Copy(firstname);
-        orgName->Des().Append(KSpace);
-        orgName->Des().Append(lastname);        
-        }
-    else
-        {
-        orgName = HBufC::NewL(parameters->iOrganizerName->Length());
-        CleanupStack::PushL(orgName);
-        orgName->Des().Copy(parameters->iOrganizerName->Des());
-        }
-    
-    //
-    // Email
-    //
-    if( parameters == 0 ||
-        parameters->iOrganizerEmail == 0 || 
-        parameters->iOrganizerEmail->Length() == 0 )
-        {        
-        // Random:
-        TDesC* tmp = iEngine->CreateEmailAddressLC();
-        orgEmail = HBufC::NewL(tmp->Length());
-        orgEmail->Des().Copy(*tmp);
-        CleanupStack::PopAndDestroy(); // tmp
-        CleanupStack::PushL(orgEmail);
-        }
-    else
-        {
-        orgEmail = HBufC::NewL(parameters->iOrganizerEmail->Length());
-        CleanupStack::PushL(orgEmail);
-        orgEmail->Des().Copy(parameters->iOrganizerEmail->Des());
-        }
-    
-    SetOrganizerL(aCalEntry, orgName->Des(), orgEmail->Des(), orgEmail->Des());
-    CleanupStack::PopAndDestroy(); // orgName
-    CleanupStack::PopAndDestroy(); // orgEmail
-    }
-
-void CCreatorInterimCalendar::AddRepeatingRuleL(const TCalTime& aStartTime, CCalEntry& aCalEntry, CCalenderInterimParameters* parameters )
-    {
-    RArray<TDay> days;
-    CleanupClosePushL(days);
-    
-    // Recurrence rule. Weekly event.
-    if( parameters->iNumberRepeatingEntries > 0 )
-        {
-        TCalRRule calRepeat(TCalRRule::EWeekly);   
-        calRepeat.SetDtStart(aStartTime);
-        calRepeat.SetCount(parameters->iNumberRepeatingEntries);        
-        calRepeat.SetInterval(1);
-        //days.AppendL((TDay) iEngine->RandomNumber((TInt)EMonday, (TInt) ESunday));
-        TDay tempDay(aStartTime.TimeLocalL().DayNoInWeek());
-        days.AppendL(tempDay);
-        calRepeat.SetByDay(days);        
-        aCalEntry.SetRRuleL(calRepeat);
-        }
-    else if(parameters->iRecurrentFrequency > TCalRRule::EInvalid)
-        {
-        TCalTime calTime;        
-        // Recurrent frequency
-        TCalRRule calRepeat(parameters->iRecurrentFrequency);
-        // Recurrent start        
-        calRepeat.SetDtStart(aStartTime);
-        if( parameters->iRecurrentFrequency == TCalRRule::EWeekly )
-        	{
-        	TDay tempDay(aStartTime.TimeLocalL().DayNoInWeek());
-        	days.AppendL(tempDay);        
-        	calRepeat.SetByDay(days);  
-        	}
-        else if( parameters->iRecurrentFrequency == TCalRRule::EMonthly )
-        	{
-        	RArray< TInt > daysInMonth;
-        	CleanupClosePushL(daysInMonth);
-        	daysInMonth.AppendL(aStartTime.TimeLocalL().DayNoInMonth());
-        	calRepeat.SetByMonthDay(daysInMonth);
-        	CleanupStack::PopAndDestroy(&daysInMonth);
-        	}
-        else if( parameters->iRecurrentFrequency == TCalRRule::EYearly)
-        	{
-        	RArray< TMonth > monthsInYear;
-        	CleanupClosePushL(monthsInYear);
-        	monthsInYear.AppendL(aStartTime.TimeLocalL().DateTime().Month());
-        	calRepeat.SetByMonth(monthsInYear);
-        	CleanupStack::PopAndDestroy(&monthsInYear);
-        	}
-        
-        // Recurrent interval
-        if( parameters->iRecurrentInterval > 0 )
-        	calRepeat.SetInterval(parameters->iRecurrentInterval);
-                
-        // Recurrent end. End can be given as a number of repeating entries or as an end date.
-        // End date must be later than the start date, otherwise CCalEntry::SetRRuleL() panics.
-        if( parameters->iRepeatingCount > 0 )
-            {
-            calRepeat.SetCount(parameters->iRepeatingCount);
-            aCalEntry.SetRRuleL(calRepeat);            
-            }
-        else
-            {
-            TCalTime endTime;
-            endTime.SetTimeLocalL(parameters->iRecurrentEndTime);
-            if( endTime.TimeLocalL() > aStartTime.TimeLocalL())
-            	{
-            	calRepeat.SetUntil(endTime);
-            	aCalEntry.SetRRuleL(calRepeat);
-            	}
-            }           
-        }
-    CleanupStack::PopAndDestroy(&days);
-    }
-
-void CCreatorInterimCalendar::SetAlarmL(CCalEntry& aCalEntry, CCalenderInterimParameters* params)
-    {
-    if( params->iAlarmTime != Time::NullTTime() )
-        {
-        CCalAlarm* alarm = CCalAlarm::NewL();
-        CleanupStack::PushL(alarm);
-        //if( params->iAlarmTime <= params->iStartTime )
-        //	{
-        	TTimeIntervalMinutes diff;
-        	TInt err = params->iStartTime.MinutesFrom(params->iAlarmTime, diff);
-        	if( err == KErrNone)
-        		{
-        		alarm->SetTimeOffset(diff);
-        		TRAP(err, aCalEntry.SetAlarmL(alarm));
-        		if( err != KErrNone && err !=  KErrNotSupported )
-        			{
-        			User::Leave(err);
-        			}        		
-        		}
-        //	}
-        CleanupStack::PopAndDestroy(alarm);
-        }
-    }
-
-void CCreatorInterimCalendar::SetRandomAlarmL(CCalEntry& aCalEntry)
-    {
-    CCalAlarm* alarm = CCalAlarm::NewL();
-    CleanupStack::PushL(alarm);
-    alarm->SetTimeOffset(TTimeIntervalMinutes(iEngine->RandomNumber(0, 60)));
-    
-    TRAPD(err, aCalEntry.SetAlarmL(alarm));
-    if( err != KErrNone && err !=  KErrNotSupported )
-    	{
-    	User::Leave(err);
-    	}
-    CleanupStack::PopAndDestroy(alarm);
-    }
-
-void CCreatorInterimCalendar::SetPhoneOwnerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy )
-    {
-    CCalUser* phOwner = CCalUser::NewL(aEmail, aSentBy);
-    CleanupStack::PushL(phOwner);
-    TRAPD(err, aCalEntry.SetPhoneOwnerL(phOwner));            
-    CleanupStack::Pop(phOwner);
-    if( err == KErrNone )
-        {
-        phOwner->SetCommonNameL(aCN);
-        }
-    else
-        {
-        delete phOwner;
-        }
-    }
-
-void CCreatorInterimCalendar::SetOrganizerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy)
-    {
-    CCalUser* organizer = CCalUser::NewL(aEmail, aSentBy);
-    CleanupStack::PushL(organizer);
-    TRAPD(err, aCalEntry.SetOrganizerL(organizer));
-    CleanupStack::Pop(organizer);
-    if( err == KErrNone )
-        {
-        organizer->SetCommonNameL(aCN);
-        }
-    else
-        {
-        delete organizer;
-        }
-    }
-
-void CCreatorInterimCalendar::AddAttendeesL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters )
-    {
-    if( !parameters )
-        return;
-            
-    // Random attendees:
-    TInt numOfAttendees = parameters->iNumberOfAttendees;
-    for( TInt i = 0; i < numOfAttendees; ++i )
-        {
-        TPtrC firstname  = iEngine->RandomString(CCreatorEngine::EFirstName);
-        TPtrC lastname   = iEngine->RandomString(CCreatorEngine::ESurname);
-        TPtrC company    = iEngine->RandomString(CCreatorEngine::ECompany);
-        _LIT(KCountry, "com");        
-        TDesC* emailAddr = iEngine->CreateEmailAddressLC(firstname, lastname, company, KCountry);        
-        CCalAttendee* attendee = CCalAttendee::NewL(*emailAddr);        
-        CleanupStack::PushL(attendee);
-        aCalEntry.AddAttendeeL(attendee);
-        CleanupStack::Pop(attendee);
-        attendee->SetCommonNameL(firstname);
-                
-        // Set phone owner:
-        if( i == 1 )
-            {             
-            SetPhoneOwnerL(aCalEntry, firstname, *emailAddr, *emailAddr); 
-            attendee->SetRoleL(CCalAttendee::EReqParticipant); 
-            }
-        // Set organizer:
-        else if ( i == 0 )
-            {            
-            // Organizer is the chairman of the meeting:
-            SetOrganizerL(aCalEntry, firstname, *emailAddr, *emailAddr);
-            attendee->SetRoleL(CCalAttendee::EChair);
-            }
-        else if( i % 3 == 0 )
-            {
-            // every third attendee is optional:
-            attendee->SetRoleL(CCalAttendee::EOptParticipant);
-            }
-        else
-            {
-            // Others are required attendees:
-            attendee->SetRoleL(CCalAttendee::EReqParticipant);            
-            }
-        
-        TInt attStatus = iEngine->RandomNumber(0,5);
-        attendee->SetStatusL((CCalAttendee::TCalStatus) attStatus);
-        
-        CleanupStack::PopAndDestroy(emailAddr);
-        }
-    
-    // Explicit attendees:
-    for( TInt i = 0; i < parameters->iAttendees.Count(); ++i )
-        {
-        CCreatorCalenderAttendee* attendeeInfo = parameters->iAttendees[i];
-        if( attendeeInfo && attendeeInfo->EmailAddress().Length() > 0)
-        	{
-        	CCalAttendee* attendee = CCalAttendee::NewL(attendeeInfo->EmailAddress());
-        	CleanupStack::PushL(attendee);
-        	if( attendeeInfo->CommonName().Length() > 0 )
-        		attendee->SetCommonNameL(attendeeInfo->CommonName());
-        	attendee->SetRoleL(attendeeInfo->Role());
-        	attendee->SetStatusL(attendeeInfo->Status());
-        	attendee->SetResponseRequested(ETrue);
-        	aCalEntry.AddAttendeeL(attendee);
-        	CleanupStack::Pop(); // attendee
-        	}
-        }
-    // linked attendees:
-     for( TInt i = 0; i < parameters->iAttendeeLinkIds.Count(); ++i )
-        {
-        CCreatorPhonebook* phonebook = dynamic_cast<CCreatorPhonebook*>(iEngine->GetPhonebook());
-        User::LeaveIfNull( phonebook );
-        CCreatorPhonebookWrapper* phonebookWrapper = phonebook->GetPhonebookWrapper();
-        
-        TLinkIdParam attendeeLinkId = parameters->iAttendeeLinkIds[i];
-        const CCreatorContactSet& set = ContactLinkCache::Instance()->ContactSet(attendeeLinkId.iLinkId);
-        const RArray<TUint32> links = set.ContactLinks();
-        TInt numberOfExplicitLinks = links.Count(); // Number of defined contacts in contact-set
-        for( TInt j = 0; j < numberOfExplicitLinks; ++j )
-            {
-            TBuf<128> email;
-            TBuf<128> name;
-            TBuf<128> phoneNumber;
-            phonebookWrapper->GetContactDetailsL( links[j], name, phoneNumber, email );
-            CCalAttendee* attendee = CCalAttendee::NewL( email );
-            CleanupStack::PushL(attendee);
-            if( name.Length() > 0 )
-                attendee->SetCommonNameL( name );
-            attendee->SetResponseRequested(ETrue);
-            aCalEntry.AddAttendeeL(attendee);
-            CleanupStack::Pop(); // attendee
-            }
-        }
-    }
-//----------------------------------------------------------------------------
-
-TInt CCreatorInterimCalendar::CreateEventEntryL (
-        CCreatorModuleBaseParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::CreateEventEntryL");
-
-    delete iParameters;
-    iParameters = 0;
-        
-    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;       
-    
-    // random data needed if no predefined data available
-    if (!parameters )
-        {
-        iParameters = new(ELeave) CCalenderInterimParameters;
-
-        iParameters->iRandomModeStartTime = iRandomModeStartTime;
-        iParameters->iRandomModeEndTime = iRandomModeEndTime;
-        iParameters->iNumberRepeatingEntries = iNumberRepeatingEntries;
-        iParameters->iNumberOfAttendees = iNumberOfAttendees;
-        
-        // difference between start and end times
-        TTimeIntervalMinutes differenceInMinutes;
-        iParameters->iRandomModeEndTime.MinutesFrom (
-                iParameters->iRandomModeStartTime, differenceInMinutes );
-
-        // start time (= something between the period start and end date)
-        iParameters->iStartTime = iParameters->iRandomModeStartTime;
-        iParameters->iStartTime
-                += TTimeIntervalMinutes (iEngine->RandomNumber (differenceInMinutes.Int ( ) ) );
-
-        // set end time (= start time + some random time)
-        iParameters->iEndTime = iParameters->iStartTime;
-        iParameters->iEndTime
-                += TTimeIntervalMinutes (iEngine->RandomNumber (5, 500 ) );        
-
-        // strings
-        iParameters->iDescription->Des()
-                = iEngine->RandomString (CCreatorEngine::EMemoText );
-        
-        iParameters->iSummary->Des() = iParameters->iDescription->Des();
-        
-        // Random event status:
-        iParameters->iStatus = 
-            (CCalEntry::TStatus) iEngine->RandomNumber(0, (TInt) CCalEntry::ECancelled);
-        
-        parameters = iParameters;
-        }
-
-    TInt err = KErrNone;
-    HBufC8* guid = HBufC8::NewLC (255 );
-    TPtr8 uidP=guid->Des ( );
-    GenerateRandomId (uidP );
-    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EEvent, guid,
-            CCalEntry::EMethodAdd, 0 );
-    CleanupStack::PushL (entry );
-    // iEntryUids->AppendL( *guid->Alloc() );
-    
-    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
-    entry->SetSummaryL (parameters->iSummary->Des ( ) );
-
-    TCalTime startTime;
-    TCalTime endTime;
-    // Set the start and end times using time values local to the current system time zone
-    startTime.SetTimeLocalL (parameters->iStartTime );
-    endTime.SetTimeLocalL (parameters->iEndTime );
-    entry->SetStartAndEndTimeL (startTime, endTime );
-
-    // Repeating times:
-    AddRepeatingRuleL(startTime, *entry, parameters);
-    
-    if( iSetAlarm || parameters->iUseRandomAlarmTime )
-        {        
-        SetRandomAlarmL(*entry);
-        }
-    else
-        {
-        SetAlarmL(*entry, parameters);
-        }
-    
-    // Add attendees:
-    AddAttendeesL(*entry, parameters);    
-    
-    if( parameters->IsAllowedEntryStatus(CCalEntry::EEvent, parameters->iStatus))
-        {
-        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateEventEntryL setting entry status: %d", parameters->iStatus);
-        entry->SetStatusL(parameters->iStatus);
-        }
-        
-    RPointerArray<CCalEntry> array;
-    CleanupClosePushL (array );
-    array.AppendL (entry );
-
-    TInt success(0);
-    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
-    iCalEntryView->StoreL (array, success );
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    iEntryIds.AppendL( entry->LocalUidL() );
-    
-    //One item should be added at time
-    if (success != 1 )
-        {
-        err = 1;
-        }
-
-    CleanupStack::PopAndDestroy (&array );
-    CleanupStack::PopAndDestroy (entry );
-    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
-    return err;
-
-    }
-
-//----------------------------------------------------------------------------
-
-
-TInt CCreatorInterimCalendar::CreateReminderEntryL (
-        CCreatorModuleBaseParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::CreateReminderEntryL");
-
-    delete iParameters;
-    iParameters = NULL;
-    
-    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;
-
-    // random data needed if no predefined data available
-    if (!parameters )
-        {
-        iParameters = new(ELeave) CCalenderInterimParameters;
-
-        iParameters->iRandomModeStartTime = iRandomModeStartTime;
-        iParameters->iRandomModeEndTime = iRandomModeEndTime;
-
-        // difference between start and end times
-        TTimeIntervalDays
-                differenceInDays = iParameters->iRandomModeEndTime.DaysFrom (iParameters->iRandomModeStartTime );
-
-        // due time (= something between the period start and end date)
-        iParameters->iStartTime = iParameters->iRandomModeStartTime;
-        iParameters->iStartTime
-                += TTimeIntervalDays (iEngine->RandomNumber (differenceInDays.Int ( ) ) );
-
-        // strings
-        iParameters->iDescription->Des()
-                = iEngine->RandomString (CCreatorEngine::EReminderText );
-        
-        iParameters->iSummary->Des() = iParameters->iDescription->Des();
-
-        parameters = iParameters;
-        }
-
-    TInt err = KErrNone;
-
-    HBufC8* guid = HBufC8::NewLC (255 );
-    TPtr8 uidP=guid->Des ( );
-    GenerateRandomId (uidP );
-
-    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EReminder, guid,
-            CCalEntry::EMethodAdd, 0 );
-    CleanupStack::PushL (entry );
-
-    //Using same text as description and summary    
-    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
-    entry->SetSummaryL (parameters->iSummary->Des ( ) );
-
-    TCalTime startTime;
-    TCalTime endTime;
-    // Set the start and end times using time values local to the current system time zone
-    startTime.SetTimeLocalL (parameters->iStartTime );
-    TTime nullTime = Time::NullTTime ( );
-    endTime.SetTimeLocalL (nullTime );
-    entry->SetStartAndEndTimeL (startTime, endTime );
-        
-    if( parameters->IsAllowedEntryStatus(CCalEntry::EReminder, parameters->iStatus))
-        {
-        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateReminderEntryL setting entry status: %d", parameters->iStatus);
-        entry->SetStatusL(parameters->iStatus);
-        }
-    
-    if( iSetAlarm || parameters->iUseRandomAlarmTime )
-        {        
-        SetRandomAlarmL(*entry);
-        }
-    else
-        {
-        SetAlarmL(*entry, parameters);
-        }
-
-    RPointerArray<CCalEntry> array;
-    CleanupClosePushL (array );
-    array.AppendL (entry );
-
-    TInt success(0);
-    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
-    iCalEntryView->StoreL (array, success );
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    iEntryIds.AppendL( entry->LocalUidL() );
-    
-    //One item should be added at time
-    if (success != 1 )
-        {
-        err = 1;
-        }
-
-    CleanupStack::PopAndDestroy (&array );
-    CleanupStack::PopAndDestroy (entry );
-    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorInterimCalendar::CreateAnniversaryEntryL (
-        CCreatorModuleBaseParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::CreateAnniversaryEntryL");
-
-    delete iParameters;
-    iParameters = NULL;
-    
-    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;
-
-    // random data needed if no predefined data available
-    if (!parameters )
-        {
-        iParameters = new(ELeave) CCalenderInterimParameters;
-
-        iParameters->iRandomModeStartTime = iRandomModeStartTime;
-        iParameters->iRandomModeEndTime = iRandomModeEndTime;
-
-        // difference between start and end times
-        TTimeIntervalDays differenceInDays = iParameters->iRandomModeEndTime.DaysFrom(iParameters->iRandomModeStartTime);  
-
-        // start time (= something between the period start and end date)
-        iParameters->iStartTime = iParameters->iRandomModeStartTime;
-        iParameters->iStartTime += TTimeIntervalDays( iEngine->RandomNumber(differenceInDays.Int()) );        
-        
-        // strings
-        iParameters->iDescription->Des().Copy (iEngine->RandomString (CCreatorEngine::EFirstName ) );
-        iParameters->iDescription->Des().Append ( _L("'s ") );
-        iParameters->iDescription->Des().Append (iEngine->RandomString (CCreatorEngine::EAnniversaryReason ) );
-        iParameters->iSummary->Des() = iParameters->iDescription->Des();
-        parameters = iParameters;
-        }
- 
-    TInt err = KErrNone;
-
-    HBufC8* guid = HBufC8::NewLC (255 );
-    TPtr8 uidP=guid->Des ( );
-    GenerateRandomId (uidP );
-
-    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EAnniv, guid,
-            CCalEntry::EMethodNone, 0 );
-    CleanupStack::PushL (entry );
-
-    //Using same text as description and summary	
-    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
-    entry->SetSummaryL (parameters->iSummary->Des ( ) );
-
-    TCalTime startTime;
-    TCalTime endTime;
-    TTime nullTime = Time::NullTTime ( );
-    endTime.SetTimeLocalL (nullTime );
-    
-    // Set the start time using time value local to the current system time zone
-    startTime.SetTimeLocalL (parameters->iStartTime );
-
-    entry->SetStartAndEndTimeL (startTime, endTime );
-
-    if( iSetAlarm || parameters->iUseRandomAlarmTime )
-        {        
-        SetRandomAlarmL(*entry);
-        }
-    else
-        {
-        SetAlarmL(*entry, parameters);
-        }
-    
-    //set repeating rule
-    TCalRRule yearlyRptRule(TCalRRule::EYearly);
-    yearlyRptRule.SetDtStart (startTime );
-    //Set repeating until forever, not setting it to stop
-    //yearlyRptRule.SetUntil(endTime);
-    entry->SetRRuleL (yearlyRptRule );
-
-    RPointerArray<CCalEntry> array;
-    CleanupClosePushL (array );
-    array.AppendL (entry );
-
-    TInt success(0);
-    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
-    iCalEntryView->StoreL (array, success );
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    iEntryIds.AppendL( entry->LocalUidL() );
-    
-    //One item should be added at time
-    if (success != 1 )
-        {
-        err = 1;
-        }
-
-    CleanupStack::PopAndDestroy (&array );
-    CleanupStack::PopAndDestroy (entry );
-    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorInterimCalendar::CreateTodoEntryL (
-        CCreatorModuleBaseParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::CreateTodoEntryL");
-
-    delete iParameters;
-    iParameters = NULL;
-    
-    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;
-
-    // random data needed if no predefined data available
-    if (!parameters )
-        {
-        iParameters = new(ELeave) CCalenderInterimParameters;
-
-        iParameters->iRandomModeStartTime = iRandomModeStartTime;
-        iParameters->iRandomModeEndTime = iRandomModeEndTime;
-
-        // difference between start and end times
-        TTimeIntervalDays
-                differenceInDays = iParameters->iRandomModeEndTime.DaysFrom (iParameters->iRandomModeStartTime );
-
-        // due time (= something between the period start and end date)
-        iParameters->iTodoDueTime = iParameters->iRandomModeStartTime;
-        iParameters->iTodoDueTime
-                += TTimeIntervalDays (iEngine->RandomNumber (differenceInDays.Int ( ) ) );
-
-        // strings
-        iParameters->iDescription->Des ( )
-                = iEngine->RandomString (CCreatorEngine::EToDoText );
-        
-        iParameters->iSummary->Des() = iParameters->iDescription->Des();
-
-        //priority
-        iParameters->iTodoPriority = iEngine->RandomNumber (1, 3 );
-        iParameters->iStatus = (CCalEntry::TStatus) iEngine->RandomNumber((TInt) CCalEntry::ETodoNeedsAction, (TInt) CCalEntry::ETodoInProcess);
-        parameters = iParameters;
-        
-        }
-
-    TInt err = KErrNone;
-
-    HBufC8* guid = HBufC8::NewLC (255 );
-    TPtr8 uidP=guid->Des ( );
-    GenerateRandomId (uidP );
-
-    CCalEntry* entry = CCalEntry::NewL (CCalEntry::ETodo, guid,
-            CCalEntry::EMethodAdd, 0 );
-    CleanupStack::PushL (entry );
-
-    //Using same text as description and summary	
-    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
-    entry->SetSummaryL (parameters->iSummary->Des ( ) );
-
-    entry->SetPriorityL (parameters->iTodoPriority );
-    
-    if( parameters->IsAllowedEntryStatus(CCalEntry::ETodo, parameters->iStatus))
-        {
-        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateTodoEntryL setting entry status: %d", parameters->iStatus);
-        entry->SetStatusL(parameters->iStatus);
-        }
-
-    TCalTime startTime;
-    TCalTime endTime;
-    // Set the start and end times using time values local to the current system time zone
-    startTime.SetTimeLocalL (parameters->iTodoDueTime );
-    endTime.SetTimeLocalL (parameters->iTodoDueTime );
-    entry->SetStartAndEndTimeL (startTime, endTime );
-
-    if( iSetAlarm || parameters->iUseRandomAlarmTime )
-        {        
-        SetRandomAlarmL(*entry);
-        }
-    else
-        {
-        SetAlarmL(*entry, parameters);
-        }
-    
-    RPointerArray<CCalEntry> array;
-    CleanupClosePushL (array );
-    array.AppendL (entry );
-
-    TInt success(0);
-    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
-    iCalEntryView->StoreL (array, success );
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    iEntryIds.AppendL( entry->LocalUidL() );
-    
-    //One item should be added at time
-    if (success != 1 )
-        {
-        err = 1;
-        }
-
-    CleanupStack::PopAndDestroy (&array );
-    CleanupStack::PopAndDestroy (entry );
-    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorInterimCalendar::Progress (TInt /*aPercentageCompleted*/)
-    {
-    //Not really needed but observer need to be implement
-    }
-
-void CCreatorInterimCalendar::Completed (TInt aError )
-    {
-    //Not really needed but observer need to be implement
-    LOGSTRING2("Creator: CCreatorInterimCalendar::Completed err=%d", aError);
-    }
-
-TBool CCreatorInterimCalendar::NotifyProgress ( )
-    {
-    //Not really needed but observer need to be implement
-    return NULL;
-    }
-
-//----------------------------------------------------------------------------
-
-
-void CCreatorInterimCalendar::GenerateRandomId (TDes8& aText )
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::GenerateRandomId");
-
-    aText.Zero ( );
-
-    TTime now;
-    now.UniversalTime ( );
-    TInt64 time = now.Int64 ( );
-
-    // The number of characters in the guid should be
-    // more than 8 (to ensure the guids are not too small)
-    // less than 255 (this is the maximum length of a guid)
-    // less than MaxLength of the descriptor passed in		
-    TInt numChar(0);
-    do
-        {
-        numChar = Math::Rand (time ) % (aText.MaxLength ( ) - 1);
-        }
-    while (numChar > 255|| numChar < 8 );
-
-    for (TInt i(0); i < numChar ; ++i )
-        {
-        TInt character = Math::Rand (time )%6;
-        character = Math::Rand (time ) % 26+ ((character == 2) ? 'A' : 'a');
-        aText.Append (character );
-        }
-
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorInterimCalendar::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::DeleteAllL");
-    TCalTime zeroTime;
-    zeroTime.SetTimeUtcL( TCalTime::MinTime() );
-    RArray<TUint32> allIds;
-    CleanupClosePushL( allIds );
-    iCalEntryView->GetIdsModifiedSinceDateL( zeroTime, allIds );
-    if ( allIds.Count() )
-        {
-        TInt successCount( KErrNotFound );
-        iCalEntryView->DeleteL( allIds, successCount );
-        if ( successCount != allIds.Count() )
-            {
-            User::Leave( KErrGeneral );
-            }        
-        }
-    CleanupStack::PopAndDestroy( &allIds );
-
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Calendar related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidCalendar );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorInterimCalendar::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorInterimCalendar::DeleteAllCreatedByCreatorL");
-    iEntryIds.Reset();
-    
-    // fetch ids of entries created by Creator
-    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidCalendar );
-    
-    // delete entries
-    TInt successCount(0); // ignore
-    TRAP_IGNORE( iCalEntryView->DeleteL( iEntryIds, successCount ) );
-
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Calendar related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidCalendar );
-    }
-
-//----------------------------------------------------------------------------
-
--- a/creator/engine/src/creator_calendarelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,596 +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 "creator_calendarelement.h"
-#include "creator_traces.h"
-#include "creator_calendar.h"
-
-using namespace creatorcalendar;
-
-CCreatorCalendarElement* CCreatorCalendarElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorCalendarElement* self = new (ELeave) CCreatorCalendarElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CCreatorCalendarElement::FillEntryParamsL(TEntryType aType, const RPointerArray<CCreatorScriptElement>& fields, CCalenderInterimParameters* parameters)
-    {
-    if( parameters == 0 )
-        return;
-    
-    TBool startResolved = EFalse;    
-    TBool endResolved = EFalse;
-    
-    for( TInt i = 0; i < fields.Count(); ++i )
-        {
-        TPtrC elemName = fields[i]->Name();
-        TPtrC elemContent = fields[i]->Content();
-        const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
-        
-        if( elemName == KSummary || elemName == KDescription )
-            {           
-            if( randomAttr || elemContent.Length() == 0 )
-                {      
-                TPtrC reason;
-                if( aType == EAppointment )
-                    {
-                    reason.Set(iEngine->RandomString (CCreatorEngine::EMeetingReason ));                    
-                    }
-                else if( aType == EEvent )
-                    {
-                    reason.Set(iEngine->RandomString(CCreatorEngine::EMemoText));                    
-                    }
-                else if( aType == EReminder )
-                    {
-                    reason.Set(iEngine->RandomString(CCreatorEngine::EReminderText));                    
-                    }
-                else if( aType == EAnniversary )
-                    {                   
-                    reason.Set(iEngine->RandomString(CCreatorEngine::EAnniversaryReason));                    
-                    }
-                else if( aType == ETodo )
-                    {
-                    reason.Set(iEngine->RandomString(CCreatorEngine::EToDoText));                    
-                    }
-                
-                if( elemName == KDescription )
-                    {
-                    delete parameters->iDescription;
-                    parameters->iDescription = 0;
-                    parameters->iDescription = HBufC::NewL(reason.Length());
-                    parameters->iDescription->Des().Copy(reason);
-                    }
-                else if(elemName == KSummary)
-                    {
-                    delete parameters->iSummary;
-                    parameters->iSummary = 0;
-                    parameters->iSummary = HBufC::NewL(reason.Length());
-                    parameters->iSummary->Des().Copy(reason);
-                    }
-                }
-            else if( elemName == KDescription )                
-                {                
-                delete parameters->iDescription;
-                parameters->iDescription = 0;
-                parameters->iDescription = HBufC::NewL(elemContent.Length());
-                parameters->iDescription->Des().Copy(elemContent);
-                }
-            else if( elemName == KSummary)
-                {
-                delete parameters->iSummary;
-                parameters->iSummary = 0;
-                parameters->iSummary = HBufC::NewL(elemContent.Length());
-                parameters->iSummary->Des().Copy(elemContent);
-                }
-            }
-        else if( elemName == KLocation )
-            {
-            delete parameters->iLocation;
-            parameters->iLocation = 0;
-            
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                TPtrC reason = iEngine->RandomString (CCreatorEngine::EMeetingPlace );
-                parameters->iLocation = HBufC::NewL(reason.Length());
-                parameters->iLocation->Des().Copy(reason);
-                }
-            else
-                {
-                parameters->iLocation = HBufC::NewL(elemContent.Length());
-                parameters->iLocation->Des().Copy(elemContent);
-                }
-            }
-        else if( elemName == KStarttime )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {                
-                // Random start time used. If end time is already resolved, let's use that one for the basis. 
-                if( endResolved )
-                    {                    
-                    parameters->iStartTime = iEngine->RandomTime(parameters->iEndTime, CCreatorEngine::EDatePast);                    
-                    }
-                else
-                    {
-                    // Past or future:
-                    CCreatorEngine::TRandomDateType pastOrfuture = 
-                    (CCreatorEngine::TRandomDateType) iEngine->RandomNumber((TInt) CCreatorEngine::EDatePast,
-                                                                            (TInt) CCreatorEngine::EDateFuture);
-                    
-                    parameters->iStartTime = 
-                        iEngine->RandomTime(iEngine->RandomDate(pastOrfuture), pastOrfuture);  
-                    }
-                }
-            else
-                {
-                parameters->iStartTime = ConvertToDateTimeL(elemContent);                
-                }            
-            startResolved = ETrue;
-            }
-        else if( elemName == KEndtime )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                // Random end time used. If start time is already resolved, let's use that one.                
-                if( startResolved )
-                    {                    
-                    parameters->iEndTime = iEngine->RandomTime(parameters->iStartTime, CCreatorEngine::EDateFuture);                    
-                    }
-                else
-                    {
-                    // Past or future:
-                    CCreatorEngine::TRandomDateType pastOrfuture = 
-                    (CCreatorEngine::TRandomDateType) iEngine->RandomNumber((TInt) CCreatorEngine::EDatePast,
-                            (TInt) CCreatorEngine::EDateFuture);
-                    
-                    parameters->iEndTime = 
-                    iEngine->RandomTime(iEngine->RandomDate(pastOrfuture), pastOrfuture);  
-                    }                          
-                }
-            else
-                {
-                parameters->iEndTime = ConvertToDateTimeL(elemContent);
-                }
-            if( aType == ETodo )
-                {
-                parameters->iTodoDueTime = parameters->iEndTime;
-                }
-            endResolved = ETrue;
-            }
-        else if( elemName == KRecurrentFreq )
-            {
-            TInt randomFreq = 0;
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                randomFreq = iEngine->RandomNumber(1, 4);
-                }
-            if(randomFreq == 1 || CompareIgnoreCase(elemContent, KDaily) == 0 )
-                parameters->iRecurrentFrequency = TCalRRule::EDaily;
-            else if( randomFreq == 2 || CompareIgnoreCase(elemContent, KWeekly) == 0 )
-                parameters->iRecurrentFrequency = TCalRRule::EWeekly;
-            else if( randomFreq == 3 || CompareIgnoreCase(elemContent, KMonthly) == 0 )
-                parameters->iRecurrentFrequency = TCalRRule::EMonthly;
-            else if( randomFreq == 4 || CompareIgnoreCase(elemContent, KYearly) == 0 )
-                parameters->iRecurrentFrequency = TCalRRule::EYearly;
-            else
-                parameters->iRecurrentFrequency = TCalRRule::EInvalid;            
-            }
-        else if( elemName == KRecurrentInterval )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                parameters->iRecurrentInterval = iEngine->RandomNumber(1,7);
-                }
-            else
-                {
-                parameters->iRecurrentInterval = ConvertStrToIntL(elemContent);
-                }
-            }
-        else if( elemName == KRecurrentFrom )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                if( startResolved )
-                    {
-                    // Let's use the start time if it's resolved.
-                    parameters->iRecurrentStartTime = parameters->iStartTime;
-                    }
-                else
-                    {
-                    parameters->iRecurrentStartTime = iEngine->RandomDate(CCreatorEngine::EDateFuture);
-                    }
-                }
-            else
-                {
-                parameters->iRecurrentStartTime = ConvertToDateTimeL(elemContent);
-                }           
-            }
-        else if( elemName == KRecurrentTo )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                parameters->iRepeatingCount = iEngine->RandomNumber(1, 6);
-                //parameters->iRecurrentEndTime = iEngine->RandomDate(CCreatorEngine::EDateFuture);                
-                }
-            else
-                {
-                parameters->iRecurrentEndTime = ConvertToDateTimeL(elemContent);
-                }           
-            }
-        else if( elemName == KRepeatingCount )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                parameters->iRepeatingCount = iEngine->RandomNumber(1, 52);
-                }
-            else
-                {
-                parameters->iRepeatingCount = ConvertStrToIntL(elemContent);
-                }
-            }
-        else if( elemName == KAlarmtime )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {                
-                parameters->iUseRandomAlarmTime = ETrue;
-                }
-            else
-                {
-                parameters->iAlarmTime = ConvertToDateTimeL(elemContent);
-                }
-            }
-        else if( elemName == KOrganizername )
-            {
-            delete parameters->iOrganizerName;
-            parameters->iOrganizerName = 0;
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                TPtrC name = iEngine->RandomString (CCreatorEngine::EFirstName );
-                parameters->iOrganizerName = HBufC::NewL(name.Length());
-                parameters->iOrganizerName->Des().Copy(name);
-                }
-            else
-                {            
-                parameters->iOrganizerName = HBufC::NewL(elemContent.Length());
-                parameters->iOrganizerName->Des().Copy(elemContent);
-                }
-            }
-        else if( elemName == KOrganizeremail )
-            {
-            delete parameters->iOrganizerEmail;
-            parameters->iOrganizerEmail = 0;
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                TDesC* email = iEngine->CreateEmailAddressLC();
-                parameters->iOrganizerEmail = (HBufC*) email;
-                CleanupStack::Pop(); // email
-                }
-            else
-                {
-                parameters->iOrganizerEmail = HBufC::NewL(elemContent.Length());
-                parameters->iOrganizerEmail->Des().Copy(elemContent);
-                }
-            }
-        else if( elemName == KStatus )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                if( aType == ETodo )
-                	{
-                	parameters->iStatus = (CCalEntry::TStatus) iEngine->RandomNumber(CCalEntry::ETodoNeedsAction, CCalEntry::ETodoInProcess);
-                	}
-                else
-                	{
-                	parameters->iStatus = (CCalEntry::TStatus) iEngine->RandomNumber(CCalEntry::ETentative, CCalEntry::ECancelled);
-                	}
-                }
-            else if( CompareIgnoreCase(elemContent, KCalStatusTentative) == 0 )
-                {
-                parameters->iStatus = CCalEntry::ETentative;
-                }
-            else if( CompareIgnoreCase(elemContent, KCalStatusConfirmed) == 0 )
-                {
-                parameters->iStatus = CCalEntry::EConfirmed;
-                }
-            else if( CompareIgnoreCase(elemContent, KCalStatusCancelled) == 0 )
-                {
-                parameters->iStatus = CCalEntry::ECancelled;
-                }
-            else if( CompareIgnoreCase(elemContent, KCalStatusNeedsAction) == 0 )
-                {
-                parameters->iStatus = CCalEntry::ETodoNeedsAction;
-                }
-            else if( CompareIgnoreCase(elemContent, KCalStatusCompleted) == 0 )
-                {
-                parameters->iStatus = CCalEntry::ETodoCompleted;
-                }
-            else if( CompareIgnoreCase(elemContent, KCalStatusInProcess) == 0 )
-                {
-                parameters->iStatus = CCalEntry::ETodoInProcess;
-                }
-            else
-                {
-                parameters->iStatus = CCalEntry::ENullStatus;
-                }
-            }
-        else if( elemName == KPriority )
-            {
-            if( randomAttr || elemContent.Length() == 0 )
-                {
-                parameters->iTodoPriority = iEngine->RandomNumber(1,3);
-                }            
-            else if( CompareIgnoreCase(elemContent, KPriorityHigh) == 0)
-                {
-                parameters->iTodoPriority = 1;
-                }
-            else if( CompareIgnoreCase(elemContent, KPriorityMedium) == 0)
-                {
-                parameters->iTodoPriority = 2;
-                }
-            else if( CompareIgnoreCase(elemContent, KPriorityLow) == 0 )
-                {
-                parameters->iTodoPriority = 3;
-                }
-            else
-                {
-                parameters->iTodoPriority = ConvertStrToIntL(elemContent);
-                }
-            }
-        else if( elemName == KAttendees )
-            {            
-            const RPointerArray<CCreatorScriptElement>& attendeesSubElems = fields[i]->SubElements();
-            for( TInt j = 0; j < attendeesSubElems.Count(); ++j )
-                {
-                TPtrC eName = attendeesSubElems[j]->Name();
-                TPtrC eContent = attendeesSubElems[j]->Content();
-                if( eName == KContactSetRef )
-                    {
-                    AppendContactSetReferenceL(*attendeesSubElems[j], parameters->iAttendeeLinkIds);
-                    }
-                else if( eName == KAttendee )
-                    {
-                    CCreatorCalenderAttendee* calAtt = CCreatorCalenderAttendee::NewL();
-                    CleanupStack::PushL(calAtt);
-                    const RPointerArray<CCreatorScriptElement>& attendeeFields = attendeesSubElems[j]->SubElements();
-                    // Make sure that at least email is given:
-                    if(attendeeFields.Count() == 0 )
-                    	{
-                    	CCreatorScriptElement* emailField =  CCreatorScriptElement::NewL(iEngine, KEmail );
-                    	CleanupStack::PushL(emailField);
-                    	fields[i]->SubElements().AppendL(emailField);
-                    	CleanupStack::Pop(); // emailField	
-                    	}
-                    for( TInt k = 0; k < attendeeFields.Count(); ++k )
-                        {
-                        const CCreatorScriptAttribute* randomAttr = attendeeFields[k]->FindAttributeByName(KRandomLength);
-                        TPtrC attElemName = attendeeFields[k]->Name();
-                        TPtrC attElemCont = attendeeFields[k]->Content();
-                        if( attElemName == KCommonname )
-                            {
-                            if( randomAttr || attElemCont.Length() == 0)
-                                {
-                                // Random data:
-                                calAtt->SetCommonNameL(iEngine->RandomString(CCreatorEngine::EFirstName));
-                                }
-                            else
-                                {
-                                calAtt->SetCommonNameL(attElemCont);
-                                }
-                            }
-                        else if( attElemName == KEmail )
-                            {
-                            if( randomAttr || attElemCont.Length() == 0)
-                                {
-                                // Random data:
-                                TDesC* email = iEngine->CreateEmailAddressLC();
-                                calAtt->SetEmailAddressL(*email);
-                                CleanupStack::PopAndDestroy(); // email
-                                }
-                            else
-                                {                                
-                                calAtt->SetEmailAddressL(attElemCont);
-                                }
-                            }
-                        else if( attElemName == KRole )
-                            {
-                            if( randomAttr || attElemCont.Length() == 0)
-                                {
-                                // Random role:
-                                CCalAttendee::TCalRole randomRole = 
-                                    (CCalAttendee::TCalRole) iEngine->RandomNumber(
-                                            (TInt) CCalAttendee::EReqParticipant, 
-                                            (TInt) CCalAttendee::EChair);
-                                calAtt->SetRole(randomRole);
-                                }                                
-                            else if( CompareIgnoreCase(attElemCont, KRoleRequired) == 0 )
-                                {
-                                calAtt->SetRole(CCalAttendee::EReqParticipant);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KRoleOptional) == 0 )
-                                {
-                                calAtt->SetRole(CCalAttendee::EOptParticipant);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KRoleNonPart) == 0 )
-                                {
-                                calAtt->SetRole(CCalAttendee::ENonParticipant);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KRoleChair) == 0 )
-                                {
-                                calAtt->SetRole(CCalAttendee::EChair);
-                                }
-                            }
-                        else if( attElemName == KStatus )
-                            {
-                            if( randomAttr || attElemCont.Length() == 0)
-                                {
-                                // Random role:
-                                CCalAttendee::TCalStatus randomStatus = 
-                                (CCalAttendee::TCalStatus) iEngine->RandomNumber(
-                                        (TInt) CCalAttendee::ENeedsAction, 
-                                        (TInt) CCalAttendee::EInProcess);
-                                calAtt->SetStatus(randomStatus);
-                                }                                
-                            else if( CompareIgnoreCase(attElemCont, KStatusNeedsAction) == 0 )
-                                {
-                                calAtt->SetStatus(CCalAttendee::ENeedsAction);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KStatusAccepted) == 0 )
-                                {
-                                calAtt->SetStatus(CCalAttendee::EAccepted);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KStatusTentative) == 0 )
-                                {
-                                calAtt->SetStatus(CCalAttendee::ETentative);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KStatusConfirmed) == 0 )
-                                {
-                                calAtt->SetStatus(CCalAttendee::EConfirmed);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KStatusDeclined) == 0 )
-                                {
-                                calAtt->SetStatus(CCalAttendee::EDeclined);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KStatusCompleted) == 0 )
-                                {
-                                calAtt->SetStatus(CCalAttendee::ECompleted);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KStatusDelegated) == 0 )
-                                {                                
-                                calAtt->SetStatus(CCalAttendee::EDelegated);
-                                }
-                            else if( CompareIgnoreCase(attElemCont, KStatusInProcess) == 0 )
-                                {                                
-                                calAtt->SetStatus(CCalAttendee::EInProcess);
-                                }
-                            }
-                        }
-                    parameters->iAttendees.AppendL(calAtt);
-                    CleanupStack::Pop(); // calAtt
-                    }
-                }
-            }
-        }    
-    }
-
-void CCreatorCalendarElement::ExecuteCommandL()
-	{
-	LOGSTRING("Creator: CCreatorCalendarElement::ExecuteCommandL");
-	// Amount of calendar entries:
-	const CCreatorScriptAttribute* calEntryAmountAttr = this->FindAttributeByName(KAmount);
-	const CCreatorScriptAttribute* calEntryTypeAttr = this->FindAttributeByName(KType);    
-	TInt entryAmount = 1;    
-	if( calEntryAmountAttr )
-		{
-		entryAmount = ConvertStrToIntL(calEntryAmountAttr->Value());
-		}
-	if( calEntryTypeAttr == 0 )
-		{
-		LOGSTRING("ERROR in CCreatorCalendarElement::ExecuteCommandL: Type attribute is missing.");
-		User::Leave(KErrGeneral); // type is required attribute
-		}
-
-	// Find fields element:
-	CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-	
-	for( TInt cI = 0; cI < entryAmount; ++cI )
-		{
-		CCalenderInterimParameters* param = new (ELeave) CCalenderInterimParameters;
-		CleanupStack::PushL(param);
-		if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeAppointment) == 0 )
-			{
-			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-				{
-				FillEntryParamsL(EAppointment, fieldsElement->SubElements(), param);
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAppointments, param);
-				}
-			else
-				{
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAppointments, 0, entryAmount);
-				CleanupStack::PopAndDestroy(param);
-				break; // We can step out from the for-loop, because the amount is given to engine.
-				}
-			}		
-		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeEvent ) == 0 )
-			{
-			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-				{
-				FillEntryParamsL(EEvent, fieldsElement->SubElements(), param);
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryEvents, param);
-				}
-			else
-				{
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryEvents, 0, entryAmount);
-				CleanupStack::PopAndDestroy(param);
-				break;  // We can step out from the for-loop, because the amount is given to engine.
-				}
-			}
-		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeReminder ) == 0 )
-			{
-			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-				{
-				FillEntryParamsL(EReminder, fieldsElement->SubElements(), param);
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryReminders, param);
-				}
-			else
-				{
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryReminders, 0, entryAmount);
-				CleanupStack::PopAndDestroy(param);
-				break;  // We can step out from the for-loop, because the amount is given to engine.
-				}
-			}
-		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeAnniversary ) == 0 )
-			{
-			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-				{
-				FillEntryParamsL(EAnniversary, fieldsElement->SubElements(), param);
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAnniversaries, param);
-				}
-			else
-				{
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAnniversaries, 0, entryAmount);
-				CleanupStack::PopAndDestroy(param);
-				break;  // We can step out from the for-loop, because the amount is given to engine.
-				}
-			}
-		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeTodo ) == 0 )
-			{
-			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-				{
-				FillEntryParamsL(ETodo, fieldsElement->SubElements(), param);
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryToDos, param);
-				}
-			else
-				{
-				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryToDos, 0, entryAmount);
-				CleanupStack::PopAndDestroy(param);
-				break;  // We can step out from the for-loop, because the amount is given to engine.
-				}
-			}
-		CleanupStack::Pop(); // param
-		}
-	}
-
-CCreatorCalendarElement::CCreatorCalendarElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
--- a/creator/engine/src/creator_cmdscriptrun.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +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 <eikenv.h>
-#include <coeaui.h>  
-#include <pathinfo.h> 
-#include "creator_cmdscriptrun.h"
-#include "engine.h"
-#include "enginewrapper.h"
-#include "creator.pan"
-
-
-// delay before script running and application exiting in seconds
-// when script is run from command line
-const TInt KCommandLineDelay = 3;
-
-//----------------------------------------------------------------------------
-
-CCreatorCmdScriptRun* CCreatorCmdScriptRun::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorCmdScriptRun* self = CCreatorCmdScriptRun::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorCmdScriptRun* CCreatorCmdScriptRun::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorCmdScriptRun* self = new (ELeave) CCreatorCmdScriptRun;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-
-// ConstructL 
-void CCreatorCmdScriptRun::ConstructL(CCreatorEngine* aEngine)
-    {
-    iEngine = aEngine;
- 
-	iMode = ETimerModeNone;
-	iTickCount = 0;
-    iTimer = CHeartbeat::NewL(0);
-    
-    // parse script name and random data file name from command line
-    iCommandLineScriptName = HBufC::NewL(User::CommandLineLength());
-    iCommandLineRandomDataFileName = HBufC::NewL(User::CommandLineLength());
-    HBufC* commandLine = HBufC::NewLC(User::CommandLineLength());
-    TPtr16 ptr = commandLine->Des();
-    User::CommandLine(ptr);
-    commandLine->Des().Trim();
-    
-    TInt pos = commandLine->Des().Find(_L(" "));
-    if (pos != KErrNotFound)
-    	{
-    	iCommandLineScriptName->Des().Copy(commandLine->Des().Left(pos));
-    	iCommandLineRandomDataFileName->Des().Copy(commandLine->Des().Mid(pos));
-    	iCommandLineRandomDataFileName->Des().Trim();
-    	}
-    else
-    	{
-    	iCommandLineScriptName->Des().Copy(commandLine->Des());
-    	iCommandLineRandomDataFileName->Des().Copy(KNullDesC);
-    	}
-
-    CleanupStack::PopAndDestroy(commandLine);
-    
-    if (iCommandLineScriptName->Des().Length() > 0)
-    	{
-    	iMode = ETimerModeStartScript;
-    	iTimer->Start(ETwelveOClock, this);
-    	}
-    }
-
-
- CCreatorCmdScriptRun::CCreatorCmdScriptRun()                              
-    {
-    // add any construction that cannot leave here
-    }
-
-
- CCreatorCmdScriptRun::~CCreatorCmdScriptRun()
-    {
-    delete iCommandLineRandomDataFileName;
-    delete iCommandLineScriptName;
-    
-    if (iTimer)
-    	{
-    	iTimer->Cancel();
-        delete iTimer;
-        iTimer = NULL;
-    	}
-    }
-
-void  CCreatorCmdScriptRun::RunScriptDone()
-	{
-	if (iMode == ETimerModeStartScript)
-		{
-		iMode = ETimerModeExitAppUi;
-		iTimer->Start(ETwelveOClock, this);
-		}
-	}
-
-void  CCreatorCmdScriptRun::Beat()
-	{
-	TRAP_IGNORE( TickL() );
-	}
-
-void  CCreatorCmdScriptRun::Synchronize()
-	{
-    TRAP_IGNORE( TickL() );
-	}
-
-void  CCreatorCmdScriptRun::TickL()
-	{
-	iTickCount++;
-	if (iTickCount > KCommandLineDelay)
-		{
-		iTimer->Cancel();
-		iTickCount = 0;
-		if (iMode == ETimerModeStartScript)
-			{
-        	iEngine->GetRandomDataFromFileL(*iCommandLineRandomDataFileName);
-			TInt status = iEngine->RunScriptL(*iCommandLineScriptName);
-			if (status != KErrNone)
-				{
-				TBuf<128> noteMsg;
-				if (status == KErrNotFound)
-					{
-					_LIT(KMessage1, "Error in opening script file.");
-					noteMsg.Copy(KMessage1);
-					}
-				else if (status == KErrCorrupt)
-					{
-					_LIT(KMessage2, "Error in parsing script file.");
-					noteMsg.Copy(KMessage2);
-					}
-				else if (status == KErrCompletion)
-					{
-					_LIT(KMessage3, "Script file does not contain any elements.");
-					noteMsg.Copy(KMessage3);
-					}
-				else
-					{
-					_LIT(KMessage4, "Unknown error in opening script file.");
-					noteMsg.Copy(KMessage4);
-					}
-				iEngine->GetEngineWrapper()->ShowNote(noteMsg);
-				RunScriptDone();
-				}
-			}
-		else if (iMode == ETimerModeExitAppUi)
-	    	{
-	    	iMode = ETimerModeNone;
-	    	iEngine->GetEngineWrapper()->CloseCreatorApp();
-	    	}
-		}
-	}
--- a/creator/engine/src/creator_connectionmethod.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,954 +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 "engine.h"
-#include "enginewrapper.h"
-#include "creator_connectionmethod.h" 
-#include "creator_traces.h"
-
-
-
-using namespace CMManager;
-//#define KUidLanBearerType  0x1020737A
-#include <cmpluginpacketdatadef.h>  
-#include <cmplugincsddef.h> 
-#include <cmpluginhscsddef.h> 
-#include <cmmanagerext.h>
-#include <cmdestinationext.h> 
-#include <cmpluginembdestinationdef.h>
-#include <cmpluginvpndef.h>
-#include <cmpluginlandef.h> 
-#include <cmdefconnvalues.h>
-#include <cmconnectionmethoddef.h>
-
-
-#include <wlanmgmtinterface.h>
-#include <wlanmgmtclient.h>
-#include <wlanmgmtclient.inl> 
-#include <wlanmgmtcommon.h> 
-#include <wlanscaninfo.h> 
-#include <wlanscaninfo.inl> 
-#include <wlanscaninfointerface.h>
-
-//#include <WEPSecuritySettingsUI.h>//For WEP setting
-//#include <dbcreatorcommon.h>
-
-static const TInt KConnectionSettingssFieldLength = 128;
-
-_LIT(KCreatorConnectionSettingssPrefixName, "CR_");
-
-//----------------------------------------------------------------------------
-
-CConnectionSettingsParameters::CConnectionSettingsParameters()
-    {
-    LOGSTRING("Creator: CConnectionSettingsParameters::CConnectionSettingsParameters");
-        
-    iConnectionName = HBufC::New(KConnectionSettingssFieldLength);
-    iStartPage = HBufC::New(KConnectionSettingssFieldLength);
-    iLoginName = HBufC::New(KConnectionSettingssFieldLength);
-    iLoginPass = HBufC::New(KConnectionSettingssFieldLength);
-    iIPAddr = HBufC::New(KConnectionSettingssFieldLength);
-    iIP4NameServer1 = HBufC::New(KConnectionSettingssFieldLength);
-    iIP4NameServer2 = HBufC::New(KConnectionSettingssFieldLength);
-    iDefaultTelNumber = HBufC::New(KConnectionSettingssFieldLength);
-    iProxyServerAddress = HBufC::New(KConnectionSettingssFieldLength);
-    iSubnetMask = HBufC::New(KConnectionSettingssFieldLength); 
-    iGatewayAddress = HBufC::New(KConnectionSettingssFieldLength);
-    iWLANName = HBufC::New(KConnectionSettingssFieldLength);
-    iWlanIpAddr = HBufC::New(KConnectionSettingssFieldLength);
-    iIP6NameServer1 = HBufC::New(KConnectionSettingssFieldLength);
-    iIP6NameServer2 = HBufC::New(KConnectionSettingssFieldLength);
-    }
-
-CConnectionSettingsParameters::~CConnectionSettingsParameters()
-    {
-    LOGSTRING("Creator: CConnectionSettingssParameters::~CConnectionSettingssParameters");
-
-    delete iProxyServerAddress;
-    delete iDefaultTelNumber;
-    delete iIP4NameServer2;
-    delete iIP4NameServer1;
-    delete iIPAddr;    
-    delete iLoginPass;
-    delete iLoginName;
-    delete iStartPage;
-    delete iConnectionName;
-    delete iSubnetMask;  
-    delete iGatewayAddress;
-    delete iWLANName;
-    delete iWlanIpAddr;
-    delete iIP6NameServer1;
-    delete iIP6NameServer2;    
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorConnectionSettings* CCreatorConnectionSettings::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorConnectionSettings* self = CCreatorConnectionSettings::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorConnectionSettings* CCreatorConnectionSettings::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorConnectionSettings* self = new (ELeave) CCreatorConnectionSettings;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorConnectionSettings::CCreatorConnectionSettings()
-    {
-    }
-
-void CCreatorConnectionSettings::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::ConstructL");
-
-    iEngine = aEngine;
-    
-    iCmManagerExt.CreateTablesAndOpenL();
-    }
-
-CCreatorConnectionSettings::~CCreatorConnectionSettings()
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::~CCreatorConnectionSettings");
-
-    if ( iEngine && iEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidIAP ) );
-        }
-    iEntryIds.Reset();
-    iEntryIds.Close();
-    
-    if (iParameters)
-        {
-        delete iParameters;
-        }
-    
-    iCmManagerExt.Close();
-    }
-    
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorConnectionSettings::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::AskDataFromUserL");
-    
-    CCreatorModuleBase::AskDataFromUserL( aCommand );
-    
-    if( aCommand == ECmdDeleteIAPs )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Connection Methods?"), this, ECreatorModuleDelete );
-        }
-    else if( aCommand == ECmdDeleteCreatorIAPs )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Connection Methods created with Creator?"), this, ECreatorModuleDelete );
-        }
-    else
-        {
-        return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
-        }
-    }
-
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorConnectionSettings::CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::CreateConnectionSettingsEntryL");
-
-    CConnectionSettingsParameters* parameters = (CConnectionSettingsParameters*) aParameters;
-    
-    // clear any existing parameter definations 
-    delete iParameters;
-    iParameters = NULL;
-            
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new (ELeave) CConnectionSettingsParameters();
-        parameters = iParameters;
-        SetRandomParametersL(*parameters);
-        }
-    
-    if( parameters->iBearerType == KRandomBearerType )
-    	{
-    	SetRandomBearerTypeL(*parameters);
-    	}
-    
-    TInt err = KErrNone;
-
-    // create unique name for each network destination
-    RCmDestinationExt dest;
-    TInt destinationError = KErrNone;
-    TInt count = 0;
-	TBuf<KConnectionSettingssFieldLength> name;
-	name.Copy(parameters->iConnectionName->Des());
-    do
-    	{
-    	TRAP(destinationError, dest = iCmManagerExt.CreateDestinationL(name));
-    	if (destinationError == KErrAlreadyExists)
-    		{
-    		name.Copy(parameters->iConnectionName->Des());
-    		count++;
-    		name.AppendFormat(_L(" (%d)"), count);
-    		}
-    	else if (destinationError != KErrNone)
-    		{
-    		User::Leave(destinationError);
-    		}
-    	}
-    while (destinationError == KErrAlreadyExists);
-    parameters->iConnectionName->Des().Copy(name);        
-
-    CleanupClosePushL(dest);
-    dest.UpdateL();
-    
-    RCmConnectionMethodExt conMethod = dest.CreateConnectionMethodL( parameters->iBearerType);//KUidPacketDataBearerType
-    CleanupClosePushL( conMethod );
-    
-    if(parameters->iBearerType == KUidWlanBearerType)
-        {
-        //IP net mask of interface
-        conMethod.SetStringAttributeL( EWlanIpNetMask, parameters->iSubnetMask->Des()  );
-
-        //IP address of EPOC.
-        conMethod.SetStringAttributeL( EWlanIpAddr, parameters->iWlanIpAddr->Des()  );
-        //
-        //following gateway ID:s is not workin, 
-        //logically ID would be EWlanIpGateway because EWlanIpNetMask
-        //is going to net mask, which is just before gateway in ui
-        //--->
-        conMethod.SetStringAttributeL( EWlanIpGateway, parameters->iGatewayAddress->Des()  );
-        //conMethod.SetStringAttributeL( EApIspIPGateway, parameters->iGatewayAddress->Des()  );
-        conMethod.SetStringAttributeL( ECmWapIPGatewayAddress, parameters->iGatewayAddress->Des()  );
-        conMethod.SetStringAttributeL( ECmIPGateway, parameters->iGatewayAddress->Des()  );
-        //<---
-        
-        //IP Address of primary and secondary name server (IP v4).
-        conMethod.SetStringAttributeL( EWlanIpNameServer1, parameters->iIP4NameServer1->Des()  );
-        conMethod.SetStringAttributeL( EWlanIpNameServer2, parameters->iIP4NameServer2->Des()  );
-        //The SSID of this WLAN connection.
-        conMethod.SetStringAttributeL( EWlanSSID, parameters->iWLANName->Des()  );
-
-        //IP6 address of primary and secondary name servers
-        conMethod.SetStringAttributeL( EWlanIp6NameServer1, parameters->iIP6NameServer1->Des()  );
-        conMethod.SetStringAttributeL( EWlanIp6NameServer2, parameters->iIP6NameServer2->Des()  );        
-
-        //
-        //Setting secure mode settings
-        //
-        
-        //Network status (default: EWlanSecModeOpen) // EWlanAuthenticationMode use instead?
-        conMethod.SetIntAttributeL( EWlanSecurityMode, parameters->iWLanSecMode );
-        //WLAN Network mode  
-        conMethod.SetIntAttributeL( EWlanConnectionMode, parameters->iWlanNetMode );
-        
-        
-        if(parameters->iWLanSecMode == EWlanSecModeOpen)
-            {}//Nothing to set when mode is open
-        else if(parameters->iWLanSecMode == EWlanSecModeWep)
-            {
-            //See WEPSecuritySettingsUI.h
-            
-            
-            ///CWEPSecuritySettings
-           // conMethod.SetIntAttributeL( EWlanSecurityMode, parameters->iWLanSecMode );
-            }
-        else if(parameters->iWLanSecMode == EWlanSecMode802_1x)
-            {
-            }
-        else if(parameters->iWLanSecMode == EWlanSecModeWpa)
-            {
-            }
-        else if(parameters->iWLanSecMode == EWlanSecModeWpa2)
-            {
-            }            
-        
-        //WLAN security setting 
-        //conMethod.SetStringAttributeL( EWlanAuthenticationMode, parameters->iIP6NameServer2->Des()  );
-        //Utilise this method
-        //conMethod.SetStringAttributeL( EWlanSecurityMode, parameters->iWLanSecMode  );
-        }
-    //Not known special attributes for packet data 
-    else if(parameters->iBearerType == KUidPacketDataBearerType)
-        {
-
-        //Access point name.
-        conMethod.SetStringAttributeL( EPacketDataAPName, parameters->iConnectionName->Des() );//crash
-        
-        //Authentication user name
-        conMethod.SetStringAttributeL( EPacketDataIFAuthName, parameters->iLoginName->Des()  );
-        ///TProtocolType a;
-        //EPdpTypeIPv4 or EPdpTypeIPv6
-        conMethod.SetIntAttributeL( EPacketDataPDPType, parameters->iProtocolType  );
-                
-        //IP6 address of primary and secondary name servers
-        conMethod.SetStringAttributeL( EPacketDataIPIP6NameServer1, parameters->iIP6NameServer1->Des()  );
-        conMethod.SetStringAttributeL( EPacketDataIPIP6NameServer2, parameters->iIP6NameServer2->Des()  );                
-        //IP address of primary name server
-        conMethod.SetStringAttributeL( EPacketDataIPNameServer1, parameters->iIP4NameServer1->Des()  );
-        //IP address of secondary name server
-        conMethod.SetStringAttributeL( EPacketDataIPNameServer2, parameters->iIP4NameServer2->Des()  );
-        
-        //Also existing but UI not showing them: EPacketDataHeaderCompression, EPacketDataDisablePlainTextAuth
-        //EPacketDataIFAuthPass, EDialIFAuthPass, EPacketDataIFPromptForAuth, EPacketDataIPAddr
-        }
-    else if(parameters->iBearerType == KUidCSDBearerType || parameters->iBearerType == KUidHSCSDBearerType)
-        {
-        //Authentication user name
-        conMethod.SetStringAttributeL( EDialIFAuthName, parameters->iLoginName->Des()  );
-        //Dial-up number
-        conMethod.SetStringAttributeL( EDialDefaultTelNum, parameters->iDefaultTelNumber->Des() );
-        //Call type
-        conMethod.SetIntAttributeL( EDialCallType , parameters->iBearerCallTypeIsdn );
-        //Maximum speed
-        conMethod.SetIntAttributeL( EDialMaxConnSpeed, parameters->iBearerSpeed );
-        //Prompt user for username and password? (Only for dial out)
-        conMethod.SetBoolAttributeL( EDialPromptForLogin, parameters->iPromptPassword );
-        //IP6 address of primary and secondary name servers
-        conMethod.SetStringAttributeL( EDialIP6NameServer1, parameters->iIP6NameServer1->Des()  );
-        conMethod.SetStringAttributeL( EDialIP6NameServer2, parameters->iIP6NameServer2->Des()  );         
-        //Disable plaintext authentication
-        conMethod.SetBoolAttributeL( EDialDisablePlainTextAuth, parameters->iDisableTextAuth );       
-        //IP address of primary name server
-        conMethod.SetStringAttributeL( EDialIPNameServer1, parameters->iIP4NameServer1->Des()  );
-        //IP address of secondary name server
-        conMethod.SetStringAttributeL( EDialIPNameServer2, parameters->iIP4NameServer2->Des()  );
-
-        //Also existing  EDialEnableIPHeaderComp; EDialIFPromptForAuth;EDialIPAddress parameters
-        
-        }
-    else if(parameters->iBearerType == KUidLanBearerType)
-        {
-
-        conMethod.SetStringAttributeL( ELanIpNetMask, parameters->iSubnetMask->Des() );
-        conMethod.SetStringAttributeL( ELanIpGateway, parameters->iGatewayAddress->Des());
-        conMethod.SetStringAttributeL( ELanIpAddr, parameters->iIPAddr->Des() );
-        conMethod.SetStringAttributeL( ELanIpNameServer1, parameters->iIP4NameServer1->Des() );
-        conMethod.SetStringAttributeL( ELanIpNameServer2, parameters->iIP4NameServer2->Des() );
-        conMethod.SetStringAttributeL( ELanIp6NameServer1,parameters->iIP6NameServer1->Des() );
-        conMethod.SetStringAttributeL( ELanIp6NameServer2,parameters->iIP6NameServer2->Des() );
-        
-        }
-    else //KUidEmbeddedDestination and KPluginVPNBearerTypeUid
-        {
-        //NOTE: NOT Tested, because no supporting Emulator for them
-        
-        //Authentication user name
-        conMethod.SetStringAttributeL( ECmIFAuthName, parameters->iLoginName->Des()  );
-        //IP6 address of primary and secondary name servers
-        conMethod.SetStringAttributeL( ECmIP6NameServer1, parameters->iIP6NameServer1->Des()  );
-        conMethod.SetStringAttributeL( ECmIP6NameServer2, parameters->iIP6NameServer2->Des()  );        
-        //Disable plaintext authentication
-        conMethod.SetBoolAttributeL( ECmDisablePlainTextAuth, parameters->iDisableTextAuth );
-        //Prompt user for authentication
-        conMethod.SetBoolAttributeL( ECmIFPromptForAuth, parameters->iPromptPassword );
-        //Authentication password
-        conMethod.SetStringAttributeL( ECmIFAuthPass, parameters->iLoginPass->Des()  );
-        }
-    
-    //
-    //Adding common attributes, all not neccessary used with all bearer types, but should not cause any problems eather
-    //
-
-    //CM Name (Connection Method, formelly known as Access Point)         
-    conMethod.SetStringAttributeL( ECmName, parameters->iConnectionName->Des() );        
-    // Start page of CM
-    conMethod.SetStringAttributeL( ECmStartPage, parameters->iStartPage->Des() );
-    // Enable Proxy   
-    conMethod.SetBoolAttributeL( ECmProxyUsageEnabled, parameters->iUseProxy );
-    // Server Name
-    conMethod.SetStringAttributeL( ECmProxyServerName, parameters->iProxyServerAddress->Des() );
-    // Port Number
-    conMethod.SetIntAttributeL( ECmProxyPortNumber, parameters->iProxyPortNumber );
-    //Proxy login name
-    conMethod.SetStringAttributeL( ECmWapIPProxyLoginName, parameters->iLoginName->Des() );
-    //Proxy login password
-    conMethod.SetStringAttributeL( ECmWapIPProxyLoginPass, parameters->iLoginPass->Des() );
-    //IP address of gateway
-    conMethod.SetStringAttributeL( ECmIPGateway, parameters->iGatewayAddress->Des() );
-    //connection-oriented or connectionless API should be used
-    //ECmWapIPWSPOption option TWapWSPOption: ECmWapWspOptionConnectionless or ECmWapWspOptionConnectionOriented    
-    conMethod.SetIntAttributeL( ECmWapIPWSPOption, parameters->iWapWspOption );   
-    //NOT WORKING????? Attempt secure WTLS connection to the gateway
-    conMethod.SetBoolAttributeL( ECmWapIPSecurity, parameters->iSecureAuthentication );
-      
-    //
-    //Adding advanced settings (Network type, Phone IP addr, DNS addr, proxy srv name, proxy port nbr
-    //
-    
-    //IP address of interface
-    conMethod.SetStringAttributeL( ECmIPAddress, parameters->iIPAddr->Des() );    
-    //IP address of primary name server
-    conMethod.SetStringAttributeL( ECmIPNameServer1, parameters->iIP4NameServer1->Des()  );
-    //IP address of secondary name server
-    conMethod.SetStringAttributeL( ECmIPNameServer2, parameters->iIP4NameServer2->Des()  );
-      
-    
-    conMethod.UpdateL();
-
-    //If no defaults set, set the created CM as a default
-    SetDefaultCML( conMethod );
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iEntryIds.AppendL( dest.Id() );
-    
-    conMethod.Close();
-    CleanupStack::Pop(  );//conMethod
-    
-    dest.UpdateL();
-    dest.Close();
-    CleanupStack::Pop(); // dest
-        
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-void CConnectionSettingsParameters::SetRandomCMNameL(CCreatorEngine& aEngine)
-    {
-    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomCMNameL");
-
-    TInt num = aEngine.RandomNumber(1, 3);
-    TBuf<10> apType;
-
-    if (num==1)
-        {
-        apType = _L("mms");
-        }            
-    else if (num==2)
-        {
-        apType = _L("wap");
-        }
-    else
-        {
-        apType = _L("internet");
-        }
-    TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);
-    iConnectionName->Des() = KCreatorConnectionSettingssPrefixName;
-    iConnectionName->Des().Append( company );
-    iConnectionName->Des().Append(_L(" "));
-    iConnectionName->Des().Append(apType);
-    }
-
-void CConnectionSettingsParameters::SetRandomWLANNameL(CCreatorEngine& aEngine)
-    {
-    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomWLANNameL");
-
-    TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);
-    iWLANName->Des() = KCreatorConnectionSettingssPrefixName;
-    iWLANName->Des().Append( company );
-    iWLANName->Des().Append( _L(" WLAN") );
-    }
-
-void CConnectionSettingsParameters::SetRandomWLANNetModeL(CCreatorEngine& aEngine)
-    {
-    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomWLANNetModeL");
-
-    TInt wlanNetModeRand = aEngine.RandomNumber(1, 2);
-    if(wlanNetModeRand == 1)
-        {
-        iWlanNetMode = EAdhoc;//Ad-Hoc mode
-        }
-    else
-        {
-        iWlanNetMode = CMManager::EInfra;//Infrastructure mode
-        } 
-    }
-
-void CConnectionSettingsParameters::SetRandomWLANSecurityModeL(CCreatorEngine& aEngine)
-    {
-    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomWLANSecurityModeL");
-
-    TInt wlanSecModeRand = aEngine.RandomNumber(1, 5);
-    if(wlanSecModeRand == 1)
-        {
-        iWLanSecMode = EWlanSecModeOpen;///< Open security mode
-        }
-    else if(wlanSecModeRand == 2)
-        {
-        iWLanSecMode = EWlanSecModeWep;///< WEP security mode
-        //See WEPSecuritySettingsUI.h
-                
-        ///CWEPSecuritySettings
-                
-        //WEP key in us
-        
-        //Authentication type
-                
-        //WEP Key settings (key len, key format, key data)        
-        }
-    else if(wlanSecModeRand == 3)
-        {
-        iWLanSecMode = EWlanSecMode802_1x; ///< 802.1x security mode
-        }
-    else if(wlanSecModeRand == 4)
-        {
-        iWLanSecMode = EWlanSecModeWpa;///< WPA security mode
-        }
-    else if(wlanSecModeRand == 5)
-        {
-        iWLanSecMode = EWlanSecModeWpa2;///< WPA@ security mode
-        }
-    }
-
-void CConnectionSettingsParameters::SetRandomLoginNameL(CCreatorEngine& aEngine)
-    {
-    iLoginName->Des() = aEngine.RandomString(CCreatorEngine::EFirstName);
-    iLoginName->Des().LowerCase();
-    }
-
-void CConnectionSettingsParameters::SetRandomLoginPassL(CCreatorEngine& aEngine)
-    {
-    iLoginPass->Des() = aEngine.RandomString(CCreatorEngine::ESurname);
-    iLoginPass->Des().LowerCase();
-    }
-
-void CConnectionSettingsParameters::SetRandomSecureAuthenticationL(CCreatorEngine& /*aEngine*/)
-    {
-    iSecureAuthentication = EFalse;
-    }
-
-void CConnectionSettingsParameters::SetRandomPromptPasswordL(CCreatorEngine& /*aEngine*/)
-    {
-    iPromptPassword = ETrue;
-    }
-
-void CConnectionSettingsParameters::SetRandomUseProxyL(CCreatorEngine& /*aEngine*/)
-    {
-    iUseProxy = ETrue;
-    }
-
-void CConnectionSettingsParameters::SetRandomProxyAddressL(CCreatorEngine& /*aEngine*/)
-    {
-    iProxyServerAddress->Des() = _L("127.0.0.1");
-    }
-
-void CConnectionSettingsParameters::SetRandomProxyPortL(CCreatorEngine& /*aEngine*/)
-    {
-    iProxyPortNumber = 80;
-    }
-
-void CConnectionSettingsParameters::SetRandomStartPageL(CCreatorEngine& aEngine)
-    {
-    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomStartPageL");
-
-    TInt num = aEngine.RandomNumber(1, 3);
-    TBuf<10> apType;
-
-    if (num==1)
-        {
-        apType = _L("mms");
-        }            
-    else if (num==2)
-        {
-        apType = _L("wap");
-        }
-    else
-        {
-        apType = _L("internet");
-        }
-    TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);    
-    iStartPage->Des() = _L("http://");
-    iStartPage->Des().Append(apType);
-    iStartPage->Des().Append(_L("."));
-    iStartPage->Des().Append(company);
-    iStartPage->Des().Append(_L(".com"));
-    iStartPage->Des().LowerCase();
-    }
-
-void CConnectionSettingsParameters::SetRandomIPAddressL(CCreatorEngine& /*aEngine*/)
-    {
-    iIPAddr->Des() = _L("10.10.10.10");
-    }
-
-void CConnectionSettingsParameters::SetRandomIP4NameServer1L(CCreatorEngine& /*aEngine*/)
-    {
-    iIP4NameServer1->Des() = _L("10.1.1.1");
-    }
-void CConnectionSettingsParameters::SetRandomIP4NameServer2L(CCreatorEngine& /*aEngine*/)
-    {
-    iIP4NameServer2->Des() = _L("10.2.2.2");
-    }
-
-void CConnectionSettingsParameters::SetRandomProtocolTypeL(CCreatorEngine& aEngine)
-    {
-    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomProtocolTypeL");
-
-    TInt protocolTypeRand = aEngine.RandomNumber(1, 2);
-    if(protocolTypeRand == 1)
-        {
-        iProtocolType = RPacketContext::EPdpTypeIPv4;
-        }
-    else
-        {
-        iProtocolType = RPacketContext::EPdpTypeIPv6;
-        }
-    }
-
-void CConnectionSettingsParameters::SetRandomTelephoneNumberL(CCreatorEngine& aEngine)
-    {
-    iDefaultTelNumber->Des() = aEngine.RandomString(CCreatorEngine::EPhoneNumber);
-    }
-
-void CConnectionSettingsParameters::SetRandomBearerTypeIsdnL(CCreatorEngine& /*aEngine*/)
-    {
-    iBearerCallTypeIsdn = ECmCallTypeISDNv110;
-    }
-
-void CConnectionSettingsParameters::SetRandomBearerSpeedL(CCreatorEngine& /*aEngine*/)
-    {
-    iBearerSpeed = ECmSpeed14400;
-    }
-
-void CConnectionSettingsParameters::SetRandomWapWspOptionL(CCreatorEngine& /*aEngine*/)
-    {
-    iWapWspOption = ECmWapWspOptionConnectionless;
-    }
-
-void CConnectionSettingsParameters::SetRandomSubnetMaskL(CCreatorEngine& /*aEngine*/)
-    {
-    iSubnetMask->Des() = _L("255.255.255.0");
-    }
-
-void CConnectionSettingsParameters::SetRandomGatewayAddressL(CCreatorEngine& /*aEngine*/)
-    {
-    iGatewayAddress->Des() = _L("10.0.0.1");
-    }
-
-void CConnectionSettingsParameters::SetRandomWlanIpAddrL(CCreatorEngine& /*aEngine*/)
-    {
-    iWlanIpAddr->Des() = _L("10.0.0.99");
-    }
-
-void CConnectionSettingsParameters::SetRandomIPv6NameServer1L(CCreatorEngine& /*aEngine*/)
-    {
-    iIP6NameServer1->Des() = _L("2007:abcd:1000:2000:3000:4000:5000:6001");
-    }
-
-void CConnectionSettingsParameters::SetRandomIPv6NameServer2L(CCreatorEngine& /*aEngine*/)
-    {
-    iIP6NameServer2->Des() = _L("2007:abcd:1000:2000:3000:4000:5000:6002");
-    }
-
-void CConnectionSettingsParameters::SetRandomDisableTextAuthL(CCreatorEngine& /*aEngine*/)
-    {
-    iDisableTextAuth = EFalse;
-    }
-
-void CCreatorConnectionSettings::SetRandomBearerTypeL(CConnectionSettingsParameters& parameters)
-	{
-    LOGSTRING("Creator: CCreatorConnectionSettings::SetRandomBearerTypeL");
-
-	RArray<TUint32> supportedBearers = RArray<TUint32>( 10 );
-	iCmManagerExt.SupportedBearersL(supportedBearers);
-	CleanupClosePushL( supportedBearers );
-	    
-	//In random mode, skipping KUidLanBearerType
-	//Because of Emulator migh show it as supported, when it's really not
-	//and that causes weird situation in UI when there is an item, but it can't be opened
-	TInt lanID = supportedBearers.Find(KUidLanBearerType);
-	if( lanID != KErrNotFound )
-		{
-		supportedBearers.Remove(lanID);
-		}
-	
-	// in emulator remove WLAN
-	#ifdef __WINSCW__	
-	TInt wlanID = supportedBearers.Find(KUidWlanBearerType);
-	if( wlanID != KErrNotFound )
-		{
-		supportedBearers.Remove(wlanID);
-		}
-	#endif	
-				
-	/*
-	    for(TInt i = 0; i<supportedCount; i++)
-	        {
-	        TUint bearer = supportedBearers[i];
-	        if(bearer == KUidLanBearerType)
-	            {
-	            supportedBearers.Remove(i);
-	            }
-	        }
-	    */
-	    
-	//Select random bearer type. 
-	//Also possible to use SupportedBearersL() -method to find supported methods
-	//but using that will cause problems when setting attributes.
-	TInt supportedCount = supportedBearers.Count();    
-	TInt bearerTypeID = iEngine->RandomNumber(0, supportedCount-1);
-	    
-	TUint bearerType = supportedBearers[bearerTypeID];
-	    
-	//Bearer types KUidEmbeddedDestination and KPluginVPNBearerTypeUid is not supported
-	if(bearerType == KUidWlanBearerType)//Wireless LAN
-		{            
-		parameters.iBearerType = KUidWlanBearerType;
-		}
-	else if(bearerType == KUidPacketDataBearerType)//Packet data (GPRS)
-		{
-		parameters.iBearerType = KUidPacketDataBearerType;
-		}
-	else if(bearerType == KUidCSDBearerType)//Data Call
-		{
-		parameters.iBearerType = KUidCSDBearerType;
-		}
-	else if(bearerType == KUidHSCSDBearerType) //High speed GSM
-		{
-		parameters.iBearerType = KUidHSCSDBearerType;
-		}
-	else if(bearerType == KUidEmbeddedDestination)
-		{
-		parameters.iBearerType = KUidEmbeddedDestination;
-		}
-	else// if(bearerType == KPluginVPNBearerTypeUid)
-		{
-		parameters.iBearerType = KPluginVPNBearerTypeUid;
-		}
-	/* In random mode skipping LAN type
-	    else// if(bearerType == KUidLanBearerType)
-	        {
-	        iBearerType = KUidLanBearerType;
-	        }*/
-	    
-	CleanupStack::PopAndDestroy(); // supportedBearers
-	}
-
-void CCreatorConnectionSettings::SetRandomParametersL(CConnectionSettingsParameters& parameters)
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::SetRandomParametersL");
-        
-    // Connection method name:
-    parameters.SetRandomCMNameL(*iEngine);
-    
-    SetRandomBearerTypeL(parameters);
- 
-    if(parameters.iBearerType == KUidWlanBearerType)//Wireless LAN
-        {           
-        // WLAN name:
-        parameters.SetRandomWLANNameL(*iEngine);
-        
-        //WLAN network mode        
-        parameters.SetRandomWLANNetModeL(*iEngine);     
-        
-        //WLAN security mode:
-        parameters.SetRandomWLANSecurityModeL(*iEngine);
-        }
-    
-    // Login name:
-    parameters.SetRandomLoginNameL(*iEngine);
-
-    // Login password:
-    parameters.SetRandomLoginPassL(*iEngine);
-
-    // Secure authentication:
-    parameters.SetRandomSecureAuthenticationL(*iEngine);
-    
-    // Prompt password:
-    parameters.SetRandomPromptPasswordL(*iEngine);    
-
-    // Use proxy:
-    parameters.SetRandomUseProxyL(*iEngine);    
-    
-    // Proxy address
-    parameters.SetRandomProxyAddressL(*iEngine);    
-    
-    // Proxy port number:
-    parameters.SetRandomProxyPortL(*iEngine);    
-
-    // Start page:
-    parameters.SetRandomStartPageL(*iEngine);
-       
-    // IP address:
-    parameters.SetRandomIPAddressL(*iEngine);    
-    
-    // IPv4 name servers:
-    parameters.SetRandomIP4NameServer1L(*iEngine);
-    parameters.SetRandomIP4NameServer2L(*iEngine);
-      
-    // Protocol type:
-    parameters.SetRandomProtocolTypeL(*iEngine);
-    
-    // Default telephone number:
-    parameters.SetRandomTelephoneNumberL(*iEngine);
-         
-    // Bearer isdn
-    parameters.SetRandomBearerTypeIsdnL(*iEngine);
-
-    // Bearer speed:
-    parameters.SetRandomBearerSpeedL(*iEngine);    
-
-    // WAP wsp option:
-    parameters.SetRandomWapWspOptionL(*iEngine);
-
-    // Subnet mask:
-    parameters.SetRandomSubnetMaskL(*iEngine);
-    
-    // Gateway address:
-    parameters.SetRandomGatewayAddressL(*iEngine);
-    
-    // WLAN ip address:
-    parameters.SetRandomWlanIpAddrL(*iEngine);
-
-    // IPv6 name servers:
-    parameters.SetRandomIPv6NameServer1L(*iEngine);
-    parameters.SetRandomIPv6NameServer2L(*iEngine);
-    
-    // Disable text authorization:
-    parameters.SetRandomDisableTextAuthL(*iEngine);    
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorConnectionSettings::SetDefaultCML(RCmConnectionMethodExt conMethod)
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::SetDefaultCM");
-
-    TCmDefConnValue defConnValue;
-        
-    //Returns the default connection method/SNAP.
-    TRAPD( err, iCmManagerExt.ReadDefConnL( defConnValue ) );
-    if( err ==  KErrNotSupported )
-        {
-        return; //If Default Connection NOT supported, just returning 
-        }
-    else if ( err != KErrNone )
-        {
-        User::Leave( err ); //If something else happend
-        }
-    else if ( defConnValue.iId == 0 ) // default not set
-        {       
-        TCmDefConnValue newDefaultCM;        
-        HBufC* cmName = conMethod.GetStringAttributeL( ECmName );        
-        CleanupStack::PushL( cmName );
-        newDefaultCM.iId = AccessPointNameToIdL( cmName->Des() );
-        newDefaultCM.iType = ECmDefConnDestination;
-        //Stores the default connection method/SNAP.
-        iCmManagerExt.WriteDefConnL( newDefaultCM );
-        CleanupStack::PopAndDestroy( cmName );        
-       }
-    }
-
-//----------------------------------------------------------------------------
-
-TUint32 CCreatorConnectionSettings::AccessPointNameToIdL(const TDesC& aAPName,
-                                                         TBool aAnyIfNotFound )
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::AccessPointNameToIdL");
-
-    //RCmDestination destination
-    
-    RArray<TUint32> destIdArray = RArray<TUint32>( 10 );
-    
-    iCmManagerExt.AllDestinationsL( destIdArray );
-    
-    CleanupClosePushL( destIdArray );
-    TUint32 id = 0 ;
-    TBool found = EFalse;
-    
-    for( TInt i = 0; i < destIdArray.Count(); i++ )
-        {
-        RCmDestinationExt dest = iCmManagerExt.DestinationL( destIdArray[i] );           
-        CleanupClosePushL( dest );        
-
-        HBufC* destName = dest.NameLC();
-        
-        if (destName->CompareF(aAPName) == 0){        
-         id = dest.Id();
-         found = ETrue;
-        }
-        if ( !found && id == 0 && aAnyIfNotFound )
-            {
-            id = dest.Id();
-            }
-        CleanupStack::PopAndDestroy( 2 ); // destName , dest
-        if(found)
-            {
-            break;
-            }
-        }
-
-    CleanupStack::PopAndDestroy(); // destIdArray   
-    return id;
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorConnectionSettings::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::HandleSessionEventL");
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorConnectionSettings::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::DeleteAllL");
-    DeleteAllDestinationsL( EFalse );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorConnectionSettings::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::DeleteAllCreatedByCreatorL");
-    iEntryIds.Reset();
-    
-    // fetch ids of entries created by Creator
-    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidIAP );
-    
-    // delete entries
-    DeleteAllDestinationsL( ETrue );
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorConnectionSettings::DeleteAllDestinationsL( TBool aOnlyCreatedWithCreator )
-    {
-    LOGSTRING("Creator: CCreatorConnectionSettings::DeleteAllDestinationsL");
-    RArray<TUint32> destIdArray(5);
-    CleanupClosePushL( destIdArray );
-    iCmManagerExt.AllDestinationsL( destIdArray );    
-    
-    for( TInt i = 0; i < destIdArray.Count(); i++ )
-        {
-        TRAP_IGNORE
-            (
-            RCmDestinationExt dest = iCmManagerExt.DestinationL( destIdArray[i] );           
-            CleanupClosePushL( dest );
-            
-            if ( !aOnlyCreatedWithCreator || iEntryIds.Find( destIdArray[i]) != KErrNotFound )
-                {
-                dest.DeleteLD();
-                }
-            CleanupStack::PopAndDestroy(); // dest
-            );
-        }
-   
-    CleanupStack::PopAndDestroy(); // destIdArray 
-    
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the IMPS related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidIAP );
-    }
-//----------------------------------------------------------------------------
--- a/creator/engine/src/creator_connectionmethodelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +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 "engine.h"
-#include "enginewrapper.h"
-#include "creator_connectionmethodelement.h"
-#include "creator_traces.h"
-//#include "creator_accesspoint.h"
-
-
-using namespace creatorconnectionmethod;
-
-// connection name needs extra space for possible renaming
-const TInt KExtraSpace = 10;
-
-/*
- * 
- */
-CCreatorConnectionMethodElement* CCreatorConnectionMethodElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorConnectionMethodElement* self = new (ELeave) CCreatorConnectionMethodElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorConnectionMethodElement::CCreatorConnectionMethodElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
-
-void CCreatorConnectionMethodElement::ExecuteCommandL()
-	{
-	const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
-	TInt cmAmount = 1;    
-	if( amountAttr )
-		{
-		cmAmount = ConvertStrToIntL(amountAttr->Value());
-		}
-	// Get 'fields' element 
-	CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-	if( fieldsElement )
-		{
-		// Get sub-elements
-		const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
-		// Create connection method entries, the amount of entries is defined by cmAmount:
-		for( TInt cI = 0; cI < cmAmount; ++cI )
-			{            
-			CAccessPointsParameters* param = new (ELeave) CAccessPointsParameters;
-			CleanupStack::PushL(param);
-
-			for( TInt i = 0; i < fields.Count(); ++i )
-				{
-				CCreatorScriptElement* field = fields[i];
-				TPtrC elemName = field->Name();
-				TPtrC elemContent = field->Content();
-				const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
-				TBool useRandom = EFalse;
-				if( randomAttr || elemContent.Length() == 0 )
-					{
-					useRandom = ETrue;
-					}
-
-				if( elemName == Kconnectionname )
-					{
-					if( useRandom )
-						{
-						param->SetRandomCMNameL(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iConnectionName, elemContent);
-                        // reserve extra space for possible renaming
-                        TInt newLen = param->iConnectionName->Length() + KExtraSpace;
-                        param->iConnectionName = param->iConnectionName->ReAllocL(newLen);
-
-                        SetContentToTextParamL(param->iGprsAcessPointName, elemContent);
-						}
-					}
-				else if( elemName == Kstartpage )
-					{
-					if( useRandom )
-						{
-						param->SetRandomStartPageL(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iWapStartPage, elemContent);
-						}
-					}
-				else if( elemName == Kwapwspoption )
-					{
-					if( useRandom )
-						{
-						param->SetRandomWapWspOptionL(*iEngine);
-						}
-					else
-						{
-						if( CompareIgnoreCase(elemContent, Kconnectionless) == 0 )
-							{
-							param->iWapWspOption = EWapWspOptionConnectionless;
-							}
-						else if( CompareIgnoreCase(elemContent, Kconnectionoriented) == 0 )
-							{
-							param->iWapWspOption = EWapWspOptionConnectionOriented;
-							}
-						}
-					}
-				else if( elemName == Kloginname )
-					{
-					if( useRandom )
-						{
-						param->SetRandomLoginNameL(*iEngine);                		
-						}
-					else
-						{
-						SetContentToTextParamL(param->iIspLoginName, elemContent);
-						}
-					}
-				else if( elemName == Ksecureauthentication )
-					{
-					if( useRandom )
-						{
-						param->SetRandomSecureAuthenticationL(*iEngine);
-						}
-					else
-						{
-						param->iSecureAuthentication = ConvertStrToBooleanL(elemContent);
-						}
-					}
-				else if( elemName == Kloginpass )
-					{
-					if( useRandom )
-						{
-						param->SetRandomLoginPassL(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iIspLoginPass, elemContent);
-						}
-					}
-				else if( elemName == Kpromptpassword )
-					{
-					if( useRandom )
-						{
-						param->SetRandomPromptPasswordL(*iEngine);
-						}
-					else
-						{
-						param->iPromptPassword = ConvertStrToBooleanL(elemContent);
-						}
-					}
-				else if( elemName == Kgatewayaddress )
-					{
-					if( useRandom )
-						{
-						param->SetRandomGatewayAddressL(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iWapGatewayAddress, elemContent);
-						}
-					}
-				else if( elemName == Kdeviceipaddr )
-					{
-					if( useRandom )
-						{
-						param->SetRandomIPAddressL(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iIspIPAddr, elemContent);
-						}
-					}
-				else if( elemName == Kip4nameserver1 )
-					{
-					if( useRandom )
-						{
-						param->SetRandomIP4NameServer1L(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iIspIPNameServer1, elemContent);
-						}
-					}
-				else if( elemName == Kip4nameserver2 )
-					{
-					if( useRandom )
-						{
-						param->SetRandomIP4NameServer2L(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iIspIPNameServer2, elemContent);
-						}
-					}
-				else if( elemName == Kdatacalltelnumber )
-					{
-					if( useRandom )
-						{
-						param->SetRandomTelephoneNumberL(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iIspDefaultTelNumber, elemContent);
-						}
-					}
-				else if( elemName == Kdatacalltypeisdn )
-					{
-					if( useRandom )
-						{
-						param->SetRandomBearerTypeIsdnL(*iEngine);
-						}
-					else
-						{
-						if( CompareIgnoreCase(elemContent, Kanalogue) == 0 )
-							param->iIspBearerCallTypeIsdn = ECallTypeAnalogue;
-						else if( CompareIgnoreCase( elemContent, Kisdnv110) == 0 )
-							param->iIspBearerCallTypeIsdn = ECallTypeISDNv110;
-						else if( CompareIgnoreCase( elemContent, Kisdnv120) == 0 )
-							param->iIspBearerCallTypeIsdn = ECallTypeISDNv120;
-						}
-					}
-				else if( elemName == Kbearertype )
-					{
-					if( useRandom )
-						{
-						param->iBearerType = EApBearerTypeGPRS;
-						}
-					else
-						{
-						if( CompareIgnoreCase(elemContent, Kwlan) == 0 )
-							{
-							param->iBearerType = EApBearerTypeWLAN;
-							}
-						else if( CompareIgnoreCase(elemContent, Kgprs) == 0 )
-							{
-							param->iBearerType = EApBearerTypeGPRS;
-							}
-						else if( CompareIgnoreCase(elemContent, Kdatacall) == 0 )
-							{
-							param->iBearerType = EApBearerTypeCSD;
-							}
-						else if( CompareIgnoreCase(elemContent, Khsgsm) == 0 )
-							{
-							param->iBearerType = EApBearerTypeHSCSD;
-							}
-						else if( CompareIgnoreCase(elemContent, Klan) == 0 )
-							{
-							param->iBearerType = EApBearerTypeLAN;
-							}
-						}
-					}
-				else if( elemName == Kdatacalllinespeed )
-					{
-					if( useRandom )
-						{
-						param->SetRandomBearerSpeedL(*iEngine);
-						}
-					else
-						{
-						if( CompareIgnoreCase(elemContent, Kautomatic) == 0 )
-							{                			 
-							param->iIspBearerSpeed = KSpeedAutobaud;
-							}
-						else
-							{
-							TUint lineSpeed = ConvertStrToUintL(elemContent);
-							if( lineSpeed == 9600 )
-								param->iIspBearerSpeed = KSpeed9600;
-							else if( lineSpeed == 14400 )
-								param->iIspBearerSpeed = KSpeed14400;
-							else if( lineSpeed == 19200 )
-								param->iIspBearerSpeed = KSpeed19200;
-							else if( lineSpeed == 28800 )
-								param->iIspBearerSpeed = KSpeed28800;
-							else if( lineSpeed == 38400 )
-								param->iIspBearerSpeed = KSpeed38400;
-							else if( lineSpeed == 43200 )
-								param->iIspBearerSpeed = KSpeed43200;
-							else if( lineSpeed == 56000 )
-								param->iIspBearerSpeed = KSpeed56000;
-							}                			
-						}
-					}
-				else if( elemName == Kproxyserveraddress )
-					{
-					if( useRandom )
-						{
-						param->SetRandomProxyAddressL(*iEngine);
-						}
-					else
-						{
-						SetContentToTextParamL(param->iProxyServerAddress, elemContent);                		
-						}
-					}
-				else if( elemName == Kproxyportnumber )
-					{
-					if( useRandom )
-						{
-						param->SetRandomProxyPortL(*iEngine);
-						}
-					else
-						{
-						param->iProxyPortNumber = ConvertStrToUintL(elemContent);                		
-						}
-					}
-				}
-			iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryAccessPoints, param);
-			CleanupStack::Pop(); // param
-			}
-		}
-	}
--- a/creator/engine/src/creator_contactelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,401 +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 "creator_contactelement.h"
-#include "creator_traces.h"
-#include "creator_phonebook.h"
-#include "creator_factory.h"
-#include "creator_contactsetcache.h"
-#include <xml/documentparameters.h>
-#include <qtcontacts.h>
-
-using namespace Xml;
-using namespace creatorcontact;
-
-/**
- * Contact field element mappings:
- */
-enum TContactFieldDataType
-    {
-    EDataTypeText,
-    EDataTypeBinary,
-    EDataTypeDateTime    
-    };
-    
-class FieldMapping
-{
-public:
-    TPtrC iElementName;
-    TInt  iFieldCode;
-    TContactFieldDataType iDataType;
-};
-FieldMapping fieldMappingTbl[] = {
-       {TPtrC(KFirstname), CCreatorPhonebookWrapper::EFirstName, EDataTypeText},
-       {TPtrC(KLastname), CCreatorPhonebookWrapper::ELastName, EDataTypeText},
-       {TPtrC(KFirstnameReading), CCreatorPhonebookWrapper::EFirstNameReading, EDataTypeText},
-       {TPtrC(KLastnameReading), CCreatorPhonebookWrapper::ELastNameReading, EDataTypeText},
-       {TPtrC(KPrefix), CCreatorPhonebookWrapper::EPrefix, EDataTypeText},
-       {TPtrC(KSuffix), CCreatorPhonebookWrapper::ESuffix, EDataTypeText},
-       {TPtrC(KSecondname), CCreatorPhonebookWrapper::ESecondName, EDataTypeText},
-       {TPtrC(KLandphoneHome), CCreatorPhonebookWrapper::ELandPhoneHome, EDataTypeText},
-       
-       {TPtrC(KMobilephoneHome), CCreatorPhonebookWrapper::EMobilePhoneHome, EDataTypeText},
-       {TPtrC(KVideonumberHome), CCreatorPhonebookWrapper::EVideoNumberHome, EDataTypeText},
-       {TPtrC(KFaxnumberHome), CCreatorPhonebookWrapper::EFaxNumberHome, EDataTypeText},
-       {TPtrC(KVoipHome), CCreatorPhonebookWrapper::EVoipHome, EDataTypeText},
-       {TPtrC(KEmailHome), CCreatorPhonebookWrapper::EEmailHome, EDataTypeText},
-       {TPtrC(KUrlHome), CCreatorPhonebookWrapper::EUrlHome, EDataTypeText},
-       {TPtrC(KAddrlabelHome), CCreatorPhonebookWrapper::EAddrLabelHome, EDataTypeText},
-       {TPtrC(KAddrpoHome), CCreatorPhonebookWrapper::EAddrPoHome, EDataTypeText},
-       
-       {TPtrC(KAddrextHome), CCreatorPhonebookWrapper::EAddrExtHome, EDataTypeText},
-       {TPtrC(KAddrstreetHome), CCreatorPhonebookWrapper::EAddrStreetHome, EDataTypeText},
-       {TPtrC(KAddrlocalHome), CCreatorPhonebookWrapper::EAddrLocalHome, EDataTypeText},
-       {TPtrC(KAddrregionHome), CCreatorPhonebookWrapper::EAddrRegionHome, EDataTypeText},
-       {TPtrC(KAddrpostcodeHome), CCreatorPhonebookWrapper::EAddrPostCodeHome, EDataTypeText},
-       {TPtrC(KAddrcountryHome), CCreatorPhonebookWrapper::EAddrCountryHome, EDataTypeText},
-       {TPtrC(KJobtitle), CCreatorPhonebookWrapper::EJobTitle, EDataTypeText},
-       {TPtrC(KCompanyname), CCreatorPhonebookWrapper::ECompanyName, EDataTypeText},
-       
-       {TPtrC(KLandphoneWork), CCreatorPhonebookWrapper::ELandPhoneWork, EDataTypeText},
-       {TPtrC(KMobilephoneWork), CCreatorPhonebookWrapper::EMobilePhoneWork, EDataTypeText},
-       {TPtrC(KVideonumberWork), CCreatorPhonebookWrapper::EVideoNumberWork, EDataTypeText},
-       {TPtrC(KFaxnumberWork), CCreatorPhonebookWrapper::EFaxNumberWork, EDataTypeText},
-       {TPtrC(KVoipWork), CCreatorPhonebookWrapper::EVoipWork, EDataTypeText},
-       {TPtrC(KEmailWork), CCreatorPhonebookWrapper::EEmailWork, EDataTypeText},
-       {TPtrC(KUrlWork), CCreatorPhonebookWrapper::EUrlWork, EDataTypeText},
-       {TPtrC(KAddrlabelWork), CCreatorPhonebookWrapper::EAddrLabelWork, EDataTypeText},
-       
-       {TPtrC(KAddrpoWork), CCreatorPhonebookWrapper::EAddrPoWork, EDataTypeText},
-       {TPtrC(KAddrextWork), CCreatorPhonebookWrapper::EAddrExtWork, EDataTypeText},
-       {TPtrC(KAddrstreetWork), CCreatorPhonebookWrapper::EAddrStreetWork, EDataTypeText},
-       {TPtrC(KAddrlocalWork), CCreatorPhonebookWrapper::EAddrLocalWork, EDataTypeText},
-       {TPtrC(KAddrregionWork), CCreatorPhonebookWrapper::EAddrRegionWork, EDataTypeText},
-       {TPtrC(KAddrpostcodeWork), CCreatorPhonebookWrapper::EAddrPostCodeWork, EDataTypeText},
-       {TPtrC(KAddrcountryWork), CCreatorPhonebookWrapper::EAddrCountryWork, EDataTypeText},
-       {TPtrC(KLandphoneGen), CCreatorPhonebookWrapper::ELandPhoneGen, EDataTypeText},
-       
-       {TPtrC(KMobilephoneGen), CCreatorPhonebookWrapper::EMobilePhoneGen, EDataTypeText},
-       {TPtrC(KVideonumberGen), CCreatorPhonebookWrapper::EVideoNumberGen, EDataTypeText},
-       {TPtrC(KFaxnumberGen), CCreatorPhonebookWrapper::EFaxNumberGen, EDataTypeText},
-       {TPtrC(KVoipGen), CCreatorPhonebookWrapper::EVoipGen, EDataTypeText},
-       {TPtrC(KPoc), CCreatorPhonebookWrapper::EPoc, EDataTypeText},
-       {TPtrC(KSwis), CCreatorPhonebookWrapper::ESwis, EDataTypeText},
-       {TPtrC(KSip), CCreatorPhonebookWrapper::ESip, EDataTypeText},
-       {TPtrC(KEmailGen), CCreatorPhonebookWrapper::EEmailGen, EDataTypeText},
-       
-       {TPtrC(KUrlGen), CCreatorPhonebookWrapper::EUrlGen, EDataTypeText},
-       {TPtrC(KAddrlabelGen), CCreatorPhonebookWrapper::EAddrLabelGen, EDataTypeText},
-       {TPtrC(KAddrpoGen), CCreatorPhonebookWrapper::EAddrPoGen, EDataTypeText},
-       {TPtrC(KAddrextGen), CCreatorPhonebookWrapper::EAddrExtGen, EDataTypeText},
-       {TPtrC(KAddrstreetGen), CCreatorPhonebookWrapper::EAddrStreetGen, EDataTypeText},
-       {TPtrC(KAddrlocalGen), CCreatorPhonebookWrapper::EAddrLocalGen, EDataTypeText},
-       {TPtrC(KAddrregionGen), CCreatorPhonebookWrapper::EAddrRegionGen, EDataTypeText},
-       {TPtrC(KAddrpostcodeGen), CCreatorPhonebookWrapper::EAddrPostCodeGen, EDataTypeText},
-       
-       {TPtrC(KAddrcountryGen), CCreatorPhonebookWrapper::EAddrCountryGen, EDataTypeText},
-       {TPtrC(KPagerNumber), CCreatorPhonebookWrapper::EPagerNumber, EDataTypeText},
-       {TPtrC(KDtmfString), CCreatorPhonebookWrapper::EDtmfString, EDataTypeText},
-       {TPtrC(KWvAddress), CCreatorPhonebookWrapper::EWVAddress, EDataTypeText},
-       {TPtrC(KDate), CCreatorPhonebookWrapper::EDate, EDataTypeDateTime},
-       {TPtrC(KNote), CCreatorPhonebookWrapper::ENote, EDataTypeText},
-       {TPtrC(KThumbnailPath), CCreatorPhonebookWrapper::EThumbnailPic, EDataTypeText},
-       {TPtrC(KThumbnailId), CCreatorPhonebookWrapper::EThumbnailPic, EDataTypeText},
-       {TPtrC(KRingTone), CCreatorPhonebookWrapper::ERingTone, EDataTypeText},
-       {TPtrC(KRingToneId), CCreatorPhonebookWrapper::ERingTone, EDataTypeText},
-       
-       {TPtrC(KCallerobjImg), CCreatorPhonebookWrapper::ECallerObjImg, EDataTypeText},
-       {TPtrC(KCallerobjText), CCreatorPhonebookWrapper::ECallerObjText, EDataTypeText},
-       {TPtrC(KMiddlename), CCreatorPhonebookWrapper::EMiddleName, EDataTypeText},
-       {TPtrC(KDepartment), CCreatorPhonebookWrapper::EDepartment, EDataTypeText},
-       {TPtrC(KAsstname), CCreatorPhonebookWrapper::EAsstName, EDataTypeText},
-       {TPtrC(KSpouse), CCreatorPhonebookWrapper::ESpouse, EDataTypeText},
-       {TPtrC(KChildren), CCreatorPhonebookWrapper::EChildren, EDataTypeText},
-       {TPtrC(KAsstphone), CCreatorPhonebookWrapper::EAsstPhone, EDataTypeText},
-       
-       {TPtrC(KCarphone), CCreatorPhonebookWrapper::ECarPhone, EDataTypeText},
-       {TPtrC(KAnniversary), CCreatorPhonebookWrapper::EAnniversary, EDataTypeDateTime},
-       {TPtrC(KSyncclass), CCreatorPhonebookWrapper::ESyncClass, EDataTypeText},
-       {TPtrC(KLocPrivacy), CCreatorPhonebookWrapper::ELocPrivacy, EDataTypeText},
-       {TPtrC(KGenlabel), CCreatorPhonebookWrapper::EGenLabel, EDataTypeText}
-};
-
-//*********************************************************************************
-
-CCreatorContactElementBase* CCreatorContactElementBase::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    LOGSTRING("Creator: CCreatorContactElementBase::NewL");
-    CCreatorContactElementBase* self = new (ELeave) CCreatorContactElementBase(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorContactElementBase::CCreatorContactElementBase(CCreatorEngine* aEngine) : CCreatorScriptElement(aEngine)
-    { }
-
-CCreatorContactElement* CCreatorContactElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    LOGSTRING("Creator: CCreatorContactElement::NewL");
-    CCreatorContactElement* self = new (ELeave) CCreatorContactElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorContactElement::CCreatorContactElement(CCreatorEngine* aEngine) 
-: 
-CCreatorContactElementBase(aEngine)
-    { 
-    iIsCommandElement = ETrue;
-    }
-
-
-void CCreatorContactElement::ExecuteCommandL()
-    {    
-    LOGSTRING("Creator: CCreatorContactElement::ExecuteCommandL");
-    // Find out how many contacts should we create:
-    const CCreatorScriptAttribute* contactAmountAttr = this->FindAttributeByName(KAmount);    
-    TInt contactAmount = 1;    
-    if( contactAmountAttr )
-        {
-        contactAmount = ConvertStrToIntL(contactAmountAttr->Value());
-        }
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    TInt fieldMappingTblSize = sizeof(fieldMappingTbl)/sizeof(FieldMapping);
-    for( TInt cI = 0; cI < contactAmount; ++cI )
-        {
-        CPhonebookParameters* param = (CPhonebookParameters*) TCreatorFactory::CreatePhoneBookParametersL();
-        CleanupStack::PushL(param);
-        // Loop all the field elements
-        if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-            {
-            
-            const RPointerArray<CCreatorScriptElement>& fieldList = fieldsElement->SubElements();
-            
-            if( fieldList.Count() == 0 )
-                {
-                
-                }
-            for( TInt i = 0; i < fieldList.Count(); ++i )
-                {
-                TPtrC fieldName = fieldList[i]->Name();
-                //const CCreatorScriptAttribute* amountAttr = fieldList[i]->FindAttributeByName(KAmount);
-                //const CCreatorScriptAttribute* rndLenAttr = fieldList[i]->FindAttributeByName(KRandomLength);
-                //const CCreatorScriptAttribute* increaseAttr = fieldList[i]->FindAttributeByName(KIncrease);
-                //TBool increase( EFalse );
-                //if ( increaseAttr )
-                //    {
-                //    increase = ConvertStrToBooleanL( increaseAttr->Value() );
-                //    }
-                for( TInt j = 0; j < fieldMappingTblSize; ++j )
-                    {
-                    const FieldMapping& mapping = fieldMappingTbl[j];
-                    if( fieldName == mapping.iElementName )
-                        {
-                        TPtrC content = fieldList[i]->Content();
-                                                                        
-//                        MCreatorRandomDataField::TRandomLengthType randomLenType = MCreatorRandomDataField::ERandomLengthUndefined;
-                    
-                        if( content == TPtrC(KEmpty) || content == TPtrC(KNullDesC) )
-                            {
-							CCreatorContactField* field = CCreatorContactField::NewL();
-                        	CleanupStack::PushL(field);
-                        	field->AddFieldToParamL( iEngine,param, mapping.iFieldCode, KErrNotFound );
-                          	CleanupStack::Pop(field);
-                            }
-                        else
-                        	{
-							CCreatorContactField* field = CCreatorContactField::NewL();
-                            CleanupStack::PushL(field);
-                            field->AddFieldToParamL( param, mapping.iFieldCode, content );
-                            CleanupStack::Pop(field);
-                        	}
-                        
-
-                        break;
-                        
-                        }
-                    }
-
-                }
-            } 
-        else
-            {
-            // No fields specified, so add all fields with random content:
-            for( TInt i = 0; i < fieldMappingTblSize; ++i )
-                {
-                if( fieldMappingTbl[i].iElementName == KThumbnailId || 
-                    fieldMappingTbl[i].iElementName == KRingToneId )
-                    {
-                    // Skip thumbnail and ringtone IDs, since they are duplicates with thumbnailpath and ringtonepath
-                    continue;
-                    }
-                CCreatorContactField* field = CCreatorContactField::NewL();
-                CleanupStack::PushL(field);
-                field->AddFieldToParamL( iEngine,param, fieldMappingTbl[i].iFieldCode, KErrNotFound );
-                CleanupStack::Pop(field);
-                }
-                
-            }
-        iEngine->AppendToCommandArrayL(ECmdCreatePhoneBookEntryContacts, param);
-        iParameters.AppendL(param); // Save the pointer to the parametes. 
-        CleanupStack::Pop(param);
-        }
-    }
-
-
-/*
-void CCreatorContactElement::ExecuteCommandL()
-    {}
-*/
-CCreatorContactSetElement* CCreatorContactSetElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    LOGSTRING("Creator: CCreatorContactSetElement::NewL");
-    CCreatorContactSetElement* self = new (ELeave) CCreatorContactSetElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorContactSetElement::CCreatorContactSetElement(CCreatorEngine* aEngine) 
-: 
-CCreatorContactElementBase(aEngine)
-    { }
-
-void CCreatorContactSetElement::ExecuteCommandL()
-    { }
-
-void CCreatorContactSetElement::AddToCacheL()
-    {    
-    LOGSTRING("Creator: CCreatorContactSetElement::AddToCacheL");
-    const CCreatorScriptAttribute* linkIdAttr = this->FindAttributeByName(KId);
-    const CCreatorScriptAttribute* existingElemsAttr = this->FindAttributeByName(KExistingContacts);
-    TInt numOfExistingContacts = 0;
-    if( existingElemsAttr )
-        {
-        numOfExistingContacts = ConvertStrToIntL(existingElemsAttr->Value());
-        }
-    if( linkIdAttr )
-        {
-        TInt linkId = ConvertStrToIntL(linkIdAttr->Value());
-        if( linkId > 0 )
-            {    
-            CCreatorContactSet* newSet = CCreatorContactSet::NewL(linkId, numOfExistingContacts);
-            CleanupStack::PushL(newSet);
-            ContactLinkCache::Instance()->AppendL(newSet);
-            CleanupStack::Pop(newSet);
-                 
-            // Mark sub-elements (i.e. contacts) to this contact-set:
-            for( TInt i = 0; i < iSubElements.Count(); ++i )
-                {
-                for( TInt j = 0; j < iSubElements[i]->CommandParameters().Count(); ++j)
-                    {
-                    CCreatorModuleBaseParameters* params = iSubElements[i]->CommandParameters()[j];
-                    if( params )
-                        {
-                        params->SetScriptLinkId(linkId);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-CCreatorContactGroupElement* CCreatorContactGroupElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    LOGSTRING("Creator: CCreatorContactGroupElement::NewL");
-    CCreatorContactGroupElement* self = new (ELeave) CCreatorContactGroupElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorContactGroupElement::CCreatorContactGroupElement(CCreatorEngine* aEngine)
-: 
-CCreatorContactElementBase(aEngine)
-    { 
-    iIsCommandElement = ETrue;
-    }
-
-
-void CCreatorContactGroupElement::ExecuteCommandL()
-    {
-    LOGSTRING("Creator: CCreatorContactGroupElement::ExecuteCommandL");
-    // Get attributes (amount and name)
-    const CCreatorScriptAttribute* groupAmountAttr = this->FindAttributeByName(KAmount);        
-    const CCreatorScriptAttribute* groupNameAttr = this->FindAttributeByName(KName);
-    // How many groups to create:
-    TInt groupAmount = 1;        
-    if( groupAmountAttr )
-        {
-        groupAmount = ConvertStrToIntL(groupAmountAttr->Value());
-        }
-    
-    for( TInt i = 0; i < groupAmount; ++i )
-        {        
-        CCreatorScriptElement* membersElement = FindSubElement(KMembers);
-        
-        if( membersElement )
-            {    
-            CPhonebookParameters* param = (CPhonebookParameters*) TCreatorFactory::CreatePhoneBookParametersL();            
-            CleanupStack::PushL(param);
-            
-            // Links to contact-sets:
-            const RPointerArray<CCreatorScriptElement>& linkList = membersElement->SubElements();
-            if( linkList.Count() > 0 )
-                {
-                for( TInt i = 0; i < linkList.Count(); ++i )
-                    {
-                    AppendContactSetReferenceL(*linkList[i], param->iLinkIds);
-                    }                
-                }
-            
-            if( groupNameAttr )
-                {
-				param->iGroupName->Des().Copy( groupNameAttr->Value() );
-                }
-            else
-            	{
-                param->iGroupName->Des().Copy( iEngine->RandomString(CCreatorEngine::EGroupName) );
-                }                
-            iEngine->AppendToCommandArrayL(ECmdCreatePhoneBookEntryGroups, param);
-            CleanupStack::Pop(param);
-            }
-        }
-    }
-
-/*
-void CCreatorContactGroupElement::ExecuteCommandL()
-    {}
-*/
-CCreatorContactFieldElement* CCreatorContactFieldElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    LOGSTRING("Creator: CCreatorContactFieldElement::NewL");
-    CCreatorContactFieldElement* self = new (ELeave) CCreatorContactFieldElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-
-CCreatorContactFieldElement::CCreatorContactFieldElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    { }
--- a/creator/engine/src/creator_contactsetcache.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +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 "creator_contactsetcache.h"
-
-
-CContactLinkCacheImp* ContactLinkCache::iImp = 0;
-
-CCreatorContactSet* CCreatorContactSet::NewL(TInt aLinkId, TInt aNumOfExistingContacts)
-    {
-    return new (ELeave) CCreatorContactSet(aLinkId, aNumOfExistingContacts);    
-    }
-
-TInt CCreatorContactSet::LinkId() const
-    {
-    return iLinkId;
-    }
-
-void CCreatorContactSet::AppendL(TUint32 aContactLink)
-    {
-    iContactLinks.AppendL(aContactLink);
-    }
-
-RArray<TUint32> CCreatorContactSet::ContactLinks()
-    {
-    return iContactLinks;
-    }
-
-const RArray<TUint32> CCreatorContactSet::ContactLinks() const
-    {
-    return iContactLinks;
-    }
-
-
-TInt CCreatorContactSet::NumberOfExistingContacts() const
-    {
-    return iNumOfExistingContacts;
-    }
-
-CCreatorContactSet::~CCreatorContactSet()
-    {
-    iContactLinks.Reset();
-    iContactLinks.Close();
-    }
-
-
-CCreatorContactSet::CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts)
-    {
-    iLinkId = aLinkId;
-    iNumOfExistingContacts = aNumOfExistingContacts;
-    }
-
-class CContactLinkCacheImp : public CBase, public MContactLinkCache
-{
-public:
-    static CContactLinkCacheImp* NewL();
-    virtual ~CContactLinkCacheImp();
-    virtual void AppendL(CCreatorContactSet* aContactSet); 
-
-    virtual RArray<TUint32> ContactLinks(TInt aLinkId);
-    virtual const RArray<TUint32> ContactLinks(TInt aLinkId) const;
-
-    virtual RPointerArray<CCreatorContactSet>& ContactSets();
-    virtual const RPointerArray<CCreatorContactSet>& ContactSets() const;
-    virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const;
-    virtual CCreatorContactSet& ContactSet(TInt aLinkId);
-    
-private:
-    void ConstructL();
-    CContactLinkCacheImp();
-    
-    RArray<TUint32> iEmptyLinks;
-
-    RPointerArray<CCreatorContactSet> iContactSets;
-    CCreatorContactSet* iDummyContactSet;
-};
-
-CContactLinkCacheImp* CContactLinkCacheImp::NewL()
-    {
-    CContactLinkCacheImp* self = new (ELeave) CContactLinkCacheImp();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-void CContactLinkCacheImp::ConstructL()
-    {
-    if( iDummyContactSet == 0 )
-        iDummyContactSet = CCreatorContactSet::NewL(-1, 0);    
-    }
-
-CContactLinkCacheImp::CContactLinkCacheImp()
-: iDummyContactSet(0)
-    {}
-
-CContactLinkCacheImp::~CContactLinkCacheImp()
-    {
-    iEmptyLinks.Reset();// just in case...
-    iEmptyLinks.Close();
-
-    iContactSets.ResetAndDestroy();
-    iContactSets.Close();
-    delete iDummyContactSet;
-    }
-void CContactLinkCacheImp::AppendL(CCreatorContactSet* aContactSet)
-    {
-    iContactSets.AppendL(aContactSet);
-    }
-RArray<TUint32> CContactLinkCacheImp::ContactLinks(TInt aLinkId)
-    {
-    for( TInt i = 0; i < iContactSets.Count(); ++i )
-        {
-        if( iContactSets[i]->LinkId() == aLinkId )
-            {
-            return iContactSets[i]->ContactLinks();
-            }
-        }
-    return iEmptyLinks;
-    }
-
-const RArray<TUint32> CContactLinkCacheImp::ContactLinks(TInt aLinkId) const
-    {
-    for( TInt i = 0; i < iContactSets.Count(); ++i )
-        {
-        if( iContactSets[i]->LinkId() == aLinkId )
-            {
-            return iContactSets[i]->ContactLinks();
-            }
-        }
-    return iEmptyLinks;
-    }
-
-
-const CCreatorContactSet& CContactLinkCacheImp::ContactSet(TInt aLinkId) const
-    {
-    for( TInt i = 0; i < iContactSets.Count(); ++i )
-        {
-        if( iContactSets[i]->LinkId() == aLinkId )
-            {
-            return *iContactSets[i];
-            }
-        }
-        
-    return *iDummyContactSet;
-    }
-
-CCreatorContactSet& CContactLinkCacheImp::ContactSet(TInt aLinkId)
-    {
-    for( TInt i = 0; i < iContactSets.Count(); ++i )
-        {
-        if( iContactSets[i]->LinkId() == aLinkId )
-            {
-            return *iContactSets[i];
-            }
-        }
-        
-    return *iDummyContactSet;
-    }
-
-RPointerArray<CCreatorContactSet>& CContactLinkCacheImp::ContactSets()
-    {
-    return iContactSets;
-    }
-
-const RPointerArray<CCreatorContactSet>& CContactLinkCacheImp::ContactSets() const
-    {
-    return iContactSets;
-    }
-
-
-void ContactLinkCache::InitializeL()
-    {
-    if( iImp == 0 )
-        {
-        iImp = CContactLinkCacheImp::NewL();
-        }
-    }
-
-void ContactLinkCache::DestroyL()
-    {
-    delete iImp;
-    iImp = 0;
-    }
-
-MContactLinkCache* ContactLinkCache::Instance()
-    {
-    return iImp;
-    }
-
-
-    /*{
-public:
-    static void ;
-    static void DestructLD();
-    
-    static MContactLinkCache* Instance();
-    
-private:
-    CContactLinkImp* iImp;
-};*/
-
--- a/creator/engine/src/creator_factory.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include "engine.h"
-#include "creator_factory.h"
-
-//#include "creator_accesspoint.h"
-#include "creator_phonebook.h"
-
-CCreatorPhonebookBase* TCreatorFactory::CreatePhoneBookL(CCreatorEngine* aEngine)
-{
-    return CCreatorPhonebook::NewL(aEngine);    
-}
-
-CCreatorModuleBaseParameters* TCreatorFactory::CreatePhoneBookParametersL()
-	{
-	return new(ELeave) CPhonebookParameters;
-	}
-/*
-CCreatorConnectionSettingsBase* TCreatorFactory::CreateConnectionSettingsL(CCreatorEngine* aEngine)
-{
-    return CCreatorAccessPoints::NewL(aEngine); 
-}
-
-CCreatorModuleBaseParameters* TCreatorFactory::CreateConnectionSettingsParametersL()
-    {
-    return new(ELeave) CAccessPointsParameters;
-    }
-*/
--- a/creator/engine/src/creator_file.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,829 +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 "engine.h"
-#include "enginewrapper.h"
-#include "creator_file.h" 
-#include "creator_traces.h"
-
-using namespace ContentAccess;
-
-static const TInt KFilesFieldLength = 256;
-
-//_LIT(KCreatorFilesPrefixName, "CR_");
-//_LIT(KCreatorFilesPrefixFolderName, "CR_FLDR_");
-
-//----------------------------------------------------------------------------
-
-CFilesParameters::CFilesParameters()
-    {
-    LOGSTRING("Creator: CFilesParameters::CFilesParameters");
-    iFullFilePath = HBufC::New(KFilesFieldLength);
-    }
-
-CFilesParameters::CFilesParameters( CFilesParameters& aCopy )
-    {
-    LOGSTRING("Creator: CFilesParameters::CFilesParameters");
-    iFullFilePath = HBufC::New(KFilesFieldLength);
-    iFullFilePath->Des().Copy( *aCopy.iFullFilePath );
-    iFileCommand = aCopy.iFileCommand;
-    iEncrypt = aCopy.iEncrypt;
-    if ( aCopy.iPermission )
-        {
-        TRAP_IGNORE(    
-            iPermission = CDRMPermission::NewL();
-            iPermission->DuplicateL( *aCopy.iPermission );
-            );
-        }
-    }
-
-CFilesParameters::~CFilesParameters()
-    {
-    LOGSTRING("Creator: CFilesParameters::~CFilesParameters");
-    delete iFullFilePath;
-    delete iPermission;
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorFiles* CCreatorFiles::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorFiles* self = CCreatorFiles::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorFiles* CCreatorFiles::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorFiles* self = new (ELeave) CCreatorFiles;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorFiles::CCreatorFiles() :
-    iFs ( CEikonEnv::Static()->FsSession() )
-    {
-    }
-
-void CCreatorFiles::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorFiles::ConstructL");
-
-    iEngine = aEngine;
-
-    User::LeaveIfError( iApaLs.Connect() );
-    
-    iFilePaths = new (ELeave) CDesCArrayFlat( 4 );
-    
-    // Restore file id 
-    CDictionaryFileStore* store = iEngine->FileStoreLC();
-    User::LeaveIfNull( store );
-    if ( store->IsPresentL( KUidDictionaryUidFiles ) )
-        {
-        RDictionaryReadStream in;
-        in.OpenLC( *store, KUidDictionaryUidFiles );
-        TRAPD( err, iFileId = in.ReadInt32L() );
-        if ( err )
-            {
-            iFileId = 1;
-            }
-        CleanupStack::PopAndDestroy(); // in
-        }
-    else
-        {
-        iFileId = 1;
-        }
-    CleanupStack::PopAndDestroy( store );
-    }
-
-CCreatorFiles::~CCreatorFiles()
-    {
-    LOGSTRING("Creator: CCreatorFiles::~CCreatorFiles");
-    
-    // this is done only once per file operation:
-    if ( iFilePaths && iFilePaths->Count() )
-        {
-        TRAP_IGNORE( StorePathsForDeleteL( *iFilePaths ) );
-        }
-    delete iFilePaths;
-    delete iParameters;
-    delete iUserParameters;
-    iApaLs.Close();
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorFiles::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
-    {
-    LOGSTRING("Creator: CCreatorFiles::QueryDialogClosedL");
-    
-    if( aPositiveAction == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        return;
-        }
-    
-    const TDesC* showText = &KSavingText;
-    TBool finished(EFalse);
-    TBool retval(ETrue);
-    switch(aUserData)
-        {
-        case ECreatorFilesDelete:
-            showText = &KDeletingText;
-            iEntriesToBeCreated = 1;
-            finished = ETrue;
-            break;
-        case ECreatorFilesStart:
-            {
-            // set a default directory  (eg. c:\Nokia\Images\)
-            iEngine->SetDefaultPathForFileCommandL(iCommand, iDirectoryQueriedFromUser);
-            TBuf<50> promptText;
-            if (iCommand == ECmdCreateFileEntryEmptyFolder)
-                promptText.Copy( _L("Specify the folder path and name") );
-            else
-                promptText.Copy( _L("Specify the directory") );
-            
-            // show directory query dialog
-            retval = iEngine->GetEngineWrapper()->DirectoryQueryDialog(promptText, iDirectoryQueriedFromUser, this, ECreatorFilesGetDirectory );
-            }
-            break;
-        case ECreatorFilesGetDirectory:
-            // check that the root folder is correct
-            if ( iDirectoryQueriedFromUser.Length() < 3  ||  BaflUtils::CheckFolder( iFs, iDirectoryQueriedFromUser.Left(3) ) != KErrNone )
-                {
-                iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Invalid path"));
-                retval = EFalse;
-                }        
-            else
-                {
-                // check the directory contains a trailing backlash
-                if ( iDirectoryQueriedFromUser.Right(1) != _L("\\") )
-                    {
-                    iDirectoryQueriedFromUser.Append(_L("\\"));
-                    }
-                // copy the directory name to a class member
-                if ( iCommand == ECmdCreateFileEntryEmptyFolder )
-                    {
-                    finished = ETrue;
-                    }
-                else
-                    {
-                    retval = AskDRMDataFromUserL();
-                    }
-                }
-            break;
-        case ECreatorFilesAskDRMData:
-            if ( iDummy > 0 )
-                {
-                iUserParameters->iEncrypt = ETrue;
-                }
-            if ( iDummy == 2 )
-                {
-                iUserParameters->iPermission = CDRMPermission::NewL();
-                CDRMPermission* perm = iUserParameters->iPermission; 
-                perm->iTopLevel->iActiveConstraints = EConstraintNone;
-                perm->iPlay->iActiveConstraints = EConstraintNone;
-                perm->iDisplay->iActiveConstraints = EConstraintNone;
-                perm->iPrint->iActiveConstraints = EConstraintNone;
-                perm->iExecute->iActiveConstraints = EConstraintNone;
-                perm->iUniqueID = 0;
-                // DRM Combined Delivery
-                iDummy = 0;
-                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog( &iDummy, _L("How many counts(0=unlimited)?"), ETrue, this, ECreatorFilesAskDRM_CD_Counts );
-                }
-            else
-                {
-                finished = ETrue;
-                }
-            break;
-        case ECreatorFilesAskDRM_CD_Counts:
-            if ( iDummy > 0 )
-                {
-                TInt count = iDummy;
-                CDRMPermission* perm = iUserParameters->iPermission;
-                // apply constraints to all permission types
-                // applied type will be selected by setting iAvailableRights
-                // when determining the file type
-                perm->iDisplay->iActiveConstraints |= EConstraintCounter;
-                perm->iDisplay->iCounter = count;
-                perm->iDisplay->iOriginalCounter = count;
-    
-                perm->iPlay->iActiveConstraints |= EConstraintCounter;
-                perm->iPlay->iCounter = count;
-                perm->iPlay->iOriginalCounter = count;
-    
-                perm->iPrint->iActiveConstraints |= EConstraintCounter;
-                perm->iPrint->iCounter = count;
-                perm->iPrint->iOriginalCounter = count;
-                
-                perm->iExecute->iActiveConstraints |= EConstraintCounter;
-                perm->iExecute->iCounter = count;
-                perm->iExecute->iOriginalCounter = count;
-                }
-            iDummy = 0;
-            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog( &iDummy, _L("How many minutes until expire(0=unlimited)?"), ETrue, 
-                this, ECreatorFilesAskDRM_CD_Minutes
-                );
-            break;
-        case ECreatorFilesAskDRM_CD_Minutes:
-            if ( iDummy > 0 )
-                {
-                TInt minutes = iDummy;
-                CDRMPermission* perm = iUserParameters->iPermission;            
-                // apply constraints to all permission types
-                // applied type will be selected by setting iAvailableRights
-                // when determining the file type            
-                perm->iDisplay->iActiveConstraints |= EConstraintInterval;
-                perm->iDisplay->iInterval = TTimeIntervalSeconds( 60 * minutes );
-                perm->iDisplay->iIntervalStart = Time::NullTTime();
-                
-                perm->iPlay->iActiveConstraints |= EConstraintInterval;
-                perm->iPlay->iInterval = TTimeIntervalSeconds( 60 * minutes );
-                perm->iPlay->iIntervalStart = Time::NullTTime();
-    
-                perm->iPrint->iActiveConstraints |= EConstraintInterval;
-                perm->iPrint->iInterval = TTimeIntervalSeconds( 60 * minutes );
-                perm->iPrint->iIntervalStart = Time::NullTTime();
-    
-                perm->iExecute->iActiveConstraints |= EConstraintInterval;
-                perm->iExecute->iInterval = TTimeIntervalSeconds( 60 * minutes );
-                perm->iExecute->iIntervalStart = Time::NullTTime();
-                }
-            finished = ETrue;
-            break;
-        default:
-            //some error
-            retval = EFalse;
-            break;
-        }
-    if( retval == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        }
-    else if( finished )
-        {
-        // add this command to command array
-        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
-        // started exucuting commands
-        iEngine->ExecuteFirstCommandL( *showText );
-        }
-    }
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorFiles::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorFiles::AskDataFromUserL");
-    
-    CCreatorModuleBase::AskDataFromUserL( aCommand );
-    
-    if ( aCommand == ECmdDeleteCreatorFiles )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all files created with Creator?"), this, ECreatorFilesDelete );
-        }
-    
-    delete iUserParameters;
-    iUserParameters = NULL;
-    iUserParameters = new(ELeave) CFilesParameters();
-    
-    iDirectoryQueriedFromUser.Copy( KNullDesC );
-
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorFilesStart );
-    }
-
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorFiles::CreateFileEntryL(CFilesParameters *aParameters, TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorFiles::CreateFileEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    TFileName directoryToBeCreated;
-            
-    CFilesParameters* parameters = aParameters;
-    
-    if (!parameters)
-        {
-        if ( iUserParameters )
-            {
-            iParameters = new (ELeave) CFilesParameters( *iUserParameters );
-            // iUserParameters = NULL;
-            }
-        else
-            {
-            // random data needed if no predefined data available
-            iParameters = new (ELeave) CFilesParameters;            
-            }
-        parameters = iParameters;
-        }
-
-    TInt err = KErrNone;
-
-    // if we just create directories
-    if ( aCommand == ECmdCreateFileEntryEmptyFolder)
-        {
-        // strip the last backslash from the path
-        if( iDirectoryQueriedFromUser.Length() > 0)
-        	directoryToBeCreated = iDirectoryQueriedFromUser;
-        else if( parameters->iFullFilePath && parameters->iFullFilePath->Des().Length() > 0 )
-        	directoryToBeCreated = parameters->iFullFilePath->Des();
-        else 
-        	return err;
-        
-        _LIT(KSlash, "\\");
-        if( directoryToBeCreated.Right(1) == KSlash )
-        	directoryToBeCreated.SetLength ( directoryToBeCreated.Length() - 1 ); 
-            
-        // generate a unique file name
-        err = CApaApplication::GenerateFileName( iFs, directoryToBeCreated);
-        if (err != KErrNone)
-            return err;
-
-        // now append the backslah back
-        directoryToBeCreated.Append( _L("\\") );
-        
-        // now create the new directory
-        err = iFs.MkDirAll( directoryToBeCreated );
-        
-        // Add directoryToBeCreated to store
-        iFilePaths->AppendL( directoryToBeCreated );
-
-        LOGSTRING3("Creator: CCreatorFiles::CreateFileEntryL creating empty directory %S returns err", &directoryToBeCreated, err);
-        }
-
-    else  // files
-        {
-        LOGSTRING2("Creator: CCreatorFiles::CreateFileEntryL file id is %d", aCommand);
-
-        // get source
-        TFileName fullSourcePath;
-        switch (aCommand)
-            {
-	        case ECmdCreateFileEntryJPEG_25kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJPEG_25kB );  break; }
-	        case ECmdCreateFileEntryJPEG_200kB:     { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJPEG_200kB );  break; }
-	        case ECmdCreateFileEntryJPEG_500kB:     { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJPEG_500kB );  break; }
-	        case ECmdCreateFileEntryPNG_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EPNG_15kB );  break; }
-	        case ECmdCreateFileEntryGIF_2kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EGIF_2kB );  break; }
-	        case ECmdCreateFileEntryRNG_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ERNG_1kB );  break; }
-	        case ECmdCreateFileEntryMIDI_10kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMIDI_10kB );  break; }
-	        case ECmdCreateFileEntryWAV_20kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWAVE_20kB );  break; }
-	        case ECmdCreateFileEntryAMR_20kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EAMR_20kB );  break; }
-	        case ECmdCreateFileEntryXLS_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EExcel_15kB );  break; }
-	        case ECmdCreateFileEntryDOC_20kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWord_20kB );  break; }
-	        case ECmdCreateFileEntryPPT_40kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EPowerPoint_40kB );  break; }
-	        case ECmdCreateFileEntryTXT_10kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EText_10kB );  break; }
-	        case ECmdCreateFileEntryTXT_70kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EText_70kB );  break; }
-	        case ECmdCreateFileEntry3GPP_70kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::E3GPP_70kB );  break; }
-	        case ECmdCreateFileEntryMP3_250kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMP3_250kB );  break; }
-	        case ECmdCreateFileEntryAAC_100kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EAAC_100kB );  break; }
-	        case ECmdCreateFileEntryRM_95kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ERM_95kB );  break; }
-	        case ECmdCreateFileEntryBMP_25kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EBMP_25kB );  break; }
-	        case ECmdCreateFileEntryDeck_1kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESavedDeck_1kB );  break; }
-	        case ECmdCreateFileEntryHTML_20kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EHTML_20kB );  break; }
-	        case ECmdCreateFileEntryJAD_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJAD_1kB );  break; }
-	        case ECmdCreateFileEntryJAR_10kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJAR_10kB );  break; }
-	        case ECmdCreateFileEntryJP2_65kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJP2_65kB );  break; }
-	        case ECmdCreateFileEntryMP4_200kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMP4_200kB );  break; }
-	        case ECmdCreateFileEntryMXMF_40kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMXMF_40kB );  break; }
-	        case ECmdCreateFileEntryRAM_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ERAM_1kB );  break; }
-	        case ECmdCreateFileEntrySVG_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESVG_15kB );  break; }
-	        case ECmdCreateFileEntrySWF_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESWF_15kB );  break; }
-	        case ECmdCreateFileEntryTIF_25kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ETIF_25kB );  break; }
-	        case ECmdCreateFileEntryVCF_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EVCF_1kB );  break; }
-	        case ECmdCreateFileEntryVCS_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EVCS_1kB );  break; }
-	        case ECmdCreateFileEntrySISX_10kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESISX_10kB );  break; }
-	        case ECmdCreateFileEntryWMA_50kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWMA_50kB );  break; }
-	        case ECmdCreateFileEntryWMV_200kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWMV_200kB );  break; }
-	        case ECmdCreateFileEntryEmptyFolder:    { User::Panic(_L("EmptyFolder"), 801); break; }
-	        default:                                { return KErrPathNotFound; }
-            }
-
-
-        // define the full target path
-        TFileName fullTargetPath;
-
-        if ( parameters->iFullFilePath && parameters->iFullFilePath->Des().Length() > 3 )
-            {
-            _LIT(KSlash, "\\");
-            // check the path is ok
-            fullTargetPath = parameters->iFullFilePath->Des();
-            
-            if(fullTargetPath.Right(1) == KSlash)
-                {
-                // Remove '\' from the end, because the filename check does not work with it:
-                fullTargetPath.SetLength ( fullTargetPath.Length() - 1 );
-                }
-            
-            if (!iFs.IsValidName( fullTargetPath ))
-		        User::Leave(KErrBadName);
-
-            // target path = directory + the file name from source path
-            TParse parser;
-            parser.Set(fullSourcePath, NULL, NULL);
-            
-            // Add '\' to the end:
-            fullTargetPath.Append(KSlash);            
-            // Add filename:
-            fullTargetPath.Append( parser.NameAndExt() );
-
-            LOGSTRING2("Creator: CCreatorFiles::CreateFileEntryL iFullFilePath used, fullTargetPath: %S", &fullTargetPath);
-            }
-    
-        else if ( iDirectoryQueriedFromUser.Length() > 0 )
-            {
-            // target path = directory + the file name from source path
-            TParse parser;
-            parser.Set(fullSourcePath, NULL, NULL);
-
-            fullTargetPath = iDirectoryQueriedFromUser;
-            fullTargetPath.Append( parser.NameAndExt() );
-
-            LOGSTRING2("Creator: CCreatorFiles::CreateFileEntryL iDirectoryQueriedFromUser used, fullTargetPath: %S", &fullTargetPath);
-            }
-
-        else
-            {   
-            LOGSTRING("Creator: CCreatorFiles::CreateFileEntryL leaving with KErrPathNotFound");
-            User::Leave(KErrPathNotFound);
-            }
-    
-        TBool encrypt = parameters->iEncrypt; 
-        if ( encrypt ) fullTargetPath.Append( KOma2DcfExtension );
-        // check the target path has a unique filename ie we won't overwrite existing files
-        // also generates any missing directories
-        if ( BaflUtils::FileExists( iFs, fullTargetPath ) )
-            {
-            GenerateFileNameL( fullTargetPath );
-            }
-        User::LeaveIfError(CApaApplication::GenerateFileName( iFs, fullTargetPath ) );
-        
-        if ( encrypt )
-            {
-            EncryptFileL( fullSourcePath, fullTargetPath, parameters );
-            }
-        else
-            {
-            // copy the file (synchronous function)
-            err = BaflUtils::CopyFile(iFs, fullSourcePath, fullTargetPath);
-            LOGSTRING4("Creator: CCreatorFiles::CreateFileEntryL copy %S to %S, err=%d", &fullSourcePath, &fullTargetPath, err);            
-            }
-        
-        if (err != KErrNone)
-            User::Leave(err);  // leave because copying failed
-
-        // Add fullTargetPath to store
-        iFilePaths->AppendL( fullTargetPath );
-        
-		// make sure that the file won't have a read only attribute
-		TEntry fileEntry;
-		iFs.Entry(fullTargetPath, fileEntry);
-		iFs.SetEntry(fullTargetPath, fileEntry.iModified, NULL, KEntryAttReadOnly);
-
-        // clear variables
-		parameters->iFullFilePath->Des().Copy ( KNullDesC );
-        }
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorFiles::EncryptFileL( const TDesC& aInFileName, const TDesC& aOutFileName, CFilesParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorFiles::EncryptFileL");
-    TBuf8<64> mime;
-    SetMimeTypeL( aInFileName, mime, aParameters );
-    CSupplier* supplier = CSupplier::NewLC();
-
-    CMetaDataArray* metaData = CMetaDataArray::NewLC();
-    
-    // Tell the agent which MIME type to use for the encrypted data
-    metaData->AddL( KOmaImportMimeTypeField, mime );
-
-    if ( aParameters && aParameters->iPermission )
-        {
-        // Combined Delivery file will be created
-        SetPermissionsL( metaData, aOutFileName, aParameters );
-        }
-    
-    supplier->SetOutputDirectoryL( iDirectoryQueriedFromUser );
-    
-    // The KOmaImportContentType is a OMA DRM agent specific MIME type which
-    // indicates that plain content is to be encrypted
-    CImportFile* importFile = supplier->ImportFileL( KOmaImportContentType,
-                                                     *metaData,
-                                                     aOutFileName );
-    CleanupStack::PushL( importFile );
-    
-    // Peek the source file size:
-    TInt fileLen( 0 );
-    RFile file;
-    User::LeaveIfError( file.Open( iFs, aInFileName, EFileRead ) );
-    CleanupClosePushL( file );
-    User::LeaveIfError( file.Size( fileLen ) );
-    CleanupStack::PopAndDestroy( &file );
-    
-    // Read the source file to inmemory buffer
-    RFileReadStream rs;    
-    User::LeaveIfError( rs.Open( iFs,
-                                 aInFileName,
-                                 EFileStream | EFileRead ) ); 
-    CleanupClosePushL( rs );
-    HBufC8* fileBuf = HBufC8::NewLC( fileLen );
-    TPtr8 p = fileBuf->Des();
-    rs.ReadL( p, fileLen );
-    
-    // Start encryption
-    TInt err = importFile->WriteData( p );
-    if ( err == KErrCANewFileHandleRequired )
-        {
-        RFile file;
-        User::LeaveIfError( file.Create( iFs, aOutFileName, EFileWrite ) );
-        CleanupClosePushL( file );
-        User::LeaveIfError( importFile->ContinueWithNewOutputFile( file, aOutFileName ) );
-        CleanupStack::PopAndDestroy( &file );
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }
-    User::LeaveIfError( importFile->WriteDataComplete() );
-    CleanupStack::PopAndDestroy( fileBuf );
-    CleanupStack::PopAndDestroy( &rs );    
-    CleanupStack::PopAndDestroy( importFile );
-    CleanupStack::PopAndDestroy( metaData );
-    CleanupStack::PopAndDestroy( supplier );
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorFiles::SetPermissionsL( CMetaDataArray* aMetaData, const TDesC& aOutFileName, CFilesParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorFiles::SetPermissionsL");
-    CDRMRights* rights = CDRMRights::NewL();
-    CleanupStack::PushL( rights );
-    
-    HBufC8* cnturi = HBufC8::NewL( KMaxFileName );
-    cnturi->Des().Copy( aOutFileName );
-    
-    CDRMAsset* asset = CDRMAsset::NewLC();
-    asset->iUid = cnturi;
-    // Set the asset to the rights class, it will duplicate the asset
-    rights->SetAssetL( *asset );
-    CleanupStack::PopAndDestroy( asset );
-    
-    rights->SetPermissionL( *aParameters->iPermission );
-    
-    // Construct externalized presentation of the rights object
-    TInt rightsSize = 1024 *100;
-    HBufC8* rightBuf = HBufC8::NewLC( rightsSize ); 
-    TPtr8 bptr = rightBuf->Des();
-    bptr.SetLength( rightsSize );
-    RMemWriteStream iWriteStream;
-    iWriteStream.Open( (TAny*)(rightBuf->Ptr() ), rightsSize );
-    CleanupClosePushL( iWriteStream );
-    iWriteStream << *rights;
-    iWriteStream.CommitL();
-    TPtr8 rp = rightBuf->Des();
-    
-    // Add rights to metadata
-    aMetaData->AddL( KOmaImportRightsField, rp );
-    CleanupStack::PopAndDestroy( &iWriteStream );
-    CleanupStack::PopAndDestroy( rightBuf );
-    CleanupStack::PopAndDestroy( rights );
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorFiles::SetMimeTypeL( const TDesC& aFileName, TDes8& aMime, CFilesParameters *aParameters )
-    {
-    LOGSTRING("Creator: CCreatorFiles::SetMimeTypeL");
-    TUid appUid;
-    TDataType dataType;
-    User::LeaveIfError( iApaLs.AppForDocument( aFileName, appUid, dataType ) );
-    if ( dataType.Des().Length() )
-        {
-        aMime.Copy( dataType.Des() );    
-        }
-    else
-        {
-        // set default mime, because it was not recognized by iApaLs
-        aMime.Copy( _L("text/plain") );
-        }
-
-    // set DRM permissions according the type of the file
-    if ( aParameters->iPermission )
-        {
-        if ( dataType.Des().FindF( _L("image") ) > KErrNotFound )
-            {
-            aParameters->iPermission->iAvailableRights = ERightsDisplay | ERightsPrint;
-            }
-        else if ( dataType.Des().FindF( _L("audio") ) > KErrNotFound ||
-                  dataType.Des().FindF( _L("video") ) > KErrNotFound ||
-                  dataType.Des().FindF( _L("tone") ) > KErrNotFound || // e.g. application/vnd.nokia.ringing-tone
-                  dataType.Des().FindF( _L("realmedia") ) > KErrNotFound )
-            {
-            // media files
-            aParameters->iPermission->iAvailableRights = ERightsPlay;
-            }
-        else if ( dataType.Des().FindF( _L("archive") ) > KErrNotFound ||
-                  dataType.Des().FindF( _L("x-sis") ) > KErrNotFound )
-            {
-            // application/java-archive
-            // x-epoc/x-sisx-app
-            aParameters->iPermission->iAvailableRights = ERightsExecute;
-            }
-        else if ( dataType.Des().FindF( _L("application") ) > KErrNotFound ||
-                  dataType.Des().FindF( _L("text") ) > KErrNotFound )
-            {
-            // application/msexcel
-            // application/msword
-            // text/plain
-            // etc.
-            aParameters->iPermission->iAvailableRights = ERightsDisplay | ERightsPrint;
-            }
-        else
-            {
-            // other filetype
-            aParameters->iPermission->iAvailableRights = ERightsDisplay;
-            }
-        }
-    }
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorFiles::AskDRMDataFromUserL()
-    {
-    LOGSTRING("Creator: CCreatorFiles::AskDRMDataFromUserL");
-    // Encryption -dialog
-    CDesCArrayFlat* items = new(ELeave) CDesCArrayFlat(5);
-    CleanupStack::PushL(items);
-
-    // Add entires to list
-    items->AppendL( _L("None") );
-    items->AppendL( _L("DRM Forward Lock") );
-    items->AppendL( _L("DRM Combined Delivery") );
-
-    
-	// create a popup list
-    iDummy = 0;
-    TBool retval = iEngine->GetEngineWrapper()->PopupListDialog(_L("Encryption"), items, &iDummy, this, ECreatorFilesAskDRMData );
-    CleanupStack::PopAndDestroy( items );
-    return retval;
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorFiles::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorFiles::DeleteAllL");
-    User::Leave( KErrNotSupported ); // will not be supported
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorFiles::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorFiles::DeleteAllCreatedByCreatorL");
-    iFileId = 1;
-    CDictionaryFileStore* store = iEngine->FileStoreLC();
-    User::LeaveIfNull( store );
-        
-    if ( store->IsPresentL( KUidDictionaryUidFiles ) )
-        {
-        RDictionaryReadStream in;
-        in.OpenLC( *store, KUidDictionaryUidFiles );
-        CFileMan* fileMan = CFileMan::NewL( iFs );
-        CleanupStack::PushL( fileMan );
-        TFileName fullPath;
-        // ignore return value, don't update iFileId here:
-        TRAPD( err, in.ReadInt32L() );
-        while ( !err )
-            {
-            TInt len( KErrNotFound );
-            TRAP( err, len = in.ReadInt8L() );  // will leave with KErrEof
-            if ( !err )
-                {
-                TRAP( err, in.ReadL( fullPath, len ) );                    
-                }
-            if ( !err )
-                {
-                TEntry fileEntry;
-                iFs.Entry( fullPath, fileEntry );
-                if ( fileEntry.IsDir() )
-                    {
-                    fileMan->RmDir( fullPath ); // ignore return value
-                    }
-                else
-                    {
-                    iFs.Delete( fullPath ); // ignore return value    
-                    }                    
-                }
-            }
-        CleanupStack::PopAndDestroy( fileMan );
-        CleanupStack::PopAndDestroy( &in );
-        
-        // files deleted, remove the Creator internal file registry
-        store->Remove( KUidDictionaryUidFiles );
-        store->CommitL();
-        }
-    CleanupStack::PopAndDestroy( store );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorFiles::StorePathsForDeleteL( CDesCArray& aPaths )
-    {
-    LOGSTRING("Creator: CCreatorFiles::StorePathsForDeleteL");
-    CDictionaryFileStore* store = iEngine->FileStoreLC();
-    User::LeaveIfNull( store );
-    
-    // backup previous filepaths from store
-    // otherwise they would be overwritten when calling out.WriteL
-    CDesCArray* previousPaths = new (ELeave) CDesCArrayFlat( 4 );
-    CleanupStack::PushL( previousPaths );
-    
-    TFileName fullPath;
-    
-    if ( store->IsPresentL( KUidDictionaryUidFiles ) )
-        {
-        RDictionaryReadStream in;
-        in.OpenLC( *store, KUidDictionaryUidFiles );
-        // ignore return value, don't update iFileId here:
-        TRAPD( err, in.ReadInt32L() );
-        while ( !err ) 
-            {
-            TRAP( err,
-                TInt len = in.ReadInt8L(); // will leave with KErrEof
-                in.ReadL( fullPath, len );
-                previousPaths->AppendL( fullPath );
-                );
-            }
-        CleanupStack::PopAndDestroy(); // in
-        }
-    
-    RDictionaryWriteStream out;       
-    out.AssignLC( *store, KUidDictionaryUidFiles );
-    
-    // write latest file id to store
-    out.WriteInt32L( iFileId );
-    
-    // restore previous paths to store
-    for ( TInt i = 0; i < previousPaths->Count(); i++ )
-        {
-        out.WriteInt8L( (*previousPaths)[i].Length() );
-        out.WriteL( (*previousPaths)[i] );            
-        }
-
-    // write new paths to store
-    for ( TInt i = 0; i < aPaths.Count(); i++ )
-        {
-        out.WriteInt8L( aPaths[i].Length() );
-        out.WriteL( aPaths[i] );            
-        }
-    
-    out.CommitL();
-    CleanupStack::PopAndDestroy(); // out
-    
-    store->CommitL();
-    CleanupStack::PopAndDestroy( previousPaths );
-    CleanupStack::PopAndDestroy( store );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorFiles::GenerateFileNameL( TFileName& aRootName )
-    {
-    LOGSTRING("Creator: CCreatorFiles::GenerateFileNameL");
-    if ( iFileId )
-        {
-        TBuf<16> extension;
-        if ( iFileId < 10 )
-            {
-            extension.Format( _L("(0%d)"), iFileId );     
-            }
-        else
-            {
-            extension.Format( _L("(%d)"), iFileId );
-            }
-        aRootName.Insert( aRootName.Locate( '.' ), extension );
-        }
-    iFileId++;
-    }
-
-// End of file
--- a/creator/engine/src/creator_fileelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +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 "creator_fileelement.h"
-#include <DrmPermission.h>
-#include <DrmConstraint.h>
-#include "creator_traces.h"
-#include "creator_file.h"
-
-using namespace creatorfile;
-
-// 15 minutes per time zone, 60 seconds per minute
-const TInt KSecondsPerTimeZone = 900;
-const TInt KMinuteInMicroseconds = 60000000;
-const TInt KTimeZoneIncrement = 15;
-
-/*
- * 
- */
-CCreatorFileElement* CCreatorFileElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorFileElement* self = new (ELeave) CCreatorFileElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorFileElement::CCreatorFileElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-
-    TTime currUniversal;
-    TTime currLocal;
-    TInt64 result( 0 );
-    currUniversal.UniversalTime();
-    currLocal.HomeTime();
-    result = currLocal.Int64() - currUniversal.Int64();
-    result /= KMinuteInMicroseconds;
-    result /= KTimeZoneIncrement;
-    iTimeZone = I64INT( result );
-    }
-/*
- * 
- */
-void CCreatorFileElement::ExecuteCommandL()
-    {
-    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
-    TInt fileAmount = 1;    
-    if( amountAttr )
-        {
-        fileAmount = ConvertStrToIntL(amountAttr->Value());
-        }
-    // Get 'fields' element 
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    if( fieldsElement && fieldsElement->SubElements().Count() > 0)
-        {
-        // Get sub-elements
-        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();
-        // Create files, the amount of files is defined by fileAmount:
-        for( TInt cI = 0; cI < fileAmount; ++cI )
-            {
-            CFilesParameters* param = new (ELeave) CFilesParameters;
-            CleanupStack::PushL( param );
-            
-            for( TInt i = 0; i < fields.Count(); ++i )
-                {
-                CCreatorScriptElement* field = fields[i];
-                TPtrC elemName = field->Name();
-                TPtrC elemContent = field->Content();
-
-                const CCreatorScriptAttribute* randomAttr = field->FindAttributeByName( KRandomLength );
-                
-                if( elemName == KType )
-                    {
-                    param->iFileCommand = GetFileCommandL(elemContent, randomAttr || elemContent.Length() == 0);
-                    }
-                else if( elemName == KDirectory )
-                    {
-                    delete param->iFullFilePath;
-                    param->iFullFilePath = 0;
-                    if( randomAttr == 0 && elemContent.Length() > 0 )
-                    	{
-                    	param->iFullFilePath = elemContent.AllocL();
-                    	}
-                    else
-                        {
-                        TFileName defaultPath;
-                        iEngine->SetDefaultPathForFileCommandL( param->iFileCommand, defaultPath );
-                        param->iFullFilePath = defaultPath.AllocL();
-                        }
-                    }
-                else if ( elemName == KEncryption )
-                    {
-                    ParseDRMElementsL( field, param );
-                    }
-                }
-
-            if ( !param->iFileCommand )
-                {
-                param->iFileCommand = ECmdCreateFileEntryEmptyFolder;
-                }
-            iEngine->AppendToCommandArrayL( param->iFileCommand, param);
-            CleanupStack::Pop( param );
-            }
-        }
-    else
-    	{
-    	_LIT(KDummy, "");
-    	for( TInt cI = 0; cI < fileAmount; ++cI )
-    		{
-    		CFilesParameters* param = new (ELeave) CFilesParameters;
-    		CleanupStack::PushL(param);
-    		delete param->iFullFilePath;
-    		param->iFullFilePath = 0;
-    		TFileName defaultPath;
-    		param->iFileCommand = GetFileCommandL(KDummy, ETrue);
-    		iEngine->SetDefaultPathForFileCommandL(param->iFileCommand, defaultPath);                
-    		param->iFullFilePath = defaultPath.AllocL();
-    		
-    		iEngine->AppendToCommandArrayL(param->iFileCommand, param);
-    		CleanupStack::Pop(param);
-    		}
-    	}
-    }
-
-TInt CCreatorFileElement::GetFileCommandL( const TDesC& aFileIdStr, TBool aRandom ) const
-    {
-    TInt mapCount = sizeof(FileMap) / sizeof(FileMapping);
-    
-    if( aRandom )
-        {
-        return FileMap[iEngine->RandomNumber(0, mapCount-1)].CommandId();
-        }
-    
-    for( TInt i = 0; i < mapCount; ++i )
-        {
-        if( CompareIgnoreCase(FileMap[i].FileName(), aFileIdStr) == 0 )
-            return FileMap[i].CommandId();
-        }
-    LOGSTRING2("CCreatorFileElement::GetFileCommandL: Unknown file id: %S", &aFileIdStr);
-    User::Leave(KErrGeneral);
-    return 0; // Not reached, but disables compiler warning...
-    }
-
-void CCreatorFileElement::ParseDRMElementsL( CCreatorScriptElement* aField, CFilesParameters* aParam )
-    {
-    const CCreatorScriptAttribute* encryptionTypeAttr = aField->FindAttributeByName( KType );
-    if ( encryptionTypeAttr && encryptionTypeAttr->Value().Length() > 0 )
-        {
-        aParam->iEncrypt = ETrue;
-        if ( encryptionTypeAttr->Value() == KDRMCD ) 
-            {
-            delete aParam->iPermission;
-            aParam->iPermission = NULL;
-            // ownership transferred:
-            aParam->iPermission = CDRMPermission::NewL();
-            }
-        else if ( encryptionTypeAttr->Value() != KDRMFL )
-            {
-            // must be either KDRMCD or KDRMFL
-            User::Leave( KErrArgument );
-            }
-        }
-    else
-        {
-        User::Leave( KErrArgument );
-        }
-    
-    const RPointerArray<CCreatorScriptElement>& rights = aField->SubElements();
-    
-    if ( encryptionTypeAttr->Value() == KDRMFL && rights.Count() )
-        {
-        // Right definitions not allowed with DRM Forward Lock
-        // User::Leave( KErrArgument ); // Do not leave here
-        return; // Just omit rights definitions
-        }
-    
-    // parse right elements
-    CDRMPermission* drmPermission = aParam->iPermission;
-    for ( TInt r = 0; r < rights.Count(); r++ )
-        {
-        const CCreatorScriptAttribute* rightAttr = rights[r]->FindAttributeByName( KType );
-        if ( rightAttr->Value() == KDRMPlayRight &&
-             !( drmPermission->iAvailableRights & ERightsPlay ) )
-            {
-            drmPermission->iAvailableRights |= ERightsPlay;
-            ParseDRMConstraintsL( rights[r], drmPermission->iPlay );
-            }
-        else if ( rightAttr->Value() == KDRMDisplayRight  &&
-                !( drmPermission->iAvailableRights & ERightsDisplay ))
-            {
-            drmPermission->iAvailableRights |= ERightsDisplay;
-            ParseDRMConstraintsL( rights[r], drmPermission->iDisplay );
-            }
-        else if ( rightAttr->Value() == KDRMPrintRight  &&
-                !( drmPermission->iAvailableRights & ERightsPrint ) )
-            {
-            drmPermission->iAvailableRights |= ERightsPrint;
-            ParseDRMConstraintsL( rights[r], drmPermission->iPrint );
-            }
-        else if ( rightAttr->Value() == KDRMExecuteRight  &&
-                !( drmPermission->iAvailableRights & ERightsExecute ) )
-            {
-            drmPermission->iAvailableRights |= ERightsExecute;
-            ParseDRMConstraintsL( rights[r], drmPermission->iExecute );
-            }
-        }
-    }
-
-void CCreatorFileElement::ParseDRMConstraintsL( CCreatorScriptElement* aRight, CDRMConstraint* aConstraint )
-    {
-    const RPointerArray<CCreatorScriptElement>& constraints = aRight->SubElements();
-    for ( TInt c = 0; c < constraints.Count(); c++ )
-        {
-        TPtrC elemName = constraints[c]->Name();
-        TPtrC elemContent = constraints[c]->Content();
-        if ( elemName == KDRMCount )
-            {
-            TInt count = ConvertStrToIntL( elemContent );
-            // apply count constraint
-            aConstraint->iActiveConstraints |= EConstraintCounter;
-            aConstraint->iCounter = count;
-            aConstraint->iOriginalCounter = count;
-            }
-        else if ( elemName == KDRMInterval )
-            {
-            // apply interval constraint           
-            aConstraint->iActiveConstraints |= EConstraintInterval;
-            aConstraint->iInterval = ParseTimeInterval( elemContent );
-            aConstraint->iIntervalStart = Time::NullTTime();
-            }
-        else if ( elemName == KDRMStartTime )
-            {
-            // apply start time constraint           
-            aConstraint->iActiveConstraints |= EConstraintStartTime;
-            TTimeIntervalSeconds offset( iTimeZone * KSecondsPerTimeZone );
-            aConstraint->iStartTime = ConvertToDateTimeL( elemContent ) - offset;
-            }
-        else if ( elemName == KDRMEndTime )
-            {
-            // apply end time constraint
-            aConstraint->iActiveConstraints |= EConstraintEndTime;
-            TTimeIntervalSeconds offset( iTimeZone * KSecondsPerTimeZone );
-            aConstraint->iEndTime = ConvertToDateTimeL( elemContent ) - offset;
-            }
-        else if ( elemName == KDRMAccumulated )
-            {
-            // apply accumulated time constraint
-            aConstraint->iActiveConstraints |= EConstraintAccumulated;
-            if ( aConstraint->iEndTime == Time::NullTTime() )
-                {
-                aConstraint->iEndTime = Time::MaxTTime();
-                }
-            if ( aConstraint->iStartTime == Time::NullTTime() )
-                {
-                aConstraint->iStartTime = Time::MinTTime();
-                }
-            aConstraint->iAccumulatedTime = ParseTimeInterval( elemContent );
-            }
-        }
-    }
-
-TTimeIntervalSeconds CCreatorFileElement::ParseTimeInterval( TDesC& aTimeString )
-    {
-    // Iso8601 format (P1Y2M3DT4H5M6S) to TimeIntervalSeconds
-    TLex lex;
-    TInt year = 0;
-    TInt month = 0;
-    TInt day = 0;
-    TInt hour = 0;
-    TInt minute = 0;
-    TInt second = 0;
-
-    if (aTimeString.Length() > 0)
-        {    
-        lex = aTimeString;
-        lex.Inc(); // skip 'P'
-        lex.Val(year);
-        lex.Inc();
-        lex.Val(month);
-        lex.Inc();
-        lex.Val(day);
-        lex.Inc(2);
-        lex.Val(hour);
-        lex.Inc();
-        lex.Val(minute);
-        lex.Inc();
-        lex.Val(second);
-        }
-    TTimeIntervalSeconds result( ( ( ( year * 365 + month * 30 + day ) * 24 + hour )
-                * 60 + minute ) * 60 + second );
-    return result;
-    }
-
-// End of file
--- a/creator/engine/src/creator_landmark.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,502 +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 <EPos_CPosLandmarkDatabase.h>
-#include <EPos_CPosLmCategoryManager.h>
-#include <lbsposition.h>
-
-#include "engine.h"
-#include "enginewrapper.h"
-#include "creator_landmark.h" 
-#include "creator_traces.h"
-
-_LIT(KAccommodation, "accommodation");
-_LIT(KBusiness, "business");
-_LIT(KCommunication, "communication");
-_LIT(KEducational, "educational");
-_LIT(KEntertainment, "entertainment");
-_LIT(KFoodAndBeverage, "food");
-_LIT(KGeographical, "geographical");
-_LIT(KOutdoor, "outdoor");
-_LIT(KPeople, "people");
-_LIT(KPublic, "public");
-_LIT(KReligious, "religious");
-_LIT(KShopping, "shopping");
-_LIT(KSightseeing, "sightseeing");
-_LIT(KSports, "sports");
-_LIT(KTransport, "transport");
-
-
-/**
- * Class mapping the strings to global landmark categories
- */
-class CategoryMapping
-{
-public:
-    CategoryMapping(TUint aId, const TDesC& aCategoryStr)
-    : 
-    iGlobalId(aId),
-    iStr(aCategoryStr)
-    {}
-
-    TPosLmGlobalCategory iGlobalId;
-    const TDesC& iStr;
-};
-
-/**
- * Global landmark categories
- */
-CategoryMapping LandmarkCategories[] =    {
-        CategoryMapping(3000, KAccommodation), // Accommodation
-        CategoryMapping(6000, KBusiness), // Business
-        CategoryMapping(9000, KCommunication), // Communication
-        CategoryMapping(12000, KEducational), // Educational institute
-        CategoryMapping(15000, KEntertainment), // Entertainment
-        CategoryMapping(18000, KFoodAndBeverage), // Food & Beverage
-        CategoryMapping(21000, KGeographical), // Geographical area
-        CategoryMapping(24000, KOutdoor), // Outdoor activities        
-        CategoryMapping(27000, KPeople), // People
-        CategoryMapping(30000, KPublic), // Public service
-        CategoryMapping(33000, KReligious), // Religious places
-        CategoryMapping(36000, KShopping), // Shopping
-        CategoryMapping(39000, KSightseeing), // Sightseeing
-        CategoryMapping(42000, KSports), // Sports
-        CategoryMapping(45000, KTransport)  // Transport
-};
-
-/**
- * Return landmark global id
- */ 
-TPosLmGlobalCategory CCreatorLandmarks::GetCategoryIdL(const TDesC& aCategoryStr)
-    {
-    TUint numOfCategories = sizeof(LandmarkCategories)/sizeof(CategoryMapping);
-    for( TUint i = 0; i < numOfCategories; ++i )
-        {
-        if( LandmarkCategories[i].iStr == aCategoryStr )
-            return LandmarkCategories[i].iGlobalId;
-        }
-    
-    return 0;
-    }
-
-/**
- *
- */ 
-CLandmarkParameters::CLandmarkParameters()
-    {
-    LOGSTRING("Creator: CLandmarkParameters::CLandmarkParameters");
-    }
-
-/**
- *
- */
-CLandmarkParameters::~CLandmarkParameters()
-    {
-    LOGSTRING("Creator: CLandmarkParameters::~CLandmarkParameters");
-    delete iName;    
-    delete iStreet;
-    delete iCity;    
-    delete iState;
-    delete iCountry;
-    delete iPostCode;    
-    delete iDescription;
-    delete iPhonenumber;
-    delete iUrl;
-    iCategories.Close();
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomNameL(CCreatorEngine& aEngine)
-    {    
-    TPtrC name(aEngine.RandomString(CCreatorEngine::ELandmarkName));
-    delete iName;
-    iName = 0;
-    iName = HBufC::NewL(name.Length());
-    iName->Des().Copy(name);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomUrlL(CCreatorEngine& aEngine)
-    {
-    _LIT(KUrlPrefix, "http://www.");
-    _LIT(KUrlPostfix, ".com");
-    TPtrC company(aEngine.RandomString(CCreatorEngine::ECompany));
-    delete iUrl;
-    iUrl = 0;
-    iUrl = HBufC::NewL(KUrlPrefix().Length()+company.Length()+KUrlPostfix().Length());
-    iUrl->Des() = KUrlPrefix;
-    iUrl->Des().Append( company );
-    iUrl->Des().Append( KUrlPostfix );
-    }
-
-/**
- *
- */
-void CLandmarkParameters::AddRandomCategoryL(CCreatorEngine& aEngine)
-    {
-    TUint numOfCategories = sizeof(LandmarkCategories)/sizeof(CategoryMapping);
-    iCategories.AppendL(LandmarkCategories[aEngine.RandomNumber(0, numOfCategories-1)].iGlobalId);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomStreetL(CCreatorEngine& aEngine)
-    {
-    TPtrC street(aEngine.RandomString(CCreatorEngine::EAddress));
-    delete iStreet;
-    iStreet = 0;
-    iStreet = HBufC::NewL(street.Length());
-    iStreet->Des().Copy(street);
-    }
- 
-/**
- *
- */
-void CLandmarkParameters::SetRandomCityL(CCreatorEngine& aEngine)
-    {
-    TPtrC city(aEngine.RandomString(CCreatorEngine::ECity));
-    delete iCity;
-    iCity = 0;
-    iCity = HBufC::NewL(city.Length());
-    iCity->Des().Copy(city);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomStateL(CCreatorEngine& aEngine)
-    {
-    TPtrC state(aEngine.RandomString(CCreatorEngine::EState));
-    delete iState;
-    iState = 0;
-    iState = HBufC::NewL(state.Length());
-    iState->Des().Copy(state);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomCountryL(CCreatorEngine& aEngine)
-    {
-    TPtrC country(aEngine.RandomString(CCreatorEngine::ECountry));
-    delete iCountry;
-    iCountry = 0;
-    iCountry = HBufC::NewL(country.Length());
-    iCountry->Des().Copy(country);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomPostCodeL(CCreatorEngine& aEngine)
-    {
-    TPtrC po(aEngine.RandomString(CCreatorEngine::EPostcode));
-    delete iPostCode;
-    iPostCode = 0;
-    iPostCode = HBufC::NewL(po.Length());
-    iPostCode->Des().Copy(po);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomLatitudeL(CCreatorEngine& aEngine)
-    {
-    iLatitude = aEngine.RandomNumber(-89, 89); // Degrees
-    TReal64 random = aEngine.RandomNumber(0, 9999); // Desimals 
-    iLatitude +=  random / 10000.0;
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomLongitudeL(CCreatorEngine& aEngine)
-    {
-    TInt minDegrees = -179;
-    TInt maxDegrees = 179;
-    TInt minDecimal = 0;
-    TInt maxDecimal = 9999;
-    TReal64 divider = 10000.0;
-    iLongitude = aEngine.RandomNumber(minDegrees, maxDegrees); // Degrees
-    TReal64 random = aEngine.RandomNumber(minDecimal, maxDecimal); 
-    iLongitude += random  / divider;
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomPositionAccuracyL(CCreatorEngine& aEngine)
-    {
-    this->iPositionAccuracy = aEngine.RandomNumber(0,5);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomAltitudeL(CCreatorEngine& aEngine)
-    {
-    this->iAltitude = aEngine.RandomNumber(0,120);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomAltitudeAccuracyL(CCreatorEngine& aEngine)
-    {
-    this->iAltitudeAccuracy = aEngine.RandomNumber(0,5);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomDescriptionL(CCreatorEngine& aEngine)
-    {
-    delete iDescription;
-    iDescription = 0;
-    TPtrC desc(aEngine.RandomString(CCreatorEngine::ELandmarkDescription));
-    iDescription = HBufC::NewL(desc.Length());
-    iDescription->Des().Copy(desc);
-    }
-
-/**
- *
- */
-void CLandmarkParameters::SetRandomPhoneNumberL(CCreatorEngine& aEngine)
-    {
-    delete iPhonenumber;
-    iPhonenumber = 0;
-    TPtrC phone(aEngine.RandomString(CCreatorEngine::EPhoneNumber));
-    iPhonenumber = HBufC::NewL(phone.Length());
-    iPhonenumber->Des().Copy(phone);
-    }
-
-/**
- *
- */
-CCreatorLandmarks::CCreatorLandmarks()
-    {
-    }
-
-/**
- *
- */
-CCreatorLandmarks* CCreatorLandmarks::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorLandmarks* self = CCreatorLandmarks::NewLC(aEngine);
-    CleanupStack::Pop(); // self
-    return self;
-    }
-
-/**
- *
- */
-CCreatorLandmarks* CCreatorLandmarks::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorLandmarks* self = new (ELeave) CCreatorLandmarks;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-/**
- *
- */
-void CCreatorLandmarks::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorLandmarks::ConstructL");
-    iEngine = aEngine;
-    iLandmarkDb = CPosLandmarkDatabase::OpenL();
-    if( iLandmarkDb->IsInitializingNeeded() )
-        {
-        ExecuteAndDeleteLD(iLandmarkDb->InitializeL());
-        }
-    }
-
-/**
- *
- */
-CCreatorLandmarks::~CCreatorLandmarks()
-    {
-    LOGSTRING("Creator: CCreatorLandmarks::~CCreatorLandmarks");
-    if ( iEngine && iEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidLandmarks ) );
-        }
-    iEntryIds.Reset();
-    iEntryIds.Close();
-    
-    delete iLandmarkDb;
-    delete iLmOperation;
-    delete iParameters;
-    }
-
-/**
- *
- */
-TBool CCreatorLandmarks::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorLandmarks::AskDataFromUserL");
-    
-    CCreatorModuleBase::AskDataFromUserL( aCommand );
-    
-    if ( aCommand == ECmdDeleteLandmarks )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Landmarks?"), this, ECreatorModuleDelete );
-        }
-    else if ( aCommand ==  ECmdDeleteCreatorLandmarks )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Landmarks created with Creator?"), this, ECreatorModuleDelete );
-        }
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many landmarks to create?"), EFalse, this, ECreatorModuleStart );    
-    }
-
-/**
- * Convert global category id to local category id
- */
-TPosLmItemId CCreatorLandmarks::GetCategoryIdL( TPosLmGlobalCategory aGlobalCategoryID )
-{
-    CPosLmCategoryManager* categoryManager = CPosLmCategoryManager::NewL( *iLandmarkDb );
-    CleanupStack::PushL( categoryManager );
-
-    // Find ID of the given global category in given database
-    TPosLmItemId id = categoryManager->GetGlobalCategoryL( aGlobalCategoryID );
-    CleanupStack::PopAndDestroy(); // categoryManager
-    return id;
-}
-
-/**
- *
- */
-TInt CCreatorLandmarks::CreateLandmarkEntryL(CLandmarkParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorLandmarks::CreateLandmarkEntryL");
-    TInt err = KErrNone;
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-        
-    CLandmarkParameters* parameters = aParameters;
-        
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CLandmarkParameters;
-        parameters = iParameters;
-            
-        TBuf<160> company = iEngine->RandomString(CCreatorEngine::ECompany);
-
-        parameters->SetRandomNameL(*iEngine);
-        parameters->SetRandomUrlL(*iEngine);
-        parameters->AddRandomCategoryL(*iEngine);
-        parameters->SetRandomStreetL(*iEngine);
-        parameters->SetRandomCityL(*iEngine);
-        parameters->SetRandomStateL(*iEngine);
-        parameters->SetRandomCountryL(*iEngine);
-        parameters->SetRandomPostCodeL(*iEngine);
-        parameters->SetRandomLatitudeL(*iEngine);
-        parameters->SetRandomLongitudeL(*iEngine);
-        parameters->SetRandomPositionAccuracyL(*iEngine);
-        parameters->SetRandomAltitudeL(*iEngine);
-        parameters->SetRandomAltitudeAccuracyL(*iEngine);
-        parameters->SetRandomDescriptionL(*iEngine);
-        parameters->SetRandomPhoneNumberL(*iEngine);
-        }
-    
-    CPosLandmark* newLandmark = CPosLandmark::NewLC();        
-    TCoordinate crd(parameters->iLatitude, parameters->iLongitude, parameters->iAltitude);
-    TLocality loc(crd, parameters->iPositionAccuracy, parameters->iAltitudeAccuracy);
-    newLandmark->SetPositionL(loc);
-    
-    // Add categories
-    for( TInt i = 0; i < parameters->iCategories.Count(); ++i )
-        {
-        newLandmark->AddCategoryL(GetCategoryIdL(parameters->iCategories[i]));
-        }
-    if( parameters->iName )    
-        newLandmark->SetLandmarkNameL(parameters->iName->Des());    
-    if( parameters->iCountry )
-        newLandmark->SetPositionFieldL(EPositionFieldCountry, parameters->iCountry->Des());
-    if( parameters->iCity )
-        newLandmark->SetPositionFieldL(EPositionFieldCity, parameters->iCity->Des());
-    if( parameters->iPostCode )
-        newLandmark->SetPositionFieldL(EPositionFieldPostalCode, parameters->iPostCode->Des());
-    if( parameters->iState )
-        newLandmark->SetPositionFieldL(EPositionFieldState, parameters->iState->Des());
-    if( parameters->iStreet )
-        newLandmark->SetPositionFieldL(EPositionFieldStreet, parameters->iStreet->Des());
-    if( parameters->iPhonenumber )
-        newLandmark->SetPositionFieldL(EPositionFieldBuildingTelephone, parameters->iPhonenumber->Des());
-    if( parameters->iDescription )
-        newLandmark->SetLandmarkDescriptionL(parameters->iDescription->Des());    
-    if( parameters->iUrl )
-        newLandmark->SetPositionFieldL(EPositionFieldMediaLinksStart, parameters->iUrl->Des());
-    
-    TRAP(err, iLandmarkDb->AddLandmarkL(*newLandmark));
-    
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    iEntryIds.AppendL( newLandmark->LandmarkId() );
-
-    ExecuteAndDeleteLD(iLandmarkDb->CompactL());
-    
-    CleanupStack::PopAndDestroy(newLandmark);
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorLandmarks::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorLandmarks::DeleteAllL");
-    ExecuteAndDeleteLD( iLandmarkDb->RemoveAllLandmarksL() );
-    ExecuteAndDeleteLD( iLandmarkDb->CompactL() );
-
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Landmarks related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidLandmarks );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorLandmarks::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorLandmarks::DeleteAllCreatedByCreatorL");
-    iEntryIds.Reset();
-    
-    // fetch ids of entries created by Creator
-    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidLandmarks );
-    
-    // delete entries
-    TRAP_IGNORE(
-        ExecuteAndDeleteLD( iLandmarkDb->RemoveLandmarksL( iEntryIds ) );
-        ExecuteAndDeleteLD( iLandmarkDb->CompactL() );
-        );
-
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Landmarks related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidLandmarks );
-    }
-
-
--- a/creator/engine/src/creator_landmarkelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +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 "creator_landmarkelement.h"
-#include "creator_traces.h"
-#include "creator_landmark.h"
-
-using namespace creatorlandmark;
-
-/*
- * 
- */
-CCreatorLandmarkElement* CCreatorLandmarkElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorLandmarkElement* self = new (ELeave) CCreatorLandmarkElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorLandmarkElement::CCreatorLandmarkElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
-
-void CCreatorLandmarkElement::ExecuteCommandL()
-    {
-    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
-    TInt lmAmount = 1;    
-    if( amountAttr )
-        {
-        lmAmount = ConvertStrToIntL(amountAttr->Value());
-        }
-    // Get 'fields' element 
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-        {
-        // Get sub-elements
-        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
-        // Create note entries, the amount of entries is defined by noteAmount:
-        for( TInt cI = 0; cI < lmAmount; ++cI )
-            {            
-            CLandmarkParameters* param = new (ELeave) CLandmarkParameters;
-            CleanupStack::PushL(param);
-            
-            for( TInt i = 0; i < fields.Count(); ++i )
-                {
-                CCreatorScriptElement* field = fields[i];
-                TPtrC elemName = field->Name();
-                TPtrC elemContent = field->Content();
-                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
-                TBool useRandom = EFalse;
-                if( randomAttr || elemContent.Length() == 0 )
-                    {
-                    useRandom = ETrue;
-                    }
-                
-                if( elemName == KName )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomNameL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iName, elemContent);
-                        }
-                    }
-                else if( elemName == KCategory )
-                    {
-                    if( useRandom )
-                        {
-                        param->AddRandomCategoryL(*iEngine);
-                        }                    
-                    else
-                        {
-                        TPosLmItemId categoryId = CCreatorLandmarks::GetCategoryIdL(elemContent);
-                        if( categoryId > 0 )
-                            {
-                            param->iCategories.AppendL(categoryId);
-                            }
-                        }
-                    }
-                else if( elemName == KDescription )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomDescriptionL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iDescription, elemContent);
-                        }
-                    }
-                else if( elemName == KStreet )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomStreetL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iStreet, elemContent);
-                        }
-                    }
-                else if( elemName == KPostalcode )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomPostCodeL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iPostCode, elemContent);
-                        }
-                    }
-                else if( elemName == KCity )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomCityL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iCity, elemContent);
-                        }
-                    }
-                else if( elemName == KState )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomStateL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iState, elemContent);
-                        }
-                    }
-                else if( elemName == KCountry )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomCountryL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iCountry, elemContent);
-                        }
-                    }
-                else if( elemName == KPhonenumber )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomPhoneNumberL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iPhonenumber, elemContent);
-                        }
-                    }
-                else if( elemName == KUrl )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomUrlL(*iEngine);
-                        }                    
-                    else
-                        {
-                        SetContentToTextParamL(param->iUrl, elemContent);
-                        }
-                    }
-                else if( elemName == KLatitude )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomLatitudeL(*iEngine);
-                        }                    
-                    else
-                        {
-                        ConvertStrToReal64L(elemContent, param->iLatitude);
-                        }
-                    }
-                else if( elemName == KLongitude )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomLongitudeL(*iEngine);
-                        }                    
-                    else
-                        {
-                        ConvertStrToReal64L(elemContent, param->iLongitude);
-                        }
-                    }
-                else if( elemName == KPositionaccuracy )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomPositionAccuracyL(*iEngine);
-                        }                    
-                    else
-                        {
-                        param->iPositionAccuracy = ConvertStrToIntL(elemContent);
-                        }
-                    }
-                else if( elemName == KAltitude )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomAltitudeL(*iEngine);
-                        }                    
-                    else
-                        {
-                        ConvertStrToReal32L(elemContent, param->iAltitude);
-                        }
-                    }
-                else if( elemName == KAltitudeaccuracy )
-                    {
-                    if( useRandom )
-                        {
-                        param->SetRandomAltitudeAccuracyL(*iEngine);
-                        }                    
-                    else
-                        {
-                        param->iAltitudeAccuracy = ConvertStrToIntL(elemContent);
-                        }
-                    }
-                }
-            iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryLandmarks, param);
-            CleanupStack::Pop(); // param
-            }
-        }
-    else
-    	{
-    	iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryLandmarks, 0, lmAmount);
-    	}
-    }
--- a/creator/engine/src/creator_log.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,486 +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 <cntdef.h>
-
-#include "engine.h"
-#include "enginewrapper.h"
-#include "creator_log.h" 
-#include "creator_traces.h"
-
-static const TInt KLogsFieldLength = 256;
-
-//_LIT(KCreatorLogsPrefixName, "CR_");
-
-//----------------------------------------------------------------------------
-
-CLogsParameters::CLogsParameters()
-    {
-    LOGSTRING("Creator: CLogsParameters::CLogsParameters");
-
-    iPhoneNumber = HBufC::New(KLogsFieldLength);
-    /*iMissedCallPhoneNumber = HBufC::New(KLogsFieldLength);
-    iReceivedCallPhoneNumber = HBufC::New(KLogsFieldLength);
-    iDialledNumberPhoneNumber = HBufC::New(KLogsFieldLength);*/
-    }
-
-CLogsParameters::~CLogsParameters()
-    {
-    LOGSTRING("Creator: CLogsParameters::~CLogsParameters");
-
-    delete iPhoneNumber;
-    /*delete iDialledNumberPhoneNumber;
-    delete iReceivedCallPhoneNumber;
-    delete iMissedCallPhoneNumber;*/
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorLogs* CCreatorLogs::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorLogs* self = CCreatorLogs::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorLogs* CCreatorLogs::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorLogs* self = new (ELeave) CCreatorLogs;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorLogs::CCreatorLogs() : CActive(0)
-    {
-    iEntriesToBeCreated = 1;
-    }
-
-void CCreatorLogs::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorLogs::ConstructL");
-
-    iEngine = aEngine;
-
-    iLogClient = CLogClient::NewL(CEikonEnv::Static()->FsSession());
-    iLogEvent = CLogEvent::NewL();
-
-	CActiveScheduler::Add(this); // needed by CActive
-    }
-
-CCreatorLogs::~CCreatorLogs()
-    {
-    LOGSTRING("Creator: CCreatorLogs::~CCreatorLogs");
-
-    Cancel(); //from CActive
-
-    if ( iEngine && iEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidLogs ) );
-        }
-    iEntryIds.Reset();
-    iEntryIds.Close();
-    
-    delete iLogEvent;
-    delete iLogClient;
-
-    if (iParameters)
-        delete iParameters;
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorLogs::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
-    {
-    LOGSTRING("Creator: CCreatorModuleBase::QueryDialogClosedL");
-    
-    if( aPositiveAction == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        return;
-        }
-    
-    const TDesC* showText = &KSavingText;
-    TBool finished(EFalse);
-    TBool retval(ETrue);
-    switch(aUserData)
-        {
-        case ECreatorLogsDelete:
-            showText = &KDeletingText;
-            iEntriesToBeCreated = 1;
-            finished = ETrue;
-            break;
-        case ECreatorLogsStart:
-            finished = ETrue;
-            break;
-        default:
-            //some error
-            retval = EFalse;
-            break;
-        }
-    if( retval == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        }
-    else if( finished )
-        {
-        // add this command to command array
-        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
-        // started exucuting commands
-        iEngine->ExecuteFirstCommandL( *showText );
-        }
-    }
-    
-//----------------------------------------------------------------------------
-
-TBool CCreatorLogs::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorLogs::AskDataFromUserL");
-    
-    iCommand = aCommand;
-    
-    if ( aCommand == ECmdDeleteLogs )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all log entries?"), this, ECreatorLogsDelete );
-        }
-    else if ( aCommand ==  ECmdDeleteCreatorLogs )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all log entries created with Creator?"), this, ECreatorLogsDelete );
-        }
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorLogsStart );
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorLogs::RunL()
-	{
-    LOGSTRING("Creator: CCreatorLogs::RunL");
-
-    // log writing finished, stop the async waiting
-    iLogWriteWait.AsyncStop();
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorLogs::DoCancel()
-	{
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorLogs::CreateMissedCallEntryL(CLogsParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorLogs::CreateMissedCallEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    CLogsParameters* parameters = aParameters;
-    
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CLogsParameters;
-        parameters = iParameters;
-
-        /*iParameters->iMissedCallPhoneNumber->Des().Zero();
-        iParameters->iMissedCallPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
-
-        iParameters->iMissedCallEventTime.UniversalTime();
-        iParameters->iMissedCallEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );*/
-        parameters->iPhoneNumber->Des().Zero();
-        parameters->iPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
-        
-        parameters->iEventTime.UniversalTime();
-        parameters->iEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
-
-        }
-    
-    // defaults
-    iLogEvent->SetId( KLogNullId );
-    iLogEvent->SetEventType( KNullUid );
-    iLogEvent->SetRemoteParty( KNullDesC );
-    iLogEvent->SetDirection( KNullDesC );
-    iLogEvent->SetTime( Time::NullTTime() );
-    iLogEvent->SetDurationType( KLogNullDurationType );
-    iLogEvent->SetDuration( KLogNullDuration );
-    iLogEvent->SetStatus( KNullDesC );
-    iLogEvent->SetSubject( KNullDesC );
-    iLogEvent->SetNumber( KNullDesC );
-    iLogEvent->SetContact( KNullContactId );
-    iLogEvent->SetLink( KLogNullLink );
-    iLogEvent->SetDescription( KNullDesC );
-    iLogEvent->SetFlags( KLogNullFlags );
-    iLogEvent->SetEventType(KLogCallEventTypeUid);
-    iLogEvent->SetSubject(_L("A"));
-
-    // set direction
-    TLogString missed;
-    iLogClient->GetString(missed, R_LOG_DIR_MISSED);
-    iLogEvent->SetDirection(missed);
-
-    // set duration
-    iLogEvent->SetDurationType( KLogDurationNone );
-    TLogDuration duration = 0;
-    iLogEvent->SetDuration(duration);
-
-    // set the phone number
-    //iLogEvent->SetNumber( iParameters->iMissedCallPhoneNumber->Des() );
-    iLogEvent->SetNumber( parameters->iPhoneNumber->Des() );
-
-    // set event time
-    //iLogEvent->SetTime( iParameters->iMissedCallEventTime );
-    iLogEvent->SetTime( parameters->iEventTime );
-
-    // start writing
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("LogWriter"), 150));
-	iLogClient->AddEvent(*iLogEvent, iStatus);
-	SetActive();
-
-    // wait till adding has finished
-    iLogWriteWait.Start();
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    TRAP_IGNORE( iEntryIds.AppendL( iLogEvent->Id() ) );
-
-    return iStatus.Int();  // should be KErrNone if writing was succesful
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorLogs::CreateReceivedCallEntryL(CLogsParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorLogs::CreateReceivedCallEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    CLogsParameters* parameters = aParameters;
-        
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CLogsParameters;
-        parameters = iParameters;
-
-        /*iParameters->iReceivedCallPhoneNumber->Des().Zero();
-        iParameters->iReceivedCallPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
-
-        iParameters->iReceivedCallEventTime.UniversalTime();
-        iParameters->iReceivedCallEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
-
-        iParameters->iReceivedCallDuration = iEngine->RandomNumber(7200);*/
-        parameters->iPhoneNumber->Des().Zero();
-        parameters->iPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
-        
-        parameters->iEventTime.UniversalTime();
-        parameters->iEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
-        
-        parameters->iDuration = iEngine->RandomNumber(7200);
-        }
-   
-    // defaults
-    iLogEvent->SetId( KLogNullId );
-    iLogEvent->SetEventType( KNullUid );
-    iLogEvent->SetRemoteParty( KNullDesC );
-    iLogEvent->SetDirection( KNullDesC );
-    iLogEvent->SetTime( Time::NullTTime() );
-    iLogEvent->SetDurationType( KLogNullDurationType );
-    iLogEvent->SetDuration( KLogNullDuration );
-    iLogEvent->SetStatus( KNullDesC );
-    iLogEvent->SetSubject( KNullDesC );
-    iLogEvent->SetNumber( KNullDesC );
-    iLogEvent->SetContact( KNullContactId );
-    iLogEvent->SetLink( KLogNullLink );
-    iLogEvent->SetDescription( KNullDesC );
-    iLogEvent->SetFlags( KLogNullFlags );
-    iLogEvent->SetEventType(KLogCallEventTypeUid);
-    iLogEvent->SetSubject(_L("A"));
-
-    // set direction
-    TLogString incoming;
-    iLogClient->GetString(incoming, R_LOG_DIR_IN);
-    iLogEvent->SetDirection(incoming);
-
-    // set duration
-    iLogEvent->SetDurationType( KLogDurationValid );
-    //iLogEvent->SetDuration( iParameters->iReceivedCallDuration );
-    iLogEvent->SetDuration( parameters->iDuration );
-
-    // set the phone number
-    //iLogEvent->SetNumber( iParameters->iReceivedCallPhoneNumber->Des() );
-    iLogEvent->SetNumber( parameters->iPhoneNumber->Des() );
-
-    // set event time
-    //iLogEvent->SetTime( iParameters->iReceivedCallEventTime );
-    iLogEvent->SetTime( parameters->iEventTime );
-
-    // start writing
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("LogWriter"), 151));
-	iLogClient->AddEvent(*iLogEvent, iStatus);
-	SetActive();
-
-    // wait till adding has finished
-    iLogWriteWait.Start();
-
-    // id has been generated, store it for being able to delete
-    // entries created only with Creator
-    TRAP_IGNORE( iEntryIds.AppendL( iLogEvent->Id() ) );
-
-    return iStatus.Int();  // should be KErrNone if writing was succesful
-    }
-
-//----------------------------------------------------------------------------
-
-
-TInt CCreatorLogs::CreateDialledNumberEntryL(CLogsParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorLogs::CreateDialledNumberEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    CLogsParameters* parameters = aParameters; 
-        
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CLogsParameters;
-        parameters = iParameters;
-
-        /*iParameters->iDialledNumberPhoneNumber->Des().Zero();
-        iParameters->iDialledNumberPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
-
-        iParameters->iDialledNumberEventTime.UniversalTime();
-        iParameters->iDialledNumberEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
-
-        iParameters->iDialledNumberDuration = iEngine->RandomNumber(7200);*/
-        parameters->iPhoneNumber->Des().Zero();
-        parameters->iPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
-
-        parameters->iEventTime.UniversalTime();
-        parameters->iEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
-
-        parameters->iDuration = iEngine->RandomNumber(7200);
-
-        }
-   
-    // defaults
-    iLogEvent->SetId( KLogNullId );
-    iLogEvent->SetEventType( KNullUid );
-    iLogEvent->SetRemoteParty( KNullDesC );
-    iLogEvent->SetDirection( KNullDesC );
-    iLogEvent->SetTime( Time::NullTTime() );
-    iLogEvent->SetDurationType( KLogNullDurationType );
-    iLogEvent->SetDuration( KLogNullDuration );
-    iLogEvent->SetStatus( KNullDesC );
-    iLogEvent->SetSubject( KNullDesC );
-    iLogEvent->SetNumber( KNullDesC );
-    iLogEvent->SetContact( KNullContactId );
-    iLogEvent->SetLink( KLogNullLink );
-    iLogEvent->SetDescription( KNullDesC );
-    iLogEvent->SetFlags( KLogNullFlags );
-    iLogEvent->SetEventType(KLogCallEventTypeUid);
-    iLogEvent->SetSubject(_L("A"));
-
-    // set direction
-    TLogString outgoing;
-    iLogClient->GetString(outgoing, R_LOG_DIR_OUT);
-    iLogEvent->SetDirection(outgoing);
-
-    // set duration
-    iLogEvent->SetDurationType( KLogDurationValid );
-    //iLogEvent->SetDuration( iParameters->iDialledNumberDuration );
-    iLogEvent->SetDuration( parameters->iDuration );
-
-    // set the phone number
-    //iLogEvent->SetNumber( iParameters->iDialledNumberPhoneNumber->Des() );
-    iLogEvent->SetNumber( parameters->iPhoneNumber->Des() );
-
-    // set event time
-    //iLogEvent->SetTime( iParameters->iDialledNumberEventTime );
-    iLogEvent->SetTime( parameters->iEventTime );
-
-    // start writing
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("LogWriter"), 152));
-	iLogClient->AddEvent(*iLogEvent, iStatus);
-	SetActive();
-
-    // wait till adding has finished
-    iLogWriteWait.Start();
-
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    TRAP_IGNORE( iEntryIds.AppendL( iLogEvent->Id() ) );
-    
-    return iStatus.Int();  // should be KErrNone if writing was succesful
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorLogs::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorLogs::DeleteAllL");
-    iLogClient->ClearLog( TTime( Time::MaxTTime() ), iStatus ); 
-    SetActive();
-    
-    // wait till delete has finished
-    iLogWriteWait.Start();
-    User::LeaveIfError( iStatus.Int() );
-
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Logs related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidLogs );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorLogs::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorLogs::DeleteAllCreatedByCreatorL");
-    iEntryIds.Reset();
-    
-    // fetch ids of entries created by Creator
-    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidLogs );
-    
-    // delete entries
-    for ( TInt i = 0; i < iEntryIds.Count(); i++ )
-        {
-        // This could be implemented with while loop
-        // with additional cancel flag. That would enable 
-        // using CancelOp() and cancelling would be bit smoother.
-        // With this for loop implementation all entries will be
-        // deleted whether or not user cancels during logs operation.
-
-        iLogClient->DeleteEvent( iEntryIds[i], iStatus );
-        SetActive();        
-        // wait till delete has finished
-        iLogWriteWait.Start();
-        }
-    
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Logs related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidLogs );
-    }
--- a/creator/engine/src/creator_logelement.cpp	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-#include "creator_logelement.h"
-#include "creator_traces.h"
-#include "creator_log.h"
-
-using namespace creatorlog;
-
-/*
- * 
- */
-CCreatorLogElement* CCreatorLogElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorLogElement* self = new (ELeave) CCreatorLogElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorLogElement::CCreatorLogElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
-/*
- * 
- */
-void CCreatorLogElement::ExecuteCommandL()
-    {
-    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
-    TInt logAmount = 1;    
-    if( amountAttr )
-        {
-        logAmount = ConvertStrToIntL(amountAttr->Value());
-        }
-    // Get 'fields' element 
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-        {
-        // Get sub-elements
-        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
-        // Create log entries, the amount of entries is defined by logAmount:
-        for( TInt cI = 0; cI < logAmount; ++cI )
-            {
-            TInt direction = -1;
-            CLogsParameters* param = new (ELeave) CLogsParameters;
-            CleanupStack::PushL(param);
-            
-            for( TInt i = 0; i < fields.Count(); ++i )
-                {
-                CCreatorScriptElement* field = fields[i];
-                TPtrC elemName = field->Name();
-                TPtrC elemContent = field->Content();
-                const CCreatorScriptAttribute* randomAttr = field->FindAttributeByName(KRandomLength);
-                const CCreatorScriptAttribute* increaseAttr = field->FindAttributeByName(KIncrease);
-                TBool increase( EFalse );
-                if ( increaseAttr )
-                    {
-                    increase = ConvertStrToBooleanL( increaseAttr->Value() );
-                    }
-                
-                if( elemName == KDirection )
-                    {
-                    direction = GetLogCommandL(elemContent, randomAttr || elemContent.Length() == 0); 
-                    }
-                else if( elemName == KDuration )
-                    {
-                    if( randomAttr || elemContent.Length() == 0 )
-                        {
-                        param->iDuration = iEngine->RandomNumber(7200);
-                        }
-                    else
-                        {
-                        param->iDuration = ConvertStrToIntL(elemContent);
-                        }
-                    }
-                else if( elemName == KPhonenumber )
-                    {
-                    if( randomAttr || elemContent.Length() == 0 )
-                        {
-                        SetContentToTextParamL(param->iPhoneNumber, iEngine->RandomString(CCreatorEngine::EPhoneNumber));
-                        }
-                    else
-                        {
-                        if ( increase )
-                            {
-                            delete param->iPhoneNumber;
-                            param->iPhoneNumber = NULL;
-                            param->iPhoneNumber = HBufC::NewL( elemContent.Length() + 3 );
-                            IncreasePhoneNumL( elemContent, cI, param->iPhoneNumber );
-                            }
-                        else
-                            {
-                            SetContentToTextParamL(param->iPhoneNumber, elemContent);
-                            }
-                        }                    
-                    }
-                else if( elemName == KDatetime )
-                    {
-                    if( randomAttr || elemContent.Length() == 0 )
-                        {
-                        param->iEventTime = iEngine->RandomTime(iEngine->RandomDate(CCreatorEngine::EDatePast), CCreatorEngine::EDatePast); 
-                        }
-                    else
-                        {
-                        param->iEventTime = ConvertToDateTimeL(elemContent);
-                        }
-                    }
-                }
-            
-            if( direction == -1 )
-                {
-                direction = GetLogCommandL(KEmpty, ETrue); 
-                }
-            iEngine->AppendToCommandArrayL(direction, param);
-            CleanupStack::Pop(); // param
-            }
-        }
-    else
-    	{
-    	for(TInt i = 0; i < logAmount; ++i )
-    		{
-    		iEngine->AppendToCommandArrayL(GetLogCommandL(KEmpty, ETrue), 0, 1);
-    		}
-    	}
-    }
-
-TInt CCreatorLogElement::GetLogCommandL( const TDesC& aLogCmdStr, TBool aRandom ) const
-    {      
-    if( aRandom )
-        {
-        TInt commandArray[] = {
-                    ECmdCreateLogEntryMissedCalls,
-                    ECmdCreateLogEntryReceivedCalls,
-                    ECmdCreateLogEntryDialledNumbers
-            };
-        return commandArray[iEngine->RandomNumber(0, 2)];
-        }
-    
-    if( CompareIgnoreCase(aLogCmdStr, KMissed) == 0 )
-        return ECmdCreateLogEntryMissedCalls;
-    else if( CompareIgnoreCase(aLogCmdStr, KIn) == 0 )
-        return ECmdCreateLogEntryReceivedCalls;
-    else if( CompareIgnoreCase(aLogCmdStr, KOut) == 0 )
-        return ECmdCreateLogEntryDialledNumbers;
-    
-    LOGSTRING2("CCreatorLogElement::GetLogCommandL: Unknown log direction: %S", &aLogCmdStr);
-    User::Leave(KErrNotFound);
-    return -1; // Not reached, but disables compiler warning...
-    }
--- a/creator/engine/src/creator_mailbox.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,797 +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 <etelmm.h>
-#include <msvapi.h>
-
-#include "engine.h"
-#include "enginewrapper.h"
-#include "creator_mailbox.h" 
-#include "creator_traces.h"
-
-static const TInt KMailboxesFieldLength = 160;
-
-_LIT(KCreatorMailboxesPrefixName, "CR_");
-
-_LIT(KDefaultIncomingServer, "mail.example.com");
-_LIT(KDefaultOutgoingServer, "smtp.example.com");
-_LIT(KInternet, "internet");
-
-
-//----------------------------------------------------------------------------
-
-CMailboxesParameters::CMailboxesParameters()
-    {
-    LOGSTRING("Creator: CMailboxesParameters::CMailboxesParameters");
-
-    iIncomingPort = KUndef;
-    iOutgoingPort = KUndef;
-    iMaxEmailSize = KUndef;
-    iSyncRate = KUndef;
-    iAttachmentFetchSize = KUndef;
-    iAttachmentSizeLimit = KUndef;
-    iBodyTextSizeLimit = KUndef;
-    iAttachmentFetchSize = KUndef;
-    iInboxSyncLimit = -1; // -1 = All
-    iMailboxSyncLimit = -1; // -1 = All    
-    iToCCIncludeLimit = KUndef;
-    iImapIdleTimeout = KUndef;
-    
-    /*iMailboxName = HBufC::New(KMailboxesFieldLength);
-    iAccessPoint = HBufC::New(KMailboxesFieldLength);
-    iMyMailAddress = HBufC::New(KMailboxesFieldLength);
-    iOutgoingMailServer = HBufC::New(KMailboxesFieldLength);
-    iUserName = HBufC::New(KMailboxesFieldLength);
-    iPassword = HBufC::New(KMailboxesFieldLength);
-    iIncomingMailServer = HBufC::New(KMailboxesFieldLength);*/
-    }
-
-CMailboxesParameters::~CMailboxesParameters()
-    {
-    LOGSTRING("Creator: CMailboxesParameters::~CMailboxesParameters");
-
-    /*delete iIncomingMailServer;
-    delete iPassword;
-    delete iUserName;
-    delete iOutgoingMailServer;
-    delete iMyMailAddress;
-    delete iAccessPoint;
-    delete iMailboxName;*/
-    
-    delete iMailboxName;
-    delete iIncomingLoginName;
-    delete iIncomingPassword;
-    delete iIncomingServerName;
-    delete iIncomingConnectionMethod;
-    delete iIncomingFolderPath;
-    delete iPathSeparator;
-    delete iOutgoingLoginName;
-    delete iOutgoingPassword;
-    delete iOutgoingServerName;
-    delete iOutgoingConnectionMethod;
-    delete iOwnEmailAddress;
-    delete iOwnEmailAlias;
-    delete iReceiptAddress;
-    delete iReplyToAddress;
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorMailboxes* CCreatorMailboxes::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorMailboxes* self = CCreatorMailboxes::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorMailboxes* CCreatorMailboxes::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorMailboxes* self = new (ELeave) CCreatorMailboxes;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorMailboxes::CCreatorMailboxes()
-    {    
-    }
-
-void CCreatorMailboxes::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::ConstructL");
-
-    iEngine = aEngine;
-    }
-
-CCreatorMailboxes::~CCreatorMailboxes()
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::~CCreatorMailboxes");
-    if ( iEngine && iEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidMailbox ) );
-        }
-    iEntryIds.Reset();
-    iEntryIds.Close();
-    
-    if (iParameters)
-        delete iParameters;
-    }
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorMailboxes::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::AskDataFromUserL");
-    
-    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
-    
-    if ( aCommand == ECmdDeleteMailboxes )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all mailboxes?"), this, ECreatorModuleDelete );
-        }
-    else if ( aCommand ==  ECmdDeleteCreatorMailboxes )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all mailboxes created with Creator?"), this, ECreatorModuleDelete );
-        }
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
-    }
-
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMailboxes::CreateMailboxEntryL(CMailboxesParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::CreateMailboxEntryL");
-
-      // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    CMailboxesParameters* parameters = aParameters;
-    
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CMailboxesParameters;
-        parameters = iParameters;
-
-        TPtrC company(iEngine->RandomString(CCreatorEngine::ECompany));
-        TPtrC firstName(iEngine->RandomString(CCreatorEngine::EFirstName));
-        
-        delete parameters->iMailboxName;
-        parameters->iMailboxName = 0;
-        parameters->iMailboxName = HBufC::NewL(KMailboxesFieldLength);
-        parameters->iMailboxName->Des() = KCreatorMailboxesPrefixName;
-        parameters->iMailboxName->Des().Append( company );
-        parameters->iMailboxName->Des().Append(_L(" #"));
-        parameters->iMailboxName->Des().AppendNum(iEngine->RandomNumber(1, 100));
-        
-        delete parameters->iIncomingLoginName;
-        parameters->iIncomingLoginName = 0;
-        parameters->iIncomingLoginName = HBufC::NewL(KMailboxesFieldLength); 
-        delete parameters->iOutgoingLoginName;
-        parameters->iOutgoingLoginName = 0;
-        parameters->iOutgoingLoginName = HBufC::NewL(KMailboxesFieldLength); 
-        parameters->iIncomingLoginName->Des() = iEngine->RandomString(CCreatorEngine::EFirstName);
-        parameters->iIncomingLoginName->Des().LowerCase();
-        parameters->iOutgoingLoginName->Des().Copy(parameters->iIncomingLoginName->Des());
-        
-        delete parameters->iIncomingPassword;
-        parameters->iIncomingPassword = 0;
-        parameters->iIncomingPassword = HBufC::NewL(KMailboxesFieldLength); 
-        delete parameters->iOutgoingPassword;
-        parameters->iOutgoingPassword = 0;
-        parameters->iOutgoingPassword = HBufC::NewL(KMailboxesFieldLength); 
-        parameters->iIncomingPassword->Des() = iEngine->RandomString(CCreatorEngine::ESurname);
-        parameters->iIncomingPassword->Des().LowerCase();
-        parameters->iOutgoingPassword->Des().Copy(parameters->iIncomingPassword->Des());
-        
-        delete parameters->iIncomingServerName;
-        parameters->iIncomingServerName = 0;
-        parameters->iIncomingServerName = HBufC::NewL(KMailboxesFieldLength); 
-        parameters->iIncomingServerName->Des() = _L("incoming.");
-        parameters->iIncomingServerName->Des().Append(company);
-        parameters->iIncomingServerName->Des().Append(_L(".com"));
-        parameters->iIncomingServerName->Des().LowerCase();
-                
-        delete parameters->iIncomingConnectionMethod;
-        parameters->iIncomingConnectionMethod = 0;
-        parameters->iIncomingConnectionMethod = HBufC::NewL(KInternet().Length());
-        parameters->iIncomingConnectionMethod->Des() = KInternet;  // use always this one, if it's not found, default will be used instead
-        
-        delete parameters->iOutgoingServerName;
-        parameters->iOutgoingServerName = 0;
-        parameters->iOutgoingServerName = HBufC::NewL(KMailboxesFieldLength); 
-        parameters->iOutgoingServerName->Des() = _L("smtp.");
-        parameters->iOutgoingServerName->Des().Append(company);
-        parameters->iOutgoingServerName->Des().Append(_L(".com"));
-        parameters->iOutgoingServerName->Des().LowerCase();
-        
-        delete parameters->iOutgoingConnectionMethod;
-        parameters->iOutgoingConnectionMethod = 0;
-        parameters->iOutgoingConnectionMethod = HBufC::NewL(KInternet().Length());
-        parameters->iOutgoingConnectionMethod->Des() = KInternet;  // use always this one, if it's not found, default will be used instead
-
-        delete parameters->iOwnEmailAddress;
-        parameters->iOwnEmailAddress = 0;
-        parameters->iOwnEmailAddress = iEngine->CreateEmailAddressLC();
-        parameters->iOwnEmailAddress->Des().LowerCase();
-        CleanupStack::Pop(); // parameters->iOwnEmailAddress
-        
-        delete parameters->iOwnEmailAlias;
-        parameters->iOwnEmailAlias = 0;
-        parameters->iOwnEmailAlias = HBufC::NewL(firstName.Length());        
-        parameters->iOwnEmailAlias->Des().Copy(firstName);       
-
-        delete parameters->iReceiptAddress;
-        parameters->iReceiptAddress = 0;
-        parameters->iReceiptAddress = iEngine->CreateEmailAddressLC();
-        parameters->iReceiptAddress->Des().LowerCase();
-        CleanupStack::Pop(); // parameters->iReceiptAddress
-        
-        delete parameters->iReplyToAddress;
-        parameters->iReplyToAddress = 0;
-        parameters->iReplyToAddress = iEngine->CreateEmailAddressLC();
-        parameters->iReplyToAddress->Des().LowerCase();
-        CleanupStack::Pop(); // parameters->iReplyToAddress
-        
-        parameters->iIncomingSSLWrapper = iEngine->RandomNumber(0, 1);
-        parameters->iIncomingSecureSockets = iEngine->RandomNumber(0, 1);        
-        parameters->iAcknowledgeReceipts = iEngine->RandomNumber(0, 1);
-        parameters->iAutoSendOnConnect = iEngine->RandomNumber(0, 1);
-        parameters->iDeleteEmailsAtDisconnect = iEngine->RandomNumber(0, 1);
-        parameters->iImapIdleCommand = iEngine->RandomNumber(0, 1);
-        parameters->iMarkSeenInSync = iEngine->RandomNumber(0, 1);
-        parameters->iEnableExpungeMode = iEngine->RandomNumber(0, 1);
-        parameters->iUseApop = iEngine->RandomNumber(0, 1);
-        parameters->iDisconnectedUserMode = iEngine->RandomNumber(0, 1);                
-        parameters->iOutgoingSSLWrapper = iEngine->RandomNumber(0, 1);
-        parameters->iOutgoingSecureSockets = iEngine->RandomNumber(0, 1);
-        parameters->iIncludeSignature = EFalse;
-        parameters->iAddVCard = EFalse;
-        parameters->iRequestReceipts = iEngine->RandomNumber(0, 1);
-        parameters->iSmtpAuth = iEngine->RandomNumber(0, 1);
-        
-        parameters->iIncomingPort = iEngine->RandomNumber(25, 500);
-        parameters->iAttachmentSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
-        parameters->iBodyTextSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
-        parameters->iAttachmentFetchSize = iEngine->RandomNumber(1, 40960);
-        parameters->iImapIdleTimeout = iEngine->RandomNumber(10, 2000);
-        parameters->iMaxEmailSize = iEngine->RandomNumber(1024, KMaxTInt);
-        parameters->iSyncRate = iEngine->RandomNumber(10, 500);        
-        parameters->iInboxSyncLimit = iEngine->RandomNumber(-1, 256);
-        parameters->iMailboxSyncLimit = iEngine->RandomNumber(-1, 256);
-        parameters->iOutgoingPort = KDefaultSmtpPort;
-        parameters->iToCCIncludeLimit = iEngine->RandomNumber(0, 30);                      
-        
-        parameters->iGetEmailOptions = (CMailboxesParameters::TGetEmailOption) iEngine->RandomNumber(CMailboxesParameters::EUndef, CMailboxesParameters::EGetEmailOptionLast-1);
-        parameters->iSubscribeType = (TFolderSubscribeType) iEngine->RandomNumber(EUpdateNeither, EUpdateBoth);
-        parameters->iSyncType = (TFolderSyncType) iEngine->RandomNumber(EUseCombination, EUseRemote);
-        parameters->iSendCopyToSelf = (TImSMTPSendCopyToSelf) iEngine->RandomNumber(ESendNoCopy, ESendCopyAsBccRecipient);
-        parameters->iSendOption = (TImSMTPSendMessageOption) iEngine->RandomNumber(ESendMessageImmediately, ESendMessageOnRequest);
-        parameters->iMailboxType = (TMailboxType) iEngine->RandomNumber(EMailboxPOP3, EMailboxIMAP4);
-        }
-   
-    TInt err = KErrNone;
-    
-    // make sure we have some IMEI stored
-    if (iIMEI.Length() == 0)
-        {
-        TRAP(err, GetIMEIFromThePhoneL());
-        }
-
-    // init 
-    CImImap4Settings* imap4Set = new(ELeave) CImImap4Settings;
-    CleanupStack::PushL(imap4Set);
-    CImPop3Settings* pop3Set = new(ELeave) CImPop3Settings;
-    CleanupStack::PushL(pop3Set);
-    CImSmtpSettings* smtpSet = new(ELeave) CImSmtpSettings;
-    CleanupStack::PushL(smtpSet);
-    CImIAPPreferences* outgoingIAPSet = CImIAPPreferences::NewLC();
-    CImIAPPreferences* incomingIAPSet = CImIAPPreferences::NewLC();
-    CEmailAccounts* account = CEmailAccounts::NewLC();
-  
-    // Get SMTP settings:
-    PopulateSmtpSettingsL(*account, *smtpSet, *outgoingIAPSet, *parameters);
-  
-    // appending mailbox type to array to be able to use
-    // correct type when deleting mailboxes
-    iEntryIds.AppendL( parameters->iMailboxType );
-    
-    if (parameters->iMailboxType == EMailboxIMAP4)
-        {
-        // Get IMAP settings:
-        PopulateImapSettingsL(*account, *imap4Set, *incomingIAPSet, *parameters);
-        TImapAccount imapAccountId = account->CreateImapAccountL(parameters->iMailboxName->Des(), *imap4Set, *incomingIAPSet, EFalse);
-        TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(imapAccountId, *smtpSet, *outgoingIAPSet, EFalse);
-        account->SetDefaultSmtpAccountL(smtpAccountId);
-
-        iEntryIds.AppendL( imapAccountId.iImapAccountId );
-        iEntryIds.AppendL( imapAccountId.iImapService );
-        iEntryIds.AppendL( imapAccountId.iSmtpService );      
-        iEntryIds.AppendL( smtpAccountId.iSmtpAccountId );
-        iEntryIds.AppendL( smtpAccountId.iSmtpService );
-        iEntryIds.AppendL( smtpAccountId.iRelatedService );
-        
-        StoreIMEIToEntryL( imapAccountId.iImapService );
-        StoreIMEIToEntryL( smtpAccountId.iSmtpService );
-        }
-    else
-        {
-        // Get POP settings:
-        PopulatePopSettingsL(*account, *pop3Set, *incomingIAPSet, *parameters);
-        TPopAccount popAccountId = account->CreatePopAccountL(parameters->iMailboxName->Des(), *pop3Set, *incomingIAPSet, EFalse);
-        TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(popAccountId, *smtpSet, *outgoingIAPSet, EFalse);     
-        account->SetDefaultSmtpAccountL(smtpAccountId);
-        
-        iEntryIds.AppendL( popAccountId.iPopAccountId );
-        iEntryIds.AppendL( popAccountId.iPopService );
-        iEntryIds.AppendL( popAccountId.iSmtpService );
-        iEntryIds.AppendL( smtpAccountId.iSmtpAccountId );
-        iEntryIds.AppendL( smtpAccountId.iSmtpService );
-        iEntryIds.AppendL( smtpAccountId.iRelatedService );
-
-        StoreIMEIToEntryL( popAccountId.iPopService );
-        StoreIMEIToEntryL( smtpAccountId.iSmtpService );
-        }  
-    CleanupStack::PopAndDestroy(6); //imap4Set, pop3Set, smtpSet, outgoingIAPSet, incomingIAPSet, account 
-        
-    return err;
-    }
-
-void CCreatorMailboxes::PopulateImapSettingsL( 
-            CEmailAccounts& aEmailAccount, 
-            CImImap4Settings& aImapSettings, 
-            CImIAPPreferences& aIApSettings, 
-            const CMailboxesParameters& aParameters )
-    {
-    // Get default settings first:
-    aEmailAccount.PopulateDefaultImapSettingsL(aImapSettings, aIApSettings);
-    
-    TImIAPChoice iapChoice;
-    iapChoice.iIAP = 0;
-    if( aParameters.iIncomingConnectionMethod == 0 || 
-        aParameters.iIncomingConnectionMethod->Des().Length() == 0 )
-        {
-        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( KInternet ));
-        }
-    else
-        {
-        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( aParameters.iIncomingConnectionMethod->Des()));
-        }
-    iapChoice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
-    aIApSettings.AddIAPL(iapChoice);
-    
-    TBuf8<256> buf8;
-    if( aParameters.iIncomingLoginName && aParameters.iIncomingLoginName->Length() > 0 )                
-        buf8.Copy(aParameters.iIncomingLoginName->Des());
-    else
-        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
-    aImapSettings.SetLoginNameL(buf8);  //8
-    
-    if( aParameters.iIncomingPassword && aParameters.iIncomingPassword->Length() > 0 )
-        buf8.Copy(aParameters.iIncomingPassword->Des());    
-    else
-        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
-    aImapSettings.SetPasswordL(buf8);  //8
-    
-    if( aParameters.iIncomingFolderPath && aParameters.iIncomingFolderPath->Length() > 0 )
-        {
-        buf8.Copy(aParameters.iIncomingFolderPath->Des());
-        aImapSettings.SetFolderPathL(buf8);
-        }
-    
-    if( aParameters.iPathSeparator && aParameters.iPathSeparator->Length() > 0 )
-        aImapSettings.SetPathSeparator(aParameters.iIncomingFolderPath->Des()[0]);
-    
-    aImapSettings.SetDisconnectedUserMode(aParameters.iDisconnectedUserMode);
-    aImapSettings.SetSynchronise(aParameters.iSyncType);
-    aImapSettings.SetSubscribe(aParameters.iSubscribeType);
-    aImapSettings.SetAutoSendOnConnect(aParameters.iAutoSendOnConnect);
-    
-    if(aParameters.iMaxEmailSize != KUndef )
-        aImapSettings.SetMaxEmailSize(aParameters.iMaxEmailSize);
-    
-    aImapSettings.SetDeleteEmailsWhenDisconnecting(aParameters.iDeleteEmailsAtDisconnect);
-    aImapSettings.SetAcknowledgeReceipts(aParameters.iAcknowledgeReceipts);
-            
-    if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetBodyText )
-        aImapSettings.SetGetMailOptions(EGetImap4EmailBodyText);
-    else if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetBodyTextAndAttachments )
-        aImapSettings.SetGetMailOptions(EGetImap4EmailBodyTextAndAttachments);
-    else if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetAttachments )
-        aImapSettings.SetGetMailOptions(EGetImap4EmailAttachments);
-    else if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetBodyAlternativeText )
-        aImapSettings.SetGetMailOptions(EGetImap4EmailBodyAlternativeText);
-    else
-        aImapSettings.SetGetMailOptions(EGetImap4EmailHeaders); // Default
-    
-    if( aParameters.iInboxSyncLimit != KUndef )
-        aImapSettings.SetInboxSynchronisationLimit(aParameters.iInboxSyncLimit);
-    
-    if( aParameters.iMailboxSyncLimit != KUndef )
-        aImapSettings.SetMailboxSynchronisationLimit(aParameters.iMailboxSyncLimit);
-    
-    aImapSettings.SetUpdatingSeenFlags(aParameters.iMarkSeenInSync);
-    
-    if( aParameters.iSyncRate != KUndef )
-        aImapSettings.SetSyncRateL(aParameters.iSyncRate);
-    
-    if( aParameters.iAttachmentFetchSize != KUndef )
-        aImapSettings.SetFetchSizeL(aParameters.iAttachmentFetchSize);
-    
-    aImapSettings.SetImapIdle(aParameters.iImapIdleCommand);
-    if( aParameters.iImapIdleTimeout != KUndef )
-        aImapSettings.SetImapIdleTimeoutL(aParameters.iImapIdleTimeout);
-    
-    if( aParameters.iBodyTextSizeLimit != KUndef )
-        aImapSettings.SetBodyTextSizeLimitL(aParameters.iBodyTextSizeLimit);
-    
-    if( aParameters.iAttachmentSizeLimit != KUndef )
-        aImapSettings.SetAttachmentSizeLimitL(aParameters.iAttachmentSizeLimit);
-    
-#if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
-    aImapSettings.SetUseExpunge(aParameters.iEnableExpungeMode);
-#endif
-    
-    if(aParameters.iIncomingServerName && aParameters.iIncomingServerName->Length() > 0 )
-        aImapSettings.SetServerAddressL(aParameters.iIncomingServerName->Des());
-    else
-        aImapSettings.SetServerAddressL(KDefaultIncomingServer);
-        
-    if( aParameters.iIncomingPort != KUndef )
-        aImapSettings.SetPort(aParameters.iIncomingPort);                 
-      
-    aImapSettings.SetSecureSockets(aParameters.iIncomingSecureSockets);
-    aImapSettings.SetSSLWrapper(aParameters.iIncomingSSLWrapper);
-    }
-
-void CCreatorMailboxes::PopulatePopSettingsL( 
-            CEmailAccounts& aEmailAccount, 
-            CImPop3Settings& aPopSettings, 
-            CImIAPPreferences& aIApSettings, 
-            const CMailboxesParameters& aParameters )
-    {
-    aEmailAccount.PopulateDefaultPopSettingsL(aPopSettings, aIApSettings);
-    
-    TImIAPChoice iapChoice;
-    iapChoice.iIAP = 0;
-    if( aParameters.iIncomingConnectionMethod == 0 || 
-        aParameters.iIncomingConnectionMethod->Des().Length() == 0 )
-        {
-        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( KInternet ));
-        }
-    else
-        {
-        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( aParameters.iIncomingConnectionMethod->Des() ));
-        }
-    iapChoice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
-    aIApSettings.AddIAPL(iapChoice);
-    
-    TBuf8<256> buf8;
-    if( aParameters.iIncomingLoginName && aParameters.iIncomingLoginName->Length() > 0 )                
-        buf8.Copy(aParameters.iIncomingLoginName->Des());
-    else
-        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
-    aPopSettings.SetLoginNameL(buf8);  //8
-        
-    if( aParameters.iIncomingPassword && aParameters.iIncomingPassword->Length() > 0 )
-        buf8.Copy(aParameters.iIncomingPassword->Des());    
-    else
-        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
-    aPopSettings.SetPasswordL(buf8);  //8
-    
-    aPopSettings.SetAutoSendOnConnect( aParameters.iAutoSendOnConnect );
-    aPopSettings.SetApop( aParameters.iUseApop );
-    aPopSettings.SetDisconnectedUserMode( aParameters.iDisconnectedUserMode );
-    aPopSettings.SetDeleteEmailsWhenDisconnecting( aParameters.iDeleteEmailsAtDisconnect );
-    aPopSettings.SetAcknowledgeReceipts( aParameters.iAcknowledgeReceipts );
-    
-    if( aParameters.iMaxEmailSize != KUndef )
-        aPopSettings.SetMaxEmailSize(aParameters.iMaxEmailSize);
-    
-    if(aParameters.iGetEmailOptions != CMailboxesParameters::EGetHeaders && 
-            aParameters.iGetEmailOptions != CMailboxesParameters::EUndef )
-        {
-        aPopSettings.SetGetMailOptions(EGetPop3EmailMessages);
-        aPopSettings.SetPopulationLimitL( -1 ); // -1 = body and attachment
-        }
-    else
-        {
-        aPopSettings.SetGetMailOptions(EGetPop3EmailHeaders); // Default
-        aPopSettings.SetPopulationLimitL( -2 ); // -2 = headers only
-        }
-    
-    if( aParameters.iInboxSyncLimit != KUndef )
-        {
-        aPopSettings.SetInboxSynchronisationLimit(aParameters.iInboxSyncLimit);
-        }
-    
-    if(aParameters.iIncomingServerName && aParameters.iIncomingServerName->Length() > 0 )
-        aPopSettings.SetServerAddressL(aParameters.iIncomingServerName->Des());
-    else
-        aPopSettings.SetServerAddressL(KDefaultIncomingServer);
-            
-    if( aParameters.iIncomingPort != KUndef )
-        aPopSettings.SetPort(aParameters.iIncomingPort);                 
-          
-    aPopSettings.SetSecureSockets(aParameters.iIncomingSecureSockets);
-    aPopSettings.SetSSLWrapper(aParameters.iIncomingSSLWrapper);    
-    }
-
-void CCreatorMailboxes::PopulateSmtpSettingsL( 
-        CEmailAccounts& aEmailAccount, 
-        CImSmtpSettings& aSmtpSettings, 
-        CImIAPPreferences& aIApSettings, 
-        const CMailboxesParameters& aParameters )
-    {    
-    // Get default settings first: 
-    aEmailAccount.PopulateDefaultSmtpSettingsL(aSmtpSettings, aIApSettings);
-    TImIAPChoice iapChoice;
-    iapChoice.iIAP = 0;
-    if( aParameters.iOutgoingConnectionMethod == 0 || 
-        aParameters.iOutgoingConnectionMethod->Des().Length() == 0 )
-        {
-        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( KInternet ));
-        }
-    else
-        {
-        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( aParameters.iOutgoingConnectionMethod->Des() ));
-        }
-    iapChoice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
-    aIApSettings.AddIAPL(iapChoice);
-    
-    // set SMTP preferences
-    if( aParameters.iOwnEmailAlias && aParameters.iOwnEmailAlias->Length() > 0 )
-        aSmtpSettings.SetEmailAliasL(aParameters.iOwnEmailAlias->Des());
-    
-    if( aParameters.iOwnEmailAddress && aParameters.iOwnEmailAddress->Length() > 0 )    
-        aSmtpSettings.SetEmailAddressL(aParameters.iOwnEmailAddress->Des());
-    
-    if( aParameters.iReplyToAddress && aParameters.iReplyToAddress->Length() > 0 )
-        aSmtpSettings.SetReplyToAddressL(aParameters.iReplyToAddress->Des());
-    
-    if( aParameters.iReceiptAddress && aParameters.iReceiptAddress->Length() > 0 )
-        aSmtpSettings.SetReceiptAddressL(aParameters.iReceiptAddress->Des());    
-    
-    aSmtpSettings.SetBodyEncoding(EMsgOutboxMIME);
-    aSmtpSettings.SetAddVCardToEmail(aParameters.iAddVCard);
-    aSmtpSettings.SetAddSignatureToEmail(aParameters.iIncludeSignature);
-    aSmtpSettings.SetRequestReceipts(aParameters.iRequestReceipts);
-    aSmtpSettings.SetSendCopyToSelf(aParameters.iSendCopyToSelf);    
-    aSmtpSettings.SetSendMessageOption(aParameters.iSendOption);        
-            
-    TBuf8<256> buf8;
-    if( aParameters.iOutgoingLoginName && aParameters.iOutgoingLoginName->Length() > 0 )
-        {
-        buf8.Copy(aParameters.iOutgoingLoginName->Des());
-        aSmtpSettings.SetLoginNameL(buf8);  //8
-        }
-    
-    if( aParameters.iOutgoingPassword && aParameters.iOutgoingPassword->Length() > 0)
-        {
-        buf8.Copy(aParameters.iOutgoingPassword->Des());
-        aSmtpSettings.SetPasswordL(buf8);  //8
-        }
-    
-    aSmtpSettings.SetSMTPAuth(aParameters.iSmtpAuth);
-    if( aParameters.iToCCIncludeLimit != KUndef )
-         aSmtpSettings.SetToCcIncludeLimitL(aParameters.iToCCIncludeLimit);
-    
-    if( aParameters.iOutgoingServerName && aParameters.iOutgoingServerName->Length() > 0 )
-        aSmtpSettings.SetServerAddressL(aParameters.iOutgoingServerName->Des());
-    else
-        aSmtpSettings.SetServerAddressL(KDefaultOutgoingServer);
-    
-    if( aParameters.iOutgoingPort != KUndef )
-        aSmtpSettings.SetPort(aParameters.iOutgoingPort);
-                
-    aSmtpSettings.SetSecureSockets(aParameters.iOutgoingSecureSockets);
-    aSmtpSettings.SetSSLWrapper(aParameters.iOutgoingSSLWrapper);
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorMailboxes::StoreIMEIToEntryL(const TMsvId aMailboxId)
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::StoreIMEIToEntryL");
-
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    
-    CMsvEntry* centry = session->GetEntryL(aMailboxId);
-    CleanupStack::PushL(centry);
-
-    TMsvEntry tentry = centry->Entry();
-    tentry.iDescription.Set(iIMEI);
-    centry->ChangeL(tentry);
-
-    CleanupStack::PopAndDestroy(2); // centry, session
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorMailboxes::GetIMEIFromThePhoneL()
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::GetIMEIFromThePhoneL");
-
-#ifndef __WINS__
-
-    RTelServer telServer;
-    User::LeaveIfError( telServer.Connect() );
-    CleanupClosePushL(telServer);
-
-    TInt numPhones = 0;
-    User::LeaveIfError( telServer.EnumeratePhones( numPhones ) );
-    if ( numPhones < 1 )
-        {
-        User::Leave( KErrNotFound );
-        }
-    RTelServer::TPhoneInfo info;
-    User::LeaveIfError( telServer.GetPhoneInfo( 0, info ) );
-    RMobilePhone mobilePhone;
-    User::LeaveIfError( mobilePhone.Open( telServer, info.iName ) );
-    CleanupClosePushL( mobilePhone );
-
-    //mobilePhone.Initialise();
-    TUint32 identityCaps;
-    User::LeaveIfError( mobilePhone.GetIdentityCaps( identityCaps ) );
-
-    if ( identityCaps & RMobilePhone::KCapsGetSerialNumber )
-        {
-        TRequestStatus status;
-        RMobilePhone::TMobilePhoneIdentityV1 mobilePhoneIdentity;
-
-        mobilePhone.GetPhoneId( status, mobilePhoneIdentity );
-
-        User::WaitForRequest( status );
-        User::LeaveIfError( status.Int() );
-
-        iIMEI.Copy( mobilePhoneIdentity.iSerialNumber );
-        }
-    else
-        {
-        User::Leave( KErrNotSupported );
-        }
-
-    CleanupStack::PopAndDestroy( &mobilePhone );
-    CleanupStack::PopAndDestroy( &telServer );
-
-#else
-
-    // use fixed IMEI for emulator
-    _LIT( KIMAEmulatorImei, "123456789012345" );
-    iIMEI.Copy( KIMAEmulatorImei );
-
-#endif // __WINS__
-
-    }
-    
-//----------------------------------------------------------------------------
-
-void CCreatorMailboxes::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
-    {
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMailboxes::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::DeleteAllL");
-    
-    CEmailAccounts* accountMgr = CEmailAccounts::NewLC();
-    
-    // Delete pop accounts
-    RArray<TPopAccount> popAccountsToDelete;
-    CleanupClosePushL( popAccountsToDelete );
-    accountMgr->GetPopAccountsL( popAccountsToDelete );
-    for ( TInt i = 0; i < popAccountsToDelete.Count(); i++ )
-        {
-        accountMgr->DeletePopAccountL( popAccountsToDelete[i] );
-        }
-    CleanupStack::PopAndDestroy( &popAccountsToDelete );
-    
-    // Delete imap accounts
-    RArray<TImapAccount> imapAccountsToDelete;
-    CleanupClosePushL( imapAccountsToDelete );
-    accountMgr->GetImapAccountsL( imapAccountsToDelete );
-    for ( TInt i = 0; i < imapAccountsToDelete.Count(); i++ )
-        {
-        accountMgr->DeleteImapAccountL( imapAccountsToDelete[i] );
-        }
-    CleanupStack::PopAndDestroy( &imapAccountsToDelete );
-    
-    // Delete smtp accounts
-    RArray<TSmtpAccount> smtpAccountsToDelete;
-    CleanupClosePushL( smtpAccountsToDelete );
-    accountMgr->GetSmtpAccountsL( smtpAccountsToDelete );
-    for ( TInt i = 0; i < smtpAccountsToDelete.Count(); i++ )
-        {
-        accountMgr->DeleteSmtpAccountL( smtpAccountsToDelete[i] );
-        }
-    CleanupStack::PopAndDestroy( &smtpAccountsToDelete );
-
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Mailbox related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidMailbox );
-    
-    CleanupStack::PopAndDestroy( accountMgr ); 
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMailboxes::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorMailboxes::DeleteAllCreatedByCreatorL");
-    
-    iEntryIds.Reset();
-    CEmailAccounts* accountMgr = CEmailAccounts::NewLC();
-    
-    // fetch ids of entries created by Creator
-    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidMailbox );
-    
-    TInt i(0);
-    while ( i < iEntryIds.Count() && iEntryIds.Count() > 6 ) 
-        {
-        // there should be at least 7 items in the array:
-        // one for mailbox type
-        // 3 for imap OR pop ids
-        // 3 for smtp ids
-
-        // delete entries
-        
-        TInt type = iEntryIds[i++]; // TMailboxType
-        if ( type == EMailboxPOP3 )
-            {
-            TPopAccount popAccount;
-            popAccount.iPopAccountId = iEntryIds[i++];
-            popAccount.iPopService = iEntryIds[i++];            
-            popAccount.iSmtpService = iEntryIds[i++];
-            TRAP_IGNORE( accountMgr->DeletePopAccountL( popAccount ) );            
-            }
-        else if ( type == EMailboxIMAP4 )
-            {
-            TImapAccount imapAccount;
-            imapAccount.iImapAccountId = iEntryIds[i++];
-            imapAccount.iImapService = iEntryIds[i++];
-            imapAccount.iImapService = iEntryIds[i++];
-            TRAP_IGNORE( accountMgr->DeleteImapAccountL( imapAccount ) );
-            }
-        else 
-            {
-            // ignore unknown mailbox types
-            i +=3;
-            }
-        
-        // There should be one smtp service for each pop and imap service
-        TSmtpAccount smtpAccount;
-        smtpAccount.iSmtpAccountId = iEntryIds[i++];
-        smtpAccount.iSmtpService = iEntryIds[i++];
-        smtpAccount.iRelatedService = iEntryIds[i++];
-        TRAP_IGNORE( accountMgr->DeleteSmtpAccountL( smtpAccount ) );
-        }
-
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the mailbox related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidMailbox );
-
-    CleanupStack::PopAndDestroy( accountMgr ); 
-    }
-//----------------------------------------------------------------------------
-
--- a/creator/engine/src/creator_mailboxelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,496 +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 "creator_mailboxelement.h"
-#include "creator_traces.h"
-#include "creator_mailbox.h"
-
-using namespace creatormailbox;
-
-/*
- * 
- */
-CCreatorMailboxElement* CCreatorMailboxElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorMailboxElement* self = new (ELeave) CCreatorMailboxElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorMailboxElement::CCreatorMailboxElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
-
-TBool CCreatorMailboxElement::SetIntegerParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
-    {    
-    _LIT( KAll, "all");
-    
-    if( aElemName == Kincomingport )
-        {
-        if( aSetRandom )
-            param->iIncomingPort = iEngine->RandomNumber(25, 500);
-        else        
-            param->iIncomingPort = ConvertStrToIntL(aElemContent);
-        }
-    else if( aElemName == Kattachmentsizelimit )
-        {
-        if( aSetRandom )
-            param->iAttachmentSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
-        else
-            param->iAttachmentSizeLimit = ConvertStrToIntL(aElemContent);
-        }        
-    else if( aElemName == Kbodytextsizelimit )
-        {
-        if( aSetRandom )
-            param->iBodyTextSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
-        else
-            param->iBodyTextSizeLimit = ConvertStrToIntL(aElemContent);
-        }     
-    else if( aElemName == Kattachmentfetchsize )
-        {
-        if( aSetRandom )
-            param->iAttachmentFetchSize = iEngine->RandomNumber(1, 40960);
-        else            
-            param->iAttachmentFetchSize = ConvertStrToIntL(aElemContent);
-        }
-    else if( aElemName == Kimapidletimeout )
-        {
-        if( aSetRandom )
-            param->iImapIdleTimeout = iEngine->RandomNumber(10, 2000);
-        else
-            param->iImapIdleTimeout = ConvertStrToIntL(aElemContent);
-        }
-    else if( aElemName == Kmaxemailsize )
-        {
-        if( aSetRandom )
-            param->iMaxEmailSize =  iEngine->RandomNumber(1024, KMaxTInt);
-        else
-            param->iMaxEmailSize = ConvertStrToIntL(aElemContent);
-        }
-    else if( aElemName == Ksyncrate )
-        {
-        if( aSetRandom )
-            param->iSyncRate = iEngine->RandomNumber(10, 500);
-        else
-            param->iSyncRate = ConvertStrToIntL(aElemContent);
-        }
-    else if( aElemName == Kinboxsynclimit )
-        {
-        if( aSetRandom )
-            param->iInboxSyncLimit = iEngine->RandomNumber(-1, 256);
-        else if( CompareIgnoreCase(aElemContent, KAll) == 0 )
-            param->iInboxSyncLimit = -1;
-        else
-            param->iInboxSyncLimit = ConvertStrToIntL(aElemContent);
-        }
-    else if( aElemName == Kmailboxsynclimit )
-        {
-        if( aSetRandom )
-            param->iMailboxSyncLimit = iEngine->RandomNumber(-1, 256);
-        else if( CompareIgnoreCase(aElemContent, KAll) == 0 )
-            param->iMailboxSyncLimit = -1;
-        else
-            param->iMailboxSyncLimit = ConvertStrToIntL(aElemContent);
-        }        
-    else if( aElemName == Koutgoingport )
-        {
-        if( aSetRandom )
-            param->iOutgoingPort = KDefaultSmtpPort;
-        else
-            param->iOutgoingPort = ConvertStrToIntL(aElemContent);
-        }
-    else if( aElemName == Ktoccincludelimit )
-        {
-        if( aSetRandom )
-            param->iToCCIncludeLimit = iEngine->RandomNumber(0, 30);
-        else
-            param->iToCCIncludeLimit = ConvertStrToIntL(aElemContent);
-        }
-    else
-        return EFalse;
-    
-    return ETrue;
-    }
-
-TBool CCreatorMailboxElement::GetBooleanValueL(const TDesC& aElemContent, TBool aSetRandom)
-    {
-    if( aSetRandom )
-        return iEngine->RandomNumber(0,1) == 1;
-    
-    return ConvertStrToBooleanL(aElemContent);
-    }
-
-TBool CCreatorMailboxElement::SetBooleanParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
-    {  
-    TBool val = GetBooleanValueL(aElemContent, aSetRandom);
-    if( aElemName == Kincomingsslwrapper )
-        param->iIncomingSSLWrapper = val;
-    else if( aElemName == Kincomingsecuresockets )
-        param->iIncomingSecureSockets = val;
-    else if( aElemName == Kacknowledgereceipts )
-        param->iAcknowledgeReceipts = val;
-    else if( aElemName == Kautosendonconnect )
-        param->iAutoSendOnConnect = val;
-    else if( aElemName == Kdeletemailsatdisconnect )
-        param->iDeleteEmailsAtDisconnect = val;
-    else if( aElemName == Kimapidlecommand )
-        param->iImapIdleCommand = val;
-    else if( aElemName == Kmarkseeninsync )
-        param->iMarkSeenInSync = val;
-    else if( aElemName == Kenableexpungemode )
-        param->iEnableExpungeMode = val;
-    else if( aElemName == Kuseapopsecurelogin )
-        param->iUseApop = val;
-    else if( aElemName == Kdisconnectedusermode )
-        param->iDisconnectedUserMode = val;
-    else if( aElemName == Koutgoingsslwrapper )
-        param->iOutgoingSSLWrapper = val;
-    else if( aElemName == Koutgoingsecuresockets )
-        param->iOutgoingSecureSockets = val;
-    else if( aElemName == Kincludesignature )
-        param->iIncludeSignature = val;
-    else if( aElemName == Kaddvcard )
-        param->iAddVCard = val;
-    else if( aElemName == Krequestreceipts )
-        param->iRequestReceipts = val;
-    else if( aElemName == Ksmtpauth )
-        param->iSmtpAuth = val;
-    else
-        return EFalse;
-
-    return ETrue;
-    }
-
-TBool CCreatorMailboxElement::SetTextParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
-    {   
-    _LIT(KIncomingSrvPrefix, "mail.");
-    _LIT(KOutgoingSrvPrefix, "smtp.");
-    _LIT(KSrvPostfix, ".com");
-    _LIT(KDefaultConnMethod, "internet");
-    
-    if( aElemName == Kname )
-        {
-        if( aSetRandom )
-            {
-            TPtrC company(iEngine->RandomString(CCreatorEngine::ECompany));
-            SetContentToTextParamL(param->iMailboxName, company);
-            }
-        else
-            SetContentToTextParamL(param->iMailboxName, aElemContent);
-        }
-    else if( aElemName == Kincomingloginname )
-        {
-        if( aSetRandom )
-            {
-            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
-            SetContentToTextParamL(param->iIncomingLoginName, random);
-            param->iIncomingLoginName->Des().LowerCase();
-            }
-        else
-            SetContentToTextParamL(param->iIncomingLoginName, aElemContent);
-        }
-    else if( aElemName == Kincomingpassword )
-        {
-        if( aSetRandom )
-            {
-            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
-            SetContentToTextParamL(param->iIncomingPassword, random);
-            param->iIncomingPassword->Des().LowerCase();
-            }
-        else
-            SetContentToTextParamL(param->iIncomingPassword, aElemContent);
-        }
-    else if( aElemName == Kincomingservername )
-        {
-        if( aSetRandom )
-            {
-            TPtrC random(iEngine->RandomString(CCreatorEngine::ECompany));
-            HBufC* srvName = HBufC::NewLC(KIncomingSrvPrefix().Length()+random.Length()+KSrvPostfix().Length());
-            srvName->Des().Copy(KIncomingSrvPrefix);
-            srvName->Des().Append(random);
-            srvName->Des().Append(KSrvPostfix);
-            SetContentToTextParamL(param->iIncomingServerName, srvName->Des());
-            CleanupStack::PopAndDestroy(); // srvName
-            }
-        else
-            SetContentToTextParamL(param->iIncomingServerName, aElemContent);
-        }
-    else if( aElemName == Kincomingconnectionmethod )
-        {
-        if( aSetRandom )                        
-            SetContentToTextParamL(param->iIncomingConnectionMethod, KDefaultConnMethod);            
-        else
-            SetContentToTextParamL(param->iIncomingConnectionMethod, aElemContent);
-        }
-    else if( aElemName == Kincomingfolderpath )
-        SetContentToTextParamL(param->iIncomingFolderPath, aElemContent);
-    else if( aElemName == Kpathseparator )
-        SetContentToTextParamL(param->iPathSeparator, aElemContent);
-    else if( aElemName == Koutgoingloginname )
-        {
-        if( aSetRandom )
-            {
-            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
-            SetContentToTextParamL(param->iOutgoingLoginName, random);
-            param->iOutgoingLoginName->Des().LowerCase();
-            }
-        else
-            SetContentToTextParamL(param->iOutgoingLoginName, aElemContent);
-        }
-    else if( aElemName == Koutgoingpassword )
-        {
-        if( aSetRandom )
-            {
-            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
-            SetContentToTextParamL(param->iOutgoingPassword, random);
-            param->iOutgoingPassword->Des().LowerCase();
-            }
-        else
-            SetContentToTextParamL(param->iOutgoingPassword, aElemContent);
-        }
-    else if( aElemName == Koutgoingservername )
-        {
-        if( aSetRandom )
-            {
-            TPtrC random(iEngine->RandomString(CCreatorEngine::ECompany));
-            HBufC* srvName = HBufC::NewLC(KOutgoingSrvPrefix().Length()+random.Length()+KSrvPostfix().Length());
-            srvName->Des().Copy(KOutgoingSrvPrefix);
-            srvName->Des().Append(random);
-            srvName->Des().Append(KSrvPostfix);
-            SetContentToTextParamL(param->iOutgoingServerName, srvName->Des());
-            CleanupStack::PopAndDestroy(); // srvName
-            }
-        else
-            SetContentToTextParamL(param->iOutgoingServerName, aElemContent);
-        }
-    else if( aElemName == Koutgoingconnectionmethod )
-        {
-        if( aSetRandom )            
-            SetContentToTextParamL(param->iOutgoingConnectionMethod, KDefaultConnMethod);            
-        else
-            SetContentToTextParamL(param->iOutgoingConnectionMethod, aElemContent);
-        }
-    else if( aElemName == Kownemail )
-        {
-        if( aSetRandom )
-            {
-            TDesC* email = iEngine->CreateEmailAddressLC();
-            SetContentToTextParamL(param->iOwnEmailAddress, *email);
-            CleanupStack::PopAndDestroy(); // email
-            }
-        else
-            SetContentToTextParamL(param->iOwnEmailAddress, aElemContent);
-        }
-    else if( aElemName == Kemailalias )
-        {
-        if( aSetRandom )
-            {
-            _LIT(KSpace, " ");
-            TPtrC firstName(iEngine->RandomString(CCreatorEngine::EFirstName));
-            TPtrC lastName(iEngine->RandomString(CCreatorEngine::ESurname));
-            HBufC* alias = HBufC::NewLC(firstName.Length() + lastName.Length() + KSpace().Length());
-            alias->Des().Copy(firstName);
-            alias->Des().Append(KSpace);
-            alias->Des().Append(lastName);
-            SetContentToTextParamL(param->iOwnEmailAlias, alias->Des());
-            CleanupStack::PopAndDestroy(); // alias
-            }
-        else        
-            SetContentToTextParamL(param->iOwnEmailAlias, aElemContent);
-        }
-    else if( aElemName == Kreceiptaddress )
-        {
-        if( aSetRandom )
-            {
-            TDesC* email = iEngine->CreateEmailAddressLC();
-            SetContentToTextParamL(param->iReceiptAddress, *email);
-            CleanupStack::PopAndDestroy(); // email
-            }
-        else
-            SetContentToTextParamL(param->iReceiptAddress, aElemContent);
-        }
-    else if( aElemName == Kreplytoaddress )
-        {
-        if( aSetRandom )
-            {
-            TDesC* email = iEngine->CreateEmailAddressLC();
-            SetContentToTextParamL(param->iReceiptAddress, *email);
-            CleanupStack::PopAndDestroy(); // email
-            }
-        else
-            SetContentToTextParamL(param->iReplyToAddress, aElemContent);
-        }
-    else
-        return EFalse;
-    
-    return ETrue;
-    }
-
-TBool CCreatorMailboxElement::SetEnumParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
-    {
-    // Get email options:
-    if( aElemName == Kgetemailoptions )
-        {
-        if( aSetRandom )
-            param->iGetEmailOptions = (CMailboxesParameters::TGetEmailOption) iEngine->RandomNumber(
-                                                    CMailboxesParameters::EGetHeaders, 
-                                                    CMailboxesParameters::EGetEmailOptionLast-1);
-        else if( CompareIgnoreCase(aElemContent, Kgetheaders ) == 0 )
-            param->iGetEmailOptions = CMailboxesParameters::EGetHeaders;
-        else if( CompareIgnoreCase(aElemContent, Kgetbodytext) == 0 )
-            param->iGetEmailOptions = CMailboxesParameters::EGetBodyText;
-        else if( CompareIgnoreCase(aElemContent, Kgetbodytextandattachments) == 0 )
-            param->iGetEmailOptions = CMailboxesParameters::EGetBodyTextAndAttachments;
-        else if( CompareIgnoreCase(aElemContent, Kgetattachments) == 0 )
-            param->iGetEmailOptions = CMailboxesParameters::EGetAttachments;
-        else if( CompareIgnoreCase(aElemContent, Kgetbodyalternativetext) == 0 )
-            param->iGetEmailOptions = CMailboxesParameters::EGetBodyAlternativeText;
-        else 
-            param->iGetEmailOptions = CMailboxesParameters::EUndef;
-        }
-    
-    // Subscribe type:
-    else if( aElemName == Ksubscribetype )
-        {
-        if( aSetRandom )
-            param->iSubscribeType = (TFolderSubscribeType) iEngine->RandomNumber( EUpdateNeither, EUpdateBoth );
-        else if( CompareIgnoreCase( aElemContent, Kupdatelocal) == 0 )
-            param->iSubscribeType = EUpdateLocal;            
-        else if( CompareIgnoreCase( aElemContent, Kupdateremote) == 0 )
-            param->iSubscribeType = EUpdateRemote;
-        else if( CompareIgnoreCase( aElemContent, Kupdateboth) == 0 )
-            param->iSubscribeType = EUpdateBoth;
-        else
-            param->iSubscribeType = EUpdateNeither;
-        }
-    
-    // Folder synchronization type:
-    else if( aElemName == Kfoldersynctype)
-        {
-        if( aSetRandom )
-            param->iSyncType = (TFolderSyncType) iEngine->RandomNumber(EUseCombination, EUseRemote);
-        else if( CompareIgnoreCase( aElemContent, Kuselocal) == 0 )
-            param->iSyncType = EUseLocal;
-        else if( CompareIgnoreCase( aElemContent, Kuseremote) == 0 )
-            param->iSyncType = EUseRemote;
-        else
-            param->iSyncType = EUseCombination;
-        }
-     
-    // Send copy to self option:
-    else if( aElemName == Kcopytoself )
-        {
-        if( aSetRandom )
-            param->iSendCopyToSelf = (TImSMTPSendCopyToSelf) iEngine->RandomNumber(ESendNoCopy, ESendCopyAsBccRecipient);
-        else if( CompareIgnoreCase( aElemContent, Kto) == 0 )
-            param->iSendCopyToSelf = ESendCopyAsToRecipient;
-        else if( CompareIgnoreCase( aElemContent, Kcc) == 0 )
-            param->iSendCopyToSelf = ESendCopyAsCcRecipient;
-        else if( CompareIgnoreCase( aElemContent, Kbcc) == 0 )
-            param->iSendCopyToSelf = ESendCopyAsBccRecipient;
-        else
-            param->iSendCopyToSelf = ESendNoCopy;
-        }
-    
-    // Send option:
-    else if( aElemName == Ksendoption )
-        {
-        if( aSetRandom )
-            param->iSendOption = (TImSMTPSendMessageOption) iEngine->RandomNumber(ESendMessageImmediately, ESendMessageOnRequest);
-        else if( CompareIgnoreCase( aElemContent, Konnextconnection) == 0 )
-            param->iSendOption = ESendMessageOnNextConnection;
-        else if( CompareIgnoreCase( aElemContent, Konrequest) == 0 )
-            param->iSendOption = ESendMessageOnRequest;
-        else
-            param->iSendOption = ESendMessageImmediately;
-        }
-    else
-        {
-        return EFalse;
-        }
-    return ETrue;
-    }
-
-void CCreatorMailboxElement::ExecuteCommandL()
-    {
-    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
-    const CCreatorScriptAttribute* typeAttr = FindAttributeByName(KMailboxType);
-    TInt amount = 1;    
-    if( amountAttr )
-        {
-        amount = ConvertStrToIntL(amountAttr->Value());
-        }
-    
-    TMailboxType mailboxType = EMailboxPOP3;
-    
-    if( typeAttr && CompareIgnoreCase(typeAttr->Value(), Kimap4) == 0 )
-        {
-        mailboxType = EMailboxIMAP4;
-        }
-    
-    // Get 'fields' element 
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    if( fieldsElement && fieldsElement->SubElements().Count() > 0)
-        {
-        // Get sub-elements
-        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
-        // Create mailbox entries, the amount of entries is defined by amount:
-        for( TInt cI = 0; cI < amount; ++cI )
-            {            
-            CMailboxesParameters* param = new (ELeave) CMailboxesParameters;
-            CleanupStack::PushL(param);
-            
-            param->iMailboxType = mailboxType;
-            
-            for( TInt i = 0; i < fields.Count(); ++i )
-                {
-                CCreatorScriptElement* field = fields[i];
-                TPtrC elemName = field->Name();
-                TPtrC elemContent = field->Content();
-                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
-                TBool useRandom = EFalse;
-                if( randomAttr || elemContent.Length() == 0 )
-                    {
-                    useRandom = ETrue;
-                    }
-                
-                if( SetTextParamL(elemName, elemContent, param, useRandom ) == EFalse &&
-                    SetBooleanParamL(elemName, elemContent, param, useRandom ) == EFalse &&
-                    SetIntegerParamL(elemName, elemContent, param, useRandom ) == EFalse &&
-                    SetEnumParamL(elemName, elemContent, param, useRandom ) )
-                    {
-                    LOGSTRING2("CCreatorMailboxElement::ExecuteCommandL: Unknown mailbox field: %S", &elemName);
-                    }
-                }
-            iEngine->AppendToCommandArrayL(ECmdCreateMessagingEntryMailboxes, param);
-            CleanupStack::Pop(); // param
-            }
-        }
-    else
-    	{
-    	iEngine->AppendToCommandArrayL(ECmdCreateMessagingEntryMailboxes, 0, amount);
-    	}
-    }
--- a/creator/engine/src/creator_message.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1825 +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 "engine.h"
-#include "enginewrapper.h"
-
-#include "creator_message.h" 
-#include "creator_traces.h"
-#include "creator_contactsetcache.h"
-#include "creator_phonebook.h"
-#include <apgcli.h>
-#include <MuiuServiceUtilities.h>
-#include <utf.h>
-
-#include <mmf/common/mmfcontrollerpluginresolver.h> // for CleanupResetAndDestroyPushL
-
-//static const TInt KMessagesFieldLength = 1024;
-
-//_LIT(KCreatorMessagesPrefixName, "CR_");
-//_LIT(KCreatorMessagesPrefixFolderName, "CR_FLDR_");
-
-
-const TUid KUidBIOBusinessCardMsg =  {0x10005531}; 
-_LIT(KEmpty, "");
-
-//----------------------------------------------------------------------------
-
-CMessagesParameters::CMessagesParameters()
-    {
-    LOGSTRING("Creator: CMessagesParameters::CMessagesParameters");
-
-    iSenderAddress = HBufC::New(128);
-    iRecipientAddress = HBufC::New(128);
-    iMessageSubject = HBufC::New(128);
-    iMessageBodyText = HBufC::New(10240);
-    TRAP_IGNORE(iAttachments = new(ELeave) CArrayFixFlat<TInt>(64));
-    iCreateAsUnread = ETrue;
-    }
-
-CMessagesParameters::~CMessagesParameters()
-    {
-    LOGSTRING("Creator: CMessagesParameters::~CMessagesParameters");
-
-
-    delete iMessageBodyText;
-    delete iMessageSubject;
-    delete iRecipientAddress;
-    delete iSenderAddress;
-    delete iAttachments;
-    iAttachmentPaths.ResetAndDestroy();
-    iAttachmentPaths.Close(); 
-    iRecipientAddressArray.ResetAndDestroy();
-    iRecipientAddressArray.Close();
-    iRecipientLinkIds.Close();
-    iSenderLinkIds.Close();
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorMessages* CCreatorMessages::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorMessages* self = CCreatorMessages::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorMessages* CCreatorMessages::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorMessages* self = new (ELeave) CCreatorMessages;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorMessages::CCreatorMessages()
-    {
-    }
-
-void CCreatorMessages::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorMessages::ConstructL");
-    iEngine = aEngine;
-    
-    TRAP_IGNORE(iAttachments = new(ELeave) CArrayFixFlat<TInt>(64));
-    iWaiter = CAsyncWaiter::NewL();
-    }
-
-CCreatorMessages::~CCreatorMessages()
-    {
-    LOGSTRING("Creator: CCreatorMessages::~CCreatorMessages");
-
-    if ( iEngine && iEntryIds.Count() )
-        {
-        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidMessages ) );
-        }
-    iEntryIds.Reset();
-    iEntryIds.Close();
-    
-    delete iParameters;
-    delete iWaiter;
-    delete iTmpPhoneNumber;
-    delete iTmpEmail;
-    delete iAttachments;
-
-    iRecipientArray.ResetAndDestroy();
-    iRecipientArray.Close();
-    iSenderArray.ResetAndDestroy();
-    iSenderArray.Close();
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorMessages::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
-    {
-    LOGSTRING("Creator: CCreatorMessages::QueryDialogClosedL");  
-    
-    if( aPositiveAction == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        return;
-        }
-    
-    const TDesC* showText = &KSavingText;
-    TBool finished(EFalse);
-    TBool retval(ETrue);
-    switch(aUserData)
-        {
-        case ECreatorMessagesDelete:
-            showText = &KDeletingText;
-            iEntriesToBeCreated = 1;
-            finished = ETrue;
-            break;
-        case ECreatorMessagesStart:
-            // message type query
-            retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Message type"), R_MESSAGE_TYPE_QUERY, (TInt*) &iMessageType, this, ECreatorMessagesMessageType);
-            break;
-        case ECreatorMessagesMessageType:
-            retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Folder type"), R_FOLDER_TYPE_QUERY, (TInt*) &iFolderType, this, ECreatorMessagesFolderType);
-            break;
-        case ECreatorMessagesFolderType:
-            // query create as unread
-            retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Message status"), R_UNREAD_QUERY, (TInt*)&iCreateAsUnread, this, ECreatorMessagesMessageStatus);
-            break;
-        case ECreatorMessagesMessageStatus:
-            if( iMessageType == ESMS || iMessageType == EMMS || iMessageType == EEmail )
-                {
-                iDefinedMessageLength = 100;
-                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iDefinedMessageLength, _L("Amount of characters in message body?"), ETrue, 
-                    this, ECreatorMessagesCharsInBody
-                    );
-                break;
-                }
-            else
-                {
-                iDefinedMessageLength = 0;
-                // goto query attachments ... :-) DO NOT break;
-                }
-        case ECreatorMessagesCharsInBody:
-            // query attachments
-            iAttachments->Reset();
-            if( iMessageType == EMMS || iMessageType == EEmail)
-                {
-                retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Choose attachment:"), R_ATTACHMENT_MULTI_SELECTION_QUERY, 
-                    iAttachments, this, ECreatorMessagesAttachment
-                    );
-                }
-            else if( iMessageType == EAMS )
-                {
-                iAttachments->AppendL( TInt(0) );
-                retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Choose attachment:"), R_AMS_ATTACHMENT_SINGLE_SELECTION_QUERY, 
-                    &iAttachments->At(0), this, ECreatorMessagesAttachment
-                    );
-                }
-            else if( iMessageType == EIrMessage || iMessageType == EBTMessage )
-                {
-                iAttachments->AppendL( TInt(0) );
-                retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Choose attachment:"), R_ATTACHMENT_SINGLE_SELECTION_QUERY,
-                    &iAttachments->At(0), this, ECreatorMessagesAttachment
-                    );
-                }
-            else
-                {
-                finished = ETrue;
-                }
-            break;
-        case ECreatorMessagesAttachment:
-            finished = ETrue;
-            if(iMessageType== EMMS || iMessageType == EEmail)
-                {
-                // "none" is selected
-                if (iAttachments->At(0) == 0)
-                    {
-                    iAttachments->Reset();
-                    }
-                else  // otherwise fix indexes
-                    {
-                    for (TInt i=0; i<iAttachments->Count(); i++)
-                        iAttachments->At(i)--;  // decrease value by one 
-
-                    }
-                }
-            break;
-        default:
-            //some error
-            retval = EFalse;
-            break;
-        }
-    if( retval == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        }
-    else if( finished )
-        {
-        // add this command to command array
-        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
-        // started exucuting commands
-        iEngine->ExecuteFirstCommandL( *showText );
-        }
-    }
-//----------------------------------------------------------------------------
-
-TBool CCreatorMessages::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorMessages::AskDataFromUserL");
-
-    CCreatorModuleBase::AskDataFromUserL(aCommand);
-    
-    if ( aCommand == ECmdDeleteMessages )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all messages?"), this, ECreatorMessagesDelete );
-        }
-    else if ( aCommand ==  ECmdDeleteCreatorMessages )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all messages created with Creator?"), this, ECreatorMessagesDelete  );
-        }
-
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorMessagesStart );
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateRandomMessageEntryL(TInt aCommand)
-    {
-    LOGSTRING2("Creator: CCreatorMessages::CreateRandomMessageEntryL - Command: %d", aCommand);
-
-    TInt err = KErrNone;
-    
-    iDefinedMessageLength = iEngine->RandomNumber(100, 300);
-
-
-    switch (aCommand)
-        {
-	    case ECmdCreateRandomEntrySMSInbox:     { iMessageType=ESMS; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntrySMSDrafts:    { iMessageType=ESMS; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntrySMSOutbox:    { iMessageType=ESMS; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntrySMSSent:      { iMessageType=ESMS; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
-	    
-        case ECmdCreateRandomEntryMMSInbox:     { iMessageType=EMMS; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryMMSDrafts:    { iMessageType=EMMS; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryMMSOutbox:    { iMessageType=EMMS; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}    
-	    case ECmdCreateRandomEntryMMSSent:      { iMessageType=EMMS; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
-	    
-        case ECmdCreateRandomEntryEmailInbox:   { iMessageType=EEmail; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryEmailDrafts:  { iMessageType=EEmail; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryEmailOutbox:  { iMessageType=EEmail; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryEmailSent:    { iMessageType=EEmail; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
-	    
-        case ECmdCreateRandomEntryBIOInbox:     { iMessageType=ESmartMessage; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryBIODrafts:    { iMessageType=ESmartMessage; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryBIOOutbox:    { iMessageType=ESmartMessage; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryBIOSent:      { iMessageType=ESmartMessage; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
-	    
-        case ECmdCreateRandomEntryIRInbox:      { iMessageType=EIrMessage; iFolderType=EInbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryIRDrafts:     { iMessageType=EIrMessage; iFolderType=EDrafts; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryIROutbox:     { iMessageType=EIrMessage; iFolderType=EOutbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryIRSent:       { iMessageType=EIrMessage; iFolderType=ESent; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-	    
-        case ECmdCreateRandomEntryBTInbox:      { iMessageType=EBTMessage; iFolderType=EInbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryBTDrafts:     { iMessageType=EBTMessage; iFolderType=EDrafts; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryBTOutbox:     { iMessageType=EBTMessage; iFolderType=EOutbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryBTSent:       { iMessageType=EBTMessage; iFolderType=ESent; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
-        
-	    case ECmdCreateRandomEntryAMSInbox:     { iMessageType=EAMS; iFolderType=EInbox; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryAMSDrafts:     { iMessageType=EAMS; iFolderType=EDrafts; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryAMSOutbox:     { iMessageType=EAMS; iFolderType=EOutbox; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
-	    case ECmdCreateRandomEntryAMSSent:     { iMessageType=EAMS; iFolderType=ESent; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
-
-	    default: { User::Panic(_L("MessageCommand"), 901);  break;}
-        }
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateMessageEntryL(CMessagesParameters *aParameters, TBool /*aTakeUserGivenParameters*/)
-    {
-    LOGSTRING("Creator: CCreatorMessages::CreateMessageEntryL");
-    
-    delete iParameters;
-    iParameters = 0;   
-    
-    CMessagesParameters* parameters = aParameters;
-           
-    // random data needed if no predefined data available
-    if (!parameters)
-        {
-        iParameters = new(ELeave) CMessagesParameters;
-        parameters = iParameters;
-        // check if values from ui needed
-        //if (aTakeUserGivenParameters)
-        //    {            
-            parameters->iMessageType = iMessageType;
-            parameters->iFolderType = iFolderType;
-            parameters->iDefinedMessageLength = iDefinedMessageLength;
-            parameters->iCreateAsUnread = iCreateAsUnread;
-
-            for (TInt i=0; i<iAttachments->Count(); i++)
-                parameters->iAttachments->AppendL(iAttachments->At(i)); 
-        //    }
-        //else
-        //    {
-            // message length
-        //    parameters->iDefinedMessageLength = iEngine->RandomNumber(100, 300);
-        //    }    
-
-        if (parameters->iMessageType == EEmail)
-            {
-            parameters->iSenderAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
-            parameters->iSenderAddress->Des().Append( _L("@") );
-            parameters->iSenderAddress->Des().Append( iEngine->RandomString(CCreatorEngine::ECompany) );
-            parameters->iSenderAddress->Des().Append( _L(".com") );
-
-            parameters->iRecipientAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
-            parameters->iRecipientAddress->Des().Append( _L("@") );
-            parameters->iRecipientAddress->Des().Append( iEngine->RandomString(CCreatorEngine::ECompany) );
-            parameters->iRecipientAddress->Des().Append( _L(".net") );
-            }
-        else if (parameters->iMessageType == EIrMessage || parameters->iMessageType == EBTMessage)
-            {
-            parameters->iSenderAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
-            parameters->iRecipientAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
-            }
-        else
-            {
-            parameters->iSenderAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EPhoneNumber) );
-            parameters->iRecipientAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EPhoneNumber) );
-            }
-
-        // subject
-        parameters->iMessageSubject->Des() = iEngine->RandomString(CCreatorEngine::EMessageSubject);
-
-        // message body
-        parameters->iMessageBodyText->Des().Copy(_L(""));
-        TPtrC randText = iEngine->RandomString(CCreatorEngine::EMessageText);
-        for (TInt i=0; i<parameters->iDefinedMessageLength / randText.Length() +1; i++)
-            {
-            parameters->iMessageBodyText->Des().Append( randText );
-            parameters->iMessageBodyText->Des().Append( _L(" ") );
-            }
-        parameters->iMessageBodyText->Des() = parameters->iMessageBodyText->Des().Left(parameters->iDefinedMessageLength);
-
-        // BIO message type (from bitsids.h)  // TO-DO: add support for all BIO message types...
-        parameters->iBIOMessageType = KUidBIOBusinessCardMsg;
-        }
-    
-    
-
-    TInt err = KErrNone;
-
-    switch (parameters->iMessageType)
-        {
-        case ESMS:          { err = CreateSMSEntryL(*parameters);  break; }
-        case EMMS:          { err = CreateMMSEntryL(*parameters);  break; }
-        case EAMS:          { err = CreateAMSEntryL(*parameters);  break; }
-        case EEmail:        { err = CreateEmailEntryL(*parameters);  break; }
-        case ESmartMessage: { err = CreateSmartMessageEntryL(*parameters);  break; }
-        case EIrMessage:    { err = CreateObexEntryL( TUid::Uid(KUidMsgTypeIrTInt32), *parameters );  break; }    
-        case EBTMessage:    { err = CreateObexEntryL( TUid::Uid(KUidMsgTypeBtTInt32), *parameters );  break; }
-        default:            { User::Panic(_L("MsgType"), 851);  break;}
-
-        }
-
-    iSenderArray.ResetAndDestroy();
-    iRecipientArray.ResetAndDestroy();
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateSMSEntryL(const CMessagesParameters& parameters)
-    {
-    LOGSTRING("Creator: CCreatorMessages::CreateSMSEntryL");
-
-    TInt err = KErrNone;
-
-               
-    // init
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
-    CleanupStack::PushL(registry);
-
-    // get the client mtm and return if it isn't supported in the system        
-    CSmsClientMtm* clientMtm = NULL;
-    TRAP(err, clientMtm = static_cast<CSmsClientMtm*>(registry->NewMtmL(KUidMsgTypeSMS)));
-    if (err || !clientMtm)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("SMS: Message type module not found"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        }  
-    CleanupStack::PushL(clientMtm);   
-
-    // create a new object to access an existing entry
-    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
-    CleanupStack::PushL(msvEntry);
-  
-    // get default service
-    TMsvId defaultServiceId = 0;
-    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
-    if (err)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("SMS: Define a SMS centre first"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        } 
-    
-    // set folder type
-    switch (parameters.iFolderType)
-        {
-        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
-        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
-        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
-        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
-        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
-        }
-        
-    // mtm takes ownership of entry context	
-    CleanupStack::Pop(msvEntry);
-    clientMtm->SetCurrentEntryL(msvEntry);    
-    
-    // create a new message
-    clientMtm->CreateMessageL(defaultServiceId);
-
-    // set the from field to sms header
-    // !!! This will cause CRASH
-    /*if (parameters.iFolderType == EInbox)
-        {
-        CSmsHeader* smsHeader = &clientMtm->SmsHeader();
-        delete smsHeader; // <-- This will cause CRASH
-        smsHeader = NULL;
-        smsHeader = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, clientMtm->Body());        
-        if( parameters.iSenderAddress )
-            {
-            smsHeader->SetFromAddressL( parameters.iSenderAddress->Des() );
-            }
-        else
-            {
-            smsHeader->SetFromAddressL(KEmpty);
-            }
-        }       */
-
-    // set body
-    clientMtm->Body().Reset();
-    clientMtm->Body().InsertL(0, parameters.iMessageBodyText->Des());        
-
-    // get the entry of the message
-    TMsvEntry messageEntry = clientMtm->Entry().Entry();
-
-    // set the details field
-    if (parameters.iFolderType == EInbox)
-        {
-        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
-        }
-    else
-        {
-        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
-        // Add all recipients to clientMtm
-        // iRecipientArray is up-to-date so don't call AddRecipientsL here 
-        for( TInt i = 0; i < iRecipientArray.Count(); i++ )
-            {
-            clientMtm->AddAddresseeL( iRecipientArray[i]->Des() );
-            }
-        }
-
-    // set the sending state for outbox message
-    // to avoid SMSMtmUI:15 panic in messages application
-    if (parameters.iFolderType == EOutbox )
-        {
-        messageEntry.SetSendingState( KMsvSendStateWaiting );
-        }
-
-    // set the description field same as the first part of the message body
-    messageEntry.iDescription.Set( parameters.iMessageBodyText->Des().Left(KSmsDescriptionLength) );
-
-    // save the changes done above
-    clientMtm->Entry().ChangeL(messageEntry);
-
-    // save the message     
-    clientMtm->SaveMessageL();
-    	
-	// final fine tuning
-    messageEntry.SetAttachment(EFalse);
-    messageEntry.iDate.HomeTime();
-    messageEntry.SetVisible(ETrue);
-    messageEntry.SetInPreparation(EFalse);
-   
-    if (parameters.iCreateAsUnread)
-        {
-        messageEntry.SetUnread(ETrue);
-        messageEntry.SetNew(ETrue);
-        }
-    else
-        {
-        messageEntry.SetUnread(EFalse);
-        messageEntry.SetNew(EFalse);
-        }
-    
-    messageEntry.SetComplete(ETrue);
-    messageEntry.iServiceId = defaultServiceId;
-    messageEntry.iRelatedId = 0;
-    clientMtm->Entry().ChangeL(messageEntry);
-
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iEntryIds.AppendL( messageEntry.Id() );
-    
-    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm
-        
-    return err;
-
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateMMSEntryL(const CMessagesParameters& parameters)
-    {
-    LOGSTRING("Creator: CCreatorMessages::CreateMMSEntryL");
-
-    TInt err = KErrNone;
-        
-    // init
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
-    CleanupStack::PushL(registry);
-
-    // get the client mtm and return if it isn't supported in the system        
-    CMmsClientMtm* clientMtm = NULL;
-    TRAP(err, clientMtm = static_cast<CMmsClientMtm*>(registry->NewMtmL(KUidMsgTypeMultimedia)));
-    if (err || !clientMtm)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Message type module not found"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        }  
-    CleanupStack::PushL(clientMtm);   
-
-    // create a new object to access an existing entry
-    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
-    CleanupStack::PushL(msvEntry);
-  
-    // get default service
-    TMsvId defaultServiceId = 0;
-    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
-    if (err)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Define MMS settings first"));
-        CleanupStack::PopAndDestroy(4);
-        User::Leave(KErrNotFound);
-        } 
-    
-    // set folder type
-    switch (parameters.iFolderType)
-        {
-        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
-        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
-        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
-        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
-        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
-        }
-        
-    // mtm takes ownership of entry context	
-    CleanupStack::Pop(msvEntry);
-    clientMtm->SetCurrentEntryL(msvEntry);    
-    
-    // create a new message
-    clientMtm->CreateMessageL(defaultServiceId);
-
-    // set subject
-    clientMtm->SetSubjectL( parameters.iMessageSubject->Des() );
-            
-    // set some mms defaults
-    clientMtm->SetMessageClass(EMmsClassPersonal);
-    clientMtm->SetExpiryInterval(86400);
-    clientMtm->SetDeliveryTimeInterval(3600);
-    clientMtm->SetMessagePriority(EMmsPriorityLow);
-    clientMtm->SetSenderVisibility(EMmsMaximumSenderVisibility);
-    clientMtm->SetDeliveryReport(EMmsDeliveryReportYes);
-    clientMtm->SetReadReply(EMmsReadReplyYes);        
-    
-    // set the sender / addressee field
-    if (parameters.iFolderType == EInbox)
-        {        
-        AddMtmSenderL(*clientMtm, parameters, EFalse);                
-        }
-    
-    // Add all recipients to clientMtm
-    AddRecipientsL( *clientMtm, parameters, EFalse );  
-        
-    // get an access to the message store
-    CMsvStore* store = msvEntry->EditStoreL();
-    CleanupStack::PushL(store);                  
-   
-
-    // set body as an attachment
-    CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL();
-    CleanupStack::PushL(mimeHeaders);
-    mimeHeaders->SetContentTypeL( _L8("text") );
-    mimeHeaders->SetContentSubTypeL( _L8("plain") );
-    mimeHeaders->SetMimeCharset( KMmsUtf8 );
-    mimeHeaders->SetSuggestedFilenameL( _L("body.txt") );
-    
-    MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
-    CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
-    CleanupStack::PushL(attachmentInfo);
-    attachmentInfo->SetAttachmentNameL( _L("body.txt") );
-    attachmentInfo->SetMimeTypeL( _L8("text/plain") );
-    mimeHeaders->StoreL( *attachmentInfo );
-    
-    RFile textFile;
-
-    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-    attachMan.CreateAttachmentL(_L("body.txt"), textFile, attachmentInfo, waiter->iStatus );
-    CleanupStack::Pop(); // waiter
-    CleanupStack::Pop(); // attachmentInfo
-    CleanupStack::PushL(waiter);
-    waiter->StartAndWait();
-    CleanupStack::PopAndDestroy(waiter);        
-   
-    HBufC8* tempBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L( parameters.iMessageBodyText->Des() );
-    CleanupStack::PushL(tempBuf);
-    textFile.Write( tempBuf->Des() );        
-    textFile.Close();
-    CleanupStack::PopAndDestroy(); //tempBuf
-    
-    CleanupStack::PopAndDestroy(); //mimeHeaders
-
-    
-    // get the entry of the message
-    TMsvEntry messageEntry = clientMtm->Entry().Entry();        
-    
-    // set the details field
-    if (parameters.iFolderType == EInbox)
-        {
-        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
-        }
-    else
-        {
-        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
-        }    
-
-    // set the description field same as the message subject
-    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
-
-    // save the changes done above
-    clientMtm->Entry().ChangeL(messageEntry);        
-    
-
-      // save the attachments
-    HandleAttachementsL(parameters, store, err );
-//    for (TInt i=0; i<parameters.iAttachments->Count(); i++)
-//        {
-//        TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(i) );
-//
-//        TParse parser;
-//        parser.Set(sourceFileName, NULL, NULL);
-//        TFileName shortFileName = parser.NameAndExt();
-//
-//        // get the mime type
-//        RApaLsSession ls;
-//        User::LeaveIfError(ls.Connect());
-//        CleanupClosePushL<RApaLsSession>(ls);
-//        TUid appUid;
-//        TDataType dataType;
-//        ls.AppForDocument(sourceFileName, appUid, dataType);
-//        CleanupStack::PopAndDestroy(); //ls
-//        TPtrC8 mimeType = dataType.Des8();
-//        
-//        // attachment settings
-//        MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
-//        CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
-//        attachmentInfo->SetAttachmentNameL( shortFileName );        
-//        attachmentInfo->SetMimeTypeL( mimeType );        
-//
-//        // save
-//        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-//        
-//        TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
-//        if (err == KErrNone)
-//            waiter->StartAndWait();
-//        else
-//            LOGSTRING2("Creator: CCreatorMessages::CreateMMSEntryL failed to attach %S", &sourceFileName);
-//
-//        CleanupStack::PopAndDestroy(waiter);  
-//        }
-
-    // save the changes made to the message store
-    store->CommitL();
-    CleanupStack::PopAndDestroy(store);   
-           
-    
-    // save the message      
-    clientMtm->SaveMessageL();
-    	
-	// final fine tuning
-	messageEntry.SetAttachment(ETrue);
-    messageEntry.iDate.HomeTime();
-    messageEntry.SetVisible(ETrue);
-    messageEntry.SetInPreparation(EFalse);
-    if (parameters.iCreateAsUnread)
-        {
-        messageEntry.SetUnread(ETrue);
-        messageEntry.SetNew(ETrue);
-        }
-    else
-        {
-        messageEntry.SetUnread(EFalse);
-        messageEntry.SetNew(EFalse);
-        }
-    messageEntry.SetComplete(ETrue);
-    messageEntry.iServiceId = defaultServiceId;
-    messageEntry.iRelatedId = 0;
-    
-    if (parameters.iFolderType == EDrafts) 
-        messageEntry.SetReadOnly(EFalse);
-    else
-        messageEntry.SetReadOnly(ETrue);
-
-	messageEntry.iMtmData1 = KMmsMessageMRetrieveConf | KMmsMessageMobileTerminated;
-	
-    clientMtm->Entry().ChangeL(messageEntry);
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iEntryIds.AppendL( messageEntry.Id() );
-    
-    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm        
-        
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::HandleAttachementsL(const CMessagesParameters& parameters, CMsvStore* store, TInt err )
-    {
-    // save the attachments (added with id's)
-  for (TInt i=0; i<parameters.iAttachments->Count(); i++)
-      {
-      TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(i) );
-      HandleAttachementL(store, err, sourceFileName );
-
-      }    
-  //Adding attachmentpaths
-  for (TInt i=0; i<parameters.iAttachmentPaths.Count(); i++)
-      {
-      HBufC* point = parameters.iAttachmentPaths[i];
-      TFileName sourceFileName(point->Des());      
-      HandleAttachementL(store, err, sourceFileName );
-      }
-    }
-//----------------------------------------------------------------------------
-
-void CCreatorMessages::HandleAttachementL(CMsvStore* store, TInt err, TFileName& sourceFileName )
-    {
-    TParse parser;
-    parser.Set(sourceFileName, NULL, NULL);
-    TFileName shortFileName = parser.NameAndExt();
-
-    // get the mime type
-    RApaLsSession ls;
-    User::LeaveIfError(ls.Connect());
-    CleanupClosePushL<RApaLsSession>(ls);
-    TUid appUid;
-    TDataType dataType;
-    ls.AppForDocument(sourceFileName, appUid, dataType);
-    CleanupStack::PopAndDestroy(); //ls
-    TPtrC8 mimeType = dataType.Des8();
-    
-    // attachment settings
-    MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
-    CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
-    CleanupStack::PushL(attachmentInfo);
-    attachmentInfo->SetAttachmentNameL( shortFileName );        
-    attachmentInfo->SetMimeTypeL( mimeType );
-    
-    if ( mimeType == _L8("text/plain") )
-        {
-        // CMsvMimeHeaders needs to be stored in case of text file 
-        CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL();
-        CleanupStack::PushL(mimeHeaders);
-        mimeHeaders->SetContentTypeL( _L8("text") );
-        mimeHeaders->SetContentSubTypeL( _L8("plain") );
-        mimeHeaders->SetMimeCharset( KMmsUtf8 );
-        mimeHeaders->StoreL( *attachmentInfo );
-        CleanupStack::PopAndDestroy( mimeHeaders );
-        }
-
-    // save
-    
-    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-    TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
-    if (err == KErrNone)
-    	{
-        waiter->StartAndWait();
-        CleanupStack::PopAndDestroy(waiter);
-        CleanupStack::Pop(); // attachmentInfo, the ownership is transferred
-    	}
-    else
-    	{
-    	CleanupStack::PopAndDestroy(waiter);
-    	CleanupStack::PopAndDestroy(); // attachmentInfo, ownership is not transferred (leave occurs)
-        LOGSTRING2("Creator: CCreatorMessages::HandleAttachementsL failed to attach %S", &sourceFileName);
-    	}
-    }
-      //----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateAMSEntryL(const CMessagesParameters& parameters)
-    {
-    LOGSTRING("Creator: CCreatorMessages::CreateAMSEntryL");
-
-    TInt err = KErrNone;
-
-        
-    // init
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
-    CleanupStack::PushL(registry);
-
-    // get the client mtm and return if it isn't supported in the system        
-    CMmsClientMtm* clientMtm = NULL;
-    TRAP(err, clientMtm = static_cast<CMmsClientMtm*>(registry->NewMtmL(KUidMsgTypeMultimedia)));
-    if (err || !clientMtm)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Message type module not found"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        }  
-    CleanupStack::PushL(clientMtm);   
-
-    // create a new object to access an existing entry
-    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
-    CleanupStack::PushL(msvEntry);
-  
-    // get default service
-    TMsvId defaultServiceId = 0;
-    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
-    if (err)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Define MMS settings first"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        } 
-    
-    // set folder type
-    switch (parameters.iFolderType)
-        {
-        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
-        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
-        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
-        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
-        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
-        }
-        
-    // mtm takes ownership of entry context	
-    CleanupStack::Pop(msvEntry);
-    clientMtm->SetCurrentEntryL(msvEntry);    
-    
-    // create a new message
-    clientMtm->CreateMessageL(defaultServiceId);
-
-    // set subject
-    clientMtm->SetSubjectL(parameters.iMessageSubject->Des() );
-            
-    // set some mms defaults
-    clientMtm->SetMessageClass(EMmsClassPersonal);
-    clientMtm->SetExpiryInterval(86400);
-    clientMtm->SetDeliveryTimeInterval(3600);
-    clientMtm->SetMessagePriority(EMmsPriorityLow);
-    clientMtm->SetSenderVisibility(EMmsMaximumSenderVisibility);
-    clientMtm->SetDeliveryReport(EMmsDeliveryReportYes);
-    clientMtm->SetReadReply(EMmsReadReplyYes);        
-    
-    // set the sender / addressee field
-    if (parameters.iFolderType == EInbox)
-        {
-        AddMtmSenderL(*clientMtm, parameters, EFalse);                
-        }
-
-    // Add all recipients to clientMtm
-    AddRecipientsL( *clientMtm, parameters, EFalse );
-    
-        
-    // get an access to the message store
-    CMsvStore* store = msvEntry->EditStoreL();
-    CleanupStack::PushL(store);                  
-   
-    // get the entry of the message
-    TMsvEntry messageEntry = clientMtm->Entry().Entry();        
-    
-    // set the details field
-    if (parameters.iFolderType == EInbox)
-        {
-        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
-        }  
-    else
-        {
-        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
-        }
-
-    // set the description field same as the message subject
-    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
-    messageEntry.iBioType = KUidMsgSubTypeMmsAudioMsg.iUid;
-    
-    // save the changes done above
-    clientMtm->Entry().ChangeL(messageEntry);        
-    
-
-    TFileName sourceFileName = iEngine->TestDataPathL( CCreatorEngine::EAMR_20kB );
-    TParse parser;
-    parser.Set(sourceFileName, NULL, NULL);
-    TFileName shortFileName = parser.NameAndExt();
-
-    // get the mime type
-    RApaLsSession ls;
-    User::LeaveIfError(ls.Connect());
-    CleanupClosePushL<RApaLsSession>(ls);
-    TUid appUid;
-    TDataType dataType;
-    ls.AppForDocument(sourceFileName, appUid, dataType);
-    CleanupStack::PopAndDestroy(); //ls
-    TPtrC8 mimeType = dataType.Des8();
-        
-    // attachment settings
-    MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
-    CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
-    attachmentInfo->SetAttachmentNameL( shortFileName );        
-    attachmentInfo->SetMimeTypeL( mimeType );        
-
-    // save
-    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-      
-    TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
-    if (err == KErrNone)
-        waiter->StartAndWait();
-    else
-        LOGSTRING2("Creator: CCreatorMessages::CreateAMSEntryL failed to attach %S", &sourceFileName);
-
-    CleanupStack::PopAndDestroy(waiter);  
-
-    // save the changes made to the message store
-    store->CommitL();
-    CleanupStack::PopAndDestroy(store);   
-           
-    
-    // save the message      
-    clientMtm->SaveMessageL();
-    	
-	// final fine tuning
-	messageEntry.SetAttachment(ETrue);
-    messageEntry.iDate.HomeTime();
-    messageEntry.SetVisible(ETrue);
-    messageEntry.SetInPreparation(EFalse);
-    if (parameters.iCreateAsUnread)
-        {
-        messageEntry.SetUnread(ETrue);
-        messageEntry.SetNew(ETrue);
-        }
-    else
-        {
-        messageEntry.SetUnread(EFalse);
-        messageEntry.SetNew(EFalse);
-        }
-    messageEntry.SetComplete(ETrue);
-    messageEntry.iServiceId = defaultServiceId;
-    messageEntry.iRelatedId = 0;
-    
-    if (parameters.iFolderType == EDrafts) 
-        messageEntry.SetReadOnly(EFalse);
-    else
-        messageEntry.SetReadOnly(ETrue);
-
-	messageEntry.iMtmData1 = KMmsMessageMRetrieveConf | KMmsMessageMobileTerminated;
-	
-    clientMtm->Entry().ChangeL(messageEntry);
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iEntryIds.AppendL( messageEntry.Id() );
-    
-    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm        
-        
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateEmailEntryL(const CMessagesParameters& parameters)
-    {
-    LOGSTRING("Creator: CCreatorMessages::CreateEmailEntryL");
-
-    TInt err = KErrNone;
-
-    // init
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
-    CleanupStack::PushL(registry);
-    
-    // get the client mtm and return if it isn't supported in the system        
-    CSmtpClientMtm* clientMtm = NULL;
-    TRAP(err, clientMtm = static_cast<CSmtpClientMtm*>(registry->NewMtmL(KUidMsgTypeSMTP)));
-    
-    if (err || !clientMtm)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Email: Message type module not found"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        }  
-    CleanupStack::PushL(clientMtm);   
-
-    // create a new object to access an existing entry
-    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
-    CleanupStack::PushL(msvEntry);
-  
-    // get default service
-    TMsvId defaultServiceId(0);
-    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
-    if (err)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Email: Define a mailbox first"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        } 
-                
-    // set folder type
-    switch (parameters.iFolderType)
-        {
-        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
-        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
-        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
-        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
-        case EMailbox:  { msvEntry->SetEntryL(iUserSelectedMailbox);          break; }
-        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
-        }
-        
-    // mtm takes ownership of entry context	
-    CleanupStack::Pop(msvEntry);
-    clientMtm->SetCurrentEntryL(msvEntry); 
-
-    // create a new message
-    clientMtm->CreateMessageL(defaultServiceId);
-
-    // set subject
-    clientMtm->SetSubjectL( parameters.iMessageSubject->Des() );
-    
-    // set body
-    clientMtm->Body().Reset();
-    clientMtm->Body().InsertL(0, parameters.iMessageBodyText->Des()); 
-
-    // get the entry of the message
-    TMsvEntry messageEntry = clientMtm->Entry().Entry();
-    
-    // set the address fields
-    if (parameters.iFolderType == EInbox)
-        {
-        AddSenderToMtmAddresseeL(*clientMtm, parameters, ETrue );
-        SetSenderToEntryDetailsL(messageEntry, parameters, ETrue);
-        messageEntry.iMtm = KUidMsgTypeIMAP4;  // or any other than KUidMsgTypeSMTP to display 'from' field instead of 'to' field 
-        }
-    else
-        {
-        // Add all recipients to clientMtm
-        AddRecipientsL( *clientMtm, parameters, ETrue );
-        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);        
-        }
-
-    // set the description field same as the message subject
-    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
-
-    // save the changes done above
-    clientMtm->Entry().ChangeL(messageEntry);
-    
-    // get an access to the message store
-    CMsvStore* store = msvEntry->EditStoreL();
-    CleanupStack::PushL(store); 
-    
-    // save the attachments
-    HandleAttachementsL(parameters, store, err);
-//    for (TInt i=0; i<parameters.iAttachments->Count(); i++)
-//        {
-//        TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(i) );
-//
-//        TParse parser;
-//        parser.Set(sourceFileName, NULL, NULL);
-//        TFileName shortFileName = parser.NameAndExt();
-//
-//        // get the mime type
-//        RApaLsSession ls;
-//        User::LeaveIfError(ls.Connect());
-//        CleanupClosePushL<RApaLsSession>(ls);
-//        TUid appUid;
-//        TDataType dataType;
-//        ls.AppForDocument(sourceFileName, appUid, dataType);
-//        CleanupStack::PopAndDestroy(); //ls
-//        TPtrC8 mimeType = dataType.Des8();
-//        
-//        // attachment settings
-//        MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
-//        CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
-//        attachmentInfo->SetAttachmentNameL( shortFileName );        
-//        attachmentInfo->SetMimeTypeL( mimeType );        
-//
-//        // save
-//        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-//
-//        TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
-//        if (err == KErrNone)
-//            waiter->StartAndWait();
-//        else
-//            LOGSTRING2("Creator: CCreatorMessages::CreateEmailEntryL failed to attach %S", &sourceFileName);
-//
-//        CleanupStack::PopAndDestroy(waiter);  
-//        }
-
-    // save the changes made to the message store
-    store->CommitL();
-    CleanupStack::PopAndDestroy(store); 
-            
-    // save the message      
-    clientMtm->SaveMessageL();
-    	
-	// final fine tuning
-	TMsvEmailEntry temailEntry = static_cast<TMsvEmailEntry>(messageEntry);
-    temailEntry.SetMessageFolderType(EFolderTypeUnknown);
-    temailEntry.SetDisconnectedOperation(ENoDisconnectedOperations);
-    temailEntry.SetEncrypted(EFalse);
-    temailEntry.SetSigned(EFalse);
-    temailEntry.SetVCard(EFalse);
-    temailEntry.SetVCalendar(EFalse);
-    temailEntry.SetReceipt(EFalse);
-    temailEntry.SetMHTMLEmail(EFalse);
-    temailEntry.SetBodyTextComplete(ETrue);
-    
-	if (parameters.iAttachments->Count() > 0)
-        temailEntry.SetAttachment(ETrue);
-    else
-        temailEntry.SetAttachment(EFalse);
-	
-    temailEntry.iDate.HomeTime();
-    temailEntry.SetVisible(ETrue);
-    temailEntry.SetInPreparation(EFalse);
-    if (parameters.iCreateAsUnread)
-        {
-        temailEntry.SetUnread(ETrue);
-        temailEntry.SetNew(ETrue);
-        }
-    else
-        {
-        temailEntry.SetUnread(EFalse);
-        temailEntry.SetNew(EFalse);
-        }
-    temailEntry.SetComplete(ETrue);
-    temailEntry.iServiceId = defaultServiceId;
-    temailEntry.iRelatedId = 0;
-    
-    clientMtm->Entry().ChangeL(temailEntry);
-
-    // reset email headers
-    CImHeader* header = CImHeader::NewLC();
-    CMsvStore* msvStore = msvEntry->EditStoreL();
-    CleanupStack::PushL(msvStore);
-    header->RestoreL(*msvStore);
-    header->SetSubjectL( parameters.iMessageSubject->Des() );
-    if( iSenderArray.Count() == 0 )
-        {
-        GetSendersL(iSenderArray, parameters, ETrue, KUndef );
-        }
-    
-    if( iSenderArray.Count() > 0 )
-        {
-        TInt rndNum = iEngine->RandomNumber( iSenderArray.Count() );
-        header->SetFromL(iSenderArray[rndNum]->Des());
-        }
-    else
-        {
-        header->SetFromL( parameters.iSenderAddress->Des() );
-        }
-    if( parameters.iRecipientAddress->Length() > 0 )
-        {
-        header->SetReceiptAddressL( parameters.iRecipientAddress->Des() );
-        }
-    else if( parameters.iRecipientAddressArray.Count() > 0 )
-        {
-        header->SetReceiptAddressL( parameters.iRecipientAddressArray[0]->Des());
-        }
-    
-    header->StoreL( *msvStore );
-    msvStore->CommitL();
-    CleanupStack::PopAndDestroy(2); // msvStore, header
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iEntryIds.AppendL( messageEntry.Id() );
-    
-    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm 
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateSmartMessageEntryL(const CMessagesParameters& parameters)
-    {
-    LOGSTRING("Creator: CCreatorMessages::CreateSmartMessageEntryL");
-
-    TInt err = KErrNone;
-
-    // init
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
-    CleanupStack::PushL(registry);
-
-    // get the client mtm and return if it isn't supported in the system        
-    CSmsClientMtm* clientMtm = NULL;
-    TRAP(err, clientMtm = static_cast<CSmsClientMtm*>(registry->NewMtmL(KUidMsgTypeSMS)));
-    if (err || !clientMtm)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("BIO: Message type module not found"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        }  
-    CleanupStack::PushL(clientMtm);   
-
-    // create a new object to access an existing entry
-    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
-    CleanupStack::PushL(msvEntry);
-  
-    // get default service
-    TMsvId defaultServiceId = 0;
-    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
-    if (err)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("SMS: Define a SMS centre first"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        } 
-    
-    // set folder type
-    switch (parameters.iFolderType)
-        {
-        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
-        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
-        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
-        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
-        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
-        }
-        
-    // mtm takes ownership of entry context	
-    CleanupStack::Pop(msvEntry);
-    clientMtm->SetCurrentEntryL(msvEntry);    
-    
-    // create a new message
-    clientMtm->CreateMessageL(defaultServiceId);
-
-     // set the from field to sms header
-    if (parameters.iFolderType == EInbox)
-        {
-        CSmsHeader* smsHeader = &clientMtm->SmsHeader();
-        delete smsHeader;
-        smsHeader = NULL;
-        smsHeader = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, clientMtm->Body());
-        if( parameters.iSenderAddress )
-            {
-            smsHeader->SetFromAddressL( parameters.iSenderAddress->Des() );
-            }
-        else
-            {
-            smsHeader->SetFromAddressL(KEmpty);
-            }
-        }       
-
-    // set body, the BIO message itself
-    clientMtm->Body().Reset();
-    clientMtm->Body().InsertL(0, _L("Business Card\nTester Mike\nThe Company Ltd.\nSoftware Engineer\ntel +358 66 1234567\n")); 
-
-    // get the entry of the message
-    TMsvEntry messageEntry = clientMtm->Entry().Entry();
-
-    // TO-DO: Add support for all BIO messages, currently just insert a business card message ... :
-    // set the message type
-    // parameters.iBIOMessageType ...
-    clientMtm->BioTypeChangedL(KUidBIOBusinessCardMsg);
-    messageEntry.iBioType = KUidBIOBusinessCardMsg.iUid;
-
-    // set the details field
-    if (parameters.iFolderType == EInbox)
-        {
-        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
-        }        
-    else
-        {
-        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
-        }
-
-    // set the subject line
-    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
-
-    // set correct MTM type
-    messageEntry.iMtm= KUidBIOMessageTypeMtm;
-
-    // save the changes done above
-    clientMtm->Entry().ChangeL(messageEntry);
-
-    // save the message     
-    clientMtm->SaveMessageL();
-    	
-	// final fine tuning
-    messageEntry.SetAttachment(EFalse);
-    messageEntry.iDate.HomeTime();
-    messageEntry.SetVisible(ETrue);
-    messageEntry.SetInPreparation(EFalse);
-    if (parameters.iCreateAsUnread)
-        {
-        messageEntry.SetUnread(ETrue);
-        messageEntry.SetNew(ETrue);
-        }
-    else
-        {
-        messageEntry.SetUnread(EFalse);
-        messageEntry.SetNew(EFalse);
-        }
-    messageEntry.SetComplete(ETrue);
-    messageEntry.iServiceId = defaultServiceId;
-    messageEntry.iRelatedId = 0;
-    clientMtm->Entry().ChangeL(messageEntry);
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iEntryIds.AppendL( messageEntry.Id() );
-    
-    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm
-        
-    
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorMessages::CreateObexEntryL(TUid aMtm, const CMessagesParameters& parameters)
-    {
-    LOGSTRING("Creator: CCreatorMessages::CreateObexEntryL");
-
-    TInt err = KErrNone;
-
-    // init
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
-    CleanupStack::PushL(registry);
-
-    // get the client mtm and return if it isn't supported in the system        
-    CObexClientMtm* clientMtm = NULL;
-    TRAP(err, clientMtm = static_cast<CObexClientMtm*>(registry->NewMtmL(aMtm)));
-    if (err || !clientMtm)
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Obex: Message type module not found"));
-        CleanupStack::PopAndDestroy(2);
-        User::Leave(KErrNotFound);
-        }  
-    CleanupStack::PushL(clientMtm);   
-
-    // create a new object to access an existing entry
-    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
-    CleanupStack::PushL(msvEntry);
-  
-    // define default service
-    TMsvId defaultServiceId = 0;
-    
-    // set folder type
-    switch (parameters.iFolderType)
-        {
-        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
-        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
-        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
-        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
-        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
-        }
-        
-    // mtm takes ownership of entry context	
-    CleanupStack::Pop(msvEntry);
-    clientMtm->SetCurrentEntryL(msvEntry);    
-    
-    // create a new message
-    clientMtm->CreateMessageL(defaultServiceId);
-
-    // get the entry of the message
-    TMsvEntry messageEntry = clientMtm->Entry().Entry();
-
-    // set subject
-    clientMtm->SetSubjectL( parameters.iMessageSubject->Des() );
-    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
-
-    // set body, must be empty for obex messages
-    clientMtm->Body().Reset();
-
-    // set the details field and
-    if (parameters.iFolderType == EInbox)
-        {
-        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);
-        }        
-    else
-        {
-        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
-        }
-    
-    // set mtm
-    messageEntry.iMtm = aMtm;
-    messageEntry.iType = KUidMsvMessageEntry;
-    messageEntry.iServiceId = KMsvUnknownServiceIndexEntryId;
-
-    // save the changes done above
-    clientMtm->Entry().ChangeL(messageEntry);
-
-    // save the message      
-    clientMtm->SaveMessageL();
-    	
-	// final fine tuning
-    messageEntry.iDate.HomeTime();
-    messageEntry.SetVisible(ETrue);
-    messageEntry.SetInPreparation(EFalse);
-    if (parameters.iCreateAsUnread)
-        {
-        messageEntry.SetUnread(ETrue);
-        messageEntry.SetNew(ETrue);
-        }
-    else
-        {
-        messageEntry.SetUnread(EFalse);
-        messageEntry.SetNew(EFalse);
-        }
-    messageEntry.SetComplete(ETrue);
-    clientMtm->Entry().ChangeL(messageEntry);
-    
-    // save the attachment
-    if (parameters.iAttachments->Count() >= 1)
-        {
-        // create a new entry for the attachment
-        TMsvEntry attachTEntry;
-        attachTEntry.iType      = KUidMsvAttachmentEntry;
-        attachTEntry.iServiceId = KMsvUnknownServiceIndexEntryId;   
-        attachTEntry.iMtm       = KUidMsgTypeBt; //save as bt message
-        
-        msvEntry->CreateL(attachTEntry);
-        
-        CMsvEntry* attachEntry = session->GetEntryL(attachTEntry.Id());
-        clientMtm->SetCurrentEntryL(attachEntry);
-                
-        // get source file
-        TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(0) );
-
-        // get the mime type
-        RApaLsSession ls;
-        User::LeaveIfError(ls.Connect());
-        CleanupClosePushL<RApaLsSession>(ls);
-        TUid appUid;
-        TDataType mimeType;
-        ls.AppForDocument(sourceFileName, appUid, mimeType);
-        CleanupStack::PopAndDestroy(); //ls
-        
-        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-
-        // add an attachment to the current message entry
-        TRAP(err, clientMtm->AddAttachmentL( sourceFileName, mimeType.Des8(), 0, waiter->iStatus ));
-        if (err == KErrNone)
-            waiter->StartAndWait();
-        else
-            LOGSTRING2("Creator: CCreatorMessages::CreateObexEntryL failed to attach %S", &sourceFileName);
-        
-        CleanupStack::PopAndDestroy(waiter);
-        }
-    
-    // id has been generated, store it for being able to delete
-    // only entries created with Creator
-    iEntryIds.AppendL( messageEntry.Id() );
-    
-    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm 
-
-
-    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-void CCreatorMessages::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
-    {
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::SetSenderToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress)
-    {        
-    // Only one sender allowed:
-    if( iSenderArray.Count() == 0 )
-        {
-        GetSendersL(iSenderArray, aParameters, aUseEmailAddress, KUndef );
-        }
-    if( iSenderArray.Count() > 0 )
-        {        
-        TInt rnd = iEngine->RandomNumber( iSenderArray.Count() );
-        aMsgEntry.iDetails.Set( iSenderArray[rnd]->Des() );        
-        }
-    else
-        {
-        aMsgEntry.iDetails.Set(KEmpty);
-        }        
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::SetRecipientToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress)
-    {        
-    // Only one sender allowed:
-    GetAllRecipientsL(iRecipientArray, aParameters, aUseEmailAddress);
-    if( iRecipientArray.Count() > 0 )
-        {
-        const TDesC& temp = iRecipientArray[0]->Des();
-        aMsgEntry.iDetails.Set( temp );
-        }
-    else
-        {
-        aMsgEntry.iDetails.Set(KEmpty);
-        }        
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::AddSenderToMtmAddresseeL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
-    {    
-    // Only one sender allowed:
-    if( iSenderArray.Count() == 0 )
-        {
-        GetSendersL(iSenderArray, aParameters, aUseEmailAddress, 1 );
-        }
-    
-    for( TInt i = 0; i < iSenderArray.Count(); ++i )
-        {
-        aMtm.AddAddresseeL( iSenderArray[i]->Des() );        
-        }    
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::AddMtmSenderL(CMmsClientMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
-    {    
-    // Only one sender allowed:
-    if( iSenderArray.Count() == 0 )
-        {
-        GetSendersL(iSenderArray, aParameters, aUseEmailAddress, 1 );
-        }
-    
-    if( iSenderArray.Count() > 0 )
-        {
-        aMtm.SetSenderL( iSenderArray[0]->Des() );        
-        }    
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::GetSendersL(RPointerArray<HBufC>& aSenderArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress, TInt aMaxNum )
-    {
-    TInt counter = 0;
-    
-    if( counter < aMaxNum || aMaxNum == KUndef )
-        {
-        if( aParameters.iSenderAddress && aParameters.iSenderAddress->Length() > 0 )
-            {
-            HBufC* temp = HBufC::NewL(aParameters.iSenderAddress->Length());
-            CleanupStack::PushL(temp);
-            temp->Des().Copy(aParameters.iSenderAddress->Des());
-            aSenderArray.AppendL( temp );
-            CleanupStack::Pop(); // temp
-            ++counter;
-            }
-        }
-            
-    if( counter < aMaxNum || aMaxNum == KUndef )
-        {
-        RPointerArray<HBufC> tempArray;
-        CleanupResetAndDestroyPushL( tempArray );
-        GetLinkedAddressesL(tempArray, aParameters.iSenderLinkIds, aUseEmailAddress, aParameters.iNumberOfExistingSenders);
-        for( TInt i = 0; i < tempArray.Count() && (counter < aMaxNum || aMaxNum == KUndef); ++i )
-            {
-            HBufC* temp = tempArray[i]->AllocLC();
-            aSenderArray.AppendL(temp);
-            CleanupStack::Pop(); // temp
-            ++counter;
-            }
-        CleanupStack::PopAndDestroy(); // tempArray
-        }    
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::AddRecipientsL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
-    {
-    GetAllRecipientsL(iRecipientArray, aParameters, aUseEmailAddress);
-    for( TInt i = 0; i < iRecipientArray.Count(); ++i )
-        {
-        aMtm.AddAddresseeL( iRecipientArray[i]->Des() );        
-        }    
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::GetAllRecipientsL(RPointerArray<HBufC>& aRecipientArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
-    {
-    
-    // If iRecipientAddress is given, add it to the array:
-    if( aParameters.iRecipientAddress && aParameters.iRecipientAddress->Length() > 0 )
-        {
-        HBufC* temp = HBufC::NewL(aParameters.iRecipientAddress->Length());
-        CleanupStack::PushL(temp);
-        temp->Des().Copy(aParameters.iRecipientAddress->Des());
-        aRecipientArray.AppendL( temp );
-        CleanupStack::Pop(); // temp
-        }
-    
-    // Add all recipients listed in iRecipientAddressArray:
-    for( TInt i = 0; i < aParameters.iRecipientAddressArray.Count(); ++i )
-        {
-        HBufC* temp = HBufC::NewL(aParameters.iRecipientAddressArray[i]->Length());
-        CleanupStack::PushL(temp);
-        temp->Des().Copy(aParameters.iRecipientAddressArray[i]->Des());
-        aRecipientArray.AppendL( temp );
-        CleanupStack::Pop(); // temp        
-        }
-    
-    // Get all linked addresses. 
-    GetLinkedAddressesL(aRecipientArray, aParameters.iRecipientLinkIds, aUseEmailAddress, aParameters.iNumberOfExistingRecipients);
-    }
-
-/*
- * Get all linked addresses. This method gets addresses that are linked with contact-set id and 
- * existing addresses from the contact database, if required.
- */
-void CCreatorMessages::GetLinkedAddressesL(
-        RPointerArray<HBufC>& aAddressArray, 
-        const RArray<TLinkIdParam>& aLinkIds, 
-        TBool aUseEmailAddress,
-        TInt /*aNumOfExistingAddresses*/ )
-    {
-    CCreatorPhonebook* phonebook = dynamic_cast<CCreatorPhonebook*>(iEngine->GetPhonebook());
-    User::LeaveIfNull( phonebook );
-    CCreatorPhonebookWrapper* phonebookWrapper = phonebook->GetPhonebookWrapper();
-    
-    for( TInt i = 0; i < aLinkIds.Count(); ++i )
-        {
-        const CCreatorContactSet& set = ContactLinkCache::Instance()->ContactSet(aLinkIds[i].iLinkId);
-        const RArray<TUint32> links = set.ContactLinks();//ContactLinkCache::Instance()->ContactSets();//set.ContactLinks();
-        TInt numberOfExplicitLinks = links.Count(); // Number of defined contacts in contact-set
-        for( TInt j = 0; j < numberOfExplicitLinks; ++j )
-            {
-            TBuf<128> name;
-            TBuf<128> email;
-            TBuf<128> phoneNumber;
-            phonebookWrapper->GetContactDetailsL( links[j], name, phoneNumber, email );
-            HBufC* address = ( aUseEmailAddress ? email.AllocLC() : phoneNumber.AllocLC() );
-            aAddressArray.AppendL( address );
-            CleanupStack::Pop( address );
-            }
-        }
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorMessages::DeleteAllL");
-    DeleteAllMessagesL( EFalse );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::DeleteAllMessagesL( TBool aOnlyCreatedWithCreator )
-    {
-    LOGSTRING("Creator: CCreatorMessages::DeleteAllMessagesL");
-    TInt err( KErrNone );
-    
-    // init
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL( session );
-    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
-    CleanupStack::PushL( registry );
-
-    // get the client mtm and return if it isn't supported in the system        
-    CSmsClientMtm* clientMtm( NULL );
-    TRAP( err, clientMtm = static_cast<CSmsClientMtm*>( registry->NewMtmL( KUidMsgTypeSMS ) ) );
-    if ( err || !clientMtm )
-        {
-        iEngine->GetEngineWrapper()->ShowErrorMessage( _L( "SMS: Message type module not found" ) );
-        CleanupStack::PopAndDestroy( 2 );
-        User::Leave( KErrNotFound );
-        }
-    CleanupStack::PushL( clientMtm );
-    
-    TRAP_IGNORE( DeleteAllFromFolderL( KMsvGlobalInBoxIndexEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
-    TRAP_IGNORE( DeleteAllFromFolderL( KMsvDraftEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
-    TRAP_IGNORE( DeleteAllFromFolderL( KMsvGlobalOutBoxIndexEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
-    TRAP_IGNORE( DeleteAllFromFolderL( KMsvSentEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
-    
-    // reset must be done here, because iEntryIds is stored in destructor
-    iEntryIds.Reset();
-    
-    // all entries deleted, remove the Messages related registry
-    iEngine->RemoveStoreL( KUidDictionaryUidMessages );
-
-    CleanupStack::PopAndDestroy( clientMtm );
-    CleanupStack::PopAndDestroy( registry );
-    CleanupStack::PopAndDestroy( session );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::DeleteAllFromFolderL( const TMsvId aContext, 
-                                             CMsvSession* aSession,
-                                             CSmsClientMtm* aClientMtm,
-                                             TBool aOnlyCreatedWithCreator )
-    {
-    LOGSTRING("Creator: CCreatorMessages::DeleteAllFromFolderL");
-    
-    TMsvSelectionOrdering sort;
-    sort.SetShowInvisibleEntries( ETrue );
-
-    CMsvEntry* inboxContext = CMsvEntry::NewL( *aSession, aContext, sort );
-    CleanupStack::PushL( inboxContext );
-
-    CMsvEntrySelection* entries = inboxContext->ChildrenL();
-    CleanupStack::PushL( entries );
-
-    TInt msgCount = entries->Count();
-    for ( TInt i = 0; i < entries->Count(); i++)
-        {
-        TMsvId entryID = entries->At(i);
-        aClientMtm->SwitchCurrentEntryL( entryID );
-
-        if ( !aOnlyCreatedWithCreator || iEntryIds.Find( entryID ) != KErrNotFound )
-            {
-            CMsvEntry* entry = aSession->GetEntryL( (*entries)[i] );
-            CleanupStack::PushL( entry );
-
-            entry->DeleteL( entries->At(i) );
-            CleanupStack::PopAndDestroy( entry );            
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( entries );
-    CleanupStack::PopAndDestroy( inboxContext );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorMessages::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorMessages::DeleteAllCreatedByCreatorL");
-    
-    iEntryIds.Reset();
-    
-    // fetch ids of entries created by Creator
-    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidMessages );
-    
-    // delete them
-    DeleteAllMessagesL( ETrue );
-    }
-
-CRecipientInfo::CRecipientInfo() 
-    {
-    
-    }
-
-CRecipientInfo::~CRecipientInfo()
-    {
-    delete iPhoneNumber;
-    delete iEmailAddress;
-    }
-
-void CRecipientInfo::SetPhoneNumber(HBufC* aPhone)
-    {
-    delete iPhoneNumber;    
-    iPhoneNumber = aPhone;    
-    }
-
-void CRecipientInfo::SetEmailAddress(HBufC* aEmail)
-    {
-    delete iEmailAddress;    
-    iEmailAddress = aEmail;    
-    }
-
-const HBufC* CRecipientInfo::PhoneNumber() const
-    {
-    return iPhoneNumber;
-    }
-
-const HBufC* CRecipientInfo::EmailAddress() const
-    {
-    return iEmailAddress;
-    }
--- a/creator/engine/src/creator_messageelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,475 +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 "creator_messageelement.h"
-#include "creator_traces.h"
-#include "creator_message.h"
-
-using namespace creatormsg;
-
-/*
- * 
- */
-CCreatorMessageElement* CCreatorMessageElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorMessageElement* self = new (ELeave) CCreatorMessageElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorMessageElement::CCreatorMessageElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
-/*
- * Sets message type
- */
-void CCreatorMessageElement::SetMessageTypeL(CMessagesParameters& aParameters, const TDesC& aMsgTypeStr ) const
-    {
-    if( CompareIgnoreCase(aMsgTypeStr, KSms) == 0 )
-        {
-        aParameters.iMessageType = ESMS;
-        }
-    else if( CompareIgnoreCase(aMsgTypeStr, KMms) == 0 )
-        {
-        aParameters.iMessageType = EMMS;
-        }
-    else if( CompareIgnoreCase(aMsgTypeStr, KAms) == 0 )
-        {
-        aParameters.iMessageType = EAMS;
-        }
-    else if( CompareIgnoreCase(aMsgTypeStr, KEmail) == 0 )
-        {
-        aParameters.iMessageType = EEmail;
-        }
-    else if( CompareIgnoreCase(aMsgTypeStr, KSmart) == 0 )
-        {
-        aParameters.iMessageType = ESmartMessage;
-        }
-    else if( CompareIgnoreCase(aMsgTypeStr, KIr) == 0 )
-        {
-        aParameters.iMessageType = EIrMessage;
-        }
-    else if( CompareIgnoreCase(aMsgTypeStr, KBt) == 0 )
-        {
-        aParameters.iMessageType = EBTMessage;
-        }
-    else
-        {
-        LOGSTRING2("ERROR in CCreatorMessageElement::SetMessageTypeL: Unknown message type: %S", &aMsgTypeStr);
-        User::Leave(KErrGeneral);
-        }
-    }
-/*
- * Returns maximum length of the body text, when randomlength=max is used.
- */
-TInt CCreatorMessageElement::GetMaxBodyLength( const TDesC& aMsgType ) const
-    {
-    TInt len = 0;
-    if( CompareIgnoreCase(aMsgType, KSms) == 0 )
-        {
-        len = 160;
-        }
-    else if( CompareIgnoreCase(aMsgType, KMms) == 0 )
-        {
-        len = 160;
-        }    
-    else if( CompareIgnoreCase(aMsgType, KEmail) == 0 )
-        {
-        len = 1024;
-        }
-    else
-        {
-        len = KUndef;
-        }
-    return len;
-    }
-/*
- * Returns random body text length
- */
-TInt CCreatorMessageElement::GetRandomBodyLengthL(const TDesC& aRandomLenStr, const TDesC& aMsgType ) const
-    {
-    TInt len = 0;
-    if( aRandomLenStr == KMax )
-        {
-        len = GetMaxBodyLength(aMsgType);
-        }
-    else if( aRandomLenStr == KDefault )
-        {
-        len = KUndef;        
-        }
-    else
-        {
-        len = ConvertStrToIntL(aRandomLenStr);
-        }
-    return len;
-    }
-
-/*
- * Creates random message address (To/From)
- * Returns phone number for SMS, MMS, AMS and Smart messages.
- * Email address for others
- */
-HBufC* CCreatorMessageElement::CreateMessageAddressLC(const TDesC& msgType)
-    {
-    HBufC* toAddr;
-    if( CompareIgnoreCase(msgType, KSms) == 0 || 
-        CompareIgnoreCase(msgType, KMms) == 0 || 
-        CompareIgnoreCase(msgType, KAms) == 0 || 
-        CompareIgnoreCase(msgType, KSmart) == 0)
-        {
-        TPtrC temp = iEngine->RandomString(CCreatorEngine::EPhoneNumber);
-        toAddr = HBufC::NewL(temp.Length());
-        CleanupStack::PushL(toAddr);
-        toAddr->Des().Copy(temp);
-        }
-    else
-        {
-        toAddr = iEngine->CreateEmailAddressLC();
-        }
-    return toAddr;
-    }
-
-/*
- *
- */
-void CCreatorMessageElement::ExecuteCommandL()
-    {
-    LOGSTRING("Creator: CCreatorMessageElement::ExecuteCommandL");
-    
-    // Find out the message type:
-    const CCreatorScriptAttribute* msgTypeAttr = this->FindAttributeByName(KType);
-    TPtrC msgType;
-    if( msgTypeAttr )
-        {
-        msgType.Set(msgTypeAttr->Value());
-        }
-    else
-        {
-        LOGSTRING("ERROR in CCreatorMessageElement::ExecuteCommandL: Type attribute is missing.");
-        User::Leave(KErrGeneral); // type is required attribute
-        }
-    
-    // Find out the amount of calendar entries:
-    const CCreatorScriptAttribute* msgAmountAttr = this->FindAttributeByName(KAmount);
-    TInt msgAmount = 1;    
-    if( msgAmountAttr )
-        {
-        msgAmount = ConvertStrToIntL(msgAmountAttr->Value());
-        }    
-    
-    // Get 'fields' element 
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
-        {
-        // Get sub-elements (i.e the message field elements)
-        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();
-        
-        // Create message entries, the amount of entries is defined by msgAmount:
-        for( TInt cI = 0; cI < msgAmount; ++cI )
-            {
-            CMessagesParameters* param = new (ELeave) CMessagesParameters;
-            CleanupStack::PushL(param);
-            
-            // Message type:
-            if( msgTypeAttr )
-                {
-                SetMessageTypeL(*param, msgTypeAttr->Value());
-                }           
-            
-            // Loop all the message field elements:
-            for( TInt i = 0; i < fields.Count(); ++i )
-                {
-                CCreatorScriptElement* field = fields[i];
-                TPtrC elemName = field->Name();
-                TPtrC elemContent = field->Content();
-                const RPointerArray<CCreatorScriptElement>& contactReferences = field->SubElements();
-                const CCreatorScriptAttribute* randomAttr = field->FindAttributeByName(KRandomLength);
-                const CCreatorScriptAttribute* amountAttr = field->FindAttributeByName(KAmount);
-                const CCreatorScriptAttribute* increaseAttr = field->FindAttributeByName(KIncrease);
-                TBool increase( EFalse );
-                if ( increaseAttr )
-                    {
-                    increase = ConvertStrToBooleanL( increaseAttr->Value() );
-                    }
-                TInt fieldAmount = 1;
-                if( amountAttr )
-                    {
-                    fieldAmount = ConvertStrToIntL(amountAttr->Value());
-                    }               
-                
-                if( elemName == KTo )
-                    {
-                    // Recipient ('to'-field)
-                    for( TInt amountIndex = 0; amountIndex < fieldAmount; ++amountIndex )
-                        {
-                        if( (randomAttr || elemContent.Length() == 0 ) && contactReferences.Count() == 0 )
-                            {                        
-                            // Random content
-                            HBufC* toAddr = CreateMessageAddressLC(msgType);
-                            if( toAddr )
-                                {
-                                param->iRecipientAddressArray.AppendL(toAddr);
-                                CleanupStack::Pop(); // toAddr
-                                }
-                            }
-                        else
-                            {                            
-                            if( elemContent.Length() > 0 && contactReferences.Count() == 0)
-                                {
-                                // Explicit recipient given
-                                HBufC* recipient = HBufC::NewL( elemContent.Length() + 3 );
-                                CleanupStack::PushL(recipient);
-                                if ( increase )
-                                    {
-                                    IncreasePhoneNumL( elemContent, cI, recipient );
-                                    }
-                                else
-                                    {
-                                    recipient->Des().Copy(elemContent);
-                                    }
-                                param->iRecipientAddressArray.AppendL(recipient);
-                                CleanupStack::Pop(); // recipient
-                                }
-                            else
-                                {
-                                // Recipients specified with contact-set-references (if any)
-                                for( TInt csI = 0; csI < contactReferences.Count(); ++csI )
-                                    {                            
-                                    CCreatorScriptElement* contactSetRef = contactReferences[csI];
-                                    AppendContactSetReferenceL(*contactSetRef, param->iRecipientLinkIds);                                
-                                    }
-                                }
-                            }
-                        }
-                    }
-                else if( elemName == KFrom )
-                    {
-                    // Sender ('from'-field)
-                    // Amount attribute for sender is ignored, because there can be only one sender                 
-                    delete param->iSenderAddress;
-                    param->iSenderAddress = 0;
-                    if( (randomAttr || elemContent.Length() == 0 ) && contactReferences.Count() == 0 )
-                        {
-                        // Get random address
-                        param->iSenderAddress = CreateMessageAddressLC(msgType);
-                        CleanupStack::Pop(); // param->iSenderAddress
-                        }
-                    else
-                        {                        
-                        if( elemContent.Length() > 0 && contactReferences.Count() == 0)
-                            {
-                            // Explicit sender address given
-                            param->iSenderAddress = HBufC::NewL(elemContent.Length());
-                            if ( increase )
-                                {
-                                IncreasePhoneNumL( elemContent, cI, param->iSenderAddress );
-                                }
-                            else
-                                {
-                                param->iSenderAddress->Des().Copy(elemContent);
-                                }
-                            }
-                        else
-                            {
-                            // Senders specified with contact-set-references (if any)
-                            for( TInt csI = 0; csI < contactReferences.Count(); ++csI )
-                                {                            
-                                CCreatorScriptElement* contactSetRef = contactReferences[csI];
-                                AppendContactSetReferenceL(*contactSetRef, param->iSenderLinkIds);                                
-                                }
-                            }                           
-                        }
-                    }
-                else if( elemName == KFolder )              
-                    {
-                    // Folder type
-                    if( CompareIgnoreCase(elemContent, KSent) == 0 )
-                        {
-                        param->iFolderType = ESent;
-                        }
-                    else if( CompareIgnoreCase(elemContent, KInbox) == 0 )
-                        {
-                        param->iFolderType = EInbox;
-                        }
-                    else if( CompareIgnoreCase(elemContent, KOutbox) == 0 )
-                        {
-                        param->iFolderType = EOutbox;
-                        }
-                    else if( CompareIgnoreCase(elemContent, KDraft) == 0 )
-                        {
-                        param->iFolderType = EDrafts;
-                        }                        
-                    }
-                else if( elemName == KSubject )
-                    {
-                    // Message subject
-                    delete param->iMessageSubject;
-                    param->iMessageSubject = 0;
-                    
-                    if( randomAttr || elemContent.Length() == 0 )
-                        {
-                        // Random data should be used
-                        TPtrC temp = iEngine->RandomString(CCreatorEngine::EMessageSubject);
-                        param->iMessageSubject = HBufC::NewL(temp.Length());
-                        param->iMessageSubject->Des().Copy(temp);
-                        }
-                    else
-                        {                        
-                        param->iMessageSubject = HBufC::NewL(elemContent.Length());
-                        param->iMessageSubject->Des().Copy(elemContent);
-                        }
-                    }
-                else if( elemName == KText )
-                    {
-                    // Body text
-                    delete param->iMessageBodyText;
-                    param->iMessageBodyText = 0;
-                    
-                    if( randomAttr || elemContent.Length() == 0 )
-                        {
-                        // Put random text:
-                        if( randomAttr && randomAttr->Value() != KDefault )
-                            {
-                            // Get the random length
-                            TInt len = GetRandomBodyLengthL(randomAttr->Value(), msgTypeAttr->Value());
-                            if( len != KUndef )
-                                {
-                                param->iMessageBodyText = iEngine->CreateRandomStringLC(len);
-                                CleanupStack::Pop(); // param->iMessageBodyText
-                                }
-                            }
-                        else
-                            {
-                            // Use default random data
-                            TPtrC temp = iEngine->RandomString(CCreatorEngine::EMessageText);
-                            param->iMessageBodyText = HBufC::NewL(temp.Length());
-                            param->iMessageBodyText->Des().Copy(temp);
-                            }
-                        }
-                    else
-                        {
-                        param->iMessageBodyText = HBufC::NewL(elemContent.Length());
-                        param->iMessageBodyText->Des().Copy(elemContent);
-                        }
-                    }
-                else if( elemName == KAttachmentId )
-                    {
-                    // Attachment file id
-                    for( TInt amountIndex = 0; amountIndex < fieldAmount; ++amountIndex )
-                        {                        
-                        if( randomAttr  || elemContent.Length() == 0)
-                            {
-                            //When type is AMS, attachement will be audio
-                            if(param->iMessageType == EAMS)
-                                {
-                                param->iAttachments->AppendL(CCreatorEngine::EMP3_250kB);
-                                }
-                            //Otherwise attachement can be any file
-                            else
-                                {
-                                //EJPEG_25kB is first (0) in the enum and LAST_FILE_ID is last in the enum, so real last item id is one before LAST_FILE_ID
-                                param->iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) );                                
-                                }
-                            }
-                        else
-                            {
-                            //When user has been set attechment by it self, we trust user selection (not validating value, e.g. if message is SMS and there is attachement)
-                            TInt id = iEngine->GetAttachmentIdL(elemContent);
-                            if( id != KUndef )
-                                {
-                                param->iAttachments->AppendL( id );
-                                }
-                            }
-                        }
-                    }
-                // Attachment file path handling 
-                //E.g. C:\data\others\DOC-20kB.doc
-                else if( elemName == KAttachmentPath )
-                    {
-                    // Attachment file id
-                    for( TInt amountIndex = 0; amountIndex < fieldAmount; ++amountIndex )
-                        {
-                        //Path is random, getting one of the files (not even using path attribute, but id with random)
-                        if( randomAttr  || elemContent.Length() == 0)
-                            {
-                            //EJPEG_25kB is first (0) in the enum and LAST_FILE_ID is last in the enum, so real last item id is one before LAST_FILE_ID
-                            param->iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID -1) );
-                            }
-                        //Otherwise adding attachement path as it is to paths.
-                        else
-                            {
-                            //Adding Attachement file path
-                            HBufC* elemData = elemContent.AllocLC();
-                            param->iAttachmentPaths.AppendL( elemData );     
-                            CleanupStack::Pop(elemData);
-                            }
-                        }
-                    }
-                else if ( elemName == KStatus )
-                    {
-                    if( CompareIgnoreCase( elemContent, KNew ) == 0 )
-                        {
-                        param->iCreateAsUnread = ETrue;
-                        }
-                    else if( CompareIgnoreCase( elemContent, KRead ) == 0 )
-                        {
-                        param->iCreateAsUnread = EFalse;
-                        }
-                    }
-                }
-            iEngine->AppendToCommandArrayL(ECmdCreateMessagingEntryMessagesViaScript, param);
-            CleanupStack::Pop(); // param
-            }
-        }
-    else
-    	{
-    	for( TInt i = 0; i < msgAmount; ++i )
-    		{
-    		TInt randMsg = 0;
-    		if( msgType == KSms )
-    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntrySMSInbox, ECmdCreateRandomEntrySMSSent);
-    		else if( msgType == KMms )
-    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryMMSInbox, ECmdCreateRandomEntryMMSSent);
-    		else if( msgType == KAms )
-    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryAMSInbox, ECmdCreateRandomEntryAMSSent);
-    		else if( msgType == KEmail )
-    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryEmailInbox, ECmdCreateRandomEntryEmailSent);
-    		else if( msgType == KSmart )
-    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryBIOInbox, ECmdCreateRandomEntryBIOSent);
-    		else if( msgType == KBt )
-    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryBTInbox, ECmdCreateRandomEntryBTSent);
-    		else if( msgType == KIr )
-    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryIRInbox, ECmdCreateRandomEntryIRSent);
-    			
-    		if( randMsg > 0 )
-    			{
-    			iEngine->AppendToCommandArrayL(randMsg, 0, 1);
-    			}
-    		}
-    	}
-    }
-
-// End of file
--- a/creator/engine/src/creator_note.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +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 "engine.h"
-#include "enginewrapper.h"
-
-#include "creator_note.h" 
-#include "creator_traces.h"
-
-//----------------------------------------------------------------------------
-
-CNotepadParameters::CNotepadParameters()
-    {
-    LOGSTRING("Creator: CNotepadParameters::CNotepadParameters");
-
-    iNoteText = HBufC::New(KNotepadFieldLength);
-    }
-
-CNotepadParameters::~CNotepadParameters()
-    {
-    LOGSTRING("Creator: CNotepadParameters::~CNotepadParameters");
-
-    delete iNoteText;
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorNotepad* CCreatorNotepad::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorNotepad* self = CCreatorNotepad::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorNotepad* CCreatorNotepad::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorNotepad* self = new (ELeave) CCreatorNotepad;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorNotepad::CCreatorNotepad() : iFs ( CEikonEnv::Static()->FsSession() )
-    {
-    }
-
-void CCreatorNotepad::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorNotepad::ConstructL");
-
-    iEngine = aEngine;
-    iNotepadWrapper = CCreatorNotepadWrapper::NewL();
-    }
-
-CCreatorNotepad::~CCreatorNotepad()
-    {
-    LOGSTRING("Creator: CCreatorNotepad::~CCreatorNotepad");
-    
-    if (iParameters)
-        {
-        delete iParameters;
-        iParameters = NULL;
-        }
-    
-    if (iNotepadWrapper)
-    	{
-		delete iNotepadWrapper;
-		iNotepadWrapper = NULL;
-    	}
-    }
-
-//----------------------------------------------------------------------------
-
-TBool CCreatorNotepad::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorNotepad::AskDataFromUserL");
-
-    CCreatorModuleBase::AskDataFromUserL(aCommand);
-        
-    if ( aCommand == ECmdDeleteNotes )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Notes?"), this, ECreatorModuleDelete );
-        }
-    
-    // By Creator not supported because 
-    // note id is not available via Notepad API
-
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse,  this, ECreatorModuleStart );
-    }
-
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorNotepad::CreateNoteEntryL(CNotepadParameters *aParameters)
-    {
-    LOGSTRING("Creator: CCreatorNotepad::CreateNoteEntryL");
-
-    // clear any existing parameter definations
-    delete iParameters;
-    iParameters = NULL;
-    
-    // random data needed if no predefined data available
-    if (!aParameters)
-        {
-        iParameters = new(ELeave) CNotepadParameters;
-        }
-    else
-        {
-        iParameters = aParameters;
-        }
-
-    TPtr noteTextPtr = iParameters->iNoteText->Des();
-    noteTextPtr.Copy( iEngine->RandomString(CCreatorEngine::EMessageText).Left( noteTextPtr.MaxLength() ) );
-    
-    return iNotepadWrapper->CreateNoteL( noteTextPtr );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorNotepad::DeleteAllL()
-    {
-    LOGSTRING("Creator: CCreatorNotepad::DeleteAllL");
-    iNotepadWrapper->DeleteAllL();
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorNotepad::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorNotepad::DeleteAllCreatedByCreatorL");
-    // Not supported because note id is not available via Notepad API
-    User::Leave( KErrNotSupported );
-    }
--- a/creator/engine/src/creator_noteelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +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 "creator_noteelement.h"
-#include "creator_traces.h"
-#include "creator_note.h"
-
-using namespace creatornote;
-
-/*
- * 
- */
-CCreatorNoteElement* CCreatorNoteElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
-    {
-    CCreatorNoteElement* self = new (ELeave) CCreatorNoteElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop(self);
-    return self;
-    }
-/*
- * 
- */
-CCreatorNoteElement::CCreatorNoteElement(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    {
-    iIsCommandElement = ETrue;
-    }
-
-void CCreatorNoteElement::ExecuteCommandL()
-    {
-    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
-    TInt noteAmount = 1;    
-    if( amountAttr )
-        {
-        noteAmount = ConvertStrToIntL(amountAttr->Value());
-        }
-    // Get 'fields' element 
-    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
-    if( fieldsElement && fieldsElement->SubElements().Count() > 0)
-        {
-        // Get sub-elements
-        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
-        // Create note entries, the amount of entries is defined by noteAmount:
-        for( TInt cI = 0; cI < noteAmount; ++cI )
-            {            
-            CNotepadParameters* param = new (ELeave) CNotepadParameters;
-            CleanupStack::PushL(param);
-            
-            for( TInt i = 0; i < fields.Count(); ++i )
-                {
-                CCreatorScriptElement* field = fields[i];
-                TPtrC elemName = field->Name();
-                TPtrC elemContent = field->Content();
-                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
-                TBool useMax = EFalse;
-                if( randomAttr && randomAttr->Value() == KMax )
-                    {
-                    useMax = ETrue;
-                    }
-                
-                if( elemName == KText )
-                    {
-                    if( randomAttr || elemContent.Length() == 0 )
-                        {
-                        if( useMax )
-                            {
-                            TDesC* temp = iEngine->CreateRandomStringLC(KNotepadFieldLength);                            
-                            SetContentToTextParamL(param->iNoteText, *temp);
-                            CleanupStack::PopAndDestroy(); // temp
-                            }
-                        else
-                            {
-                            SetContentToTextParamL(param->iNoteText, iEngine->RandomString(CCreatorEngine::EMessageText));
-                            }
-                        }
-                    else
-                        {
-                        SetContentToTextParamL(param->iNoteText, elemContent);
-                        }
-                    }
-                }
-            iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryNotes, param);
-            CleanupStack::Pop(); // param
-            }
-        }
-    else
-    	{
-    	iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryNotes, 0, noteAmount);
-    	}
-    }
--- a/creator/engine/src/creator_notepadwrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include <QDir>
-#include "creator_notepadwrapper.h"
-
-	/**
-	* Constructor
-	*/
-CCreatorNotepadWrapper::CCreatorNotepadWrapper()
-	{
-	}
-	
-	/**
-	* Destructor
-	*/
-CCreatorNotepadWrapper::~CCreatorNotepadWrapper()
-	{
-    
-    iNotepadApi = NULL;
-		
-    if(iNotesEditorPluginLoader)
-        {
-	    iNotesEditorPluginLoader->unload();
-        delete iNotesEditorPluginLoader;
-        iNotesEditorPluginLoader = NULL;
-        }
-        
-    if(iAgendaUtil)
-        {
-        delete iAgendaUtil;
-        iAgendaUtil = NULL;
-        }
-	}
-	
-	/**
-	* Two-Phased constructor
-	*/
-CCreatorNotepadWrapper* CCreatorNotepadWrapper::NewL()
-	{
-	CCreatorNotepadWrapper* self = CCreatorNotepadWrapper::NewLC();
-	CleanupStack::Pop(self);
-    return self;
-	}
-
-	/**
-	* Two-Phased constructor
-	*/
-CCreatorNotepadWrapper* CCreatorNotepadWrapper::NewLC()
-	{
-	CCreatorNotepadWrapper* self = new (ELeave) CCreatorNotepadWrapper;
-	CleanupStack::PushL(self);
-	self->ConstructL();
-    return self;
-	}
-	
-	/**
-	* ConstructL()
-	*/
-
-void CCreatorNotepadWrapper::ConstructL()
-	{
-	iAgendaUtil = new AgendaUtil();
-	
-	//	iNotepadApi = new NotesEditor(iAgendaUtil);
-	
-	// Load notes editor plugin.
-    // Launch the notes editor using notes editor plugin api
-    QDir dir(NOTES_EDITOR_PLUGIN_PATH);
-    QString pluginName = dir.absoluteFilePath(NOTES_EDITOR_PLUGIN_NAME);
-
-    QT_TRYCATCH_LEAVING(
-        // Create NotesEditor plugin loader object.
-        iNotesEditorPluginLoader = new QPluginLoader(pluginName);
-
-        // Load the plugin
-        bool notesPluginLoaded = iNotesEditorPluginLoader->load();
-        QObject *plugin = qobject_cast<QObject*> ( iNotesEditorPluginLoader->instance());
-
-        iNotepadApi = qobject_cast<NotesEditorInterface*>(plugin);
-        );
-
-	}
-
-TInt CCreatorNotepadWrapper::CreateNoteL( const TDesC& aText )
-	{
-	User::LeaveIfNull(iNotepadApi);
-
-    QString textNote = QString::fromUtf16( aText.Ptr(),aText.Length());
-    iNotepadApi->edit(textNote,iAgendaUtil);
-    iNotepadApi->close(NotesEditorInterface::CloseWithSave, iAgendaUtil);
-	
-    return KErrNone;
-    }
-void CCreatorNotepadWrapper::DeleteAllL()
-	{
-	
-	QList<AgendaEntry> ael;
-    AgendaUtil::FilterFlags filter = AgendaUtil::FilterFlags(AgendaUtil::IncludeNotes);
-
-    ael = iAgendaUtil->fetchAllEntries(filter);
-    for(int i=0 ; i<ael.count() ; i++)
-    	{
-        iAgendaUtil->deleteEntry(ael[i].id());
-    	}
-		
-	}
-	
--- a/creator/engine/src/creator_phonebook.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,770 +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 "engine.h"
-#include "enginewrapper.h"
-#include "creator_contactsetcache.h"
-
-#include "creator_phonebook.h"
-#include "creator_traces.h"
-
-#include <bautils.h> 
-
-_LIT(KTempPath, "C:\\Data\\Creator\\");
-
-
-typedef struct {
-TInt iFieldCode;
-TInt iRandomType;
-} DetailFieldInfo;
-static const TInt RND_TYPE_UNDEF = -99;
-DetailFieldInfo CreatorPbkMiscTextFields[] = {        
-        {CCreatorPhonebookWrapper::EFirstName, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::EFirstNameReading, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::ELastName, (TInt) CCreatorEngine::ESurname},
-        {CCreatorPhonebookWrapper::ELastNameReading, (TInt) CCreatorEngine::ESurname},
-        {CCreatorPhonebookWrapper::ECompanyName, (TInt) CCreatorEngine::ECompany},
-        {CCreatorPhonebookWrapper::EJobTitle, (TInt) CCreatorEngine::EJobTitle},
-        {CCreatorPhonebookWrapper::EPrefix, (TInt) CCreatorEngine::EPrefix},
-        {CCreatorPhonebookWrapper::ESuffix, (TInt) CCreatorEngine::ESuffix},
-        {CCreatorPhonebookWrapper::ESecondName, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::EAddrLabelGen, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrPoGen, (TInt) CCreatorEngine::EPobox},
-        {CCreatorPhonebookWrapper::EAddrExtGen, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrStreetGen, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrLocalGen, (TInt) CCreatorEngine::ECity},
-        {CCreatorPhonebookWrapper::EAddrRegionGen, (TInt) CCreatorEngine::EState},
-        {CCreatorPhonebookWrapper::EAddrPostCodeGen, (TInt) CCreatorEngine::EPostcode},
-        {CCreatorPhonebookWrapper::EAddrCountryGen, (TInt) CCreatorEngine::ECountry},
-        {CCreatorPhonebookWrapper::EAddrLabelHome, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrPoHome, (TInt) CCreatorEngine::EPobox},
-        {CCreatorPhonebookWrapper::EAddrExtHome, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrStreetHome, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrLocalHome, (TInt) CCreatorEngine::ECity},
-        {CCreatorPhonebookWrapper::EAddrRegionHome, (TInt) CCreatorEngine::EState},
-        {CCreatorPhonebookWrapper::EAddrPostCodeHome, (TInt) CCreatorEngine::EPostcode},
-        {CCreatorPhonebookWrapper::EAddrCountryHome, (TInt) CCreatorEngine::ECountry},
-        {CCreatorPhonebookWrapper::EAddrLabelWork, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrPoWork, (TInt) CCreatorEngine::EPobox},
-        {CCreatorPhonebookWrapper::EAddrExtWork, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrStreetWork, (TInt) CCreatorEngine::EAddress},
-        {CCreatorPhonebookWrapper::EAddrLocalWork, (TInt) CCreatorEngine::ECity},
-        {CCreatorPhonebookWrapper::EAddrRegionWork, (TInt) CCreatorEngine::EState},
-        {CCreatorPhonebookWrapper::EAddrPostCodeWork, (TInt) CCreatorEngine::EPostcode},
-        {CCreatorPhonebookWrapper::EAddrCountryWork, (TInt) CCreatorEngine::ECountry},
-        {CCreatorPhonebookWrapper::EPoc, (TInt) CCreatorEngine::EPhoneNumber},
-        {CCreatorPhonebookWrapper::ESwis, (TInt) CCreatorEngine::EPhoneNumber},
-        {CCreatorPhonebookWrapper::ESip, (TInt) CCreatorEngine::EPhoneNumber},
-        {CCreatorPhonebookWrapper::EDtmfString, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::ENote,(TInt)  CCreatorEngine::EMemoText},
-        {CCreatorPhonebookWrapper::EMiddleName, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::EDepartment, (TInt) CCreatorEngine::ECompany},
-        {CCreatorPhonebookWrapper::EAsstName, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::ESpouse, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::EChildren, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::ESyncClass, RND_TYPE_UNDEF},
-        {CCreatorPhonebookWrapper::ELocPrivacy, RND_TYPE_UNDEF},
-        {CCreatorPhonebookWrapper::EGenLabel, (TInt) CCreatorEngine::EFirstName},
-        {CCreatorPhonebookWrapper::EWVAddress, (TInt) CCreatorEngine::EPhoneNumber},
-        {CCreatorPhonebookWrapper::ERingTone, RND_TYPE_UNDEF},
-        {CCreatorPhonebookWrapper::EThumbnailPic, RND_TYPE_UNDEF},
-        {CCreatorPhonebookWrapper::ECallerObjText, (TInt) CCreatorEngine::EFirstName}
-        };
-                  
-
-TInt CreatorPbkBinaryFields[] = {
-        CCreatorPhonebookWrapper::ECallerObjImg//,
-        //R_VPBK_FIELD_TYPE_THUMBNAILPATH
-        };
-
-TInt CreatorPbkDateTimeFields[] = {
-        CCreatorPhonebookWrapper::EAnniversary
-        };
-
-//----------------------------------------------------------------------------
-TInt CreatorPbkPhoneNumberFields[] =
-    {
-    CCreatorPhonebookWrapper::ELandPhoneGen,
-    CCreatorPhonebookWrapper::ELandPhoneHome,
-    CCreatorPhonebookWrapper::ELandPhoneWork,                        
-    CCreatorPhonebookWrapper::EMobilePhoneGen,
-    CCreatorPhonebookWrapper::EMobilePhoneHome,
-    CCreatorPhonebookWrapper::EMobilePhoneWork,
-    CCreatorPhonebookWrapper::EFaxNumberGen,
-    CCreatorPhonebookWrapper::EFaxNumberHome,
-    CCreatorPhonebookWrapper::EFaxNumberWork,
-    CCreatorPhonebookWrapper::EPagerNumber,           
-    CCreatorPhonebookWrapper::EVideoNumberGen,
-    CCreatorPhonebookWrapper::EVideoNumberHome,
-    CCreatorPhonebookWrapper::EVideoNumberWork,
-    CCreatorPhonebookWrapper::EVoipGen,
-    CCreatorPhonebookWrapper::EVoipHome,
-    CCreatorPhonebookWrapper::EVoipWork,
-    CCreatorPhonebookWrapper::EAsstPhone,
-    CCreatorPhonebookWrapper::ECarPhone
-    };
-
-TInt CreatorPbkUrlFields[] =
-    {
-    CCreatorPhonebookWrapper::EUrlGen,
-    CCreatorPhonebookWrapper::EUrlHome,
-    CCreatorPhonebookWrapper::EUrlWork
-    };
-
-TInt CreatorPbkEmailFields[] =
-    {
-    CCreatorPhonebookWrapper::EEmailGen,
-    CCreatorPhonebookWrapper::EEmailHome,
-    CCreatorPhonebookWrapper::EEmailWork
-    };
-
-CPhonebookParameters::CPhonebookParameters()
-    {
-    LOGSTRING("Creator: CPhonebookParameters::CVirtualPhonebookParameters");
-    iGroupName = HBufC::New(KPhonebookFieldLength);  
-    }
-
-CPhonebookParameters::~CPhonebookParameters()
-    {
-    LOGSTRING("Creator: CPhonebookParameters::~CPhonebookParameters");
-
-    delete iGroupName;   
-    for( TCreatorContactFields::iterator it = iContactFields.begin(); it != iContactFields.end(); ++it)
-        {
-        HBufC* temp =  (*it).second;
-        iContactFields.erase(it);
-        delete temp;
-        }
-    iLinkIds.Reset();
-    iLinkIds.Close();
-    }
-
-void CPhonebookParameters::ParseL(CCommandParser* /*parser*/, TParseParams /*aCase = 0*/)
-	{
-	}
-
-TInt CPhonebookParameters::ScriptLinkId() const
-    {
-    return iLinkId;
-    }
-
-void CPhonebookParameters::SetScriptLinkId(TInt aLinkId)
-    {
-    iLinkId = aLinkId;
-    }
-
-
-//----------------------------------------------------------------------------
-
-CCreatorPhonebook* CCreatorPhonebook::NewL(CCreatorEngine* aEngine)
-    {
-    CCreatorPhonebook* self = CCreatorPhonebook::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorPhonebook* CCreatorPhonebook::NewLC(CCreatorEngine* aEngine)
-    {
-    CCreatorPhonebook* self = new (ELeave) CCreatorPhonebook();
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-
-CCreatorPhonebook::CCreatorPhonebook() 
-    {
-    iAddAllFields = EFalse;
-    }
-
-void CCreatorPhonebook::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::ConstructL");
-	
-	iEngine = aEngine;
-	
-	iPhonebookWrapper = CCreatorPhonebookWrapper::NewL();
-
-	SetDefaultParameters();
-    }
-	
-
-CCreatorPhonebook::~CCreatorPhonebook()
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::~CCreatorPhonebook");
- 
-    if ( iContactsToDelete.Count() )
-    	{
-        TRAP_IGNORE( StoreLinksForDeleteL( iContactsToDelete, KUidDictionaryUidContacts ) );
-        }
-    if ( iContactGroupsToDelete.Count() )
-    	{
-        TRAP_IGNORE( StoreLinksForDeleteL( iContactGroupsToDelete, KUidDictionaryUidContactGroups ) );
-        }
-    
-	if( iPhonebookWrapper )
-		{
-		delete iPhonebookWrapper;
-		}
-    
-    if (iParameters)
-    	{
-        delete iParameters;
-    	}
-  
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorPhonebook::CreateContactEntryL(CCreatorModuleBaseParameters *aParameters)
-    {
-	TInt err = KErrNone;
-	delete iParameters;
-	    iParameters = 0;
-	CPhonebookParameters* parameters = 0;
-	
-	if( aParameters == 0 )
-	    {
-	    InitializeContactParamsL();
-	    parameters = iParameters;
-	    }
-	else
-	    {
-	    parameters = (CPhonebookParameters*) aParameters;
-	    }
-	    
-	int numberOfFields = parameters->iContactFields.size();
-	// create a new contact item
-	
-	TUint32 contactId = iPhonebookWrapper->CreateContactEntryL( parameters->iContactFields ); //wrapper should return contact id to store
-	iContactsToDelete.AppendL( contactId );
-	
-
-	// If this contact has a link id in script (i.e. belongs to a contact-set), we must cache the contact id:
-	    if( parameters->ScriptLinkId() > 0 )
-	        {                
-	        RPointerArray<CCreatorContactSet>& contactsets = ContactLinkCache::Instance()->ContactSets();
-	        TBool setFound(EFalse);
-	        for(TInt i = 0; i < contactsets.Count(); ++i )
-	            {
-	            if( contactsets[i]->LinkId() == parameters->ScriptLinkId() )
-	                {
-	                if( contactId )
-	                    {
-	                    contactsets[i]->AppendL( contactId );
-	                    iContactLinkArray.AppendL( contactId );
-	                    }
-	                setFound = ETrue;
-	                break;
-	                }
-	            }
-	        if( !setFound )
-	            {
-	            LOGSTRING2("Error: Contact set id %d not found.", parameters->ScriptLinkId());
-	            }
-	        }
-	    
-    return err;
-    }
-
-
-//----------------------------------------------------------------------------
-
-
-
-//----------------------------------------------------------------------------
-
-void CCreatorPhonebook::DeleteAllL()
-    {
-	iPhonebookWrapper->DeleteAllL();
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebook::DeleteAllCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::DeleteAllCreatedByCreatorL");
-    DeleteItemsCreatedWithCreatorL( KUidDictionaryUidContacts );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebook::DeleteAllGroupsL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::DeleteAllGroupsL");
-    iPhonebookWrapper->DeleteAllGroupsL();
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebook::DeleteAllGroupsCreatedByCreatorL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::DeleteAllGroupsCreatedByCreatorL");
-    DeleteItemsCreatedWithCreatorL( KUidDictionaryUidContactGroups );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebook::DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid	)
-    {
-	iPhonebookWrapper->DeleteContactsL( aContactsToDelete, aStoreUid );
-    }
-
-//----------------------------------------------------------------------------
-
-
-void CCreatorPhonebook::DeleteItemsCreatedWithCreatorL( TUid aStoreUid )
-    {
-	CDictionaryFileStore* store = iEngine->FileStoreLC();
-    User::LeaveIfNull( store );
-    
-    RArray<TUint32> contacts; 
-    // backup previous contact links from store
-    // otherwise they would be overwritten when calling out.WriteL
-    TUint32 creatorLink;
-    if ( store->IsPresentL( aStoreUid ) )
-       {
-       RDictionaryReadStream in;
-       in.OpenLC( *store, aStoreUid );
-       TRAP_IGNORE( 
-           do{ 
-               creatorLink = in.ReadUint32L();
-               contacts.AppendL( creatorLink );
-           }while( creatorLink );
-       );
-       
-       CleanupStack::PopAndDestroy(); // in
-       }
-    
-    
-    iPhonebookWrapper->DeleteContactsL( contacts, aStoreUid );
-    
-    store->Remove( aStoreUid );
-    store->CommitL();
-    
-    CleanupStack::PopAndDestroy( store );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebook::DoDeleteItemsCreatedWithCreatorL( TUid /*aStoreUid*/, CDictionaryFileStore* /*aStore*/ )
-    {
-    
-    }
-
-//----------------------------------------------------------------------------
-TBool CCreatorPhonebook::HasOtherThanGroupsL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::HasOtherThanGroupsL");
-    TBool result( EFalse );
-    return result;
-    }
-
-
-//----------------------------------------------------------------------------
-
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebook::StoreLinksForDeleteL( RArray<TUint32>& aLinks, TUid aStoreUid )
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::StoreLinksForDeleteL");
-    CDictionaryFileStore* store = iEngine->FileStoreLC();
-       User::LeaveIfNull( store );
-       
-       // backup previous contact links from store
-       // otherwise they would be overwritten when calling out.WriteL
-       TUint32 previousLink;
-       if ( store->IsPresentL( aStoreUid ) )
-           {
-           RDictionaryReadStream in;
-           in.OpenLC( *store, aStoreUid );
-           bool r = false;
-           TRAP_IGNORE( 
-               do{ //iContactMngr->CreateLinksLC( in )) != NULL ) // will leave with KErrEof
-                   previousLink = in.ReadUint32L();
-                   iPreviousDeleteLinks.AppendL( previousLink );
-                   if(previousLink)
-                	   {
-					   r=true;
-                	   }
-                   else
-                	   {
-					   r=false;
-                	   }
-               }while(r==true); );
-           
-           CleanupStack::PopAndDestroy(); // in
-           }
-
-       RDictionaryWriteStream out;       
-       out.AssignLC( *store, aStoreUid );
-       
-       // restore previous links
-       for ( TInt i = 0; i < iPreviousDeleteLinks.Count(); i++ )
-           {
-           out.WriteUint32L( iPreviousDeleteLinks[i] );
-           }
-       
-       // write new links
-       for(int i=0; i < aLinks.Count(); i++)
-    	   {
-		   out.WriteUint32L( aLinks[i] );
-    	   }
-       out.CommitL();
-       CleanupStack::PopAndDestroy(); // out
-       
-       store->CommitL();
-
-       CleanupStack::PopAndDestroy( store );
-    }
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-void CCreatorPhonebook::InitializeContactParamsL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::InitializeContactParamsL");        
- 
-    iParameters = new (ELeave) CPhonebookParameters;
-           
-    iParameters->iNumberOfPhoneNumberFields = iNumberOfPhoneNumberFields;
-    iParameters->iNumberOfURLFields = iNumberOfURLFields;
-    iParameters->iNumberOfEmailAddressFields = iNumberOfEmailAddressFields;       
-    
-    TPtrC fname = iEngine->RandomString(CCreatorEngine::EFirstName);
-    TPtrC lname = iEngine->RandomString(CCreatorEngine::ESurname);
-    
-    
-    if( iAddAllFields )
-        {
-		TInt textFieldCount = sizeof(CreatorPbkMiscTextFields) / sizeof(DetailFieldInfo);
-		for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
-			{ 
-			CCreatorContactField* field = CCreatorContactField::NewL();
-			CleanupStack::PushL(field);
-	        field->AddFieldToParamL( iEngine,iParameters, CreatorPbkMiscTextFields[tfIndex].iFieldCode, CreatorPbkMiscTextFields[tfIndex].iRandomType );
-  	        CleanupStack::Pop(field);
-            }
-		
-		// Add binary fields:
-		
-		RFs& fs = CCoeEnv::Static()->FsSession();
-		      
-        TBuf<KMaxFileName> srcPath;
-		iEngine->RandomPictureFileL(srcPath);
-		TBuf<KMaxFileName> destPath(KTempPath);
-		                            
-		if(!BaflUtils::FolderExists( fs, destPath ))
-			{
-		    BaflUtils::EnsurePathExistsL( fs, destPath );
-		    }
-		                
-		TInt err=BaflUtils::CopyFile( fs, srcPath, destPath );
-
-		TParse temp;
-		temp.Set( srcPath,NULL,NULL );
-		destPath.Append(temp.NameAndExt());
-		TPtrC picture;
-		picture.Set(destPath);
-		CCreatorContactField* picturefield = CCreatorContactField::NewL();
-		CleanupStack::PushL(picturefield);
-		picturefield->AddFieldToParamL( iParameters, CCreatorPhonebookWrapper::EThumbnailPic, picture );
-		CleanupStack::Pop(picturefield);
-		// Add date-time fields:
-		TPtrC anniv;
-		TBuf<20> timeString;
-		TTime datetime = iEngine->RandomDate( CCreatorEngine::EDateFuture );
-		_LIT(KDateString,"%D%M%Y%/0%1%/1%2%/2%3%/3");
-		TRAP_IGNORE( datetime.FormatL(timeString, KDateString) );
-		
-		anniv.Set(timeString);
- 
-		CCreatorContactField* fieldAnniv = CCreatorContactField::NewL();
-		CleanupStack::PushL( fieldAnniv );
-		fieldAnniv->AddFieldToParamL(iParameters,CCreatorPhonebookWrapper::EAnniversary, anniv );
-		CleanupStack::Pop( fieldAnniv );
-    //***************************************************************************
-    
-        }
-    else
-        {
-		CCreatorContactField* field = CCreatorContactField::NewL();
-    	CleanupStack::PushL(field);
-    	field->AddFieldToParamL( iParameters, CCreatorPhonebookWrapper::EFirstName, fname );
-		field->AddFieldToParamL( iParameters, CCreatorPhonebookWrapper::ELastName, lname );
-		CleanupStack::Pop(field);
-        }
-                        
-      // Phone numbers:
-    TInt phoneFieldCount = sizeof(CreatorPbkPhoneNumberFields) / sizeof(TInt);
-    
-    TInt inc=0;
-    for( TInt i=0; i<iNumberOfPhoneNumberFields; i++ )
-    	{
-    
-		if(inc >= phoneFieldCount )
-        	{
-    		inc = 0;
-        	}
-		
-		CCreatorContactField* field = CCreatorContactField::NewL();
-        CleanupStack::PushL(field);
-		field->AddFieldToParamL(iEngine, iParameters, CreatorPbkPhoneNumberFields[inc] );
-		CleanupStack::Pop(field);
-    
-		inc++;
-    	}
-    
-    
-    
-    // URLs:
-    TInt urlFieldCount = sizeof(CreatorPbkUrlFields) / sizeof(TInt);
-    inc = 0;
-    for( TInt i=0; i<iNumberOfURLFields; i++ )
-        {
-    
-		if(inc >= urlFieldCount )
-          	{
-        	inc = 0;
-           	}
-    
-		CCreatorContactField* field = CCreatorContactField::NewL();
-        CleanupStack::PushL(field);
-    	field->AddFieldToParamL(iEngine, iParameters, CreatorPbkUrlFields[inc] );
-    	CleanupStack::Pop(field);
-    	inc++;
-        }
-
-    // EMail addresses:
-    TInt emailFieldCount = sizeof(CreatorPbkEmailFields) / sizeof(TInt);
-    inc = 0;
-    for( int i=0; i<iNumberOfEmailAddressFields; i++ )
-    	{
-		if(inc >= emailFieldCount )
-           	{
-          	inc = 0;
-           	}
-        CCreatorContactField* field = CCreatorContactField::NewL();
-        CleanupStack::PushL(field);
-        field->AddFieldToParamL(iEngine, iParameters, CreatorPbkEmailFields[inc] );
-        CleanupStack::Pop(field);
-        inc++;
-    	}
-    
-    TestPrintOut(iParameters);
-    
-   }
-
-void CCreatorPhonebook::TestPrintOut(CPhonebookParameters* aParam)
-	{
-	LOGSTRING("Creator: CCreatorPhonebook::TestPrintOut");
-	for( TCreatorContactFields::iterator it = aParam->iContactFields.begin(); it != aParam->iContactFields.end(); ++it)
-        {
-        HBufC* temp = (*it).second;
-        if(temp)
-        	{
-			LOGSTRING3("Type: %d Content:%S ", (*it).first, &temp->Des() );
-        	}
-        }
-    }
-
-// Checks if the link is a group or not
-TBool CCreatorPhonebook::IsContactGroupL( TUint32& /*aLink*/ )
-	{
-	//not used right now
-	return EFalse;
-	}
-
-
-TInt CCreatorPhonebook::CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters)
-    {
-	 LOGSTRING("Creator: CCreatorPhonebook::CreateGroupEntryL");
-	 TInt err = KErrNone;
-	 
-	    delete iParameters;
-	    iParameters = 0;
-	    
-	    CPhonebookParameters* parameters = (CPhonebookParameters*) aParameters;
-	    
-	    if( !parameters )
-	       {
-	       iParameters = new (ELeave) CPhonebookParameters;
-	       iParameters->iContactsInGroup = iContactsInGroup;
-	       iParameters->iGroupName->Des().Copy( iEngine->RandomString(CCreatorEngine::EGroupName) );
-	       iParameters->iGroupName->Des().Append( _L(" #") );
-	       iParameters->iGroupName->Des().AppendNum( iEngine->RandomNumber(1000, 9999) );
-	       parameters = iParameters;
-	       }
-	   
-	    // create a new contact group
-	    
-	    TUint32 newGroupId = iPhonebookWrapper->CreateGroupEntryL( parameters->iGroupName );
-	    
-	    // define amounts of contacts to be added to the group
-	    TInt amountOfContactsToBeAdded = 0;
-	    if (parameters->iContactsInGroup == KCreateRandomAmountOfGroups)
-	    	{
-	        amountOfContactsToBeAdded = iEngine->RandomNumber(30);
-	    	}
-	    else 
-	    	{
-	        amountOfContactsToBeAdded = parameters->iContactsInGroup;
-	    	}
-	    
-	    if( parameters->iLinkIds.Count() > 0 )
-	        {
-	        for( TInt i = 0; i < parameters->iLinkIds.Count(); ++i )
-	            {
-	            const CCreatorContactSet& set = ContactLinkCache::Instance()->ContactSet(parameters->iLinkIds[i].iLinkId);
-	          
-	            const RArray<TUint32> links = set.ContactLinks();//ContactLinkCache::Instance()->ContactSets();//set.ContactLinks();
-	            TInt numberOfExplicitLinks = links.Count(); // Number of defined contacts in contact-set
-	            TInt numberOfExistingContacts = set.NumberOfExistingContacts(); // Number of existing contacts in contact-set
-	            TInt maxAmount = numberOfExplicitLinks + numberOfExistingContacts;
-	            
-	            if( parameters->iLinkIds[i].iLinkAmount > 0 )
-	                maxAmount = parameters->iLinkIds[i].iLinkAmount; // Max amount is limited
-	            
-	            TInt addedMembers = 0;
-	            
-	            for( TInt j = 0; j < links.Count() && addedMembers < maxAmount; ++j )
-	                {
-					
-					addedMembers += iPhonebookWrapper->AddContactToGroup(newGroupId,links[j]);
-	           
-	                }
-	            if( addedMembers < maxAmount )
-	            	{
-	            	// Add existing contacts, withing the limits set by maxAmount:
-	            	amountOfContactsToBeAdded += maxAmount - addedMembers;
-	            	}
-	            }
-	        }
-	    if( amountOfContactsToBeAdded > 0 )
-	        {
-			TInt addedContacts = iPhonebookWrapper->AddToGroup(newGroupId, amountOfContactsToBeAdded);
-		
-	        }
-	    
-	    // store the link to contact, so that Creator is able to delete
-	    // it when user requests deletion of contacts that were created with Creator 
-	    iContactGroupsToDelete.AppendL( newGroupId );
-	    
-	    return err;
-    }
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorPhonebook::CreateSubscribedContactEntryL(CCreatorModuleBaseParameters* /*aParameters*/)
-    {
-    LOGSTRING("Creator: CCreatorPhonebook::CreateSubscribedContactEntryL");
-
-    return KErrNotSupported;
-    }
-
-//----------------------------------------------------------------------------
-
-CCreatorContactField::CCreatorContactField()
-    {
-    }
-CCreatorContactField::~CCreatorContactField()
-    {
-    }
-
-CCreatorContactField* CCreatorContactField::NewL()
-    {
-    CCreatorContactField* self = new (ELeave) CCreatorContactField();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-void CCreatorContactField::ConstructL()
-    {
-    }
-
-
-void CCreatorContactField::AddFieldToParamL( CCreatorEngine* aEngine, CPhonebookParameters* aParam, TInt aType, TInt aRand )
-    {
-    HBufC* content = NULL;
-    if( aRand == KErrNotFound ) 
-        {
-        TInt textFieldCount = sizeof(CreatorPbkPhoneNumberFields)/sizeof(TInt);;
-        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
-            {
-            if( CreatorPbkPhoneNumberFields[tfIndex] == aType )
-                {
-                content = aEngine->RandomString(CCreatorEngine::EPhoneNumber).AllocL();
-                break;
-                }
-            }
-    
-        textFieldCount = sizeof(CreatorPbkUrlFields)/sizeof(TInt);;
-        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
-            {
-            if( CreatorPbkUrlFields[tfIndex] == aType )
-                {
-                content = aEngine->CreateHTTPUrlLC(); 
-                CleanupStack::Pop();
-                break;
-                }
-            }
-        textFieldCount = sizeof(CreatorPbkEmailFields)/sizeof(TInt);;
-        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
-            {
-            if( CreatorPbkEmailFields[tfIndex] == aType )
-                {
-                content = aEngine->CreateEmailAddressLC();
-                CleanupStack::Pop();
-                break;
-                }
-            }
-        
-    
-        //if there is textfield without specified random number
-        textFieldCount = sizeof(CreatorPbkMiscTextFields) / sizeof(DetailFieldInfo);
-        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
-            {
-			if( CreatorPbkMiscTextFields[tfIndex].iFieldCode == aType && CreatorPbkMiscTextFields[tfIndex].iRandomType != RND_TYPE_UNDEF )
-            	{
-				TInt rand =  CreatorPbkMiscTextFields[tfIndex].iRandomType;
-				content = aEngine->RandomString((CCreatorEngine::TRandomStringType) rand).AllocL();
-				break;
-				}
-			}	
-        }
-
-    if( aRand != KErrNotFound && aRand != RND_TYPE_UNDEF ) 
-        {
-        TInt textFieldCount = sizeof(CreatorPbkMiscTextFields) / sizeof(DetailFieldInfo);
-        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
-            {
-            if( CreatorPbkMiscTextFields[tfIndex].iFieldCode == aType )
-                {
-                content = aEngine->RandomString((CCreatorEngine::TRandomStringType) aRand).AllocL();
-                }
-            }
-        }
-	
-	aParam->iContactFields.insert( TCreatorContactField(aType, content) );
-	}
-
-void CCreatorContactField::AddFieldToParamL( CPhonebookParameters* aParam, TInt aType, TPtrC aContent )
-    {
-    aParam->iContactFields.insert( TCreatorContactField(aType, aContent.AllocL()) );
-    }
-
-//----------------------------------------------------------------------------
-
-//----------------------------------------------------------------------------
-
--- a/creator/engine/src/creator_phonebookapi.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +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 "creator_phonebookapi.h"
-
-CCreatorPhonebookAPI::CCreatorPhonebookAPI ()
-    {
-    mContactMngr = new QContactManager("symbian");
-    }
-
-CCreatorPhonebookAPI::~CCreatorPhonebookAPI ()
-    {
-    if( mContactMngr )
-        {
-        delete mContactMngr;
-        mContactMngr = NULL;
-        }
-    }
-
-quint32 CCreatorPhonebookAPI::saveContact( const QList<QContactDetail>& list )
-    {
-    // create a new contact item
-    QContact store;
-    quint32 id;
-    for(int i = 0 ; i < list.count() ; i++ )
-    	{
-		QContactDetail cntdetail = list.at(i);
-		store.saveDetail(&cntdetail);
-    	}
-    /*foreach( QContactDetail cntdetail, list )
-        {
-        store.saveDetail( &cntdetail );
-        }
-    */
-    mContactMngr->saveContact( &store );
-    id = store.localId();
-    return id;
-    }
-
-quint32 CCreatorPhonebookAPI::createGroup( const QString& groupName )
-	{
-	QContact newGroup;
-	newGroup.setType(QContactType::TypeGroup);
-	QContactName newGroupName;
-	newGroupName.setCustomLabel( groupName );
-	newGroup.saveDetail(&newGroupName);
-	mContactMngr->saveContact(&newGroup);
-	return newGroup.localId();
-	}
-
-int CCreatorPhonebookAPI::numberOfContacts()
-	{
-	QList<QContactLocalId> contacts = mContactMngr->contactIds();
-	return contacts.count();
-	
-	}
-
-bool CCreatorPhonebookAPI::IsContactGroupL( const QContact& contact )
-	{
-	 
-	if( contact.type() == QContactType::TypeGroup )
-		{
-		return true;
-		}
-	return false;
-	}
-
-int CCreatorPhonebookAPI::addContactToGroup( QContactLocalId group, QContactLocalId contact )
-	{
-	QContact newGroup = mContactMngr->contact( group );
-	QContact contactLink = mContactMngr->contact( contact );
-	int ret = 0;
-	if( contact && IsContactGroupL( contactLink ) == false )
-	    {
-        QList<QContactRelationship> relationships = contactLink.relationships(QContactRelationship::HasMember);
-        if( !relationships.count() && contactLink.type() == QContactType::TypeContact ) //just for contacts that are not in relationship - not in group yet
-			{
-			QContactRelationship* contactRel = new QContactRelationship();
-			contactRel->setRelationshipType(QContactRelationship::HasMember);
-			contactRel->setFirst(newGroup.id());
-			contactRel->setSecond( contactLink.id() );
-			mContactMngr->saveRelationship( contactRel );
-			delete contactRel;
-			ret++;
-			}         
-		}
-	return ret;
-	}
-int CCreatorPhonebookAPI::addToGroup(QContactLocalId group, int amount)
-	{
-	QList<QContactLocalId> contacts = mContactMngr->contactIds();
-	int ret = 0;		
-	int tmp = 0;
-	int cnt = 0;
-	
-	for( int i=0; cnt < amount && i < contacts.count() ; i++ )
-		{
-		QContact contact = mContactMngr->contact( mContactMngr->contactIds().at(i) );
-		if( contact.type() == QContactType::TypeContact )
-			{
-			tmp = addContactToGroup(group,mContactMngr->contactIds().at(i)); 
-			ret += tmp;
-			if(tmp)
-				{
-				cnt++;
-				tmp = 0;
-				}
-			}
-		}
-	return ret;
-	}
-
-
-bool CCreatorPhonebookAPI::deleteAllContacts()
-    {
-    QList<QContactLocalId> all = mContactMngr->contactIds();
-    return deleteContacts( all );
-    }
-
-bool CCreatorPhonebookAPI::deleteAllContacts( const QString& type )
-    {
-    QList<QContactLocalId> contactsToDelete;
-    QList<QContactLocalId> contacts = mContactMngr->contactIds();
-    foreach(QContactLocalId contactId, contacts)
-        {
-        QContact contact = mContactMngr->contact( contactId );
-        if( contact.type() == type )
-            {
-            contactsToDelete.append( contact.localId() );
-            }
-        }
-    return deleteContacts( contactsToDelete );
-    }
-
-
-bool CCreatorPhonebookAPI::deleteContacts( const QList<QContactLocalId>& list )
-    {
-    QMap<int, QContactManager::Error> errorMap;
-    return mContactMngr->removeContacts( list, &errorMap );
-    }
-
-QContact CCreatorPhonebookAPI::contact( const QContactLocalId& contactId )
-    {
-    return mContactMngr->contact( contactId );
-    }
-
-QString CCreatorPhonebookAPI::phoneNumber( const QContactLocalId& contactId )
-    {
-    QString strNumber;
-    QContact contact = mContactMngr->contact( contactId );
-    if( !contact.isEmpty() )
-        {
-        QContactPhoneNumber phoneNumber = static_cast<QContactPhoneNumber>( contact.detail( QContactPhoneNumber::DefinitionName ) );
-        strNumber = phoneNumber.number();
-        }
-    return strNumber;
-    }
-
-bool CCreatorPhonebookAPI::contactDetails( const QContactLocalId& contactId, QString& name, QString& phoneNumber, QString& email )
-    {
-    bool success(false);
-    QContact contact = mContactMngr->contact( contactId );
-    if( !contact.isEmpty() )
-        {
-        QContactPhoneNumber contactPhoneNumber = static_cast<QContactPhoneNumber>( contact.detail( QContactPhoneNumber::DefinitionName ) );
-        phoneNumber = contactPhoneNumber.number();
-        QContactEmailAddress contactEmailAddress = static_cast<QContactEmailAddress>( contact.detail( QContactEmailAddress::DefinitionName ) );
-        email = contactEmailAddress.emailAddress();
-        QContactDisplayLabel contactDisplayLabel = static_cast<QContactDisplayLabel>( contact.detail( QContactDisplayLabel::DefinitionName ) );
-        name = contactDisplayLabel.label();
-        success = true;
-        }
-    return success;
-    }
-// End of File
--- a/creator/engine/src/creator_phonebookbase.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +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 "engine.h"
-#include "enginewrapper.h"
-#include "creator_phonebookbase.h"
-#include "creator_traces.h"
-
-void CCreatorPhonebookBase::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
-    {
-    LOGSTRING("Creator: CCreatorPhonebookBase::QueryDialogClosedL");
-    
-    if(aPositiveAction == EFalse && aUserData!=ECreatorPhonebookGetContactFields && aUserData!=ECreatorPhonebookContactsAllFields )
-        {
-        iEngine->ShutDownEnginesL();
-        return;
-        }
-    
-    const TDesC* showText = &KSavingText;
-    TBool finished(EFalse);
-    TBool retval(ETrue);
-    switch(aUserData)
-        {
-        case ECreatorPhonebookDelete:
-            showText = &KDeletingText;
-            finished = ETrue;
-            iEntriesToBeCreated = 1;
-            break;
-        case ECreatorPhonebookStart:
-        	if(iCommand == ECmdCreatePhoneBookEntryContacts )
-        		{
-				retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Fields in contact"), R_CONTACT_CREATION_TYPE_QUERY, 
-        	                &iDummy, this, ECreatorPhonebookGetContactFields );
-        		}
-        	else
-        		{
-				retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Number of contacts "), R_GROUP_CREATION_TYPE_QUERY, 
-        	       	                &iDummy, this, ECreatorPhonebookGetGroupFields );
-        		}
-            break;
-        case ECreatorPhonebookGetContactFields:
-            if(iDummy==0)// first item, use default fields
-                    
-                {
-                iDefaultFieldsSelected = ETrue;
-                finished = ETrue;
-                }
-            else
-                {
-                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfPhoneNumberFields, _L("Amount of phone number fields in one contact?"), 
-                    ETrue, this, ECreatorPhonebookGetPhoneNumbersCount 
-                    );
-                }
-            break;
-        case ECreatorPhonebookGetPhoneNumbersCount:
-            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfURLFields, _L("Amount of URL fields in one contact?"), 
-                ETrue, this, ECreatorPhonebookGetUrlsCount 
-                );
-            break;
-        case ECreatorPhonebookGetUrlsCount:
-            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfEmailAddressFields, _L("Amount of email fields in one contact?"), 
-                ETrue, this, ECreatorPhonebookGetEmailsCount
-                );
-            break;
-        case ECreatorPhonebookGetEmailsCount:
-            retval = iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Add all the other fields to contacts?"), this, ECreatorPhonebookContactsAllFields);
-            break;
-        case ECreatorPhonebookContactsAllFields:
-            iAddAllFields = aPositiveAction;
-            // finaly we have all informations from user, start engine
-            finished = ETrue;
-            break;
-        case ECreatorPhonebookGetGroupFields:
-            iContactsInGroup = KCreateRandomAmountOfGroups;
-            if(iDummy==0)// first item, use default fields
-                {
-                finished = ETrue;
-                }
-            else
-                {
-                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iContactsInGroup, _L("Amount of contacts in one group?"), 
-                    ETrue, this, ECreatorPhonebookGetContactsInGroup);
-                }
-            break;
-        case ECreatorPhonebookGetContactsInGroup:
-            // finaly we have all informations from user, start engine
-            finished = ETrue;
-            break;
-        default:
-            //some error
-            retval = EFalse;
-            break;
-        }
-    if( retval == EFalse )
-        {
-        iEngine->ShutDownEnginesL();
-        }
-    else if( finished )
-        {
-        // add this command to command array
-        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
-        // started exucuting commands
-        iEngine->ExecuteFirstCommandL( *showText );
-        }
-    }
-    
-TBool CCreatorPhonebookBase::AskDataFromUserL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorPhonebookBase::AskDataFromUserL");
-    iCommand = aCommand;
-    
-    if( aCommand == ECmdDeleteContacts )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contacts?"), this, ECreatorPhonebookDelete );
-        }
-    if( aCommand == ECmdDeleteCreatorContacts )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contacts created with Creator?"), this, ECreatorPhonebookDelete ); 
-        }
-    if( aCommand == ECmdDeleteContactGroups )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contact groups?"), this, ECreatorPhonebookDelete );
-        }
-    if( aCommand == ECmdDeleteCreatorContactGroups )
-        {
-        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contact groups created with Creator?"), this, ECreatorPhonebookDelete ); 
-        }    
-    // display queries
-    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorPhonebookStart); // ask number of entries to create
-    }
-
-
-void CCreatorPhonebookBase::SetDefaultParameters()
-    {
-    iNumberOfPhoneNumberFields = 1;
-    iNumberOfURLFields = 0;
-    iNumberOfEmailAddressFields = 0;
-    iContactsInGroup = 50;
-    iDefaultFieldsSelected = EFalse;
-    }
--- a/creator/engine/src/creator_phonebookwrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,661 +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 "engine.h"
-#include "enginewrapper.h"
-#include "creator_contactsetcache.h"
-
-#include "creator_phonebookwrapper.h" 
-#include "creator_traces.h"
-
-#include <bautils.h> 
-
-typedef struct {
-TInt iFieldCode;
-QString iDetail;
-QString iFieldContext;
-QString iFieldString;
-} QDetailFieldInfo;
-//static const TInt RND_TYPE_UNDEF = -99;
-QDetailFieldInfo CreatorPbkTextFields[] = {        
-        { (TInt)CCreatorPhonebookWrapper::EFirstName,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldFirstName).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::ELastName,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldLastName).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::ECompanyName,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldName).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EJobTitle,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldTitle).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EPrefix,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldPrefix).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::ESuffix,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldSuffix).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EMiddleName,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldMiddleName).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrStreetHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldStreet).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrLocalHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldLocality).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrRegionHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldRegion).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrPostCodeHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldPostcode).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrCountryHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldCountry).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrStreetGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldStreet).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrLocalGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldLocality).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrRegionGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldRegion).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrPostCodeGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldPostcode).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrCountryGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldCountry).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrStreetWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldStreet).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrLocalWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldLocality).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrRegionWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldRegion).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrPostCodeWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldPostcode).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAddrCountryWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldCountry).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EMobilePhoneWork,(QContactPhoneNumber::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactPhoneNumber::SubTypeMobile).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::ELandPhoneWork,(QContactPhoneNumber::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactPhoneNumber::SubTypeLandline).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::ENote,(QContactNote::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactNote::FieldNote).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EDepartment,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldDepartment).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EAsstName,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldAssistantName).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::ESpouse,(QContactFamily::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactFamily::FieldSpouse).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EChildren,(QContactFamily::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactFamily::FieldChildren).operator QString()},
-        { (TInt)CCreatorPhonebookWrapper::EGenLabel,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(),  (QContactName::FieldCustomLabel).operator QString()}
-        };
-                  
-
-typedef struct{
-TInt iFieldCode;
-QString iFieldContext;
-QString iFieldString;
-}PhoneNumInfo;
-PhoneNumInfo CreatorPhoneNumberFields[] =
-    {
-    { CCreatorPhonebookWrapper::ELandPhoneGen,"", "Landline"},
-    { CCreatorPhonebookWrapper::ELandPhoneHome,"Home", "Landline"},
-    { CCreatorPhonebookWrapper::ELandPhoneWork,"Work", "Landline"},                        
-    { CCreatorPhonebookWrapper::EMobilePhoneGen,"","Mobile"},
-    { CCreatorPhonebookWrapper::EMobilePhoneHome,"Home","Mobile"},
-    { CCreatorPhonebookWrapper::EMobilePhoneWork,"Work", "Mobile"},
-    { CCreatorPhonebookWrapper::EFaxNumberGen, "", "Facsimile"},
-    { CCreatorPhonebookWrapper::EFaxNumberHome, "Home", "Facsimile"},
-    { CCreatorPhonebookWrapper::EFaxNumberWork, "Work", "Facsimile"},
-    { CCreatorPhonebookWrapper::EPagerNumber, "Work", "Pager"},
-    { CCreatorPhonebookWrapper::EVideoNumberGen, "", "Video"},
-    { CCreatorPhonebookWrapper::EVideoNumberHome, "Home", "Video"},
-    { CCreatorPhonebookWrapper::EVideoNumberWork, "Work", "Video"},   //{ "Home", "Voice" },//{ "Work", "Voice" },
-    { CCreatorPhonebookWrapper::EAsstPhone, "Work", "Assistant" },
-    { CCreatorPhonebookWrapper::ECarPhone, "Home",  "Car" }
-    };
-
-
-typedef struct{
-	TInt iFieldCode;
-	QString iFieldContext;
-}EmailInfo;
-EmailInfo CreatorEmailFields[] =
-	{
-    {CCreatorPhonebookWrapper::EEmailGen,""},
-    {CCreatorPhonebookWrapper::EEmailHome,(QContactDetail::ContextHome).operator QString()},
-    {CCreatorPhonebookWrapper::EEmailWork,(QContactDetail::ContextWork).operator QString()}
-    };
-
-typedef struct{
-	TInt iFieldCode;
-	QString iFieldContext;
-}UrlInfo;
-UrlInfo CreatorUrlFields[] =
-    {
-    {CCreatorPhonebookWrapper::EUrlGen,""},
-    {CCreatorPhonebookWrapper::EUrlHome,(QContactDetail::ContextHome).operator QString()},
-    {CCreatorPhonebookWrapper::EUrlWork,(QContactDetail::ContextWork).operator QString()}
-    };
-
-CCreatorPhonebookWrapper* CCreatorPhonebookWrapper::NewL()
-    {
-    CCreatorPhonebookWrapper* self = CCreatorPhonebookWrapper::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorPhonebookWrapper* CCreatorPhonebookWrapper::NewLC()
-    {
-    CCreatorPhonebookWrapper* self = new (ELeave) CCreatorPhonebookWrapper();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-
-CCreatorPhonebookWrapper::CCreatorPhonebookWrapper() 
-    {
-    }
-
-void CCreatorPhonebookWrapper::ConstructL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebookWrapper::ConstructL");
-
-    QT_TRYCATCH_LEAVING( iPhonebookAPI = new CCreatorPhonebookAPI() );
-	
-	}
-	
-
-CCreatorPhonebookWrapper::~CCreatorPhonebookWrapper()
-    {
-    LOGSTRING("Creator: CCreatorPhonebookWrapper::~CCreatorPhonebookWrapper");
-	if( iPhonebookAPI )
-        {
-        delete iPhonebookAPI;
-        iPhonebookAPI = NULL;
-        }
-    }
-
-//----------------------------------------------------------------------------
-
-QList<QContactDetail> CCreatorPhonebookWrapper::CreateContactDetailsFromParameters( const TCreatorContactFields& aFields )
-	{
-	QList<QContactDetail> contDetList;
-	QString content;
-	HBufC* temp;
-	TInt arraySize = sizeof(CreatorPbkTextFields)/sizeof(QDetailFieldInfo);
-	for (TInt i = 0; i < arraySize; i++)
-		{
-	    TCreatorContactFields::const_iterator it = aFields.find(CreatorPbkTextFields[i].iFieldCode);
-		if( it != aFields.end() )
-			{
-		    temp = (*it).second;
-			content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
-			QContactDetail contactDetail =  CreateContactDetail(contDetList, CreatorPbkTextFields[i].iDetail,CreatorPbkTextFields[i].iFieldContext,CreatorPbkTextFields[i].iFieldString, content );
-			AddFieldToList( contDetList, contactDetail );
-			}
-		}
-	arraySize = sizeof(CreatorPhoneNumberFields)/sizeof(PhoneNumInfo);
-		for (TInt i = 0; i < arraySize; i++)
-			{
-			TCreatorContactFields::const_iterator it = aFields.find(CreatorPhoneNumberFields[i].iFieldCode);
-			if( it != aFields.end() )
-				{
-			    temp = (*it).second;
-				content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
-				QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactPhoneNumber::DefinitionName ,CreatorPhoneNumberFields[i].iFieldContext,CreatorPhoneNumberFields[i].iFieldString, content );
-				AddFieldToList( contDetList, contactDetail );
-				}
-			}
-		
-	arraySize = sizeof(CreatorEmailFields)/sizeof(EmailInfo);
-		for (TInt i = 0; i < arraySize; i++)
-			{
-			TCreatorContactFields::const_iterator it = aFields.find(CreatorEmailFields[i].iFieldCode);
-			if( it != aFields.end() )
-				{
-			    temp = (*it).second;
-				content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
-				QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactEmailAddress::DefinitionName ,CreatorEmailFields[i].iFieldContext,"", content );
-				AddFieldToList( contDetList, contactDetail );
-				}
-			}
-		
-	arraySize = sizeof(CreatorUrlFields)/sizeof(UrlInfo);
-			for (TInt i = 0; i < arraySize; i++)
-				{
-				TCreatorContactFields::const_iterator it = aFields.find(CreatorUrlFields[i].iFieldCode);
-				if( it != aFields.end() )
-					{
-				    temp = (*it).second;
-					content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
-					QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactUrl::DefinitionName ,CreatorUrlFields[i].iFieldContext,"", content );
-					AddFieldToList( contDetList, contactDetail );
-					}
-				}	
-	arraySize = sizeof(CreatorUrlFields)/sizeof(UrlInfo);
-			for (TInt i = 0; i < arraySize; i++)
-				{
-				TCreatorContactFields::const_iterator it = aFields.find(CreatorUrlFields[i].iFieldCode);
-				if( it != aFields.end() )
-					{
-					temp = (*it).second;
-					content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
-					QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactUrl::DefinitionName ,CreatorUrlFields[i].iFieldContext,"", content );
-					AddFieldToList( contDetList, contactDetail );
-					}
-				}
-			
-			TCreatorContactFields::const_iterator it = aFields.find(CCreatorPhonebookWrapper::EThumbnailPic);
-			if( it != aFields.end() )
-				{
-				temp = (*it).second;
-				if(temp)
-					{
-					content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
-					QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactAvatar::DefinitionName ,"","", content );
-					AddFieldToList( contDetList, contactDetail );
-					}
-				}
-			it = aFields.find(CCreatorPhonebookWrapper::EAnniversary);
-				if( it != aFields.end() )
-					{
-					temp = (*it).second;
-					if(temp)
-						{
-						content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
-						QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactAnniversary::DefinitionName ,"","", content );
-						AddFieldToList( contDetList, contactDetail );
-						}
-					}
-		
-	return contDetList;
-	}
-QContactDetail CCreatorPhonebookWrapper::CreateContactDetail( QList<QContactDetail>& aContactDetailList,QString aDetail, QString aFieldContext, QString aFieldString, QString aData )
-    {
-    QContactDetail contactDetail;
-        
-        if( aDetail == QContactPhoneNumber::DefinitionName)
-            {
-            QContactPhoneNumber phoneNumber;// = contactDetail;
-            if(!aFieldContext.isEmpty())
-            	{
-				phoneNumber.setContexts(aFieldContext);
-            	}
-            phoneNumber.setSubTypes(aFieldString);
-            //QString number = QString::fromUtf16(aData.Ptr(),aData.Length());
-            phoneNumber.setNumber(aData);
-            return phoneNumber;
-            }
-        else if( aDetail == QContactName::DefinitionName )          //--Contact NAME-----------------------------
-            {
-            QContactName contactName;
-            for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
-                {
-                if(aContactDetailList.at(i).definitionName() == QContactName::DefinitionName )
-                    {
-                    contactName = aContactDetailList.at(i);
-                    }
-                }
-            //QString name = QString::fromUtf16(aData.Ptr(),aData.Length());
-            if(aFieldString == QContactName::FieldFirstName)
-                {
-                if(contactName.firstName().isEmpty())
-                    {
-                    contactName.setFirstName( aData );
-                    }
-                }
-            else if(aFieldString == QContactName::FieldLastName)
-                {
-                if(contactName.lastName().isEmpty())
-                    {
-                    contactName.setLastName( aData );
-                    }
-                }
-            else if(aFieldString == QContactName::FieldMiddleName)
-                {
-                if(contactName.middleName().isEmpty())
-                    {
-                    contactName.setMiddleName( aData );
-                    }
-                }
-            else if(aFieldString == QContactName::FieldPrefix)
-                {
-                if(contactName.prefix().isEmpty())
-                    {
-                    contactName.setPrefix( aData );
-                    }
-                }
-            else if(aFieldString == QContactName::FieldSuffix)
-                {
-                if(contactName.suffix().isEmpty())
-                    {
-                    contactName.setSuffix( aData );
-                    }
-                }
-            else        //QContactName::FieldCustomLabel:
-                {
-                if(contactName.customLabel().isEmpty())
-                    {
-                    contactName.setCustomLabel( aData );
-                    }
-                }
-            return contactName;
-            }
-        else if( aDetail == QContactOrganization::DefinitionName )          //--Contact Company-----------------------------
-            {
-            QContactOrganization contactCompany;
-            
-            for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
-                {
-                if(aContactDetailList.at(i).definitionName() == QContactOrganization::DefinitionName )
-                    {
-                    contactCompany = aContactDetailList.at(i);
-                    }
-                }
-            
-            //QString company = QString::fromUtf16(aData.Ptr(),aData.Length());
-            if(aFieldString == QContactOrganization::FieldName)
-                {
-                if(contactCompany.name().isEmpty())
-                    {
-                    contactCompany.setName( aData );
-                    }
-                }
-            if(aFieldString == QContactOrganization::FieldTitle)
-                {
-                if(contactCompany.title().isEmpty())
-                    {
-                    contactCompany.setTitle( aData );
-                    }
-                }
-            if(aFieldString == QContactOrganization::FieldDepartment)
-                {
-                QStringList depList = contactCompany.department();
-                depList.append(aData);
-                contactCompany.setDepartment(depList);
-                }
-            if(aFieldString == QContactOrganization::FieldAssistantName)
-                {
-                if(contactCompany.assistantName().isEmpty())
-                    {
-                    contactCompany.setAssistantName( aData );
-                    }
-                }
-            return contactCompany;
-            }
-        else if( aDetail == QContactAddress::DefinitionName )           //--Contact Address-----------------------------
-                {
-                QContactAddress contactAddress;
-                
-                for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
-                    {
-                    if(aContactDetailList.at(i).definitionName() == QContactAddress::DefinitionName && aContactDetailList.at(i).value(QContactDetail::FieldContext) == aFieldContext )
-                        {
-                        contactAddress = aContactDetailList.at(i);
-                        }
-                    }
-                if( !aFieldContext.isEmpty() )
-                    {
-					contactAddress.setContexts( aFieldContext );
-                    }
-                //QString address = QString::fromUtf16(aData.Ptr(),aData.Length());
-                if(aFieldString == QContactAddress::FieldStreet )
-                    {
-                    if( contactAddress.street().isEmpty() )
-                        {
-                        contactAddress.setStreet( aData );
-                        }
-                    }
-                else if(aFieldString == QContactAddress::FieldLocality )
-                    {
-                    if( contactAddress.locality().isEmpty() )
-                        {
-                        contactAddress.setLocality( aData );
-                        }
-                    }
-                else if(aFieldString == QContactAddress::FieldRegion )
-                    {
-                    if( contactAddress.region().isEmpty() )
-                        {
-                        contactAddress.setRegion( aData );
-                        }
-                    }
-                else if(aFieldString == QContactAddress::FieldPostcode )
-                    {
-                    if( contactAddress.postcode().isEmpty() )
-                        {
-                        contactAddress.setPostcode( aData );
-                        }
-                    }
-                else if(aFieldString == QContactAddress::FieldCountry )
-                    {
-                    if( contactAddress.country().isEmpty() )
-                        {
-                        contactAddress.setCountry( aData );
-                        }
-                    }
-                else 
-                    {
-                    return contactDetail;
-                    }
-                return contactAddress;
-                }
-        else if( aDetail == QContactNote::DefinitionName )          //--Contact Note-----------------------------
-                    {
-                    QContactNote contactNote;
-                    //QString note = QString::fromUtf16(aData.Ptr(),aData.Length());
-                    contactNote.setNote(aData);
-                    return contactNote;
-                    }
-        else if( aDetail == QContactFamily::DefinitionName )            //--Contact Family-----------------------------
-                    {
-                    QContactFamily contactFamily;
-                    
-                    for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
-                        {
-                        if(aContactDetailList.at(i).definitionName() == QContactFamily::DefinitionName && aContactDetailList.at(i).value(QContactDetail::FieldContext) == aFieldContext )
-                            {
-                            contactFamily = aContactDetailList.at(i);
-                            }
-                        }
-                   
-                    //QString familyData = QString::fromUtf16(aData.Ptr(),aData.Length());
-                    if(aFieldString == QContactFamily::FieldSpouse )
-                        {
-                        if( contactFamily.spouse().isEmpty() )
-                            {
-                            contactFamily.setSpouse( aData );
-                            }
-                        }
-                    if(aFieldString == QContactFamily::FieldChildren )
-                        {
-                            QStringList children = contactFamily.children();
-                            children.append( aData );
-                            contactFamily.setChildren( children );
-                        }
-                    
-                    return contactFamily;
-                    }
-        
-        if( aDetail == QContactAvatar::DefinitionName)                      //--Contact Picture-----------------------------
-                {
-                QContactAvatar contactAvatar;
-                QUrl imageUrl;
-                imageUrl.setUrl(aData);
-                contactAvatar.setImageUrl(imageUrl);
-
-                return contactAvatar;
-                }
-        if( aDetail == QContactAnniversary::DefinitionName) //--Anniversary------------------------------
-                {
-                QContactAnniversary contactAnniversary;
-                aData.replace(QChar('/'), QChar('-'));
-       		    QDate date = QDate::fromString(aData, "dd-MM-yyyy");
-                //TTime datetime = aEngine->RandomDate( CCreatorEngine::EDateFuture );
-                //date.setDate( datetime.DateTime().Year(),(int) (datetime.DateTime().Month()+1), datetime.DateTime().Day() );
-                contactAnniversary.setOriginalDate( date );
-                return contactAnniversary;
-                }
-        if( aDetail == QContactEmailAddress::DefinitionName) //--Email------------------------------------
-            {
-            QContactEmailAddress email;
-            //QString emailAddr = QString::fromUtf16(aData.Ptr(),aData.Length());
-            if( !aFieldContext.isEmpty() )
-            	{
-				email.setContexts( aFieldContext );
-            	}
-            email.setEmailAddress( aData );
-            return email;
-            }
-        if( aDetail == QContactUrl::DefinitionName )    //--Url-------------------------------------------
-            {
-            QContactUrl url;
-            //QString urlStr = QString::fromUtf16(aData.Ptr(),aData.Length());
-            if( !aFieldContext.isEmpty() )
-                {
-				url.setContexts( aFieldContext );
-                }
-            url.setUrl(aData);
-            return url;
-            }
-        if( aDetail == QContactBirthday::DefinitionName )   //--Birthday-----------------------------------
-            {
-            QContactBirthday birthday;
-            QDate date = QDate::fromString(aData);
-            //TTime datetime = aEngine->RandomDate( CCreatorEngine::EDatePast );
-            //date.setDate( datetime.DateTime().Year(),(int) (datetime.DateTime().Month()+1), datetime.DateTime().Day() );
-            birthday.setDate( date );
-            return birthday;
-            }
-                
-        return contactDetail;
-    }
-
-void CCreatorPhonebookWrapper::AddFieldToList( QList<QContactDetail>& aDetailList, QContactDetail aDetail)
-    {
-     bool replace = false;
-     for(int i = 0 ; i< aDetailList.count() ; i++) //go through
-          {
-           if( !aDetail.isEmpty() && aDetail.definitionName() == aDetailList.at(i).definitionName() 
-        		   && aDetail.definitionName() != QContactPhoneNumber::DefinitionName 
-        		   && aDetail.definitionName() != QContactEmailAddress::DefinitionName
-        		   && aDetail.definitionName() != QContactUrl::DefinitionName )
-               {
-               QString context = aDetail.value(QContactDetail::FieldContext);
-               bool isContextEmpty = context.isEmpty();
-               if( isContextEmpty ||  ( aDetail.value(QContactDetail::FieldContext) == aDetailList.at(i).value(QContactDetail::FieldContext)) )
-                   {
-                   //replace
-                   aDetailList.replace(i,aDetail);
-                   replace = true;
-                   }
-               }
-          }
-          if(!replace)
-             {
-             if(!aDetail.isEmpty())
-                {
-                aDetailList.append(aDetail);
-                }
-             }
-      
-    }
-
-TUint32 CCreatorPhonebookWrapper::CreateContactEntryL(const TCreatorContactFields& aFields)
-    {
-	QList<QContactDetail> list = CreateContactDetailsFromParameters( aFields );
-	
-	return iPhonebookAPI->saveContact( list );
-    }
-
-
-//----------------------------------------------------------------------------
-
-
-
-//----------------------------------------------------------------------------
-
-void CCreatorPhonebookWrapper::DeleteAllL()
-    {
-	iPhonebookAPI->deleteAllContacts();
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebookWrapper::DeleteAllGroupsL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebookWrapper::DeleteAllGroupsL");
-    
-    iPhonebookAPI->deleteAllContacts( QContactType::TypeGroup );
-
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorPhonebookWrapper::DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid )
-    {
-	QList<QContactLocalId> contacts; 
-	for( TInt i = 0; i < aContactsToDelete.Count(); ++i )
-	    {
-	    QContact contact = iPhonebookAPI->contact( QContactLocalId( aContactsToDelete[i] ) );
-	    if( (contact.type() == QContactType::TypeGroup && aStoreUid == KUidDictionaryUidContactGroups ) ||  (contact.type() != QContactType::TypeGroup && aStoreUid != KUidDictionaryUidContactGroups) )
-            {
-            contacts.append( QContactLocalId( aContactsToDelete[i] ) );
-            }
-	    }
-    QMap<int, QContactManager::Error> errorMap;
-	iPhonebookAPI->deleteContacts( contacts );
-    }
-
-//----------------------------------------------------------------------------
-TBool CCreatorPhonebookWrapper::HasOtherThanGroupsL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebookWrapper::HasOtherThanGroupsL");
-    TBool result( EFalse );
-    return result;
-    }
-
-
-TUint32 CCreatorPhonebookWrapper::CreateGroupEntryL( HBufC* aGroupName )
-    {
-	TUint32 id = 0;
-	QString groupName = QString::fromUtf16( aGroupName->Des().Ptr(), aGroupName->Length() );
-	
-	id = iPhonebookAPI->createGroup( groupName );
-	
-	return id; 
-    }
-TInt CCreatorPhonebookWrapper::NumberOfContacts()
-	{
-	//return all stored contacts
-	return iPhonebookAPI->numberOfContacts();
-	}
-
-TInt CCreatorPhonebookWrapper::AddContactToGroup( TUint32 aGroupId, TUint32 aContact )
-	{
-	QContactLocalId group = QContactLocalId(aGroupId);
-	QContactLocalId contact = QContactLocalId(aContact);
-	
-	TInt ret = iPhonebookAPI->addContactToGroup(group, contact);
-
-	return ret;
-	}
-TInt CCreatorPhonebookWrapper::AddToGroup( TUint32 aGroupId, TInt aAmount )
-	{
-	QContactLocalId group = QContactLocalId(aGroupId);
-	TInt ret = iPhonebookAPI->addToGroup( group, (int) aAmount );
-	return ret;
-	}
-
-
-//----------------------------------------------------------------------------
-
-TInt CCreatorPhonebookWrapper::CreateSubscribedContactEntryL()
-    {
-    LOGSTRING("Creator: CCreatorPhonebookWrapper::CreateSubscribedContactEntryL");
-
-    return KErrNotSupported;
-    }
-
-
-HBufC* CCreatorPhonebookWrapper::GetPhoneNumberL( TUint32 aContactId )
-    {
-    QContactLocalId contact = QContactLocalId(aContactId);
-    QString phoneNumber = iPhonebookAPI->phoneNumber(contact);
-    HBufC *buf = HBufC::NewLC( phoneNumber.length() );
-    buf->Des().Copy( phoneNumber.utf16() );
-    CleanupStack::Pop( buf );
-    return buf;
-    }
-
-TBool CCreatorPhonebookWrapper::GetContactDetailsL( TUint32 aContactId, TDes& aName, TDes& aPhoneNumber, TDes& aEmail )
-    {
-    QString name;
-    QString phoneNumber;
-    QString email;
-    
-    QContactLocalId contact = QContactLocalId(aContactId);
-    bool success = iPhonebookAPI->contactDetails( contact, name, phoneNumber, email);
-    if( success )
-        {
-        aName.Copy( name.utf16() );
-        aPhoneNumber.Copy( phoneNumber.utf16() );
-        aEmail.Copy( email.utf16() );
-        }
-    return success ? ETrue : EFalse ;
-    }
--- a/creator/engine/src/creator_randomdataparser.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,325 +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 <f32file.h>
-#include <utf.h>
-#include <xml/documentparameters.h>
-#include "creator_randomdataparser.h"
-#include "creator_traces.h"
-
-// XML element names
-_LIT(KRootElement, "creatordata");
-_LIT(KFirstName, "firstname");
-_LIT(KSurname, "surname");
-_LIT(KCompany, "company");
-_LIT(KAddress, "address");
-_LIT(KJobTitle, "jobtitle");
-_LIT(KPhoneNumber, "phonenumber");
-_LIT(KGroupName, "groupname");
-_LIT(KMeetingReason, "meetingreason");
-_LIT(KMeetingPlace, "meetingplace");
-_LIT(KMemoText, "memo");
-_LIT(KAnniversaryReason, "anniversary");
-_LIT(KToDoText, "todo");
-_LIT(KReminderText, "reminder");
-_LIT(KMessageSubject, "messagesubject");
-_LIT(KMessageText, "messagetext");
-_LIT(KCity, "city");
-_LIT(KCountry, "country");
-_LIT(KPostcode, "postcode");
-_LIT(KState, "state");
-_LIT(KPobox, "pobox");
-_LIT(KPrefix, "prefix");
-_LIT(KSuffix, "suffix");
-_LIT(KLandmarkName, "landmarkname");
-_LIT(KLandmarkDescription, "landmarkdescription");
-
-using namespace Xml;
-
-CCreatorRandomDataParser::CCreatorRandomDataParser() 
-    {        
-    }
-
-void CCreatorRandomDataParser::ConstructL()
-    {
-    LOGSTRING("Creator: CCreatorRandomDataParser::ConstructL");
-	iElementNameArray = new (ELeave) CDesCArrayFlat(32);
-	iElementNameArray->InsertL(EFirstName, KFirstName);
-	iElementNameArray->InsertL(ESurname, KSurname);
-	iElementNameArray->InsertL(ECompany, KCompany);
-	iElementNameArray->InsertL(EAddress, KAddress);
-	iElementNameArray->InsertL(EJobTitle, KJobTitle);
-	iElementNameArray->InsertL(EPhoneNumber, KPhoneNumber);
-	iElementNameArray->InsertL(EGroupName, KGroupName);
-	iElementNameArray->InsertL(EMeetingReason, KMeetingReason);
-	iElementNameArray->InsertL(EMeetingPlace, KMeetingPlace);
-	iElementNameArray->InsertL(EMemoText, KMemoText);
-	iElementNameArray->InsertL(EAnniversaryReason, KAnniversaryReason);
-	iElementNameArray->InsertL(EToDoText, KToDoText);
-	iElementNameArray->InsertL(EReminderText, KReminderText);
-	iElementNameArray->InsertL(EMessageSubject, KMessageSubject);
-	iElementNameArray->InsertL(EMessageText, KMessageText);
-	iElementNameArray->InsertL(ECity, KCity);
-	iElementNameArray->InsertL(ECountry, KCountry);
-	iElementNameArray->InsertL(EPostcode, KPostcode);
-	iElementNameArray->InsertL(EState, KState);
-	iElementNameArray->InsertL(EPobox, KPobox);
-	iElementNameArray->InsertL(EPrefix, KPrefix);
-	iElementNameArray->InsertL(ESuffix, KSuffix);
-	iElementNameArray->InsertL(ELandmarkName, KLandmarkName);
-	iElementNameArray->InsertL(ELandmarkDescription, KLandmarkDescription);
-	iContentData = HBufC::NewL(16);
-    iResultArray = new (ELeave) CDesCArrayFlat(16);
-    }
-
-CCreatorRandomDataParser* CCreatorRandomDataParser::NewL()
-    {
-    LOGSTRING("Creator: CCreatorRandomDataParser::NewL");
-    CCreatorRandomDataParser* self = CCreatorRandomDataParser::NewLC();    
-    CleanupStack::Pop();
-    return self;
-    }
-
-CCreatorRandomDataParser* CCreatorRandomDataParser::NewLC()
-    {
-    LOGSTRING("Creator: CCreatorRandomDataParser::NewLC");
-    CCreatorRandomDataParser* self = new (ELeave) CCreatorRandomDataParser;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-CCreatorRandomDataParser::~CCreatorRandomDataParser()
-    {
-    delete iParser;
-    delete iResultArray;
-    delete iContentData;
-    delete iElementNameArray;
-    }
-
-void CCreatorRandomDataParser::GetTextFileMode(RFile& aFile, TInt& aFileSize) 
-    { 
-    LOGSTRING("Creator: CCreatorRandomDataParser::GetTextFileMode");
-    iScriptTextFormat = EFormatANSIASCII; 
-
-    // if we are working with text files, check the type first   
-    TBuf8<4> BOM; 
-
-    // first check for UTF-16 
-    if (aFileSize >= 2 && aFile.Read(0, BOM, 2) == KErrNone) 
-        { 
-        if (BOM.Length()==2 && BOM[0]==0xFF && BOM[1]==0xFE) 
-            { 
-            iScriptTextFormat = EFormatUTF16LE; 
-            aFileSize -= 2; 
-            return; 
-            } 
-        else if (BOM.Length()==2 && BOM[0]==0xFE && BOM[1]==0xFF) 
-            { 
-            iScriptTextFormat = EFormatUTF16BE; 
-            aFileSize -= 2; 
-            return;                 
-            }       
-        }
-        // then check for UTF-8 
-    if (aFileSize >= 3 && aFile.Read(0, BOM, 3) == KErrNone) 
-        { 
-        if (BOM.Length()==3 && BOM[0]==0xEF && BOM[1]==0xBB && BOM[2]==0xBF) 
-            { 
-            iScriptTextFormat = EFormatUTF8; 
-            aFileSize -= 3; 
-            return; 
-            } 
-        }
-        
-    // none of those, seek back to beginning 
-    TInt pos(0); 
-    aFile.Seek(ESeekStart, pos); 
-    }    
- 
-
-
-CDesCArrayFlat* CCreatorRandomDataParser::ParseL(const TDesC& aFileName, const TRandomDataType aDataType)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::ParseL: %S", &aFileName);
-    
-    iDataType = aDataType;
-    
-    // Create and start XML-parser
-    if( iParser == 0)
-        {
-        _LIT8(KXmlMimeType, "text/xml");
-        iParser = CParser::NewL(KXmlMimeType, *this);        
-        }
-
-    RFs filesession;
-    CleanupClosePushL(filesession);
-    User::LeaveIfError( filesession.Connect() );
-    
-    iResultArray->Reset();
-    
-    Xml::ParseL(*iParser, filesession, aFileName);
-    
-    CleanupStack::PopAndDestroy(&filesession); // filesession 
-    
-    CDesCArrayFlat* tempArray = new (ELeave) CDesCArrayFlat(8);
-    CleanupStack::PushL(tempArray);
-    for (TInt i = 0; i < iResultArray->MdcaCount(); i++)
-    	{
-    	tempArray->AppendL(iResultArray->MdcaPoint(i));
-    	}
-    CleanupStack::Pop(tempArray);
-    return tempArray;
-    }
-
-void CCreatorRandomDataParser::OnStartDocumentL(const Xml::RDocumentParameters& /*aDocParam*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnStartDocumentL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);    
-    iInsideRootElement = EFalse;
-	iContentParsingActive = EFalse;
-    }
-
-void CCreatorRandomDataParser::OnEndDocumentL(TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnEndDocumentL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-
-void CCreatorRandomDataParser::OnStartPrefixMappingL(const RString& /*aPrefix*/, 
-                                                     const RString& /*aUri*/, 
-                                                     TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnStartPrefixMappingL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-
-void CCreatorRandomDataParser::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnEndPrefixMappingL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-
-void CCreatorRandomDataParser::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnIgnorableWhiteSpaceL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-
-void CCreatorRandomDataParser::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnSkippedEntityL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-
-void CCreatorRandomDataParser::OnProcessingInstructionL(const TDesC8& /*aTarget*/, 
-                                                        const TDesC8& /*aData*/, 
-                                                        TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnProcessingInstructionL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-
-void CCreatorRandomDataParser::OnError(TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnError: %d", aErrorCode);
-    
-    iLastError = aErrorCode;
-    }
-
-TAny* CCreatorRandomDataParser::GetExtendedInterface(const TInt32 aUid)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::GetExtendedInterface (UID: %d)", aUid);
-    return this;
-    }
-
-void CCreatorRandomDataParser::OnStartElementL(const Xml::RTagInfo& aElement,
-                                               const Xml::RAttributeArray& /*aAttributes*/,
-                                               TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnStartElementL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-
-    const TDesC8& elementName8 = aElement.LocalName().DesC();        
-    HBufC* elementName16 = Convert8BitTo16BitLC(elementName8);
-    if (iInsideRootElement || (elementName16->Des() == KRootElement))
-    	{
-    	iInsideRootElement = ETrue;
-    	}
-    if (iInsideRootElement && (elementName16->Des() == iElementNameArray->MdcaPoint(iDataType)))
-    	{
-        iContentParsingActive = ETrue;
-        iContentData->Des().Zero();
-    	}
-    CleanupStack::PopAndDestroy(elementName16);
-    }
-
-void CCreatorRandomDataParser::OnEndElementL(const Xml::RTagInfo& aElement, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnEndElementL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-
-    const TDesC8& elementName8 = aElement.LocalName().DesC();
-    HBufC* elementName16 = Convert8BitTo16BitLC(elementName8);
-    if (!iInsideRootElement || (elementName16->Des() == KRootElement))
-    	{
-    	iInsideRootElement = EFalse;
-    	}
-    CleanupStack::PopAndDestroy(elementName16);
-
-    if (iContentParsingActive)
-		{
-	    if (iContentData->Des().Length() > 0)
-	    	{
-	    	iResultArray->AppendL(*iContentData);
-	    	}
-        iContentParsingActive = EFalse;
-		}
-    }
-
-void CCreatorRandomDataParser::OnContentL(const TDesC8& aBytes, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorRandomDataParser::OnContentL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    
-    if (iContentParsingActive)
-    	{
-        HBufC* data16 = Convert8BitTo16BitLC(aBytes);
-        TInt newLen = iContentData->Des().Length() + data16->Des().Length();
-        iContentData = iContentData->ReAllocL(newLen);
-        iContentData->Des().Append(*data16);
-        CleanupStack::PopAndDestroy(data16);
-    	}
-    }
-
-HBufC16* CCreatorRandomDataParser::Convert8BitTo16BitLC(const TDesC8& aInput) 
-    {     
-    LOGSTRING("Creator: CCreatorRandomDataParser::Convert8BitTo16BitLC");
-    HBufC16* output = NULL;
-    
-    output = CnvUtfConverter::ConvertToUnicodeFromUtf8L(aInput);
-    
-    CleanupStack::PushL(output);
-    return output;          
-    } 
-
-TInt CCreatorRandomDataParser::GetError() const 
-	{
-    return iLastError;
-	}
--- a/creator/engine/src/creator_scriptelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,722 +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 "creator_traces.h"
-#include "creator_scriptelement.h"
-#include <xml/documentparameters.h>
-#include <collate.h>
-#include <etel3rdparty.h> // KMaxTelNumberSize
-
-using namespace Xml;
-
-CCreatorScriptElementCache* CCreatorScriptElementCache::NewL()
-{
-    CCreatorScriptElementCache* self = new (ELeave) CCreatorScriptElementCache;
-    CleanupStack::PushL(self);
-    
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-CCreatorScriptElementCache::CCreatorScriptElementCache()
-    {
-    
-    }
-
-void CCreatorScriptElementCache::ConstructL()
-    {
-    
-    }
- 
-CCreatorScriptElementCache::~CCreatorScriptElementCache()
-    {
-    iElementCache.Reset();
-    iElementCache.Close();
-    }
-    
-void CCreatorScriptElementCache::RemoveElements()
-    {
-    iElementCache.Reset();
-    }
-
-        
-void CCreatorScriptElementCache::AddElementL(CCreatorScriptElement* aElement)
-    {
-    iElementCache.AppendL(aElement);
-    }
-
-/**
- * 
- */
-CCreatorScriptAttribute* CCreatorScriptAttribute::NewLC(const TDesC& aName, const TDesC& aValue)
-    {
-    CCreatorScriptAttribute* self = new(ELeave) CCreatorScriptAttribute();
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aValue);
-    return self;
-    }
-
-CCreatorScriptAttribute* CCreatorScriptAttribute::NewL(const TDesC& aName, const TDesC& aValue)
-    {
-    CCreatorScriptAttribute* self = CCreatorScriptAttribute::NewLC(aName, aValue);
-    CleanupStack::Pop(); // self    
-    return self;
-    }
-
-CCreatorScriptAttribute::~CCreatorScriptAttribute()
-    {
-    delete iName;
-    delete iValue;
-    }
-    
-TPtrC CCreatorScriptAttribute::Name() const
-    {
-    return iName->Des();
-    }
-
-void CCreatorScriptAttribute::SetNameL(const TDesC& aName) 
-    {
-    if( iName )
-        {
-        delete iName;
-        iName = 0;
-        }    
-    iName = HBufC::NewL(aName.Length());
-    iName->Des() = aName; 
-    }       
-    
-TPtrC CCreatorScriptAttribute::Value() const
-    {
-    return iValue->Des();
-    }
-
-void CCreatorScriptAttribute::SetValueL(const TDesC& aValue)
-    {
-    if( iValue )
-        {
-        delete iValue;
-        iValue = 0;
-        }
-    iValue = HBufC::NewL(aValue.Length());
-    iValue->Des() = aValue; 
-    }   
-
-CCreatorScriptAttribute::CCreatorScriptAttribute()
-    {    
-    }
-
-void CCreatorScriptAttribute::ConstructL(const TDesC& aName, const TDesC& aValue)
-    {
-    SetNameL(aName);
-    SetValueL(aValue);
-    }
-
-/**
- * CCreatorScriptElement
- */
-
-CCreatorScriptElement* CCreatorScriptElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    CCreatorScriptElement* self = new (ELeave) CCreatorScriptElement(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-
-CCreatorScriptElement::~CCreatorScriptElement()
-    {
-    LOGSTRING("Creator: CCreatorScriptElement::~CCreatorScriptElement");
-    iSubElements.ResetAndDestroy();
-    iAttributes.ResetAndDestroy();
-    iSubElements.Close();
-    iAttributes.Close();
-    iParameters.Reset();
-    iParameters.Close();
-    delete iName;
-    delete iContent;
-    delete iContext;
-    }
-
-RPointerArray<CCreatorScriptElement> const& CCreatorScriptElement::SubElements() const
-    {
-    return iSubElements;
-    }
-
-RPointerArray<CCreatorScriptElement>& CCreatorScriptElement::SubElements()
-    {
-    return iSubElements;
-    }
-    
-CCreatorScriptElement* CCreatorScriptElement::SubElement(TInt aIndex)
-    {
-    return iSubElements[aIndex];
-    }
-
-CCreatorScriptElement* CCreatorScriptElement::FindSubElement(const TDesC& aName)
-    {
-    for( TInt i = 0; i < iSubElements.Count(); ++i )
-        {
-        if( iSubElements[i]->Name() == aName )
-            {
-            return iSubElements[i];
-            }            
-        }
-    return 0;
-    }
-    
-void CCreatorScriptElement::RemoveSubElements()
-    {
-    iSubElements.ResetAndDestroy();
-    }
-    
-void CCreatorScriptElement::RemoveSubElementL(TInt aIndex)
-    {
-    if( aIndex < iSubElements.Count())
-        {
-        delete iSubElements[aIndex];
-        iSubElements.Remove(aIndex);
-        }
-    else
-        {
-        User::Leave(KErrArgument);
-        }
-    }
-    
-void CCreatorScriptElement::AddSubElementL(CCreatorScriptElement* aElem, TInt aIndex )
-    {
-    if( aIndex == -1 || aIndex == iSubElements.Count() )
-        {
-        iSubElements.AppendL(aElem);
-        }
-    else if( aIndex < iSubElements.Count())
-        {
-        iSubElements.InsertL(aElem, aIndex);
-        }
-    else
-        {
-        User::Leave(KErrArgument);
-        }
-    }
-  
-RPointerArray<CCreatorScriptAttribute> const& CCreatorScriptElement::Attributes() const
-    {
-    return iAttributes;
-    }
-
-        
- CCreatorScriptAttribute* CCreatorScriptElement::Attribute(TInt aIndex)
-     {
-     return iAttributes[aIndex];
-     }
-    
-void CCreatorScriptElement::RemoveAttributes()
-    {
-    iAttributes.ResetAndDestroy();
-    }
-    
- 
-void CCreatorScriptElement::RemoveAttributeL(TInt aIndex)
-    {
-    if( aIndex < iAttributes.Count())
-        {
-        delete iAttributes[aIndex];
-        iAttributes.Remove(aIndex);
-        }
-    else
-        {
-        User::Leave(KErrArgument);
-        }
-    }
- 
-void CCreatorScriptElement::AddAttributeL(CCreatorScriptAttribute* aAttribute, TInt aIndex )
-    {
-    if( aIndex == -1 || aIndex == iAttributes.Count() )
-        {
-        iAttributes.AppendL(aAttribute);
-        }
-    else if( aIndex < iAttributes.Count())
-        {
-        iAttributes.InsertL(aAttribute, aIndex);        
-        }
-    else
-        {
-        User::Leave(KErrArgument);
-        }
-    }
-
-TPtrC CCreatorScriptElement::Name() const
-    {
-    if( iName )
-        return iName->Des();
-    return TPtrC();
-    }
-
-void CCreatorScriptElement::SetNameL(const TDesC& aName)
-    {
-    if( iName )
-        {
-        delete iName;
-        iName = 0;
-        }    
-    iName = HBufC::NewL(aName.Length());
-    iName->Des() = aName; 
-    }
-
- 
-TPtrC CCreatorScriptElement::Content() const
-    {
-    if (iContent)
-        return iContent->Des();
-    return TPtrC();
-    }
-    
-void CCreatorScriptElement::SetContentL(const TDesC& aContent)
-    {
-    if( iContent )
-        {
-        delete iContent;
-        iContent = 0;
-        }    
-    iContent = HBufC::NewL(aContent.Length());
-    iContent->Des() = aContent;
-    }
-
-void CCreatorScriptElement::AppendContentL(const TDesC& aContent)
-    {
-    if( iContent == 0 )
-        {
-        SetContentL(aContent);
-        return;
-        }
-            
-    iContent = iContent->ReAllocL(iContent->Length() + aContent.Length() );
-    
-    TPtr ptr(iContent->Des());
-    ptr += aContent;
-    }
-
-TPtrC CCreatorScriptElement::Context() const
-    {
-    if( iContext )
-        return iContext->Des();
-    return TPtrC();
-    }
-    
-void CCreatorScriptElement::SetContextL(const TDesC& aContext)
-    {
-    if( iContext )
-        {
-        delete iContext;
-        iContext = 0;
-        }    
-    iContext = HBufC::NewL(aContext.Length());
-    iContext->Des() = aContext;
-    }
-
-const CCreatorScriptAttribute* CCreatorScriptElement::FindAttributeByName(const TDesC& aName) const
-    {
-    for( TInt i = 0; i < iAttributes.Count(); ++i )
-        {
-        CCreatorScriptAttribute* attr = iAttributes[i];
-        if( attr->Name() == aName )
-            {
-            return attr;
-            }
-        }
-    return 0;
-    }
-
-CCreatorScriptAttribute* CCreatorScriptElement::FindAttributeByName(const TDesC& aName)
-    {    
-    for( TInt i = 0; i < iAttributes.Count(); ++i )
-        {
-        CCreatorScriptAttribute* attr = iAttributes[i];
-        if( attr->Name() == aName )
-            {
-            return attr;
-            }
-        }
-    return 0;
-    }
-
-TBool CCreatorScriptElement::IsCacheNeeded()
-    {
-    _LIT(KIDAttrName, "id");
-    const CCreatorScriptAttribute* attr = FindAttributeByName(KIDAttrName);
-    return attr != 0;
-    }
-
-void CCreatorScriptElement::AddToCacheL(CCreatorScriptElementCache& aCache)
-    {
-    aCache.AddElementL(this);
-    }
-
-RPointerArray<CCreatorModuleBaseParameters>& CCreatorScriptElement::CommandParameters()
-    {
-    return iParameters;
-    }
-
-const RPointerArray<CCreatorModuleBaseParameters>& CCreatorScriptElement::CommandParameters() const
-    {
-    return iParameters;
-    }
-
-void CCreatorScriptElement::AddToCacheL()
-    {    
-    }
-
-TBool CCreatorScriptElement::IsCommandElement() const
-    {
-    return iIsCommandElement;
-    }
-
-void CCreatorScriptElement::ExecuteCommandL()
-    {
-    
-    }
-   
-TBool CCreatorScriptElement::IsRoot() const
-    {
-    _LIT(KRootName, "creatorscript");
-    if(iName->Des() == KRootName)
-        return ETrue;
-    return EFalse;
-    }
-
-CCreatorScriptElement::CCreatorScriptElement(CCreatorEngine* aEngine)
-: 
-iIsCommandElement(EFalse),
-iIsRoot(EFalse),
-iEngine(aEngine)
-    {}
-    
-void CCreatorScriptElement::ConstructL(const TDesC& aName, const TDesC& aContext)
-    {
-    SetNameL(aName);
-    SetContextL(aContext);
-    }
-    
-TBool CCreatorScriptElement::IsSubElementSupported(const CCreatorScriptElement& /*aElem*/) const
-    {
-    return ETrue;
-    }
-
-TBool CCreatorScriptElement::ConvertStrToBooleanL(const TDesC& aStr) const
-    {
-    TBool boolVal = EFalse;
-    _LIT(KYes, "yes");
-    _LIT(KTrue, "true");
-    if( CompareIgnoreCase(aStr, KYes) == 0 ||
-        CompareIgnoreCase(aStr, KTrue) == 0 )
-        {
-        boolVal = ETrue;
-        }    
-    return boolVal;
-    }
-
-TInt CCreatorScriptElement::ConvertStrToIntL(const TDesC& aStr) const
-    {
-    TInt intVal = 0;
-    TLex lex(aStr);
-    TInt errorCode=lex.Val(intVal);
-    User::LeaveIfError(errorCode);
-    return intVal;
-    }
-
-TUint CCreatorScriptElement::ConvertStrToUintL(const TDesC& aStr) const
-	{
-	TUint uintVal = 0;
-	TLex lex(aStr);
-	TInt errorCode=lex.Val(uintVal);
-	User::LeaveIfError(errorCode);
-	return uintVal;
-	}
-void CCreatorScriptElement::ConvertStrToReal64L(const TDesC& aStr, TReal64& aVal) const
-    {    
-    TLex lex(aStr);
-    TInt errorCode=lex.Val(aVal);
-    User::LeaveIfError(errorCode);    
-    }
-
-void CCreatorScriptElement::ConvertStrToReal32L(const TDesC& aStr, TReal32& aVal) const
-    {    
-    TLex lex(aStr);
-    TInt errorCode=lex.Val(aVal);
-    User::LeaveIfError(errorCode);    
-    }
-
-MCreatorRandomDataField::TRandomLengthType CCreatorScriptElement::ResolveRandomDataTypeL(const CCreatorScriptAttribute& aAttr, TInt& aRandomLen) const
-    {    
-    TPtrC attrVal = aAttr.Value();
-    if(attrVal == KMax )
-        return MCreatorRandomDataField::ERandomLengthMax;
-    if(attrVal == KDefault)
-        return MCreatorRandomDataField::ERandomLengthDefault;
-    
-    // Let's see if the value is numeric:
-    TInt val = 0;
-    TLex lex(attrVal);
-    TInt errorCode=lex.Val(val);
-    if( errorCode == KErrNone )   
-        {
-        aRandomLen = val;
-        return MCreatorRandomDataField::ERandomLengthExplicit;
-        }
-    return MCreatorRandomDataField::ERandomLengthUndefined;
-    }
-
-void CCreatorScriptElement::AppendContactSetReferenceL(
-        const CCreatorScriptElement& aContactSetRefElem, 
-        RArray<TLinkIdParam>& aLinkArray ) const
-        {
-        const TDesC& eName = aContactSetRefElem.Name();
-        if( eName != KContactSetRef )
-            return;
-        
-        const CCreatorScriptAttribute* linkIdAttr = aContactSetRefElem.FindAttributeByName(KId);
-        if( linkIdAttr )
-            {
-            TInt linkId = ConvertStrToIntL(linkIdAttr->Value());
-            if( linkId > 0 )
-                {
-                TLinkIdParam linkParams;
-                // Add contact-set-reference id to links
-                linkParams.iLinkId = linkId;
-                linkParams.iLinkAmount = KUndef; // undefined
-                // Resolve maxamount:
-                const CCreatorScriptAttribute* maxAmount = aContactSetRefElem.FindAttributeByName(KMaxAmount);
-                if( maxAmount )
-                    {                                
-                    TInt maxAmountVal = ConvertStrToIntL(maxAmount->Value());
-                    if( maxAmountVal > 0 )
-                        {
-                        linkParams.iLinkAmount = maxAmountVal;
-                        }
-                    }
-                aLinkArray.AppendL(linkParams);
-                }
-            }
-        }       
-
-TTime CCreatorScriptElement::ConvertToDateTimeL(const TDesC& aDtStr) const
-    {
-    _LIT(KDateFieldSeparator, "-");
-    _LIT(KTimeFieldSeparator, ":");    
-    _LIT(KDateTimeSeparator, "T");    
-    _LIT(KTimeSuffix, ".");
-    _LIT(KDateSuffix, ":");
-    // Format date-time string:
-    HBufC* formatted = HBufC::NewLC(aDtStr.Length());
-    formatted->Des().Copy(aDtStr);
-    
-    TBool hasTimePart = EFalse; 
-    TBool hasDateTimeSeparator = EFalse;
-    TInt pos = 0;
-    
-    // Date and month numbering starts from 0 in Symbian, so first
-    // we need to decrease the date and month by one. Script format is following:
-    // yyyy-mm-ddThh:mm:ss
-    // Remove also date field separators ('-')
-    while( (pos = formatted->Find(KDateFieldSeparator)) != KErrNotFound )
-        {
-        // decrease month or date by one
-        
-        // First char. Can be zero also:
-        TInt newValue = 0;
-        const TPtrC& char1 = formatted->Des().Mid(pos+1).Left(1);
-        newValue = 10 * ConvertStrToIntL(char1);
-        // Next char:
-        const TPtrC& char2 = formatted->Des().Mid(pos+2).Left(1);
-        newValue += ConvertStrToIntL(char2);
-       
-        if( newValue > 0 )
-            {
-            --newValue;
-            }
-        
-        _LIT(KTemp, "%d");
-        HBufC* formatBuf = KTemp().AllocLC();
-        HBufC* buf = 0;
-        if( newValue < 10 )
-            buf = HBufC::NewLC(1);            
-        else
-            buf = HBufC::NewLC(2);
-                        
-        TPtr temp(buf->Des());
-        temp.Format(*formatBuf, newValue);
-        if( newValue < 10 )
-            {
-            formatted->Des()[pos+1] = TChar('0');
-            formatted->Des()[pos+2] = buf->Des()[0];
-            }
-        else
-            {
-            formatted->Des()[pos+1] = buf->Des()[0];
-            formatted->Des()[pos+2] = buf->Des()[1];
-            }
-        // Finally, delete the '-' separator:
-        formatted->Des().Delete(pos, 1);        
-        CleanupStack::PopAndDestroy(2);
-        }
-    
-    while( (pos = formatted->Find(KTimeFieldSeparator)) != KErrNotFound )
-        {
-        formatted->Des().Delete(pos, 1);
-        hasTimePart = ETrue;
-        }
-    
-    // Replace 'T' with ':':
-    if( (pos = formatted->Find(KDateTimeSeparator)) != KErrNotFound )
-        {
-        formatted->Des().Replace(pos, 1, KDateSuffix);
-        hasDateTimeSeparator = ETrue;
-        }
-    
-    if( hasTimePart )
-        formatted->Des().Append(KTimeSuffix);
-    else if( !hasDateTimeSeparator )
-        formatted->Des().Append(KDateSuffix);
-    
-    
-    TTime ret;
-    ret.Set(*formatted);    
-    CleanupStack::PopAndDestroy(); // formatted
-    return ret;
-    }
-
-TInt CCreatorScriptElement::CompareIgnoreCase(const TDesC& aStr1, const TDesC& aStr2 ) const
-    {
-    // Get default collation method:
-    TCollationMethod defaultCollationMethod = *Mem::CollationMethodByIndex(0); 
-    
-    // Add ignore case flag:
-    defaultCollationMethod.iFlags |= TCollationMethod::EFoldCase;
-    
-    return aStr1.CompareF(aStr2);
-    }
-
-void CCreatorScriptElement::SetContentToTextParamL(HBufC*& aPtr, const TDesC& aContent )
-    {
-    delete aPtr;
-    aPtr = 0;
-    aPtr = HBufC::NewL(aContent.Length());
-    aPtr->Des().Copy(aContent);
-    }
-
-/**
- * Increases phonenumber by aDelta.
- */
-void CCreatorScriptElement::IncreasePhoneNumL( const TDesC& aOriginal, TInt aDelta, HBufC* aIncreased ) const
-    {
-    LOGSTRING("Creator: CCreatorMessageElement::IncreasePhoneNumL");
-    __ASSERT_ALWAYS( aDelta >= 0, User::Panic( _L("IncreasePhoneNumL"), KErrArgument ) );
-    
-    // special cases, that are handled:
-    // +9          -> +9, +10, +11...
-    // +3584098#99 -> +3584098#99, +3584098#100, +3584098#101...
-    // #           -> #0, #1, #2...
-    // 123#        -> 123#0, 123#1, 123#2... 
-    // 099         -> 099, 100, 101...
-    
-    // find out if there are any special characters, like # p or *, in the original number
-    TInt startIndex( aOriginal.Length() -1 );
-    while ( startIndex >= 0 && 
-            aOriginal[startIndex] >= '0' &&
-            aOriginal[startIndex] <= '9' )
-        {
-        startIndex--;
-        }
-    startIndex++;
-    
-    // append original head that may contain any non number characters 
-    aIncreased->Des().Append( aOriginal.Left( startIndex ) );
-    
-    TBuf<CTelephony::KMaxTelNumberSize> tailBuf;
-    if ( aOriginal.Length() > startIndex )
-        {
-        tailBuf.Copy( aOriginal.Right( aOriginal.Length() -startIndex ) );
-        }
-    
-    // parse the tail part of the original number
-    TInt64 intVal = 0;
-    if ( aOriginal.Length() > startIndex )
-        {
-        TLex lex( tailBuf );
-        User::LeaveIfError( lex.Val( intVal ) ); // this loses leading zeros
-        }
-    
-    // increase
-    intVal += aDelta;
-    
-    // restore leading zeros to tail, if any
-    TBuf<CTelephony::KMaxTelNumberSize> resultTailNoZeros;
-    resultTailNoZeros.AppendNum( intVal );
-    TInt tailLeadingZerosToRestore = tailBuf.Length() - resultTailNoZeros.Length();
-    for ( TInt i = 0; i < tailLeadingZerosToRestore; i++ )
-        {
-        aIncreased->Des().AppendNum( 0 );
-        }
-
-    // and finally, append the increased value as tail part of the result
-    aIncreased->Des().Append( resultTailNoZeros );    
-    }
-
-CCreatorScriptRoot* CCreatorScriptRoot::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    CCreatorScriptRoot* self = new (ELeave) CCreatorScriptRoot(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorScriptRoot::CCreatorScriptRoot(CCreatorEngine* aEngine)
-:
-CCreatorScriptElement(aEngine)
-    {
-    iIsRoot=ETrue;
-    }
-
-
-CCreatorCalendarElementBase* CCreatorCalendarElementBase::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    CCreatorCalendarElementBase* self = new (ELeave) CCreatorCalendarElementBase(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorCalendarElementBase::CCreatorCalendarElementBase(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    { }
-
-CCreatorMessageElementBase* CCreatorMessageElementBase::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
-    {
-    CCreatorMessageElementBase* self = new (ELeave) CCreatorMessageElementBase(aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aName, aContext);
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorMessageElementBase::CCreatorMessageElementBase(CCreatorEngine* aEngine) 
-: 
-CCreatorScriptElement(aEngine)
-    { }
--- a/creator/engine/src/creator_scriptelementfactory.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +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 "creator_traces.h"
-#include "creator_scriptelementfactory.h"
-#include "creator_contactelement.h"
-#include "creator_calendarelement.h"
-#include "creator_messageelement.h"
-#include "creator_fileelement.h"
-//#include "creator_browserelement.h"
-#include "creator_logelement.h"
-//#include "creator_noteelement.h"
-//#include "creator_impselement.h"
-#include "creator_landmarkelement.h"
-#include "creator_mailboxelement.h"
-//#include "creator_connectionmethodelement.h"
-
-CCreatorScriptElement* TCreatorScriptElementFactory::CreateElementL(CCreatorEngine* aEngine, const TDesC& aElementName, const TDesC& aContext )
-    {   
-    LOGSTRING2("TCreatorScriptElementFactory::CreateElementL: %S", &aElementName);
-    
-    if( aContext.Length() >= KFields().Length() && 
-    	aContext.Right(KFields().Length()) == KFields)
-    	{
-    	// This is a field element under 'fields'.
-    	return CCreatorScriptElement::NewL(aEngine, aElementName, aContext);
-    	}    
-    else if( aElementName == creatorcontact::KContact )
-        {
-        return CCreatorContactElement::NewL(aEngine, aElementName, aContext);  
-        }
-    else if( aElementName == creatorcontact::KContactSet)
-        {
-        return CCreatorContactSetElement::NewL(aEngine, aElementName, aContext);
-        }
-    else if( aElementName == creatorcontact::KContactGroup )
-        {
-        return CCreatorContactGroupElement::NewL(aEngine, aElementName, aContext);
-        }
-    else if( aElementName == KFields)
-        {
-        return CCreatorScriptElement::NewL(aEngine, aElementName, aContext);
-        }
-    else if( aElementName == KScript )
-        {
-        return CCreatorScriptRoot::NewL(aEngine, aElementName, aContext);
-        }
-    else if( aElementName == creatorcalendar::KCalendar )
-        {
-        return CCreatorCalendarElement::NewL(aEngine, aElementName, aContext);
-        }
-    else if( aElementName == creatormsg::KMessage )
-        {
-        return CCreatorMessageElement::NewL(aEngine, aElementName, aContext);
-        }
-    else if( aElementName == creatorfile::KFile )
-        {
-        return CCreatorFileElement::NewL(aEngine, aElementName, aContext);
-        }
-    /*
-    else if( aElementName == creatorbrowser::KBookmark ||
-            aElementName == creatorbrowser::KBookmarkFolder ||
-            aElementName == creatorbrowser::KSavedPage ||
-            aElementName == creatorbrowser::KSavedPageFolder )
-        {
-        return CCreatorBrowserElement::NewL(aEngine, aElementName, aContext);
-        }
-    */
-    else if( aElementName == creatorlog::KLog )
-        {
-        return CCreatorLogElement::NewL(aEngine, aElementName, aContext);
-        }
-/*
-    else if( aElementName == creatornote::KNote )
-        {
-        return CCreatorNoteElement::NewL(aEngine, aElementName, aContext);
-        }
-*/
-/*
-	#ifdef __PRESENCE
-    else if( aElementName == creatorimps::KImpsServer )
-        {
-        return CCreatorImpsServerElement::NewL(aEngine, aElementName, aContext);
-        }
-	#endif // __PRESENCE
-*/
-    else if( aElementName == creatorlandmark::KLandmark )
-        {
-        return CCreatorLandmarkElement::NewL(aEngine, aElementName, aContext);
-        }
-    else if( aElementName == creatormailbox::Kmailbox )
-        {
-        return CCreatorMailboxElement::NewL(aEngine, aElementName, aContext);
-        }
-/*    
-    else if( aElementName == creatorconnectionmethod::KCm )
-    	{
-    	return CCreatorConnectionMethodElement::NewL(aEngine, aElementName, aContext);
-    	}
-*/    	
-    else
-        {
-        return CCreatorScriptElement::NewL(aEngine, aElementName, aContext);
-        }       
-    }
--- a/creator/engine/src/creator_scriptentry.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,682 +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 <aknlists.h> 
-#include <AknsSkinInstance.h>
-#include <data_caging_path_literals.hrh>
-
-#include "engine.h"
-#include "enginewrapper.h"
-#include "creator_traces.h"
-#include "creator_factory.h"
-#include "creator_scriptentry.h"
-
-
-
-const TInt KReadBufSize = 8192;
-
-// Creator random data file filter
-_LIT(KRandomDataFileFilter, "*.creatordataxml");
-
-// ---------------------------------------------------------------------------
-
-
-CCommandParser* CCommandParser::NewL(CCreatorEngine* aEngine)
-    {
-    CCommandParser* self = CCommandParser::NewLC(aEngine);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCommandParser* CCommandParser::NewLC(CCreatorEngine* aEngine)
-    {
-    CCommandParser* self = new (ELeave) CCommandParser;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCommandParser::CCommandParser()
-	{
-	}
-
-void CCommandParser::ConstructL(CCreatorEngine* aEngine)
-	{
-    LOGSTRING("Creator: CCommandParser::ConstructL");
-
-    iEngine = aEngine;
-
-    iReadBuf = HBufC8::NewL(KReadBufSize);
-	}
-
-CCommandParser::~CCommandParser()
-	{
-    LOGSTRING("Creator: CCommandParser::~CCommandParser");
-
-    if (iSearchArray){
-        delete iSearchArray;
-        iSearchArray = NULL;
-    }
-
-    if (iReadBuf)
-        delete iReadBuf;
-	}
-
-// ---------------------------------------------------------------------------
-
-void CCommandParser::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
-    {
-    User::LeaveIfNull(iSearchArray);
-    
-    if( aUserData == EGetingScript )
-        {
-        if(aPositiveAction)
-            {
-            iObserver->ScriptChosenL( ETrue, iSearchArray->MdcaPoint(iSelectedItem) );
-            }
-        else
-            {
-            iObserver->ScriptChosenL( EFalse );
-            }
-        }
-    else if( aUserData == EGetingRandomDataFile && iSearchArray->Count() )
-        {
-        if(aPositiveAction)
-            {
-            TFileName fileName;
-            if (iSelectedItem == (iSearchArray->Count() - 1))
-                {
-                // "default" (resource file) selected
-                fileName.Copy(KNullDesC);
-                }
-            else
-                {
-                // xml file selected
-                fileName.Copy(iSearchArray->MdcaPoint(iSelectedItem));
-                }
-            iObserver->RandomDataFileChosenL( ETrue, fileName );
-            }
-        else
-            {
-            iObserver->RandomDataFileChosenL( EFalse );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//#if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
-void CCommandParser::OpenScriptL() {}
-TBool CCommandParser::OpenScriptL(MCommandParserObserver* aObserver)
-    {    
-    LOGSTRING("Creator: CCommandParser::OpenScriptL");
-    
-    User::LeaveIfNull( aObserver );
-    iObserver = aObserver;
-    iSelectedItem = 0;
-    
-    TBool ret = EFalse;
-
-    // init the search array
-    delete iSearchArray;
-    iSearchArray = NULL;
-    iSearchArray = new(ELeave) CDesCArrayFlat(20);
-
-    // wait dialog
-	// TODO
-    //CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
-    //waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
-    //TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Searching"));
-
-
-    // search all the .creator files from the phone
-    TInt err;
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\")));
-
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\system\\apps\\Creator\\")));
-
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\data\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\data\\")));
-    
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\documents\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\documents\\")));
-
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\creator\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\creator\\")));
-    
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\scripts\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\scripts\\")));
-    
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\temp\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\temp\\")));
-    
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\system\\temp\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\system\\temp\\")));
-
-    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\private\\20011383\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\private\\20011383\\")));
-
-    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\private\\1000484b\\")));
-
-
-    // remove the wait dialog
-	// TODO
-    //waitDialog->CancelNoteL(dialogId);
-    //CleanupStack::PopAndDestroy(); //waitDialog;
-
-
-    if ( iSearchArray->MdcaCount() > 0)
-        {
-        // create a file name array based on the iSearchArray
-        CDesCArray* fileNameArray = new(ELeave) CDesCArrayFlat(iSearchArray->MdcaCount());
-        CleanupStack::PushL(fileNameArray);
-        
-        for (TInt i=0; i<iSearchArray->MdcaCount(); i++)
-            {
-            
-            TParse filename; // file name parser
-            filename.Set(iSearchArray->MdcaPoint(i), NULL, NULL);
-
-            if ( filename.Drive()[0] == 'e' || filename.Drive()[0] == 'E')  // MMC
-                {
-                TFileName nameMMC;
-                nameMMC.Append(filename.Name());
-                nameMMC.Append(_L("\t0"));        // MMC icon
-                fileNameArray->AppendL(nameMMC);
-                }
-            else
-                {
-                fileNameArray->AppendL(filename.Name());
-                }
-            }
-
-        ret = iEngine->GetEngineWrapper()->PopupListDialog(_L("Select script"), fileNameArray, &iSelectedItem, this, EGetingScript);
-		CleanupStack::PopAndDestroy(fileNameArray);
-        }
-    else  // no scripts found from the search paths
-        {
-        iEngine->GetEngineWrapper()->ShowNote(_L("No scripts found"));
-        delete iSearchArray;
-        iSearchArray = NULL;
-        }
-
-    
-    return ret;
-    }
-/*
-#else
-// ---------------------------------------------------------------------------
-void CCommandParser::OpenScriptL()
-    {
-    LOGSTRING("Creator: CCommandParser::OpenScriptL");
-
-    // init the search array
-    iSearchArray = new(ELeave) CDesCArrayFlat(500);
-
-    // wait dialog
-    CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
-    waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
-    TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Searching"));
-
-
-    // search all the .creator files from the phone
-    TInt err;
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\")));
-
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\system\\apps\\Creator\\")));
-
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\data\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\data\\")));
-    
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\documents\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\documents\\")));
-
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\creator\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\creator\\")));
-    
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\scripts\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\scripts\\")));
-    
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\temp\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\temp\\")));
-    
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\system\\temp\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\system\\temp\\")));
-
-    TRAP(err, FindFiles(_L("*.creator"), _L("\\private\\101FA751\\")));
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\private\\101FA751\\")));
-
-    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\private\\1000484b\\")));
-
-
-    // remove the wait dialog
-    waitDialog->CancelNoteL(dialogId);
-    CleanupStack::PopAndDestroy(); //waitDialog;
-
-
-    if ( iSearchArray->MdcaCount() > 0)
-        {
-        // create a file name array based on the iSearchArray
-        CDesCArray* fileNameArray = new(ELeave) CDesCArrayFlat(iSearchArray->MdcaCount());
-        CleanupStack::PushL(fileNameArray);
-        
-        for (TInt i=0; i<iSearchArray->MdcaCount(); i++)
-            {
-            
-            TParse filename; // file name parser
-            filename.Set(iSearchArray->MdcaPoint(i), NULL, NULL);
-
-            if ( filename.Drive()[0] == 'e' || filename.Drive()[0] == 'E')  // MMC
-                {
-                TFileName nameMMC;
-                nameMMC.Append(filename.Name());
-                nameMMC.Append(_L("\t0"));        // MMC icon
-                fileNameArray->AppendL(nameMMC);
-                }
-            else
-                {
-                fileNameArray->AppendL(filename.Name());
-                }
-            }
-        CleanupStack::Pop(fileNameArray);
-
-
-        // create a popup list
-        CAknSinglePopupMenuStyleListBox* listBox = new(ELeave) CAknSinglePopupMenuStyleListBox;
-        CleanupStack::PushL(listBox);
-        CAknPopupList* popupList = CAknPopupList::NewL( listBox, R_AVKON_SOFTKEYS_SELECT_CANCEL, AknPopupLayouts::EMenuWindow );
-        CleanupStack::PushL(popupList);
-        popupList->SetTitleL(_L("Select script"));
-        listBox->ConstructL( popupList, EAknListBoxSelectionList|EAknListBoxLoopScrolling );
-        listBox->CreateScrollBarFrameL( ETrue );
-        listBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
-        listBox->Model()->SetItemTextArray( fileNameArray );
-        listBox->Model()->SetOwnershipType( ELbmOwnsItemArray );  // !!!
-        listBox->HandleItemAdditionL();
-
-
-        // define MMC icon 
-        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-        _LIT( KFLDMemoryCardUiBitmapFile, "z:aknmemorycardui.mbm" );
-        CAknIconArray* iconArray = new( ELeave ) CAknIconArray( 1 );
-        listBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
-
-        TParse* fp = new(ELeave) TParse();
-        fp->Set(KFLDMemoryCardUiBitmapFile, &KDC_APP_BITMAP_DIR, NULL);
-        TFileName resourceFileName( fp->FullName() );
-        delete fp;
-
-        CGulIcon* icon = AknsUtils::CreateGulIconL( skin, KAknsIIDQgnIndiMmcAdd,
-            resourceFileName,
-            EMbmAknmemorycarduiQgn_indi_mmc_add,
-            EMbmAknmemorycarduiQgn_indi_mmc_add_mask );
-        CleanupStack::PushL( icon );
-        iconArray->AppendL( icon );
-        CleanupStack::Pop( icon );
-
-
-        // execute dialog
-        TBool result = popupList->ExecuteLD();
-        CleanupStack::Pop();  // popupList
-
-        if ( result ) 
-            {
-            // open the file for reading
-            RFile file;
-            User::LeaveIfError(file.Open(CEikonEnv::Static()->FsSession(), iSearchArray->MdcaPoint(listBox->CurrentItemIndex()), EFileRead));
-            while (ReadLineFromFileL(file) == KErrNone)
-                {
-                iReadBuf->Des().Trim();  // delete leading and trailing white space
-
-                if (iReadBuf->Length() < 5)  // command too short, ignoring...
-                    {
-                    //CEikonEnv::Static()->InfoMsg(_L("Corrupted line"));
-                    }
-        
-                // check it's a valid line: first char is A-Z and the line ends to ';'
-                else if (iReadBuf->Des()[0] >= 'A' && iReadBuf->Des()[0] <= 'Z' && iReadBuf->Des()[iReadBuf->Length()-1] == ';')
-                    {
-                    // this line is valid -> parse the command
-                    ParseCommandFromDescriptorL();
-                    }
-                else
-                    {
-                    //CEikonEnv::Static()->InfoMsg(_L("Not a valid line"));
-                    }
-
-                }
-
-            file.Close();
-
-            // show a note if there were no valid commands in the script
-            if (iEngine->CommandArrayCount() == 0)
-                {
-                CAknInformationNote* note = new(ELeave) CAknInformationNote;
-                note->ExecuteLD(_L("No valid commands in this script"));
-                }
-
-            }
-
-        CleanupStack::PopAndDestroy();  //listBox
-        }
-    
-    else  // no scripts found from the search paths
-        {
-        CAknInformationNote* note = new (ELeave) CAknInformationNote;
-        note->ExecuteLD(_L("No scripts found"));
-        }
-
-
-    delete iSearchArray;
-    iSearchArray = NULL;
-
-    }
-#endif
-*/
-
-TBool CCommandParser::GetRandomDataFilenameL(MCommandParserObserver *aObserver)
-    {    
-    LOGSTRING("Creator: CCommandParser::GetRandomDataFilenameL");
-    TBool ret = EFalse;
-
-    User::LeaveIfNull( aObserver );
-    iObserver = aObserver;
-    iSelectedItem = 0;
-
-    // init the search array
-    if (iSearchArray)
-    	{
-    	delete iSearchArray;
-    	iSearchArray = NULL;
-    	}
-    iSearchArray = new(ELeave) CDesCArrayFlat(500);
-
-	/* TODO:
-    // wait dialog
-    CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
-    waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
-    TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Searching"));
-	*/
-
-
-    // search all the creator random data files from the phone
-    TInt err;
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\")));
-
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\system\\apps\\Creator\\")));
-
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\data\\")));
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\data\\")));
-    
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\documents\\")));
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\documents\\")));
-
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\creator\\")));
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\creator\\")));
-    
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\scripts\\")));
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\scripts\\")));
-    
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\temp\\")));
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\temp\\")));
-    
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\system\\temp\\")));
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\system\\temp\\")));
-
-    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\private\\20011383\\")));
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\private\\20011383\\")));
-
-    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\private\\1000484b\\")));
-
-
-    // remove the wait dialog
-	// TODO
-    //waitDialog->CancelNoteL(dialogId);
-    //CleanupStack::PopAndDestroy(); //waitDialog;
-
-
-    if (iSearchArray->MdcaCount() > 0)
-        {
-        // create a file name array based on the iSearchArray
-        CDesCArray* fileNameArray = new(ELeave) CDesCArrayFlat(iSearchArray->MdcaCount() + 1);
-        CleanupStack::PushL(fileNameArray);
-
-        for (TInt i=0; i<iSearchArray->MdcaCount(); i++)
-            {
-            
-            TParse filename; // file name parser
-            filename.Set(iSearchArray->MdcaPoint(i), NULL, NULL);
-
-            if ( filename.Drive()[0] == 'e' || filename.Drive()[0] == 'E')  // MMC
-                {
-                TFileName nameMMC;
-                nameMMC.Append(filename.Name());
-                nameMMC.Append(_L("\t0"));        // MMC icon
-                fileNameArray->AppendL(nameMMC);
-                }
-            else
-                {
-                fileNameArray->AppendL(filename.Name());
-                }
-            }
-
-        // add "default" (resource file) to list
-        fileNameArray->AppendL(_L("Default"));
-
-		ret = iEngine->GetEngineWrapper()->PopupListDialog(_L("Select random data file"), fileNameArray, &iSelectedItem, this, EGetingRandomDataFile);
-        CleanupStack::PopAndDestroy(fileNameArray);
-        }
-    else  // no random data files found from the search paths
-        {
-        iEngine->GetEngineWrapper()->ShowNote(_L("No random data files found"));
-        delete iSearchArray;
-        iSearchArray = NULL;
-        }
-
-    return ret;
-    }
-
-TInt CCommandParser::FindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
-    {
-    return CreatorFileUtils::FindFilesRecursiveL(iSearchArray, aFileName, aPath);
-    }
-TInt CreatorFileUtils::FindFilesRecursiveL(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath)
-	{
-    TInt err = KErrNone;
-    CDirScan* scan = CDirScan::NewLC(CEikonEnv::Static()->FsSession());
-    scan->SetScanDataL(aPath, KEntryAttDir, ESortNone);
-    CDir* dirEntries = NULL;
-
-    for(;;)
-        {
-        TRAP(err, scan->NextL(dirEntries));
-        if (!dirEntries  || (err!=KErrNone))
-            break;
-
-        for (TInt i=0; i<dirEntries->Count(); i++) 
-            {
-            TFileName path(scan->FullPath());
-            path.Append((*dirEntries)[i].iName);
-            path.Append(_L("\\"));
-            FindFiles(aFileArray, aFileName, path);
-            }
-        delete(dirEntries);
-        }
-
-    CleanupStack::PopAndDestroy(scan);
-    return err;
-    }
-
-TInt CreatorFileUtils::FindFiles(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath)
-    {
-    TFindFile fileFinder(CEikonEnv::Static()->FsSession());
-    CDir* fileList; 
-    TInt err = fileFinder.FindWildByDir(aFileName, aPath, fileList);
-
-    while (err == KErrNone)
-        {
-        for (TInt i=0; i<fileList->Count(); i++)
-            {
-            TParse fullentry;
-            fullentry.Set((*fileList)[i].iName, &fileFinder.File(), NULL);
-            
-            TRAP(err, aFileArray->AppendL(fullentry.FullName())); 
-            }
-
-        delete fileList;
-        err = fileFinder.FindWild(fileList);
-        }
-    return err;
-    }
-// ---------------------------------------------------------------------------
-
-TInt CCommandParser::FindFiles(const TDesC& aFileName, const TDesC& aPath)
-    {
-    return CreatorFileUtils::FindFiles(iSearchArray, aFileName, aPath);
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CCommandParser::ReadLineFromFileL(RFile& aInputFile)
-    {
-    LOGSTRING("Creator: CCommandParser::ReadLineFromFile");
-
-	_LIT8(KImcvCRLF, "\r\n");
-
-    TInt err = KErrNone;
-
-    //  Read into the buffer
-    HBufC8* tempLine = HBufC8::NewLC(KReadBufSize);
-    TPtr8 buffer = tempLine->Des();
-
-    // clear the targer
-    iReadBuf->Des().Copy(_L(""));
-
-    //  Get the current file position
-    TInt filePos = 0;
-    aInputFile.Seek(ESeekCurrent, filePos);
-
-    //  Read the buffer
-    err = aInputFile.Read(buffer);
-
-    //end of file?
-    TInt s = buffer.Length();
-    if  ( s == 0)
-        err = KErrEof;
-
-    if  (err == KErrNone)
-        {
-        //  Copy to the lfcr and then set the file pointer to the point after that
-        TInt pos = buffer.Find(KImcvCRLF);
-        if      ( pos != -1)
-            {
-            iReadBuf->Des().Justify(buffer, pos, ELeft, ' ');
-            filePos += (pos+2);
-
-            //  Set the file pointer back to after the lfcr
-            aInputFile.Seek(ESeekStart, filePos);
-            }
-        //  Else fill the whole buffer
-        else
-            {
-            iReadBuf->Des().Copy(buffer);
-            }
-        }
-
-    CleanupStack::PopAndDestroy(); // tempLine
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCommandParser::StrParserL(HBufC*& aDestinationBuf, TUint aToken)
-    {
-    // store old position
-	iParserOldPosition = iParserPosition;
-
-    // make sure we are not reading outside of buffer
-    if (iParserPosition >= iReadBuf->Length() - 1)
-        return;
-    
-    // read until asked token
-	do
-	    {
-	    iParserPosition++;
-	    }
-	while (iReadBuf->Des()[iParserPosition] != aToken && iParserPosition < iReadBuf->Des().Length()-1);
-	
-	// calculate length of the destination buffer
-	TInt bufferLength = iParserPosition-iParserOldPosition-1;
-	
-	// reset the destination buffer
-	if (aDestinationBuf)
-	    {
-        delete aDestinationBuf;
-        aDestinationBuf = NULL;
-	    }
-
-    // allocate memory for the destination buffer
-	aDestinationBuf = HBufC::NewL(bufferLength);
-
-	// copy data from the read buffer to the destination buffer
-    aDestinationBuf->Des().Copy(iReadBuf->Des().Mid(iParserOldPosition+1, bufferLength));
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCommandParser::StrParserL(HBufC8*& aDestinationBuf, TUint aToken)
-    {
-    // store old position
-	iParserOldPosition = iParserPosition;
-
-    // make sure we are not reading outside of buffer
-    if (iParserPosition >= iReadBuf->Length() - 1)
-        return;
-    
-    // read until asked token
-	do
-	    {
-	    iParserPosition++;
-	    }
-	while (iReadBuf->Des()[iParserPosition] != aToken && iParserPosition < iReadBuf->Des().Length()-1);
-	
-	// calculate length of the destination buffer
-	TInt bufferLength = iParserPosition-iParserOldPosition-1;
-	
-	// reset the destination buffer
-	if (aDestinationBuf)
-	    {
-        delete aDestinationBuf;
-        aDestinationBuf = NULL;
-	    }
-
-    // allocate memory for the destination buffer
-	aDestinationBuf = HBufC8::NewL(bufferLength);
-
-	// copy data from the read buffer to the destination buffer
-    aDestinationBuf->Des().Copy(iReadBuf->Des().Mid(iParserOldPosition+1, bufferLength));
-    }
-
-//----------------------------------------------------------------------------
-
-void CCommandParser::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
-    {
-    }
-
-//----------------------------------------------------------------------------
-
--- a/creator/engine/src/creator_scriptparser.cpp	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-#include <f32file.h>
-#include <utf.h>
-#include <xml/documentparameters.h>
-#include "creator_scriptparser.h"
-#include "creator_scriptelementfactory.h"
-#include "creator_traces.h"
-
-using namespace Xml;
-
-CCreatorScriptParser::CCreatorScriptParser() 
-: iDefaultElement(TCreatorScriptElementInfo(TCreatorScriptElementInfo::EStatusUndefined, 0))
-    {        
-    }
-void CCreatorScriptParser::ConstructL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorScriptParser::ConstructL");
-    iEngine = aEngine;
-    }
-
-CCreatorScriptParser* CCreatorScriptParser::NewL(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorScriptParser::NewL");
-    CCreatorScriptParser* self = CCreatorScriptParser::NewLC(aEngine);    
-    CleanupStack::Pop();
-    return self;
-    }
-CCreatorScriptParser* CCreatorScriptParser::NewLC(CCreatorEngine* aEngine)
-    {
-    LOGSTRING("Creator: CCreatorScriptParser::NewLC");
-    CCreatorScriptParser* self = new (ELeave) CCreatorScriptParser;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngine);
-    return self;
-    }
-
-CCreatorScriptParser::~CCreatorScriptParser()
-    {
-    delete iParser;
-    if( iElementStack.Count() > 0 )
-        {
-        delete iElementStack[0].iElement;        
-        }
-    iElementStack.Reset();
-    iElementStack.Close();
-    }
-
-void CCreatorScriptParser::GetTextFileMode(RFile& aFile, TInt& aFileSize) 
-    { 
-    LOGSTRING("Creator: CCreatorScriptParser::GetTextFileMode");
-    iScriptTextFormat = EFormatANSIASCII; 
-
-    // if we are working with text files, check the type first   
-    TBuf8<4> BOM; 
-
-    // first check for UTF-16 
-    if (aFileSize >= 2 && aFile.Read(0, BOM, 2) == KErrNone) 
-        { 
-        if (BOM.Length()==2 && BOM[0]==0xFF && BOM[1]==0xFE) 
-            { 
-            iScriptTextFormat = EFormatUTF16LE; 
-            aFileSize -= 2; 
-            return; 
-            } 
-        else if (BOM.Length()==2 && BOM[0]==0xFE && BOM[1]==0xFF) 
-            { 
-            iScriptTextFormat = EFormatUTF16BE; 
-            aFileSize -= 2; 
-            return;                 
-            }       
-        }
-        // then check for UTF-8 
-    if (aFileSize >= 3 && aFile.Read(0, BOM, 3) == KErrNone) 
-        { 
-        if (BOM.Length()==3 && BOM[0]==0xEF && BOM[1]==0xBB && BOM[2]==0xBF) 
-            { 
-            iScriptTextFormat = EFormatUTF8; 
-            aFileSize -= 3; 
-            return; 
-            } 
-        }
-        
-    // none of those, seek back to beginning 
-    TInt pos(0); 
-    aFile.Seek(ESeekStart, pos); 
-    }    
- 
-
-
-void CCreatorScriptParser::ParseL(const TDesC& aFileName)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::ParseL: %S", &aFileName);
-    // Create and start XML-parser
-    if( iParser == 0)
-        {
-        _LIT8(KXmlMimeType, "text/xml");
-        iParser = CParser::NewL(KXmlMimeType, *this);        
-        }
-
-    RFs filesession;
-    CleanupClosePushL(filesession);
-    User::LeaveIfError( filesession.Connect() );
-    Xml::ParseL(*iParser, filesession, aFileName);
-    
-    CleanupStack::PopAndDestroy(&filesession); // filesession    
-    }
-
-void CCreatorScriptParser::ParseL(RFile& aFile)
-    {
-    LOGSTRING("Creator: CCreatorScriptParser::ParseL");
-    TInt filesize = 0;
-    aFile.Size(filesize);
-    GetTextFileMode(aFile, filesize);
-    // Create and start XML-parser    
-    if( iParser == 0)
-        {
-        _LIT8(KXmlMimeType, "text/xml");
-        iParser = CParser::NewL(KXmlMimeType, *this);        
-        }
-    Xml::ParseL(*iParser, aFile);
-    }
-
-void CCreatorScriptParser::OnStartDocumentL(const Xml::RDocumentParameters& aDocParam, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnStartDocumentL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);    
-    }
-
-void CCreatorScriptParser::OnEndDocumentL(TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnEndDocumentL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    iEngine->SortCommands();
-    }
-
-void CCreatorScriptParser::OnStartPrefixMappingL(   const RString& /*aPrefix*/, 
-                                                    const RString& /*aUri*/, 
-                                                    TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnStartPrefixMappingL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-
-void CCreatorScriptParser::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnEndPrefixMappingL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-void CCreatorScriptParser::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnIgnorableWhiteSpaceL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-void CCreatorScriptParser::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnSkippedEntityL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-void CCreatorScriptParser::OnProcessingInstructionL(  const TDesC8& /*aTarget*/, 
-                                    const TDesC8& /*aData*/, 
-                                    TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnProcessingInstructionL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    }
-void CCreatorScriptParser::OnError(TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnError: %d", aErrorCode);
-    
-    iLastError = aErrorCode;
-    
-    // Delete all elements from the stack:
-    while(iElementStack.Count() > 0 )
-        {
-        TCreatorScriptElementInfo previousElem = LastElementInfo();    
-        delete previousElem.iElement;
-        previousElem.iElement = 0;
-        iElementStack.Remove(iElementStack.Count()-1);
-        }
-    }
-TAny* CCreatorScriptParser::GetExtendedInterface(const TInt32 aUid)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::GetExtendedInterface (UID: %d)", aUid);
-    return this;
-    }
-
-const TCreatorScriptElementInfo& CCreatorScriptParser::LastElementInfo() const
-{
-    LOGSTRING("Creator: CCreatorScriptParser::LastElementInfo");
-    if(iElementStack.Count() > 0)
-        {
-        return iElementStack[iElementStack.Count()-1];
-        }
-    return iDefaultElement;
-}
-
-/**
- * Create an element and add attributes to it.
- */
-void CCreatorScriptParser::OnStartElementL(  const RTagInfo& aElement,
-                                            const RAttributeArray& aAttributes,
-                                            TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnStartElementL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    const TDesC8& elementName8 = aElement.LocalName().DesC();        
-    HBufC* elementName16 = Convert8BitTo16BitLC(elementName8);
-        
-    const TCreatorScriptElementInfo& context = LastElementInfo();
-    
-    CCreatorScriptElement* element = 0;
-    if( context.iElement )
-        {
-        HBufC* fullContext = HBufC::NewL(
-                context.iElement->Context().Length() + 
-                context.iElement->Name().Length() + 
-                2);        
-        CleanupStack::PushL(fullContext);
-        if(context.iElement->Context() != KNullDesC && 
-           context.iElement->Context().Length() > 0 )
-            {
-            fullContext->Des().Copy(context.iElement->Context());
-            _LIT(KContextSeparator, "::");
-            fullContext->Des().Append(TPtrC(KContextSeparator));
-            }
-        const TDesC& parentName = context.iElement->Name();
-        if(parentName.Length() > 0 )
-            {            
-            fullContext->Des().Append(parentName);
-            }
-        element = TCreatorScriptElementFactory::CreateElementL( iEngine,
-                                                                elementName16->Des(), 
-                                                                fullContext->Des());
-        CleanupStack::PopAndDestroy(fullContext); // fullContext        
-        }
-    else
-        {
-        element = TCreatorScriptElementFactory::CreateElementL(iEngine, elementName16->Des());        
-        }
-        
-    CleanupStack::PopAndDestroy(elementName16);
-    CleanupStack::PushL(element);
-    
-    if( element == 0 )
-        {
-        // Add NULL pointer to stack. Otherwise the stack would go out of sync. in ::OnEndElement().
-        TCreatorScriptElementInfo info(TCreatorScriptElementInfo::EStatusParsing, element);
-        iElementStack.AppendL(info);   
-        CleanupStack::Pop(element);
-        return;        
-        }
-        
-    // Add attributes to the element:
-    TInt attrCount = aAttributes.Count();
-    for(TInt i = 0; i < attrCount; ++i)
-        {
-        const RAttribute& attribute = aAttributes[i];
-        const RTagInfo& nameInfo = attribute.Attribute();
-        const TDesC8& attrName8 = nameInfo.LocalName().DesC();
-        const TDesC8& value8 = attribute.Value().DesC();
-        // Convert data to 16 bit:
-        HBufC* attrName16 = Convert8BitTo16BitLC(attrName8);
-        HBufC* value16 = Convert8BitTo16BitLC(value8);
-        CCreatorScriptAttribute* scriptAttr = CCreatorScriptAttribute::NewLC(attrName16->Des(), value16->Des());
-        element->AddAttributeL(scriptAttr);
-        CleanupStack::Pop(scriptAttr);
-        CleanupStack::PopAndDestroy(value16);
-        CleanupStack::PopAndDestroy(attrName16);
-        }
-    
-    // Save element to the stack:
-    TCreatorScriptElementInfo info(TCreatorScriptElementInfo::EStatusParsing, element);
-    iElementStack.AppendL(info);
-    CleanupStack::Pop(element);
-    }
-
-/**
- * Executes the command if needed. Also caches the element for future use, if needed.
- */
-void CCreatorScriptParser::OnEndElementL(const RTagInfo& /*aElement*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnEndElementL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-     
-    if( iElementStack.Count() == 0 )
-        {
-        return;
-        }
-    // Get element from the stack:    
-    TCreatorScriptElementInfo elementInfo = LastElementInfo();
-    
-    if( elementInfo.iElement == 0 )
-        {
-        // Remove element from the stack:        
-        iElementStack.Remove(iElementStack.Count()-1);
-        return;
-        }
-        
-    // Execute the command if this is a command element:
-    if( elementInfo.iElement->IsCommandElement() )
-        {
-        elementInfo.iElement->ExecuteCommandL();
-        }
-    
-    // Remove element from the stack:
-    iElementStack.Remove(iElementStack.Count()-1);
-    
-    // Get the previous element from the stack:
-    if( iElementStack.Count() > 0 )
-        {
-        TCreatorScriptElementInfo previousElem = LastElementInfo();
-        
-        if( previousElem.iElement->IsRoot() )
-            {
-            // This element is not a sub-element (except of the root element, of course).        
-            if( elementInfo.iElement->IsCacheNeeded() )
-                {
-                // Add element to the cache, since it will be needed in future.            
-                elementInfo.iElement->AddToCacheL();
-                }
-            //else
-            //    {
-                // Not needed anymore, so element can be deleted:
-                delete elementInfo.iElement;
-                elementInfo.iElement = 0;
-           //     }
-            }
-        else
-            {
-            // There is a parent element (other than root), so we add this element
-            // as a sub-element fot it.
-            previousElem.iElement->AddSubElementL(elementInfo.iElement);
-            }
-        }
-    else
-        {
-        // Delete root element, which will delete recursively all sub-elements:
-        delete elementInfo.iElement;
-        elementInfo.iElement = 0;
-        }
-    }
-
-/**
- * Add content to element.
- */
-void CCreatorScriptParser::OnContentL(const TDesC8& aBytes, TInt aErrorCode)
-    {
-    LOGSTRING2("Creator: CCreatorScriptParser::OnContentL (Error code: %d)", aErrorCode);
-    User::LeaveIfError(aErrorCode);
-    if( iElementStack.Count() > 0 )
-        {
-        HBufC* contentData = Convert8BitTo16BitLC(aBytes);
-        TCreatorScriptElementInfo elementInfo = iElementStack[iElementStack.Count()-1];
-        if( elementInfo.iElement )
-            {
-            elementInfo.iElement->AppendContentL(*contentData);
-            }
-        CleanupStack::PopAndDestroy(contentData);
-        }
-    }
-
-HBufC16* CCreatorScriptParser::Convert8BitTo16BitLC(const TDesC8& aInput) 
-    {     
-    LOGSTRING("Creator: CCreatorScriptParser::Convert8BitTo16BitLC");
-    HBufC16* output = NULL;
-    
-    output = CnvUtfConverter::ConvertToUnicodeFromUtf8L(aInput);
-    
-    CleanupStack::PushL(output);
-    return output;          
-    } 
-
-TInt CCreatorScriptParser::GetError() const 
-{
-    return iLastError;
-}
--- a/creator/engine/src/creator_wepsecuritysettings.cpp	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-#include "creator_traces.h"
-#include "creator_wepsecuritysettings.h"
-#include <commdb.h>
-//#include <featmgr.h>
-#include <WlanCdbCols.h>
-
-//#include <commsdattypesv1_1.h>
-//#include <cmmanagertablefields.h>
-//#include <wlancontainer.h>
-
-
-
-//----------------------------------------------------------------------------
-
-CCreatorWEPSecuritySettings* CCreatorWEPSecuritySettings::NewL()
-    {
-    CCreatorWEPSecuritySettings* self = CCreatorWEPSecuritySettings::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CCreatorWEPSecuritySettings* CCreatorWEPSecuritySettings::NewLC()
-    {
-    CCreatorWEPSecuritySettings* self = new (ELeave) CCreatorWEPSecuritySettings;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-CCreatorWEPSecuritySettings::CCreatorWEPSecuritySettings()
-    {
-    }
-
-void CCreatorWEPSecuritySettings::ConstructL()
-    {
-    LOGSTRING("Creator: CCreatorWEPSecuritySettings::ConstructL");
-    }
-
-CCreatorWEPSecuritySettings::~CCreatorWEPSecuritySettings()
-    {
-    LOGSTRING("Creator: CCreatorWEPSecuritySettings::~CCreatorWEPSecuritySettings");
-
-    
-    }
-
-    
-
-//----------------------------------------------------------------------------
-
-
-
-// ---------------------------------------------------------
-// CWEPSecuritySettingsImpl::SaveL
-// ---------------------------------------------------------
-//
-void CCreatorWEPSecuritySettings::SaveL( TUint32 /*aIapId*/, 
-                                      CCommsDatabase& /*aCommsDb*/ ) const
-    {
-    /*
-    // Data of the key
-    TBuf8<KMaxLengthOfKeyData> iKeyData[KMaxNumberofKeys];    
-    
-    CCommsDbTableView* wLanServiceTable;
-
-    // Caller MUST initiate a transaction, WE WILL NOT.
-
-    wLanServiceTable = aCommsDb.OpenViewMatchingUintLC( 
-                    TPtrC( WLAN_SERVICE ), TPtrC( WLAN_SERVICE_ID ), aIapId );
-    TInt errorCode = wLanServiceTable->GotoFirstRecord();
-
-    if ( errorCode == KErrNone )
-        {
-        wLanServiceTable->UpdateRecord();
-        }
-    else
-        {
-        TUint32 dummyUid( 0 ); //was KUidNone
-        User::LeaveIfError( wLanServiceTable->InsertRecord( dummyUid ) );
-
-        // Save link to LAN service
-        wLanServiceTable->WriteUintL( TPtrC( WLAN_SERVICE_ID ), aIapId );
-        }
-
-    // Save index of key in use
-    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_INDEX ), 
-                                 ( TUint32& ) iKeyInUse );
-
-    // Save index of key in use
-    wLanServiceTable->WriteUintL( TPtrC( NU_WLAN_AUTHENTICATION_MODE ), 
-                                 ( TUint32& ) iAuthentication );
-
-    // Save first WEP key
-    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY1 ), 
-                                  iKeyData[KFirstKey] );
-
-    // Save second WEP key
-    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY2 ), 
-                                  iKeyData[KSecondKey] );
-
-    // Save third WEP key
-    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY3 ), 
-                                  iKeyData[KThirdKey] );
-
-    // Save fourth WEP key
-    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY4 ), 
-                                  iKeyData[KFourthKey] );
-
-    // Save the format of the keys
-    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY1_FORMAT ), 
-                                 ( TUint32& ) iKeyFormat[KFirstKey] );
-
-    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY2_FORMAT ), 
-                                 ( TUint32& ) iKeyFormat[KSecondKey] );
-
-    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY3_FORMAT ), 
-                                 ( TUint32& ) iKeyFormat[KThirdKey] );
-
-    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY4_FORMAT ), 
-                                 ( TUint32& ) iKeyFormat[KFourthKey] );
-
-    wLanServiceTable->PutRecordChanges();
-
-    CleanupStack::PopAndDestroy( wLanServiceTable );  // wLanServiceTable
-    */
-    }
-
Binary file creator/files/3GPP-70kB.dat has changed
Binary file creator/files/AAC-100kB.dat has changed
Binary file creator/files/AMR-20kB.dat has changed
Binary file creator/files/BMP-25kB.dat has changed
Binary file creator/files/DOC-20kB.dat has changed
Binary file creator/files/Deck-1kB.dat has changed
Binary file creator/files/GIF-2kB.dat has changed
--- a/creator/files/HTML-20kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,378 +0,0 @@
-<html>
-<header>
-<title>My HTML page</title>
-<header>
-<body>
-<H1>My HTML page</H1>
-
-<li>item 1</li>
-<li>item 2</li>
-<li>item 3</li>
-<li>item 4</li>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-
-</p><p>
-
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-<p>
-                      COPYRIGHT LICENSE
-</p><p>
-      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
-      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
-</p><p>
-This Software Agreement ("Agreement") is between You (either an
-individual or an entity), the End User, and Nokia Corporation
-("Nokia"). The Agreement authorizes You to use the Software specified
-in Clause 1 below, which may be stored on a CD-ROM, sent to You by
-electronic mail, or downloaded from Nokia's Web pages or Servers or
-from other sources under the terms and conditions set forth below.
-This is an agreement on end-user rights and not an agreement for sale.
-Nokia continues to own the copy of the Software and the physical media
-contained in the sales package and any other copy that You are
-authorized to make pursuant to this Agreement.
-
-Read this Agreement carefully before installing, downloading, or using
-the Software. By clicking on the "I Accept" button while installing,
-downloading, and/or using the Software, You agree to the terms and
-conditions of this Agreement. If You do not agree to all of the terms
-and conditions of this Agreement, promptly click the "Decline" or
-"I Do Not Accept" button, cancel the installation or downloading, or
-destroy or return the Software and accompanying documentation to
-Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
-HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS.
-
-</p>
-
-
-</body>
-</html>
\ No newline at end of file
--- a/creator/files/JAD-1kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-MIDlet-1: HelloWorld, , helloworld.HelloWorld
-MIDlet-Icon: \HelloWorld.png
-MIDlet-Jar-Size: 6817
-MIDlet-Jar-URL: HelloWorld.jar
-MIDlet-Name: HelloWorld
-MIDlet-Vendor: My Vendor
-MIDlet-Version: 1.0
Binary file creator/files/JAR-10kB.dat has changed
Binary file creator/files/JP2-65kB.dat has changed
Binary file creator/files/JPEG-200kB.dat has changed
Binary file creator/files/JPEG-25kB.dat has changed
Binary file creator/files/JPEG-500kB.dat has changed
Binary file creator/files/MIDI-10kB.dat has changed
Binary file creator/files/MP3-250kB.dat has changed
Binary file creator/files/MP4-200kB.dat has changed
Binary file creator/files/MXMF-40kB.dat has changed
Binary file creator/files/PNG-15kB.dat has changed
Binary file creator/files/PPT-40kB.dat has changed
--- a/creator/files/RAM-1kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-rtsp://nokia.com
\ No newline at end of file
Binary file creator/files/RM-95kB.dat has changed
Binary file creator/files/RNG-1kB.dat has changed
Binary file creator/files/SISX-10kB.dat has changed
--- a/creator/files/SVG-15kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 88">
-  <defs
-     id="defs6909" />
-  <rect
-     id="rect7683"
-     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.12500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;stroke-dasharray:none"
-     transform="matrix(0.707097,0.707117,-0.707116,0.707097,0.000000,0.000000)"
-     y="-27.734158"
-     x="34.175232"
-     height="55.153564"
-     width="55.155079" />
-  <rect
-     id="rect10008"
-     style="fill:#ffd800;fill-opacity:0.00000000;stroke:#000000;stroke-width:1.4641515;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     transform="matrix(0.707807,0.706406,-0.707368,0.706845,0.000000,0.000000)"
-     y="-24.579279"
-     x="37.081882"
-     height="49.570164"
-     width="49.602535" />
-  <path
-     id="path13048"
-     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.6682692;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 27.031591,57.263037 L 60.609963,57.263037" />
-  <path
-     style="stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0.12965260;stroke:#000000;fill-rule:evenodd;fill-opacity:1.0000000;fill:#000000"
-     d="M 53.055235,56.214138 C 52.624696,55.783599 53.895322,55.268316 54.042996,54.677621 C 54.177132,54.141074 54.531315,54.216369 54.372250,53.580108 C 54.255651,53.113713 53.875841,52.644696 53.603991,52.372845 C 53.309600,52.078454 53.118192,51.620750 52.945484,51.275333 C 52.703517,50.791400 52.280433,50.498349 51.957723,50.068070 C 51.603941,49.596361 51.413359,49.198844 51.189464,48.751055 C 50.899300,48.170724 50.368976,47.381811 49.982201,46.995036 C 49.704954,46.717789 49.601842,45.905065 49.433445,45.568270 C 49.184790,45.070960 49.138813,44.724882 48.774938,44.361006 C 48.320481,43.906550 47.740713,44.517222 47.567675,44.690260 C 47.298191,44.959743 46.811103,45.340001 46.360411,45.678021 C 45.855798,46.056480 45.501514,46.517804 45.262898,46.995036 C 45.012812,47.495209 44.962345,48.087501 44.823894,48.641303 C 44.672748,49.245890 44.626653,49.759521 44.494640,50.287572 C 44.374994,50.766160 44.494640,51.437604 44.494640,51.933840 C 44.494640,52.473242 44.479725,53.091014 44.384889,53.470358 C 44.236156,54.065293 43.580797,53.654026 44.165387,54.238616 C 44.585434,54.658664 44.644693,54.758223 44.933645,55.336128 C 45.224512,55.917862 44.973069,56.284464 44.714142,56.543391 C 44.460419,56.797114 43.654774,56.762894 43.177626,56.762894 C 42.469818,56.762894 41.865291,56.872645 41.202104,56.872645 C 40.653348,56.872645 40.104592,56.872645 39.555835,56.872645 C 39.007079,56.872645 38.458323,56.872645 37.909567,56.872645 C 37.360811,56.872645 36.812055,56.872645 36.263299,56.872645 C 35.361025,56.872645 34.513340,56.762894 33.629270,56.762894 C 33.007346,56.762894 32.385423,56.762894 31.763499,56.762894 C 31.141575,56.762894 30.519651,56.762894 29.897729,56.762894 C 29.316629,56.762894 28.811179,56.765634 28.361211,56.653142 C 28.294677,56.636509 28.361211,54.800636 28.361211,54.677621 C 28.361211,54.122622 28.373835,53.419862 28.470963,53.031353 C 28.595884,52.531668 28.801084,52.149872 28.909968,51.714338 C 29.009519,51.316133 29.389366,50.975043 29.568474,50.616825 C 29.828283,50.097211 29.986001,49.824729 30.117231,49.299811 C 30.235460,48.826894 30.775433,48.531857 30.995240,48.312050 C 31.322699,47.984592 31.766969,47.981929 32.202504,47.873045 C 32.844620,47.712517 33.143720,48.218959 33.300016,48.531553 C 33.507317,48.946154 33.940327,49.281615 34.178026,49.519314 C 34.504402,49.845689 34.655723,50.255205 34.836533,50.616825 C 35.036987,51.017734 35.283331,51.306507 35.385290,51.714338 C 35.510174,52.213877 35.484864,52.661395 35.604792,53.141103 C 35.720800,53.605133 36.020969,53.996287 36.263299,54.238616 C 36.590757,54.566074 37.035027,54.568737 37.470562,54.677621 C 37.877196,54.779280 38.450774,54.787372 39.007079,54.787372 C 39.499561,54.787372 39.726237,54.336816 39.885089,54.019113 C 40.048252,53.692788 39.994840,52.735696 39.994840,52.372845 C 39.994840,51.764083 39.885089,51.340231 39.885089,50.836328 C 39.885089,50.227207 39.994840,49.666649 39.994840,49.080309 C 39.994840,48.594446 40.231693,47.913395 40.324094,47.543792 C 40.463214,46.987311 40.640950,46.471075 40.872850,46.007275 C 41.112138,45.528699 41.332188,45.417852 41.531357,45.019514 C 41.798584,44.485060 41.919124,44.478034 41.641109,43.922001 C 41.427678,43.495140 41.418998,43.033558 41.311854,42.604987 C 41.183697,42.092355 41.189896,41.666058 41.311854,41.178221 C 41.441133,40.661112 41.531357,40.378202 41.531357,39.751456 C 41.531357,39.357313 41.147280,38.983300 40.982601,38.653943 C 40.761616,38.211972 40.577118,38.019774 40.433845,37.446679 C 40.293896,36.886882 40.102128,36.558816 39.994840,36.129665 C 39.884579,35.688622 39.615766,35.371517 39.446084,35.032153 C 39.247021,34.634025 39.226582,34.204135 39.226582,33.605387 C 39.226582,32.945903 39.466503,32.796291 39.665587,32.398124 C 39.865488,31.998320 40.030648,31.703808 40.324094,31.410363 C 40.648346,31.086110 40.792597,30.722357 41.092353,30.422602 C 41.497139,30.017815 40.746419,29.764094 40.324094,29.764094 C 39.766471,29.764094 39.381552,29.512327 39.007079,29.325090 C 38.644368,29.143734 38.429384,28.550821 38.348572,28.227577 C 38.239216,27.790154 37.911825,27.569635 37.470562,27.459319 C 36.870536,27.309312 36.716357,27.816679 36.373050,27.130065 C 36.166333,26.716631 36.263299,26.084628 36.263299,25.593549 C 36.263299,25.032763 36.269922,24.469546 36.373050,24.057031 C 36.480019,23.629153 36.767491,23.268149 36.921806,22.959519 C 37.118553,22.566025 37.706265,22.347787 38.019318,22.191261 C 38.389122,22.006359 39.035295,22.081510 39.555835,22.081510 C 40.104592,22.081510 40.653348,22.081510 41.202104,22.081510 C 41.550777,22.081510 42.048741,22.504828 42.299615,22.630266 C 42.779900,22.870407 43.095825,22.877718 43.397128,23.179022 C 43.856580,23.638474 43.334114,23.790792 43.067875,24.057031 C 42.608660,24.516246 42.293774,24.264849 42.628870,24.935041 C 42.796868,25.271038 43.241637,25.657560 43.506879,25.922802 C 43.829866,26.245788 44.071833,26.471558 44.604392,26.471558 C 45.231133,26.471558 45.468527,26.258992 45.921406,26.032553 C 46.380507,25.803003 46.621967,25.682272 47.018918,25.483797 C 47.432354,25.277079 48.064355,25.374046 48.555436,25.374046 C 48.881562,25.374046 49.547228,25.870950 49.762698,26.032553 C 50.233060,26.385325 50.346134,26.562541 50.860211,26.691060 C 51.323258,26.806822 51.603308,27.096337 52.177225,27.239816 C 52.669260,27.362825 53.085679,27.686432 53.494239,27.788572 C 54.085273,27.936331 54.424563,27.883965 54.921006,28.008075 C 55.515417,28.156678 55.672225,28.522753 55.908767,28.995836 C 56.129829,29.437960 56.491410,29.722118 56.677025,30.093348 C 56.910943,30.561183 56.502923,30.880558 56.238021,31.410363 C 56.056374,31.773656 55.750791,32.117094 55.469761,32.398124 C 55.126451,32.741435 54.982268,33.373113 54.811255,33.715138 C 54.580847,34.175955 54.213651,34.581092 53.933245,35.141904 C 53.665425,35.677541 53.569455,36.088987 53.384489,36.458918 C 53.193251,36.841393 53.274738,37.478767 53.274738,37.995435 C 53.274738,38.355483 53.637246,38.896713 53.713742,39.202699 C 53.826257,39.652756 54.049119,39.995451 54.152747,40.409962 C 54.261646,40.845559 54.246127,41.441991 54.372250,41.946479 C 54.491897,42.425068 54.372250,43.096512 54.372250,43.592748 C 54.372250,44.221105 54.406333,44.648676 54.591752,45.019514 C 54.805887,45.447783 54.950405,45.736818 55.140508,46.117026 C 55.318283,46.472575 55.666926,46.862946 56.018518,47.214537 C 56.421894,47.617914 56.456093,48.089688 56.677025,48.531553 C 56.956851,49.091204 57.024443,49.445891 57.225781,49.848567 C 57.525499,50.448001 57.843039,50.781081 57.994040,51.385084 C 58.121209,51.893759 58.424571,52.009700 58.542796,52.482597 C 58.645326,52.892716 58.958398,53.157244 59.091552,53.689860 C 59.206608,54.150081 59.311055,54.491721 59.311055,55.116625 C 59.311055,55.745296 59.151256,56.154433 58.872050,56.433641 C 58.548620,56.757070 57.979019,56.653142 57.445283,56.653142 C 57.019297,56.653142 56.409259,56.762894 55.908767,56.762894 C 55.327666,56.762894 54.822217,56.760154 54.372250,56.872645 C 53.888809,56.993505 53.322734,56.966958 52.945484,56.872645 C 52.548865,56.773490 53.055235,56.085649 53.055235,55.665381"
-     id="path2140" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.15643996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 38.428125,47.795987 C 38.311148,47.854477 36.965297,46.068306 36.706578,45.809587 C 36.275090,45.378099 35.986619,44.957203 35.647163,44.617746 C 35.160123,44.130704 34.556573,44.434693 34.190469,44.617746 C 33.723208,44.851375 33.274878,45.075540 32.866201,45.279879 C 32.358140,45.533910 32.262581,46.015925 31.939214,46.339294 C 31.632132,46.646376 31.393272,47.331218 31.277080,47.795987 C 31.083157,48.571681 31.468244,48.972877 31.674360,49.385108 C 31.912314,49.861016 32.778380,50.223928 33.131055,50.312097 C 33.776711,50.473511 34.431575,50.444524 35.117456,50.444524 C 35.382879,50.444524 36.028034,49.885811 36.441723,49.782389 C 36.905836,49.666361 37.228511,49.190356 37.633565,48.987829 C 37.959970,48.824626 38.265273,48.203119 38.428125,47.795987 z "
-     id="path2902" />
-  <path
-     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
-     d="M 36.399595,46.098141 C 41.690234,42.288881 41.690234,42.288881 41.690234,42.288881"
-     id="path3662" />
-  <path
-     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 51.177526,33.514353 C 51.643815,33.290634 52.117036,32.810504 52.277706,32.050272 C 52.490950,31.041286 52.186388,30.532180 51.727616,30.260839 C 51.228746,29.965782 50.690078,29.935489 49.939823,29.935489 C 48.958188,29.935489 48.839642,29.898727 48.839642,31.074218 C 48.839642,31.604089 49.483749,32.272697 49.664777,32.700974 C 49.972897,33.429925 50.486789,33.514353 51.177526,33.514353 z "
-     id="path3666" />
-  <path
-     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 43.339938,38.616989 C 43.358543,38.676580 44.048989,37.735278 44.132320,37.601827 C 44.413539,37.151472 44.464358,36.937090 44.370034,36.332872 C 44.312608,35.965007 43.825038,35.713886 43.656891,35.444606 C 43.366077,34.978882 43.133760,34.623676 42.864509,34.048757 C 42.530139,33.334791 42.389080,34.076845 42.389080,34.683233 C 42.389080,35.330477 42.556959,35.728514 42.706032,36.205977 C 42.849733,36.666232 42.864509,37.134957 42.864509,37.855617 C 42.864509,38.303047 43.016630,38.409884 43.339938,38.616989 z "
-     id="path4426" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 43.635359,9.6022099 C 40.526110,12.711459 40.475138,12.762431 40.475138,12.762431 L 46.795580,12.762431 L 43.635359,9.6022099 z "
-     id="path8982" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 43.878453,78.154696 C 40.769204,75.045447 40.718232,74.994475 40.718232,74.994475 L 47.038674,74.994475 L 43.878453,78.154696 z "
-     id="path9742" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 9.4806628,43.878454 C 12.589911,46.987703 12.640883,47.038675 12.640883,47.038675 L 12.640883,40.718232 L 9.4806628,43.878454 z "
-     id="path9744" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 78.033148,43.756906 C 74.923900,46.866155 74.872928,46.917127 74.872928,46.917127 L 74.872928,40.596684 L 78.033148,43.756906 z "
-     id="path9746" />
-</svg>
Binary file creator/files/SWF-15kB.dat has changed
Binary file creator/files/TIF-25kB.dat has changed
--- a/creator/files/TXT-10kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
\ No newline at end of file
--- a/creator/files/TXT-70kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing.Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... TestiTesting... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing..ing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Te. Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
-
-
-Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... ng... .. 
\ No newline at end of file
--- a/creator/files/VCF-1kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-BEGIN:VCARD
-VERSION:2.1
-N:Smith;John
-FN:John Smith
-ORG:Firm
-TITLE:Boss
-NOTE;ENCODING=QUOTED-PRINTABLE:Liirum larum.=0D=0A
-TEL;WORK;VOICE:132456798
-TEL;HOME;VOICE:654654987
-TEL;CELL;VOICE:0400654987654
-TEL;WORK;FAX:2321654987987
-ADR;WORK:;;Firmstreet 1;New City;Sawo;00000;Finland
-LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Firmstreet 1=0D=0ANew City, Sawo 00000=0D=0AFinland
-URL;WORK:http://www.nokia.com
-EMAIL;PREF;INTERNET:John.Smith@firm.com
-REV:20080306T115812Z
-END:VCARD
--- a/creator/files/VCS-1kB.dat	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
-VERSION:1.0
-BEGIN:VEVENT
-DTSTART:20080306T060000Z
-DTEND:20080306T070000Z
-LOCATION;ENCODING=QUOTED-PRINTABLE:Meeting room
-UID:040000008200E00074C5B7101A82E00800000000000CEF7E917FC8010000000000000000100
- 000008AA6A7A7250C0A4E97153769E69DD064
-DESCRIPTION;ENCODING=QUOTED-PRINTABLE:Remember to bring laptop and document=
-ation=0D=0A
-SUMMARY;ENCODING=QUOTED-PRINTABLE:Meeting with BOSS
-PRIORITY:3
-END:VEVENT
-END:VCALENDAR
Binary file creator/files/WAV-20kB.dat has changed
Binary file creator/files/WMA-50kB.dat has changed
Binary file creator/files/WMV-200kB.dat has changed
Binary file creator/files/XLS-15kB.dat has changed
--- a/creator/files/backup_registration.xml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration>
-  <passive_backup>
-    <include_directory name="\"/>
-  </passive_backup>
-  <system_backup/>
-  <restore requires_reboot = "no"/>
-</backup_registration>
--- a/creator/icons/qgn_menu_creator.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 88">
-  <defs
-     id="defs6909" />
-  <rect
-     id="rect7683"
-     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.12500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;stroke-dasharray:none"
-     transform="matrix(0.707097,0.707117,-0.707116,0.707097,0.000000,0.000000)"
-     y="-27.734158"
-     x="34.175232"
-     height="55.153564"
-     width="55.155079" />
-  <rect
-     id="rect10008"
-     style="fill:#ffd800;fill-opacity:0.00000000;stroke:#000000;stroke-width:1.4641515;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     transform="matrix(0.707807,0.706406,-0.707368,0.706845,0.000000,0.000000)"
-     y="-24.579279"
-     x="37.081882"
-     height="49.570164"
-     width="49.602535" />
-  <path
-     id="path13048"
-     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.6682692;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 27.031591,57.263037 L 60.609963,57.263037" />
-  <path
-     style="stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0.12965260;stroke:#000000;fill-rule:evenodd;fill-opacity:1.0000000;fill:#000000"
-     d="M 53.055235,56.214138 C 52.624696,55.783599 53.895322,55.268316 54.042996,54.677621 C 54.177132,54.141074 54.531315,54.216369 54.372250,53.580108 C 54.255651,53.113713 53.875841,52.644696 53.603991,52.372845 C 53.309600,52.078454 53.118192,51.620750 52.945484,51.275333 C 52.703517,50.791400 52.280433,50.498349 51.957723,50.068070 C 51.603941,49.596361 51.413359,49.198844 51.189464,48.751055 C 50.899300,48.170724 50.368976,47.381811 49.982201,46.995036 C 49.704954,46.717789 49.601842,45.905065 49.433445,45.568270 C 49.184790,45.070960 49.138813,44.724882 48.774938,44.361006 C 48.320481,43.906550 47.740713,44.517222 47.567675,44.690260 C 47.298191,44.959743 46.811103,45.340001 46.360411,45.678021 C 45.855798,46.056480 45.501514,46.517804 45.262898,46.995036 C 45.012812,47.495209 44.962345,48.087501 44.823894,48.641303 C 44.672748,49.245890 44.626653,49.759521 44.494640,50.287572 C 44.374994,50.766160 44.494640,51.437604 44.494640,51.933840 C 44.494640,52.473242 44.479725,53.091014 44.384889,53.470358 C 44.236156,54.065293 43.580797,53.654026 44.165387,54.238616 C 44.585434,54.658664 44.644693,54.758223 44.933645,55.336128 C 45.224512,55.917862 44.973069,56.284464 44.714142,56.543391 C 44.460419,56.797114 43.654774,56.762894 43.177626,56.762894 C 42.469818,56.762894 41.865291,56.872645 41.202104,56.872645 C 40.653348,56.872645 40.104592,56.872645 39.555835,56.872645 C 39.007079,56.872645 38.458323,56.872645 37.909567,56.872645 C 37.360811,56.872645 36.812055,56.872645 36.263299,56.872645 C 35.361025,56.872645 34.513340,56.762894 33.629270,56.762894 C 33.007346,56.762894 32.385423,56.762894 31.763499,56.762894 C 31.141575,56.762894 30.519651,56.762894 29.897729,56.762894 C 29.316629,56.762894 28.811179,56.765634 28.361211,56.653142 C 28.294677,56.636509 28.361211,54.800636 28.361211,54.677621 C 28.361211,54.122622 28.373835,53.419862 28.470963,53.031353 C 28.595884,52.531668 28.801084,52.149872 28.909968,51.714338 C 29.009519,51.316133 29.389366,50.975043 29.568474,50.616825 C 29.828283,50.097211 29.986001,49.824729 30.117231,49.299811 C 30.235460,48.826894 30.775433,48.531857 30.995240,48.312050 C 31.322699,47.984592 31.766969,47.981929 32.202504,47.873045 C 32.844620,47.712517 33.143720,48.218959 33.300016,48.531553 C 33.507317,48.946154 33.940327,49.281615 34.178026,49.519314 C 34.504402,49.845689 34.655723,50.255205 34.836533,50.616825 C 35.036987,51.017734 35.283331,51.306507 35.385290,51.714338 C 35.510174,52.213877 35.484864,52.661395 35.604792,53.141103 C 35.720800,53.605133 36.020969,53.996287 36.263299,54.238616 C 36.590757,54.566074 37.035027,54.568737 37.470562,54.677621 C 37.877196,54.779280 38.450774,54.787372 39.007079,54.787372 C 39.499561,54.787372 39.726237,54.336816 39.885089,54.019113 C 40.048252,53.692788 39.994840,52.735696 39.994840,52.372845 C 39.994840,51.764083 39.885089,51.340231 39.885089,50.836328 C 39.885089,50.227207 39.994840,49.666649 39.994840,49.080309 C 39.994840,48.594446 40.231693,47.913395 40.324094,47.543792 C 40.463214,46.987311 40.640950,46.471075 40.872850,46.007275 C 41.112138,45.528699 41.332188,45.417852 41.531357,45.019514 C 41.798584,44.485060 41.919124,44.478034 41.641109,43.922001 C 41.427678,43.495140 41.418998,43.033558 41.311854,42.604987 C 41.183697,42.092355 41.189896,41.666058 41.311854,41.178221 C 41.441133,40.661112 41.531357,40.378202 41.531357,39.751456 C 41.531357,39.357313 41.147280,38.983300 40.982601,38.653943 C 40.761616,38.211972 40.577118,38.019774 40.433845,37.446679 C 40.293896,36.886882 40.102128,36.558816 39.994840,36.129665 C 39.884579,35.688622 39.615766,35.371517 39.446084,35.032153 C 39.247021,34.634025 39.226582,34.204135 39.226582,33.605387 C 39.226582,32.945903 39.466503,32.796291 39.665587,32.398124 C 39.865488,31.998320 40.030648,31.703808 40.324094,31.410363 C 40.648346,31.086110 40.792597,30.722357 41.092353,30.422602 C 41.497139,30.017815 40.746419,29.764094 40.324094,29.764094 C 39.766471,29.764094 39.381552,29.512327 39.007079,29.325090 C 38.644368,29.143734 38.429384,28.550821 38.348572,28.227577 C 38.239216,27.790154 37.911825,27.569635 37.470562,27.459319 C 36.870536,27.309312 36.716357,27.816679 36.373050,27.130065 C 36.166333,26.716631 36.263299,26.084628 36.263299,25.593549 C 36.263299,25.032763 36.269922,24.469546 36.373050,24.057031 C 36.480019,23.629153 36.767491,23.268149 36.921806,22.959519 C 37.118553,22.566025 37.706265,22.347787 38.019318,22.191261 C 38.389122,22.006359 39.035295,22.081510 39.555835,22.081510 C 40.104592,22.081510 40.653348,22.081510 41.202104,22.081510 C 41.550777,22.081510 42.048741,22.504828 42.299615,22.630266 C 42.779900,22.870407 43.095825,22.877718 43.397128,23.179022 C 43.856580,23.638474 43.334114,23.790792 43.067875,24.057031 C 42.608660,24.516246 42.293774,24.264849 42.628870,24.935041 C 42.796868,25.271038 43.241637,25.657560 43.506879,25.922802 C 43.829866,26.245788 44.071833,26.471558 44.604392,26.471558 C 45.231133,26.471558 45.468527,26.258992 45.921406,26.032553 C 46.380507,25.803003 46.621967,25.682272 47.018918,25.483797 C 47.432354,25.277079 48.064355,25.374046 48.555436,25.374046 C 48.881562,25.374046 49.547228,25.870950 49.762698,26.032553 C 50.233060,26.385325 50.346134,26.562541 50.860211,26.691060 C 51.323258,26.806822 51.603308,27.096337 52.177225,27.239816 C 52.669260,27.362825 53.085679,27.686432 53.494239,27.788572 C 54.085273,27.936331 54.424563,27.883965 54.921006,28.008075 C 55.515417,28.156678 55.672225,28.522753 55.908767,28.995836 C 56.129829,29.437960 56.491410,29.722118 56.677025,30.093348 C 56.910943,30.561183 56.502923,30.880558 56.238021,31.410363 C 56.056374,31.773656 55.750791,32.117094 55.469761,32.398124 C 55.126451,32.741435 54.982268,33.373113 54.811255,33.715138 C 54.580847,34.175955 54.213651,34.581092 53.933245,35.141904 C 53.665425,35.677541 53.569455,36.088987 53.384489,36.458918 C 53.193251,36.841393 53.274738,37.478767 53.274738,37.995435 C 53.274738,38.355483 53.637246,38.896713 53.713742,39.202699 C 53.826257,39.652756 54.049119,39.995451 54.152747,40.409962 C 54.261646,40.845559 54.246127,41.441991 54.372250,41.946479 C 54.491897,42.425068 54.372250,43.096512 54.372250,43.592748 C 54.372250,44.221105 54.406333,44.648676 54.591752,45.019514 C 54.805887,45.447783 54.950405,45.736818 55.140508,46.117026 C 55.318283,46.472575 55.666926,46.862946 56.018518,47.214537 C 56.421894,47.617914 56.456093,48.089688 56.677025,48.531553 C 56.956851,49.091204 57.024443,49.445891 57.225781,49.848567 C 57.525499,50.448001 57.843039,50.781081 57.994040,51.385084 C 58.121209,51.893759 58.424571,52.009700 58.542796,52.482597 C 58.645326,52.892716 58.958398,53.157244 59.091552,53.689860 C 59.206608,54.150081 59.311055,54.491721 59.311055,55.116625 C 59.311055,55.745296 59.151256,56.154433 58.872050,56.433641 C 58.548620,56.757070 57.979019,56.653142 57.445283,56.653142 C 57.019297,56.653142 56.409259,56.762894 55.908767,56.762894 C 55.327666,56.762894 54.822217,56.760154 54.372250,56.872645 C 53.888809,56.993505 53.322734,56.966958 52.945484,56.872645 C 52.548865,56.773490 53.055235,56.085649 53.055235,55.665381"
-     id="path2140" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.15643996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 38.428125,47.795987 C 38.311148,47.854477 36.965297,46.068306 36.706578,45.809587 C 36.275090,45.378099 35.986619,44.957203 35.647163,44.617746 C 35.160123,44.130704 34.556573,44.434693 34.190469,44.617746 C 33.723208,44.851375 33.274878,45.075540 32.866201,45.279879 C 32.358140,45.533910 32.262581,46.015925 31.939214,46.339294 C 31.632132,46.646376 31.393272,47.331218 31.277080,47.795987 C 31.083157,48.571681 31.468244,48.972877 31.674360,49.385108 C 31.912314,49.861016 32.778380,50.223928 33.131055,50.312097 C 33.776711,50.473511 34.431575,50.444524 35.117456,50.444524 C 35.382879,50.444524 36.028034,49.885811 36.441723,49.782389 C 36.905836,49.666361 37.228511,49.190356 37.633565,48.987829 C 37.959970,48.824626 38.265273,48.203119 38.428125,47.795987 z "
-     id="path2902" />
-  <path
-     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
-     d="M 36.399595,46.098141 C 41.690234,42.288881 41.690234,42.288881 41.690234,42.288881"
-     id="path3662" />
-  <path
-     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 51.177526,33.514353 C 51.643815,33.290634 52.117036,32.810504 52.277706,32.050272 C 52.490950,31.041286 52.186388,30.532180 51.727616,30.260839 C 51.228746,29.965782 50.690078,29.935489 49.939823,29.935489 C 48.958188,29.935489 48.839642,29.898727 48.839642,31.074218 C 48.839642,31.604089 49.483749,32.272697 49.664777,32.700974 C 49.972897,33.429925 50.486789,33.514353 51.177526,33.514353 z "
-     id="path3666" />
-  <path
-     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 43.339938,38.616989 C 43.358543,38.676580 44.048989,37.735278 44.132320,37.601827 C 44.413539,37.151472 44.464358,36.937090 44.370034,36.332872 C 44.312608,35.965007 43.825038,35.713886 43.656891,35.444606 C 43.366077,34.978882 43.133760,34.623676 42.864509,34.048757 C 42.530139,33.334791 42.389080,34.076845 42.389080,34.683233 C 42.389080,35.330477 42.556959,35.728514 42.706032,36.205977 C 42.849733,36.666232 42.864509,37.134957 42.864509,37.855617 C 42.864509,38.303047 43.016630,38.409884 43.339938,38.616989 z "
-     id="path4426" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 43.635359,9.6022099 C 40.526110,12.711459 40.475138,12.762431 40.475138,12.762431 L 46.795580,12.762431 L 43.635359,9.6022099 z "
-     id="path8982" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 43.878453,78.154696 C 40.769204,75.045447 40.718232,74.994475 40.718232,74.994475 L 47.038674,74.994475 L 43.878453,78.154696 z "
-     id="path9742" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 9.4806628,43.878454 C 12.589911,46.987703 12.640883,47.038675 12.640883,47.038675 L 12.640883,40.718232 L 9.4806628,43.878454 z "
-     id="path9744" />
-  <path
-     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-     d="M 78.033148,43.756906 C 74.923900,46.866155 74.872928,46.917127 74.872928,46.917127 L 74.872928,40.596684 L 78.033148,43.756906 z "
-     id="path9746" />
-</svg>
--- a/creator/inc/engine.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,588 +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 __CREATORENGINE_H__
-#define __CREATORENGINE_H__
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <e32hal.h>
-#include <s32file.h>
-#include <s32mem.h>
-#include <w32std.h>
-
-//#include <aknenv.h>
-#include <coeutils.h>
-#include <apparc.h>
-#include <eikenv.h>
-//#include <eikprogi.h>
-#include <bautils.h>
-#include <commdb.h>
-#include <imageconversion.h> //TFrameInfo
-
-#include "creator.hrh"
-#include "creator_std.h"
-#include "creator_randomdataparser.h"
-
-//class CCreatorAppUi;
-class TCommand;
-class CCreatorBrowser;
-class CCreatorCalendarBase;
-class CCreatorNotepad;
-class CCreatorLogs;
-//class CCreatorAccessPoints;
-class CCreatorMailboxes;
-class CCreatorIMPS;
-class CCreatorFiles;
-class CCreatorMessages;
-class CCreatorLandmarks;
-class MCreatorModuleBase;
-class CCreatorPhonebookBase;
-class CCreatorModuleBaseParameters;
-//class CCreatorConnectionSettingsBase;
-class CDictionaryFileStore;
-class CImageDecoder;
-class CFbsBitmap;
-class CBitmapScaler;
-class CCommandParser;
-class EngineWrapper;
-class CCreatorCmdScriptRun;
-
-static const TUid KUidCreatorApp = {0x20011383};
-
-enum TListQueryId
-	{
-	R_GROUP_CREATION_TYPE_QUERY,
-	R_CONTACT_CREATION_TYPE_QUERY,
-	R_MESSAGE_TYPE_QUERY,
-	R_FOLDER_TYPE_QUERY,
-	R_UNREAD_QUERY,
-	R_ATTACHMENT_MULTI_SELECTION_QUERY,
-	R_AMS_ATTACHMENT_SINGLE_SELECTION_QUERY,
-	R_ATTACHMENT_SINGLE_SELECTION_QUERY
-	};
-
-/*
- * Interface for UI dialogs
- */
-class MUIObserver
-    {
-public:
-    /**
-     * Called when some dialog in UI is closed
-     *
-     * @since S60 10.1
-     * @param aPositiveAction ETrue if "Ok", "Yes" or other "positive" button was pressed
-     * @param aUserData number that was passed to UI before dialog was opened
-     * @return None.
-     */
-    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData) = 0;
-
-    };
-
-/*
- * Interface for CCommandParser
- */
-class MCommandParserObserver
-    {
-public:
-    /**
-     * Called when CCommandParser user has choosen script file
-     *
-     * @since S60 10.1
-     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
-     * @param aFileName filename chosen by user
-     * @return None.
-     */
-    virtual void ScriptChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC) = 0;
-
-    /**
-     * Called when CCommandParser user has choosen random data file
-     *
-     * @since S60 10.1
-     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
-     * @param aFileName filename chosen by user
-     * @return None.
-     */
-    virtual void RandomDataFileChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC) = 0;
-    };
-
-/**
- * Device memory information
- */
-class TMemoryDetails
-	{
-public:
-	
-	TBuf<16> iFree;
-	TBuf<16> iSize;
-	TChar iDriveLetter;
-
-    TBuf<16> iRamFree;
-    TBuf<16> iRomFree;
-    
-	TBool    iENotAvailable;
-
-	TBuf<16> iRamSize;
-	TBuf<16> iRomSize;
-	};
-// Common constant for undefined integer value:
-const TInt KUndef = KErrNotFound;
-
-class CCreatorEngine : public CActive, public MUIObserver, public MCommandParserObserver
-	{
-enum ECreatorEngineState{
-    ECreatorEngineDeleteAllEntries,
-    ECreatorEngineDeleteAllCreatorEntries,
-};
-public:
-    
-    enum TRandomStringType
-        {
-        EFirstName = 0,
-        ESurname,
-        ECompany,
-        EAddress,
-        EJobTitle,
-        EPhoneNumber,
-        EGroupName,
-        EMeetingReason,
-        EMeetingPlace,
-        EMemoText,
-        EAnniversaryReason,
-        EToDoText,
-        EReminderText,
-        EMessageSubject,
-        EMessageText,
-        ECity,
-        ECountry,
-        EPostcode,        
-        EState,
-        EPobox,
-        EPrefix,
-        ESuffix,
-        ELandmarkName,
-        ELandmarkDescription
-        };
-
-
-// note! changing order will cause regression in other modules
-
-    enum TTestDataPath
-        {
-        EJPEG_25kB = 0,
-        EJPEG_200kB,
-        EJPEG_500kB,
-        EPNG_15kB,
-        EGIF_2kB,
-        ERNG_1kB,
-        EMIDI_10kB,
-        EWAVE_20kB,
-        EAMR_20kB,
-        EExcel_15kB,
-        EWord_20kB,
-        EPowerPoint_40kB,
-        EText_10kB,
-        EText_70kB,
-        E3GPP_70kB,
-        EMP3_250kB,
-        EAAC_100kB,
-        ERM_95kB,
-        EBMP_25kB,
-        EHTML_20kB,
-        EJAD_1kB,
-        EJAR_10kB,
-        EJP2_65kB,
-        EMP4_200kB,
-        EMXMF_40kB,
-        ERAM_1kB,
-        ESVG_15kB,
-        ESWF_15kB,
-        ETIF_25kB,
-        EVCF_1kB,
-        EVCS_1kB,
-        ESISX_10kB,
-        EWMA_50kB,
-        EWMV_200kB,
-        ESavedDeck_1kB,
-        LAST_FILE_ID//When you add new items to enum, add them before last item, so random number generations does not need to be updated also         
-        };
-        
-    enum TRandomDateType
-        {
-        EDatePast,
-        EDateFuture    
-        };
-
-public:
-    /**
-     * Constructor: NewL
-     */
-    static CCreatorEngine* NewL(EngineWrapper *aEngineWrapper);
-    /**
-     * Constructor: NewLC
-     */
-    static CCreatorEngine* NewLC(EngineWrapper *aEngineWrapper);	
-    ~CCreatorEngine();
-	
-    inline const RPointerArray<TMemoryDetails>& GetMemoryDetailsList(){ return iMemoryDetailsList; };
-	inline const TMemoryDetails& GetMemoryDetails(){ return iMemoryDetails; };
-	inline EngineWrapper* GetEngineWrapper(){ return iEngineWrapper; };
-	inline CCreatorPhonebookBase* GetPhonebook(){ return  iPhonebook; };
-	
-private:
-    CCreatorEngine();
-    /**
-     * EPOC default constructor for performing 2nd stage construction
-     */
-    void ConstructL(EngineWrapper *aEngineWrapper);
-	
-	void RequestMemoryDetails();
-    TBool MMC_OK() const;
-    void Init();
-    void RunL();
-    TInt RunError(TInt aError);
-    void DoCancel();
-
-    void ExecuteCommand();
-    void StartEnginesL();
-    void CheckForMoreCommandsL();
-    
-    TBool IsDeleteCommand( TInt aCommand );
-    
-    TInt ReadRandomDataL(const TRandomStringType aRandomStringType,
-    		             const TInt aResourceId,
-    		             const TDesC& aFilename,
-    		             const CCreatorRandomDataParser::TRandomDataType aRandomDataType);
-    void GenerateSourceImageFileL( const TTestDataPath aFileType, const TDesC& aFileName );
-    void GenereteSourceTextFileL( const TDesC& aFileName, TInt aSize );
-
-public: // from MUIObserver
-    /**
-     * Called when some dialog in UI is closed
-     *
-     * @since S60 10.1
-     * @param aPositiveAction ETrue if "Ok", "Yes" or other "positive" button was pressed
-     * @param aUserData number that was passed to UI before dialog was opened
-     * @return ?description
-     */
-    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData);
-    
-public: // from MCommandParserObserver
-    /**
-     * Called when CCommandParser user has choosen script file
-     *
-     * @since S60 10.1
-     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
-     * @param aFileName filename chosen by user
-     * @return None.
-     */
-    virtual void ScriptChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC);
-    
-    /**
-     * Called when CCommandParser user has choosen random data file
-     *
-     * @since S60 10.1
-     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
-     * @param aFileName filename chosen by user
-     * @return None.
-     */
-    virtual void RandomDataFileChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC);
-    
-public:
-    void ExecuteOptionsMenuCommandL(TInt aCommand);
-    void RunScriptL();
-    TInt RunScriptL(const TDesC& aScriptFile);
-    void ShutDownEnginesL();
-    void ExecuteFirstCommandL(const TDesC& aText);
-    
-    void AppendToCommandArrayL(TInt aCommand, CCreatorModuleBaseParameters* aParameters, TInt aNumberOfEntries = 1);
-    TInt CommandArrayCount();
- 
-    TPtrC TestDataPathL(enum TTestDataPath aTestDataPath);
-    TPtrC RandomSoundFileL(); // Returns temporary path, which will be removed on shutdown 
-    void RandomPictureFileL(TDes& aPath);  // aPath temporary path, which will be removed on shutdown
-    TPtrC CreateRandomSoundFileL(); // Copies file to new location and returns the new path
-    TPtrC CreateSoundFileL(TTestDataPath aId); // Copies file to new location and returns the new path
-    
-    void CopyFileL(const TFileName& aSourceFile, const TFileName& aTargetFile, TBool aOverwrite = EFalse );
-    /*
-     * Gets attacment file id based on the file id string
-     * @return Attachment file id
-     * @param aAttachmentIdStr Attachment file id string
-     */
-    TInt GetAttachmentIdL( const TDesC& aAttachmentIdStr ) const;    
-
-    TUint32 GetDefaultIAPL();
-    TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse );
-
-    TPtrC RandomString(enum TRandomStringType aRandomStringType);    
-    TInt RandomNumber(TInt aRange);
-    TInt RandomNumber(TInt aMin, TInt aMax);
-    TTime RandomDate(TRandomDateType type, TInt aMinDays = 0, TInt aMaxDays = 360 );
-    TTime RandomDate(TTime baseTime, TRandomDateType type, TInt aMinDays = 0, TInt aMaxDays = 360);  
-    TTime RandomTime(TTime baseTime, TRandomDateType type, TInt aMinHours=0, TInt aMaxHours=24, TInt aMinMinutes=0, TInt aMaxMinutes=60 );
-    CDesCArrayFlat* SoundFilesL();
-    CDesCArrayFlat* PictureFilesL();
-    
-    HBufC* CreateEmailAddressLC();
-    HBufC* CreateHTTPUrlLC();
-    HBufC* CreateRandomStringLC(TInt aStrLen);
-    
-    HBufC* CreateEmailAddressLC(
-            const TDesC& firstname,
-            const TDesC& lastname,
-            const TDesC& domain,
-            const TDesC& country ) const;
-    
-    HBufC* CreateUrlLC(
-            const TDesC& protocol,
-            const TDesC& prefix,
-            const TDesC& domain,
-            const TDesC& country) const;
-    
-    void SetDefaultPathForFileCommandL(TInt aCommand, TFileName& aPath);
-
-    TBool GetRandomDataL();
-    TBool GetRandomDataFromFileL(const TDesC& aFilename);
-    void CancelComplete();
-    CDictionaryFileStore* FileStoreLC();
-    void ReadEntryIdsFromStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid );
-    void WriteEntryIdsToStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid );
-    void ReadEntryIdsFromStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid );
-    void WriteEntryIdsToStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid );
-    void RemoveStoreL( const TUid aModuleUid );
-	void ProgressDialogCancelledL();
-	
-	void SortCommands();
-    
-private:
-    // needed by the engine itself
-    RTimer iTimer;
-    CEikonEnv* iEnv;
-    //CCreatorAppUi* iAppUi;
-    TInt iCurrentEntry;
-    TInt iFailedCommands;
-
-    CDesCArrayFlat* iSoundFileArray;
-    CDesCArrayFlat* iPictureFileArray;
-    CCommandArray* iCommandArray;
-    RPointerArray<CCreatorModuleBaseParameters> iParameterArray;
-    // progress bar
-    //CAknProgressDialog* iProgressDialog;
-    //CEikProgressInfo* iProgressInfo;
-        
-    // for the random data generator
-    TInt64 iSeed;
-    
-    class TStringArrayPtr
-        {
-        public:
-        TStringArrayPtr(TRandomStringType aType, CDesCArray* aPtr)
-            {
-            iStringType = aType;
-            iArrayPtr = aPtr;
-            };
-        TRandomStringType iStringType;
-        CDesCArray* iArrayPtr;
-        }; 
-    
-    RArray<TStringArrayPtr> iStringArrays;
-    
-    // modules
-    CCreatorBrowser* iBrowser;
-    CCreatorCalendarBase* iCalendar;
-    CCreatorPhonebookBase* iPhonebook;
-    CCreatorNotepad* iNotepad;
-    CCreatorLogs* iLogs;
-//    CCreatorConnectionSettingsBase* iAccessPoints;
-    CCreatorMailboxes* iMailboxes;
-    CCreatorIMPS* iIMPS;
-    CCreatorFiles* iFiles;
-    CCreatorMessages* iMessages;
-    CCreatorLandmarks* iLandmarks;
-	CCreatorCmdScriptRun* iCmdScriptRun;
-	CCommandParser* iCommandParser;
-
-    // options menu command home module
-    MCreatorModuleBase* iUsedOptionsMenuModule;
-    
-    HBufC* iTempPath;
-    
-    RPointerArray<HBufC> iAllocatedFilePaths;
-    TBool iUserCancelled;
-    
-    // For generating missing bitmaps
-    HBufC8* iBitmapData;
-    CFbsBitmap* iBitmap;
-    CFbsBitmap* iScaledBitmap;
-    CImageDecoder* iDecoder;
-    TFrameInfo iFrameinfo;
-    CImageEncoder* iEncoder;
-    CFrameImageData* iFrameImageData;
-    CBitmapScaler* iScaler;
-
-    EngineWrapper* iEngineWrapper; // Enginewrapper that is used for communicating between QT and Symbian
-	TMemoryDetails iMemoryDetails;
-	
-	RPointerArray<TMemoryDetails> iMemoryDetailsList;
-	
-	TInt iResourceFileId;
-
-	HBufC* iCommandLineScriptName;
-	HBufC* iCommandLineRandomDataFileName;
-	};
-
-// this class contains a command which will be executed
-class TCommand
-    {
-public:
-    TInt iCommandId;
-    CCreatorModuleBaseParameters* iParameters;
-public:
-    TCommand(TInt aCommandId, CCreatorModuleBaseParameters* aParameters);
-    ~TCommand();
-
-    };
-
-
-// utility class for waiting for asychronous requests
-class CAsyncWaiter : public CActive
-	{
-public:
-	static CAsyncWaiter* NewL( TInt aPriority = EPriorityStandard );
-	static CAsyncWaiter* NewLC( TInt aPriority = EPriorityStandard );
-	~CAsyncWaiter();
-	
-	void StartAndWait();
-	TInt Result() const;
-	
-private:
-	CAsyncWaiter( TInt aPriority );
-	
-	// from CActive
-	void RunL();
-	void DoCancel();
-	
-private:
-    CActiveSchedulerWait iWait;
-	TInt iError;
-    };
-	
-	
-/*
- * Maps file id string (file name) to TTestDataPath (file id) and TCreatorIds (command id)
- */
-// File ids:
-	
-	_LIT(K3GPP_70KB, "3GPP-70kB");
-	_LIT(KAAC_100KB, "AAC-100kB");
-	_LIT(KAMR_20KB, "AMR-20kB");
-	_LIT(KXLS_15KB, "XLS-15kB");
-	_LIT(KGIF_2KB, "GIF-2kB");
-	_LIT(KJPEG_200KB, "JPEG-200kB");
-	_LIT(KJPEG_25KB, "JPEG-25kB");
-	_LIT(KJPEG_500KB, "JPEG-500kB");
-	_LIT(KMIDI_10KB, "MIDI-10kB");
-	_LIT(KMP3_250KB, "MP3-250kB");
-	_LIT(KPNG_15KB, "PNG-15kB");
-	_LIT(KPPT_40KB, "PPT-40kB");
-	_LIT(KRM_95KB, "RM-95kB");
-	_LIT(KRNG_1KB, "RNG-1kB");
-	_LIT(KTXT_10KB, "TXT-10kB");
-	_LIT(KTXT_70KB, "TXT-70kB");
-	_LIT(KWAV_20KB, "WAV-20kB");
-	_LIT(KDOC_20KB, "DOC-20kB");
-	_LIT(KSWF_15KB, "SWF-15kB");
-	_LIT(KJAD_1KB, "JAD-1kB");
-	_LIT(KJAR_10KB, "JAR-10kB");
-	_LIT(KTIF_25KB, "TIF-25kB");
-	_LIT(KMXMF_40KB, "MXMF-40kB");
-	_LIT(KBMP_25KB, "BMP-25kB");
-	_LIT(KJP2_25KB, "JP2-25kB");
-	_LIT(KSVG_15KB, "SVG-15kB");
-	_LIT(KHTML_20KB, "HTML-20kB");
-	_LIT(KVCF_1KB, "VCF-1kB");
-	_LIT(KVCS_1KB, "VCS-1kB");
-	_LIT(KMP4_200KB, "MP4-200kB");
-	_LIT(KSISX_10KB, "SISX-10kB");
-	_LIT(KRAM_1KB, "RAM-1kB");
-    _LIT(KDECK_1KB, "DECK-1kB");
-    _LIT(KWMA_50KB, "WMA-50kB");
-    _LIT(KWMV_200KB, "WMV-200kB");
-	
-class FileMapping
-    {
-	public:
-	FileMapping(const TDesC& aFileName, TInt aFileId, TInt aCommandId );
-	const TDesC& FileName() const;
-	TInt FileId() const;
-	TInt CommandId() const;
-
-	private:
-	const TDesC& iFileName;
-	TInt  iFileId;
-	TInt  iCommandId;
-	};
-	
-	/*
-	 * This table contains the string <-> TTestDataPath mappings for the file types
-	 */
-	static FileMapping FileMap[] = 
-	    {
-      
-	    FileMapping(K3GPP_70KB, CCreatorEngine::E3GPP_70kB, ECmdCreateFileEntry3GPP_70kB),
-	    FileMapping(KAAC_100KB, CCreatorEngine::EAAC_100kB, ECmdCreateFileEntryAAC_100kB),
-	    FileMapping(KAMR_20KB, CCreatorEngine::EAMR_20kB, ECmdCreateFileEntryAMR_20kB),
-	    FileMapping(KXLS_15KB, CCreatorEngine::EExcel_15kB, ECmdCreateFileEntryXLS_15kB),
-	    FileMapping(KGIF_2KB, CCreatorEngine::EGIF_2kB, ECmdCreateFileEntryGIF_2kB),
-	    FileMapping(KJPEG_200KB, CCreatorEngine::EJPEG_200kB, ECmdCreateFileEntryJPEG_200kB),
-	    FileMapping(KJPEG_25KB, CCreatorEngine::EJPEG_25kB, ECmdCreateFileEntryJPEG_25kB),
-	    FileMapping(KJPEG_500KB, CCreatorEngine::EJPEG_500kB, ECmdCreateFileEntryJPEG_500kB),
-	    FileMapping(KMIDI_10KB, CCreatorEngine::EMIDI_10kB, ECmdCreateFileEntryMIDI_10kB),
-	    FileMapping(KMP3_250KB, CCreatorEngine::EMP3_250kB, ECmdCreateFileEntryMP3_250kB),
-	    FileMapping(KPNG_15KB, CCreatorEngine::EPNG_15kB, ECmdCreateFileEntryPNG_15kB),
-	    FileMapping(KPPT_40KB, CCreatorEngine::EPowerPoint_40kB, ECmdCreateFileEntryPPT_40kB),
-	    FileMapping(KRM_95KB, CCreatorEngine::ERM_95kB, ECmdCreateFileEntryRM_95kB),
-	    FileMapping(KRNG_1KB, CCreatorEngine::ERNG_1kB, ECmdCreateFileEntryRNG_1kB),
-	    FileMapping(KTXT_10KB, CCreatorEngine::EText_10kB, ECmdCreateFileEntryTXT_10kB),
-	    FileMapping(KTXT_70KB, CCreatorEngine::EText_70kB, ECmdCreateFileEntryTXT_70kB),
-	    FileMapping(KWAV_20KB, CCreatorEngine::EWAVE_20kB, ECmdCreateFileEntryWAV_20kB),
-	    FileMapping(KDOC_20KB, CCreatorEngine::EWord_20kB, ECmdCreateFileEntryDOC_20kB),
-	    FileMapping(KBMP_25KB, CCreatorEngine::EBMP_25kB, ECmdCreateFileEntryBMP_25kB),
-	    FileMapping(KDECK_1KB, CCreatorEngine::ESavedDeck_1kB, ECmdCreateFileEntryDeck_1kB),
-	    FileMapping(KHTML_20KB, CCreatorEngine::EHTML_20kB, ECmdCreateFileEntryHTML_20kB),
-	    FileMapping(KJAD_1KB, CCreatorEngine::EJAD_1kB, ECmdCreateFileEntryJAD_1kB),
-	    FileMapping(KJAR_10KB, CCreatorEngine::EJAR_10kB, ECmdCreateFileEntryJAR_10kB),
-	    FileMapping(KJP2_25KB, CCreatorEngine::EJP2_65kB, ECmdCreateFileEntryJP2_65kB),
-	    FileMapping(KMP4_200KB, CCreatorEngine::EMP4_200kB, ECmdCreateFileEntryMP4_200kB),
-	    FileMapping(KMXMF_40KB, CCreatorEngine::EMXMF_40kB, ECmdCreateFileEntryMXMF_40kB),
-	    FileMapping(KRAM_1KB, CCreatorEngine::ERAM_1kB, ECmdCreateFileEntryRAM_1kB),
-	    FileMapping(KSVG_15KB, CCreatorEngine::ESVG_15kB, ECmdCreateFileEntrySVG_15kB),
-	    FileMapping(KSWF_15KB, CCreatorEngine::ESWF_15kB, ECmdCreateFileEntrySWF_15kB),
-	    FileMapping(KTIF_25KB, CCreatorEngine::ETIF_25kB, ECmdCreateFileEntryTIF_25kB),
-	    FileMapping(KVCF_1KB, CCreatorEngine::EVCF_1kB, ECmdCreateFileEntryVCF_1kB),
-	    FileMapping(KVCS_1KB, CCreatorEngine::EVCS_1kB, ECmdCreateFileEntryVCS_1kB),
-	    FileMapping(KSISX_10KB, CCreatorEngine::ESISX_10kB, ECmdCreateFileEntrySISX_10kB),
-	    FileMapping(KWMA_50KB, CCreatorEngine::EWMA_50kB, ECmdCreateFileEntryWMA_50kB),
-	    FileMapping(KWMV_200KB, CCreatorEngine::EWMV_200kB, ECmdCreateFileEntryWMV_200kB)
-	    };
-
-#endif // __CREATORENGINE_H__
-
--- a/creator/inc/enginewrapper.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +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 ENGINEWRAPPER_H
-#define ENGINEWRAPPER_H
-
-#include <e32std.h>
-#include <e32base.h>
-#include <badesca.h>
-#include <engine.h>
-
-#include <QObject> // for iProgressNote signal connect
-
-
-class MainView;
-class MemoryDetails;
-class HbProgressDialog;
-class HbPopup;
-class HbCommonNote;
-class HbAction;
-
-
-/**
- * class that is used for communicating between Symbian and Qt code.
- */
-class EngineWrapper : public QObject
- { 
-	Q_OBJECT
-
-public:
-    
-    /**
-     * Constructor
-     */
-    EngineWrapper();
-    
-    /**
-     * Destructor
-     */
-    ~EngineWrapper();
-    
-    /**
-     * Initializes Engine Wrapper
-     * @return true if engine was started successfully
-     */
-    bool init();
-	
-	/**
-	* Get memory details
-	*/
-	MemoryDetails GetMemoryDetails();
-	
-	/**
-	 * Get memory details list
-	 */
-	QList<MemoryDetails> GetMemoryDetailsList();
-	
-public: 
-    
-    /* Functions that are called from UI */
-	bool ExecuteOptionsMenuCommand(int commandId);
-
-    
-public:
-
-    /* Functions that are called from engine: */
-    
-	/** 
-     * uses Notifications class to show error message 
-     */
-    void ShowErrorMessage(const TDesC& aErrorMessage);
-
-    /**
-     * uses Notifications class to show progressbar
-     */
-    void ShowProgressBar(const TDesC& aPrompt, int aMax);
-	
-	/**
-	* uses Notifications class to show user note
-	*/
-	void ShowNote(const TDesC& aNoteMessage, TInt aResourceId = 0);
-    
-    /**
-     * increments shown progressbar's value
-     */
-    void IncrementProgressbarValue();
-    
-    /**
-     * closes progressbar
-     */
-    void CloseProgressbar();	
-	
-	/**
-	* Create entries query dialog
-	*/
-	TBool EntriesQueryDialog(TInt* aNumberOfEntries, const TDesC& aPrompt, TBool aAcceptsZero, MUIObserver* aObserver, TInt aUserData);
-
-	/**
-	* Create time query dialog
-	*/    
-    TBool TimeQueryDialog(TTime* aTime, const TDesC& aPrompt, MUIObserver* aObserver, TInt aUserData);
-
-	/**
-	* Create yes or no query dialog
-	*/    
-    TBool YesNoQueryDialog(const TDesC& aPrompt, MUIObserver* aObserver, int userData);
-	
-	/**
-	* Popup list dialog for selecting item from dialog list
-	*/
-	TBool PopupListDialog(const TDesC& aPrompt, const CDesCArray* aFileNameArray, TInt* aIndex, MUIObserver* aObserver, TInt aUserData); 
-	
-	/**
-	* Directory query dialog
-	*/
-	TBool DirectoryQueryDialog(const TDesC& aPrompt, TDes& aDirectory, MUIObserver* aObserver, TInt aUserData);
-	
-	/**
-	* Create list query single-selection dialog
-	*/
-	TBool ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, TInt* aSeletedItem, MUIObserver* aObserver, TInt aUserData);
-
-	/**
-	* Create list query multi-selection dialog
-	*/
-	TBool ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* aObserver, TInt aUserData);
-	
-	
-	/**
-	* Close application when started from command line for script run.
-	*/
-	void CloseCreatorApp();
-
-private slots:
-	
-	/**
-	* progress dialog cancelled
-	*/
-	void ProgressDialogCancelled();
-	
-private:
-    
-    
-    /* Creator engine */
-    CCreatorEngine* iEngine;
-    
-    /* progress dialog that is shown */
-    HbProgressDialog* iProgressDialog;
-    
-    MCreatorModuleBase *iModule;
-};
-
-#endif //ENGINEWRAPPER_H
--- a/creator/inc/mainview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +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 MAINVIEW_H
-#define MAINVIEW_H
-
-#include <hbview.h>
-#include <enginewrapper.h>
-
-class HbMainWindow;
-class HbApplication;
-class HbAction;
-class QSignalMapper;
-
-class MemoryDetails
-{
-public:
-	QString 		mFree;
-	QString			mSize;
-	QString			mDriveLetter;
-	
-    QString         mRamFree;
-	bool			mENotAvailable;
-	QString         mRamSize;
-};
-
-/**
- * Class that implements the main view of Creator
- */
-class MainView : public HbView
-{
-    Q_OBJECT
-    
-public:
-    
-    /**
-     * Constructor
-     */
-    MainView(HbMainWindow &mainWindow);
-    
-    /**
-     * Destructor
-     */
-	~MainView();
-
-	/**
-     * Initializes Engine Wrapper
-     * @param app application class of Creator
-     */
-    void init(HbApplication &app);
-	
-	/**
-	* Call application exit from engine.
-	*/
-	static void closeApp();
-
-private:
-    
-    /**
-     * Creates menu
-     */
-    void createMenu(HbApplication &app);
-    
-    /**
-     * Creates memory info text to UI
-     */
-    void createMemoryInfoText();
-    
-private slots:
-
-    
-    /**
-     * Shows about pop-up
-     */
-    void showAboutPopup();
-	/**
-	* calls engine wrapper to complete service request, specified with commandId.
-	*/
-	void executeMenuCommand(int cmd);
-  
-private:
-    
-    /* Main window of Creator */
-    HbMainWindow &mMainWindow;
-    
-   
-    /* Engine Wrapper */
-    EngineWrapper mEngineWrapper;
-    
-    /* Actions that are used in toolbars and menus */
-	HbAction* mActionRunScript;
-	HbAction* mActionCalendarAppointments;
-	HbAction* mActionCalendarEvents;
-	HbAction* mActionCalendarAnniversaries;
-	HbAction* mActionCalendarTodos;
-	HbAction* mActionCalendarReminders;	
-	HbAction* mActionBrowserBookmark;
-	HbAction* mActionBrowserBmarkFolder;
-	HbAction* mActionLogsMissedCalls;
-	HbAction* mActionLogsReceivedCalls;
-	HbAction* mActionLogsDialledNumbers;
-	HbAction* mActionMessageMailboxes;
-	HbAction* mActionMessages;
-	HbAction* mActionFilesJpeg25;
-	HbAction* mActionFilesJpeg200;
-	HbAction* mActionFilesJpeg500;
-	HbAction* mActionFilesPng15;
-	HbAction* mActionFilesGif2;
-	HbAction* mActionFilesBmp25;
-	HbAction* mActionFilesJp265;
-	HbAction* mActionFilesSvg15;
-	HbAction* mActionFilesTif25;
-	HbAction* mActionFilesRng1;
-	HbAction* mActionFilesMidi10;
-	HbAction* mActionFilesWave20;
-	HbAction* mActionFilesAmr20;
-	HbAction* mActionFilesExcel15;
-	HbAction* mActionFilesWord20;
-	HbAction* mActionFilesPPoint40;
-	HbAction* mActionFilesText10;
-	HbAction* mActionFilesText70;
-	HbAction* mActionFilesHtml20;
-	HbAction* mActionFilesMxmf40;
-	HbAction* mActionFilesRam1;
-	HbAction* mActionFilesJad1;
-	HbAction* mActionFilesJar10;
-	HbAction* mActionFilesVcf1;
-	HbAction* mActionFilesVcs1;
-	HbAction* mActionFilesSisx10;
-	HbAction* mActionFiles3Gpp70;
-	HbAction* mActionFilesMp3250;
-	HbAction* mActionFilesAAC100;
-	HbAction* mActionFilesSwf15;
-	HbAction* mActionFilesMp4200;
-	HbAction* mActionFilesRm95;
-	HbAction* mActionFilesWma50;
-	HbAction* mActionFilesWmv200;
-	HbAction* mActionPhonebookContacts;
-	HbAction* mActionPhonebookGroups;
-	HbAction* mActionBrowserSavedPages;
-	HbAction* mActionBrowserSavedPageFolders;
-	HbAction* mActionFilesEmptyFolder;
-	HbAction* mActionMiscConnection;
-	HbAction* mActionMiscImps;
-	HbAction* mActionMiscNotes;
-	HbAction* mActionMiscLandmarks;
-    HbAction* mActionAbout;
-    HbAction* mActionExit;
-	HbAction* mActionDeleteAllItems;
-	HbAction* mActionDeleteCreatorItems;
-	HbAction* mActionSelectRandomFile;
-	HbAction* mActionDeleteCalAllItems;
-	HbAction* mActionDeleteCalCreatorItems;
-	HbAction* mActionDeleteBookmarkAllItems;
-	HbAction* mActionDeleteBookmarkCreatorItems;
-	HbAction* mActionDeleteBookmarkFolderAllItems;
-	HbAction* mActionDeleteBookmarkFolderCreatorItems;
-	HbAction* mActionDeleteSavedPagesAllItems;
-	HbAction* mActionDeleteSavedPagesCreatorItems;
-	HbAction* mActionDeleteSavedPagesFolderAllItems;
-	HbAction* mActionDeleteSavedPagesFolderCreatorItems;
-	HbAction* mActionDeleteFiles;
-	HbAction* mActionDeleteLogsAll;
-	HbAction* mActionDeleteLogsByCreator;
-	HbAction* mActionDeleteMessagesAll;
-	HbAction* mActionDeleteMessagesByCreator;
-	HbAction* mActionDeleteConnMethsAll;
-	HbAction* mActionDeleteConnMethsByCreator;
-	HbAction* mActionDeleteImpsAll;
-	HbAction* mActionDeleteImpsByCreator;
-	HbAction* mActionDeleteNotes;
-	HbAction* mActionDeleteLandmarksAll;
-	HbAction* mActionDeleteLandmarksByCreator;
-	HbAction* mActionDeleteContactsAll;
-	HbAction* mActionDeleteContactsByCreator;
-	HbAction* mActionDeleteContactGroupsAll;
-	HbAction* mActionDeleteContactGroupsByCreator;
-	
-	
-	MemoryDetails mMemoryDetails;
-	QList<MemoryDetails> mMemoryDetailsList;
-    // signal mapper
-    QSignalMapper *mSm;    
-};
-
-#endif // MAINVIEW_H
--- a/creator/inc/notifications.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +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 NOTIFICATIONS_H_
-#define NOTIFICATIONS_H_
-
-#include <hbmessagebox.h>
-#include <hbselectiondialog.h>
-#include <hbinputdialog.h>
-
-#include "engine.h"
-
-#include <stdexcept>
-
-class HbProgressDialog;
-class HbPopup;
-
-class Notifications : public HbPopup
-    {
-
-	Q_OBJECT 	
-	
-public:
-    /**
-     * shows massage box
-     */
-	static void showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout );
-	
-    /**
-     * shows about box
-     */
-    static void about();
-    
-    /** 
-     * shows error message 
-     */
-    static void error(const QString& errorMessage);
-	
-	/**
-     * to shows progressbar
-     */
-	static HbProgressDialog* showProgressBar(const QString& text, int max);
-	
-    /**
-     * shows global HbGlobalCommonNote type note
-     */
-	static void showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, int timeout = 1000 );
-    };
-
-class CreatorDialog
-{
-    Q_DISABLE_COPY(CreatorDialog)
-protected:
-    CreatorDialog(MUIObserver* observer, int userData) throw(std::exception) : mObserver(observer), mUserData(userData)
-        {
-            if(!mObserver)
-                throw std::invalid_argument("module cannot be the null!");
-        };
-protected:
-    virtual void NotifyObserver(TBool aPositiveAction)
-        {
-        TRAPD( err, mObserver->QueryDialogClosedL(aPositiveAction, mUserData) );
-        if(err)
-            {
-            Notifications::error( QString("Symbian Leave: %1 ").arg(err) );
-            }
-        }
-    
-protected:
-    MUIObserver* mObserver;
-    int mUserData;
-};
-
-class CreatorYesNoDialog : public HbMessageBox, public CreatorDialog
-{
-    Q_DISABLE_COPY(CreatorYesNoDialog)
-    Q_OBJECT
-public:
-    static void launch(const QString& text, const QString& label, MUIObserver* observer, int userData) throw( std::exception );
-protected:
-    CreatorYesNoDialog(MUIObserver* observer, int userData);
-protected slots:
-    void DialogClosed(HbAction*);
-};
-
-class CreatorInputDialog : public HbInputDialog, public CreatorDialog
-{
-    Q_DISABLE_COPY(CreatorInputDialog)
-    Q_OBJECT
-public:
-    static void launch(const QString& label, int* value, bool acceptZero,  MUIObserver* observer, int userData) throw( std::exception );
-    static void launch(const QString& label, TDes& value,  MUIObserver* observer, int userData) throw( std::exception );
-protected:
-    CreatorInputDialog(int* value, MUIObserver* observer, int userData);
-    CreatorInputDialog(TDes& value, MUIObserver* observer, int userData);
-protected slots:
-    void DialogClosed(HbAction*);
-private:
-    int *mIntValue;
-    TDes& mStrValue;
-    TBuf<1> mDummy;
-};
-
-class CreatorSelectionDialog : public HbSelectionDialog, public CreatorDialog
-{
-    Q_DISABLE_COPY(CreatorSelectionDialog)
-    Q_OBJECT
-public:
-    static void launch(const QString& label, const QStringList& items, TInt* selectedItem, MUIObserver* observer, int userData) throw( std::exception );
-    static void launch(const QString& label, const QStringList& items, CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* observer, int userData) throw( std::exception );
-protected:
-    CreatorSelectionDialog(TInt* selectedItem, MUIObserver* observer, int userData) throw( std::exception );
-    CreatorSelectionDialog(CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* observer, int userData) throw( std::exception );
-protected slots:
-    void DialogClosed(HbAction*);
-private:
-    TInt* mSelectedItem;
-    CArrayFixFlat<TInt>* mSelectedItems;
-};
-
-class CreatorDateTimeDialog : public HbDialog, public CreatorDialog
-{
-    Q_DISABLE_COPY(CreatorDateTimeDialog)
-    Q_OBJECT
-public:
-    static void launch(const QString& label, TTime* value, MUIObserver* observer, int userData) throw( std::exception );
-protected:
-    CreatorDateTimeDialog(TTime* value, MUIObserver* observer, int userData);
-protected slots:
-    void DialogClosed(HbAction*);
-private:
-    TTime *mValue;
-};
-#endif // NOTIFICATIONS_H_
--- a/creator/rom/creator.iby	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __CREATOR_IBY__
-#define __CREATOR_IBY__
-
-S60_APP_EXE(Creator)
-S60_APP_RESOURCE(Creator)
-S60_APP_RESOURCE(datacreator)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,Creator)
-
-data=ZPRIVATE\10003a3f\import\APPS\Creator_reg.RSC Private\10003a3f\import\Apps\Creator_reg.rsc 
-//#ifdef S60_UPGRADABLE_APP_REG_RSC
-//  S60_UPGRADABLE_APP_REG_RSC(Creator)
-//#else
-//  S60_APP_AIF_RSC(Creator)
-//#endif
-
-data=ZPRIVATE\20011383\backup_registration.xml        	private\20011383\backup_registration.xml
-data=ZSYSTEM\Install\Creator_stub.sis                   \system\install\Creator_stub.sis
-
-// test files (remove largest files if running out of ROM space):
-data=ZPRIVATE\20011383\3GPP-70kB.3gpp                   private\20011383\3GPP-70kB.3gpp
-data=ZPRIVATE\20011383\AAC-100kB.aac                    private\20011383\AAC-100kB.aac
-data=ZPRIVATE\20011383\AMR-20kB.amr                     private\20011383\AMR-20kB.amr
-data=ZPRIVATE\20011383\Deck-1kB.saveddeck               private\20011383\Deck-1kB.saveddeck
-data=ZPRIVATE\20011383\DOC-20kB.doc                     private\20011383\DOC-20kB.doc
-data=ZPRIVATE\20011383\HTML-20kB.html                   private\20011383\HTML-20kB.html
-data=ZPRIVATE\20011383\JAD-1kB.jad                      private\20011383\JAD-1kB.jad
-data=ZPRIVATE\20011383\JAR-10kB.jar                     private\20011383\JAR-10kB.jar
-data=ZPRIVATE\20011383\JP2-65kB.jp2                     private\20011383\JP2-65kB.jp2
-data=ZPRIVATE\20011383\MIDI-10kB.mid                    private\20011383\MIDI-10kB.mid
-data=ZPRIVATE\20011383\MP3-250kB.mp3                    private\20011383\MP3-250kB.mp3
-data=ZPRIVATE\20011383\MP4-200kB.mp4                    private\20011383\MP4-200kB.mp4
-data=ZPRIVATE\20011383\MXMF-40kB.mxmf                   private\20011383\MXMF-40kB.mxmf
-data=ZPRIVATE\20011383\PNG-15kB.png                     private\20011383\PNG-15kB.png
-data=ZPRIVATE\20011383\PPT-40kB.ppt                     private\20011383\PPT-40kB.ppt
-data=ZPRIVATE\20011383\RAM-1kB.ram                      private\20011383\RAM-1kB.ram
-data=ZPRIVATE\20011383\RM-95kB.rm                       private\20011383\RM-95kB.rm
-data=ZPRIVATE\20011383\RNG-1kB.rng                      private\20011383\RNG-1kB.rng
-data=ZPRIVATE\20011383\SVG-15kB.svg                     private\20011383\SVG-15kB.svg
-data=ZPRIVATE\20011383\SWF-15kB.swf                     private\20011383\SWF-15kB.swf
-data=ZPRIVATE\20011383\TIF-25kB.tif                     private\20011383\TIF-25kB.tif
-data=ZPRIVATE\20011383\VCF-1kB.vcf                      private\20011383\VCF-1kB.vcf
-data=ZPRIVATE\20011383\VCS-1kB.vcs                      private\20011383\VCS-1kB.vcs
-data=ZPRIVATE\20011383\WAV-20kB.wav                     private\20011383\WAV-20kB.wav
-data=ZPRIVATE\20011383\XLS-15kB.xls                     private\20011383\XLS-15kB.xls
-data=ZPRIVATE\20011383\SISX-10kB.sisx                   private\20011383\SISX-10kB.sisx
-data=ZPRIVATE\20011383\WMA-50kB.wma                     private\20011383\WMA-50kB.wma
-data=ZPRIVATE\20011383\WMV-200kB.wmv                    private\20011383\WMV-200kB.wmv
-
-#endif // __CREATOR_IBY__
--- a/creator/scripts/browserEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<!-- Create bookmark -->
-<bookmark>
-   <fields>
-    <name>Creator bookmark</name>
-    <url>http://example.net</url>
-    <username>User</username>
-    <password>passwd</password>
-  </fields>
-</bookmark>
-
-<!-- Create 5 random bookmarks -->
-<bookmark amount="5">
-   <fields>
-        <name randomlength="default"/>
-        <url randomlength="default"/>
-        <username randomlength="default"/>
-        <password randomlength="default"/>
-   </fields>
-</bookmark>
-
-<!-- Create bookmark folder -->
-<bookmarkfolder>
-   <fields>
-       <name>Creator bookmarks</name>
-   </fields>
-</bookmarkfolder>
-
-<!-- Create saved page folder -->
-<savedpagefolder>
-    <fields>
-       <name>Creator saved pages</name>
-    </fields>
-</savedpagefolder>
-
-<!-- Create saved page -->
-<savedpage>
-    <fields>
-       <name>Creator saved page</name>
-       <path randomlength="default"/>
-    </fields>
-</savedpage>
-
-</creatorscript>
--- a/creator/scripts/calendarEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-<?xml version="1.0" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<!-- Contact set with existing contacts -->
-<contact-set id="1" numberofexistingcontacts="10">
-</contact-set>
-
-<!-- Create an appointment with 5 attendees. Two of the attendees are selected from the contacts -->
-<!-- and two of the attendees are randomly generated. One contact explicitly given. -->
-<calendar type="appointment">
-   <fields>
-   <summary>Project meeting</summary>
-   <description>Let's have a bi-weekly project meeting. Welcome everyone!</description>
-   <location>Meeting room 1</location>
-   <starttime>2008-03-27T13:02:57</starttime>
-   <endtime>2008-03-27T16:15:00</endtime>
-   <recurrentfrequency>weekly</recurrentfrequency>
-   <recurrentinterval>2</recurrentinterval>
-   <recurrentfrom>2008-03-27</recurrentfrom>   
-   <recurrentto>2009-03-27</recurrentto>
-   <attendees>
-      <!-- Two existing contacts -->
-   	  <contact-set-reference id="1" maxamount="2"/>
-      <attendee>
-         <commonname>John Doe</commonname>
-         <email>john.doe@example.net</email>
-      </attendee>
-      <attendee>
-         <commonname/>
-         <email/>
-      </attendee>
-      <attendee>
-         <commonname/>
-         <email/>
-      </attendee>
-   </attendees>
-   </fields>  
-</calendar>
-
-<!-- Contact set with 5 contacts having first name "Jane" -->
-<contact-set id="2">
-    <contact amount="5">
-        <fields>
-            <firstname>Jane</firstname>
-            <lastname/>
-            <emailwork/>
-            <mobilephonework/>
-        </fields>
-    </contact>
-</contact-set>
-
-<!-- Create an appointment having "Jane" as an attendee (random location) -->
-<calendar type="appointment">
-   <fields>
-   <summary>Appointment with Jane</summary>
-   <starttime>2008-02-29T14:00:00</starttime>
-   <endtime>2008-02-29T15:00:00</endtime>
-   <location/>
-   <attendees>      
-      <contact-set-reference id="2" maxamount="1"/>      
-   </attendees>
-   </fields>
-</calendar>
-
-<!-- Create an event -->
-<calendar type="event">
-   <fields>
-   <summary>Tech Days</summary>
-   <description>Annual tech days, let's have fun!</description>
-   <starttime>2008-05-01</starttime>
-   <endtime>2008-05-03</endtime>
-   </fields>
-</calendar>
-
-<!-- Create a reminder -->
-<calendar type="reminder">
-  <fields>
-  <summary>Remember to buy Lotto!</summary>
-  <starttime>2008-02-28T18:00:00</starttime>
-  <endtime>2008-02-28T18:00:00</endtime>
-  </fields>
-</calendar>
-
-<!-- Create 10 random anniversaries -->
-<calendar type="anniversary" amount="10">
-  <fields>
-  <summary/>
-  <starttime/>
-  </fields>
-</calendar>
-
-<!-- Create a to-do entry -->
-<calendar type="todo">
-  <fields>
-     <summary>Should do something...?</summary>
-     <starttime>2008-02-29T10:00:00</starttime>
-     <endtime>2008-02-29T12:00:00</endtime>
-  </fields>
-</calendar>
-
-</creatorscript>
--- a/creator/scripts/connectionmethodEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<connectionmethod>
-  <fields>
-    <connectionname>CR_Example</connectionname>
-    <bearertype>GPRS</bearertype>
-    <startpage>http://wap.example.net</startpage>
-    <wapwspoption>connectionoriented</wapwspoption>
-    <protocoltype>ipv4</protocoltype>
-    <loginname>john</loginname>
-    <secureauthentication>no</secureauthentication>
-    <loginpass>doe</loginpass>
-    <promptpassword>no</promptpassword>
-    <gatewayaddress>10.10.10.101</gatewayaddress>
-    <subnetmask>255.255.255.0</subnetmask>
-    <deviceipaddr>10.10.10.102</deviceipaddr>
-    <useproxy>no</useproxy>
-  </fields>
-</connectionmethod>
-  <connectionmethod amount="2">
-    <fields>
-      <connectionname randomlength="max" />
-      <bearertype randomlength="max" />
-      <startpage randomlength="max" />
-      <wapwspoption randomlength="max" />
-      <protocoltype randomlength="max" />
-      <loginname randomlength="max" />
-      <secureauthentication randomlength="max" />
-      <loginpass randomlength="max" />
-      <promptpassword randomlength="max" />
-      <gatewayaddress randomlength="max" />
-      <subnetmask randomlength="max" />
-      <deviceipaddr randomlength="max" />
-      <ip4nameserver1 randomlength="max" />
-      <ip4nameserver2 randomlength="max" />
-      <datacalltelnumber randomlength="max" />
-      <datacalltypeisdn randomlength="max" />
-      <datacalllinespeed randomlength="max" />
-      <useproxy randomlength="max" />
-      <proxyserveraddress randomlength="max" />
-      <proxyportnumber randomlength="max" />
-      <ip6nameserver1 randomlength="max" />
-      <ip6nameserver2 randomlength="max" />
-      <disabletextauth randomlength="max" />
-      <wlanname randomlength="max" />
-      <wlanipaddr randomlength="max" />
-      <wlansecmode randomlength="max" />
-      <wlannetmode randomlength="max" />
-    </fields>
-  </connectionmethod>
-</creatorscript>
--- a/creator/scripts/contactEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<contact-set id="1" numberofexistingcontacts="10">
-</contact-set>
-
-<contactgroup name="Group with 5 existing contacts">
-   <members>
-      <contact-set-reference maxamount="5" id="1"/>
-   </members>
-</contactgroup>
-
-<contactgroup name="ExampleCompany&apos;s Designers">
-   <members>
-      <contact-set-reference id="2"/>
-   </members>
-</contactgroup>
-
-<contact>
-   <fields>
-      <firstname>John</firstname>
-      <lastname>Smith</lastname>
-      <mobilephonework>+35800101010101</mobilephonework>
-      <mobilephonework>00101010102</mobilephonework>
-      <emailgen>john.smith@example.com</emailgen>
-      <prefix>Mr.</prefix>
-   </fields>
-</contact>
-
-<contact-set id="2">
-   <contact amount="15">
-    <fields>
-    <firstname/>
-    <lastname/>
-    <mobilephonegen/>
-    <landphonegen/>
-    <emailgen/>
-    <videonumbergen/>
-    <voipgen/>
-    <poc/>
-    <company>ExampleCompany Ltd.</company>
-    <jobtitle>Software Designer</jobtitle>
-    <note/>
- 	<middlename/>
-    <secondname/>
-    <prefix/>
-    <suffix/>
-    <addrlabelgen/>
-    <addrpogen/>
-    <addrextgen/>
-    <addrstreetgen/>
-    <addrlocalgen/>
-    </fields>
-   </contact>
-</contact-set>
-
-</creatorscript>
--- a/creator/scripts/creator.xsd	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1187 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="0.1">
-
-<!-- Version 0.1 February 13th 2009: First version of the schema-->
-
-<xs:complexType name="entityfield">
-  <xs:simpleContent>
-    <xs:extension base="xs:string">
-      <!-- If not given, amount="1" is assumed -->
-      <xs:attribute name="amount" type="xs:positiveInteger" use="optional" />
-      <!-- This can be a numeric length (in bytes) "default" or "max", valid with random data only -->
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:element name="contact-set-reference">
-  <xs:complexType>
-    <xs:attribute name="id" type="xs:integer" use="required" />
-    <xs:attribute name="maxamount" type="xs:integer" use="optional" />
-  </xs:complexType>
-</xs:element>
-                  
-<xs:complexType name="contactfield" mixed="true">
-  <xs:sequence>
-    <xs:element ref="contact-set-reference" minOccurs="0" maxOccurs="unbounded" />
-  </xs:sequence>
-  <!-- If not given, amount="1" is assumed -->
-  <xs:attribute name="amount" type="xs:positiveInteger" use="optional" />
-  <xs:attribute name="incvalueforeachcopy" type="xs:boolean" use="optional" />
-</xs:complexType>
-
-<xs:complexType name="simplefield">
-  <xs:simpleContent>
-    <xs:extension base="xs:string">
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:group name="randomElements">
-  <xs:sequence>
-  </xs:sequence>
-</xs:group>
-
-<xs:simpleType name="fileidfield">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="3GPP-70kB" />
-    <xs:enumeration value="AAC-100kB" />
-    <xs:enumeration value="AMR-20kB" />
-    <xs:enumeration value="XLS-15kB" />
-    <xs:enumeration value="GIF-2kB" />
-    <xs:enumeration value="JPEG-200kB" />
-    <xs:enumeration value="JPEG-25kB" />
-    <xs:enumeration value="JPEG-500kB" />
-    <xs:enumeration value="MIDI-10kB" />
-    <xs:enumeration value="MP3-250kB" />
-    <xs:enumeration value="PNG-15kB" />
-    <xs:enumeration value="PPT-40kB" />
-    <xs:enumeration value="RM-95kB" />
-    <xs:enumeration value="RNG-1kB" />
-    <xs:enumeration value="TXT-10kB" />
-    <xs:enumeration value="TXT-70kB" />
-    <xs:enumeration value="WAV-20kB" />
-    <xs:enumeration value="DOC-20kB" />
-    <xs:enumeration value="SWF-15kB" />
-    <xs:enumeration value="JAD-1kB" />
-    <xs:enumeration value="JAR-10kB" />
-    <xs:enumeration value="TIF-25kB" />
-    <xs:enumeration value="MXMF-40kB" />
-    <xs:enumeration value="BMP-25kB" />
-    <xs:enumeration value="JP2-65kB" />
-    <xs:enumeration value="SVG-15kB" />
-    <xs:enumeration value="HTML-20kB" />
-    <xs:enumeration value="VCF-1kB" />
-    <xs:enumeration value="VCS-1kB" />
-    <xs:enumeration value="MP4-200kB" />
-    <xs:enumeration value="SISX-10kB" />
-    <xs:enumeration value="RAM-1kB" />
-    <xs:enumeration value="WMV-200kB" />
-    <xs:enumeration value="WMA-50kB" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="syncfield">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="public" />
-    <xs:enumeration value="private" />
-    <xs:enumeration value="none" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="datetimeemptyfield">
-  <xs:union>
-    <xs:simpleType>
-      <xs:restriction base="xs:string">
-        <xs:minLength value="0" />
-        <xs:maxLength value="0" />
-      </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType>
-      <xs:restriction base="xs:dateTime" />
-    </xs:simpleType>
-    <xs:simpleType>
-      <xs:restriction base="xs:date" />
-    </xs:simpleType>
-  </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="integerEmptyType">
-  <xs:union>
-    <xs:simpleType>
-      <xs:restriction base="xs:string">
-        <xs:minLength value="0" />
-        <xs:maxLength value="0" />
-      </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType>
-      <xs:restriction base="xs:integer" />
-    </xs:simpleType>
-  </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="positiveIntegerEmptyType">
-  <xs:union>
-    <xs:simpleType>
-      <xs:restriction base="xs:string">
-        <xs:minLength value="0" />
-        <xs:maxLength value="0" />
-      </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType>
-      <xs:restriction base="xs:positiveInteger" />
-    </xs:simpleType>
-  </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="datetimefield">
-  <xs:union>
-    <xs:simpleType>
-      <xs:restriction base="xs:dateTime" />
-    </xs:simpleType>
-    <xs:simpleType>
-      <xs:restriction base="xs:date" />
-    </xs:simpleType>
-  </xs:union>
-</xs:simpleType>
-
-<xs:group name="contactElements">
-  <xs:sequence>
-    <xs:element name="firstname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="lastname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="company" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="jobtitle" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="prefix" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="suffix" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="secondname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrlabelgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrpogen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrextgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrstreetgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrlocalgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrregiongen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrpostcodegen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrcountrygen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrlabelhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrpohome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrexthome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrstreethome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrlocalhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrregionhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrpostcodehome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrcountryhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrlabelwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrpowork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrextwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrstreetwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrlocalwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrregionwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrpostcodework" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="addrcountrywork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="poc" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="swis" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="sip" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="dtmfstring" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="middlename" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="department" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="asstname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="spouse" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="children" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="locprivacy" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="genlabel" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="wvaddress" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="thumbnailpath" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="thumbnailid" minOccurs="0" maxOccurs="unbounded" type="fileidfield" />
-    <xs:element name="callerobjtext" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="landphonegen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="landphonehome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="landphonework" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="mobilephonegen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="mobilephonehome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="mobilephonework" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="faxnumbergen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="faxnumberhome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="faxnumberwork" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="pagernumber" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="videonumbergen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="videonumberhome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="videonumberwork" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="voipgen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="voiphome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="voipwork" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="asstphone" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="carphone" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
-    <xs:element name="urlgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="urlhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="urlwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="emailgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="emailhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="emailwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="ringtonepath" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="ringtoneid" minOccurs="0" maxOccurs="unbounded" type="fileidfield" />
-    <xs:element name="callerobjimg" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-    <xs:element name="birthday" minOccurs="0" maxOccurs="unbounded" type="datetimeemptyfield" />
-    <xs:element name="anniversary" minOccurs="0" maxOccurs="unbounded" type="datetimeemptyfield" />
-    <xs:element name="synchronization" minOccurs="0" maxOccurs="unbounded" type="syncfield" />
-  </xs:sequence>
-</xs:group>
-  
-<xs:element name="contact">
-  <xs:annotation>
-    <xs:documentation>
-      There are three different contact related elements: contact, contact-set and contactgroup. The contact element describes one
-      contact in a database. The contact can be defined explicitly by giving the contact fields and their data, or it can just define the fields to be
-      used and let the Creator fill the fields with random data. There can also be several same type of fields, for example multiple emailwork fields.
-
-      When contact is defined without fields sub-element, a contact with all fields containing default length random data is created.
-    </xs:documentation>
-  </xs:annotation>
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" minOccurs="0" maxOccurs="1">
-        <xs:complexType>
-          <xs:choice minOccurs="0" maxOccurs="unbounded">
-            <xs:group ref="contactElements" minOccurs="0" maxOccurs="unbounded" />
-          </xs:choice>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="contact-set">
-  <xs:annotation>
-    <xs:documentation>
-      The contact-set element can be used to bind multiple contacts together and linking them to contactgroups, messages and
-      calendars. When contact-set is used as a link target it must have a unique id attribute. See example usage of contact-set in
-      contactEx.creatorxml.
-    </xs:documentation>
-  </xs:annotation>
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element ref="contact" minOccurs="0" maxOccurs="unbounded" />
-    </xs:sequence>
-    <xs:attribute name="id" use="required" type="xs:integer" />
-    <xs:attribute name="numberofexistingcontacts" type="xs:integer" use="optional">
-      <xs:annotation>
-        <xs:documentation>
-          Amount of members in the group. Indicates how many existing contacts should be taken to the set. 
-        </xs:documentation>
-      </xs:annotation>
-    </xs:attribute>
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="contactgroup">
-  <xs:annotation>
-    <xs:documentation>
-      The contactgroup element describes one contact group that should be created to the device's database. 
-    </xs:documentation>
-  </xs:annotation>
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="members" maxOccurs="1">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element ref="contact-set-reference" maxOccurs="unbounded" />
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <xs:attribute name="name" type="xs:string" use="optional" />
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="calendar">
-  <xs:annotation>
-    <xs:documentation>
-      Note: If alarmtime element is not set, alarm is set as not active and if alarmtime is set, alarm is set to active.
-      Note: If recurrentfrequency is not set, or set to not-repeated recurrentinterval will be skipped, even if set.
-    </xs:documentation>
-  </xs:annotation>
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields">
-        <xs:complexType>
-          <xs:all>
-            <xs:element name="summary" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="description" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="location" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="starttime" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
-            <xs:element name="endtime" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
-            <xs:element name="creationperiodstartdate" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
-            <xs:element name="creationperiodenddate" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
-            <xs:element name="recurrentfrequency" minOccurs="0" maxOccurs="1" type="eventRecurrentfrequencyType" />
-            <xs:element name="recurrentinterval" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
-            <xs:element name="recurrentfrom" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
-            <xs:element name="recurrentto" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
-            <xs:element name="alarmtime" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
-            <xs:element name="synchronization" minOccurs="0" maxOccurs="1" type="syncfield" />
-            <xs:element name="organizername" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="organizeremail" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="status" minOccurs="0" maxOccurs="1" type="eventStatusType" />
-            <xs:element name="priority" minOccurs="0" maxOccurs="1" type="eventPriorityType" />
-            <xs:element ref="attendees" minOccurs="0" maxOccurs="1" />
-          </xs:all>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="type" use="required" type="eventType" />
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:simpleType name="eventType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="appointment" />
-    <xs:enumeration value="event" />
-    <xs:enumeration value="reminder" />
-    <xs:enumeration value="todo" />
-    <xs:enumeration value="anniversary" />
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="eventRecurrentfrequencyType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="not-repeated" />
-    <xs:enumeration value="daily" />
-    <xs:enumeration value="weekly" />
-    <xs:enumeration value="monthly" />
-    <xs:enumeration value="yearly" />
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="eventStatusType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="tentative" />
-    <xs:enumeration value="confirmed" />
-    <xs:enumeration value="cancelled" />
-    <xs:enumeration value="todoneedsaction" />
-    <xs:enumeration value="todocompleted" />
-    <xs:enumeration value="todoinprocess" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-    
-<xs:simpleType name="eventPriorityType">
-  <xs:union>
-    <xs:simpleType>
-      <xs:restriction base="xs:integer">
-        <xs:minInclusive value="0" />
-        <xs:maxInclusive value="255" />
-      </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType>
-      <xs:restriction base="xs:string">
-        <xs:enumeration value="high" />
-        <xs:enumeration value="medium" />
-        <xs:enumeration value="low" />
-        <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-      </xs:restriction>
-    </xs:simpleType>
-  </xs:union>
-</xs:simpleType>
-
-<xs:element name="attendees">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element ref="contact-set-reference" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="attendee" minOccurs="0" maxOccurs="unbounded">
-        <xs:complexType>
-          <xs:all>
-            <xs:element name="commonname" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="email" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="role" minOccurs="0" maxOccurs="1" type="attendeeRoleType" />
-            <xs:element name="status" minOccurs="0" maxOccurs="1" type="attendeeStatusType" />
-          </xs:all>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-</xs:element>
-
-<xs:simpleType name="attendeeRoleType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="required" />
-    <xs:enumeration value="optional" />
-    <xs:enumeration value="non-participant" />
-    <xs:enumeration value="chair" />
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="attendeeStatusType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="needsaction" />
-    <xs:enumeration value="accepted" />
-    <xs:enumeration value="tentative" />
-    <xs:enumeration value="confirmed" />
-    <xs:enumeration value="declined" />
-    <xs:enumeration value="completed" />
-    <xs:enumeration value="delegated" />
-    <xs:enumeration value="inprocess" />
-  </xs:restriction>
-</xs:simpleType>
-    
-<xs:group name="bookmarkElements">
-  <xs:sequence> <!-- Element order is fixed. This enables using both minOccurs="1" and maxOccurs="1". -->
-    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="url" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="username" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="password" minOccurs="1" maxOccurs="1" type="entityfield" />
-  </xs:sequence>
-</xs:group>
-
-<xs:element name="bookmark">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields">
-        <xs:complexType>
-          <xs:choice minOccurs="0" maxOccurs="1">
-            <xs:group ref="randomElements" minOccurs="0" maxOccurs="1" />
-            <xs:group ref="bookmarkElements" minOccurs="0" maxOccurs="1" />
-          </xs:choice>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="bookmarkfolder">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger"/>
-  </xs:complexType>
-</xs:element>
-
-<xs:group name="savedpageElements">
-  <xs:sequence>
-    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="path" minOccurs="1" maxOccurs="1" type="entityfield" />
-  </xs:sequence>
-</xs:group>
-
-<xs:group name="savedpageElementsReverse">
-  <xs:sequence>
-    <xs:element name="path" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
-  </xs:sequence>
-</xs:group>
-
-<xs:element name="savedpage">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:choice minOccurs="0" maxOccurs="1">
-            <xs:group ref="randomElements" minOccurs="0" maxOccurs="1" />
-            <xs:group ref="savedpageElements" minOccurs="0" maxOccurs="1" />
-            <xs:group ref="savedpageElementsReverse" minOccurs="0" maxOccurs="1" />
-          </xs:choice>
-          <!-- If not given, amount="1" is assumed -->
-          <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="savedpagefolder">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:all>
-            <xs:element name="name" minOccurs="0" maxOccurs="1" type="entityfield" />
-          </xs:all>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="note">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="text" minOccurs="0" maxOccurs="1" type="entityfield" />
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="log">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:all>
-            <xs:element name="direction" minOccurs="1" maxOccurs="1" type="logDirectionType" />
-            <xs:element name="datetime" minOccurs="1" maxOccurs="1" type="entityfield" />
-            <xs:element name="phonenumber" minOccurs="1" maxOccurs="1" type="entityfield" />
-            <xs:element name="duration" minOccurs="0" maxOccurs="1" type="entityfield" />
-          </xs:all>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:simpleType name="logDirectionType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="missed" />
-    <xs:enumeration value="in" />
-    <xs:enumeration value="out" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:element name="connectionmethod">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:all>
-            <xs:element name="connectionname" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="bearertype" minOccurs="0" maxOccurs="1" type="connBearerType" />
-            <xs:element name="startpage" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="wapwspoption" minOccurs="0" maxOccurs="1" type="wapwspoptionType" />
-            <xs:element name="protocoltype" minOccurs="0" maxOccurs="1" type="connProtocolType" />
-            <xs:element name="loginname" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="secureauthentication" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="loginpass" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="promptpassword" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="gatewayaddress" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="subnetmask" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="deviceipaddr" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="ip4nameserver1" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="ip4nameserver2" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="datacalltelnumber" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="datacalltypeisdn" minOccurs="0" maxOccurs="1" type="datacalltypeisdnType" />
-            <xs:element name="datacalllinespeed" minOccurs="0" maxOccurs="1" type="datacalllinespeedType" />
-            <xs:element name="useproxy" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="proxyserveraddress" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="proxyportnumber" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="ip6nameserver1" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="ip6nameserver2" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="disabletextauth" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="wlanname" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="wlanipaddr" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="wlansecmode" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="wlannetmode" minOccurs="0" maxOccurs="1" type="entityfield" />
-          </xs:all>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:simpleType name="connBearerEnumType"> 
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="WLAN" />
-    <xs:enumeration value="GPRS" />
-    <xs:enumeration value="datacall" />
-    <xs:enumeration value="HSGSM" />
-    <xs:enumeration value="embedded" />
-    <xs:enumeration value="VPN" />
-    <xs:enumeration value="LAN" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="connBearerType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="connBearerEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="connProtocolEnumType"> 
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="IPV4" />
-    <xs:enumeration value="ipv4" />
-    <xs:enumeration value="Ipv4" />
-    <xs:enumeration value="iPv4" />
-    <xs:enumeration value="ipV4" />
-    <xs:enumeration value="IPv4" />
-    <xs:enumeration value="IpV4" />
-    <xs:enumeration value="iPV4" />
-    <xs:enumeration value="IPV6" />
-    <xs:enumeration value="ipv6" />
-    <xs:enumeration value="Ipv6" />
-    <xs:enumeration value="iPv6" />
-    <xs:enumeration value="ipV6" />
-    <xs:enumeration value="IPv6" />
-    <xs:enumeration value="IpV6" />
-    <xs:enumeration value="iPV6" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="connProtocolType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="connProtocolEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="datacalltypeisdnEnumType"> 
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="analogue" />
-    <xs:enumeration value="isdnv110" />
-    <xs:enumeration value="isdnv120" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="datacalltypeisdnType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="datacalltypeisdnEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="datacalllinespeedEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="automatic" />
-    <xs:enumeration value="9600" />
-    <xs:enumeration value="14400" />
-    <xs:enumeration value="19200" />
-    <xs:enumeration value="28800" />
-    <xs:enumeration value="38400" />
-    <xs:enumeration value="43200" />
-    <xs:enumeration value="56000" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="datacalllinespeedType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="datacalllinespeedEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="wapwspoptionEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="connectionless" />
-    <xs:enumeration value="connectionoriented" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="wapwspoptionType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="wapwspoptionEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:element name="mailbox">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:all>
-            <xs:element name="name" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <!-- Incoming mail (POP3/IMAP4) settings -->
-            <xs:element name="incomingport" minOccurs="0" maxOccurs="1" type="positiveIntegerEmptyType" />
-
-            <!-- Specifies whether a secure TLS connection will be established directly over a TLS socket when connecting to the email server -->
-            <xs:element name="incomingsslwrapper" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <!-- Specifies whether a secure socket session will be negotiated after establishing a non-secure TCP connection with the email server -->
-            <xs:element name="incomingsecuresockets" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="incomingloginname" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="incomingpassword" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="incomingservername" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="incomingconnectionmethod" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <!-- Send return receipts to senders -->
-            <xs:element name="acknowledgereceipts" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <!-- maximum attachment size limit for the partial fetch of attachments in a message -->
-            <xs:element name="attachmentsizelimit" minOccurs="0" maxOccurs="1" type="integerEmptyType" />
-            <xs:element name="autosendonconnect" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="bodytextsizelimit" minOccurs="0" maxOccurs="1" type="integerEmptyType" />
-            <xs:element name="deletemailsatdisconnect" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <!-- Specifies the IMAP fetch size in bytes -->
-            <xs:element name="attachmentfetchsize" minOccurs="0" maxOccurs="1" type="positiveIntegerEmptyType" />
-            <xs:element name="incomingfolderpath" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="pathseparator" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="getemailoptions" minOccurs="0" maxOccurs="1" type="getEmailOptionsType" />
-            <!-- Specifies whether the IMAP IDLE command should be used as defined in RFC2177 -->
-            <xs:element name="imapidlecommand" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="imapidletimeout" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
-            <!-- Sets the maximum message size in bytes to be downloaded -->
-            <xs:element name="maxemailsize" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
-            <!-- Sets the method for synchronising IMAP4 subscription information with a server -->
-            <xs:element name="subscribetype" minOccurs="0" maxOccurs="1" type="mailboxSubscribeType" />
-            <!-- Specifies the rate in seconds at which the Inbox will be refreshed when connected -->
-            <xs:element name="syncrate" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
-            <!-- Sets the method for synchronising folder information with the server -->
-            <xs:element name="foldersynctype" minOccurs="0" maxOccurs="1" type="mailboxFolderSyncType" />
-            <!-- Specifies whether the seen flag is to be set on the IMAP4 server during synchronisation only when the message has been marked as read -->
-            <xs:element name="markseeninsync" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="enableexpungemode" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="useapopsecurelogin" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="inboxsynclimit" minOccurs="0" maxOccurs="1" type="syncLimitType" />
-            <xs:element name="mailboxsynclimit" minOccurs="0" maxOccurs="1" type="syncLimitType" />
-            <xs:element name="disconnectedusermode" minOccurs="0" maxOccurs="1" type="yesNoType" />
-
-            <!-- Outgoing mail (SMTP) settings -->
-            <xs:element name="outgoingport" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
-            <xs:element name="outgoingsslwrapper" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="outgoingsecuresockets" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="outgoingloginname" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="outgoingpassword" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="outgoingservername" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="outgoingconnectionmethod" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="includesignature" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="addvcard" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="ownemail" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="emailalias" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="receiptaddress" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="replytoaddress" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="requestreceipts" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="smtpauth" minOccurs="0" maxOccurs="1" type="yesNoType" />
-            <xs:element name="copytoself" minOccurs="0" maxOccurs="1" type="copyToSelfType" />
-            <xs:element name="sendoption" minOccurs="0" maxOccurs="1" type="sendOptionType" />
-            <xs:element name="toccincludelimit" minOccurs="0" maxOccurs="1" type="integerEmptyType" />
-          </xs:all>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-    <xs:attribute name="type" use="required" type="mailboxType" />
-  </xs:complexType>
-</xs:element>
-
-<xs:simpleType name="mailboxType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="POP3" />
-    <xs:enumeration value="IMAP4" />
-    <xs:enumeration value="syncml" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="yesNoEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="yes" />
-    <xs:enumeration value="no" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="yesNoType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="yesNoEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="getEmailOptionsEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="getheaders" />
-    <xs:enumeration value="getbodytext" />
-    <xs:enumeration value="getbodytextandattachments" />
-    <xs:enumeration value="getattachments" />
-    <xs:enumeration value="getbodyalternativetext" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="getEmailOptionsType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="getEmailOptionsEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="syncLimitEnumType">
-  <xs:union>
-    <xs:simpleType>
-      <xs:restriction base="xs:integer">
-        <xs:minInclusive value="1" />
-        <xs:maxInclusive value="999" />
-      </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType>
-      <xs:restriction base="xs:string">
-        <xs:enumeration value="all" />
-        <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-      </xs:restriction>
-    </xs:simpleType>
-  </xs:union>
-</xs:simpleType>
-
-<xs:complexType name="syncLimitType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="syncLimitEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="mailboxSubscribeEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="updateneither" />
-    <xs:enumeration value="updatelocal" />
-    <xs:enumeration value="updateremote" />
-    <xs:enumeration value="updateboth" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="mailboxSubscribeType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="mailboxSubscribeEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="mailboxFolderSyncEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="usecombination" />
-    <xs:enumeration value="uselocal" />
-    <xs:enumeration value="useremote" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="mailboxFolderSyncType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="mailboxFolderSyncEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="copyToSelfEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="no" />
-    <xs:enumeration value="to" />
-    <xs:enumeration value="cc" />
-    <xs:enumeration value="bcc" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="copyToSelfType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="copyToSelfEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:simpleType name="sendOptionEnumType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="immediately" />
-    <xs:enumeration value="onnextconnection" />
-    <xs:enumeration value="onrequest" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="sendOptionType"> <!-- type with both enum value restriction and randomlength attribute  -->
-  <xs:simpleContent>
-    <xs:extension base="sendOptionEnumType">
-      <xs:attribute name="randomlength" type="xs:string" use="optional" />
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-
-<xs:element name="message">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:sequence> <!-- Element order is fixed. This enables using both maxOccurs="unbounded" and maxOccurs="1". -->
-            <xs:element name="to" minOccurs="0" maxOccurs="unbounded" type="contactfield"/>
-            <xs:element name="from" minOccurs="0" maxOccurs="1" type="contactfield"/>
-            <xs:element name="folder" minOccurs="0" maxOccurs="1" type="messageFolderType" />
-            <xs:element name="subject" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="text" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="status" minOccurs="0" maxOccurs="1" type="messageStatusType" />
-            <xs:element name="smartmessagetype" minOccurs="0" maxOccurs="1" type="smartMessageType" />
-            <xs:element name="attachmentpath" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-            <xs:element name="attachmentid" minOccurs="0" maxOccurs="unbounded" type="fileidfield" />
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-    <xs:attribute name="type" use="required" type="messageType" />
-  </xs:complexType>
-</xs:element>
-
-<xs:simpleType name="messageType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="sms" />
-    <xs:enumeration value="mms" />
-    <xs:enumeration value="ams" />
-    <xs:enumeration value="email" />
-    <xs:enumeration value="smart" />
-    <xs:enumeration value="ir" />
-    <xs:enumeration value="bt" />
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="messageFolderType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="sent" />
-    <xs:enumeration value="inbox" />
-    <xs:enumeration value="draft" />
-    <xs:enumeration value="outbox" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="messageStatusType">
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="read" />
-    <xs:enumeration value="new" />
-    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="smartMessageType"> <!-- Currently not supported by S60 Creator -->
-  <xs:restriction base="xs:string">
-    <xs:enumeration value="internetsettings" />
-    <xs:enumeration value="emailnotification" />
-    <xs:enumeration value="businesscard" />
-    <xs:enumeration value="wapsettings" />
-    <xs:enumeration value="vcalendar" />
-    <xs:enumeration value="vcard" />
-    <xs:enumeration value="ringtone" />
-    <xs:enumeration value="operatorlogo" />
-    <xs:enumeration value="wapprovisioning" />
-    <xs:enumeration value="clilogo" />
-  </xs:restriction>
-</xs:simpleType>
-
-<xs:group name="impsserverElements">
-  <xs:sequence> <!-- Element order is fixed. This enables using both minOccurs="1" and maxOccurs="1". -->
-    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="url" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="username" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="password" minOccurs="1" maxOccurs="1" type="entityfield" />
-    <xs:element name="connectionmethodname" minOccurs="1" maxOccurs="1" type="entityfield" />
-  </xs:sequence>
-</xs:group>
- 
-<xs:element name="impsserver">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:choice minOccurs="0" maxOccurs="1">
-            <xs:group ref="randomElements" minOccurs="0" maxOccurs="1" />
-            <xs:group ref="impsserverElements" minOccurs="0" maxOccurs="1" />
-          </xs:choice>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
- 
-<xs:element name="file">
-  <xs:annotation>
-    <xs:documentation>
-      Note: If type is not set, a directory will be created. 
-    </xs:documentation>
-  </xs:annotation>
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:all>
-            <xs:element name="type" minOccurs="1" maxOccurs="1" type="fileidfield" />
-            <xs:element name="directory" minOccurs="1" maxOccurs="1" type="entityfield" />
-            <xs:element ref="encryption" minOccurs="0" maxOccurs="1" />
-          </xs:all>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="encryption"> <!-- Random values not supported inside encryption element -->
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element ref="right" minOccurs="0" maxOccurs="4" />
-    </xs:sequence>
-    <xs:attribute name="type" use="required">
-      <xs:simpleType>
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="DRM-FL" />
-          <xs:enumeration value="DRM-CD" />
-        </xs:restriction>
-      </xs:simpleType>
-    </xs:attribute>
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="right">
-  <xs:complexType>
-    <xs:all>
-      <xs:element name="count" minOccurs="0" maxOccurs="1" type="xs:nonNegativeInteger" />
-      <xs:element name="starttime" minOccurs="0" maxOccurs="1" type="datetimefield" />
-      <xs:element name="endtime" minOccurs="0" maxOccurs="1" type="datetimefield" />
-      <xs:element name="interval" minOccurs="0" maxOccurs="1" type="xs:duration" />
-      <xs:element name="accumulated" minOccurs="0" maxOccurs="1" type="xs:duration" />
-    </xs:all>
-    <xs:attribute name="type" default="display">
-      <xs:simpleType>
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="play" />
-          <xs:enumeration value="display" />
-          <xs:enumeration value="execute" />
-          <xs:enumeration value="print" />
-        </xs:restriction>
-      </xs:simpleType>
-    </xs:attribute>
-  </xs:complexType>
-</xs:element>
-
-<xs:element name="landmark">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element name="fields" maxOccurs="1">
-        <xs:complexType>
-          <xs:sequence> <!-- Element order is fixed. This enables using both maxOccurs="unbounded" and maxOccurs="1". -->
-            <xs:element name="name" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
-            <xs:element name="description" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="street" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="postalcode" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="city" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="state" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="country" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="phonenbr" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="url" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="latitude" minOccurs="0" maxOccurs="1" type="entityfield">
-              <xs:annotation>
-                <xs:documentation>
-                  Data can have following format: -nn.nnnn - nn.nnnn, where positive latitude means north and negative south, zero
-                  point is Equator.
-                </xs:documentation>
-              </xs:annotation>
-            </xs:element>
-            <xs:element name="longitude" minOccurs="0" maxOccurs="1" type="entityfield">
-              <xs:annotation>
-                <xs:documentation>
-                  Data can have following format: -nn.nnnn - nn.nnnn, where positive longitude means east and negative west, zero
-                  point is Prime Meridian.
-                </xs:documentation>
-              </xs:annotation>
-            </xs:element>
-            <xs:element name="positionaccuracy" minOccurs="0" maxOccurs="1" type="entityfield" />
-            <xs:element name="altitude" minOccurs="0" maxOccurs="1" type="entityfield">
-              <xs:annotation>
-                <xs:documentation>
-                  Data can have following format: -nn.nnnn - nn.nnnn, where zero point is sea level.
-                </xs:documentation>
-              </xs:annotation>
-            </xs:element>
-            <xs:element name="altitudeaccuracy" minOccurs="0" maxOccurs="1" type="entityfield" />
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-    </xs:sequence>
-    <!-- If not given, amount="1" is assumed -->
-    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
-  </xs:complexType>
-</xs:element>
-
-<xs:group name="creatorscriptElements">
-  <xs:sequence>
-    <xs:element ref="contact" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="contact-set" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="contactgroup" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="calendar" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="bookmark" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="bookmarkfolder" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="savedpage" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="savedpagefolder" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="note" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="log" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="connectionmethod" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="mailbox" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="message" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="impsserver" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="file" minOccurs="0" maxOccurs="unbounded" />
-    <xs:element ref="landmark" minOccurs="0" maxOccurs="unbounded" />
-  </xs:sequence>
-</xs:group>
-
-<xs:element name="creatorscript">
-  <xs:annotation>
-    <xs:documentation>
-      Root element of a Creator script. The sub-elements can be thought as 'commands', e.g. one contact element with explicitly
-      defined fields create one contact to the database of the device. 
-    </xs:documentation>
-  </xs:annotation>
-  <xs:complexType>
-    <xs:choice minOccurs="0" maxOccurs="unbounded">
-      <xs:group ref="creatorscriptElements" minOccurs="0" maxOccurs="unbounded" />
-    </xs:choice>
-    <xs:attribute name="scriptVersion" use="optional" type="xs:string">
-      <xs:annotation>
-        <xs:documentation>
-          Declares the script version. Can be used to indicate the evolution of each script. 
-    </xs:documentation>
-      </xs:annotation>
-    </xs:attribute>
-    <xs:attribute name="schemaVersion" use="required" type="xs:string">
-      <xs:annotation>
-        <xs:documentation>
-          Declares the schema version used when designing a script file. This version information must be in sync with the schema used. Schema version is defined
-          at the beginning of the creator.xsd file in comment block.
-    </xs:documentation>
-      </xs:annotation>
-    </xs:attribute>
-  </xs:complexType>
-</xs:element>
-
-</xs:schema>
\ No newline at end of file
--- a/creator/scripts/filesEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-
-<!-- Create one jpg image file -->
-<file>
-    <fields>
-        <type>JPEG-25kB</type>
-        <directory>c:\data\images</directory>
-    </fields>
-</file>
-
-<!-- Create two midi files with DRM Forward Lock protection -->
-<file amount="2">
-    <fields>
-        <type>MIDI-10kB</type>
-        <directory>c:\data\Sounds</directory>
-        <encryption type="DRM-FL">
-        </encryption>
-    </fields>
-</file>
-
-<!-- Create one DRM protected 3GPP video file with specific access constraints -->
-<file>
-    <fields>
-        <type>3GPP-70kB</type>
-        <directory>c:\data\Videos</directory>
-        <!-- Define DRM Combined Delivery encryption type -->
-        <encryption type="DRM-CD">
-            <right type="play">
-                <!-- Define 21min 1s accumulated time constraint -->
-                <accumulated>P0Y0M0DT0H21M1S</accumulated>
-                <!-- Define that the content can only be played twice -->
-                <count>2</count>
-            </right>
-        </encryption>
-    </fields>
-</file>
-
-<!-- Create one DRM protected gif image file with specific access constraints -->
-<file>
-    <fields>
-        <type>GIF-2kB</type>
-        <directory>c:\data\Images</directory>
-        <!-- Define DRM Combined Delivery encryption type -->
-        <encryption type="DRM-CD">            
-            <right type="display">
-                <!-- Define that the content can be accessed 1,5h after first access -->
-                <interval>P0Y0M0DT1H30M0S</interval>
-                <!-- Define timeframe in which the content can be accessed -->
-                <starttime>2008-09-26T13:49:57</starttime>
-                <endtime>2009-03-27T16:15:00</endtime>
-            </right>
-        </encryption>
-    </fields>
-</file>
-
-</creatorscript>
--- a/creator/scripts/impsEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<!-- Create an IMPS server -->
-<impsserver>
-    <fields>
-        <name>Creator_test_imps</name>
-        <url/>
-        <username/>
-        <password/>
-        <connectionmethodname/>
-    </fields>
-</impsserver>
-
-</creatorscript>
\ No newline at end of file
--- a/creator/scripts/landmarkEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<!-- Create a landmark with all possible categories -->
-<landmark>
-  <fields>
-    <name>CreatorExample</name>
-    <category>accommodation</category>
-    <category>business</category>
-    <category>communication</category>
-    <category>educational</category>
-    <category>entertainment</category>
-    <category>food</category>
-    <category>geographical</category>
-    <category>outdoor</category>
-    <category>people</category>
-    <category>public</category>
-    <category>religious</category>
-    <category>shopping</category>
-    <category>sightseeing</category>
-    <category>sports</category>
-    <category>transport</category>
-    <description>This is an example landmark!</description>
-    <street>Landmark street 1</street>
-    <postalcode>00445</postalcode>
-    <city>Landmark City</city>
-    <state>Landmark State</state>
-    <country>Landmark Country</country>
-    <phonenbr>111222333</phonenbr>
-    <url>http://www.example.net</url>
-    <latitude>-76.0023</latitude>
-    <longitude>98.1002</longitude>
-    <positionaccuracy>2</positionaccuracy>
-    <altitude>-4.1</altitude>
-    <altitudeaccuracy>3</altitudeaccuracy>
-  </fields>
-</landmark>
-        
-<!-- Create 3 random landmarks -->
-<landmark amount="10">
-    <fields>
-        <name/>
-        <category/>
-        <description/>        
-        <latitude/>
-        <longitude/>        
-    </fields>
-</landmark>
-
-</creatorscript>
\ No newline at end of file
--- a/creator/scripts/logEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<!-- Create one missed call -->
-<log>
-   <fields>
-	<direction>missed</direction>
-	<datetime>2008-03-25T13:11:21</datetime>
-	<phonenumber>1115555554112</phonenumber>
-   </fields>
-</log>
-
-<!-- Create one received call -->
-<log>
-   <fields>
-        <direction>in</direction>
-        <datetime>2008-03-24T10:21:56</datetime>
-        <phonenumber>11155554112</phonenumber>
-        <duration>241</duration>
-   </fields>
-</log>
-
-<!-- Create one dialled call -->
-<log>
-   <fields>
-        <direction>out</direction>
-        <datetime>2008-03-22T12:01:06</datetime>
-        <phonenumber>0555554555</phonenumber>
-        <duration>445</duration>
-   </fields>
-</log>
-
-<!-- Create 5 random entries -->
-<log amount="5">
-   <fields>
-        <direction/>
-        <datetime/>
-        <phonenumber/>
-        <duration/>
-   </fields>
-</log>
-
-</creatorscript>
--- a/creator/scripts/mailboxEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<mailbox type="POP3">
-   <fields>
-      <name>cr_pop mail</name>
-      <ownemail/>
-      <copytoself/>
-      <useapopsecurelogin>yes</useapopsecurelogin>
-      <incomingsslwrapper>no</incomingsslwrapper>
-      <incomingsecuresockets>no</incomingsecuresockets>
-      <incomingloginname/>
-      <incomingpassword/>
-      <incomingservername/>
-   </fields>
-</mailbox>
-<mailbox type="IMAP4">
-   <fields>
-      <name>cr_imap4 mail</name>
-      <ownemail>creator@example.net</ownemail>
-      <copytoself>cc</copytoself>
-      <incomingsslwrapper>yes</incomingsslwrapper>
-      <incomingsecuresockets>yes</incomingsecuresockets>
-      <incomingloginname>creator</incomingloginname>
-      <incomingpassword>creator</incomingpassword>
-      <incomingservername>cr_mail.example.net</incomingservername>
-      <acknowledgereceipts>no</acknowledgereceipts>
-      <autosendonconnect>no</autosendonconnect>
-      <deletemailsatdisconnect>no</deletemailsatdisconnect>
-      <getemailoptions>getbodytextandattachments</getemailoptions>
-   </fields>
-</mailbox>
-</creatorscript>
--- a/creator/scripts/messagesEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<contact-set id="1">
-   <contact amount="6">
-      <fields>
-         <firstname/>
-         <lastname/>
-         <mobilephonegen/>
-         <emailgen/>
-      </fields>
-   </contact>
-</contact-set>
-
-<message amount="5" type="sms">
-   <fields>
-      <to/>
-      <folder>inbox</folder>
-      <text>This is an example SMS created by Creator.</text>
-      <status>new</status>
-   </fields>
-</message>
-
-<message type="mms">
-   <fields>
-      <to/>
-      <folder>sent</folder>
-      <subject>Good music!</subject>
-      <status>new</status>
-      <attachmentid>MP3-250kB</attachmentid>
-   </fields>
-</message>
-
-<message type="email">
-   <fields>
-      <from>
-         <contact-set-reference id="1"/>
-      </from> 
-      <folder>inbox</folder>
-      <subject/>
-      <text randomlength="max"/>
-      <status>new</status>
-      <attachmentid>JPEG-200kB</attachmentid>
-   </fields>
-</message>
-
-<message amount="5" type="sms">
-   <fields>
-      <from incvalueforeachcopy="true">123456</from>
-      <folder>inbox</folder>
-      <text>This is an example SMS created by Creator.</text>
-      <status>new</status>
-   </fields>
-</message>
-
-</creatorscript>
--- a/creator/scripts/notepadEx.creatorxml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<creatorscript schemaVersion="1.0" scriptVersion="1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="creator.xsd">
-
-<!-- Create a note -->
-<note>
-    <fields>
-        <text>This is a Creator example note!</text>
-    </fields>
-</note>
-        
-<!-- Create 3 random notes with default content -->
-<note amount="3">
-    <fields>
-        <text/>
-    </fields>
-</note>
-
-<!-- Create a random note with maximum length -->
-<note>
-    <fields>
-        <text randomlength="max"/>
-    </fields>
-</note>
-
-</creatorscript>
--- a/creator/sis/Creator_stub.pkg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-
-
-; Language - standard language definitions
-&EN
-
-; Standard SIS file header
-#{"Creator"},(0x20011383),1,0,0
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; normal stuff:
-""-"z:\sys\bin\creator.exe"
-""-"z:\resource\apps\creator.mif"
-""-"z:\resource\apps\creator.rsc"
-""-"z:\resource\apps\datacreator.rsc"
-""-"z:\private\10003a3f\import\apps\creator_reg.rsc"
-""-"z:\private\20011383\backup_registration.xml"
-
-; test data:
-""-"z:\private\20011383\3GPP-70kB.3gpp"
-""-"z:\private\20011383\AAC-100kB.aac"
-""-"z:\private\20011383\AMR-20kB.amr"
-""-"z:\private\20011383\BMP-25kB.bmp"
-""-"z:\private\20011383\Deck-1kB.saveddeck"
-""-"z:\private\20011383\DOC-20kB.doc"
-""-"z:\private\20011383\GIF-2kB.gif"
-""-"z:\private\20011383\HTML-20kB.html"
-""-"z:\private\20011383\JAD-1kB.jad"
-""-"z:\private\20011383\JAR-10kB.jar"
-""-"z:\private\20011383\JP2-65kB.jp2"
-""-"z:\private\20011383\JPEG-200kB.jpg"
-""-"z:\private\20011383\JPEG-25kB.jpg"
-""-"z:\private\20011383\JPEG-500kB.jpg"
-""-"z:\private\20011383\MIDI-10kB.mid"
-""-"z:\private\20011383\MP3-250kB.mp3"
-""-"z:\private\20011383\MP4-200kB.mp4"
-""-"z:\private\20011383\MXMF-40kB.mxmf"
-""-"z:\private\20011383\PNG-15kB.png"
-""-"z:\private\20011383\PPT-40kB.ppt"
-""-"z:\private\20011383\RAM-1kB.ram"
-""-"z:\private\20011383\RM-95kB.rm"
-""-"z:\private\20011383\RNG-1kB.rng"
-""-"z:\private\20011383\SVG-15kB.svg"
-""-"z:\private\20011383\SWF-15kB.swf"
-""-"z:\private\20011383\TIF-25kB.tif"
-""-"z:\private\20011383\TXT-10kB.txt"
-""-"z:\private\20011383\TXT-70kB.txt"
-""-"z:\private\20011383\VCF-1kB.vcf"
-""-"z:\private\20011383\VCS-1kB.vcs"
-""-"z:\private\20011383\WAV-20kB.wav"
-""-"z:\private\20011383\XLS-15kB.xls"
-""-"z:\private\20011383\SISX-10kB.sisx"
--- a/creator/src/engine.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2610 +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 <eikenv.h>
-#include <s32file.h> 
-#include <coemain.h>
-
-#include <driveinfo.h>
-
-#include <datacreator.rsg>
-
-#include "mainview.h"
-#include "engine.h"
-#include "enginewrapper.h"
-
-
-#include <cntdb.h>//For Math
-
-#include "creator_scriptentry.h"
-#include "creator_modulebase.h"
-//#include "creator_browser.h"
-#include "creator_calendar.h"
-#include "creator_phonebookbase.h"
-#include "creator_note.h"
-#include "creator_log.h"
-//#include "creator_connectionmethodbase.h"
-#include "creator_mailbox.h"
-//#include "creator_imps.h"
-#include "creator_message.h"
-#include "creator_landmark.h"
-
-
-#include "creator_traces.h"
-#include "creator_factory.h"
-#include "creator_scriptparser.h"
-#include "creator_file.h"
-#include "creator_cmdscriptrun.h"
-#include "creator_contactsetcache.h"
-
-#include <apparc.h>
-#include <eikappui.h>
-#include <eikapp.h>
-#include <bitmaptransforms.h>
-
-_LIT(KTempPathDrive, "d");
-_LIT(KTempPath, ":\\Creator\\");
-const TInt KRegisterDrive = EDriveC;
-_LIT(KRegisterFileName, "creator_created_items.dat");
-_LIT(KResourceFileName, "z:\\Resource\\apps\\datacreator.RSC");
-
-
-// ---------------------------------------------------------------------------
-
-CCreatorEngine* CCreatorEngine::NewL(EngineWrapper *aEngineWrapper)
-    {
-    CCreatorEngine* self = CCreatorEngine::NewLC(aEngineWrapper);
-    CleanupStack::Pop(); // self;
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CCreatorEngine* CCreatorEngine::NewLC(EngineWrapper *aEngineWrapper)
-    {
-    CCreatorEngine* self = new (ELeave) CCreatorEngine();
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngineWrapper);
-    return self;
-	}
-	
-// ---------------------------------------------------------------------------
-
-CCreatorEngine::CCreatorEngine() 
-: 
-CActive(0)
-{}
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::ConstructL(EngineWrapper *aEngineWrapper)
-    {
-    LOGSTRING("Creator: CCreatorEngine::ConstructL");
-
-    iEngineWrapper = aEngineWrapper;
-	iMemoryDetails.iENotAvailable = EFalse;
-	RequestMemoryDetails();
-    iEnv = CEikonEnv::Static();
-	// add second resource file to use for creator random data generation:
-	iResourceFileId = iEnv->AddResourceFileL(KResourceFileName);
-    User::LeaveIfError(iTimer.CreateLocal());
-
-    // these are needed by the random data generator
-    TTime now;
-    now.HomeTime();
-    iSeed=now.Int64();
-    
-    iTempPath = HBufC::NewL(KTempPathDrive().Length() + KTempPath().Length());
-    iTempPath->Des().Copy(KTempPathDrive);
-    iTempPath->Des().Append(KTempPath);
-	
-	iCmdScriptRun = CCreatorCmdScriptRun::NewL(this);
-
-    GetRandomDataFromFileL(KNullDesC);
-        
-    CActiveScheduler::Add(this);
-
-    }
-
-// ---------------------------------------------------------------------------
-
-CCreatorEngine::~CCreatorEngine()
-    {
-    LOGSTRING("Creator: CCreatorEngine::~CCreatorEngine");
-
-    Cancel();
-    
-    for( TInt i = 0; i < iStringArrays.Count(); ++i )
-        {
-        delete iStringArrays[i].iArrayPtr;
-        }
-    iStringArrays.Close();
-    iAllocatedFilePaths.ResetAndDestroy();
-    iAllocatedFilePaths.Close();
-    iTimer.Close();
-
-
-	iEnv->DeleteResourceFile(iResourceFileId);
-    
-	iMemoryDetailsList.Reset();
-    delete iPictureFileArray;
-    delete iSoundFileArray;
-    delete iTempPath;
-    delete iFrameImageData;
-    delete iEncoder;
-    delete iScaler;
-    delete iDecoder;
-    delete iScaledBitmap;
-    delete iBitmap;
-    delete iBitmapData;
-	
-    delete iCmdScriptRun;
-    iCmdScriptRun = NULL;
-    
-    delete iCommandParser;
-    }
-
-void CCreatorEngine::CopyFileL(const TFileName& aSourceFile, const TFileName& aTargetFile, TBool aOverwrite )
-	{
-	if( !aOverwrite && ConeUtils::FileExists(aTargetFile))
-		{
-		// File already exists
-		return;
-		}
-	
-	// Make sure that the path exists. Creates the directory if it does not exist already:
-	ConeUtils::EnsurePathExistsL(aTargetFile);	
-	User::LeaveIfError(BaflUtils::CopyFile(CEikonEnv::Static()->FsSession(), aSourceFile, aTargetFile));
-	}
-
-// ---------------------------------------------------------------------------
-	
-void CCreatorEngine::RequestMemoryDetails() 
-    {
-
-	TDriveList dl;
-    // variables for memory and disk handling
-    TVolumeInfo vinfo;
-
-    //*************************************************************************
-   
-    //*************************************************************************
-    // get an access to file server
-    RFs& fsSession = CEikonEnv::Static()->FsSession();
-
-    fsSession.DriveList(dl);
-    
-    for(TInt driveNum = EDriveC; driveNum <= EDriveZ ; driveNum ++ )
-    	{
-		if( dl[driveNum] )
-			{
-			TMemoryDetails *memDet = new TMemoryDetails;
-			if(fsSession.Volume(vinfo, driveNum) == KErrNone)
-				{
-				memDet->iFree.Num(TInt64(vinfo.iFree/1024));
-				memDet->iSize.Num(TInt64(vinfo.iSize/1024));
-				}
-			else
-				{
-				memDet->iFree.Num( 0 );
-				memDet->iSize.Num( 0 );
-				}
-			User::LeaveIfError(fsSession.DriveToChar(driveNum,memDet->iDriveLetter));
-			iMemoryDetailsList.AppendL( memDet );
-			}
-    	}
-  
-    // available work memory
-    TMemoryInfoV1Buf memory;
-    UserHal::MemoryInfo(memory);
-    TInt64 freeMemBytes=(TInt64)(memory().iFreeRamInBytes);
-    TInt64 sizeMemBytes=(TInt64)(memory().iTotalRamInBytes);
-    TInt64 sizeWorkMemBytes = sizeMemBytes; 
-    TInt64 sizeRomBytes = (TInt64)(memory().iTotalRomInBytes);
-    iMemoryDetails.iRamFree.Num(TInt64(freeMemBytes/1024));
-    iMemoryDetails.iRamSize.Num(TInt64(sizeWorkMemBytes/1024));
-    iMemoryDetails.iRomSize.Num(TInt64(sizeRomBytes/1024));
-    }
-
-// ---------------------------------------------------------------------------
-	
-TBool CCreatorEngine::MMC_OK() const
-	{
-	TBool MMCstatus = EFalse;
-
-	TDriveNumber eDrive=EDriveE;
-    TVolumeInfo vinfo;
-    TInt err = CEikonEnv::Static()->FsSession().Volume(vinfo, eDrive);
-	// check if we can access the E-drive:
-	if ( err == KErrNone)
-		{
-		MMCstatus = ETrue;
-		}
-	else
-		{
-		MMCstatus = EFalse;
-		}
-
-	// returns ETrue if MMC working properly
-	return MMCstatus;
-	}	
-	
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::ExecuteFirstCommandL(const TDesC& aText)
-    {
-    LOGSTRING("Creator: CCreatorEngine::ExecuteFirstCommand");
-
-    if( !iCommandArray->Count())
-        {
-        ShutDownEnginesL();
-        return;
-        }
-    
-    // show a progress dialog
-    iEngineWrapper->ShowProgressBar(aText, CommandArrayCount());	
-
-    iFailedCommands = 0;
-
-    // starts executing commands
-    ExecuteCommand();
-
-	
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::ExecuteCommand()
-    {
-    LOGSTRING("Creator: CCreatorEngine::ExecuteCommand");
-
-    // make sure the engine isn't active, should never happen
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("IsActive"), 500));
-
-    // execute a command after a very short delay (75ms)
-    iTimer.After(iStatus, 75);
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::RunL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::RunL");
-    LOGSTRING2("Creator: CCreatorEngine::RunL iCommandId=%d", iCommandArray->At(iCurrentEntry).iCommandId);
-    
-    if ( iUserCancelled ) 
-    	{
-    	return;
-    	}
-    
-    if (!iCommandArray->At(iCurrentEntry).iParameters)
-        {
-        LOGSTRING("Creator: CCreatorEngine::RunL - iParameters==NULL !");
-        }
-
-    // launch a command
-
-    TCreatorIds cmd = (TCreatorIds)iCommandArray->At(iCurrentEntry).iCommandId; 
-    switch( cmd )
-        {
-/*        
-	    case ECmdCreateBrowserBookmarkEntries: { iBrowser->CreateBookmarkEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-	    case ECmdCreateBrowserBookmarkFolderEntries: { iBrowser->CreateBookmarkFolderEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-	    case ECmdCreateBrowserSavedPageEntries: { iBrowser->CreateSavedDeckEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-	    case ECmdCreateBrowserSavedPageFolderEntries: { iBrowser->CreateSavedDeckFolderEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-*/	    
-        case ECmdCreateCalendarEntryAppointments: { iCalendar->CreateAppointmentEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
-	    case ECmdCreateCalendarEntryEvents: { iCalendar->CreateEventEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
-	    case ECmdCreateCalendarEntryAnniversaries: { iCalendar->CreateAnniversaryEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
-	    case ECmdCreateCalendarEntryToDos: { iCalendar->CreateTodoEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
-        case ECmdCreateCalendarEntryReminders: { iCalendar->CreateReminderEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
-
-	    
-	    case ECmdCreatePhoneBookEntryContacts: { iPhonebook->CreateContactEntryL(iCommandArray->At(iCurrentEntry).iParameters) ; } break;
-	    case ECmdCreatePhoneBookEntryGroups: { iPhonebook->CreateGroupEntryL(iCommandArray->At(iCurrentEntry).iParameters) ; } break;
-	    case ECmdCreatePhoneBookEntrySubscribedContacts: { iPhonebook->CreateSubscribedContactEntryL(iCommandArray->At(iCurrentEntry).iParameters) ; } break;
-
-	    case ECmdCreateMiscEntryNotes: { iNotepad->CreateNoteEntryL(reinterpret_cast<CNotepadParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-
-	    case ECmdCreateLogEntryMissedCalls: { iLogs->CreateMissedCallEntryL(reinterpret_cast<CLogsParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-	    case ECmdCreateLogEntryReceivedCalls: { iLogs->CreateReceivedCallEntryL(reinterpret_cast<CLogsParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-	    case ECmdCreateLogEntryDialledNumbers: { iLogs->CreateDialledNumberEntryL(reinterpret_cast<CLogsParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-/*
-        case ECmdCreateMiscEntryAccessPoints: { iAccessPoints->CreateConnectionSettingsEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
-        case ECmdDeleteIAPs: { iAccessPoints->DeleteAllL(); } break;
-        case ECmdDeleteCreatorIAPs: { iAccessPoints->DeleteAllCreatedByCreatorL(); } break;
-*/
-        case ECmdCreateMiscEntryLandmarks: { iLandmarks->CreateLandmarkEntryL(reinterpret_cast<CLandmarkParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-        
-	    case ECmdCreateMessagingEntryMailboxes: { iMailboxes->CreateMailboxEntryL(reinterpret_cast<CMailboxesParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-/*
-        #ifdef __PRESENCE
-  	     case ECmdCreateMiscEntryIMPSServers: { iIMPS->CreateIMPSServerEntryL(reinterpret_cast<CIMPSParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-        #endif
-*/
-	    case ECmdCreateMessagingEntryMessages:  { iMessages->CreateMessageEntryL(reinterpret_cast<CMessagesParameters*>(iCommandArray->At(iCurrentEntry).iParameters), ETrue); } break;
-	    case ECmdCreateMessagingEntryMessagesViaScript:  { iMessages->CreateMessageEntryL(reinterpret_cast<CMessagesParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
-
-	    case ECmdCreateRandomEntrySMSInbox:
-	    case ECmdCreateRandomEntrySMSDrafts:
-	    case ECmdCreateRandomEntrySMSOutbox:
-	    case ECmdCreateRandomEntrySMSSent:
-	    case ECmdCreateRandomEntryMMSInbox:
-	    case ECmdCreateRandomEntryMMSDrafts:
-	    case ECmdCreateRandomEntryMMSOutbox:
-	    case ECmdCreateRandomEntryMMSSent:
-	    case ECmdCreateRandomEntryAMSInbox:
-	    case ECmdCreateRandomEntryAMSDrafts:
-	    case ECmdCreateRandomEntryAMSOutbox:
-	    case ECmdCreateRandomEntryAMSSent:
-	    case ECmdCreateRandomEntryEmailInbox:
-	    case ECmdCreateRandomEntryEmailDrafts:
-	    case ECmdCreateRandomEntryEmailOutbox:
-	    case ECmdCreateRandomEntryEmailSent:
-	    case ECmdCreateRandomEntryBIOInbox:
-	    case ECmdCreateRandomEntryBIODrafts:
-	    case ECmdCreateRandomEntryBIOOutbox:
-	    case ECmdCreateRandomEntryBIOSent:
-	    case ECmdCreateRandomEntryIRInbox:
-	    case ECmdCreateRandomEntryIRDrafts:
-	    case ECmdCreateRandomEntryIROutbox:
-	    case ECmdCreateRandomEntryIRSent:
-	    case ECmdCreateRandomEntryBTInbox:
-	    case ECmdCreateRandomEntryBTDrafts:
-	    case ECmdCreateRandomEntryBTOutbox:
-	    case ECmdCreateRandomEntryBTSent:
-	            { iMessages->CreateRandomMessageEntryL(iCommandArray->At(iCurrentEntry).iCommandId); } break;
-
-        case ECmdCreateFileEntryEmptyFolder:
-        case ECmdCreateFileEntry3GPP_70kB:
-        case ECmdCreateFileEntryAAC_100kB:
-        case ECmdCreateFileEntryAMR_20kB:
-        case ECmdCreateFileEntryBMP_25kB:
-        case ECmdCreateFileEntryDeck_1kB:
-        case ECmdCreateFileEntryDOC_20kB:
-        case ECmdCreateFileEntryGIF_2kB:
-        case ECmdCreateFileEntryHTML_20kB:
-        case ECmdCreateFileEntryJAD_1kB:
-        case ECmdCreateFileEntryJAR_10kB:
-        case ECmdCreateFileEntryJP2_65kB:
-        case ECmdCreateFileEntryJPEG_200kB:
-        case ECmdCreateFileEntryJPEG_25kB:
-        case ECmdCreateFileEntryJPEG_500kB:
-        case ECmdCreateFileEntryMIDI_10kB:
-        case ECmdCreateFileEntryMP3_250kB:
-        case ECmdCreateFileEntryMP4_200kB:
-        case ECmdCreateFileEntryMXMF_40kB:
-        case ECmdCreateFileEntryPNG_15kB:
-        case ECmdCreateFileEntryPPT_40kB:
-        case ECmdCreateFileEntryRAM_1kB:
-        case ECmdCreateFileEntryRM_95kB:
-        case ECmdCreateFileEntryRNG_1kB:
-        case ECmdCreateFileEntrySVG_15kB:
-        case ECmdCreateFileEntrySWF_15kB:
-        case ECmdCreateFileEntryTIF_25kB:
-        case ECmdCreateFileEntryTXT_10kB:
-        case ECmdCreateFileEntryTXT_70kB:
-        case ECmdCreateFileEntryVCF_1kB:
-        case ECmdCreateFileEntryVCS_1kB:
-        case ECmdCreateFileEntryWAV_20kB:
-        case ECmdCreateFileEntryXLS_15kB:
-        case ECmdCreateFileEntrySISX_10kB:
-        case ECmdCreateFileEntryWMA_50kB:
-        case ECmdCreateFileEntryWMV_200kB:
-	            { iFiles->CreateFileEntryL( reinterpret_cast<CFilesParameters*>(iCommandArray->At(iCurrentEntry).iParameters), iCommandArray->At(iCurrentEntry).iCommandId ); } break;
-        case ECmdDeleteContacts:
-            {
-            iPhonebook->DeleteAllL(); 
-            break;
-            }
-        case ECmdDeleteContactGroups:
-            {
-            iPhonebook->DeleteAllGroupsL();
-            break;            
-            }
-        case ECmdDeleteCreatorContacts:
-            {
-            iPhonebook->DeleteAllCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteCreatorContactGroups:
-            {
-            iPhonebook->DeleteAllGroupsCreatedByCreatorL();
-            break;            
-            }
-        case ECmdDeleteCalendarEntries:
-            {
-            iCalendar->DeleteAllL();
-            break;
-            }
-        case ECmdDeleteCreatorCalendarEntries:
-            {
-            iCalendar->DeleteAllCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteLogs:
-            {
-            iLogs->DeleteAllL();
-            break;
-            }
-        case ECmdDeleteCreatorLogs:
-            {
-            iLogs->DeleteAllCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteMessages:
-            {
-            iMessages->DeleteAllL();
-            break;
-            }
-        case ECmdDeleteCreatorMessages:
-            {
-            iMessages->DeleteAllCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteLandmarks:
-            {
-            iLandmarks->DeleteAllL();
-            break;
-            }
-        case ECmdDeleteCreatorLandmarks:
-            {
-            iLandmarks->DeleteAllCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteMailboxes:
-            {
-            iMailboxes->DeleteAllL();
-            break;
-            }
-        case ECmdDeleteCreatorMailboxes:
-            {
-            iMailboxes->DeleteAllCreatedByCreatorL();
-            break;
-            }
-
-        case ECmdDeleteNotes:
-            {
-            iNotepad->DeleteAllL();
-            break;
-            }
-
-        case ECmdDeleteIMPSs:
-            {
-//            iIMPS->DeleteAllL();
-            break;
-            }
-        case ECmdDeleteCreatorIMPSs:
-            {
-//            iIMPS->DeleteAllCreatedByCreatorL();
-            break;
-            }
-/*            
-        case ECmdDeleteBrowserBookmarks:
-            {
-            iBrowser->DeleteAllBookmarksL();
-            break;
-            }
-        case ECmdDeleteCreatorBrowserBookmarks:
-            {
-            iBrowser->DeleteAllBookmarksCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteBrowserBookmarkFolders:
-            {
-            iBrowser->DeleteAllBookmarkFoldersL();
-            break;
-            }
-        case ECmdDeleteCreatorBrowserBookmarkFolders:
-            {
-            iBrowser->DeleteAllBookmarkFoldersCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteBrowserSavedPages:
-            {
-            iBrowser->DeleteAllSavedPagesL();
-            break;
-            }
-        case ECmdDeleteCreatorBrowserSavedPages:
-            {
-            iBrowser->DeleteAllSavedPagesCreatedByCreatorL();
-            break;
-            }
-        case ECmdDeleteBrowserSavedPageFolders:
-            {
-            iBrowser->DeleteAllSavedPageFoldersL();
-            break;
-            }
-        case ECmdDeleteCreatorBrowserSavedPageFolders:
-            {
-            iBrowser->DeleteAllSavedPageFoldersCreatedByCreatorL();
-            break;
-            }
-*/            
-        case ECmdDeleteCreatorFiles:
-            {
-            iFiles->DeleteAllCreatedByCreatorL();
-            break;
-            }
-        default:
-            User::Panic (_L("ExecuteOptionsMenuCommandL"), 205);
-            break;
-        }
-
-    TRAP_IGNORE( CheckForMoreCommandsL() );
-
-    }
-    
-CDesCArrayFlat* CCreatorEngine::PictureFilesL()
-    {
-    if( iPictureFileArray == 0 )
-        {
-        _LIT(KImageFile, "JPEG*.jpg");
-        _LIT(KImageFileDir, "C:\\Data\\");
-        _LIT(KImageFileDir2, "Z:\\Data\\");
-        iPictureFileArray = new (ELeave) CDesCArrayFlat(8);        
-        TInt err = CreatorFileUtils::FindFilesRecursiveL(iPictureFileArray, KImageFile, KImageFileDir);
-        if( iPictureFileArray->Count() == 0 )
-            {
-            err = CreatorFileUtils::FindFilesRecursiveL(iPictureFileArray, KImageFile, KImageFileDir2);
-            }
-        }
-    return iPictureFileArray;
-    }
-
-CDesCArrayFlat* CCreatorEngine::SoundFilesL()
-    {
-    if( iSoundFileArray == 0 )
-        {
-        _LIT(KSoundFile, "*.aac");
-        _LIT(KSoundFileDir, "Z:\\data\\Sounds\\");
-        iSoundFileArray = new (ELeave) CDesCArrayFlat(8);                  
-        TInt err = CreatorFileUtils::FindFilesRecursiveL(iSoundFileArray, KSoundFile, KSoundFileDir);
-        }
-    return iSoundFileArray;
-    }
-// ---------------------------------------------------------------------------
-
-TInt CCreatorEngine::RunError(TInt aError)
-    {
-    LOGSTRING2("Creator: CCreatorEngine::RunError %d", aError);
-    
-    iFailedCommands++;
-  
-    _LIT(KMessage, "Command error %d");
-    TBuf<128> noteMsg;
-    noteMsg.Format(KMessage, aError);
-//    iEnv->InfoMsg(noteMsg);
-	iEngineWrapper->ShowNote(noteMsg);  
-    TRAP_IGNORE( CheckForMoreCommandsL() );
-    
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::CheckForMoreCommandsL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL");
-    if ( iUserCancelled ) 
-		{
-		return;
-		}
-    // update the progress bar
-    //iProgressInfo->IncrementAndDraw(1);
-	iEngineWrapper->IncrementProgressbarValue();
-
-	// check if we have more commands to be executed
-	if (iCurrentEntry >= CommandArrayCount() - 1)
-		{
-        LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL all done");
-
-        // all done, free resources and show a note
-        ShutDownEnginesL();
-
-		//iProgressDialog->ProcessFinishedL();
-		
-		// remove the progress dialog from the screen
-        iEngineWrapper->CloseProgressbar();
-		
-		if (iFailedCommands == 0)
-		    {
-		    iEngineWrapper->ShowNote(_L("Done"));
-		    }
-		else
-		    {
-			_LIT(KMessage, "Done, %d commands failed");
-            TBuf<128> noteMsg;
-            noteMsg.Format(KMessage, iFailedCommands);
-			iEngineWrapper->ShowNote(noteMsg);
-		    }
-		
-	    iCmdScriptRun->RunScriptDone();
-
-		}
-	else
-		{
-		// maintain requests
-		iCurrentEntry++;
-
-        LOGSTRING2("Creator: CCreatorEngine::CheckForMoreCommandsL iCurrentEntry=%d", iCurrentEntry);
-
-        ExecuteCommand();
-		}
-    }
-
-// ---------------------------------------------------------------------------
-void CCreatorEngine::SortCommands()
-	{
-	TKeyArrayFix iBufKey(_FOFF(TCommand, iCommandId),ECmpTInt);
-	iCommandArray->Sort(iBufKey);
-	}
-// ---------------------------------------------------------------------------
-
-// This callback function is called when cancel button of the progress bar was pressed
-
-void CCreatorEngine::ProgressDialogCancelledL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::ProgressDialogCancelledL");
-
-        iUserCancelled = ETrue;
-        // cancel the active object, command executer 
-        Cancel();
-
-        // delete parameters from the command array, otherwise there might be memory leaks
-        for (TInt i=iCurrentEntry; i<CommandArrayCount(); i++)
-            {
-            if ( iCommandArray->At(i).iParameters )
-				{
-                delete iCommandArray->At(i).iParameters;
-                iCommandArray->At(i).iParameters = NULL;
-				}
-            }
-
-        if ( iDecoder  )
-            {
-            iDecoder->Cancel();
-            // CancelComplete() will be called from GenerateSourceImageFileL
-            }
-        else if ( iScaler )
-            {
-            iScaler->Cancel();
-            // CancelComplete() will be called from GenerateSourceImageFileL
-            }
-        else if ( iEncoder  )
-            {
-            iEncoder->Cancel();
-            // CancelComplete() will be called from GenerateSourceImageFileL
-            }
-        else
-            {
-            // free resources and show a note
-            ShutDownEnginesL();
-            iEngineWrapper->ShowNote(_L("Cancelled"));
-            }
-        
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::StartEnginesL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::StartEnginesL");
-    
-    // reset user cancel flag
-    iUserCancelled = EFalse;
-    
-    // start from the beginning
-    iCurrentEntry = 0;
-
-    // init the command array
-    __ASSERT_ALWAYS(!iCommandArray, User::Panic(_L("iCommandArray"), 701));
-    iCommandArray = new(ELeave) CCommandArray(10000);
-
-    // init all modules here
-    TInt err(KErrNone);
-//    TRAP(err, iBrowser = CCreatorBrowser::NewL(this));
-    TRAP(err, iCalendar = CCreatorInterimCalendar::NewL(this));
-    TRAP(err, iPhonebook = (CCreatorPhonebookBase*)TCreatorFactory::CreatePhoneBookL(this)); 
-    TRAP(err, iNotepad = CCreatorNotepad::NewL(this));
-    TRAP(err, iLogs = CCreatorLogs::NewL(this));
-//    TRAP(err, iAccessPoints = (CCreatorConnectionSettingsBase*)TCreatorFactory::CreateConnectionSettingsL(this));
-    TRAP(err, iMailboxes = CCreatorMailboxes::NewL(this));
-    TRAP(err, iFiles = CCreatorFiles::NewL(this));
-    TRAP(err, iMessages = CCreatorMessages::NewL(this));
-    TRAP(err, iLandmarks = CCreatorLandmarks::NewL(this));
-    ContactLinkCache::InitializeL();
-/*
-    #ifdef __PRESENCE
-      TRAP(err, iIMPS = CCreatorIMPS::NewL(this));
-    #endif 
-*/
-      
-      
-    // ...
-    // ...
-    // ...
-
-    }
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::ShutDownEnginesL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::ShutDownEnginesL");
-
-        
-    // delete all modules here and free resources which aren't anymore needed
-
-/*
-    #ifdef __PRESENCE
-     delete iIMPS;
-     iIMPS = NULL;
-    #endif
-*/
-    delete iMessages;
-    iMessages = NULL;
-    delete iFiles;
-    iFiles = NULL;
-    delete iMailboxes;
-    iMailboxes = NULL;
- //   delete iAccessPoints;
-//    iAccessPoints = NULL;
-    delete iLogs;
-    iLogs = NULL;
-    delete iNotepad;
-    iNotepad = NULL;
-    delete iPhonebook;
-    iPhonebook = NULL;
-    delete iCalendar;
-    iCalendar = NULL;
- //   delete iBrowser;
- //   iBrowser = NULL;
-    delete iLandmarks;
-    iLandmarks = NULL;
-
-    ContactLinkCache::DestroyL();
-    // now delete the command array
-    delete iCommandArray;
-    iCommandArray = NULL;
-	
-	// delete parameter array
-	iParameterArray.ResetAndDestroy();
-	iParameterArray.Close();
-	
-	if(iCommandParser)
-	    {
-        delete iCommandParser;
-	    iCommandParser = NULL;
-	    }
-    
-    
-	// clear temp drive
-	CFileMan* fileMan = CFileMan::NewL( iEnv->FsSession() );
-	CleanupStack::PushL( fileMan );
-	fileMan->RmDir( iTempPath->Des() );
-	CleanupStack::PopAndDestroy(); //fileMan
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::DoCancel()
-    {
-    LOGSTRING("Creator: CCreatorEngine::DoCancel");
-
-    iTimer.Cancel();
-    }
-
-void CCreatorEngine::ScriptChosenL( TBool aSuccess, const TDesC& aFileName )
-    {
-    if( aSuccess )
-        {
-        // open the file for reading
-        RFile scriptFile;
-        User::LeaveIfError( scriptFile.Open( iEnv->FsSession(), aFileName, EFileRead ) );
-        CleanupClosePushL(scriptFile);
-    
-        
-        // wait dialog
-        /* TODO
-        CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
-        waitDialog->SetSoftkeys( R_AVKON_SOFTKEYS_CANCEL );
-        TInt dialogId = waitDialog->ShowNoteL( EAknGlobalWaitNote, _L("Parsing") );
-        */
-        TInt parseErr( KErrNone );
-        CCreatorScriptParser* scriptParser = CCreatorScriptParser::NewLC(this);
-        scriptParser->ParseL(scriptFile);
-        parseErr = scriptParser->GetError();
-        CleanupStack::PopAndDestroy( scriptParser );
-    
-        CleanupStack::PopAndDestroy( &scriptFile );
-    
-        //waitDialog->CancelNoteL( dialogId );
-        //CleanupStack::PopAndDestroy( waitDialog );
-    
-        if(parseErr != KErrNone)
-            {
-            // show error note
-            _LIT(KErrMsg, "Parser error: %d");
-            TBuf<32> msgBuf;
-            msgBuf.Format(KErrMsg, parseErr);
-            iEngineWrapper->ShowErrorMessage(msgBuf);
-            ShutDownEnginesL();
-            return;
-            }         
-        }
-
-    // start executing commands if commands in the command array
-    if (CommandArrayCount() > 0)
-        {
-        ExecuteFirstCommandL( KSavingText );
-        }
-    else
-        {
-        ShutDownEnginesL();
-        }
-    }
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::RunScriptL()
-    {
-    LOGSTRING("Creator: CCreatorEngine::RunScriptL");
-
-    // startup modules (also inits the command array):
-    StartEnginesL();
-
-    // use the command parser module to init the command array from a script file
-    delete iCommandParser;
-    iCommandParser = NULL;
-    iCommandParser = CCommandParser::NewL(this);
-    TBool ret = EFalse;
-    TRAPD(err, ret = iCommandParser->OpenScriptL( this ) );
-    if( err != KErrNone || ret == EFalse)
-        {
-        ShutDownEnginesL();
-        User::LeaveIfError(err);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CCreatorEngine::RunScriptL(const TDesC& aScriptFile)
-    {
-    LOGSTRING("Creator: CCreatorEngine::RunScriptL");
-
-    // startup modules (also inits the command array):
-    StartEnginesL();
-
-    RFile scriptFile;
-    if (scriptFile.Open(CEikonEnv::Static()->FsSession(), aScriptFile, EFileRead) != KErrNone)
-    	{
-    	ShutDownEnginesL();
-    	return KErrNotFound; // file error
-    	}
-    
-    CleanupClosePushL(scriptFile);
-    CCreatorScriptParser* scriptParser = CCreatorScriptParser::NewLC(this);
-    scriptParser->ParseL(scriptFile);
-    TInt err = scriptParser->GetError();
-    CleanupStack::PopAndDestroy(); //scriptParser
-    CleanupStack::Pop(); // scriptFile
-    scriptFile.Close();
-        
-    if (err != KErrNone)
-        {
-        ShutDownEnginesL();
-        return KErrCorrupt; // parser error
-        }         
-
-    // start executing commands if commands in the command array
-    if (CommandArrayCount() > 0)
-        {
-        ExecuteFirstCommandL( KSavingText );
-        return KErrNone; // executing commands is started
-        }
-    else
-        {
-        ShutDownEnginesL();
-        return KErrCompletion; // nothing to do
-        }
-    }
-
-// ---------------------------------------------------------------------------
-void CCreatorEngine::QueryDialogClosedL( TBool aPositiveAction, TInt aUserData )
-    {
-    LOGSTRING("Creator: CCreatorEngine::QueryDialogClosedL");
-    
-    if( aPositiveAction == EFalse )
-        {
-        ShutDownEnginesL();
-        return;
-        }
-
-    switch(aUserData)
-        {
-        case ECreatorEngineDeleteAllEntries:
-            AppendToCommandArrayL( ECmdDeleteContacts, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteContactGroups, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCalendarEntries, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteBrowserBookmarks, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteBrowserBookmarkFolders, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteBrowserSavedPages, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteBrowserSavedPageFolders, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteLogs, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteMessages, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteIAPs, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteIMPSs, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteNotes, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteLandmarks, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorFiles, NULL, 1 );
-            
-            // started exucuting delete commands
-            ExecuteFirstCommandL( KDeletingText );
-            break;
-        case ECreatorEngineDeleteAllCreatorEntries:
-            AppendToCommandArrayL( ECmdDeleteCreatorContacts, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorContactGroups, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorCalendarEntries, NULL, 1 );
-            /*
-            AppendToCommandArrayL( ECmdDeleteCreatorBrowserBookmarks, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorBrowserBookmarkFolders, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorBrowserSavedPages, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorBrowserSavedPageFolders, NULL, 1 );
-            */
-            AppendToCommandArrayL( ECmdDeleteCreatorFiles, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorLogs, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorMessages, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteCreatorIAPs, NULL, 1 );
-            //AppendToCommandArrayL( ECmdDeleteCreatorIMPSs, NULL, 1 );
-            AppendToCommandArrayL( ECmdDeleteCreatorLandmarks, NULL, 1 );
-            
-            // started exucuting delete commands
-            ExecuteFirstCommandL( KDeletingText );
-            break;
-        default:
-            //some error
-             ShutDownEnginesL();
-            break;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::ExecuteOptionsMenuCommandL(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorEngine::ExecuteOptionsMenuCommandL");
-
-    // startup modules (also inits the command array):
-    StartEnginesL();
-
-    // set the home module
-    switch(aCommand)
-        {
-/*
-        case ECmdCreateBrowserBookmarkEntries:
-	    case ECmdCreateBrowserBookmarkFolderEntries:
-	    case ECmdCreateBrowserSavedPageEntries:
-	    case ECmdCreateBrowserSavedPageFolderEntries:
-	    case ECmdDeleteBrowserBookmarks:
-	    case ECmdDeleteBrowserBookmarkFolders:
-	    case ECmdDeleteBrowserSavedPages:
-	    case ECmdDeleteBrowserSavedPageFolders:
-        case ECmdDeleteCreatorBrowserBookmarks:
-        case ECmdDeleteCreatorBrowserBookmarkFolders:
-        case ECmdDeleteCreatorBrowserSavedPages:
-        case ECmdDeleteCreatorBrowserSavedPageFolders:
-            {
-            iUsedOptionsMenuModule = iBrowser;
-            }
-            break;
-*/	    
-        case ECmdCreateCalendarEntryAppointments:
-	    case ECmdCreateCalendarEntryEvents:
-	    case ECmdCreateCalendarEntryAnniversaries:
-	    case ECmdCreateCalendarEntryToDos:
-	    case ECmdCreateCalendarEntryReminders:
-	    case ECmdDeleteCalendarEntries:
-	    case ECmdDeleteCreatorCalendarEntries:
-            {
-            iUsedOptionsMenuModule = iCalendar;
-            }
-            break;
-
-	    case ECmdCreatePhoneBookEntryContacts:
-	    case ECmdCreatePhoneBookEntryGroups:
-	    case ECmdCreatePhoneBookEntrySubscribedContacts:
-	    case ECmdDeleteContacts:
-	    case ECmdDeleteCreatorContacts:
-        case ECmdDeleteContactGroups:
-        case ECmdDeleteCreatorContactGroups:
-            {
-            iUsedOptionsMenuModule = iPhonebook;
-            }
-            break;
-
-	    case ECmdCreateMiscEntryNotes:
-	    case ECmdDeleteNotes:
-            {
-            iUsedOptionsMenuModule = iNotepad;
-            }
-            break;
-
-	    case ECmdCreateLogEntryMissedCalls:
-	    case ECmdCreateLogEntryReceivedCalls:
-	    case ECmdCreateLogEntryDialledNumbers:
-	    case ECmdDeleteLogs:
-	    case ECmdDeleteCreatorLogs:
-            {
-            iUsedOptionsMenuModule = iLogs;
-            }
-            break;
-/*
-	    case ECmdCreateMiscEntryAccessPoints:
-	    case ECmdDeleteIAPs:
-	    case ECmdDeleteCreatorIAPs:
-            {
-            iUsedOptionsMenuModule = iAccessPoints;
-            }
-            break;
-*/
-	    case ECmdCreateMessagingEntryMailboxes:
-	    case ECmdDeleteMailboxes:
-	    case ECmdDeleteCreatorMailboxes:
-            {
-            iUsedOptionsMenuModule = iMailboxes;
-            }
-            break;
-/*
-        #ifdef __PRESENCE
-	      case ECmdCreateMiscEntryIMPSServers:
-	      case ECmdDeleteIMPSs:
-	      case ECmdDeleteCreatorIMPSs:
-            {
-            iUsedOptionsMenuModule = iIMPS;
-            }
-            break;
-        #endif
-*/
-	      case ECmdCreateFileEntryEmptyFolder:
-	      case ECmdCreateFileEntry3GPP_70kB:
-	      case ECmdCreateFileEntryAAC_100kB:
-	      case ECmdCreateFileEntryAMR_20kB:
-	      case ECmdCreateFileEntryBMP_25kB:
-	      case ECmdCreateFileEntryDeck_1kB:
-	      case ECmdCreateFileEntryDOC_20kB:
-	      case ECmdCreateFileEntryGIF_2kB:
-	      case ECmdCreateFileEntryHTML_20kB:
-	      case ECmdCreateFileEntryJAD_1kB:
-	      case ECmdCreateFileEntryJAR_10kB:
-	      case ECmdCreateFileEntryJP2_65kB:
-	      case ECmdCreateFileEntryJPEG_200kB:
-	      case ECmdCreateFileEntryJPEG_25kB:
-	      case ECmdCreateFileEntryJPEG_500kB:
-	      case ECmdCreateFileEntryMIDI_10kB:
-	      case ECmdCreateFileEntryMP3_250kB:
-	      case ECmdCreateFileEntryMP4_200kB:
-	      case ECmdCreateFileEntryMXMF_40kB:
-	      case ECmdCreateFileEntryPNG_15kB:
-	      case ECmdCreateFileEntryPPT_40kB:
-	      case ECmdCreateFileEntryRAM_1kB:
-	      case ECmdCreateFileEntryRM_95kB:
-	      case ECmdCreateFileEntryRNG_1kB:
-	      case ECmdCreateFileEntrySVG_15kB:
-	      case ECmdCreateFileEntrySWF_15kB:
-	      case ECmdCreateFileEntryTIF_25kB:
-	      case ECmdCreateFileEntryTXT_10kB:
-	      case ECmdCreateFileEntryTXT_70kB:
-	      case ECmdCreateFileEntryVCF_1kB:
-	      case ECmdCreateFileEntryVCS_1kB:
-	      case ECmdCreateFileEntryWAV_20kB:
-	      case ECmdCreateFileEntryXLS_15kB:
-	      case ECmdCreateFileEntrySISX_10kB:
-	      case ECmdCreateFileEntryWMA_50kB:
-	      case ECmdCreateFileEntryWMV_200kB:
-	      case ECmdDeleteCreatorFiles:
-
-            {
-            iUsedOptionsMenuModule = iFiles;
-            }
-            break;
-
-
-        case ECmdCreateMessagingEntryMessages:
-        case ECmdDeleteMessages:
-        case ECmdDeleteCreatorMessages:
-            {
-            iUsedOptionsMenuModule = iMessages;
-            }
-            break;
-            
-        case ECmdCreateMiscEntryLandmarks:
-        case ECmdDeleteLandmarks:
-        case ECmdDeleteCreatorLandmarks:
-            {
-            iUsedOptionsMenuModule = iLandmarks;
-            }
-            break;
-        case ECmdDeleteAllEntries:
-        case ECmdDeleteAllCreatorEntries:
-            {
-            break;
-            }
-        default:
-            User::Panic (_L("ExecuteOptionsMenuCommandL"), 201);
-            break;
-        }
-
-
-    //If it's a delete command, asking do you really want to delete
-    if( IsDeleteCommand( aCommand ) )
-        {
-        if ( aCommand == ECmdDeleteAllEntries )
-            {
-            if ( !iEngineWrapper->YesNoQueryDialog( _L("Delete all entries?"), this, ECreatorEngineDeleteAllEntries) )
-                {
-                // cancelled, free resources
-                ShutDownEnginesL();
-                }
-            }
-        else if ( aCommand == ECmdDeleteAllCreatorEntries )
-            {
-            if ( !iEngineWrapper->YesNoQueryDialog( _L("Delete all entries created with Creator?"), this, ECreatorEngineDeleteAllCreatorEntries ) )
-                {
-                // cancelled, free resources
-                ShutDownEnginesL();
-                }
-            }
-        else if ( !iUsedOptionsMenuModule->AskDataFromUserL( aCommand )  )
-            {
-            // cancelled or error, free resources
-            ShutDownEnginesL();
-            }
-        }
-
-    // ask user data, if query accepted start processing...
-    else if (!iUsedOptionsMenuModule->AskDataFromUserL(aCommand))
-        {
-        // cancelled or error, free resources
-        ShutDownEnginesL();
-        }
-    }
-
-
-
-TBool CCreatorEngine::IsDeleteCommand(TInt aCommand)
-    {
-    LOGSTRING("Creator: CCreatorEngine::IsDeleteCommand");
-
-    switch(aCommand)
-        {
-        //Add supported delete command here        
-        case ECmdDeleteAllEntries:
-        case ECmdDeleteAllCreatorEntries:
-        case ECmdDeleteEntries:
-        case ECmdDeleteContacts:
-        case ECmdDeleteCreatorContacts:
-        case ECmdDeleteContactGroups:
-        case ECmdDeleteCreatorContactGroups:
-        case ECmdDeleteCalendarEntries:
-        case ECmdDeleteCreatorCalendarEntries:
-        case ECmdDeleteBrowserBookmarks:
-        case ECmdDeleteCreatorBrowserBookmarks:
-        case ECmdDeleteBrowserBookmarkFolders:
-        case ECmdDeleteCreatorBrowserBookmarkFolders:
-        case ECmdDeleteBrowserSavedPages:
-        case ECmdDeleteCreatorBrowserSavedPages:
-        case ECmdDeleteBrowserSavedPageFolders:
-        case ECmdDeleteCreatorBrowserSavedPageFolders:
-        case ECmdDeleteCreatorFiles:
-        case ECmdDeleteLogs:
-        case ECmdDeleteCreatorLogs:
-        case ECmdDeleteMessages:
-        case ECmdDeleteCreatorMessages:
-        case ECmdDeleteMailboxes:
-        case ECmdDeleteCreatorMailboxes:
-        case ECmdDeleteIAPs:
-        case ECmdDeleteCreatorIAPs:
-        case ECmdDeleteIMPSs:
-        case ECmdDeleteCreatorIMPSs:
-        case ECmdDeleteNotes:
-        case ECmdDeleteLandmarks:
-        case ECmdDeleteCreatorLandmarks:
-            {
-            return ETrue;
-            }
-        default:
-            {
-            return EFalse;
-            }
-        }
-     
-    }
-// ---------------------------------------------------------------------------
-void CCreatorEngine::RandomDataFileChosenL( TBool aSuccess, const TDesC& aFileName )
-    {
-    if( aSuccess )
-        {
-        GetRandomDataFromFileL( aFileName );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-TBool CCreatorEngine::GetRandomDataL()
-	{
-    delete iCommandParser;
-    iCommandParser = NULL;
-    iCommandParser = CCommandParser::NewL( this );
-	return iCommandParser->GetRandomDataFilenameL( this );
-	}
-
-// ---------------------------------------------------------------------------
-
-TBool CCreatorEngine::GetRandomDataFromFileL(const TDesC& aFilename)
-	{
-    // wait dialog
-	// TODO
-    //CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
-    //waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
-    //TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Reading random data"));
-
-    for (TInt i = 0; i < iStringArrays.Count(); ++i)
-        {
-        delete iStringArrays[i].iArrayPtr;
-        }
-    iStringArrays.Reset();
-
-    TBool errorDetected = EFalse;
-
-    // NOTE: These must be exactly in same order as in enumeration:
-
-    if (ReadRandomDataL(EFirstName, R_DATA_FIRSTNAMES, aFilename, CCreatorRandomDataParser::EFirstName) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(ESurname, R_DATA_SURNAMES, aFilename, CCreatorRandomDataParser::ESurname) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(ECompany, R_DATA_COMPANIES, aFilename, CCreatorRandomDataParser::ECompany) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EAddress, R_DATA_ADDRESSES, aFilename, CCreatorRandomDataParser::EAddress) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EJobTitle, R_DATA_JOBTITLES, aFilename, CCreatorRandomDataParser::EJobTitle) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EPhoneNumber, R_DATA_PHONENUMBERS, aFilename, CCreatorRandomDataParser::EPhoneNumber) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EGroupName, R_DATA_GROUPNAMES, aFilename, CCreatorRandomDataParser::EGroupName) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EMeetingReason, R_DATA_MEETINGREASONS, aFilename, CCreatorRandomDataParser::EMeetingReason) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EMeetingPlace, R_DATA_MEETINGPLACES, aFilename, CCreatorRandomDataParser::EMeetingPlace) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EMemoText, R_DATA_MEMOS, aFilename, CCreatorRandomDataParser::EMemoText) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EAnniversaryReason, R_DATA_ANNIVERSARIES, aFilename, CCreatorRandomDataParser::EAnniversaryReason) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EToDoText, R_DATA_TODOS, aFilename, CCreatorRandomDataParser::EToDoText) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EReminderText, R_DATA_REMINDERS, aFilename, CCreatorRandomDataParser::EReminderText) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EMessageSubject, R_DATA_MESSAGESUBJECTS, aFilename, CCreatorRandomDataParser::EMessageSubject) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EMessageText, R_DATA_MESSAGETEXTS, aFilename, CCreatorRandomDataParser::EMessageText) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(ECity, R_DATA_CITIES, aFilename, CCreatorRandomDataParser::ECity) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(ECountry, R_DATA_COUNTRIES, aFilename, CCreatorRandomDataParser::ECountry) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EPostcode, R_DATA_POSTCODES, aFilename, CCreatorRandomDataParser::EPostcode) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EState, R_DATA_STATES, aFilename, CCreatorRandomDataParser::EState) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EPobox, R_DATA_POBOXES, aFilename, CCreatorRandomDataParser::EPobox) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(EPrefix, R_DATA_PREFIXES, aFilename, CCreatorRandomDataParser::EPrefix) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(ESuffix, R_DATA_SUFFIXES, aFilename, CCreatorRandomDataParser::ESuffix) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(ELandmarkName, R_DATA_LANDMARK_NAMES, aFilename, CCreatorRandomDataParser::ELandmarkName) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    if (ReadRandomDataL(ELandmarkDescription, R_DATA_LANDMARK_DESCRIPTIONS, aFilename, CCreatorRandomDataParser::ELandmarkDescription) != KErrNone)
-    	{
-    	errorDetected = ETrue;
-    	}
-    
-    // remove the wait dialog
-    //waitDialog->CancelNoteL(dialogId);
-    //CleanupStack::PopAndDestroy(waitDialog);
-    
-    if (errorDetected)
-    	{
-		iEngineWrapper->ShowNote(_L("Error in reading random data."));
-   	}
-    return !errorDetected;
-	}
-
-// ---------------------------------------------------------------------------
-
-TInt CCreatorEngine::ReadRandomDataL(const TRandomStringType aRandomStringType,
-		                             const TInt aResourceId,
-		                             const TDesC& aFilename,
-		                             const CCreatorRandomDataParser::TRandomDataType aRandomDataType)
-	{
-	TInt error = KErrNone;
-	if (aFilename == KNullDesC)
-		{
-        iStringArrays.AppendL(TStringArrayPtr(aRandomStringType, iEnv->ReadDesCArrayResourceL(aResourceId)));
-		}
-	else
-		{
-	    CCreatorRandomDataParser* dataParser = CCreatorRandomDataParser::NewLC();
-		CDesCArrayFlat* array = NULL;
-	
-		TRAP(error, array = dataParser->ParseL(aFilename, aRandomDataType));
-		if (error == KErrNone)
-			{
-			error = dataParser->GetError();
-			}
-	    if ((error == KErrNone) && (array->MdcaCount() > 0))
-	    	{
-	    	iStringArrays.AppendL(TStringArrayPtr(aRandomStringType, array));
-	    	}
-	    else
-	    	{
-	    	if (array)
-	    		{
-	    		array->Reset();
-	    		delete array;
-	    		}
-	        iStringArrays.AppendL(TStringArrayPtr(aRandomStringType, iEnv->ReadDesCArrayResourceL(aResourceId)));
-	    	}
-		CleanupStack::PopAndDestroy(dataParser);
-		}
-	return error;
-	}
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::AppendToCommandArrayL(TInt aCommand, CCreatorModuleBaseParameters* aParameters, TInt aNumberOfEntries)
-    {
-    LOGSTRING("Creator: CCreatorEngine::AppendToCommandArrayL");
-    iParameterArray.AppendL(aParameters);
-
-    for (TInt i=0; i<aNumberOfEntries; i++)
-        iCommandArray->AppendL( TCommand(aCommand, aParameters) );
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CCreatorEngine::CommandArrayCount()
-    {
-    TInt count(0);
-    
-    if (iCommandArray)
-        count = iCommandArray->Count();
-    
-    LOGSTRING2("Creator: CCreatorEngine::CommandArrayCount returns %d", count);
-    
-    return count;
-    }
-
-// ---------------------------------------------------------------------------
-
-//returs fileid by its name, eg. 1 in 
-TInt CCreatorEngine::GetAttachmentIdL( const TDesC& aAttachmentIdStr ) const
-    {
-    TInt mapCount = sizeof(FileMap) / sizeof(FileMapping);
-    
-    for( TInt i = 0; i < mapCount; ++i )
-        {
-        if( FileMap[i].FileName() == aAttachmentIdStr )
-            return FileMap[i].FileId();
-        }
-    LOGSTRING2("CCreatorEngine::GetAttachmentIdL: Unknown attachment file id: %s", &aAttachmentIdStr);
-    User::Leave(KErrGeneral);
-    return KErrNotFound; // Not reached, but disables a compiler warning
-    }
-
-// ---------------------------------------------------------------------------
-
-// returns a random string from the resource files
-TPtrC CCreatorEngine::TestDataPathL (enum TTestDataPath aTestDataPath )
-    {
-    LOGSTRING("Creator: CCreatorEngine::TestDataPathL");
-
-    static TFileName filePath;
-
-    switch (aTestDataPath )
-        {
-        case ESavedDeck_1kB:
-            {
-            filePath.Copy (_L("Deck-1kB.saveddeck") );
-            }
-            break;
-    
-        case EJPEG_25kB:
-            {
-            filePath.Copy (_L("JPEG-25kB.jpg") );
-            }
-            break;
-    
-        case EJPEG_200kB:
-            {
-            filePath.Copy (_L("JPEG-200kB.jpg") );
-            }
-            break;
-    
-        case EJPEG_500kB:
-            {
-            filePath.Copy (_L("JPEG-500kB.jpg") );
-            }
-            break;
-    
-        case EPNG_15kB:
-            {
-            filePath.Copy (_L("PNG-15kB.png") );
-            }
-            break;
-    
-        case EGIF_2kB:
-            {
-            filePath.Copy (_L("GIF-2kB.gif") );
-            }
-            break;
-    
-        case ERNG_1kB:
-            {
-            filePath.Copy (_L("RNG-1kB.rng") );
-            }
-            break;
-    
-        case EMIDI_10kB:
-            {
-            filePath.Copy (_L("MIDI-10kB.mid") );
-            }
-            break;
-    
-        case EWAVE_20kB:
-            {
-            filePath.Copy (_L("WAV-20kB.wav") );
-            }
-            break;
-    
-        case EAMR_20kB:
-            {
-            filePath.Copy (_L("AMR-20kB.amr") );
-            }
-            break;
-    
-        case EExcel_15kB:
-            {
-            filePath.Copy (_L("XLS-15kB.xls") );
-            }
-            break;
-    
-        case EWord_20kB:
-            {
-            filePath.Copy (_L("DOC-20kB.doc") );
-            }
-            break;
-    
-        case EPowerPoint_40kB:
-            {
-            filePath.Copy (_L("PPT-40kB.ppt") );
-            }
-            break;
-    
-        case EText_10kB:
-            {
-            filePath.Copy (_L("TXT-10kB.txt") );
-            }
-            break;
-    
-        case EText_70kB:
-            {
-            filePath.Copy (_L("TXT-70kB.txt") );
-            }
-            break;
-    
-        case E3GPP_70kB:
-            {
-            filePath.Copy (_L("3GPP-70kB.3gpp") );
-            }
-            break;
-    
-        case EMP3_250kB:
-            {
-            filePath.Copy (_L("MP3-250kB.mp3") );
-            }
-            break;
-    
-        case EAAC_100kB:
-            {
-            filePath.Copy (_L("AAC-100kB.aac") );
-            }
-            break;
-    
-        case ERM_95kB:
-            {
-            filePath.Copy (_L("RM-95kB.rm") );
-            }
-            break;
-    
-        case EBMP_25kB:
-            {
-            filePath.Copy (_L("BMP-25kB.bmp") );
-            }
-            break;
-        case EHTML_20kB:
-            {
-            filePath.Copy (_L("HTML-20kB.html") );
-            }
-            break;
-        case EJAD_1kB:
-            {
-            filePath.Copy (_L("JAD-1kB.jad") );
-            }
-            break;
-        case EJAR_10kB:
-            {
-            filePath.Copy (_L("JAR-10kB.jar") );
-            }
-            break;
-        case EJP2_65kB:
-            {
-            filePath.Copy (_L("JP2-65kB.jp2") );
-            }
-            break;
-        case EMP4_200kB:
-            {
-            filePath.Copy (_L("MP4-200kB.mp4") );
-            }
-            break;
-        case EMXMF_40kB:
-            {
-            filePath.Copy (_L("MXMF-40kB.mxmf") );
-            }
-            break;
-        case ERAM_1kB:
-            {
-            filePath.Copy (_L("RAM-1kB.ram") );
-            }
-            break;
-        case ESVG_15kB:
-            {
-            filePath.Copy (_L("SVG-15kB.svg") );
-            }
-            break;
-        case ESWF_15kB:
-            {
-            filePath.Copy (_L("SWF-15kB.swf") );
-            }
-            break;
-        case ETIF_25kB:
-            {
-            filePath.Copy (_L("TIF-25kB.tif") );
-            }
-            break;
-        case EVCF_1kB:
-            {
-            filePath.Copy (_L("VCF-1kB.vcf") );
-            }
-            break;
-        case EVCS_1kB:
-            {
-            filePath.Copy (_L("VCS-1kB.vcs") );
-            }
-            break;
-        case ESISX_10kB:
-            {
-            filePath.Copy (_L("SISX-10kB.sisx") );
-            }
-            break;
-        case EWMA_50kB:
-            {
-            filePath.Copy (_L("WMA-50kB.wma") );
-            }
-            break;
-        case EWMV_200kB:
-            {
-            filePath.Copy (_L("WMV-200kB.wmv") );
-            }
-            break;
-
-        default:
-            User::Panic (_L("Test data"), 401 );
-            break;
-        }
-
-    TFileName fullTargetPath;
-    fullTargetPath.Copy( iTempPath->Des() );
-    fullTargetPath.Append( filePath );
-    if (ConeUtils::FileExists(fullTargetPath))
-        {        
-        // No need to copy, if the file already exists.
-        LOGSTRING2("Creator: CCreatorEngine::TestDataPathL %S already exists", &fullTargetPath);
-        return fullTargetPath;
-        }
-
-    // Define the path where the testdata can be retrieved
-	// get the data from the private directory in secure platform
-    TFileName fullAppPath = iEnv->EikAppUi()->Application()->AppFullName();
-	TChar driveLetter = fullAppPath[0];
-	TInt driveNumber;
-	
-	iEnv->FsSession().CharToDrive(driveLetter, driveNumber);
-	iEnv->FsSession().SetSessionToPrivate( driveNumber );   // "\\private\\20011383\\"
- 
-
-    // check the file exists
-    if (!ConeUtils::FileExists(filePath))
-        {
-        LOGSTRING2("Creator: CCreatorEngine::TestDataPathL %S not found", &filePath);
-
-        TInt generatingError( KErrNone );
-        
-        // The file could be on C drive
-        iEnv->FsSession().SetSessionToPrivate( KRegisterDrive );
-        
-        if ( !ConeUtils::FileExists( filePath ) )
-            {
-            // The file is not on C drive, see if we can generate it
-            
-            // Make sure that the private path of this app in c-drive exists
-            iEnv->FsSession().CreatePrivatePath( KRegisterDrive );
-            
-            TFileName privatePath;
-            iEnv->FsSession().PrivatePath( privatePath );
-            privatePath.Append( filePath );
-            TChar privateDriveChar;
-            iEnv->FsSession().DriveToChar( KRegisterDrive, privateDriveChar );
-            TFileName fullPrivatePath; // full path of a file to be generated
-            fullPrivatePath.Append( privateDriveChar );
-            fullPrivatePath.Append( ':' );
-            fullPrivatePath.Append( privatePath );
-
-            switch ( aTestDataPath )
-                {
-                case EJPEG_25kB:
-                case EJPEG_200kB:
-                case EJPEG_500kB:
-                case EBMP_25kB:
-                case EGIF_2kB:
-                    {
-                    TRAP( generatingError, GenerateSourceImageFileL( aTestDataPath, fullPrivatePath ) );
-                    // GenerateSourceImageFileL calls TestDataPathL -> private session points to z
-                    // change it back to KRegisterDrive, because generated source file is there
-                    // and we need to copy it at the end of this function.
-                    iEnv->FsSession().SetSessionToPrivate( KRegisterDrive );
-                    break;
-                    }
-                case EText_10kB:
-                    {
-                    TRAP( generatingError, GenereteSourceTextFileL( fullPrivatePath, 10000 ) );
-                    // GenerateSourceImageFileL calls TestDataPathL -> private session points to z
-                    // change it back to KRegisterDrive, because generated source file is there
-                    // and we need to copy it at the end of this function.
-                    iEnv->FsSession().SetSessionToPrivate( KRegisterDrive );
-                    break;
-                    }
-                case EText_70kB:
-                    {
-                    TRAP( generatingError, GenereteSourceTextFileL( fullPrivatePath, 70000 ) );
-                    break;
-                    }
-                default:
-                    {
-                    generatingError = KErrNotSupported;
-                    break;
-                    }
-                }
-            }
-        
-        if ( iUserCancelled )
-            {
-            LOGSTRING("Creator: CCreatorEngine::TestDataPathL iUserCancelled" );
-            User::Leave( KErrCancel );
-            }
-        
-        if ( generatingError )
-            {
-            // Generating the file failed
-            
-            // cancel the dialog
-            //iProgressDialog->ProcessFinishedL();
-            //DialogDismissedL(EAknSoftkeyBack);
-
-			// remove the progress dialog from the screen
-			iEngineWrapper->CloseProgressbar();
-			
-			
-            // show error note
-            iEngineWrapper->ShowNote(_L("Test data missing"));
-			
-            User::Leave(KErrPathNotFound);
-            }
-        }
-
-	// now copy the data to D-drive to make the file public
-	iEnv->FsSession().MkDirAll( iTempPath->Des() );
-	TInt copyErr = BaflUtils::CopyFile(iEnv->FsSession(), filePath, fullTargetPath);
-	LOGSTRING4("Creator: CCreatorEngine::TestDataPathL copy %S to %S returns=%d", &filePath, &fullTargetPath, copyErr);
-	
-	// make sure that the file won't have a read only attribute
-	TEntry fileEntry;
-	iEnv->FsSession().Entry(fullTargetPath, fileEntry);
-	iEnv->FsSession().SetEntry(fullTargetPath, fileEntry.iModified, NULL, KEntryAttReadOnly);
-	
-	filePath = fullTargetPath;  // change the reference to the temp path
-    return filePath;
-    }
-
-
-// ---------------------------------------------------------------------------
-
-
-
-// a method to return a default Internet Access Point
-TUint32 CCreatorEngine::GetDefaultIAPL()
-	{
-    LOGSTRING("Creator: CCreatorEngine::GetDefaultIAPL");
-
-	TUint32 lIAPid = 1; // Default value
-
-	CCommsDatabase* cDatabase = CCommsDatabase::NewL();
-	CleanupStack::PushL(cDatabase);
-
-	CCommsDbTableView* tableView = cDatabase->OpenTableLC(TPtrC(IAP));
-
-	TInt errorCode = tableView->GotoFirstRecord();
-		
-	if ( errorCode == KErrNone ) 
-		{
-		TUint32	iValue;
-		tableView->ReadUintL(TPtrC(COMMDB_ID),iValue);
-		lIAPid = iValue;
-		}
-
-	CleanupStack::PopAndDestroy(2); // cDatabase,tableView
-
-	return lIAPid;
-	}
-
-// ---------------------------------------------------------------------------
-
-TUint32 CCreatorEngine::AccessPointNameToIdL(const TDesC& /*aAPName*/, TBool /*aAnyIfNotFound*/ )
-    {
-    LOGSTRING("Creator: CCreatorEngine::AccessPointNameToIdL");
-    // Accespoint impl moved from engine to accespoint implementations for supporting 3.0-3.1 and 3.2->
-    //return iAccessPoints->AccessPointNameToIdL(aAPName, aAnyIfNotFound );
-    return 0;
-    }
-
-static CCreatorEngine::TTestDataPath SoundFiles[] = {
-        CCreatorEngine::EMIDI_10kB,
-        CCreatorEngine::EWAVE_20kB,  
-        CCreatorEngine::EMP3_250kB,
-        CCreatorEngine::EAAC_100kB
-        };
-
-static CCreatorEngine::TTestDataPath PictureFiles[] = 
-    {
-    CCreatorEngine::EJPEG_25kB,
-    CCreatorEngine::EJPEG_200kB,
-    CCreatorEngine::EJPEG_500kB,
-    CCreatorEngine::EPNG_15kB,
-    CCreatorEngine::EGIF_2kB
-    };
-
-TPtrC CCreatorEngine::CreateSoundFileL(TTestDataPath aId)
-{
-	TPtrC tempPath(TestDataPathL(aId));
-	// Copy file to permanent location:
-    TParse parser;
-    parser.Set(tempPath, NULL, NULL);
-    TPtrC fileName(parser.NameAndExt());
-    HBufC* fullTargetPath = HBufC::NewLC( KMaxFileName );
-    fullTargetPath->Des().Copy( PathInfo::PhoneMemoryRootPath() );
-    fullTargetPath->Des().Append( PathInfo::DigitalSoundsPath() );
-    
-    fullTargetPath->Des().Append(fileName);
-    CopyFileL(tempPath, *fullTargetPath);
-    iAllocatedFilePaths.AppendL(fullTargetPath);
-    CleanupStack::Pop(); // fullTargetPath
-    return fullTargetPath->Des(); 
-}
-TPtrC CCreatorEngine::CreateRandomSoundFileL()
-{
-    TInt numOfFiles = sizeof(SoundFiles) / sizeof(TTestDataPath);
-    return CreateSoundFileL(SoundFiles[RandomNumber(0, numOfFiles-1)]);
-}
-TPtrC CCreatorEngine::RandomSoundFileL()
-{
-    TInt numOfFiles = sizeof(SoundFiles) / sizeof(TTestDataPath);
-    return TestDataPathL(SoundFiles[RandomNumber(0, numOfFiles-1)]);
-}
-    
-void CCreatorEngine::RandomPictureFileL(TDes& aPath)
-{
-    TInt numOfFiles = sizeof(PictureFiles) / sizeof(TTestDataPath);
-    aPath = TestDataPathL(PictureFiles[RandomNumber(0, numOfFiles-1)]);
-}
-// ---------------------------------------------------------------------------
-
-// returns a random string from the resource files
-TPtrC CCreatorEngine::RandomString(enum TRandomStringType aRandomStringType)
-    {
-    LOGSTRING("Creator: CCreatorEngine::RandomString");
-    
-    // Let's see if the array is OK and the string arrays are in correct order:
-    if( ((TInt) aRandomStringType) < iStringArrays.Count() && 
-        iStringArrays[aRandomStringType].iStringType == aRandomStringType)
-        {        
-        TInt rand = (TInt) (iStringArrays[aRandomStringType].iArrayPtr->Count() * Math::FRand(iSeed));
-        return (*iStringArrays[aRandomStringType].iArrayPtr)[rand];
-        }
-    
-    // Now let's loop the arrays and try to find one with the type:
-    for( TInt i = 0; i < iStringArrays.Count(); ++i )
-        {
-        if( iStringArrays[i].iStringType == aRandomStringType )
-            {
-            TInt rand = (TInt) (iStringArrays[i].iArrayPtr->Count() * Math::FRand(iSeed));
-            return (*iStringArrays[i].iArrayPtr)[rand];
-            }
-        }
-
-    User::Panic (_L("Random string"), 402);    
-    return NULL;
-    }
-
-// ---------------------------------------------------------------------------
-
-// returns a random number
-TInt CCreatorEngine::RandomNumber(TInt aRange)
-    {
-    LOGSTRING2("Creator: CCreatorEngine::RandomNumber aRange=%d", aRange);
-
-    return (TInt) (aRange*Math::FRand(iSeed));
-    }
-
-// ---------------------------------------------------------------------------
-
-// returns a random number
-TInt CCreatorEngine::RandomNumber(TInt aMin, TInt aMax)
-    {
-    LOGSTRING3("Creator: CCreatorEngine::RandomNumber aMin=%d aMax=%d", aMin, aMax);
-
-    TInt range = (aMax > aMin ? aMax - aMin : aMin - aMax) + 1;
-    TInt random = (TInt) (range*Math::FRand(iSeed));
-    
-    random = (random % range) + aMin;
-
-    if (random > aMax)
-        random = aMax;
-    else if (random < aMin)
-        random = aMin;
-    
-    return random;
-    }
-
-TTime CCreatorEngine::RandomTime(TTime baseTime, TRandomDateType type, TInt aMinHours, TInt aMaxHours, TInt aMinMinutes, TInt aMaxMinutes )
-    {
-    TInt randomHours = RandomNumber(aMinHours, aMaxHours);
-    TInt randomMinutes = RandomNumber(aMinMinutes, aMaxMinutes);
-    
-    switch( type )
-    {
-    case EDatePast:
-        return (baseTime - TTimeIntervalHours(randomHours)) - TTimeIntervalMinutes(randomMinutes);
-    case EDateFuture:
-        return (baseTime + TTimeIntervalHours(randomHours)) + TTimeIntervalMinutes(randomMinutes);
-    default:
-        break;
-    }
-    return baseTime;
-    }
-
-TTime CCreatorEngine::RandomDate(TTime baseTime, TRandomDateType type, TInt aMinDays, TInt aMaxDays)
-    {
-    TInt random = RandomNumber(aMinDays, aMaxDays);
-    
-    switch( type )
-    {
-    case EDatePast:
-        return baseTime - TTimeIntervalDays(random);
-    case EDateFuture:
-        return baseTime + TTimeIntervalDays(random);
-    default:
-        break;
-    }
-        
-    return baseTime;
-    }
-
-TTime CCreatorEngine::RandomDate(TRandomDateType type, TInt aMinDays, TInt aMaxDays)
-    {    
-    TTime time;
-    // Set to current time:
-    time.HomeTime();
-    return RandomDate(time, type, aMinDays, aMaxDays);
-    }
-
-HBufC* CCreatorEngine::CreateEmailAddressLC()
-    {
-    _LIT(KCountry, "com");    
-    return CreateEmailAddressLC(RandomString(EFirstName), RandomString(ESurname), RandomString(ECompany), KCountry);
-    }
-
-HBufC* CCreatorEngine::CreateHTTPUrlLC()
-    {
-    _LIT(KProtocol, "http://");
-    _LIT(KPrefix, "www");
-    _LIT(KCountry, "com");
-    return CreateUrlLC(KProtocol, KPrefix, RandomString(ECompany), KCountry);
-    }
-
-HBufC* CCreatorEngine::CreateRandomStringLC(TInt aStrLen)
-    {
-    TInt minAscii = 65;
-    TInt maxAscii = 90;
-    HBufC* str = HBufC::NewL(aStrLen);
-    CleanupStack::PushL(str);
-    for( TInt i = 0; i < aStrLen; ++i )
-        {
-        TInt random = RandomNumber(minAscii, maxAscii);
-        TChar randomChar = TChar((TUint) random);
-        str->Des().Append(randomChar);
-        }    
-    return str;
-    }
-
-HBufC* CCreatorEngine::CreateEmailAddressLC(
-        const TDesC& firstname,
-        const TDesC& lastname,
-        const TDesC& domain,
-        const TDesC& country ) const
-        {
-        HBufC* email = HBufC::New(firstname.Length() + lastname.Length() + domain.Length() + country.Length() + 3);
-        CleanupStack::PushL(email);        
-        _LIT(KEmailAddr, "%S.%S@%S.%S");
-        email->Des().Format(KEmailAddr, &firstname, &lastname, &domain, &country);
-        return email;
-        }
-        
-HBufC* CCreatorEngine::CreateUrlLC(
-        const TDesC& protocol,
-        const TDesC& prefix,
-        const TDesC& domain,
-        const TDesC& country) const
-    {
-    HBufC* url = HBufC::New(protocol.Size() + prefix.Size() + domain.Size() + country.Size() + 2);
-    CleanupStack::PushL(url);
-    _LIT(KUrl, "%S%S.%S.%S");
-    url->Des().Format(KUrl, &protocol, &prefix, &domain, &country);    
-    return url;
-    }
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::SetDefaultPathForFileCommandL(TInt aCommand, TFileName& aPath)
-	{
-	aPath.Copy( PathInfo::PhoneMemoryRootPath() );
-	switch (aCommand)
-	{
-	case ECmdCreateFileEntryJPEG_25kB:
-	case ECmdCreateFileEntryJPEG_200kB:
-	case ECmdCreateFileEntryJPEG_500kB:
-	case ECmdCreateFileEntryPNG_15kB:
-	case ECmdCreateFileEntryGIF_2kB:
-	case ECmdCreateFileEntryBMP_25kB:
-	case ECmdCreateFileEntrySVG_15kB:
-	case ECmdCreateFileEntryTIF_25kB:
-	case ECmdCreateFileEntryJP2_65kB:
-
-		{  aPath.Append( PathInfo::ImagesPath() );  break;  }
-
-	case ECmdCreateFileEntryRNG_1kB:
-		{  aPath.Append( PathInfo::SimpleSoundsPath() );  break;  }
-
-	case ECmdCreateFileEntryMIDI_10kB:
-	case ECmdCreateFileEntryWAV_20kB:
-	case ECmdCreateFileEntryAMR_20kB:
-	case ECmdCreateFileEntryMP3_250kB:
-	case ECmdCreateFileEntryAAC_100kB:
-	case ECmdCreateFileEntryWMA_50kB:
-		{  aPath.Append( PathInfo::DigitalSoundsPath() );  break;  }
-
-	case ECmdCreateFileEntry3GPP_70kB:
-	case ECmdCreateFileEntryRM_95kB:
-	case ECmdCreateFileEntryMP4_200kB:
-	case ECmdCreateFileEntryWMV_200kB:
-
-		{  aPath.Append( PathInfo::VideosPath() );  break;  }
-
-	case ECmdCreateFileEntryEmptyFolder:
-		{  aPath.Append( _L("MyFolder\\") );  break;  }
-
-	default:
-		{  aPath.Append( PathInfo::OthersPath() );  break;  }
-
-	}
-	}
-
-
-// ---------------------------------------------------------------------------
-
-void CCreatorEngine::CancelComplete()
-    {
-    LOGSTRING("Creator: CCreatorEngine::CancelComplete");
-    // free resources and show a note
-    TRAP_IGNORE( ShutDownEnginesL() );
-
-    TRAP_IGNORE(iEngineWrapper->ShowNote(_L("Cancelled")));
-	
-	}
-
-// ---------------------------------------------------------------------------
-
-TCommand::TCommand(TInt aCommandId, CCreatorModuleBaseParameters* aParameters)
-    {
-    iCommandId = aCommandId;
-    iParameters = aParameters;
-    }
-
-// ---------------------------------------------------------------------------
-
-TCommand::~TCommand()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-
-CAsyncWaiter* CAsyncWaiter::NewL(TInt aPriority)
-	{
-	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
-	return self;
-	}
-
-CAsyncWaiter* CAsyncWaiter::NewLC(TInt aPriority)
-	{
-	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
-	CleanupStack::PushL(self);
-	return self;
-	}
-	
-CAsyncWaiter::CAsyncWaiter(TInt aPriority) : CActive(aPriority)
-	{
-	CActiveScheduler::Add(this);
-	}	
-
-CAsyncWaiter::~CAsyncWaiter()
-	{
-	Cancel();
-	}
-	
-void CAsyncWaiter::StartAndWait()
-	{
-    LOGSTRING("Creator: CAsyncWaiter::StartAndWait");
-    iStatus = KRequestPending;
-    SetActive();
-    iWait.Start();
-	}
-	
-TInt CAsyncWaiter::Result() const
-	{
-	return iError;
-	}
-	
-void CAsyncWaiter::RunL()
-	{
-    LOGSTRING("Creator: CAsyncWaiter::RunL");
-
-	iError = iStatus.Int();
-	//CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
-	iWait.AsyncStop();
-	}
-	
-void CAsyncWaiter::DoCancel()
-	{
-    LOGSTRING("Creator: CAsyncWaiter::DoCancel");
-
-	iError = KErrCancel;
-    if( iStatus == KRequestPending )
-        {
-        TRequestStatus* s=&iStatus;
-        User::RequestComplete( s, KErrCancel );
-        }
-    iWait.AsyncStop();
-    //CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
-	}
-	
-FileMapping::FileMapping( const TDesC& aAttName, TInt aAttId, TInt aCommandId )
-    :
-    iFileName(aAttName),
-    iFileId(aAttId),
-    iCommandId(aCommandId)
-    {}
-
-    const TDesC& FileMapping::FileName() const
-    {
-        return iFileName;
-    }
-
-    TInt FileMapping::FileId() const
-    {
-        return iFileId;
-    }   
-
-    TInt FileMapping::CommandId() const
-    {
-        return iCommandId;
-    }
-    
-// ---------------------------------------------------------------------------  
-CDictionaryFileStore* CCreatorEngine::FileStoreLC()
-    {
-    LOGSTRING("Creator: CCreatorEngine::FileStoreLC");
-    CDictionaryFileStore* store;
-    
-    // make sure that the private path of this app in c-drive exists
-    CEikonEnv::Static()->FsSession().CreatePrivatePath( KRegisterDrive ); // c:\\private\\20011383\\
-
-    // handle register always in the private directory 
-    User::LeaveIfError( CEikonEnv::Static()->FsSession().SetSessionToPrivate( KRegisterDrive ) );
-    store = CDictionaryFileStore::OpenLC( CEikonEnv::Static()->FsSession(), KRegisterFileName, KUidCreatorApp );
-    return store;
-    }
-    
-// ---------------------------------------------------------------------------
-void CCreatorEngine::ReadEntryIdsFromStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid )
-    {
-    LOGSTRING("Creator: CCreatorEngine::ReadEntryIdsFromStoreL");
-    CDictionaryFileStore* store = FileStoreLC();
-    User::LeaveIfNull( store );
-    if ( store->IsPresentL( aModuleUid ) )
-        {
-        RDictionaryReadStream in;
-        in.OpenLC( *store, aModuleUid );
-        TFileName fullPath;
-        TInt err( KErrNone );
-        TInt id( KErrNotFound );
-        while ( !err )
-            {
-            TRAP( err, id = in.ReadInt32L() );  // will leave with KErrEof
-            if ( !err )
-                {
-                aEntryIds.AppendL( id );
-                }
-            }
-        CleanupStack::PopAndDestroy( &in );
-        }
-    CleanupStack::PopAndDestroy( store );
-    }
-
-// ---------------------------------------------------------------------------
-void CCreatorEngine::WriteEntryIdsToStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid )
-    {
-    LOGSTRING("Creator: CCreatorEngine::WriteEntryIdsToStoreL");
-    CDictionaryFileStore* store = FileStoreLC();
-    User::LeaveIfNull( store );
-    
-    // backup previous ids from store
-    // otherwise they would be overwritten when calling out.WriteL
-    RArray<TInt> previousIds;
-    CleanupClosePushL( previousIds );
-    
-    if ( store->IsPresentL( aModuleUid ) )
-        {
-        RDictionaryReadStream in;
-        in.OpenLC( *store, aModuleUid );        
-        TInt err( KErrNone );
-        TInt id( KErrNotFound );
-        while ( !err ) 
-            {
-            TRAP( err, id = in.ReadInt32L() ); // will leave with KErrEof
-            if ( !err )
-                {
-                previousIds.AppendL( id );
-                }
-            }
-        CleanupStack::PopAndDestroy( &in );
-        }
-    
-    RDictionaryWriteStream out;       
-    out.AssignLC( *store, aModuleUid );
-    
-    // restore previous ids to store
-    for ( TInt i = 0; i < previousIds.Count(); i++ )
-        {
-        out.WriteInt32L( previousIds[i] );            
-        }
-
-    // write new ids to store
-    for ( TInt i = 0; i < aEntryIds.Count(); i++ )
-        {
-        out.WriteInt32L( aEntryIds[i] );        
-        }
-    
-    out.CommitL();
-    CleanupStack::PopAndDestroy( &out );
-    
-    store->CommitL();
-    CleanupStack::PopAndDestroy( &previousIds );
-    CleanupStack::PopAndDestroy( store );
-    }
-
-// ---------------------------------------------------------------------------
-void CCreatorEngine::ReadEntryIdsFromStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid )
-    {
-    LOGSTRING("Creator: CCreatorEngine::ReadEntryIdsFromStoreL");
-    CDictionaryFileStore* store = FileStoreLC();
-    User::LeaveIfNull( store );
-    if ( store->IsPresentL( aModuleUid ) )
-        {
-        RDictionaryReadStream in;
-        in.OpenLC( *store, aModuleUid );
-        TFileName fullPath;
-        TInt err( KErrNone );
-        TUint32 id( KErrNone ); 
-        while ( !err )
-            {
-            TRAP( err, id = in.ReadUint32L() );  // will leave with KErrEof
-            if ( !err )
-                {
-                aEntryIds.AppendL( id );
-                }
-            }
-        CleanupStack::PopAndDestroy( &in );
-        }
-    CleanupStack::PopAndDestroy( store );
-    }
-
-// ---------------------------------------------------------------------------
-void CCreatorEngine::WriteEntryIdsToStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid )
-    {
-    LOGSTRING("Creator: CCreatorEngine::WriteEntryIdsToStoreL");
-    CDictionaryFileStore* store = FileStoreLC();
-    User::LeaveIfNull( store );
-    
-    // backup previous ids from store
-    // otherwise they would be overwritten when calling out.WriteL
-    RArray<TUint32> previousIds;
-    CleanupClosePushL( previousIds );
-    
-    if ( store->IsPresentL( aModuleUid ) )
-        {
-        RDictionaryReadStream in;
-        in.OpenLC( *store, aModuleUid );
-        TInt err( KErrNone );
-        TUint32 id( KErrNone );
-        while ( !err ) 
-            {
-            TRAP( err, id = in.ReadUint32L() ); // will leave with KErrEof
-            if ( !err )
-                {
-                previousIds.AppendL( id );
-                }
-            }
-        CleanupStack::PopAndDestroy( &in );
-        }
-    
-    RDictionaryWriteStream out;       
-    out.AssignLC( *store, aModuleUid );
-    
-    // restore previous ids to store
-    for ( TInt i = 0; i < previousIds.Count(); i++ )
-        {
-        out.WriteUint32L( previousIds[i] );            
-        }
-
-    // write new ids to store
-    for ( TInt i = 0; i < aEntryIds.Count(); i++ )
-        {
-        out.WriteUint32L( aEntryIds[i] );        
-        }
-    
-    out.CommitL();
-    CleanupStack::PopAndDestroy( &out );
-    
-    store->CommitL();
-    CleanupStack::PopAndDestroy( &previousIds );
-    CleanupStack::PopAndDestroy( store );
-    }
-
-// ---------------------------------------------------------------------------
-void CCreatorEngine::RemoveStoreL( const TUid aModuleUid )
-    {
-    LOGSTRING("Creator: CCreatorEngine::RemoveStoreL");
-    CDictionaryFileStore* store = FileStoreLC();
-    User::LeaveIfNull( store );
-    if ( store->IsPresentL( aModuleUid ) )
-        {        
-        // entries of this module should be deleted by now,
-        // remove the Creator internal registry for this module
-        store->Remove( aModuleUid );
-        store->CommitL();
-        }
-    CleanupStack::PopAndDestroy( store );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorEngine::GenerateSourceImageFileL(
-    const CCreatorEngine::TTestDataPath aFileType,
-    const TDesC& aFileName )
-    {
-    LOGSTRING("Creator: CCreatorEngine::GenerateSourceImageFileL");
-    
-    // Peek file size
-    RFile file;
-    TInt fileSize( 0 );
-    // Using png file as the source file
-    TFileName fileName = TestDataPathL( CCreatorEngine::EPNG_15kB );
-    User::LeaveIfError( file.Open( iEnv->FsSession(),
-                                   fileName,
-                                   EFileRead | EFileShareAny ) );
-    CleanupClosePushL( file );
-    User::LeaveIfError( file.Size( fileSize ) );
-    CleanupStack::PopAndDestroy( &file );
-    
-    // Using heap variables, because bitmaps 
-    // may reserve large amount of memory.
-    
-    // Read data from the file
-    RFileReadStream ws;    
-    User::LeaveIfError( ws.Open( iEnv->FsSession(),
-                                 fileName,
-                                 EFileStream | EFileRead | EFileShareAny ) );
-    CleanupClosePushL( ws );
-    delete iBitmapData;
-    iBitmapData = NULL;
-    iBitmapData = HBufC8::NewL( fileSize );
-    TPtr8 dataPtr = iBitmapData->Des();
-    ws.ReadL( dataPtr, fileSize );
-    CleanupStack::PopAndDestroy( &ws );
-       
-    // Create decoder for the data
-    delete iDecoder;
-    iDecoder = NULL;
-    iDecoder = CImageDecoder::DataNewL( iEnv->FsSession(), dataPtr );
-    iFrameinfo = iDecoder->FrameInfo();
-    
-    // Create bitmap handle for the source image
-    iBitmap = new (ELeave) CFbsBitmap();
-    User::LeaveIfError( iBitmap->Create( iFrameinfo.iFrameCoordsInPixels.Size(), EColor16M ) );
-    
-    // Convert the data from the file into bitmap format (inmemory)  
-    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-    iDecoder->Convert( &waiter->iStatus, *iBitmap );
-    waiter->StartAndWait();
-    delete iDecoder;
-    iDecoder = NULL;
-    delete iBitmapData;
-    iBitmapData = NULL;
-    if ( iUserCancelled )
-        {
-        CancelComplete();
-        User::Leave( KErrCancel );
-        }
-    User::LeaveIfError( waiter->Result() );
-    
-    // Define the target dimensions and image quality
-    // so that the generated file size will match required size.
-    // Quality and scaling factors are defined experimentally.
-    delete iScaler;
-    iScaler = NULL;
-    iScaler = CBitmapScaler::NewL();
-    iScaledBitmap = new (ELeave) CFbsBitmap();
-    // use original size as base
-    TSize scaledSize( iFrameinfo.iFrameCoordsInPixels.Size() );
-    delete iFrameImageData;
-    iFrameImageData = NULL;
-    iFrameImageData = CFrameImageData::NewL();
-    TBuf8<64> mimeType;
-    TJpegImageData* jpegImageData( NULL );
-    TBmpImageData* bmpImageData( NULL );
-    switch ( aFileType )
-        {
-        case CCreatorEngine::EJPEG_25kB:
-            // QualityFactor = 93 and size factor = 2 -> 25kB jpeg file
-            mimeType.Copy( _L8("image/jpeg") );
-            jpegImageData = new (ELeave) TJpegImageData;
-            // Set some format specific data
-            jpegImageData->iSampleScheme = TJpegImageData::EColor444;
-            jpegImageData->iQualityFactor = 93; // 0..100
-            // ownership passed to iFrameImageData after AppendImageData
-            User::LeaveIfError( iFrameImageData->AppendImageData( jpegImageData ) );
-            scaledSize.iHeight *= 2;
-            scaledSize.iWidth *= 2;
-            break;
-        case CCreatorEngine::EJPEG_200kB:
-            {
-            mimeType.Copy( _L8("image/jpeg") );
-            jpegImageData = new (ELeave) TJpegImageData;
-            // Set some format specific data
-            jpegImageData->iSampleScheme = TJpegImageData::EColor444;
-#ifdef __WINS__
-            // QualityFactor = 95 and size factor = 7 -> 196kB jpeg file
-            jpegImageData->iQualityFactor = 95; // 0..100
-            scaledSize.iHeight *= 7;
-            scaledSize.iWidth *= 7;
-#else
-            // In hw the image compression seems to work
-            // more efficiently. Need to set greater values.
-            jpegImageData->iQualityFactor = 100; // 0..100
-            scaledSize.iHeight *= 7;
-            scaledSize.iWidth *= 7;
-            // 100, 7, 7 -> 213kB
-#endif
-            // ownership passed to iFrameImageData after AppendImageData
-            User::LeaveIfError( iFrameImageData->AppendImageData( jpegImageData ) );
-            break;
-            }
-        case CCreatorEngine::EJPEG_500kB:
-            {
-            mimeType.Copy( _L8("image/jpeg") );
-            jpegImageData = new (ELeave) TJpegImageData;
-            // Set some format specific data
-            jpegImageData->iSampleScheme = TJpegImageData::EColor444;
-#ifdef __WINS__
-            // QualityFactor = 99 and size factor = 8 -> 514kB jpeg file
-            jpegImageData->iQualityFactor = 99; // 0..100
-            scaledSize.iHeight *= 8;
-            scaledSize.iWidth *= 8;
-#else
-            // In hw the image compression seems to work
-            // more efficiently. Need to set greater values. 
-            jpegImageData->iQualityFactor = 100; // 0..100
-            scaledSize.iHeight *= 13;
-            scaledSize.iWidth *= 13;
-            // 100, 13, 13 -> 535kB
-#endif
-            // ownership passed to iFrameImageData after AppendImageData
-            User::LeaveIfError( iFrameImageData->AppendImageData( jpegImageData ) );
-            break;
-            }
-        case CCreatorEngine::EBMP_25kB:
-            {
-            // bit depyh 8 and 11/10 size factor -> 25kB bmp
-            mimeType.Copy( _L8("image/bmp") );
-            bmpImageData = new (ELeave) TBmpImageData;
-            bmpImageData->iBitsPerPixel = 8;
-            // ownership passed to iFrameImageData after AppendImageData
-            User::LeaveIfError( iFrameImageData->AppendImageData( bmpImageData ) );
-            scaledSize.iHeight *= 11;
-            scaledSize.iWidth *= 11;
-            scaledSize.iHeight /= 10;
-            scaledSize.iWidth /= 10;
-            break;
-            }
-        case CCreatorEngine::EGIF_2kB:
-            {
-            // size factor 1/2 -> 2560B gif
-            mimeType.Copy( _L8("image/gif") );
-            // GIF encoder is not configurable, only the size matters here
-            scaledSize.iHeight /= 2;
-            scaledSize.iWidth /= 2;
-            break;
-            }
-        default: break;
-        }
-
-    // Scale to reach target size
-    User::LeaveIfError( iScaledBitmap->Create( scaledSize, EColor16M ) );
-    iScaler->Scale( &waiter->iStatus, *iBitmap, *iScaledBitmap );
-    waiter->StartAndWait();
-    delete iBitmap;
-    iBitmap = NULL;
-    delete iScaler;
-    iScaler = NULL;
-    if ( iUserCancelled )
-        {
-        CancelComplete();
-        User::Leave( KErrCancel );
-        }
-    User::LeaveIfError( waiter->Result() );
-    
-    // Encode to target format
-    delete iEncoder;
-    iEncoder = NULL;
-    // Creating CImageEncoder opens the target file
-    iEncoder = CImageEncoder::FileNewL( iEnv->FsSession(), aFileName, mimeType );
-
-    // Do the conversion to target format, this will write to the file
-    iEncoder->Convert( &waiter->iStatus, *iScaledBitmap, iFrameImageData );
-    waiter->StartAndWait();
-    delete iEncoder;
-    iEncoder = NULL;
-    delete iFrameImageData;
-    iFrameImageData = NULL;
-    delete iScaledBitmap;
-    iScaledBitmap = NULL;
-    if ( iUserCancelled )
-        {
-        CancelComplete();
-        User::Leave( KErrCancel );
-        }
-    User::LeaveIfError( waiter->Result() );
-    CleanupStack::PopAndDestroy( waiter );
-    }
-
-//----------------------------------------------------------------------------
-void CCreatorEngine::GenereteSourceTextFileL( const TDesC& aFileName, TInt aSize )
-    {
-    LOGSTRING("Creator: CCreatorEngine::GenereteSourceTextFileL");
-    RFile txtFile;
-    _LIT8( KTestContent, "Testing... ");
-    _LIT8( KTestContentCRLF, "\r\n");
-    txtFile.Create( iEnv->FsSession(),
-                    aFileName,
-                    EFileStreamText | EFileWrite | EFileShareAny );
-    CleanupClosePushL( txtFile );
-    for ( TInt i = 1; i*KTestContent().Length() < aSize; i++ )
-        {
-        User::LeaveIfError( txtFile.Write( KTestContent ) );
-        if ( !( i % 10 ) ) // linefeed for every 10th
-            {
-            User::LeaveIfError( txtFile.Write( KTestContentCRLF ) );
-            }
-        }
-    CleanupStack::PopAndDestroy( &txtFile );
-    }
-
-//----------------------------------------------------------------------------
--- a/creator/src/enginewrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +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 <hbprogressdialog.h>
-#include <hbmessagebox.h>
-#include <hblabel.h>
-
-#include <QString>
-#include <QDate>
-
-#include <e32std.h>
-#include <e32base.h>
-
-#include "creator.hrh" // for command ids
-#include "notifications.h"
-#include "enginewrapper.h"
-#include "engine.h"
-#include "mainview.h"
-
-
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::EngineWrapper()
-: iEngine(0), iProgressDialog(0)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::~EngineWrapper()
-{
-    if (iEngine != 0) {
-        delete iEngine;
-        iEngine = NULL;
-    }
-    if (iProgressDialog != 0) {
-        delete iProgressDialog;
-        iProgressDialog = NULL;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::init()
-{
-    TRAPD(err, iEngine = CCreatorEngine::NewL(this));
-    if(err != KErrNone) {
-        return false;
-    }
-    else {
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-QList<MemoryDetails> EngineWrapper::GetMemoryDetailsList()
-	{
-	RPointerArray<TMemoryDetails> tMemDetList = iEngine->GetMemoryDetailsList();
-	QList<MemoryDetails> memDetList;
-	MemoryDetails memDet;
-		for(int i=0; i<tMemDetList.Count(); i++)
-			{
-			TMemoryDetails* temp = tMemDetList.operator [](i);
-			QString free = QString::fromUtf16( temp->iFree.Ptr(), temp->iFree.Length() );
-			QString size = QString::fromUtf16( temp->iSize.Ptr(), temp->iSize.Length() );
-			QChar drive(temp->iDriveLetter.GetUpperCase());
-			memDet.mFree = free; //QString((QChar*)tMemDetList[i]->iFree.Ptr(), tMemDetList[i]->iFree.Length());
-			memDet.mSize = size; //QString((QChar*) tMemDetList[i]->iSize.Ptr(), tMemDetList[i]->iSize.Length());
-			memDet.mDriveLetter = QString(drive);
-			
-			//memDetList[i].mDriveLetter = QString::fromUtf8( (char *) &tMemDetList[i]->iDriveLetter, (int) sizeof( char ) );
-			memDetList.append( memDet );
-			}
-	return memDetList;
-	}
-
-MemoryDetails EngineWrapper::GetMemoryDetails()
-{
-	
-    TMemoryDetails tMemoryDetails = iEngine->GetMemoryDetails();
-    MemoryDetails memoryDetails;
-
-    // Convert TMemoryDetails to MemoryDetails 
-	memoryDetails.mRamFree  = QString::fromUtf16( tMemoryDetails.iRamFree.Ptr(), tMemoryDetails.iRamFree.Length() );
-	memoryDetails.mRamSize  = QString::fromUtf16( tMemoryDetails.iRamSize.Ptr(), tMemoryDetails.iRamSize.Length() );
-
-	return memoryDetails;
-}
-
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowErrorMessage(const TDesC& aErrorMessage)
-{
-    QString errorMessage((QChar*)aErrorMessage.Ptr(),aErrorMessage.Length());
-    Notifications::error(errorMessage);
- 
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowNote(const TDesC& aNoteMessage, TInt /*aResourceId*/)
-{
-    QString note((QChar*)aNoteMessage.Ptr(),aNoteMessage.Length());
-    Notifications::showGlobalNote(note, HbMessageBox::MessageTypeInformation, 1000);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowProgressBar(const TDesC& aPrompt, int aMax)
-{
-	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-	CloseProgressbar();
-    iProgressDialog = Notifications::showProgressBar(text, aMax);
-	connect(iProgressDialog, SIGNAL(cancelled()), this, SLOT(ProgressDialogCancelled()));
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::IncrementProgressbarValue()
-{
-    if(iProgressDialog)
-        iProgressDialog->setProgressValue(iProgressDialog->progressValue() + 1);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::CloseProgressbar()
-{
-    if(iProgressDialog){
-        disconnect(iProgressDialog, SIGNAL(cancelled()), this, SLOT(ProgressDialogCancelled()));
-        delete iProgressDialog;
-        iProgressDialog = NULL;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-TBool EngineWrapper::EntriesQueryDialog(TInt* aNumberOfEntries, const TDesC& aPrompt, TBool aAcceptsZero, MUIObserver* observer, int userData)
-    {
-	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-	TBool success(EFalse);
-    try{
-        CreatorInputDialog::launch(text, aNumberOfEntries, aAcceptsZero ? true : false, observer, userData);
-        success = ETrue;
-    }
-    catch (std::exception& e)
-        {
-        Notifications::error( QString("exception: ")+e.what() );
-        }
-	return success;
-    }
-	
-// ---------------------------------------------------------------------------	
-
-TBool EngineWrapper::TimeQueryDialog(TTime* aTime, const TDesC& aPrompt, MUIObserver* observer, int userData)
-    {
-    QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-    TBool success(EFalse);
-    try{
-        CreatorDateTimeDialog::launch(text, aTime, observer, userData); 
-        success = ETrue;
-    }
-    catch (std::exception& e)
-        {
-        Notifications::error( QString("exception: ")+e.what() );
-        }
-    return success;
-    }
-
-TBool EngineWrapper::YesNoQueryDialog(const TDesC& aPrompt, MUIObserver* observer, int userData)
-{
-	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-	TBool success(EFalse);
-    try{
-        CreatorYesNoDialog::launch(text, "", observer, userData);	
-        success = ETrue;
-    }
-    catch (std::exception& e)
-        {
-        Notifications::error( QString("exception: ")+e.what() );
-        }
-    return success;
-}
- 
-// ---------------------------------------------------------------------------	
-
-bool EngineWrapper::ExecuteOptionsMenuCommand(int commandId)
-{
-	TInt err = KErrNone;
-	if (commandId == ECmdCreateFromFile) {
-		TRAP(err, iEngine->RunScriptL());
-	}
-	else if (commandId == ECmdSelectRandomDataFile) {
-		TBool ret = EFalse;
-		TRAP(err, ret = iEngine->GetRandomDataL());
-		if ( err != KErrNone || ret == EFalse ) {
-			Notifications::error("Error in getting random data.");
-			return false;
-		}		
-	}
-    else {
-		TRAP(err, iEngine->ExecuteOptionsMenuCommandL(commandId));
-	}
-	// error handling
-    if(err != KErrNone) {
-        return false;
-    }
-    else {
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------	
-
-TBool EngineWrapper::PopupListDialog(const TDesC& aPrompt, const CDesCArray* aFileNameArray, TInt* aIndex, MUIObserver* aObserver, TInt aUserData) 
-{
-	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-	QStringList itemList;
-
-	for (int i = 0; i < aFileNameArray->Count(); i++) {
-		itemList.append(QString::fromUtf16(
-				  aFileNameArray->MdcaPoint(i).Ptr(),
-				  aFileNameArray->MdcaPoint(i).Length()));
-	}
-	TBool success(EFalse);
-    try{
-        CreatorSelectionDialog::launch(text, itemList, aIndex, aObserver, aUserData);
-	    success = ETrue;
-    }
-    catch (std::exception& e)
-        {
-        Notifications::error( QString("exception: ")+e.what() );
-        }
-    return success;
-}
-
-// ---------------------------------------------------------------------------	
-
-TBool EngineWrapper::DirectoryQueryDialog(const TDesC& aPrompt, TDes& aDirectory, MUIObserver* aObserver, TInt aUserData)
-{
-	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-	TBool success(EFalse);
-    try{
-        CreatorInputDialog::launch(text, aDirectory, aObserver, aUserData);
-        success = ETrue;
-    }
-    catch (std::exception& e)
-        {
-        Notifications::error( QString("exception: ")+e.what() );
-        }
-    return success;
-}
-
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ProgressDialogCancelled()
-{
-	TRAPD(err, iEngine->ProgressDialogCancelledL());
-	// error handling
-    if(err != KErrNone) {
-        Notifications::error("Error in operation cancel.");
-    }
-    // disconnect & delete iProgressDialog to free memory
-    disconnect(iProgressDialog, SIGNAL(cancelled()), this, SLOT(ProgressDialogCancelled()));
-    iProgressDialog->deleteLater();
-    iProgressDialog = NULL;
-}
-
-// ---------------------------------------------------------------------------
-
-TBool EngineWrapper::ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, TInt* aIndex, MUIObserver* aObserver, TInt aUserData)
-{
-	bool ret = false;
-	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-	QStringList itemList;
-	
-	switch (aId) {
-		case R_CONTACT_CREATION_TYPE_QUERY: {
-			itemList << "Default fields" << "Define...";
-			break;
-		}
-		case R_GROUP_CREATION_TYPE_QUERY: {
-			itemList << "Random" << "Define...";
-			break;
-		}
-		case R_MESSAGE_TYPE_QUERY: {
-			itemList << "SMS" << "MMS" << "AMS" << "Email" << "Smart Message" << "IR Message" << "BT Message";
-			break;
-		}
-		case R_FOLDER_TYPE_QUERY: {
-			itemList << "Inbox" << "Drafts" << "Outbox" << "Sent";
-			break;
-		}
-		case R_UNREAD_QUERY: {
-			itemList << "Read" << "New";
-			break;
-		}
-		case R_ATTACHMENT_MULTI_SELECTION_QUERY: {
-			Notifications::error("Not supported resource id."); 
-			break;
-		}
-		case R_AMS_ATTACHMENT_SINGLE_SELECTION_QUERY: {
-			itemList << "AMR 20kB";
-			break;
-		}
-		case R_ATTACHMENT_SINGLE_SELECTION_QUERY: {
-			itemList << "JPEG 25kB" << "JPEG 300kB" << "JPEG 500kB" << "PNG 15kB" << "GIF 2kB" << "RNG 1kB" 
-			<< "MIDI 10kB" << "WAVE 20kB" << "AMR 20kB" << "Excel 15kB" << "Word 20kB" << "PowerPoint 40kB" 
-			<< "Text 10kB" << "Text 70kB" << "3GPP 70kB" << "MP3 250kB" << "AAC 100kB" << "RM 95kB";
-			break;
-		}
-		default: {
-			Notifications::error("Error in resource id.");
-			return ret;
-		}
-	}
-	TBool success(EFalse);
-    try{
-        CreatorSelectionDialog::launch(text, itemList, aIndex, aObserver, aUserData);
-        success = ETrue;
-    }
-    catch (std::exception& e)
-        {
-        Notifications::error( QString("exception: ")+e.what() );
-        }
-    return success;
-}
-
-TBool EngineWrapper::ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* aObserver, TInt aUserData)
-{
-    TBool success(EFalse);
-	QStringList itemList;
-	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
-	if (aId == R_ATTACHMENT_MULTI_SELECTION_QUERY) {
-       itemList << "None" << "JPEG 25kB" << "JPEG 300kB" << "JPEG 500kB" << "PNG 15kB" << "GIF 2kB" << "RNG 1kB" 
-           << "MIDI 10kB" << "WAVE 20kB" << "AMR 20kB" << "Excel 15kB" << "Word 20kB" << "PowerPoint 40kB" 
-           << "Text 10kB" << "Text 70kB" << "3GPP 70kB" << "MP3 250kB" << "AAC 100kB" << "RM 95kB";
-	}
-	else{
-        Notifications::error("Error in resource id.");
-        return EFalse;
-    }
-	
-    try{
-        CreatorSelectionDialog::launch(text, itemList, aSelectedItems, aObserver, aUserData);
-        success = ETrue;
-    }
-    catch (std::exception& e)
-        {
-        Notifications::error( QString("exception: ")+e.what() );
-        }
-    return success;
-}
-
-void EngineWrapper::CloseCreatorApp()
-{
-	MainView::closeApp();
-}
--- a/creator/src/main.cpp	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#include <hbapplication.h>
-#include <hbmainwindow.h>
-#include <hbview.h>
-
-#include "mainview.h"
-#include "enginewrapper.h"
-
-int main(int argc, char *argv[])
-{
-	
-    
-
-    HbApplication app(argc, argv);
-    HbMainWindow mainWindow;
-    
-    //Create main view
-    MainView* view = new MainView(mainWindow);
-
-    //initialize main view
-    view->init(app);
-	
-	// Add View to main window and reveal it.
-    mainWindow.addView(view);
-    mainWindow.show();
-    
-    int result = app.exec();
-   
-    return result;
-}
-
--- a/creator/src/mainview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,659 +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 <hbview.h>
-#include <hbmainwindow.h>
-#include <hbapplication.h>
-#include <hblabel.h>
-#include <hbmenu.h>
-#include <hbaction.h>
-#include <hbtextedit.h>
-
-#include <QSignalMapper>
-#include <QGraphicsLinearLayout>
-
-#include "notifications.h"
-#include "enginewrapper.h"
-#include "mainview.h"
-#include "hbtoolbar.h"
-#include "creator.hrh" // for command ids
-
-// ---------------------------------------------------------------------------
-
-MainView::MainView(HbMainWindow &mainWindow):
-    mMainWindow(mainWindow)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-MainView::~MainView()
-{
-	delete mSm;
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::init(HbApplication &app)
-{
-    mEngineWrapper.init();
-    this->setTitle("Creator");
-    createMenu(app);
-    createMemoryInfoText();
-}
-
-void MainView::createMenu(HbApplication& app)
-{
-    HbMenu* menu = this->menu();
-
-    // signal mapper for identifying the different command actions  
-	// in executeCommand() handler function:
-    mSm = new QSignalMapper(this);
-    connect(mSm, SIGNAL(mapped(int)), this, SLOT(executeMenuCommand(int)));
-    
-    if (menu != NULL) {
-
-		// Run script menu item:
-		mActionRunScript = menu->addAction("Run script"); 
-		connect(mActionRunScript, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionRunScript, ECmdCreateFromFile);	
-
-		// Calendar sub-menu items:
-		HbMenu* calendarSubMenu = new HbMenu("Calendar");
-		menu->addMenu(calendarSubMenu);
-		mActionCalendarAppointments = calendarSubMenu->addAction("Appointments");
-		mActionCalendarEvents = calendarSubMenu->addAction("Events");
-		mActionCalendarAnniversaries = calendarSubMenu->addAction("Anniversaries");
-		mActionCalendarTodos = calendarSubMenu->addAction("Todos");
-		mActionCalendarReminders = calendarSubMenu->addAction("Reminders");
-		
-		connect(mActionCalendarAppointments, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionCalendarAppointments, ECmdCreateCalendarEntryAppointments);
-
-		connect(mActionCalendarEvents, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionCalendarEvents, ECmdCreateCalendarEntryEvents);
-
-		connect(mActionCalendarAnniversaries, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionCalendarAnniversaries, ECmdCreateCalendarEntryAnniversaries);
-
-		connect(mActionCalendarTodos, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionCalendarTodos, ECmdCreateCalendarEntryToDos);
-
-		connect(mActionCalendarReminders, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionCalendarReminders, ECmdCreateCalendarEntryReminders);		
-/*		
-		// Browser sub-menu items:
-		HbMenu* browserSubMenu = new HbMenu("Browser");
-		menu->addMenu(browserSubMenu);
-		mActionBrowserBookmark = browserSubMenu->addAction("Bookmarks");
-		mActionBrowserBmarkFolder = browserSubMenu->addAction("Bookmark folders");
-		mActionBrowserSavedPages = browserSubMenu->addAction("Saved pages");
-		mActionBrowserSavedPageFolders = browserSubMenu->addAction("Saved page folders");
-
-		connect(mActionBrowserBookmark, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionBrowserBookmark, ECmdCreateBrowserBookmarkEntries);
-
-		connect(mActionBrowserBmarkFolder, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionBrowserBmarkFolder, ECmdCreateBrowserBookmarkFolderEntries);
-
-		connect(mActionBrowserSavedPages, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionBrowserSavedPages, ECmdCreateBrowserSavedPageEntries);
-
-		connect(mActionBrowserSavedPageFolders, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionBrowserSavedPageFolders, ECmdCreateBrowserSavedPageFolderEntries);	
-*/
-		// Files sub-menu items:
-		HbMenu* filesSubMenu = new HbMenu("Files");
-		menu->addMenu(filesSubMenu);
-		
-		mActionFilesEmptyFolder = filesSubMenu->addAction("Empty folder");
-		
-		connect(mActionFilesEmptyFolder, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesEmptyFolder, ECmdCreateFileEntryEmptyFolder);
-		
-		mActionFilesJpeg25 = filesSubMenu->addAction("JPEG 25kB");
-		connect(mActionFilesJpeg25, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesJpeg25, ECmdCreateFileEntryJPEG_25kB);
-
-		mActionFilesJpeg200 = filesSubMenu->addAction("JPEG 200kB");
-		connect(mActionFilesJpeg200, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesJpeg200, ECmdCreateFileEntryJPEG_200kB);
-
-		mActionFilesJpeg500 = filesSubMenu->addAction("JPEG 500kB");
-		connect(mActionFilesJpeg500, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesJpeg500, ECmdCreateFileEntryJPEG_500kB);		
-
-		mActionFilesPng15 = filesSubMenu->addAction("PNG 15kB");
-		connect(mActionFilesPng15, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesPng15, ECmdCreateFileEntryPNG_15kB);
-		
-		mActionFilesGif2 = filesSubMenu->addAction("GIF 2kB");
-		connect(mActionFilesGif2, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesGif2, ECmdCreateFileEntryGIF_2kB);
-		
-		mActionFilesBmp25 = filesSubMenu->addAction("BMP 25kB");
-		connect(mActionFilesBmp25, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesBmp25, ECmdCreateFileEntryBMP_25kB);
-		
-		mActionFilesJp265 = filesSubMenu->addAction("JP2 65kB");
-		connect(mActionFilesJp265, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesJp265, ECmdCreateFileEntryJP2_65kB);
-		
-		mActionFilesSvg15 = filesSubMenu->addAction("SVG 15kB");
-		connect(mActionFilesSvg15, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesSvg15, ECmdCreateFileEntrySVG_15kB);
-		
-		mActionFilesTif25 = filesSubMenu->addAction("TIF 25kB");
-		connect(mActionFilesTif25, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesTif25, ECmdCreateFileEntryTIF_25kB);
-		
-		mActionFilesRng1 = filesSubMenu->addAction("RNG 1kB");
-		connect(mActionFilesRng1, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesRng1, ECmdCreateFileEntryRNG_1kB);		
-		
-		mActionFilesMidi10 = filesSubMenu->addAction("MIDI 10kB");
-		connect(mActionFilesMidi10, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesMidi10, ECmdCreateFileEntryMIDI_10kB);
-		
-		mActionFilesWave20 = filesSubMenu->addAction("WAVE 20kB");
-		connect(mActionFilesWave20, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesWave20, ECmdCreateFileEntryWAV_20kB);
-
-		mActionFilesAmr20 = filesSubMenu->addAction("AMR 20kB");
-		connect(mActionFilesAmr20, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesAmr20, ECmdCreateFileEntryAMR_20kB);		
-
-		mActionFilesExcel15 = filesSubMenu->addAction("Excel 15kB");
-		connect(mActionFilesExcel15, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesExcel15, ECmdCreateFileEntryXLS_15kB);
-
-		mActionFilesWord20 = filesSubMenu->addAction("Word 20kB");
-		connect(mActionFilesWord20, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesWord20, ECmdCreateFileEntryDOC_20kB);		
-
-		mActionFilesPPoint40 = filesSubMenu->addAction("PowerPoint 40kB");
-		connect(mActionFilesPPoint40, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesPPoint40, ECmdCreateFileEntryPPT_40kB);		
-
-		mActionFilesText10 = filesSubMenu->addAction("Text 10kB");
-		connect(mActionFilesText10, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesText10, ECmdCreateFileEntryTXT_10kB);		
-
-		mActionFilesText70 = filesSubMenu->addAction("Text 70kB");
-		connect(mActionFilesText70, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesText70, ECmdCreateFileEntryTXT_70kB);
-
-		mActionFilesHtml20 = filesSubMenu->addAction("HTML 20kB");
-		connect(mActionFilesHtml20, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesHtml20, ECmdCreateFileEntryHTML_20kB);		
-
-		mActionFilesMxmf40 = filesSubMenu->addAction("MXMF 40kB");
-		connect(mActionFilesMxmf40, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesMxmf40, ECmdCreateFileEntryMXMF_40kB);	
-		
-		mActionFilesRam1 = filesSubMenu->addAction("RAM 1kB");
-		connect(mActionFilesRam1, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesRam1, ECmdCreateFileEntryRAM_1kB);			
-
-		mActionFilesJad1 = filesSubMenu->addAction("JAD 1kB");
-		connect(mActionFilesJad1, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesJad1, ECmdCreateFileEntryJAD_1kB);			
-
-		mActionFilesJar10 = filesSubMenu->addAction("JAR 10kB");
-		connect(mActionFilesJar10, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesJar10, ECmdCreateFileEntryJAR_10kB);
-
-		mActionFilesVcf1 = filesSubMenu->addAction("VCF 1kB");
-		connect(mActionFilesVcf1, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesVcf1, ECmdCreateFileEntryVCF_1kB);
-		
-		mActionFilesVcs1 = filesSubMenu->addAction("VCS 1kB");
-		connect(mActionFilesVcs1, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesVcs1, ECmdCreateFileEntryVCS_1kB);
-		
-		mActionFilesSisx10 = filesSubMenu->addAction("SISX 10kB");
-		connect(mActionFilesSisx10, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesSisx10, ECmdCreateFileEntrySISX_10kB);
-
-		mActionFiles3Gpp70 = filesSubMenu->addAction("3GPP 70kB");
-		connect(mActionFiles3Gpp70, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFiles3Gpp70, ECmdCreateFileEntry3GPP_70kB);
-
-		mActionFilesMp3250 = filesSubMenu->addAction("MP3 250kB");
-		connect(mActionFilesMp3250, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesMp3250, ECmdCreateFileEntryMP3_250kB);	
-
-		mActionFilesAAC100 = filesSubMenu->addAction("AAC 100kB");
-		connect(mActionFilesAAC100, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesAAC100, ECmdCreateFileEntryAAC_100kB);	
-
-		mActionFilesSwf15 = filesSubMenu->addAction("SWF 15kB");
-		connect(mActionFilesSwf15, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesSwf15, ECmdCreateFileEntrySWF_15kB);	
-
-		mActionFilesMp4200 = filesSubMenu->addAction("MP4 200kB");
-		connect(mActionFilesMp4200, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesMp4200, ECmdCreateFileEntryMP4_200kB);	
-
-		mActionFilesRm95 = filesSubMenu->addAction("RM 95kB");
-		connect(mActionFilesRm95, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesRm95, ECmdCreateFileEntryRM_95kB);	
-
-		mActionFilesWma50 = filesSubMenu->addAction("WMA 50kB");
-		connect(mActionFilesWma50, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesWma50, ECmdCreateFileEntryWMA_50kB);			
-
-		mActionFilesWmv200 = filesSubMenu->addAction("WMV 200kB");
-		connect(mActionFilesWmv200, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionFilesWmv200, ECmdCreateFileEntryWMV_200kB);	
-		
-		// Logs sub-menu items:	
-		HbMenu* logsSubMenu = new HbMenu("Logs");
-		menu->addMenu(logsSubMenu);
-        
-		mActionLogsMissedCalls = logsSubMenu->addAction("Missed calls");
-		connect(mActionLogsMissedCalls, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionLogsMissedCalls, ECmdCreateLogEntryMissedCalls);
-
-		mActionLogsReceivedCalls = logsSubMenu->addAction("Received calls");
-		connect(mActionLogsReceivedCalls, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionLogsReceivedCalls, ECmdCreateLogEntryReceivedCalls);
-
-		mActionLogsDialledNumbers = logsSubMenu->addAction("Dialled numbers");
-		connect(mActionLogsDialledNumbers, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionLogsDialledNumbers, ECmdCreateLogEntryDialledNumbers);	
-
-		// Messaging sub-menu items:	
-		HbMenu* messageSubMenu = new HbMenu("Messaging");
-		menu->addMenu(messageSubMenu);
-        
-		mActionMessageMailboxes = messageSubMenu->addAction("Mailboxes");
-		connect(mActionMessageMailboxes, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionMessageMailboxes, ECmdCreateMessagingEntryMailboxes);
-
-		mActionMessages = messageSubMenu->addAction("Messages");
-		connect(mActionMessages, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionMessages, ECmdCreateMessagingEntryMessages);		
-		
-		// Misc sub-menu items:	
-		HbMenu* miscSubMenu = new HbMenu("Misc");
-		menu->addMenu(miscSubMenu);
-        
-		//mActionMiscConnection = miscSubMenu->addAction("Connection methods");
-		//mActionMiscImps = miscSubMenu->addAction("IMPS servers");
-		mActionMiscNotes = miscSubMenu->addAction("Notes");
-		//mActionMiscLandmarks = miscSubMenu->addAction("Landmarks");
-/*    
-		connect(mActionMiscConnection, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionMiscConnection, ECmdCreateMiscEntryAccessPoints);
-
-		connect(mActionMiscImps, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionMiscImps, ECmdCreateMiscEntryIMPSServers);
-*/
-		connect(mActionMiscNotes, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionMiscNotes, ECmdCreateMiscEntryNotes);
-/*
-		connect(mActionMiscLandmarks, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionMiscLandmarks, ECmdCreateMiscEntryLandmarks);
-*/
-		// Phonebook sub-menu items:	
-		HbMenu* phonebookSubMenu = new HbMenu("Phonebook");
-		menu->addMenu(phonebookSubMenu);
-        
-		mActionPhonebookContacts = phonebookSubMenu->addAction("Contacts");
-		connect(mActionPhonebookContacts, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionPhonebookContacts, ECmdCreatePhoneBookEntryContacts);
-
-		mActionPhonebookGroups = phonebookSubMenu->addAction("Groups");
-		connect(mActionPhonebookGroups, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionPhonebookGroups, ECmdCreatePhoneBookEntryGroups);	
-		
-		// Delete sub-menu items: 
-		HbMenu* deleteSubMenu = new HbMenu("Delete");
-		menu->addMenu(deleteSubMenu);
-
-		HbMenu* deleteAllSubMenu = new HbMenu("All items");
-		deleteSubMenu->addMenu(deleteAllSubMenu);
-        
-		mActionDeleteAllItems = deleteAllSubMenu->addAction("All");
-		connect(mActionDeleteAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteAllItems, ECmdDeleteAllEntries);
-
-		mActionDeleteCreatorItems = deleteAllSubMenu->addAction("By Creator");
-		connect(mActionDeleteCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteCreatorItems, ECmdDeleteAllCreatorEntries);
-		
-		HbMenu* deleteCalendarSubMenu = new HbMenu("Calendar entries");
-		deleteSubMenu->addMenu(deleteCalendarSubMenu);
-        
-		mActionDeleteCalAllItems = deleteCalendarSubMenu->addAction("All");
-		connect(mActionDeleteCalAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteCalAllItems, ECmdDeleteCalendarEntries);
-
-		mActionDeleteCalCreatorItems = deleteCalendarSubMenu->addAction("By Creator");
-		connect(mActionDeleteCalCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteCalCreatorItems, ECmdDeleteCreatorCalendarEntries);
-/*
-		HbMenu* deleteBookmarksSubMenu = new HbMenu("Br bookmarks");
-		deleteSubMenu->addMenu(deleteBookmarksSubMenu);
-        
-		mActionDeleteBookmarkAllItems = deleteBookmarksSubMenu->addAction("All");
-		connect(mActionDeleteBookmarkAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteBookmarkAllItems, ECmdDeleteBrowserBookmarks);
-
-		mActionDeleteBookmarkCreatorItems = deleteBookmarksSubMenu->addAction("By Creator");
-		connect(mActionDeleteBookmarkCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteBookmarkCreatorItems, ECmdDeleteCreatorBrowserBookmarks);
-
-		HbMenu* deleteBookmarkFoldersSubMenu = new HbMenu("Br bookmark folders");
-		deleteSubMenu->addMenu(deleteBookmarkFoldersSubMenu);
-        
-		mActionDeleteBookmarkFolderAllItems = deleteBookmarkFoldersSubMenu->addAction("All");
-		connect(mActionDeleteBookmarkFolderAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteBookmarkFolderAllItems, ECmdDeleteBrowserBookmarkFolders);
-
-		mActionDeleteBookmarkFolderCreatorItems = deleteBookmarkFoldersSubMenu->addAction("By Creator");
-		connect(mActionDeleteBookmarkFolderCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteBookmarkFolderCreatorItems, ECmdDeleteCreatorBrowserBookmarkFolders);		
-
-		HbMenu* deleteSavedPagesSubMenu = new HbMenu("Br saved pages");
-		deleteSubMenu->addMenu(deleteSavedPagesSubMenu);
-        
-		mActionDeleteSavedPagesAllItems = deleteSavedPagesSubMenu->addAction("All");
-		connect(mActionDeleteSavedPagesAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteSavedPagesAllItems, ECmdDeleteBrowserSavedPages);
-
-		mActionDeleteSavedPagesCreatorItems = deleteSavedPagesSubMenu->addAction("By Creator");
-		connect(mActionDeleteSavedPagesCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteSavedPagesCreatorItems, ECmdDeleteCreatorBrowserSavedPages);	
-
-		HbMenu* deleteSavedPagesFolderSubMenu = new HbMenu("Br saved page folders");
-		deleteSubMenu->addMenu(deleteSavedPagesFolderSubMenu);
-        
-		mActionDeleteSavedPagesFolderAllItems = deleteSavedPagesFolderSubMenu->addAction("All");
-		connect(mActionDeleteSavedPagesFolderAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteSavedPagesFolderAllItems, ECmdDeleteBrowserSavedPageFolders);
-
-		mActionDeleteSavedPagesFolderCreatorItems = deleteSavedPagesFolderSubMenu->addAction("By Creator");
-		connect(mActionDeleteSavedPagesFolderCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteSavedPagesFolderCreatorItems, ECmdDeleteCreatorBrowserSavedPageFolders);	
-*/
-		HbMenu* deleteFilesSubMenu = new HbMenu("Files");
-		deleteSubMenu->addMenu(deleteFilesSubMenu);
-
-		mActionDeleteFiles = deleteFilesSubMenu->addAction("By Creator");
-		connect(mActionDeleteFiles, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteFiles, ECmdDeleteCreatorFiles);			
-		
-		HbMenu* deleteLogsSubMenu = new HbMenu("Logs");
-		deleteSubMenu->addMenu(deleteLogsSubMenu);
-
-		mActionDeleteLogsAll = deleteLogsSubMenu->addAction("All");
-		connect(mActionDeleteLogsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteLogsAll, ECmdDeleteLogs);
-		
-		mActionDeleteLogsByCreator = deleteLogsSubMenu->addAction("By Creator");
-		connect(mActionDeleteLogsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteLogsByCreator, ECmdDeleteCreatorLogs);
-
-		HbMenu* deleteMessagesSubMenu = new HbMenu("Messages");
-		deleteSubMenu->addMenu(deleteMessagesSubMenu);
-
-		mActionDeleteMessagesAll = deleteMessagesSubMenu->addAction("All");
-		connect(mActionDeleteMessagesAll, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteMessagesAll, ECmdDeleteMessages);
-		
-		mActionDeleteMessagesByCreator = deleteMessagesSubMenu->addAction("By Creator");
-		connect(mActionDeleteMessagesByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteMessagesByCreator, ECmdDeleteCreatorMessages);
-/*
-		HbMenu* deleteConnMethsSubMenu = new HbMenu("Connection methods");
-		deleteSubMenu->addMenu(deleteConnMethsSubMenu);
-
-		mActionDeleteConnMethsAll = deleteConnMethsSubMenu->addAction("All");
-		connect(mActionDeleteConnMethsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteConnMethsAll, ECmdDeleteMessages);
-		
-		mActionDeleteConnMethsByCreator = deleteConnMethsSubMenu->addAction("By Creator");
-		connect(mActionDeleteConnMethsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteConnMethsByCreator, ECmdDeleteCreatorMessages);
-
-		HbMenu* deleteImpsSubMenu = new HbMenu("IMPS servers");
-		deleteSubMenu->addMenu(deleteImpsSubMenu);
-
-		mActionDeleteImpsAll = deleteImpsSubMenu->addAction("All");
-		connect(mActionDeleteImpsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteImpsAll, ECmdDeleteIMPSs);
-		
-		mActionDeleteImpsByCreator = deleteImpsSubMenu->addAction("By Creator");
-		connect(mActionDeleteImpsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteImpsByCreator, ECmdDeleteCreatorIMPSs);		
-*/		
-		HbMenu* deleteNotesSubMenu = new HbMenu("Notes");
-		deleteSubMenu->addMenu(deleteNotesSubMenu);
-
-		mActionDeleteNotes = deleteNotesSubMenu->addAction("All");
-		connect(mActionDeleteNotes, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteNotes, ECmdDeleteNotes);
-/*
-		HbMenu* deleteLandmarksSubMenu = new HbMenu("Landmarks");
-		deleteSubMenu->addMenu(deleteLandmarksSubMenu);
-
-		mActionDeleteLandmarksAll = deleteLandmarksSubMenu->addAction("All");
-		connect(mActionDeleteLandmarksAll, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteLandmarksAll, ECmdDeleteLandmarks);
-		
-		mActionDeleteLandmarksByCreator = deleteLandmarksSubMenu->addAction("By Creator");
-		connect(mActionDeleteLandmarksByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteLandmarksByCreator, ECmdDeleteCreatorLandmarks);
-*/
-		HbMenu* deleteContactsSubMenu = new HbMenu("Contacts");
-		deleteSubMenu->addMenu(deleteContactsSubMenu);
-
-		mActionDeleteContactsAll = deleteContactsSubMenu->addAction("All");
-		connect(mActionDeleteContactsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteContactsAll, ECmdDeleteContacts);
-		
-		mActionDeleteContactsByCreator = deleteContactsSubMenu->addAction("By Creator");
-		connect(mActionDeleteContactsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteContactsByCreator, ECmdDeleteCreatorContacts);
-
-		HbMenu* deleteContactGroupsSubMenu = new HbMenu("Contact groups");
-		deleteSubMenu->addMenu(deleteContactGroupsSubMenu);
-
-		mActionDeleteContactGroupsAll = deleteContactGroupsSubMenu->addAction("All");
-		connect(mActionDeleteContactGroupsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteContactGroupsAll, ECmdDeleteContactGroups);
-		
-		mActionDeleteContactGroupsByCreator = deleteContactGroupsSubMenu->addAction("By Creator");
-		connect(mActionDeleteContactGroupsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionDeleteContactGroupsByCreator, ECmdDeleteCreatorContactGroups);		
-/*		
-		// select random data file:
-		mActionSelectRandomFile = menu->addAction("Select random data file"); 
-		connect(mActionSelectRandomFile, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mActionSelectRandomFile, ECmdSelectRandomDataFile);	
-*/		
-		// About & exit menu items:
-		mActionAbout = menu->addAction("About Creator");
-        connect(mActionAbout, SIGNAL( triggered() ), this, SLOT( showAboutPopup() ) );
-    
-        mActionExit = menu->addAction("Exit");
-        connect(mActionExit, SIGNAL(triggered()), &app, SLOT( quit() ) );
-
-        this->setMenu(menu);
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::createMemoryInfoText()
-{
-    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical, this);
-
-    // get memory details from engine;
-    mMemoryDetails = mEngineWrapper.GetMemoryDetails();
-	
-    QList<MemoryDetails> memDet = mEngineWrapper.GetMemoryDetailsList();
-    
-    if (layout != NULL) 
-    	{
-		HbLabel* edit = new HbLabel(this);
-        //HbTextEdit* edit = new HbTextEdit(this);
-        if(edit != NULL) 
-        	{
-        QString text = QString("<BR><BR>Free RAM Memory:<BR> %1 of %2 kB").arg(mMemoryDetails.mRamFree).arg(mMemoryDetails.mRamSize);	
-        //QString text = QString("\n\nFree RAM Memory:\n %1 of %2 kB").arg(mMemoryDetails.mRamFree).arg(mMemoryDetails.mRamSize);
-			for(int i=0 ; i < memDet.count() ; i++ )
-				{
-			text += QString("<BR><BR>Free %1: Memory:<BR> %2 of %3 kB").arg(memDet[i].mDriveLetter).arg(memDet[i].mFree).arg(memDet[i].mSize);//text += QString("\n\nFree %1: Memory:\n %2 of %3 kB").arg(memDet[i].mDriveLetter).arg(memDet[i].mFree).arg(memDet[i].mSize);
-				}
-			edit->setTextWrapping(Hb::TextWordWrap);
-			edit->setHtml(text);
-			//edit->setPlainText(text);
-                	
-            //edit->setReadOnly(true);
-            //edit->setCursorHidden(true);
-            edit->setAttribute(Qt::WA_InputMethodEnabled, false);
-            layout->addItem(edit);
-            layout->setContentsMargins(5, 5, 5, 5);
-            this->setLayout(layout);
-        	}
-        
-    }
-    
-}
-
-
-// ---------------------------------------------------------------------------
-
-void MainView::showAboutPopup()
-{
-	Notifications::about();
-
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::executeMenuCommand(int cmd)
-{
-    switch (cmd) {
-		case ECmdCreateFromFile:
-		case ECmdCreateCalendarEntryAppointments:
-		case ECmdCreateCalendarEntryEvents:
-		case ECmdCreateCalendarEntryAnniversaries:
-		case ECmdCreateCalendarEntryToDos:
-		case ECmdCreateCalendarEntryReminders:
-		case ECmdCreateBrowserBookmarkEntries:
-        case ECmdCreateBrowserBookmarkFolderEntries:
-        case ECmdCreateBrowserSavedPageEntries:
-        case ECmdCreateBrowserSavedPageFolderEntries: 
-		case ECmdCreateFileEntryEmptyFolder:
-	    case ECmdCreateFileEntry3GPP_70kB:
-	    case ECmdCreateFileEntryAAC_100kB:
-	    case ECmdCreateFileEntryAMR_20kB:
-	    case ECmdCreateFileEntryBMP_25kB:
-	    case ECmdCreateFileEntryDeck_1kB:
-	    case ECmdCreateFileEntryDOC_20kB:
-	    case ECmdCreateFileEntryGIF_2kB:
-	    case ECmdCreateFileEntryHTML_20kB:
-	    case ECmdCreateFileEntryJAD_1kB:
-	    case ECmdCreateFileEntryJAR_10kB:
-	    case ECmdCreateFileEntryJP2_65kB:
-	    case ECmdCreateFileEntryJPEG_200kB:
-	    case ECmdCreateFileEntryJPEG_25kB:
-	    case ECmdCreateFileEntryJPEG_500kB:
-	    case ECmdCreateFileEntryMIDI_10kB:
-	    case ECmdCreateFileEntryMP3_250kB:
-	    case ECmdCreateFileEntryMP4_200kB:
-	    case ECmdCreateFileEntryMXMF_40kB:
-	    case ECmdCreateFileEntryPNG_15kB:
-	    case ECmdCreateFileEntryPPT_40kB:
-	    case ECmdCreateFileEntryRAM_1kB:
-	    case ECmdCreateFileEntryRM_95kB:
-	    case ECmdCreateFileEntryRNG_1kB:
-	    case ECmdCreateFileEntrySVG_15kB:
-	    case ECmdCreateFileEntrySWF_15kB:
-	    case ECmdCreateFileEntryTIF_25kB:
-	    case ECmdCreateFileEntryTXT_10kB:
-	    case ECmdCreateFileEntryTXT_70kB:
-	    case ECmdCreateFileEntryVCF_1kB:
-	    case ECmdCreateFileEntryVCS_1kB:
-	    case ECmdCreateFileEntryWAV_20kB:
-	    case ECmdCreateFileEntryXLS_15kB:
-	    case ECmdCreateFileEntrySISX_10kB:
-	    case ECmdCreateFileEntryWMA_50kB:
-	    case ECmdCreateFileEntryWMV_200kB:
-	    case ECmdCreateLogEntryMissedCalls:
-	    case ECmdCreateLogEntryReceivedCalls:
-	    case ECmdCreateLogEntryDialledNumbers:
-	    case ECmdCreateMessagingEntryMailboxes:
-	    case ECmdCreateMessagingEntryMessages:		
-        case ECmdCreateMiscEntryAccessPoints:
-		case ECmdCreateMiscEntryIMPSServers:
-		case ECmdCreateMiscEntryNotes:
-		case ECmdCreateMiscEntryLandmarks:		
-		case ECmdCreatePhoneBookEntryContacts:
-	    case ECmdCreatePhoneBookEntryGroups:
-		case ECmdDeleteAllEntries:
-	    case ECmdDeleteAllCreatorEntries:
-	    case ECmdDeleteContacts:
-        case ECmdDeleteCreatorContacts:
-        case ECmdDeleteContactGroups:
-        case ECmdDeleteCreatorContactGroups:
-        case ECmdDeleteCalendarEntries:
-        case ECmdDeleteCreatorCalendarEntries:
-        case ECmdDeleteBrowserBookmarks:
-        case ECmdDeleteCreatorBrowserBookmarks:
-        case ECmdDeleteBrowserBookmarkFolders:
-        case ECmdDeleteCreatorBrowserBookmarkFolders:
-        case ECmdDeleteBrowserSavedPages:
-        case ECmdDeleteCreatorBrowserSavedPages:
-        case ECmdDeleteBrowserSavedPageFolders:
-        case ECmdDeleteCreatorBrowserSavedPageFolders:
-        case ECmdDeleteCreatorFiles:
-        case ECmdDeleteLogs:
-        case ECmdDeleteCreatorLogs:
-        case ECmdDeleteMessages:
-        case ECmdDeleteCreatorMessages:
-        case ECmdDeleteMailboxes:
-        case ECmdDeleteCreatorMailboxes:
-        case ECmdDeleteIAPs:
-        case ECmdDeleteCreatorIAPs:
-        case ECmdDeleteIMPSs:
-        case ECmdDeleteCreatorIMPSs:
-        case ECmdDeleteNotes:
-        case ECmdDeleteLandmarks:
-        case ECmdDeleteCreatorLandmarks:
-		case ECmdSelectRandomDataFile: {
-			mEngineWrapper.ExecuteOptionsMenuCommand(cmd);
-            break;
-        }
-        default: {
-            Notifications::error(QString("Unsupported command: %1").arg(cmd));
-            break;
-        }
-    }
-}
-
-void MainView::closeApp()
-{
-	qApp->quit();
-}
-
-// ---------------------------------------------------------------------------
--- a/creator/src/notifications.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,308 +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 <hbmessagebox.h>
-#include <hblabel.h>
-#include <hbaction.h>
-#include <hbpopup.h>
-#include <hblineedit.h>
-#include <hbvalidator.h>
-#include <hbabstractitemview.h>
-#include <hbprogressdialog.h>
-#include <hbdatetimepicker.h>
-
-#include <QString>
-#include <QDate>
-#include <QRegExp>
-#include <QList>
-
-#include "notifications.h"
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout )
-{
-    HbMessageBox *messageBox = new HbMessageBox(type);
-    messageBox->setText(text);
-    messageBox->setStandardButtons( HbMessageBox::Ok );
-    if(label.length())
-        {
-        HbLabel *header = new HbLabel(label, messageBox);
-        messageBox->setHeadingWidget(header);
-        }
-    messageBox->setAttribute(Qt::WA_DeleteOnClose);
-    messageBox->setTimeout(timeout);
-    messageBox->open();
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::about()
-{
-    showMessageBox(HbMessageBox::MessageTypeInformation,
-        "Version 6.1.2 - September 9th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.",
-        "About Creator", 
-        HbPopup::NoTimeout
-        );
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::error(const QString& errorMessage)
-{
-    showMessageBox(HbMessageBox::MessageTypeWarning, errorMessage, QString("Error"), 3000);
-}
-
-
-// ---------------------------------------------------------------------------
-
-HbProgressDialog* Notifications::showProgressBar(const QString& text, int max)
-{
-	HbProgressDialog *note = new HbProgressDialog(HbProgressDialog::ProgressDialog);
-    note->setText(text);
-    note->setMaximum(max);
-    note->setAutoClose(false);
-    note->show();
-    return note;
-
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, int timeout)
-{
-    showMessageBox(type, text, QString("Creator"), timeout);
-}
-
-
-// ---------------------------------------------------------------------------
-
-CreatorYesNoDialog::CreatorYesNoDialog(MUIObserver* observer, int userData) : 
-    HbMessageBox(HbMessageBox::MessageTypeQuestion, NULL),
-    CreatorDialog(observer, userData)
-{
-}
-
-void CreatorYesNoDialog::launch(const QString& text, const QString& label, MUIObserver* observer, int userData) throw(std::exception)
-{
-    CreatorYesNoDialog* dlg = new CreatorYesNoDialog(observer, userData);
-    dlg->setStandardButtons( HbMessageBox::Yes | HbMessageBox::No );
-    dlg->setText(text);
-    if(label.length())
-        dlg->setHeadingWidget(new HbLabel(label, dlg));
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    dlg->setTimeout(HbPopup::NoTimeout);
-    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
-}
-
-void CreatorYesNoDialog::DialogClosed(HbAction *action)
-{
-    TBool PositiveAction(EFalse);
-    if(action && (action->softKeyRole()==QAction::PositiveSoftKey || !action->text().compare("yes", Qt::CaseInsensitive))){
-        PositiveAction = ETrue;
-    }
-    NotifyObserver(PositiveAction);
-}
-
-CreatorInputDialog::CreatorInputDialog(int* value, MUIObserver* module, int userData) : 
-    HbInputDialog(NULL),
-    CreatorDialog(module, userData),
-    mIntValue(value), 
-    mStrValue(mDummy)// will not be used
-{
-    if(!value)
-        throw std::invalid_argument("value cannot be the null!");
-}
-
-CreatorInputDialog::CreatorInputDialog(TDes& value, MUIObserver* module, int userData) : 
-    HbInputDialog(NULL),
-    CreatorDialog(module, userData),
-    mIntValue(NULL),
-    mStrValue(value)
-{
-}
-
-void CreatorInputDialog::launch(const QString& label, int* value, bool acceptsZero, MUIObserver* observer, int userData) throw( std::exception )
-{
-    CreatorInputDialog* dlg = new CreatorInputDialog(value, observer, userData);
-    dlg->setPromptText(label);
-    dlg->setInputMode(IntInput);
-    HbValidator *validator = new HbValidator(dlg);
-    QString tmp;
-    if (acceptsZero == false) {
-        tmp.append("^[1-9]{1}\\d{0,4}");
-    }
-    else {
-        tmp.append("^[0-9]{1,5}");
-    }
-        
-    QRegExp rxBasic(tmp);
-    validator->addField(new QRegExpValidator(rxBasic, 0), "");
-    dlg->setValidator(validator);
-    dlg->setValue(QVariant(*value));
-    dlg->lineEdit()->setSelection(0, dlg->value().toString().length());
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
-}
-
-void CreatorInputDialog::launch(const QString& label, TDes& value, MUIObserver* observer, int userData) throw( std::exception )
-{
-    CreatorInputDialog* dlg = new CreatorInputDialog(value, observer, userData);
-    dlg->setPromptText(label);
-    dlg->lineEdit()->setMaxLength(value.MaxLength());
-    dlg->setValue(QString::fromUtf16(value.Ptr(), value.Length()));
-    dlg->lineEdit()->setSelection(0, dlg->value().toString().length());
-    dlg->setInputMode(TextInput);
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
-}
-
-void CreatorInputDialog::DialogClosed(HbAction *action)
-{
-    TBool PositiveAction(EFalse);
-    if(action && (action->softKeyRole()==QAction::PositiveSoftKey || !action->text().compare("ok", Qt::CaseInsensitive))){
-        bool ok = true;
-        if( inputMode() == IntInput )
-            *mIntValue = value().toInt(&ok);
-        else if( inputMode() == TextInput && mStrValue.MaxLength() >= value().toString().length() )
-            mStrValue.Copy(value().toString().utf16());
-        else
-            ok = false;
-        PositiveAction = ok ? ETrue : EFalse;
-    }
-    NotifyObserver(PositiveAction);
-}
-
-CreatorSelectionDialog::CreatorSelectionDialog(int* selectedItem, MUIObserver* observer, int userData) throw(std::exception) : 
-    HbSelectionDialog(NULL),
-    CreatorDialog(observer, userData),
-    mSelectedItem(selectedItem),
-    mSelectedItems(NULL)
-{
-    if(!mSelectedItem)
-        throw std::invalid_argument("selectedItem cannot be null!");
-}
-
-CreatorSelectionDialog::CreatorSelectionDialog(CArrayFixFlat<TInt>* selectedItems, MUIObserver* observer, int userData) throw(std::exception) : 
-    HbSelectionDialog(NULL),
-    CreatorDialog(observer, userData),
-    mSelectedItem(NULL),
-    mSelectedItems(selectedItems)
-{
-    if(!mSelectedItems)
-        throw std::invalid_argument("selectedItems cannot be null!");
-}
-
-void CreatorSelectionDialog::launch(const QString& label, const QStringList& items, int* selectedItem, MUIObserver* observer, int userData) throw(std::exception)
-{
-    CreatorSelectionDialog* dlg = new CreatorSelectionDialog(selectedItem, observer, userData);
-    if(label.length())
-        dlg->setHeadingWidget(new HbLabel(label, dlg));
-    dlg->setStringItems(items);
-    dlg->setSelectionMode(HbAbstractItemView::SingleSelection); 
-    dlg->setSelectedItems(QList<QVariant>());
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
-}
-
-void CreatorSelectionDialog::launch(const QString& label, const QStringList& items, CArrayFixFlat<TInt>* selectedItems, MUIObserver* observer, int userData) throw(std::exception)
-{
-    CreatorSelectionDialog* dlg = new CreatorSelectionDialog(selectedItems, observer, userData);
-    if(label.length())
-        dlg->setHeadingWidget(new HbLabel(label, dlg));
-    dlg->setStringItems(items);
-    dlg->setSelectionMode(HbAbstractItemView::MultiSelection); 
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
-}
-
-void CreatorSelectionDialog::DialogClosed(HbAction *action)
-{
-    TBool PositiveAction(EFalse);
-    //CreatorSelectionDialog* dlg = qobject_cast<CreatorSelectionDialog*>(sender());
-    if(!action || (action && action->softKeyRole()==QAction::SelectSoftKey) || (action && !action->text().compare("ok", Qt::CaseInsensitive))){
-        if(selectedItems().count()){
-            try{
-                if( selectionMode() == HbAbstractItemView::SingleSelection && mSelectedItem){
-                    bool ok(false);
-                    *mSelectedItem = selectedItems().at(0).toInt(&ok);
-                    if(!ok)
-                        throw std::invalid_argument("cannot obtain selected item!");
-                }
-                if( selectionMode() == HbAbstractItemView::MultiSelection && mSelectedItems){
-                    QList<QVariant> items = selectedItems();
-                    foreach( QVariant item, items){
-                        QT_TRAP_THROWING( mSelectedItems->AppendL( item.toInt() ) );
-                    }
-                }
-                PositiveAction = ETrue;
-            }
-            catch (std::exception& e){
-                Notifications::error( QString("exception: ")+e.what() );
-            }
-        }
-    }
-    NotifyObserver(PositiveAction);
-}
-
-CreatorDateTimeDialog::CreatorDateTimeDialog(TTime* value, MUIObserver* observer, int userData) : 
-    HbDialog(NULL),
-    CreatorDialog(observer, userData),
-    mValue(value)
-{
-}
-
-void CreatorDateTimeDialog::launch(const QString& label, TTime* value, MUIObserver* observer, int userData) throw( std::exception )
-{
-    CreatorDateTimeDialog* dlg = new CreatorDateTimeDialog(value, observer, userData);
-    if(!value)
-        throw std::invalid_argument("value cannot be the null!");
-    if(label.length())
-        dlg->setHeadingWidget( new HbLabel(label, dlg) );
-    
-    // TTime to QDate
-    TBuf<20> timeString;
-    _LIT(KDateString,"%D%M%Y%/0%1%/1%2%/2%3%/3");
-    TRAP_IGNORE( value->FormatL(timeString, KDateString) );
-    QString temp = QString::fromUtf16(timeString.Ptr(), timeString.Length());
-    temp.replace(QChar('/'), QChar('-'));
-    QDate date = QDate::fromString(temp, "dd-MM-yyyy");
-    HbDateTimePicker* widget = new HbDateTimePicker( date, dlg );
-    dlg->setContentWidget( widget );
-    dlg->addAction(new HbAction("Ok", dlg));
-    dlg->addAction(new HbAction("Cancel", dlg));
-    dlg->setModal(true); // Dialog is modal  
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    dlg->setTimeout(HbPopup::NoTimeout);
-    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
-}
-
-void CreatorDateTimeDialog::DialogClosed(HbAction *action)
-{
-    TBool PositiveAction(EFalse);
-    if(action && (action->softKeyRole()==QAction::PositiveSoftKey || !action->text().compare("ok", Qt::CaseInsensitive))){
-        QString str = qobject_cast<HbDateTimePicker*>(contentWidget())->date().toString(Qt::ISODate);
-        str.remove('-');
-        str += ":000000";// 0h 0m 0s
-        TBuf<30> dateTimeString(str.utf16());
-        mValue->Set(dateTimeString);
-        PositiveAction = ETrue;
-    }
-    NotifyObserver(PositiveAction);
-}
-//End of File
--- a/filebrowser/engine/FB.hrh	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +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 FILEBROWSER_HRH
-#define FILEBROWSER_HRH
-
-enum TFileBrowserCommandIds
-    {
-    EFileBrowserCmdFile = 1,
-    EFileBrowserCmdFileBack,
-    EFileBrowserCmdFileOpen,
-    EFileBrowserCmdFileOpenApparc,
-    EFileBrowserCmdFileOpenDocHandlerEmbed,
-    EFileBrowserCmdFileOpenDocHandlerStandAlone,
-    EFileBrowserCmdFileOpenFileService,
-    EFileBrowserCmdFileOpenDrive,
-    EFileBrowserCmdFileOpenDirectory,
-    EFileBrowserCmdFileView,
-    EFileBrowserCmdFileViewText,
-    EFileBrowserCmdFileViewHex,
-    EFileBrowserCmdFileEdit,
-    EFileBrowserCmdFileEditText,
-    EFileBrowserCmdFileEditHex,
-    EFileBrowserCmdFileSearch,
-    EFileBrowserCmdFileSendTo,
-    EFileBrowserCmdFileNew,
-    EFileBrowserCmdFileNewFile,
-    EFileBrowserCmdFileNewDirectory,
-    EFileBrowserCmdFileDelete,
-    EFileBrowserCmdFileRename,
-    EFileBrowserCmdFileTouch,
-    EFileBrowserCmdFileProperties,
-    EFileBrowserCmdFileChecksums,
-    EFileBrowserCmdFileChecksumsMD5,
-    EFileBrowserCmdFileChecksumsMD2,
-    EFileBrowserCmdFileChecksumsSHA1,
-    EFileBrowserCmdFileSetAttributes,
-    EFileBrowserCmdFileCompress,
-    EFileBrowserCmdFileDecompress,
-    EFileBrowserCmdEdit,
-    EFileBrowserCmdSnapShot,
-    EFileBrowserCmdEditCut,
-    EFileBrowserCmdEditCopy,    
-    EFileBrowserCmdEditPaste,
-    EFileBrowserCmdEditCopyToFolder,    
-    EFileBrowserCmdEditMoveToFolder,
-    EFileBrowserCmdEditSelect,    
-    EFileBrowserCmdEditUnselect,
-    EFileBrowserCmdEditSelectAll,    
-    EFileBrowserCmdEditUnselectAll,
-    EFileBrowserCmdView,
-    EFileBrowserCmdViewSort,
-    EFileBrowserCmdViewSortByName,
-    EFileBrowserCmdViewSortByExtension,
-    EFileBrowserCmdViewSortByDate,
-    EFileBrowserCmdViewSortBySize,
-    EFileBrowserCmdViewOrder,
-    EFileBrowserCmdViewOrderAscending,
-    EFileBrowserCmdViewOrderDescending,
-    EFileBrowserCmdViewFilterEntries,
-    EFileBrowserCmdViewRefresh,
-    EFileBrowserCmdDiskAdmin,    
-    EFileBrowserCmdDiskAdminSetDrivePassword,    
-    EFileBrowserCmdDiskAdminUnlockDrive,    
-    EFileBrowserCmdDiskAdminClearDrivePassword,    
-    EFileBrowserCmdDiskAdminEraseDrivePassword,    
-    EFileBrowserCmdDiskAdminFormatDrive,    
-    EFileBrowserCmdDiskAdminQuickFormatDrive,    
-    EFileBrowserCmdDiskAdminCheckDisk,    
-    EFileBrowserCmdDiskAdminScanDrive,    
-    EFileBrowserCmdDiskAdminSetDriveName,    
-    EFileBrowserCmdDiskAdminSetDriveVolumeLabel,    
-    EFileBrowserCmdDiskAdminEraseMBR,
-    EFileBrowserCmdDiskAdminDrivePartition,    
-    EFileBrowserCmdDiskAdminEjectDrive,    
-    EFileBrowserCmdDiskAdminDismountFileSystem,    
-    EFileBrowserCmdTools,    
-    EFileBrowserCmdToolsAllFiles,
-    EFileBrowserCmdToolsAvkonIconCache,
-    EFileBrowserCmdToolsAvkonIconCacheEnable,
-    EFileBrowserCmdToolsAvkonIconCacheDisable,    
-    EFileBrowserCmdToolsDisableExtErrors,    
-    EFileBrowserCmdToolsEditDataTypes,
-    EFileBrowserCmdToolsEnableExtErrors,
-    EFileBrowserCmdToolsErrorSimulate,
-    EFileBrowserCmdToolsErrorSimulateLeave,
-    EFileBrowserCmdToolsErrorSimulatePanic,
-    EFileBrowserCmdToolsErrorSimulateException,    
-    EFileBrowserCmdToolsLocalConnectivity,    
-    EFileBrowserCmdToolsLocalConnectivityActivateInfrared,    
-    EFileBrowserCmdToolsLocalConnectivityLaunchBTUI,    
-    EFileBrowserCmdToolsLocalConnectivityLaunchUSBUI,    
-    EFileBrowserCmdToolsInstalledApps,    
-    EFileBrowserCmdToolsOpenFiles,    
-    EFileBrowserCmdToolsMsgAttachments,    
-    EFileBrowserCmdToolsMsgAttachmentsInbox,    
-    EFileBrowserCmdToolsMsgAttachmentsDrafts,    
-    EFileBrowserCmdToolsMsgAttachmentsSentItems,    
-    EFileBrowserCmdToolsMsgAttachmentsOutbox,    
-    EFileBrowserCmdToolsMsgStoreWalk,
-    EFileBrowserCmdToolsSecureBackup,    
-    EFileBrowserCmdToolsSecureBackupStartBackup,    
-    EFileBrowserCmdToolsSecureBackupStartRestore,    
-    EFileBrowserCmdToolsSecureBackupStop,    
-    EFileBrowserCmdToolsSetDebugMask,    
-    EFileBrowserCmdToolsMemoryInfo,    
-    EFileBrowserCmdSettings,
-    EFileBrowserCmdAbout,
-    EFileBrowserCmdSettingsChange,
-    EFileBrowserCmdSettingsExit,
-    EFileBrowserCmdSettingsBack,
-    EFileBrowserSettingItemList,
-    EFileBrowserCmdDataTypesChangeMapping,
-    EFileBrowserCmdDataTypesSetDefaultMapping,
-    EFileBrowserCmdDataTypesRefresh,
-    EFileBrowserCmdDataTypesExit,
-    EFileBrowserCmdDataTypesBack,
-    EFileBrowserDataTypesList,
-    EFileBrowserProgressNote,
-    EFileBrowserWaitNote,
-    EFileBrowserAttributeEditorSetArchive,
-    EFileBrowserAttributeEditorSetHidden,
-    EFileBrowserAttributeEditorSetReadOnly,
-    EFileBrowserAttributeEditorSetSystem,
-    EFileBrowserAttributeEditorSetRecurse,
-    EFileBrowserSearchQuerySearchDir,
-    EFileBrowserSearchQueryWildCards,
-    EFileBrowserSearchQueryTextInFile,
-    EFileBrowserSearchQueryMinSize,
-    EFileBrowserSearchQueryMaxSize,
-    EFileBrowserSearchQueryMinDate,
-    EFileBrowserSearchQueryMaxDate,
-    EFileBrowserSearchQueryRecurse,
-    EFileBrowserCmdFileEditorViewAsText,
-    EFileBrowserCmdFileEditorViewAsHex,
-    EFileBrowserCmdFileEditorSave,
-    EFileBrowserCmdFileEditorSaveAs,
-    EFileBrowserCmdFileEditorSaveFormat,
-    EFileBrowserCmdFileEditorSaveFormatANSIASCII,
-    EFileBrowserCmdFileEditorSaveFormatUTF8,
-    EFileBrowserCmdFileEditorSaveFormatUTF16LE,
-    EFileBrowserCmdFileEditorSaveFormatUTF16BE,
-    EFileBrowserCmdFileEditorEditAsText,
-    EFileBrowserCmdFileEditorEditAsHex,
-    EFileBrowserCmdFileEditorExit,
-    EFileBrowserFileOpCommandAttribs,
-    EFileBrowserFileOpCommandCopy,
-    EFileBrowserFileOpCommandMove,
-    EFileBrowserFileOpCommandRename,
-    EFileBrowserFileOpCommandDelete,
-    EFileBrowserFileOpCommandDriveSnapShot
-    };
-
-enum TFileBrowserFixedIconIds
-    {
-    EFixedIconMarking = 0,
-    EFixedIconEmpty,    
-    EFixedIconPhoneMemory,    
-    EFixedIconMemoryCard,    
-    EFixedIconMemoryCardDisabled,    
-    EFixedIconFolder,    
-    EFixedIconFolderSub,    
-    EFixedIconFolderCurrent,
-    EFixedIconListLength // this should be last   
-    };
-
-enum TFileBrowserEntryOverwriteActions
-    {
-    EFileActionOverwriteAll = 0,
-    EFileActionSkipAllExisting,    
-    EFileActionGenerateUniqueFilenames,
-    EFileActionQueryPostFix   
-    };
-
-enum TFileBrowserSecureBackupState
-    {
-    ESecureBackupStateFull = 0,
-    ESecureBackupStatePartial    
-    };
-
-enum TFileBrowserSecureBackupType
-    {
-    ESecureBackupTypeBase = 0,
-    ESecureBackupTypeIncremental    
-    };
-    
-enum TFileBrowserDataTypePriorities
-    {
-    EDataTypePriorityMaximum = 0,
-    EDataTypePriorityHigh,    
-    EDataTypePriorityNormal,
-    EDataTypePriorityLow,
-    EDataTypePriorityLastResort   
-    };
-
-enum TFileBrowserCommonFileActions
-    {
-    ECommonFileActionViewAsTextHex = 0,
-    ECommonFileActionOpenWithApparc,    
-    ECommonFileActionOpenWithDocHandlerEmbed   
-    };
-                     
-enum TFileBrowserSettingListTabs
-    {
-    ETabGeneral = 0,
-    ETabFileOps    
-    };
-    
-enum TFileBrowserSettingListIds
-    {
-    ESettingListDisplayModeSelection = 0,
-    ESettingListFileViewModeSelection,
-    ESettingListShowSubdirectoryInfoSelection,
-    ESettingListShowAssociatedIconsSelection,
-    ESettingListRememberLastPathSelection,
-    ESettingListRememberFolderSelection,
-    ESettingListEnableToolbar,
-
-    ESettingListSupportNetworkDrivesSelection,
-    ESettingListBypassPlatformSecuritySelection,
-    ESettingListRemoveFileLocksSelection,
-    ESettingListIgnoreProtectionsAttsSelection,
-    ESettingListRemoveROMWriteProtectionSelection
-    };
-
-enum TFileBrowserSettingDisplayModes
-    {
-    EDisplayModeFullScreen = 0,
-    EDisplayModeNormal
-    };
-
-enum TFileBrowserSettingFileViewModes
-    {
-    EFileViewModeSimple = 0,
-    EFileViewModeExtended
-    };
-
-enum TFileBrowserFileEditorModes
-    {
-    EFileEditorViewAsText = 0,
-    EFileEditorViewAsHex,
-    EFileEditorEditAsText,
-    EFileEditorEditAsHex
-    };
-
-enum
-    {
-    EFileViewerDialogControl = 0x5FEC
-    };
-
-enum
-    {
-    EFileEditorDialogId = 1
-    };
-
-enum TFileBrowserCmdFileChecksums
-    {
-    EFileChecksumsMD5 = 0,
-    EFileChecksumsMD2,
-    EFileChecksumsSHA1
-    };
-
-enum TListingMode
-    {
-    ENormalEntries = 0,
-    ESearchResults,
-    EOpenFiles,
-    EMsgAttachmentsInbox,
-    EMsgAttachmentsDrafts,
-    EMsgAttachmentsSentItems,
-    EMsgAttachmentsOutbox
-    };
-
-enum TClipBoardMode
-    {
-    EClipBoardModeCut = 0,
-    EClipBoardModeCopy
-    };
-
-#endif      // FILEBROWSER_HRH
--- a/filebrowser/engine/FBFileOps.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1164 +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 FILES
-#include "FBFileOps.h"
-#include "FBFileUtils.h"
-#include "engine.h"
-#include "FBTraces.h"
-
-#ifndef FILEBROWSER_LITE
-  #include "FBFileOpClient.h"
-#endif  
-
-#include <f32file.h>
-#include <bautils.h>
-#include <eikenv.h>
-#include <babackup.h>
-
-const TInt KSecureBackupStartDelay = 750000;
-const TInt KSecureBackupLoopDelay = 100000;
-const TInt KSecureBackupEndDelay = 200000;
-const TInt KMaxFileLockAttempts = 3;
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-CFileBrowserFileOps* CFileBrowserFileOps::NewL(CEngine* aEngine)
-	{
-	CFileBrowserFileOps* self = new(ELeave) CFileBrowserFileOps(aEngine);
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	CleanupStack::Pop();
-	return self;
-	}
-
-// --------------------------------------------------------------------------------------------
-
-CFileBrowserFileOps::CFileBrowserFileOps(CEngine* aEngine) : iEngine(aEngine)
-	{
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileOps::ConstructL()
-	{
-	iRecursiveState = EFileOpInvalid;
-	iSecureBackUpActive = EFalse;
-	iFileCommandActivatedSecureBackup = EFalse;
-	
-    User::LeaveIfError(iFs.Connect());
-    iFileMan = CFileMan::NewL( iFs, this );
-	}
-
-// --------------------------------------------------------------------------------------------
-
-CFileBrowserFileOps::~CFileBrowserFileOps()
-	{
-	if (iSBEClient)
-	    delete iSBEClient;
-	
-    #ifndef FILEBROWSER_LITE	
-        if (iFileOpClient)
-            delete iFileOpClient;
-    #endif	
-
-    delete iFileMan;
-    iFs.Close();    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::ActivateSecureBackUpViaFileOp()
-    {
-    iFileManObserverResult = MFileManObserver::EContinue;
-    // if already activate by a file command, return ok
-    if (iFileCommandActivatedSecureBackup)
-        return KErrNone;
-    else
-        {
-        // if secure backup is already active, disable it first, because it may in wrong state
-        if (iSecureBackUpActive)
-            DeActivateSecureBackUp();
-        }
-    
-    // try to activate full secure backup
-    TInt err = ActivateSecureBackUp(conn::EBURBackupFull, conn::EBackupBase);
-    
-    if (err == KErrNone)
-        iFileCommandActivatedSecureBackup = ETrue;
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DeActivateSecureBackUpViaFileOp()
-    {
-    TInt err(KErrGeneral);
-    iFileManObserverResult = MFileManObserver::EContinue;
-    
-    // if activate by a file command, try to reactivate it
-    if (iFileCommandActivatedSecureBackup)
-        {
-        err = DeActivateSecureBackUp();
-        
-        // even if it fails, forget the state
-        iFileCommandActivatedSecureBackup = EFalse;
-        }
-
-    return err;
-    }    
-    
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::ActivateSecureBackUp(conn::TBURPartType aPartType, conn::TBackupIncType aBackupIncType)
-    {
-    iFileManObserverResult = MFileManObserver::EContinue;
-    // check for invalid parameters
-    if (aPartType == conn::EBURNormal || aBackupIncType == conn::ENoBackup)
-        User::Panic(_L("Inv.Usage.SE"), 532);
-    
-    TInt err(KErrNone);
-    
-    if (!iSBEClient)
-        {
-        TRAP(err, iSBEClient = conn::CSBEClient::NewL());
-        if (err != KErrNone)
-            return err;
-        }
-    
-    TDriveList driveList;
-    err = iFs.DriveList(driveList);
-    
-    if (err == KErrNone)
-        {
-        // make sure that the application has a system status to prevent getting shut down events
-        iEngine->EikonEnv()->SetSystem(ETrue);
-    
-        // activating secure back up removes locks from files which respect this fuctionality                
-        TRAP(err, iSBEClient->SetBURModeL(driveList, aPartType, aBackupIncType));
-        
-        if (err == KErrNone)
-            {
-            iSecureBackUpActive = ETrue;
-            User::After(KSecureBackupStartDelay); // a short delay to wait to activate
-            }
-        }
-
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DeActivateSecureBackUp()
-    {
-    TInt err(KErrNone);
-    
-    if (!iSBEClient)
-        {
-        TRAP(err, iSBEClient = conn::CSBEClient::NewL());
-        if (err != KErrNone)
-            return err;
-        
-        // make sure that the application has a system status
-        iEngine->EikonEnv()->SetSystem(ETrue);
-        }
-        
-    TDriveList driveList;
-    err = iFs.DriveList(driveList);
-    
-    if (err == KErrNone)
-        {
-        // deactivate secure backup
-        TRAP(err, iSBEClient->SetBURModeL(driveList, conn::EBURNormal, conn::ENoBackup));
-        
-        User::After(KSecureBackupEndDelay); // a short delay to wait to deactivate
-
-        // system status not needed anymore
-        iEngine->EikonEnv()->SetSystem(EFalse);
-        }
-    
-    iSecureBackUpActive = EFalse;
-
-    return err;
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DoFindEntries(const TDesC& aFileName, const TDesC& aPath)
-    {
-    TFindFile fileFinder(iFs);
-    CDir* dir;
-    TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir);
-
-    while (err == KErrNone && iFileManObserverResult != MFileManObserver::ECancel)
-        {
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TEntry entry = (*dir)[i];
-
-            if (entry.iName.Length() && aPath.Length())
-                {
-                // parse the entry
-                TParse parsedName;
-                parsedName.Set(entry.iName, &fileFinder.File(), NULL);
-                
-                if (parsedName.Drive().Length() && aPath.Length() && parsedName.Drive()[0] == aPath[0])
-                    {
-                    // get full source path
-                    TFileName fullSourcePath = parsedName.FullName();
-                    if (entry.IsDir())
-                        fullSourcePath.Append(_L("\\"));
-                    
-                    // call the file operation command
-                    switch(iRecursiveState)
-                        {
-                        case EFileOpAttribs:
-                            {
-                            // the same attribs command can be given for both directories and files
-                            FileOpAttribs(fullSourcePath, iUint1, iUint2, iTime1, iUint3);
-                            }
-                            break;
-
-                        case EFileOpCopy:
-                            {
-                            // calculate length of new entries added to the original source path
-                            TUint newEntriesLength = fullSourcePath.Length() - iBuf1.Length();
-                            
-                            // get pointer description to the rightmost data
-                            TPtr16 newEntriesPtr = fullSourcePath.RightTPtr(newEntriesLength);
-                            
-                            // generate target path
-                            TFileName fullTargetPath = iBuf2;
-                            fullTargetPath.Append(newEntriesPtr);
-                            
-                            if (entry.IsDir())
-                                {
-                                // if it is a directory entry, just create it based on the entry's attributes
-                                FileOpMkDirAll(fullTargetPath, entry.iAtt);
-                                }
-                            else
-                                {
-                                // ensure that root target folder exists
-                                BaflUtils::EnsurePathExistsL(iFs, iBuf2);
-                                // otherwise copy the file
-                                FileOpCopy(fullSourcePath, fullTargetPath, iUint1);
-                                }
-                            }
-                            break;
-
-                        case EFileOpDelete:
-                            {
-                            if (entry.IsDir())
-                                {
-                                // for directories call rmdir    
-                                FileOpRmDir(fullSourcePath, iUint1);
-                                }
-                            else
-                                {
-                                // for files call the normal file deletion operation    
-                                FileOpDeleteFile(fullSourcePath, iUint1);
-                                }
-                            }
-                            break;
-                                                    
-                        default:
-                            User::Panic (_L("FileOpRecurs"), 775);
-                            break;
-                        }                        
-                    }
-                }
-                if ( iFileManObserverResult == MFileManObserver::ECancel ) break;
-            }
-
-        delete dir;
-        dir = NULL;
-        if ( iFileManObserverResult != MFileManObserver::ECancel )
-            {
-            err = fileFinder.FindWild(dir);
-            }
-        }
-
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DoFindEntriesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
-	{
-    TInt err(KErrNone);
-
-    // it is logical to scan upwards when deleting and changing attributes
-    CDirScan::TScanDirection scanDirection = CDirScan::EScanUpTree;
-    
-    // when copying files, it is more logical to move downwards
-    if (iRecursiveState == EFileOpCopy)
-        scanDirection = CDirScan::EScanDownTree;
-    
-    
-    CDirScan* scan = CDirScan::NewLC(iFs);
-    scan->SetScanDataL(aPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst, scanDirection);
-    CDir* dir = NULL;
-
-    for(;;)
-        {
-        TRAP(err, scan->NextL(dir));
-        if (!dir  || (err != KErrNone))
-            break;
-
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TEntry entry = (*dir)[i];
-            
-            if (entry.IsDir())
-                {
-                TFileName path(scan->FullPath());
-                
-                if (path.Length())
-                    {
-                    path.Append(entry.iName);
-                    path.Append(_L("\\"));
-                    // test path.Left(iBuf2.Length()).Compare(iBuf2) - to prevent never ending recursive copy (in case of copy folder under itself)
-                    if( !(iRecursiveState == EFileOpCopy && !path.Left(iBuf2.Length()).Compare(iBuf2)) )
-                        {
-                        DoFindEntries(aFileName, path);
-                        }
-                    }
-                }
-            if ( iFileManObserverResult == MFileManObserver::ECancel )
-                {
-                break;
-                }
-            }
-        delete(dir);
-        if ( iFileManObserverResult == MFileManObserver::ECancel )
-            {
-            break;
-            }
-        }
-
-    CleanupStack::PopAndDestroy(scan);
-    return err;
-    }
-    
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::Copy(const TFileEntry& aSourceEntry, const TDesC& aTargetFullName, TUint aSwitch, TBool aDeleteSource) 
-    {
-    iOperationError = KErrNone;
-    iFileManObserverResult = MFileManObserver::EContinue;
-    
-    TFileName sourcePath = aSourceEntry.iPath;
-    sourcePath.Append(aSourceEntry.iEntry.iName);
-    
-    TInt err(KErrNone);
-
-    if (aSourceEntry.iEntry.IsDir() && (aSwitch & CFileMan::ERecurse))
-        {
-        // find all files recursively and run the operation for them
-        iRecursiveState = EFileOpCopy;
-        sourcePath.Append(_L("\\"));
-        
-        TFileName targetPath = aTargetFullName;
-        targetPath.Append(_L("\\"));
-        
-        // remove the recursion flag because we will implement our own recursion
-        TUint newSwitch(aSwitch);
-        newSwitch &= ~CFileMan::ERecurse;
-    
-        iBuf1.Copy(sourcePath);
-        iBuf2.Copy(targetPath);
-        iUint1 = newSwitch;
-        
-        TRAP(err, DoFindEntries(_L("*"), sourcePath));              // entries under current directory entry
-        if ( iFileManObserverResult != MFileManObserver::ECancel )
-            {
-            TRAP(err, DoFindEntriesRecursiveL(_L("*"), sourcePath));    // recursively under directories of current directory entry
-            }
-        // ensure that target folder exists in case of copying empty folder
-        BaflUtils::EnsurePathExistsL(iFs, targetPath);
-        // a path has a trailing backslash so it needs to be removed before the call
-        err = FileOpAttribs(targetPath.Left(targetPath.Length()-1), aSourceEntry.iEntry.iAtt, 0, 0, 0);
-        }
-
-    else if (aSourceEntry.iEntry.IsDir())
-        {
-        TFileName targetPath = aTargetFullName;
-        targetPath.Append(_L("\\"));
-        
-        // just create a directory based on the file attributes of the source directory
-        err = FileOpMkDirAll(targetPath, aSourceEntry.iEntry.iAtt);
-        }
-        
-    else
-        {
-        // remove a recursion flag if present (this should never happen, but some extra error checking)
-        if (aSwitch & CFileMan::ERecurse)
-            aSwitch &= ~CFileMan::ERecurse;    
-            
-        // do the operation for a file entry
-        err = FileOpCopy(sourcePath, aTargetFullName, aSwitch);
-        }
-    
-        
-    // delete source if needed and copy succeeded without any errors (== move operation)
-    if ( aDeleteSource && iOperationError == KErrNone &&
-         iFileManObserverResult != MFileManObserver::ECancel )
-        {
-        err = Delete(aSourceEntry, aSwitch);    
-        }
-    
-    if ( !iOperationError && iFileManObserverResult == MFileManObserver::ECancel )
-        {
-        iOperationError = KErrCancel;
-        }
-        
-    return iOperationError; 
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::FileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch) 
-    {
-    TInt err = DoFileOpCopy(aSourceFullName, aTargetFullName, aSwitch);
-
-    // if locked, unlock the file and retry
-    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
-        {
-        // try to remove the file lock by activating secure backup mode
-        if (ActivateSecureBackUpViaFileOp() == KErrNone)
-            {
-            // try the operation several times
-            for (TInt i=0; i<KMaxFileLockAttempts; i++)
-                {
-                err = DoFileOpCopy(aSourceFullName, aTargetFullName, aSwitch);
-                
-                if (err != KErrInUse)
-                    break;
-                else
-                    User::After(KSecureBackupLoopDelay);
-                }
-            }
-        }
-
-    // if access denied, then try to remove the target path and try again
-    if (iEngine->Settings().iIgnoreProtectionsAtts && err == KErrAccessDenied && BaflUtils::FileExists(iFs, aTargetFullName))
-        {
-        if (FileOpDeleteFile(aTargetFullName, 0) == KErrNone)
-            {
-            err = DoFileOpCopy(aSourceFullName, aTargetFullName, aSwitch);
-            }
-        }
-
-    // if the file already exists, it is not an error    
-    if (err == KErrAlreadyExists)
-        err = KErrNone;
-    
-    
-    // if copying from a ROM drive, remove the writing protection flag
-    if (iEngine->Settings().iRemoveROMWriteProrection && err == KErrNone && aSourceFullName.Length() > 3 && (aSourceFullName[0]=='z' || aSourceFullName[0]=='Z'))
-        {
-        FileOpAttribs(aTargetFullName, 0, KEntryAttReadOnly, 0, 0);
-        }
-    
-    
-    // remember the "lowest" error
-    if (err < iOperationError)
-        iOperationError = err;
-
-    LOGSTRING4("FileBrowser: FileOpCopy %S -> %S, err=%d", &aSourceFullName, &aTargetFullName, err);
-        
-    return err; 
-    }
-            
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DoFileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch) 
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();   
-            
-        return iFileOpClient->Copy(aSourceFullName, aTargetFullName, aSwitch);
-        }
-    else
-        {
-    #endif
-        //CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-        //TInt result = iFileMan->Copy( aSourceFullName, aTargetFullName, aSwitch, waiter->iStatus );
-        //waiter->StartAndWait();
-        //if ( !result ) result = waiter->Result();
-        //CleanupStack::PopAndDestroy( waiter );
-        TInt result = iFileMan->Copy( aSourceFullName, aTargetFullName, aSwitch );
-        return result;
-    #ifndef FILEBROWSER_LITE
-        }    
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::Rename(const TFileEntry& aSourceEntry, const TDesC& aNew, TUint aSwitch)
-    {
-    iOperationError = KErrNone;
-    iFileManObserverResult = MFileManObserver::EContinue;
-    
-    TFileName sourcePath = aSourceEntry.iPath;
-    sourcePath.Append(aSourceEntry.iEntry.iName);
-    
-    if (aSourceEntry.iEntry.IsDir())
-        {
-        // do the operation for a directory entry
-        FileOpRename(sourcePath, aNew, aSwitch);
-        }
-    else
-        {
-        // do the operation for a file
-        FileOpRename(sourcePath, aNew, aSwitch);
-        }
-
-    return iOperationError; 
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::FileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch)
-    {
-    TBool setBackROFlag(EFalse);
-
-    TInt err = DoFileOpRename(aName, aNew, aSwitch);
-
-    // if locked, unlock the file and retry
-    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
-        {
-        // try to remove the file lock by activating secure backup mode
-        if (ActivateSecureBackUpViaFileOp() == KErrNone)
-            {
-            // try the operation several times
-            for (TInt i=0; i<KMaxFileLockAttempts; i++)
-                {
-                err = DoFileOpRename(aName, aNew, aSwitch);
-                
-                if (err != KErrInUse)
-                    break;
-                else
-                    User::After(KSecureBackupLoopDelay);
-                }
-            }
-        }
-
-    // if write protected, remove protection and retry
-    else if (iEngine->Settings().iIgnoreProtectionsAtts && err == KErrAccessDenied)
-        {
-        // remove write protection and try again
-        if (FileOpAttribs(aName, 0, KEntryAttReadOnly, 0, 0) == KErrNone)
-            {
-            err = DoFileOpRename(aName, aNew, aSwitch);
-            
-            setBackROFlag = ETrue;
-            }
-        }
-
-    // if still access denied, then try to remove the target path and try again
-    if (iEngine->Settings().iIgnoreProtectionsAtts && err == KErrAccessDenied && BaflUtils::FileExists(iFs, aNew))
-        {
-        if (FileOpDeleteFile(aNew, 0) == KErrNone)
-            {
-            err = DoFileOpRename(aName, aNew, aSwitch);
-            }
-        }
-
-    // set back the read only flag
-    if (setBackROFlag)
-        FileOpAttribs(aName, KEntryAttReadOnly, 0, 0, 0);
-            
-
-    // remember the "lowest" error
-    if (err < iOperationError)
-        iOperationError = err;
-
-    LOGSTRING3("FileBrowser: FileOpRename %S, err=%d", &aName, err);
-        
-    return err; 
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DoFileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch)
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();   
-
-        return iFileOpClient->Rename(aName, aNew, aSwitch);
-        }
-    else
-        {
-    #endif
-        return iFileMan->Rename(aName, aNew, aSwitch);
-    #ifndef FILEBROWSER_LITE
-        }    
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::Attribs(const TFileEntry& aSourceEntry, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
-    {
-    iOperationError = KErrNone;
-    iFileManObserverResult = MFileManObserver::EContinue;
-    
-    TFileName sourcePath = aSourceEntry.iPath;
-    sourcePath.Append(aSourceEntry.iEntry.iName);
-    
-    TInt err(KErrNone);
-
-    if (aSourceEntry.iEntry.IsDir() && (aSwitch & CFileMan::ERecurse))
-        {
-        // do the operation for a current directory entry
-        err = FileOpAttribs(sourcePath, aSetMask, aClearMask, aTime, 0);
-
-        // find all files recursively and run the operation for them
-        iRecursiveState = EFileOpAttribs;
-        sourcePath.Append(_L("\\"));
-    
-        iBuf1.Copy(sourcePath);
-        iUint1 = aSetMask;
-        iUint2 = aClearMask;
-        iTime1 = aTime;
-        iUint3 = 0;
-        
-        TRAP(err, DoFindEntriesRecursiveL(_L("*"), sourcePath));    // recursively under directories of current directory entry
-        TRAP(err, DoFindEntries(_L("*"), sourcePath));              // entries under current directory entry
-        }
-
-    else if (aSourceEntry.iEntry.IsDir())
-        {
-        //sourcePath.Append(_L("\\"));   // <-- do not apply!
-    
-        // do the operation for a directory entry
-        err = FileOpAttribs(sourcePath, aSetMask, aClearMask, aTime, 0);
-        }
-            
-    else
-        {
-        // do the operation for a file entry
-        err = FileOpAttribs(sourcePath, aSetMask, aClearMask, aTime, 0);
-        }
-
-    return iOperationError;     
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-TInt CFileBrowserFileOps::FileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
-    {
-    TInt err = DoFileOpAttribs(aName, aSetMask, aClearMask, aTime, aSwitch);
-
-    // if locked, unlock the file and retry
-    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
-        {
-        // try to remove the file lock by activating secure backup mode
-        if (ActivateSecureBackUpViaFileOp() == KErrNone)
-            {
-            // try the operation several times
-            for (TInt i=0; i<KMaxFileLockAttempts; i++)
-                {
-                err = DoFileOpAttribs(aName, aSetMask, aClearMask, aTime, aSwitch);
-                
-                if (err != KErrInUse)
-                    break;
-                else
-                    User::After(KSecureBackupLoopDelay);
-                }
-            }
-        }
-
-    // remember the "lowest" error
-    if (err < iOperationError)
-        iOperationError = err;
-
-    LOGSTRING3("FileBrowser: FileOpAttribs %S, err=%d", &aName, err);
-        
-    return err;    
-    }
-    
-// --------------------------------------------------------------------------------------------
-    
-TInt CFileBrowserFileOps::DoFileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();   
-
-        return iFileOpClient->Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
-        }
-    else
-        {
-    #endif
-        return iFileMan->Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
-    #ifndef FILEBROWSER_LITE
-        }    
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::Delete(const TFileEntry& aSourceEntry, TUint aSwitch) 
-    {
-    iOperationError = KErrNone;
-    iFileManObserverResult = MFileManObserver::EContinue;
-    
-    TFileName sourcePath = aSourceEntry.iPath;
-    sourcePath.Append(aSourceEntry.iEntry.iName);
-    
-    TInt err(KErrNone);
-
-    if (aSourceEntry.iEntry.IsDir() && (aSwitch & CFileMan::ERecurse))
-        {
-        // find all files recursively and run the operation for them
-        iRecursiveState = EFileOpDelete;
-        sourcePath.Append(_L("\\"));
-    
-        iBuf1.Copy(sourcePath);
-        iUint1 = 0;
-        
-        TRAP(err, DoFindEntriesRecursiveL(_L("*"), sourcePath));    // recursively under directories of current directory entry
-        if ( iFileManObserverResult != MFileManObserver::ECancel )
-            {
-            TRAP(err, DoFindEntries(_L("*"), sourcePath));              // entries under current directory entry
-            }
-        
-        if ( iFileManObserverResult != MFileManObserver::ECancel )
-            {
-            // do the operation for a current directory entry as well
-            err = FileOpRmDir(sourcePath, 0);
-            }
-        }
-
-    else if (aSourceEntry.iEntry.IsDir())
-        {
-        sourcePath.Append(_L("\\"));
-    
-        // do the operation for a directory entry
-        err = FileOpRmDir(sourcePath, 0);
-        }
-
-    else
-        {
-        // do the operation for a file entry
-        err = FileOpDeleteFile(sourcePath, 0);
-        }
-    if ( !iOperationError && iFileManObserverResult == MFileManObserver::ECancel )
-        {
-        iOperationError = KErrCancel;
-        }
-    return iOperationError; 
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::FileOpDeleteFile(const TDesC& aName, TUint aSwitch) 
-    {
-    TInt err = DoFileOpDeleteFile(aName, aSwitch);
-
-    // if locked, unlock the file and retry
-    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
-        {
-        // try to remove the file lock by activating secure backup mode
-        if (ActivateSecureBackUpViaFileOp() == KErrNone)
-            {
-            // try the operation several times
-            for (TInt i=0; i<KMaxFileLockAttempts; i++)
-                {
-                err = DoFileOpDeleteFile(aName, aSwitch);
-                
-                if (err != KErrInUse)
-                    break;
-                else
-                    User::After(KSecureBackupLoopDelay);
-                }
-            }
-        }
-
-    // if write protected or system file, remove protections and retry
-    else if (iEngine->Settings().iIgnoreProtectionsAtts && (err == KErrAccessDenied || err == KErrNotFound))
-        {
-        // remove protections  and try again
-        if (FileOpAttribs(aName, 0, KEntryAttReadOnly|KEntryAttSystem|KEntryAttHidden, 0, 0) == KErrNone)
-            {
-            err = DoFileOpDeleteFile(aName, aSwitch);
-            }
-        }
-
-    // remember the "lowest" error
-    if (err < iOperationError)
-        iOperationError = err;
-
-    LOGSTRING3("FileBrowser: FileOpDeleteFile %S, err=%d", &aName, err);
-        
-    return err; 
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DoFileOpDeleteFile(const TDesC& aName, TUint aSwitch) 
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();   
-
-        return iFileOpClient->Delete(aName, aSwitch);
-        }
-    else
-        {
-    #endif
-//        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-//        TInt result = iFileMan->Delete( aName, aSwitch, waiter->iStatus );
-//        waiter->StartAndWait();
-//        if ( iFileManObserverResult == MFileManObserver::ECancel ) result = KErrCancel;
-//        if ( !result ) result = waiter->Result();
-//        CleanupStack::PopAndDestroy( waiter );
-		TInt result = iFileMan->Delete( aName, aSwitch );
-        return result;
-    #ifndef FILEBROWSER_LITE
-        }    
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::FileOpRmDir(const TDesC& aName, TUint aSwitch) 
-    {
-    TInt err = DoFileOpRmDir(aName, aSwitch);
-
-    // if write protected or system directory, remove protections and retry
-    if (iEngine->Settings().iIgnoreProtectionsAtts && (err == KErrAccessDenied || err == KErrInUse))
-        {
-        // remove protections and try again
-        if (FileOpAttribs(aName.Left(aName.Length()-1), 0, KEntryAttReadOnly|KEntryAttSystem|KEntryAttHidden, 0, 0) == KErrNone)
-            {
-            err = DoFileOpRmDir(aName, aSwitch);
-            }
-        }
-
-    // remember the "lowest" error
-    if (err < iOperationError)
-        iOperationError = err;
-
-    LOGSTRING3("FileBrowser: FileOpRmDir %S, err=%d", &aName, err);
-        
-    return err; 
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DoFileOpRmDir(const TDesC& aDirName, TUint aSwitch)
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();   
-
-        return iFileOpClient->RmDir(aDirName, aSwitch);
-        }
-    else
-        {
-    #endif
-        if ( aSwitch & CFileMan::ERecurse )
-            {
-//            CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-//            TInt result = iFileMan->RmDir( aDirName, waiter->iStatus );
-//            waiter->StartAndWait();
-//            if ( iFileManObserverResult == MFileManObserver::ECancel ) result = KErrCancel;
-//            if ( !result ) result = waiter->Result();
-//            CleanupStack::PopAndDestroy( waiter);
-            TInt result = iFileMan->RmDir( aDirName );
-            return result;
-            }
-        else
-            return iFs.RmDir(aDirName);    
-    #ifndef FILEBROWSER_LITE
-        }    
-    #endif
-   }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::MkDirAll(const TDesC& aPath, TInt aSetAtts, TBool aQuickOperation) 
-    {
-    iFileManObserverResult = MFileManObserver::EContinue;
-    if (aQuickOperation)
-        return DoFileOpMkDirAll(aPath);
-    else
-        return FileOpMkDirAll(aPath, aSetAtts);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::FileOpMkDirAll(const TDesC& aPath, TInt aSetAtts) 
-    {
-    TInt err = DoFileOpMkDirAll(aPath);
-
-    // if the directory already exists, it is not an error    
-    if (err == KErrAlreadyExists)
-        err = KErrNone;
-    
-    
-    // set attributes for directory just created
-    if (aSetAtts > 0 && err == KErrNone && aPath.Length() > 3)
-        {
-        // a path has a trailing backslash so it needs to be removed before the call
-        err = FileOpAttribs(aPath.Left(aPath.Length()-1), aSetAtts, 0, 0, 0);
-        }
-    
-
-    // remember the "lowest" error
-    if (err < iOperationError)
-        iOperationError = err;
-    
-    LOGSTRING3("FileBrowser: FileOpMkDirAll %S, err=%d", &aPath, err);
-    
-    return err;
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DoFileOpMkDirAll(const TDesC& aPath) 
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();   
-
-        return iFileOpClient->MkDirAll(aPath);
-        }
-    else
-        {
-    #endif
-        return iFs.MkDirAll(aPath);
-    #ifndef FILEBROWSER_LITE
-        }    
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::CreateEmptyFile(const TDesC& aName) 
-    {
-    return DoFileOpCreateEmptyFile(aName);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::FileOpCreateEmptyFile(const TDesC& aName) 
-    {
-    TInt err = DoFileOpCreateEmptyFile(aName);
-
-    // remember the "lowest" error
-    if (err < iOperationError)
-        iOperationError = err;
-    
-    LOGSTRING3("FileBrowser: FileOpCreateEmptyFile %S, err=%d", &aName, err);
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-TInt CFileBrowserFileOps::DoFileOpCreateEmptyFile(const TDesC& aName) 
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();   
-
-        return iFileOpClient->CreateEmptyFile(aName);
-        }
-    else
-        {
-    #endif
-        TInt err(KErrNone);
-            
-        RFile newFile;
-        err = newFile.Create(iFs, aName, EFileShareExclusive);
-        if (err == KErrNone)
-            err = newFile.Flush(); 
-        newFile.Close();
-        
-        return err; 
-    #ifndef FILEBROWSER_LITE
-        }    
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::DriveSnapShot(TChar aSourceDriveLetter, TChar aTargetDriveLetter)
-    {
-    TInt err(KErrNone);
-    iFileManObserverResult = MFileManObserver::EContinue;
-    
-    // remember old settings and force them to be true for this operation
-    TBool currentRemoveFileLocksValue = iEngine->Settings().iRemoveFileLocks;
-    TBool currentIgnoreProtectionAttsValue = iEngine->Settings().iIgnoreProtectionsAtts;
-    TBool currentRemoveROMWriteProrection = iEngine->Settings().iRemoveROMWriteProrection;
-    iEngine->Settings().iRemoveFileLocks = ETrue;
-    iEngine->Settings().iIgnoreProtectionsAtts = ETrue;
-    iEngine->Settings().iRemoveROMWriteProrection = ETrue;
-
-    
-    TFileName sourceDir;
-    sourceDir.Append(aSourceDriveLetter);
-    sourceDir.Append(_L(":"));
-
-    _LIT(KTargetDir, "%c:\\SnapShot_%c_drive");
-    TFileName targetDir;
-    targetDir.Format(KTargetDir, TUint(aTargetDriveLetter), TUint(aSourceDriveLetter));            
-
-    // remove any existing content, first get TEntry
-    TEntry entry;
-    err = iFs.Entry(targetDir, entry);
-
-    // entry directory exists, delete it
-    if (err == KErrNone && entry.IsDir())
-        {
-        TFileName targetRoot;
-        targetRoot.Append(aTargetDriveLetter);
-        targetRoot.Append(_L(":\\"));
-
-        TFileEntry targetEntry;
-        targetEntry.iPath = targetRoot;
-        targetEntry.iEntry = entry;
-
-        err = Delete(targetEntry, CFileMan::ERecurse);                
-        }
-        
-    // do not care if removing succeeded or not, just continue with copying    
-    TEntry fakeEntry;
-    fakeEntry.iAtt |= KEntryAttDir;
-
-    TFileEntry sourceEntry;
-    sourceEntry.iPath = sourceDir;
-    sourceEntry.iEntry = fakeEntry;
-
-    err = Copy(sourceEntry, targetDir, CFileMan::ERecurse|CFileMan::EOverWrite);                
-
-
-    // restore back settings
-    iEngine->Settings().iRemoveFileLocks = currentRemoveFileLocksValue;
-    iEngine->Settings().iIgnoreProtectionsAtts = currentIgnoreProtectionAttsValue;    
-    iEngine->Settings().iRemoveROMWriteProrection = currentRemoveROMWriteProrection;    
-
-
-    return iOperationError;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::EraseMBR(TUint aDriveNumber) 
-    {
-    #ifndef FILEBROWSER_LITE
-
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();
-        
-        return iFileOpClient->EraseMBR(aDriveNumber);
-
-    #else
-        return KErrNotSupported;
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileOps::PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions) 
-    {
-    #ifndef FILEBROWSER_LITE
-
-        if (!iFileOpClient)
-            iFileOpClient = CFBFileOpClient::NewL();
-        
-        return iFileOpClient->PartitionDrive(aDriveNumber, aNumberOfPartitions);
-
-    #else
-        return KErrNotSupported
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-
-MFileManObserver::TControl CFileBrowserFileOps::NotifyFileManStarted()
-    {
-    return iFileManObserverResult;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-MFileManObserver::TControl CFileBrowserFileOps::NotifyFileManOperation()
-    {
-    return iFileManObserverResult;
-    }
-// --------------------------------------------------------------------------------------------
-
-MFileManObserver::TControl CFileBrowserFileOps::NotifyFileManEnded()
-    {
-    return iFileManObserverResult;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileOps::CancelOp()
-    {
-#ifndef FILEBROWSER_LITE
-
-    if ( iEngine->Settings().iBypassPlatformSecurity )
-        {
-        if ( !iFileOpClient )
-            iFileOpClient = CFBFileOpClient::NewL();
-        
-        iFileOpClient->CancelOp();
-        }
-
-    // we need this information even when using iFileOpClient
-    // to be able to not execute aggregate operations 
-    iFileManObserverResult = MFileManObserver::ECancel;
-    
-#else
-    iFileManObserverResult = MFileManObserver::ECancel;
-#endif
-    }
-
-// End of File
--- a/filebrowser/engine/FBFileOps.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FILEBROWSER_FILEOPS_H
-#define FILEBROWSER_FILEOPS_H
-
-// INCLUDES
-#include <e32base.h>
-#include <f32file.h>
-#include <connect/sbeclient.h>
-
-// FORWARD DECLARATIONS
-class TFileEntry;
-class CFBFileOpClient;
-class CFileMan;
-class CEngine;
-class CSBEClient;
-
-
-class CFileBrowserFileOps : public CBase,
-                            public MFileManObserver 
-	{
-private:
-    enum TRecursiveOperation
-    	{
-    	EFileOpInvalid = -1,
-    	EFileOpCopy,
-    	EFileOpMove,
-    	EFileOpRename,
-    	EFileOpAttribs,
-    	EFileOpDelete,
-    	EFileOpMkDirAll,
-    	EFileOpCreateEmptyFile,
-    	EFileOpEraseMBR,
-    	EFileOpPartitionDrive
-    	};
-public:
-	static CFileBrowserFileOps* NewL(CEngine* aEngine);
-	~CFileBrowserFileOps();
-
-public: // From MFileManObserver
-    
-    TControl NotifyFileManStarted();
-    TControl NotifyFileManOperation();
-    TControl NotifyFileManEnded();
-    
-private:
-	CFileBrowserFileOps(CEngine* aEngine);
-	void ConstructL();
-
-public:
-    TInt ActivateSecureBackUpViaFileOp();
-    TInt DeActivateSecureBackUpViaFileOp();
-    TInt ActivateSecureBackUp(conn::TBURPartType aPartType=conn::EBURBackupFull, conn::TBackupIncType aBackupIncType=conn::EBackupBase);
-    TInt DeActivateSecureBackUp();
-    TInt Copy(const TFileEntry& aSourceEntry, const TDesC& aTargetFullName, TUint aSwitch=CFileMan::EOverWrite, TBool aDeleteSource=EFalse); 
-    TInt Rename(const TFileEntry& aSourceEntry, const TDesC& aNew, TUint aSwitch=CFileMan::EOverWrite); 
-    TInt Attribs(const TFileEntry& aSourceEntry, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch=0); 
-    TInt Delete(const TFileEntry& aSourceEntry, TUint aSwitch=0); 
-    TInt MkDirAll(const TDesC& aPath, TInt aSetAtts=0, TBool aQuickOperation=EFalse); 
-    TInt CreateEmptyFile(const TDesC& aName); 
-    TInt DriveSnapShot(TChar aSourceDriveLetter, TChar aTargetDriveLetter); 
-    TInt EraseMBR(TUint aDriveNumber); 
-    TInt PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions);
-    void CancelOp();
-
-private:
-    TInt DoFindEntries(const TDesC& aFileName, const TDesC& aPath);
-    TInt DoFindEntriesRecursiveL(const TDesC& aFileName, const TDesC& aPath);    
-
-    TInt FileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch); 
-    TInt DoFileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch); 
-
-    TInt FileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch); 
-    TInt DoFileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch); 
-
-    TInt FileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
-    TInt DoFileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
-
-    TInt FileOpDeleteFile(const TDesC& aName, TUint aSwitch); 
-    TInt DoFileOpDeleteFile(const TDesC& aName, TUint aSwitch); 
-
-    TInt FileOpRmDir(const TDesC& aDirName, TUint aSwitch); 
-    TInt DoFileOpRmDir(const TDesC& aDirName, TUint aSwitch); 
-
-    TInt FileOpMkDirAll(const TDesC& aPath, TInt aSetAtts=0); 
-    TInt DoFileOpMkDirAll(const TDesC& aPath); 
-
-    TInt FileOpCreateEmptyFile(const TDesC& aName); 
-    TInt DoFileOpCreateEmptyFile(const TDesC& aName); 
-
-public:
-    inline TBool SecureBackUpActive() { return iSecureBackUpActive; }
-    inline TBool FileCommandActivatedSecureBackup() { return iFileCommandActivatedSecureBackup; }
-
-private:
-    TInt                            iRecursiveState;
-    CEngine*                        iEngine;
-    CFBFileOpClient*                iFileOpClient;
-    CFileMan*                       iFileMan;
-    RFs                             iFs;
-    TInt                            iOperationError;
-    conn::CSBEClient*               iSBEClient;
-    TBool                           iSecureBackUpActive;
-    TBool                           iFileCommandActivatedSecureBackup;
-
-    TFileName   iBuf1;
-    TFileName   iBuf2;
-    TUint       iUint1;
-    TUint       iUint2;
-    TUint       iUint3;
-    TTime       iTime1;
-    MFileManObserver::TControl iFileManObserverResult;
-    };
-
-#endif
-
-// End of File
-
--- a/filebrowser/engine/FBFileUtils.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4628 +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 FILES
-#include "FBFileUtils.h"
-#include "FBFileOps.h"
-#include "engine.h"
-#include "FB.hrh"
-#include <filebrowser.rsg>
-
-#include <textresolver.h> 
-#include <eikprogi.h>
-#include <e32svr.h>
-#include <eikfutil.h>
-#include <apparc.h>
-#include <apaid.h>
-#include <apaidpartner.h>
-#include <eikenv.h>
-#include <bautils.h>
-#include <gulicon.h>
-#include <babackup.h> 
-//#include <aknmemorycardui.mbg>
-#include <sendui.h>
-#include <CMessageData.h>
-#include <ezgzip.h>
-#include <e32hal.h>
-#include <pathinfo.h>
-#include <apgcli.h>
-#include <apmstd.h>
-#include <apgtask.h>
-#include <apacmdln.h>
-#include <DocumentHandler.h>
-#include <msvapi.h>
-#include <msvids.h>
-#include <msvstd.h>
-#include <msvstore.h>
-#include <mmsvattachmentmanager.h>
-#include <cmsvattachment.h>
-#include <hash.h>
-//#include <sbeclient.h>
-#include <e32property.h>
-#if (!defined __SERIES60_30__ && !defined __SERIES60_31__) 
-#include <driveinfo.h>
-#endif // !defined __SERIES60_30__ && !defined __SERIES60_31__
-
-#ifndef __SERIES60_30__
-//  #include <akniconconfig.h>
-#endif
-
-//_LIT(KGZipExt, ".gz");
-_LIT8(KFileNewLine, "\r\n");
-const TInt KForcedFormatTimeout = 1000000;
-
-// copied from coreapplicationuisdomainpskeys.h
-const TUid KPSUidCoreApplicationUIs = { 0x101F8767 };
-const TUint32 KCoreAppUIsMmcRemovedWithoutEject = 0x00000109;
-enum TCoreAppUIsMmcRemovedWithoutEject
-    {
-    ECoreAppUIsEjectCommandUsedUninitialized = 0,
-    ECoreAppUIsEjectCommandNotUsed,
-    ECoreAppUIsEjectCommandUsed,
-    ECoreAppUIsEjectCommandUsedToDrive // Low 16-bits contain this value and high 16-bits TDriveNumber to eject
-    };
-const TInt KDriveLetterStringLength = 3; // e.g. C:\
-
-// ================= MEMBER FUNCTIONS =======================
-
-CFileBrowserFileUtils* CFileBrowserFileUtils::NewL(CEngine* aEngine)
-	{
-	CFileBrowserFileUtils* self = new(ELeave) CFileBrowserFileUtils(aEngine);
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	CleanupStack::Pop();
-	return self;
-	}
-
-// --------------------------------------------------------------------------------------------
-
-CFileBrowserFileUtils::CFileBrowserFileUtils(CEngine* aEngine) : CActive(EPriorityStandard), iEngine(aEngine)
-	{
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ConstructL()
-	{
-    User::LeaveIfError(iTimer.CreateLocal());
-    User::LeaveIfError(iFs.Connect());
-    User::LeaveIfError(iTz.Connect());
-    
-    iState = EIdle;
-    iListingMode = ENormalEntries;
-
-    iSortMode = EFileBrowserCmdViewSortByName;
-    iOrderMode = EFileBrowserCmdViewOrderAscending;
-    iCurrentPath = KNullDesC;
-    
-    iFileOps = CFileBrowserFileOps::NewL(iEngine);
-    
-    iDriveEntryList = new(ELeave) CDriveEntryList(8);
-    iFileEntryList = new(ELeave) CFileEntryList(64);
-    iFindFileEntryList = new(ELeave) CFileEntryList(64);
-    iAppIconList = new(ELeave) CAppIconList(16);
-    iClipBoardList = new(ELeave) CFileEntryList(64);
-    iCurrentSelectionList = new(ELeave) CFileEntryList(64);
-
-    iDocHandler = CDocumentHandler::NewL();
-//    iDocHandler->SetExitObserver(this);
-    
-    // set defaults to the search settings
-    iSearchAttributes.iSearchDir = KNullDesC;
-    iSearchAttributes.iWildCards = _L("*.jpg");
-    iSearchAttributes.iTextInFile = KNullDesC;
-    iSearchAttributes.iMinSize = 0;
-    iSearchAttributes.iMaxSize = 999999999;
-    iSearchAttributes.iMinDate = TDateTime(1980, EJanuary,   0,0,0,0,0);
-    iSearchAttributes.iMaxDate = TDateTime(2060, EDecember, 30,0,0,0,0);
-    iSearchAttributes.iRecurse = ETrue;
-    
-    // init the command array
-    iCommandArray = new(ELeave) CCommandArray(64);
-        
-    // get current path from settings
-    if (iEngine->Settings().iRememberLastPath)
-        {
-        TFileName settingPath = iEngine->Settings().iLastPath;
-        if (BaflUtils::PathExists(iFs, settingPath))
-            iCurrentPath = settingPath;
-        
-        if (iCurrentPath != KNullDesC)
-            GetDriveListL();
-        }
-
-    CActiveScheduler::Add(this);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CFileBrowserFileUtils::~CFileBrowserFileUtils()
-	{
-	Cancel();
-	
-	// save current path from settings
-    if (iEngine->Settings().iRememberLastPath)
-        {
-        iEngine->Settings().iLastPath = iCurrentPath;
-        TRAP_IGNORE(iEngine->SaveSettingsL(EFalse));
-        }
-
-//    if (iWaitDialog)
-//        TRAP_IGNORE(iWaitDialog->ProcessFinishedL()); 
-//     
-//    if (iProgressDialog)
-//        TRAP_IGNORE(iProgressDialog->ProcessFinishedL());
-    
-        delete iFileOps;
-
-        delete iDocHandler;
-	
-//	if (iOpenFileService)
-//	    delete iOpenFileService;
-	
-        delete iCurrentSelectionList;
-        delete iClipBoardList;
-        delete iAppIconList;
-        delete iFindFileEntryList;
-        delete iFileEntryList;
-        delete iDriveEntryList;
-
-        delete iFileMan;
-
-        if (iCommandArray)
-            {
-            ResetCommandArray();
-            delete iCommandArray;
-            }
-
-        iTz.Close();
-        iFs.Close();
-        iTimer.Close();
-        }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::DoCancel()
-	{
-    iTimer.Cancel();
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::StartExecutingCommandsL(const TDesC& aLabel)
-    {
-    if (iCommandArray->Count() >= 2)
-        {
-        // init progress bar
-//        iProgressDialog = new(ELeave) CAknProgressDialog((reinterpret_cast<CEikDialog**>(&iProgressDialog)), ETrue);
-//        iProgressDialog->SetCallback(this);
-//        iProgressDialog->PrepareLC(R_GENERAL_PROGRESS_NOTE);
-//        iProgressDialog->SetCurrentLabelL( EAknCtNote, aLabel );
-//        iProgressInfo = iProgressDialog->GetProgressInfoL();
-//        iProgressInfo->SetFinalValue( CommandArrayCount() );
-//        iProgressDialog->RunLD();
-//        iProgressDialog->MakeVisible( ETrue );        
-        iEngine->FileBrowserUI()->ShowProgressDialog(aLabel, 0, CommandArrayCount());
-        isProgressDialog = ETrue;
-        }
-    else if (iCommandArray->Count() >= 1)
-        {
-        // init wait dialog
-//        iWaitDialog = new(ELeave) CAknWaitDialog((reinterpret_cast<CEikDialog**>(&iWaitDialog)), ETrue);
-//        iWaitDialog->SetCallback(this);
-//        iWaitDialog->PrepareLC(R_GENERAL_WAIT_NOTE);
-//        iWaitDialog->SetTextL( aLabel );
-//        iWaitDialog->RunLD();
-        iEngine->FileBrowserUI()->ShowWaitDialog(aLabel);
-        isWaitDialog = ETrue;
-        }
-    else
-        {
-        // no commands, just do nothing
-        return;
-        }
-
-
-    // start with the first operation
-    iCurrentEntry = 0;
-    iSucceededOperations = 0;
-    iFailedOperations = 0;
-
-    // starts executing commands
-    ExecuteCommand();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ExecuteCommand()
-    {
-    // make sure the engine isn't active, should never happen
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("FileUtils:IsActive"), 333));
-
-    // execute a command after a very short delay (25ms)
-    if (isWaitDialog)
-        {
-        iEngine->FileBrowserUI()->ProcessEvents();
-        }
-    if (isProgressDialog)
-        {
-        TInt newValue = iCurrentEntry;
-        iEngine->FileBrowserUI()->SetProgressValue(newValue);
-        }
-    iTimer.After(iStatus, 25);
-    SetActive();
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-void CFileBrowserFileUtils::RunL()
-    {
-    TInt err(KErrNone);
-    TInt currentCommand = iCommandArray->At(iCurrentEntry).iCommandId;
-
-    // execute a command from the queue
-    switch(currentCommand)
-        {
-        case EFileBrowserFileOpCommandAttribs:
-            {
-            CCommandParamsAttribs* params = static_cast<CCommandParamsAttribs*>(iCommandArray->At(iCurrentEntry).iParameters);
-            err = iFileOps->Attribs(params->iSourceEntry, params->iSetMask, params->iClearMask, params->iTime, params->iSwitch);
-            }
-            break;
-            
-        case EFileBrowserFileOpCommandCopy:
-            {
-            CCommandParamsCopyOrMove* params = static_cast<CCommandParamsCopyOrMove*>(iCommandArray->At(iCurrentEntry).iParameters);
-            err = iFileOps->Copy(params->iSourceEntry, params->iTargetPath, params->iSwitch);
-            }
-            break;
-            
-        case EFileBrowserFileOpCommandMove:
-            {
-            CCommandParamsCopyOrMove* params = static_cast<CCommandParamsCopyOrMove*>(iCommandArray->At(iCurrentEntry).iParameters);
-            err = iFileOps->Copy(params->iSourceEntry, params->iTargetPath, params->iSwitch, ETrue);
-            }
-            break;
-                
-        case EFileBrowserFileOpCommandRename:
-            {
-            CCommandParamsRename* params = static_cast<CCommandParamsRename*>(iCommandArray->At(iCurrentEntry).iParameters);
-            err = iFileOps->Rename(params->iSourceEntry, params->iTargetPath, params->iSwitch);
-            }
-            break;
-
-        case EFileBrowserFileOpCommandDelete:
-            {
-            CCommandParamsDelete* params = static_cast<CCommandParamsDelete*>(iCommandArray->At(iCurrentEntry).iParameters);
-            err = iFileOps->Delete(params->iSourceEntry, params->iSwitch);
-            }
-            break;
-
-        case EFileBrowserFileOpCommandDriveSnapShot:
-            {
-            CCommandParamsDriveSnapShot* params = static_cast<CCommandParamsDriveSnapShot*>(iCommandArray->At(iCurrentEntry).iParameters);
-            err = iFileOps->DriveSnapShot(params->iSourceDriveLetter, params->iTargetDriveLetter);
-            }
-            break;
-                                                
-        default:
-            User::Panic (_L("Unknown command"), 400);
-            break;
-        }
-
-    
-    if (err == KErrNone)
-        {
-        iSucceededOperations++;
-        }
-    else if ( err != KErrCancel )
-        {
-        iFailedOperations++;
-        }
-        
-    iLastError = err;            
-
-    // check for more commands in queue
-    TRAP_IGNORE( CheckForMoreCommandsL() );
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::RunError(TInt aError)
-    {
-    _LIT(KMessage, "Command error %d");
-    TBuf<128> noteMsg;
-    noteMsg.Format(KMessage, aError);
-            
-    iEngine->EikonEnv()->InfoMsg(noteMsg);
-    
-    TRAP_IGNORE( CheckForMoreCommandsL() );
-    
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::CheckForMoreCommandsL()
-    {
-    //LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL");
-    
-    // update the progress bar
-//    if (iProgressInfo)
-//        iProgressInfo->IncrementAndDraw(1);
-
-	// check if we have more commands to be executed
-	if (iCurrentEntry >= CommandArrayCount() - 1)
-		{
-        //LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL all done");
-
-        // all done, free resources
-        ResetCommandArray();
-        
-        // deactive secure backup if it was activated by a file command
-        iFileOps->DeActivateSecureBackUpViaFileOp();
-
-        // dismiss any wait/progress dialogs        
-        if (isWaitDialog)
-            {
-            iEngine->FileBrowserUI()->CancelWaitDialog();
-            isWaitDialog = EFalse;
-            }
-        if (isProgressDialog)
-            {
-            iEngine->FileBrowserUI()->CancelProgressDialog();
-            isProgressDialog = EFalse;
-            }
-//        if (iWaitDialog)
-//            {
-//            TRAP_IGNORE(iWaitDialog->ProcessFinishedL()); 
-//            iWaitDialog = NULL;
-//            }
-//        if (iProgressDialog)
-//            {
-//            TRAP_IGNORE(iProgressDialog->ProcessFinishedL());
-//            iProgressDialog = NULL;
-//            }
-
-
-        // show result note
-        if ( iSucceededOperations == 0 && iFailedOperations == 0 )
-            {
-            // single operation cancelled -> show nothing
-            }
-        else if (iSucceededOperations == 1 && iFailedOperations == 0)    
-            {
-            _LIT(KMessage, "Operation succeeded");
-            iEngine->FileBrowserUI()->ShowConfirmationNote(KMessage);
-            }
-        else if (iSucceededOperations > 0 && iFailedOperations == 0)    
-            {
-            _LIT(KMessage, "%d operations succeeded");
-            TBuf<128> noteMsg;
-            noteMsg.Format(KMessage, iSucceededOperations);
-            iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
-            }
-        else if (iSucceededOperations == 0 && iFailedOperations > 1)    
-            {
-            _LIT(KMessage, "%d operations failed");
-            TBuf<128> noteMsg;
-            noteMsg.Format(KMessage, iFailedOperations);
-
-            iEngine->FileBrowserUI()->ShowErrorNote(noteMsg);
-            }
-        else if (iSucceededOperations > 0 && iFailedOperations > 0)    
-            {
-            _LIT(KMessage, "%d operations succeeded, %d failed");
-            TBuf<128> noteMsg;
-            noteMsg.Format(KMessage, iSucceededOperations, iFailedOperations);
-
-            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-            }
-        else    
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(iLastError, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        iEngine->FileBrowserUI()->NotifyModelHasChanged();
-
-            }
-	else
-            {
-            // maintain requests
-            iCurrentEntry++;
-
-            //LOGSTRING2("Creator: CCreatorEngine::CheckForMoreCommandsL iCurrentEntry=%d", iCurrentEntry);
-
-            ExecuteCommand();
-            }
-    }    
-// --------------------------------------------------------------------------------------------
-
-// This callback function is called when cancel button of the progress bar was pressed
-void CFileBrowserFileUtils::DialogDismissedL(/*TInt aButtonId*/)
-    {
-//    iProgressDialog = NULL;
-//    iProgressInfo = NULL;
-//    iWaitDialog = NULL;
-    
-    // check if cancel button was pressed
-//    if (aButtonId == EAknSoftkeyCancel)
-//        {
-        // cancel the active object, command executer 
-        Cancel();
-        
-        iFileOps->CancelOp();
-        
-        ResetCommandArray();
-
-        isProgressDialog = EFalse;
-
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Cancelled"), _L(""));
-//        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::AppendToCommandArrayL(TInt aCommand, CCommandParamsBase* aParameters)
-    {
-    if (iCommandArray)
-        iCommandArray->AppendL( TCommand(aCommand, aParameters) );
-    else
-        User::Leave(KErrNotReady);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::CommandArrayCount() const
-    {
-    TInt count(0);
-    
-    if (iCommandArray)
-        count = iCommandArray->Count();
-    
-    return count;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ResetCommandArray()
-    {
-    // delete params first
-    for (TInt i=0; i<CommandArrayCount(); i++)
-        {
-        if ( iCommandArray->At(i).iParameters )
-            {
-            delete iCommandArray->At(i).iParameters;
-            iCommandArray->At(i).iParameters = NULL;
-            }
-        }
-
-    // reset the entries
-    iCommandArray->Reset();
-    }
-                    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::HandleSettingsChangeL()
-    {
-	// TODO
-
-//    if (iEngine->FileListContainer())
-//        {
-//        iEngine->FileListContainer()->SetScreenLayoutL(iEngine->Settings().iDisplayMode);
-//        iEngine->FileListContainer()->CreateListBoxL(iEngine->Settings().iFileViewMode);
-        //iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
-        RefreshViewL();
-//        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetSortModeL(TInt aSortMode)
-    {
-    iSortMode = aSortMode;
-    RefreshViewL();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetOrderModeL(TInt aOrderMode)
-    {
-    iOrderMode = aOrderMode;
-    RefreshViewL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TKeyResponse CFileBrowserFileUtils::HandleOfferKeyEventL(const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/)
-    {
-	// TODO
-	/*
-    if(aType != EEventKey)
-        return EKeyWasNotConsumed;
-    
-    TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift) ||
-                            (aKeyEvent.iModifiers & EModifierLeftShift) ||
-                            (aKeyEvent.iModifiers & EModifierRightShift);
-    TBool controlKeyPressed = (aKeyEvent.iModifiers & EModifierCtrl) || 
-                              (aKeyEvent.iModifiers & EModifierRightCtrl); 
-    
-    // handle left arrow key press
-    if (aKeyEvent.iCode == EKeyLeftArrow)
-        {
-        MoveUpOneLevelL();
-        return EKeyWasConsumed;
-        }
-    
-    // handle right arrow key press
-    else if (aKeyEvent.iCode == EKeyRightArrow)
-        {
-        if (IsDriveListViewActive() && iDriveEntryList->Count() > 0)
-            {
-            MoveDownToDirectoryL();
-            return EKeyWasConsumed;
-            }
-        else if (iFileEntryList->Count() > 0)
-            {
-            MoveDownToDirectoryL();
-            return EKeyWasConsumed;
-            }        
-        }    
-
-    // skip OK/Enter keys when shift or ctrl is pressed because those are needed by the listbox
-    else if ((aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && (shiftKeyPressed || controlKeyPressed))
-        {
-        return EKeyWasNotConsumed;
-        }
-    
-    // handle OK/Enter keys
-    else if (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter)
-        {
-        if (IsDriveListViewActive() && iDriveEntryList->Count() > 0)
-            {
-            MoveDownToDirectoryL();
-            return EKeyWasConsumed;
-            }
-        else if (iFileEntryList->Count() > 0)
-            {
-            TFileEntry fileEntry = iFileEntryList->At(iEngine->FileListContainer()->CurrentListBoxItemIndex());
-            
-            if (fileEntry.iEntry.IsDir())
-                MoveDownToDirectoryL();
-            else
-                OpenCommonFileActionQueryL();
-            
-            return EKeyWasConsumed;
-            } 
-        }
-    
-    // handle Delete/Backspace keys
-    else if (!iEngine->FileListContainer()->SearchField() && (aKeyEvent.iCode == EKeyBackspace || aKeyEvent.iCode == EKeyDelete) &&
-             !iEngine->FileUtils()->IsCurrentDriveReadOnly() && !iEngine->FileUtils()->IsDriveListViewActive())
-        {
-        DeleteL();
-        return EKeyWasConsumed;
-        }
-    */                      
-    return EKeyWasNotConsumed;
-    }        
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::RefreshViewL()
-    {
-//    if (iEngine->FileListContainer())
-//        {
-//
-//        // make sure that the search field is disabled
-//        iEngine->FileListContainer()->DisableSearchFieldL();
-        
-        // read directory listing
-        GenerateDirectoryDataL();
-        
-//        // set an icon array
-//        iEngine->FileListContainer()->SetListBoxIconArrayL(GenerateIconArrayL());
-//
-//        // set text items
-//        iEngine->FileListContainer()->SetListBoxTextArrayL(GenerateItemTextArrayL());
-//        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-//CAknIconArray* CFileBrowserFileUtils::GenerateIconArrayL(TBool aGenerateNewBasicIconArray)
-//    {
-//	// TODO
-//
-//    CAknIconArray* iconArray = NULL;
-//
-//    if (aGenerateNewBasicIconArray)
-//        {
-//        iconArray = new(ELeave) CAknIconArray(16);
-//        }
-//    else
-//        {
-//        if (iEngine->FileListContainer())
-//            iconArray = iEngine->FileListContainer()->ListBoxIconArrayL();
-//
-//        if (!iconArray)
-//            iconArray = new(ELeave) CAknIconArray(16);
-//        }
-//
-//
-//    CleanupStack::PushL(iconArray);
-//
-//    // generate basic items if not already existing
-//    if (iconArray->Count() < EFixedIconListLength)
-//        {
-//        // reset arrays
-//        iconArray->Reset();
-//        iAppIconList->Reset();
-//
-//        // get default control color
-//        TRgb defaultColor;
-//        defaultColor = iEngine->EikonEnv()->Color(EColorControlText);
-//
-//        // create a color icon of the marking indicator
-//        CFbsBitmap* markBitmap = NULL;
-//        CFbsBitmap* markBitmapMask = NULL;
-//
-//        AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
-//                KAknsIIDQgnIndiMarkedAdd,
-//                KAknsIIDQsnIconColors,
-//                EAknsCIQsnIconColorsCG13,
-//                markBitmap,
-//                markBitmapMask,
-//                AknIconUtils::AvkonIconFileName(),
-//                EMbmAvkonQgn_indi_marked_add,
-//                EMbmAvkonQgn_indi_marked_add_mask,
-//                defaultColor
-//                );
-//
-//        // 0 marking indicator
-//        CGulIcon* markIcon = CGulIcon::NewL(markBitmap, markBitmapMask);
-//        iconArray->AppendL(markIcon);
-//
-//        // 1 empty
-//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
-//                                  EMbmAvkonQgn_prop_empty, EMbmAvkonQgn_prop_empty_mask, KAknsIIDQgnPropEmpty);
-//        // 2 phone memory
-//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
-//                                  EMbmAvkonQgn_prop_phone_memc, EMbmAvkonQgn_prop_phone_memc_mask, KAknsIIDQgnPropPhoneMemc);
-//        // 3 memory card
-//        AppendGulIconToIconArrayL(iconArray, KMemoryCardUiBitmapFile,
-//                                  EMbmAknmemorycarduiQgn_prop_mmc_memc, EMbmAknmemorycarduiQgn_prop_mmc_memc_mask, KAknsIIDQgnPropMmcMemc);
-//        // 4 memory card disabled
-//        AppendGulIconToIconArrayL(iconArray, KMemoryCardUiBitmapFile,
-//                                  EMbmAknmemorycarduiQgn_prop_mmc_non, EMbmAknmemorycarduiQgn_prop_mmc_non_mask, KAknsIIDQgnPropMmcNon);
-//        // 5 folder
-//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
-//                                  EMbmAvkonQgn_prop_folder_small, EMbmAvkonQgn_prop_folder_small_mask, KAknsIIDQgnPropFolderSmall);
-//        // 6 folder with subfolders
-//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
-//                                  EMbmAvkonQgn_prop_folder_sub_small, EMbmAvkonQgn_prop_folder_sub_small_mask, KAknsIIDQgnPropFolderSubSmall);
-//        // 7 current folder
-//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
-//                                  EMbmAvkonQgn_prop_folder_current, EMbmAvkonQgn_prop_folder_current_mask, KAknsIIDQgnPropFolderCurrent);
-//        }
-//
-//    // append custom icons if not in drive list view and setting is enabled
-//    if (!aGenerateNewBasicIconArray && !IsDriveListViewActive() && iEngine->Settings().iShowAssociatedIcons)
-//        {
-//        // init id counter
-//        TInt idCounter(EFixedIconListLength + iAppIconList->Count());
-//
-//        // loop all items in the file list
-//        for (TInt i=0; i<iFileEntryList->Count(); i++)
-//            {
-//            TFileEntry& fileEntry = iFileEntryList->At(i);
-//
-//            // just check for normal files
-//            if (!fileEntry.iEntry.IsDir())
-//                {
-//                TUid appUid = GetAppUid(fileEntry);
-//                TInt iconId = AppIconIdForUid(appUid);
-//
-//                if (appUid != KNullUid && iconId == KErrNotFound)
-//                    {
-//                    // icon not found from the icon array, generate it
-//                    CFbsBitmap* bitmap = NULL;
-//                    CFbsBitmap* mask = NULL;
-//                    CGulIcon* appIcon = NULL;
-//
-//                    TRAPD(err,
-//                        AknsUtils::CreateAppIconLC(AknsUtils::SkinInstance(), appUid, EAknsAppIconTypeList, bitmap, mask);
-//                        appIcon = CGulIcon::NewL(bitmap, mask);
-//                        CleanupStack::Pop(2); //bitmap, mask
-//                        );
-//
-//                    if (err == KErrNone)
-//                        {
-//                        TAppIcon appIconEntry;
-//                        appIconEntry.iId = idCounter;
-//                        appIconEntry.iUid = appUid;
-//
-//                        appIcon->SetBitmapsOwnedExternally(EFalse);
-//                        iconArray->AppendL(appIcon);
-//                        iAppIconList->AppendL(appIconEntry);
-//
-//                        fileEntry.iIconId = idCounter;
-//
-//                        idCounter++;
-//                        }
-//                    else
-//                        {
-//                        delete bitmap;
-//                        delete mask;
-//
-//                        TAppIcon appIconEntry;
-//                        appIconEntry.iId = EFixedIconEmpty;
-//                        appIconEntry.iUid = appUid;
-//
-//                        iAppIconList->AppendL(appIconEntry);
-//                        }
-//                    }
-//
-//                else if (appUid != KNullUid && iconId >= 0)
-//                    {
-//                    // we already have already generated an icon for this uid, use it
-//                    fileEntry.iIconId = iconId;
-//                    }
-//                }
-//            }
-//        }
-//
-//    CleanupStack::Pop(); //iconArray
-//	return iconArray;
-//
-//	}
-//
-// --------------------------------------------------------------------------------------------
-
-//void CFileBrowserFileUtils::AppendGulIconToIconArrayL(CAknIconArray* aIconArray, const TDesC& aIconFile, TInt aIconId, TInt aMaskId, const TAknsItemID aAknsItemId)
-//    {
-//    CGulIcon* icon = AknsUtils::CreateGulIconL(
-//            AknsUtils::SkinInstance(),
-//            aAknsItemId,
-//            aIconFile,
-//            aIconId,
-//            aMaskId);
-//    CleanupStack::PushL(icon);
-//	
-//	icon->SetBitmapsOwnedExternally(EFalse);
-//	aIconArray->AppendL(icon);
-//	
-//	CleanupStack::Pop(); //icon          
-//    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::AppIconIdForUid(TUid aUid)
-    {
-    TInt result(KErrNotFound);
-    
-    for (TInt i=0; i<iAppIconList->Count(); i++)
-        {
-        if (iAppIconList->At(i).iUid == aUid)
-            {
-            result = iAppIconList->At(i).iId;
-            break;
-            }
-        }
-    
-    return result;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TUid CFileBrowserFileUtils::GetAppUid(TFileEntry aFileEntry)
-    {
-    TFileName fullPath;
-    fullPath.Copy(aFileEntry.iPath);
-    fullPath.Append(aFileEntry.iEntry.iName);
-    
-    TParse parsedName;
-    parsedName.Set(fullPath, NULL, NULL);
-
-    // this will boost performance in \sys\bin folder    
-    if (parsedName.Ext().CompareF(_L(".dll")) == 0 || parsedName.Ext().CompareF(_L(".rsc")) == 0)
-        return KNullUid;
-    
-    TInt err1(KErrNone), err2(KErrNone);
-    TUid appUid;
-    TDataType dataType;
-    TBool isProgram;
-    
-    err1 = iEngine->LsSession().AppForDocument(fullPath, appUid, dataType);
-    err2 = iEngine->LsSession().IsProgram(fullPath, isProgram);
-        
-    if (err1 == KErrNone && err2 == KErrNone)
-        {
-        if (isProgram)
-            {
-            // get the real app Uid from the app list
-            TApaAppInfo appInfo;
-            iEngine->LsSession().GetAllApps();
-
-            while (iEngine->LsSession().GetNextApp(appInfo) == KErrNone)
-                {
-                if (fullPath.CompareF(appInfo.iFullName) == 0)
-                    return appInfo.iUid;
-                }
-            }
-        else
-            {
-            // return the app Uid associated for it
-            return appUid;
-            }            
-        }
-
-    return KNullUid;
-    }
-
-
-CFileEntryList* CFileBrowserFileUtils::FileEntries() const
-{
-    return iFileEntryList;
-}
-CDriveEntryList* CFileBrowserFileUtils::DriveEntries() const
-{
-    return iDriveEntryList;
-}
-
-//// --------------------------------------------------------------------------------------------
-//
-//CDesCArray* CFileBrowserFileUtils::GenerateItemTextArrayL()
-//    {
-//    iTextArray = new(ELeave) CDesCArrayFlat(64);
-////    CleanupStack::PushL(textArray);
-//
-//    if (IsDriveListViewActive())
-//        {
-//        _LIT(KSimpleDriveEntry, "%d\t%c: <%S>\t\t");
-//        _LIT(KExtendedDriveEntry, "%d\t%c: <%S>\t%LD / %LD kB\t");
-//
-//        for (TInt i=0; i<iDriveEntryList->Count(); i++)
-//            {
-//            TFileName textEntry;
-//            TDriveEntry driveEntry = iDriveEntryList->At(i);
-//
-//            if (iEngine->Settings().iFileViewMode == EFileViewModeSimple)
-//                {
-//                textEntry.Format(KSimpleDriveEntry, driveEntry.iIconId, TUint(driveEntry.iLetter), &driveEntry.iMediaTypeDesc);
-//                }
-//            else if (iEngine->Settings().iFileViewMode == EFileViewModeExtended)
-//                {
-//                textEntry.Format(KExtendedDriveEntry, driveEntry.iIconId, TUint(driveEntry.iLetter), &driveEntry.iMediaTypeDesc, driveEntry.iVolumeInfo.iFree/1024, driveEntry.iVolumeInfo.iSize/1024);
-//                }
-//
-//            iTextArray->AppendL(textEntry);
-//            }
-//        }
-//
-//    else
-//        {
-//        _LIT(KSimpleFileEntry, "%d\t%S\t\t");
-//        _LIT(KExtendedFileEntry, "%d\t%S\t%S\t");
-//
-//        for (TInt i=0; i<iFileEntryList->Count(); i++)
-//            {
-//            TFileName textEntry;
-//            TFileEntry fileEntry = iFileEntryList->At(i);
-//
-//            // format text line entries
-//            if (iEngine->Settings().iFileViewMode == EFileViewModeSimple)
-//                {
-//                textEntry.Format(KSimpleFileEntry, fileEntry.iIconId, &fileEntry.iEntry.iName);
-//                }
-//            else if (iEngine->Settings().iFileViewMode == EFileViewModeExtended)
-//                {
-//                TBuf<128> extraData;
-//
-//                // append entry date
-//                TTime entryModified = fileEntry.iEntry.iModified;
-//                if ( iTz.ConvertToLocalTime( entryModified ) == KErrNone )
-//                    {
-//                    entryModified = fileEntry.iEntry.iModified;
-//                    }
-//
-//                _LIT(KCurrentDate,"%D%M%*Y%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B");
-//                entryModified.FormatL(extraData, KCurrentDate);
-//
-//                // for a directory append number of entries and for a file the file size
-//                if (fileEntry.iEntry.IsDir() && fileEntry.iDirEntries >= 0)
-//                    {
-//                    extraData.Append(_L(" - "));
-//                    extraData.AppendNum(fileEntry.iDirEntries);
-//
-//                    if (fileEntry.iDirEntries == 1)
-//                        extraData.Append(_L(" entry"));
-//                    else
-//                        extraData.Append(_L(" entries"));
-//                    }
-//
-//                // normal file entry
-//                else if (!fileEntry.iEntry.IsDir())
-//                    {
-//                    extraData.Append(_L(" - "));
-//
-//                    if (fileEntry.iEntry.iSize < 1024)
-//                        {
-//                        extraData.AppendNum(fileEntry.iEntry.iSize);
-//                        extraData.Append(_L(" B"));
-//                        }
-//                    else if (fileEntry.iEntry.iSize < 1024*1024)
-//                        {
-//                        TReal sizeKB = (TReal)fileEntry.iEntry.iSize / 1024;
-//                        extraData.AppendNum(sizeKB, TRealFormat(KDefaultRealWidth, 1));
-//                        extraData.Append(_L(" kB"));
-//                        }
-//                    else
-//                        {
-//                        TReal sizeMB = (TReal)fileEntry.iEntry.iSize / (1024*1024);
-//                        extraData.AppendNum(sizeMB, TRealFormat(KDefaultRealWidth, 1));
-//                        extraData.Append(_L(" MB"));
-//                        }
-//                    }
-//
-//                // append attribute flags if any
-//                TBuf<4> atts;
-//                if (fileEntry.iEntry.IsArchive())
-//                    atts.Append(_L("A"));
-//                if (fileEntry.iEntry.IsHidden())
-//                    atts.Append(_L("H"));
-//                if (fileEntry.iEntry.IsReadOnly())
-//                    atts.Append(_L("R"));
-//                if (fileEntry.iEntry.IsSystem())
-//                    atts.Append(_L("S"));
-//
-//                if (atts.Length() > 0)
-//                    {
-//                    extraData.Append(_L(" - ["));
-//                    extraData.Append(atts);
-//                    extraData.Append(_L("]"));
-//                    }
-//
-//                // format
-//                textEntry.Format(KExtendedFileEntry, fileEntry.iIconId, &fileEntry.iEntry.iName, &extraData);
-//                }
-//
-//            iTextArray->AppendL(textEntry);
-//            }
-//        }
-//
-////    CleanupStack::Pop(); //textArray
-//    return iTextArray;
-//    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::GenerateDirectoryDataL()
-    {
-    if (iListingMode == ENormalEntries)
-        {
-        if (IsDriveListViewActive())
-            GetDriveListL();    
-        else
-            GetDirectoryListingL();        
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::GetDriveListL()
-    {
-    TDriveList driveList;
-    
-    // get drive listing depending of the support for network drives
-    if (iEngine->Settings().iSupportNetworkDrives)
-        {
-        #ifndef __SERIES60_30__
-            #ifndef __SERIES60_31__
-                User::LeaveIfError(iFs.DriveList(driveList, KDriveAttAll));
-            #endif
-        #else    
-            User::LeaveIfError(iFs.DriveList(driveList));
-        #endif        
-        }
-    else
-        {
-        User::LeaveIfError(iFs.DriveList(driveList));
-        }
-    
-    iDriveEntryList->Reset();        
-    
-    for (TInt i=0; i<KMaxDrives; i++)
-        {
-        if (driveList[i])
-            {
-            TDriveEntry driveEntry;
-            
-            // set default icon
-            driveEntry.iIconId = EFixedIconPhoneMemory;
-
-            // get drive letter and number 
-            driveEntry.iLetter = 'A' + i;
-            iFs.CharToDrive(driveEntry.iLetter, driveEntry.iNumber);
-            
-            // get volume info and check errors
-            if (iFs.Volume(driveEntry.iVolumeInfo, driveEntry.iNumber) == KErrNone)
-                {
-                // set media type descriptor
-                TInt mediaType = driveEntry.iVolumeInfo.iDrive.iType;
-                TBool extMountable( EFalse );
-                
-                if (mediaType == EMediaNotPresent)
-                    driveEntry.iMediaTypeDesc = _L("Not present");
-                else if (mediaType ==EMediaUnknown )
-                    driveEntry.iMediaTypeDesc = _L("Unknown");
-                else if (mediaType ==EMediaFloppy )
-                    driveEntry.iMediaTypeDesc = _L("Floppy");
-                else if (mediaType == EMediaHardDisk)
-                    driveEntry.iMediaTypeDesc = _L("Mass storage");
-                else if (mediaType == EMediaCdRom)
-                    driveEntry.iMediaTypeDesc = _L("CD-ROM");
-                else if (mediaType == EMediaRam)
-                    driveEntry.iMediaTypeDesc = _L("RAM");
-                else if (mediaType == EMediaFlash)
-                    driveEntry.iMediaTypeDesc = _L("Flash");
-                else if (mediaType == EMediaRom)
-                    driveEntry.iMediaTypeDesc = _L("ROM");
-                else if (mediaType == EMediaRemote)
-                    driveEntry.iMediaTypeDesc = _L("Remote");
-                else if (mediaType == EMediaNANDFlash)
-                    driveEntry.iMediaTypeDesc = _L("NAND flash");
-                
-                // get real size of the ROM drive
-                if (mediaType == EMediaRom)
-                    {
-                    TMemoryInfoV1Buf ramMemory;
-                    UserHal::MemoryInfo(ramMemory);
-                    driveEntry.iVolumeInfo.iSize = ramMemory().iTotalRomInBytes;
-                    }
-                
-                // set attribute descripitions
-                if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatNotSupported)
-                    driveEntry.iAttributesDesc.Append(_L("Battery not supported"));
-                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatGood)
-                    driveEntry.iAttributesDesc.Append(_L("Battery good"));
-                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatLow)
-                    driveEntry.iAttributesDesc.Append(_L("Battery low"));
-                else
-                    driveEntry.iAttributesDesc.Append(_L("Battery state unknown"));
-                
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttLocal)
-                    driveEntry.iAttributesDesc.Append(_L(" + Local"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRom)
-                    driveEntry.iAttributesDesc.Append(_L(" + ROM"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRedirected)
-                    driveEntry.iAttributesDesc.Append(_L("+ Redirected"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttSubsted)
-                    driveEntry.iAttributesDesc.Append(_L(" + Substed"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttInternal)
-                    driveEntry.iAttributesDesc.Append(_L(" + Internal"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable)
-                    {
-                    driveEntry.iAttributesDesc.Append(_L(" + Removable"));
-#if (!defined __SERIES60_30__ && !defined __SERIES60_31__)
-                    TUint drvStatus( 0 );
-                    if ( !DriveInfo::GetDriveStatus( iFs, driveEntry.iNumber, drvStatus ) &&
-                         drvStatus & DriveInfo::EDriveExternallyMountable &&
-                         drvStatus & DriveInfo::EDriveInternal )
-                        {
-                        extMountable = ETrue;
-                        // iMediaTypeDesc already set as "Mass storage" 
-                        }
-                    else
-                        {
-                        driveEntry.iMediaTypeDesc = _L("Memory card");
-                        }
-#else
-                    driveEntry.iMediaTypeDesc = _L("Memory card");
-#endif
-                    }
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemote)
-                    driveEntry.iAttributesDesc.Append(_L(" + Remote"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttTransaction)
-                    driveEntry.iAttributesDesc.Append(_L(" + Transaction"));
-                                
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttVariableSize)
-                    driveEntry.iAttributesDesc.Append(_L(" + Variable size"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDualDensity)
-                    driveEntry.iAttributesDesc.Append(_L(" + Dual density"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttFormattable)
-                    driveEntry.iAttributesDesc.Append(_L(" + Formattable"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttWriteProtected)
-                    driveEntry.iAttributesDesc.Append(_L(" + Write protected"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLockable)
-                    driveEntry.iAttributesDesc.Append(_L(" + Lockable"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked)
-                    driveEntry.iAttributesDesc.Append(_L(" + Locked"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttHasPassword)
-                    driveEntry.iAttributesDesc.Append(_L(" + Has password"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttReadWhileWrite)
-                    driveEntry.iAttributesDesc.Append(_L(" + Read while write"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDeleteNotify)
-                    driveEntry.iAttributesDesc.Append(_L(" + Supports DeleteNotify"));
-                
-                
-                // mark a removable media with memory card icon
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable && !extMountable)
-                    {
-                    if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAbsent)
-                        {                
-                        driveEntry.iIconId = EFixedIconMemoryCardDisabled;
-                        }                 
-                    else
-                        {                
-                        driveEntry.iIconId = EFixedIconMemoryCard;
-                        } 
-                    }
-                }   
-            
-            // if this fails, likely it's a memory card which is not present
-            else
-                {
-                TVolumeInfo volumeInfo;
-                volumeInfo.iSize = 0;
-                volumeInfo.iFree = 0;
-                volumeInfo.iDrive.iDriveAtt = KDriveAttRemovable;
-                volumeInfo.iDrive.iMediaAtt = KMediaAttWriteProtected;
-                driveEntry.iVolumeInfo = volumeInfo;
-
-                driveEntry.iMediaTypeDesc = _L("Not ready");
-                driveEntry.iIconId = EFixedIconMemoryCardDisabled;
-                }
-            
-            if ( iPrevFolderName != KNullDesC && iPrevFolderName[0] == driveEntry.iLetter )
-                {
-                iPrevFolderIndex = iDriveEntryList->Count();
-                }
-            
-            iDriveEntryList->AppendL(driveEntry);
-            }
-        }
-    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::GetDirectoryListingL()
-    {
-    iFileEntryList->Reset();
-
-    TInt sortMode(ESortByName);
-    if (iSortMode == EFileBrowserCmdViewSortByExtension)    
-        sortMode = ESortByExt; 
-    else if (iSortMode == EFileBrowserCmdViewSortBySize)    
-        sortMode = ESortBySize; 
-    else if (iSortMode == EFileBrowserCmdViewSortByDate)    
-        sortMode = ESortByDate; 
-    
-    TInt orderMode(EAscending);
-    if (iOrderMode == EFileBrowserCmdViewOrderDescending)    
-        orderMode = EDescending; 
-    
-    CDir* dir = NULL;
-    if (iFs.GetDir(iCurrentPath, KEntryAttMatchMask, sortMode | orderMode | EDirsFirst, dir) == KErrNone)
-        {
-        CleanupStack::PushL(dir);
-        
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TFileEntry fileEntry;
-            fileEntry.iPath = iCurrentPath;
-            fileEntry.iEntry = (*dir)[i];
-            fileEntry.iDirEntries = KErrNotFound;
-            fileEntry.iIconId = EFixedIconEmpty;
-            
-            if ( iPrevFolderName != KNullDesC && iPrevFolderName == fileEntry.iEntry.iName )
-                {
-                iPrevFolderIndex = i;
-                }
-            
-            // check for directory entries
-            if (fileEntry.iEntry.IsDir())
-                {
-                fileEntry.iIconId = EFixedIconFolder;
-
-                TFileName subPath = fileEntry.iPath;
-                subPath.Append(fileEntry.iEntry.iName);
-                subPath.Append(_L("\\"));
-                                
-                // get number of entries in this directory if extended info about sub directories enabled
-                if (iEngine->Settings().iShowSubDirectoryInfo && iEngine->Settings().iFileViewMode == EFileViewModeExtended)
-                    {
-                    CDir* subDir = NULL;
-                    if (iFs.GetDir(subPath, KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
-                        {
-                        fileEntry.iDirEntries = subDir->Count();
-                        delete subDir;    
-                        }
-                    }
-                
-                // apply subfolder icon for known directories (speed improvement)
-                if (subPath[0]=='Z' && (subPath.CompareF(_L("Z:\\data\\"))==0 || subPath.CompareF(_L("Z:\\Nokia\\"))==0
-                    || subPath.Compare(_L("Z:\\private\\"))==0 || subPath.Compare(_L("Z:\\resource\\"))==0
-                    || subPath.Compare(_L("Z:\\sys\\"))==0 || subPath.Compare(_L("Z:\\system\\"))==0))
-                    {
-                    fileEntry.iIconId = EFixedIconFolderSub;
-                    }
-                else if (subPath[0]=='Z' && (subPath.CompareF(_L("Z:\\sys\\bin\\"))==0))
-                    {
-                    // normal folder icon for these ones
-                    fileEntry.iIconId = EFixedIconFolder;
-                    }
-                else
-                    {
-                    // check if this folder has subdirectories
-                    CDir* subDir = NULL;
-                    if (iFs.GetDir(subPath, KEntryAttDir|KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
-                        {
-                        for (TInt j=0; j<subDir->Count(); j++)
-                            {
-                            TEntry entry = (*subDir)[j];
-
-                            if (entry.IsDir())
-                                {
-                                fileEntry.iIconId = EFixedIconFolderSub;
-                                break;    
-                                }
-                            }
-
-                        delete subDir;    
-                        }                    
-                    }
-                }
-
-            iFileEntryList->AppendL(fileEntry);
-            }
-        
-        CleanupStack::PopAndDestroy(); //dir    
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::MoveUpOneLevelL()
-    {
-    iPrevFolderIndex = KErrNotFound;
-    iPrevFolderName.Zero();
-    
-    // change back to normal mode or move up
-    if (iListingMode != ENormalEntries)
-        {
-        iListingMode = ENormalEntries;
-        }
-    else
-        {
-        // do nothing if displaying drive list view
-        if (IsDriveListViewActive())
-            return;
-        
-        if (iCurrentPath.Length() <= KDriveLetterStringLength)
-            {
-            if ( iCurrentPath.Length() > 0 )
-                {
-                iPrevFolderName.Append( iCurrentPath[0] );
-                }
-            // move to drive list view if the current path is already short enough
-            iCurrentPath = KNullDesC;
-            }
-        else
-            {
-            // move one directory up
-            TInt marker(iCurrentPath.Length());
-            
-            // find second last dir marker
-            for (TInt i=iCurrentPath.Length()-2; i>=0; i--)
-                {
-                if (iCurrentPath[i] == '\\')
-                    {
-                    marker = i;
-                    break;
-                    }
-                    
-                }
-            
-            // update iPrevDir with the directory name that we just left 
-            iPrevFolderName.Copy( iCurrentPath.RightTPtr( iCurrentPath.Length() -  marker - 1 ) );
-            iPrevFolderName.Delete( iPrevFolderName.Length() -1, 2 ); // remove extra '\\'
-            
-            iCurrentPath = iCurrentPath.LeftTPtr(marker+1);
-            }    
-        }
-
-//    if (iEngine->FileListContainer())
-//        {
-        //iEngine->FileListContainer()->DisableSearchFieldL();
-        //iEngine->FileListContainer()->ListBox()->ClearSelection();
-        //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
-        //iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
-//        }
-    
-    // update view
-    RefreshViewL();
-    
-    if (iEngine->Settings().iRememberFolderSelection
-        //&& iEngine->FileListContainer()
-        && iPrevFolderIndex > KErrNotFound )
-        {
-        
-//        TInt visibleItems = iEngine->FileListContainer()->ListBox()->Rect().Height() /
-//                            iEngine->FileListContainer()->ListBox()->ItemHeight()
-//                            - 1; // for the title row
-//
-//        // By default, the selected item would be the last visible item on the listbox.
-//        // We want the selected item be displayed at the middle of the listbox, so we
-//        // select one of the successor items first to scroll down a bit
-//        iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(
-//            Min( iEngine->FileListContainer()->ListBox()->Model()->ItemTextArray()->MdcaCount() -1,
-//                 iPrevFolderIndex + visibleItems / 2 ) );
-//
-//        // ...and after that we select the the correct item.
-//        iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex( iPrevFolderIndex );
-        
-        // update view
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::MoveDownToDirectoryL(TInt aIndex)
-    {
-
-    // change back to normal mode
-    if (iListingMode != ENormalEntries)
-        {
-        iListingMode = ENormalEntries;
-        }
-    
-    if (aIndex >= 0)
-        {
-        TBool needsRefresh(EFalse);
-
-        if (IsDriveListViewActive())
-            {
-            // currently in a drive list view, move to root of selected drive
-            if (iDriveEntryList->Count() > aIndex)
-                {
-                TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-                
-                iCurrentPath.Append(driveEntry.iLetter);    
-                iCurrentPath.Append(_L(":\\"));
-                
-                needsRefresh = ETrue;    
-                }
-            }
-        else
-            {
-            // otherwise just append the new directory
-            if (iFileEntryList->Count() > aIndex)
-                {
-                TFileEntry fileEntry = iFileEntryList->At(aIndex);
-                
-                if (fileEntry.iEntry.IsDir())
-                    {
-                    iCurrentPath.Copy(fileEntry.iPath);
-                    iCurrentPath.Append(fileEntry.iEntry.iName);
-                    iCurrentPath.Append(_L("\\"));
-
-                    needsRefresh = ETrue;    
-                    }
-                }
-            }
-
-        if (needsRefresh /*&& iEngine->FileListContainer()*/)
-            {
-            //iEngine->FileListContainer()->DisableSearchFieldL();
-            //iEngine->FileListContainer()->ListBox()->ClearSelection();
-            //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
-            //iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
-
-            // update view
-            RefreshViewL();
-            }
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CFileBrowserFileUtils::IsCurrentDriveReadOnly()
-    {
-    if (iListingMode !=ENormalEntries || iCurrentPath.Length() < 2)
-        return EFalse;
-    else
-        {
-        for (TInt i=0; i<iDriveEntryList->Count(); i++)
-            {
-            TDriveEntry driveEntry = iDriveEntryList->At(i);
-            
-            if (driveEntry.iLetter == iCurrentPath[0])
-                {
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt == KMediaAttWriteProtected || driveEntry.iVolumeInfo.iDrive.iMediaAtt == KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt == KDriveAbsent)
-                    return ETrue;    
-                else
-                    return EFalse;
-                }
-            }
-        }
-
-    return EFalse;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CFileBrowserFileUtils::IsItemDirectory(TInt aCurrentItemIndex)
-    {
-    if (aCurrentItemIndex < 0)
-        {
-        return EFalse;
-        }
-    else
-        {
-        if (iFileEntryList->Count() > aCurrentItemIndex)
-            {
-            TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex) ;
-            return fileEntry.iEntry.IsDir();
-            }
-        else
-            {
-            return EFalse;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::SetSelectedItemsOrCurrentItemL(const CArrayFix<TInt>* selectionIndexes,
-                                                           CFileEntryList* aFileEntryList)
-    {
-    aFileEntryList->Reset();
-
-    // by default use selected items
-    if (selectionIndexes && selectionIndexes->Count() > 0)
-        {
-        TInt ref(0);
-        TKeyArrayFix key(0, ECmpTUint16);
-        TInt index(0);
-
-        for (TInt i=0; i<iFileEntryList->Count(); i++)
-            {
-            ref = i;
-
-            if (selectionIndexes->Find(ref, key, index) == 0)
-                {
-                aFileEntryList->AppendL(iFileEntryList->At(i));
-                }
-            }
-        }
-    return aFileEntryList->Count();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::ClipboardCutL(const CArrayFix<TInt>* aSelectionIndices)
-    {
-	
-    iClipBoardMode = EClipBoardModeCut;
-    TInt operations = SetSelectedItemsOrCurrentItemL(aSelectionIndices, iClipBoardList);
-    return operations;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::ClipboardCopyL(const CArrayFix<TInt>* aSelectionIndices)
-    {
-    iClipBoardMode = EClipBoardModeCopy;
-    TInt operations = SetSelectedItemsOrCurrentItemL(aSelectionIndices, iClipBoardList);
-    return operations;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ClipboardPasteL(const TOverwriteOptions &aOverwriteOptions)
-    {
-    if (iClipBoardMode == EClipBoardModeCut)
-        {
-        DoCopyToFolderL(iClipBoardList, iCurrentPath, aOverwriteOptions, ETrue );
-        iClipBoardList->Reset();
-        }
-    else if (iClipBoardMode == EClipBoardModeCopy)
-        {
-        DoCopyToFolderL(iClipBoardList, iCurrentPath, aOverwriteOptions, EFalse);
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::SetCurrentSelection(const CArrayFix<TInt>* aSelectionIndices)
-    {
-    TInt operations = SetSelectedItemsOrCurrentItemL(aSelectionIndices, iCurrentSelectionList);
-    return operations;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::CopyToFolderL(TFileName aTargetDir,
-                                          const TOverwriteOptions &aOverwriteOptions,
-                                          TBool aMove)
-    {
-
-    //	TFileName destinationFolder;
-
-    // generate an icon array
-    // CAknIconArray* iconArray = GenerateIconArrayL(ETrue);
-    //    CleanupStack::PushL(iconArray);
-
-    // run folder selection dialog
-    //    CFileBrowserDestinationFolderSelectionDlg* dlg = CFileBrowserDestinationFolderSelectionDlg::NewL(destinationFolder, iDriveEntryList, iconArray);
-
-    // do the file operations
-    //DoCopyToFolderL(entryList, aTargetDir, aOverwriteOptions, aMove);
-    DoCopyToFolderL(iCurrentSelectionList, aTargetDir, aOverwriteOptions, aMove);
-
-    //    CleanupStack::Pop(); //iconArray
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CFileBrowserFileUtils::IsDestinationEntriesExists(const TDesC& aTargetDir)
-    {
-    TBool someEntryExists(EFalse);
-    if (iCurrentSelectionList && iCurrentSelectionList->Count() > 0)
-        {
-        // check if some destination entries also exists
-        for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
-            {
-            TFileEntry fileEntry = iCurrentSelectionList->At(i);
-
-            TFileName targetEntry = aTargetDir;
-            targetEntry.Append(fileEntry.iEntry.iName);
-
-            if (fileEntry.iEntry.IsDir())
-                {
-                targetEntry.Append(_L("\\"));
-
-                if (BaflUtils::PathExists(iFs, targetEntry))
-                    {
-                    someEntryExists = ETrue;
-                    break;
-                    }
-                }
-            else
-                {
-                if (BaflUtils::FileExists(iFs, targetEntry))
-                    {
-                    someEntryExists = ETrue;
-                    break;
-                    }
-                }
-            }
-        }
-    return someEntryExists;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::DoCopyToFolderL(CFileEntryList* aEntryList,
-                                            const TDesC& aTargetDir,
-                                            const TOverwriteOptions &aOverwriteOptions,
-                                            TBool aDeleteSource)
-    {
-    if (aEntryList && aEntryList->Count() > 0)
-        {
-        if (aOverwriteOptions.iDoFileOperations)
-            {
-            // set correct command id depending if we are copying or moving
-            TInt commandId(EFileBrowserFileOpCommandCopy);
-            if (aDeleteSource)
-                commandId = EFileBrowserFileOpCommandMove;
-            
-            // do the file operations for each entry
-            for (TInt i=0; i<aEntryList->Count(); i++)
-                {
-                TFileEntry fileEntry = aEntryList->At(i);
-                
-                TFileName targetEntry = aTargetDir;
-                targetEntry.Append(fileEntry.iEntry.iName);
-                
-                if (aOverwriteOptions.iQueryIndex == EFileActionGenerateUniqueFilenames)
-                    {
-                    CApaApplication::GenerateFileName(iFs, targetEntry);
-                    }
-                else if (aOverwriteOptions.iQueryIndex == EFileActionQueryPostFix)
-                    {
-                    targetEntry.Append(aOverwriteOptions.iPostFix);
-                    }
-
-                
-                // append the new command to the command array
-                if (fileEntry.iEntry.IsDir())
-                    {
-                    AppendToCommandArrayL(commandId,
-                                          new(ELeave)CCommandParamsCopyOrMove(fileEntry, targetEntry, aOverwriteOptions.iOverWriteFlags|CFileMan::ERecurse)
-                                         );
-                    }
-                else
-                    {
-                    AppendToCommandArrayL(commandId,
-                                          new(ELeave)CCommandParamsCopyOrMove(fileEntry, targetEntry, aOverwriteOptions.iOverWriteFlags)
-                                         );
-                    }
-
-                }
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::DeleteL()
-    {
-    // do the file operations for each entry
-    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
-        {
-        TFileEntry fileEntry = iCurrentSelectionList->At(i);
-
-        // append the new command to the command array
-        if (fileEntry.iEntry.IsDir())
-            {
-            AppendToCommandArrayL(EFileBrowserFileOpCommandDelete,
-                                  new(ELeave)CCommandParamsDelete(fileEntry, CFileMan::ERecurse)
-                                 );
-            }
-        else
-            {
-            AppendToCommandArrayL(EFileBrowserFileOpCommandDelete,
-                                  new(ELeave)CCommandParamsDelete(fileEntry, 0)
-                                 );
-            }
-
-        }
-    }
-
-
-// --------------------------------------------------------------------------------------------
-
-TBool CFileBrowserFileUtils::SelectionHasDirs()
-{
-    TBool isDir(EFalse);
-
-    // check if any directories and ask recursion
-    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
-        {
-        TFileEntry fileEntry = iCurrentSelectionList->At(i);
-
-        if (fileEntry.iEntry.IsDir())
-            {
-            isDir = ETrue;
-            break;
-            }
-        }
-    return isDir;
-}
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::TouchL(TBool aRecurse)
-    {
-    // now go through all entries
-    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
-        {
-        TFileEntry fileEntry = iCurrentSelectionList->At(i);
-
-        // touch to current time
-        TTime now;
-        now.UniversalTime();
-
-
-        // append the new command to the command array
-        if (fileEntry.iEntry.IsDir() && aRecurse)
-            {
-            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
-                                  new(ELeave)CCommandParamsAttribs(fileEntry, NULL, NULL, now, CFileMan::ERecurse)
-                                 );
-            }
-        else
-            {
-            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
-                                  new(ELeave)CCommandParamsAttribs(fileEntry, NULL, NULL, now, 0)
-                                 );
-            }
-        }
-    }
-
-TBool CFileBrowserFileUtils::TargetExists(const TInt aIndex, const TFileName &newName)
-    {
-    TBool alreadyExists(EFalse);
-    if (iFileEntryList->Count() > aIndex && aIndex >= 0)
-        {
-
-        TFileEntry fileEntry = iFileEntryList->At(aIndex);
-        TFileName targetEntry = fileEntry.iPath;
-        targetEntry.Append(newName);
-        if (fileEntry.iEntry.IsDir())
-            {
-            //targetEntry.Append(_L("\\"));
-            alreadyExists = BaflUtils::PathExists(iFs, targetEntry);
-            }
-        else
-            {
-            alreadyExists = BaflUtils::FileExists(iFs, targetEntry);
-            }
-        }
-    return alreadyExists;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::RenameL(const TInt aIndex, const TFileName &newName)
-    {
-        if (iFileEntryList->Count() > aIndex && aIndex >= 0)
-        {
-            TFileEntry fileEntry = iFileEntryList->At(aIndex);
-
-            TFileName targetEntry = fileEntry.iPath;
-            targetEntry.Append(newName);
-
-            // append the new command to the command array
-            AppendToCommandArrayL(EFileBrowserFileOpCommandRename,
-                                  new(ELeave)CCommandParamsRename(fileEntry, targetEntry, CFileMan::EOverWrite)
-                                 );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetAttributesL(TUint &aSetAttMask, TUint &aClearAttMask, TBool &aRecurse)
-    {
-    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
-        {
-        TFileEntry fileEntry = iCurrentSelectionList->At(i);
-
-        // append the new command to the command array
-        if (fileEntry.iEntry.IsDir() && aRecurse)
-            {
-            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
-                                  new(ELeave)CCommandParamsAttribs(fileEntry, aSetAttMask, aClearAttMask, fileEntry.iEntry.iModified, CFileMan::ERecurse)
-                                 );
-            }
-        else
-            {
-            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
-                                  new(ELeave)CCommandParamsAttribs(fileEntry, aSetAttMask, aClearAttMask, fileEntry.iEntry.iModified, 0)
-                                 );
-            }
-        }
-
-    // execute all operations
-    StartExecutingCommandsL(_L("Changing attributes"));
-    }
-       
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SearchL()
-    {
-//    iEngine->FileListContainer()->SetScreenLayoutL(EDisplayModeNormal);
-//    iEngine->FileListContainer()->SetNaviPaneTextL(KNullDesC);
-//
-//    iSearchAttributes.iSearchDir = iCurrentPath;
-//
-//    CFileBrowserSearchQueryDlg* dlg = CFileBrowserSearchQueryDlg::NewL(iSearchAttributes);
-//    TBool dlgResult = dlg->RunQueryLD();
-//
-//    iEngine->FileListContainer()->SetScreenLayoutL(iEngine->Settings().iDisplayMode);
-//    iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
-//
-//    if (dlgResult)
-//        {
-//        iEngine->EikonEnv()->BusyMsgL(_L("** Searching **"), TGulAlignment(EHCenterVTop));
-
-
-        iEngine->FileBrowserUI()->ShowWaitDialog(_L("Searching"));
-        iFileEntryList->Reset();
-
-        // if search dir is empty, find from all drives
-        if (iSearchAttributes.iSearchDir == KNullDesC)
-            {
-            for (TInt i=0; i<iDriveEntryList->Count(); i++)
-                {
-                TDriveEntry driveEntry = iDriveEntryList->At(i);
-
-                TBuf<10> driveRoot;
-                driveRoot.Append(driveEntry.iLetter);
-                driveRoot.Append(_L(":\\"));
-
-                DoSearchFiles(iSearchAttributes.iWildCards, driveRoot);
-
-                if (iSearchAttributes.iRecurse)
-                    DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, driveRoot);
-                }
-
-            }
-
-        // otherwise just search from the selected directory
-        else
-            {
-            DoSearchFiles(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir);
-
-            if (iSearchAttributes.iRecurse)
-                DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir);
-            }
-
-//        iEngine->EikonEnv()->BusyMsgCancel();
-        iEngine->FileBrowserUI()->CancelWaitDialog();
-
-//        TInt operations = iFileEntryList->Count();
-
-        iListingMode = ESearchResults;
-        // TODO iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
-        RefreshViewL();
-
-//        _LIT(KMessage, "%d entries found");
-//        TFileName noteMsg;
-//        noteMsg.Format(KMessage, operations);
-//
-//        iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-//        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::DoSearchFiles(const TDesC& aFileName, const TDesC& aPath)
-    {
-    TFindFile fileFinder(iFs);
-    CDir* dir;
-    TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir);
-
-    while (err == KErrNone && iAllowProcessing)
-        {
-        iEngine->FileBrowserUI()->ProcessEvents();
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TEntry entry = (*dir)[i];
-            
-            TTime entryModified = entry.iModified;
-            // convert from universal time
-            if ( iTz.ConvertToLocalTime( entryModified ) == KErrNone )
-                {
-                entryModified = entry.iModified;
-                }
-            if ((entry.IsDir() && entryModified >= iSearchAttributes.iMinDate && entryModified <= iSearchAttributes.iMaxDate) ||
-                (!entry.IsDir() &&entry.iSize >= iSearchAttributes.iMinSize && entry.iSize <= iSearchAttributes.iMaxSize &&
-                 entryModified >= iSearchAttributes.iMinDate && entryModified <= iSearchAttributes.iMaxDate))
-                {
-                TParse parsedName;
-                parsedName.Set(entry.iName, &fileFinder.File(), NULL);
-                
-                if (parsedName.Drive().Length() && aPath.Length() && parsedName.Drive()[0] == aPath[0])
-                    {
-                    TFileEntry fileEntry;
-                    fileEntry.iPath = parsedName.DriveAndPath();
-                    fileEntry.iEntry = entry;
-                    fileEntry.iDirEntries = KErrNotFound;
-                    
-                    TBool appendToArray(EFalse);
-                    
-                    // append directories always
-                    if (entry.IsDir() && !iSearchAttributes.iTextInFile.Length())
-                        {
-                        fileEntry.iIconId = EFixedIconFolder;
-                        appendToArray = ETrue;    
-                        }
-                    
-                    // normal file
-                    else
-                        {
-                        fileEntry.iIconId = EFixedIconEmpty;
-                        
-                        // check if a string needs to be found inside the file
-                        if (iSearchAttributes.iTextInFile.Length())
-                            {
-                            // currently only 8-bit searching, so convert from 16-bit
-                            TBuf8<256> searchText;
-                            searchText.Copy(iSearchAttributes.iTextInFile);
-                            
-                            // specify buffer size and create a buffer
-                            const TInt KReadBufSize = 1024*1024;
-                            HBufC8* buffer = HBufC8::NewLC(KReadBufSize);
-                            TPtr8 bufferPtr = buffer->Des();
-
-                            // open the file for reading
-                            RFile file;
-                            if (file.Open(iFs, parsedName.FullName(), EFileRead) == KErrNone)
-                                {
-                                TInt currentPos(0);
-                                
-                                for (;;)
-                                    {
-                                    // read from the file
-                                    file.Read(currentPos, bufferPtr, KReadBufSize);
-
-                                    // stop looping if the read buffer isn't long enough
-                                    if (bufferPtr.Length() < searchText.Length())
-                                        {
-                                        break;
-                                        }
-                                        
-                                    // try to find the text
-                                    if (bufferPtr.FindF(searchText) >= 0)
-                                        {
-                                        // match found!
-                                        appendToArray = ETrue;
-                                        break;
-                                        }
-                                        
-                                    // calculate the next position
-                                    currentPos += KReadBufSize - searchText.Length();    
-                                    }
-                                
-                                file.Close();
-                                }
-                            
-                            CleanupStack::PopAndDestroy(); //buffer
-                            }
-                        else
-                            {
-                            appendToArray = ETrue;
-                            }
-                        }
-
-                    if (appendToArray)
-                        TRAP(err, iFileEntryList->AppendL(fileEntry));    
-                    }
-                }
-            }
-
-        delete dir;
-        err = fileFinder.FindWild(dir);
-        }
-
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::DoSearchFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
-	{
-    TInt err(KErrNone);
-    CDirScan* scan = CDirScan::NewLC(iFs);
-    scan->SetScanDataL(aPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst);
-    CDir* dir = NULL;
-
-    for(;;)
-        {
-        TRAP(err, scan->NextL(dir));
-        if (!dir  || (err != KErrNone))
-            break;
-
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TEntry entry = (*dir)[i];
-            
-            if (entry.IsDir())
-                {
-                TFileName path(scan->FullPath());
-                
-                if (path.Length())
-                    {
-                    path.Append(entry.iName);
-                    path.Append(_L("\\"));
-                    DoSearchFiles(aFileName, path);
-                    }
-                }
-            }
-        delete(dir);
-        }
-
-    CleanupStack::PopAndDestroy(scan);
-    return err;
-    }
-         
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::NewFileL(const TFileName &aNewFileName)
-    {
-    TFileName fullPath = iCurrentPath;
-    fullPath.Append(aNewFileName);
-
-    TParse nameParser;
-    TInt err = nameParser.SetNoWild(fullPath, NULL, NULL);
-
-    if (err == KErrNone)
-        {
-        // do not try to recreate the file if it already exists
-        if (BaflUtils::PathExists(iFs, nameParser.DriveAndPath()))
-            {
-            err = iFileOps->CreateEmptyFile(fullPath);
-            }
-        else
-            err = KErrAlreadyExists;
-        }
-
-    if (err == KErrNone)
-        {
-        iEngine->FileBrowserUI()->ShowConfirmationNote(_L("New file created"));
-        }
-
-    else if (err == KErrAlreadyExists)
-        {
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("File already exists"), _L(""));
-        }
-
-    else
-        {
-        CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-        iEngine->FileBrowserUI()->ShowErrorNote( textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-        CleanupStack::PopAndDestroy();  //textResolver
-        }
-
-    RefreshViewL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::NewDirectoryL(const TFileName &aNewDirectoryName)
-    {       
-    TFileName fullPath = iCurrentPath;
-    fullPath.Append(aNewDirectoryName);
-    fullPath.Append(_L("\\"));
-
-    TInt err = iFileOps->MkDirAll(fullPath, 0, ETrue);
-
-    if (err == KErrNone)
-        {
-        iEngine->FileBrowserUI()->ShowConfirmationNote(_L("New directory created"));
-        }
-
-    else if (err == KErrAlreadyExists)
-        {
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Directory already exists"), _L(""));
-        }
-
-    else
-        {
-        CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-        iEngine->FileBrowserUI()->ShowErrorNote( textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-        CleanupStack::PopAndDestroy();  //textResolver
-        }
-
-    RefreshViewL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SendToL()
-    {
-//    CFileEntryList* entries = new(ELeave) CFileEntryList(32);
-//    GetSelectedItemsOrCurrentItemL(entries);
-//    CleanupStack::PushL(entries);
-//
-//    TInt operations(0);
-//
-//    CSendUi* sendUi = CSendUi::NewL();
-//    CleanupStack::PushL(sendUi);
-//    CMessageData* messageData = CMessageData::NewL();
-//    CleanupStack::PushL(messageData);
-//
-//    for (TInt i=0; i<entries->Count(); i++)
-//        {
-//        TFileEntry fileEntry = entries->At(i);
-//
-//        // only supported for normal file entries
-//        if (!fileEntry.iEntry.IsDir())
-//            {
-//            TFileName fullPath = fileEntry.iPath;
-//            fullPath.Append(fileEntry.iEntry.iName);
-//
-//            messageData->AppendAttachmentL(fullPath);
-//            operations++;
-//
-//            }
-//        }
-//
-//    if (operations > 0)
-//        {
-//        sendUi->ShowQueryAndSendL(messageData, TSendingCapabilities(0, 0, TSendingCapabilities::ESupportsAttachments));
-//
-//        // I guess this note is not needed..
-////        _LIT(KMessage, "%d entries sent");
-////        TFileName noteMsg;
-////        noteMsg.Format(KMessage, operations);
-////
-////        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
-//        }
-//    else
-//        {
-//        _LIT(KMessage, "Nothing to send");
-//        iEngine->FileBrowserUI()->ShowInformationNote(KMessage, _L(""));
-//        }
-//
-//    CleanupStack::PopAndDestroy(3); // entries, sendUi, messageData
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::CompressL()
-    {
-//    CFileEntryList* entries = new(ELeave) CFileEntryList(16);
-//    GetSelectedItemsOrCurrentItemL(entries);
-//    CleanupStack::PushL(entries);
-//
-//    for (TInt i=0; i<entries->Count(); i++)
-//        {
-//        TFileEntry fileEntry = entries->At(i);
-//
-//        TFileName sourceEntry = fileEntry.iPath;
-//        sourceEntry.Append(fileEntry.iEntry.iName);
-//
-//        TFileName targetEntry = sourceEntry;
-//        targetEntry.Append(KGZipExt);
-//
-//        TFileName targetEntryShort;
-//        targetEntryShort.Copy(fileEntry.iEntry.iName);
-//        targetEntryShort.Append(KGZipExt);
-//
-//        if (BaflUtils::FileExists(iFs, targetEntry))
-//            {
-//            _LIT(KMessage, "%S already exists");
-//            TFileName noteMsg;
-//            noteMsg.Format(KMessage, &targetEntryShort);
-//
-//            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-//            }
-//        else
-//            {
-//            TRAPD(err,
-//                RFile inputFile;
-//                User::LeaveIfError(inputFile.Open(iFs, sourceEntry, EFileStream | EFileRead | EFileShareAny));
-//                CleanupClosePushL(inputFile);
-//
-//                CEZFileToGZip* gZip = CEZFileToGZip::NewLC(iFs, targetEntry, inputFile);
-//
-//                while (gZip->DeflateL())
-//                    ;
-//
-//                CleanupStack::PopAndDestroy(2); //inputFile, gZip
-//                );
-//
-//             if (err == KErrNone)
-//                {
-//                _LIT(KMessage, "%S created succesfully");
-//                TFileName noteMsg;
-//                noteMsg.Format(KMessage, &targetEntryShort);
-//
-//                iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
-//                }
-//             else
-//                {
-//                _LIT(KMessage, "Unable to create %S");
-//                TFileName noteMsg;
-//                noteMsg.Format(KMessage, &targetEntryShort);
-//
-//                iEngine->FileBrowserUI()->ShowErrorNote(noteMsg);
-//                }
-//
-//            RefreshViewL();
-//            }
-//        }
-//
-//    CleanupStack::PopAndDestroy(); //entries
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::DecompressL()
-    {
-//    CFileEntryList* entries = new(ELeave) CFileEntryList(16);
-//    GetSelectedItemsOrCurrentItemL(entries);
-//    CleanupStack::PushL(entries);
-//
-//    for (TInt i=0; i<entries->Count(); i++)
-//        {
-//        TFileEntry fileEntry = entries->At(i);
-//
-//        TFileName sourceEntry = fileEntry.iPath;
-//        sourceEntry.Append(fileEntry.iEntry.iName);
-//
-//        TFileName targetEntry;
-//        TFileName targetEntryShort;
-//
-//        TInt sourceNameLen = fileEntry.iEntry.iName.Length();
-//        TInt gZipExtLen = KGZipExt().Length();
-//
-//        if (sourceNameLen > gZipExtLen && sourceEntry.Right(gZipExtLen).CompareF(KGZipExt) == 0)
-//            {
-//            targetEntry = sourceEntry.Left(sourceEntry.Length() - gZipExtLen);
-//            targetEntryShort = fileEntry.iEntry.iName.Left(sourceNameLen - gZipExtLen);
-//
-//            if (BaflUtils::FileExists(iFs, targetEntry))
-//                {
-//                _LIT(KMessage, "%S already exists");
-//                TFileName noteMsg;
-//                noteMsg.Format(KMessage, &targetEntryShort);
-//
-//                iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-//                }
-//            else
-//                {
-//                TRAPD(err,
-//                    RFile outputFile;
-//                    User::LeaveIfError(outputFile.Create(iFs, targetEntry, EFileStream | EFileWrite | EFileShareExclusive));
-//                    CleanupClosePushL(outputFile);
-//
-//                    CEZGZipToFile* gZip = CEZGZipToFile::NewLC(iFs, sourceEntry, outputFile);
-//
-//                    while (gZip->InflateL())
-//                        ;
-//
-//                    CleanupStack::PopAndDestroy(2); //outputFile, gZip
-//                    );
-//
-//                 if (err == KErrNone)
-//                    {
-//                    _LIT(KMessage, "%S decompressed succesfully");
-//                    TFileName noteMsg;
-//                    noteMsg.Format(KMessage, &fileEntry.iEntry.iName);
-//
-//                    iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
-//                    }
-//                 else
-//                    {
-//                    _LIT(KMessage, "Unable to decompress %S");
-//                    TFileName noteMsg;
-//                    noteMsg.Format(KMessage, &fileEntry.iEntry.iName);
-//
-//                    iEngine->FileBrowserUI()->ShowErrorNote(noteMsg);
-//                    }
-//
-//                RefreshViewL();
-//                }
-//            }
-//        else
-//            {
-//            _LIT(KMessage, "%S does not have %S extension");
-//            TFileName noteMsg;
-//            noteMsg.Format(KMessage, &fileEntry.iEntry.iName, &KGZipExt);
-//
-//            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-//            }
-//        }
-//
-//    CleanupStack::PopAndDestroy(); //entries
-    }
-
-// --------------------------------------------------------------------------------------------
-
-bool CFileBrowserFileUtils::PropertiesL(TInt aCurrentItemIndex, CDesCArray* entryLines, TFileName &titleText)
-    {
-
-    TBool showDialog(EFalse);
-    
-    _LIT(KPropertiesEntryStr,       "%S\t%S");
-    _LIT(KPropertiesEntryInt,       "%S\t%d");
-    _LIT(KPropertiesEntryUintHex,   "%S\t0x%x");
-    
-    _LIT(KDateFormat,               "%D%M%Y%/0%1%/1%2%/2%3%/3");
-    _LIT(KTimeFormat,               "%-B%:0%J%:1%T%:2%S%:3%+B");
-    
-    _LIT(KMediaType,                "Media");
-    _LIT(KAttributes,               "Atts");
-    _LIT(KVolumeName,               "Name");
-    _LIT(KUniqueID,                 "ID");
-    _LIT(KNumberOfEntries,          "Entries");
-    _LIT(KNumberOfFiles,            "Files");
-    _LIT(KUsed,                     "Used (B)");
-    _LIT(KFree,                     "Free (B)");
-    _LIT(KSize,                     "Size (B)");
-    _LIT(KPath,                     "Path");
-    _LIT(KDate,                     "Date");
-    _LIT(KTime,                     "Time");
-    _LIT(KMimeType,                 "Mime");
-    _LIT(KOpensWith,                "Opens");
- 
-
-    // create an array for the items
-//    CDesCArray* entryLines = new(ELeave) CDesCArrayFlat(16);
-//    CleanupStack::PushL(entryLines);
-//    TFileName titleText;
-    
-    // just get current item
-//    TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
-    
-    if (IsDriveListViewActive() && iDriveEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
-        {
-        // it is a drive entry
-        TDriveEntry driveEntry = iDriveEntryList->At(aCurrentItemIndex);
-        TFileName textEntry;
-        
-        // set title
-        titleText.Append(driveEntry.iLetter);
-        titleText.Append(_L(":"));
-        
-        // media type
-        textEntry.Format(KPropertiesEntryStr, &KMediaType, &driveEntry.iMediaTypeDesc);
-        entryLines->AppendL(textEntry);
-
-        // attributes
-        textEntry.Format(KPropertiesEntryStr, &KAttributes, &driveEntry.iAttributesDesc);
-        entryLines->AppendL(textEntry);
-
-        // volume name
-        if (driveEntry.iVolumeInfo.iName.Length())
-            {
-            textEntry.Format(KPropertiesEntryStr, &KVolumeName, &driveEntry.iVolumeInfo.iName);
-            entryLines->AppendL(textEntry);
-            }
-
-        // unique id
-        textEntry.Format(KPropertiesEntryUintHex, &KUniqueID, driveEntry.iVolumeInfo.iUniqueID);
-        entryLines->AppendL(textEntry);
-        
-        // number of files
-        if (iEngine->Settings().iShowSubDirectoryInfo)
-            {
-            iFindFileEntryList->Reset();
-            
-            TBuf<10> driveRoot;
-            driveRoot.Append(driveEntry.iLetter);
-            driveRoot.Append(_L(":\\"));
-
-            DoFindFiles(_L("*"), driveRoot);
-            DoFindFilesRecursiveL(_L("*"), driveRoot);
-            
-            textEntry.Format(KPropertiesEntryInt, &KNumberOfFiles, iFindFileEntryList->Count());
-            entryLines->AppendL(textEntry);
-            
-            iFindFileEntryList->Reset();
-            }
-      
-        // used
-        TBuf<32> usedBuf;
-        usedBuf.AppendNum(driveEntry.iVolumeInfo.iSize-driveEntry.iVolumeInfo.iFree, TRealFormat(KDefaultRealWidth, 0));
-        textEntry.Format(KPropertiesEntryStr, &KUsed, &usedBuf);
-        entryLines->AppendL(textEntry);        
-
-        // free
-        TBuf<32> freeBuf;
-        freeBuf.AppendNum(driveEntry.iVolumeInfo.iFree, TRealFormat(KDefaultRealWidth, 0));
-        textEntry.Format(KPropertiesEntryStr, &KFree, &freeBuf);
-        entryLines->AppendL(textEntry);
-                
-        // size
-        TBuf<32> sizeBuf;
-        sizeBuf.AppendNum(driveEntry.iVolumeInfo.iSize, TRealFormat(KDefaultRealWidth, 0));
-        textEntry.Format(KPropertiesEntryStr, &KSize, &sizeBuf);
-        entryLines->AppendL(textEntry);   
-
-        showDialog = ETrue;
-        }
-    
-    else if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
-        {
-        // it is a file or a directory entry
-        TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
-        TFileName textEntry;
-        
-        // set title
-        titleText.Append(fileEntry.iEntry.iName);
-        
-        // path
-        textEntry.Format(KPropertiesEntryStr, &KPath, &fileEntry.iPath);
-        entryLines->AppendL(textEntry);
-
-        // date
-        TTime entryModified = fileEntry.iEntry.iModified;
-        
-        // convert from universal time
-        if ( iTz.ConvertToLocalTime( entryModified ) == KErrNone )
-            {
-            entryModified = fileEntry.iEntry.iModified; // use universal time
-            }
-        
-        TBuf<32> dateBuf;
-        entryModified.FormatL(dateBuf, KDateFormat);
-        textEntry.Format(KPropertiesEntryStr, &KDate, &dateBuf);
-        entryLines->AppendL(textEntry);
-
-        // time
-        TBuf<32> timeBuf;
-        entryModified.FormatL(timeBuf, KTimeFormat);
-        textEntry.Format(KPropertiesEntryStr, &KTime, &timeBuf);
-        entryLines->AppendL(textEntry);
-
-        if (!fileEntry.iEntry.IsDir())
-            {
-            // size
-            TBuf<32> sizeBuf;
-            sizeBuf.AppendNum(fileEntry.iEntry.iSize, TRealFormat(KDefaultRealWidth, 0));
-            textEntry.Format(KPropertiesEntryStr, &KSize, &sizeBuf);
-            entryLines->AppendL(textEntry);            
-            }
-        else if (fileEntry.iEntry.IsDir() && iEngine->Settings().iShowSubDirectoryInfo)
-            {
-            iFindFileEntryList->Reset();
-            
-            TFileName fullPath;
-            fullPath.Append(fileEntry.iPath);
-            fullPath.Append(fileEntry.iEntry.iName);
-            fullPath.Append(_L("\\"));
-            
-            // number of entries
-            CDir* subDir = NULL;
-            if (iFs.GetDir(fullPath, KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
-                {
-                CleanupStack::PushL(subDir);
-                textEntry.Format(KPropertiesEntryInt, &KNumberOfEntries, subDir->Count());
-                entryLines->AppendL(textEntry);
-                CleanupStack::PopAndDestroy(); //subDir 
-                }
-            
-            // number of files
-            DoFindFiles(_L("*"), fullPath);
-            DoFindFilesRecursiveL(_L("*"), fullPath);
-            textEntry.Format(KPropertiesEntryInt, &KNumberOfFiles, iFindFileEntryList->Count());
-            entryLines->AppendL(textEntry);
-            
-            // size
-            TInt64 size(0);
-            for (TInt i=0; i<iFindFileEntryList->Count(); i++)
-                {
-                TFileEntry fileEntry = iFindFileEntryList->At(i);
-                size += fileEntry.iEntry.iSize;
-                }
-            
-            TBuf<32> sizeBuf;
-            sizeBuf.AppendNum(size, TRealFormat(KDefaultRealWidth, 0));
-            textEntry.Format(KPropertiesEntryStr, &KSize, &sizeBuf);
-            entryLines->AppendL(textEntry); 
-            
-            iFindFileEntryList->Reset();            
-            }
-        
-        // attributes
-        TBuf<32> attBuf;
-        if (fileEntry.iEntry.IsArchive())
-            attBuf.Append(_L("Arc "));
-        if (fileEntry.iEntry.IsHidden())
-            attBuf.Append(_L("Hid "));
-        if (fileEntry.iEntry.IsReadOnly())
-            attBuf.Append(_L("R/O "));
-        if (fileEntry.iEntry.IsSystem())
-            attBuf.Append(_L("Sys"));
-        textEntry.Format(KPropertiesEntryStr, &KAttributes, &attBuf);
-        entryLines->AppendL(textEntry);            
-
-        if (!fileEntry.iEntry.IsDir())
-            {
-            // mime type
-            TFileName fullPath = fileEntry.iPath;
-            fullPath.Append(fileEntry.iEntry.iName);
-            TDataType dataType;
-            TUid appUid;
-            if (iEngine->LsSession().AppForDocument(fullPath, appUid, dataType) == KErrNone)
-                {
-                TBuf<128> mimeTypeBuf;
-                mimeTypeBuf.Copy(dataType.Des8());
-                if (mimeTypeBuf == KNullDesC)
-                    mimeTypeBuf.Copy(_L("N/A"));
-                textEntry.Format(KPropertiesEntryStr, &KMimeType, &mimeTypeBuf);
-                entryLines->AppendL(textEntry); 
-                }
-
-            // opens with
-            TApaAppInfo appInfo;
-            if (iEngine->LsSession().GetAppInfo(appInfo, appUid) == KErrNone)
-                {
-                TFileName opensWithBuf;
-                _LIT(KOpensWithFormat, "%S (0x%08X)");
-                opensWithBuf.Format(KOpensWithFormat, &appInfo.iCaption, appInfo.iUid);
-                textEntry.Format(KPropertiesEntryStr, &KOpensWith, &opensWithBuf);
-                entryLines->AppendL(textEntry); 
-                }
-            }
-        
-        showDialog = ETrue;
-        }   
-    return showDialog;
-
-//    if (showDialog)
-//        {
-//        CAknSingleHeadingPopupMenuStyleListBox* listBox = new(ELeave) CAknSingleHeadingPopupMenuStyleListBox;
-//        CleanupStack::PushL(listBox);
-//
-//        CAknPopupList* popupList = CAknPopupList::NewL(listBox, R_AVKON_SOFTKEYS_OK_EMPTY, AknPopupLayouts::EMenuDoubleWindow);
-//        CleanupStack::PushL(popupList);
-//
-//        listBox->ConstructL(popupList, CEikListBox::ELeftDownInViewRect);
-//        listBox->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
-//        listBox->CreateScrollBarFrameL(ETrue);
-//        listBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
-//        listBox->Model()->SetItemTextArray(entryLines);
-//        listBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
-//        listBox->HandleItemAdditionL();
-//
-//        popupList->SetTitleL(titleText);
-//        popupList->ExecuteLD();
-//
-//        CleanupStack::Pop(); // popupList
-//        CleanupStack::PopAndDestroy(); // listBox
-//        }
-//
-//        CleanupStack::PopAndDestroy(); //entryLines
-	}
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::OpenWithApparcL(TFileName aFileName)
-    {
-       
-        TFileName fullPath = aFileName;
-        TInt err1(KErrNone), err2(KErrNone);
-        TUid appUid;
-        TDataType dataType;
-        TBool isProgram;
-        
-	
-        err1 = iEngine->LsSession().AppForDocument(fullPath, appUid, dataType);
-        err2 = iEngine->LsSession().IsProgram(fullPath, isProgram);
-        
-        if (err1 == KErrNone && err2 == KErrNone)
-            {
-            if (appUid != KNullUid)
-                {
-                // found an app, run using it
-                TApaTaskList taskList(CEikonEnv::Static()->WsSession());
-                TApaTask task = (taskList.FindApp(appUid));
-                if (task.Exists())
-                    {
-                    User::LeaveIfError(task.SwitchOpenFile(fullPath));
-                    task.BringToForeground();
-                    }
-                else
-                    {
-                    TThreadId id;
-                    iEngine->LsSession().StartDocument(fullPath, appUid, id, RApaLsSession::ESwitchFiles);
-                    }
-                }
-            else if (isProgram)
-                {
-                LaunchProgramL(fullPath);
-                }            
-            }
-        //}   
-    }
-	
-// --------------------------------------------------------------------------------------------
-
-//void CFileBrowserFileUtils::HandleServerAppExit(TInt aReason)
-//	{
-//	if (iOpenFileService)
-//		{
-//		delete iOpenFileService;
-//		iOpenFileService = NULL;
-//		}
-//	MAknServerAppExitObserver::HandleServerAppExit(aReason);
-//	}
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::OpenWithDocHandlerL(TFileName aFileName, TBool aEmbed)
-    {
-        TFileName fullPath = aFileName;
-        RFile sharableFile;
-        iDocHandler->OpenTempFileL(fullPath, sharableFile);
-        CleanupClosePushL(sharableFile);
-        TDataType dataType;
-        if (aEmbed) 
-            {
-    	    iDocHandler->OpenFileEmbeddedL(sharableFile, dataType);
-            }
-        else
-            {
-    	    iDocHandler->OpenFileL(sharableFile, dataType);
-            }
-        CleanupStack::PopAndDestroy();  //sharableFile
-    //    }   
-    }
-
-	// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::OpenWithFileServiceL(TInt aCurrentItemIndex)
-    {
-    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
-        {
-        TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
-        
-        TFileName fullPath = fileEntry.iPath;
-        fullPath.Append(fileEntry.iEntry.iName);
-
-    	TBool itemSelected(EFalse);
-        RFile sharableFile;
-//        TUid appUidExtracted;
-        
-        TRAPD(err,
-           
-        	// use doc handler to get a sharable file handle
-            iDocHandler->OpenTempFileL(fullPath, sharableFile);
-            CleanupClosePushL(sharableFile);
-            
-            // find the data type
-            TDataRecognitionResult dataType;
-        	User::LeaveIfError(iEngine->LsSession().RecognizeData(sharableFile, dataType));
-
-        	// get all apps that support OpenFileService for this datatype
-        	CApaAppServiceInfoArray* apps = iEngine->LsSession().GetServiceImplementationsLC(KOpenServiceUid, dataType.iDataType);
-        	TArray<TApaAppServiceInfo> appServiceInfos = apps->Array();
-    	
-        	if (appServiceInfos.Count() > 0)
-        		{
-        		// build an array of the app names
-        		CDesCArray* names = new (ELeave) CDesCArrayFlat(16);
-        		CleanupStack::PushL(names);
-        		for (TInt ii=0; ii<appServiceInfos.Count(); ii++)
-        			{
-        			TUid appUid = appServiceInfos[ii].Uid();
-        			TApaAppInfo appInfo;
-        			if (iEngine->LsSession().GetAppInfo(appInfo, appUid) == KErrNone)
-        				{
-        				names->AppendL(appInfo.iCaption);
-        				}
-        			else
-        				{
-        				TBuf<10> buf;
-        				buf.Format(_L("0x%08x"), appUid);
-        				names->AppendL(buf);
-        				}
-        			}
-    		
-        		// use a list query to select the app
-//        		TInt index(0);
-//        		CAknListQueryDialog* dlg = new(ELeave) CAknListQueryDialog(&index);
-//        		dlg->PrepareLC(R_APP_SELECTION_QUERY);
-//        		dlg->SetItemTextArray(names);
-//        		dlg->SetOwnershipType(ELbmDoesNotOwnItemArray);
-//
-//        		if(dlg->RunLD())
-//        			{
-//        			// extract the chosen UID
-//        			appUidExtracted = appServiceInfos[index].Uid();
-//        			itemSelected = ETrue;
-//        			}
-    		
-        		CleanupStack::PopAndDestroy(); // names
-        		}
-
-            if (itemSelected)
-                {
-                // start OpenFileService for the selected app
-                CAiwGenericParamList& paramList = iDocHandler->InParamListL();
-                
-//                if (iOpenFileService)
-//                    {
-//                    delete iOpenFileService;
-//                    iOpenFileService = NULL;
-//                    }
-
-//                iOpenFileService = CAknOpenFileService::NewL(appUidExtracted, sharableFile, this, &paramList);
-                }
-
-            CleanupStack::PopAndDestroy(2); // sharableFile, apps
-
-            ); // TRAPD
-
-        if (err != KErrNone)
-            {
-            _LIT(KMessage, "No file service available for %S");
-            TFileName noteMsg;
-            noteMsg.Format(KMessage, &fileEntry.iEntry.iName);
-            
-            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-            }
-        }   
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CFileBrowserFileUtils::FileExists(const TDesC& aPath)
-    {
-    return BaflUtils::FileExists(iFs, aPath);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::LaunchProgramL(const TDesC& aPath)
-    {
-    CApaCommandLine* commandLine = CApaCommandLine::NewLC();
-    commandLine->SetExecutableNameL(aPath);
-    commandLine->SetCommandL(EApaCommandRun);
-    TInt err = iEngine->LsSession().StartApp(*commandLine);
-    CleanupStack::PopAndDestroy(); //commandLine
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::MemoryInfoPopupL()
-    {
-    _LIT(KUsedBytesEntry, "Used: %S bytes\n");
-    _LIT(KFreeBytesEntry, "Free: %S bytes\n");
-    _LIT(KSizeBytesEntry, "Size: %S bytes\n");
-        
-    HBufC* messageBuf = HBufC::NewLC(2048);
-    TPtr messagePtr = messageBuf->Des();
-    TBuf<128> entryLine;
-
-    // RAM
-    TMemoryInfoV1Buf ramMemory;
-    UserHal::MemoryInfo(ramMemory);
-    messagePtr.Append(_L("RAM\n"));
-
-    // used
-    TBuf<32> usedBuf;
-    usedBuf.AppendNum(ramMemory().iMaxFreeRamInBytes-ramMemory().iFreeRamInBytes, TRealFormat(KDefaultRealWidth, 0));
-    entryLine.Format(KUsedBytesEntry, &usedBuf);
-    messagePtr.Append(entryLine);        
-
-    // free
-    TBuf<32> freeBuf;
-    freeBuf.AppendNum(ramMemory().iFreeRamInBytes, TRealFormat(KDefaultRealWidth, 0));
-    entryLine.Format(KFreeBytesEntry, &freeBuf);
-    messagePtr.Append(entryLine);
-            
-    // size
-    TBuf<32> sizeBuf;
-    sizeBuf.AppendNum(ramMemory().iMaxFreeRamInBytes, TRealFormat(KDefaultRealWidth, 0));
-    entryLine.Format(KSizeBytesEntry, &sizeBuf);
-    messagePtr.Append(entryLine); 
-    
-    // All drives
-    for (TInt i=0; i<iDriveEntryList->Count(); i++)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(i);
-
-        messagePtr.Append(_L("\n"));
-        messagePtr.Append(driveEntry.iLetter);
-        messagePtr.Append(_L(":\n"));
-
-        // used
-        TBuf<32> usedBuf;
-        usedBuf.AppendNum(driveEntry.iVolumeInfo.iSize-driveEntry.iVolumeInfo.iFree, TRealFormat(KDefaultRealWidth, 0));
-        entryLine.Format(KUsedBytesEntry, &usedBuf);
-        messagePtr.Append(entryLine);        
-
-        // free
-        TBuf<32> freeBuf;
-        freeBuf.AppendNum(driveEntry.iVolumeInfo.iFree, TRealFormat(KDefaultRealWidth, 0));
-        entryLine.Format(KFreeBytesEntry, &freeBuf);
-        messagePtr.Append(entryLine);
-                
-        // size
-        TBuf<32> sizeBuf;
-        sizeBuf.AppendNum(driveEntry.iVolumeInfo.iSize, TRealFormat(KDefaultRealWidth, 0));
-        entryLine.Format(KSizeBytesEntry, &sizeBuf);
-        messagePtr.Append(entryLine); 
-        }
-
-//    CAknMessageQueryDialog* dialog = new(ELeave) CAknMessageQueryDialog;
-//    dialog->PrepareLC(R_MEMORYINFO_DIALOG);
-//    dialog->SetMessageTextL(messagePtr);
-//    dialog->RunLD();
-    
-    CleanupStack::PopAndDestroy(); //messageBuf
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ShowFileCheckSumsL(TInt aCurrentItemIndex, TInt aType)
-    {
-    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
-        {
-        TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
-        TFileName fullPath = fileEntry.iPath;
-        fullPath.Append(fileEntry.iEntry.iName);
-        
-        // try to open the file for reading
-        RFile fileP;
-        TInt err = fileP.Open(iEngine->EikonEnv()->FsSession(), fullPath, EFileRead|EFileShareReadersOnly);
-        
-        if (err == KErrNone)
-            {
-            CleanupClosePushL(fileP);
-
-            TBuf<128> checkSum;
-            HBufC* messageBuf = HBufC::NewLC(2048);
-            TPtr messagePtr = messageBuf->Des();
-            
-            // get MD5 checksum
-            if (aType == EFileChecksumsMD5)
-                {
-                CMD5* md5 = CMD5::NewL();
-                CleanupStack::PushL(md5);
-                HBufC8* md5Buf = MessageDigestInHexLC(md5, fileP);
-                checkSum.Copy(*md5Buf);
-                messagePtr.Append(_L("MD5\n"));
-                messagePtr.Append(checkSum);
-                CleanupStack::PopAndDestroy(2); // md5, md5Buf
-                }
-
-            // get MD2 checksum
-            else if (aType == EFileChecksumsMD2)
-                {                
-                CMD2* md2 = CMD2::NewL();
-                CleanupStack::PushL(md2);
-                HBufC8* md2Buf = MessageDigestInHexLC(md2, fileP);
-                checkSum.Copy(*md2Buf);
-                messagePtr.Append(_L("MD2\n"));
-                messagePtr.Append(checkSum);
-                CleanupStack::PopAndDestroy(2); // md2, md2Buf
-                }
-
-            // get SHA-1 checksum
-            else if (aType == EFileChecksumsSHA1)
-                {
-                CSHA1* sha1 = CSHA1::NewL();
-                CleanupStack::PushL(sha1);
-                HBufC8* sha1Buf = MessageDigestInHexLC(sha1, fileP);
-                checkSum.Copy(*sha1Buf);
-                messagePtr.Append(_L("SHA-1\n"));
-                messagePtr.Append(checkSum);
-                CleanupStack::PopAndDestroy(2); // sha1, sha1Buf
-                }
-            
-            else
-                {
-                User::Panic(_L("Inv.CS.Type"), 723);
-                }
-                            
-            // show dialog
-            iEngine->FileBrowserUI()->ShowInformationNote(messagePtr, fileEntry.iEntry.iName);
-
-            CleanupStack::PopAndDestroy(2); // messageBuf, fileP
-            }
-        else
-            {
-            // open failed, show an error note
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-HBufC8* CFileBrowserFileUtils::MessageDigestInHexLC(CMessageDigest* aMD, RFile& aFile)
-    {
-    // seek to file start
-    TInt startPos(0);
-    aFile.Seek(ESeekStart, startPos);
-
-    // create result buffer
-    HBufC8* result = HBufC8::NewLC(128);
-
-    const TInt KBufSize(1024);
-    TInt fileSize(0);
-    TInt fileOffset(0);
-
-    // get file size
-    aFile.Size(fileSize);
-
-    HBufC8* buf = HBufC8::NewMaxLC(KBufSize);
-    TPtr8 bufPtr(buf->Des());
-
-    // read to buffer
-    while (fileOffset < fileSize - KBufSize)
-        {
-        aFile.Read(bufPtr, KBufSize);
-        aMD->Hash(bufPtr);
-        fileOffset += bufPtr.Length();
-        }
-
-    aFile.Read(bufPtr, fileSize - fileOffset);
-    bufPtr.SetLength(fileSize - fileOffset);
-    
-    // get final message digest
-    TPtrC8 hashedSig(aMD->Final(bufPtr));
-    
-    // change size of the result buffer
-    result->ReAllocL(hashedSig.Length() * 2);
-    TPtr8 resultPtr = result->Des();
-
-    // convert to hex format
-    for (TInt i=0; i<hashedSig.Length(); i++)
-        {
-        resultPtr.AppendFormat(_L8("%+02x"), hashedSig[i]);
-        }
-                    
-    CleanupStack::PopAndDestroy(); // buf
-    
-    return result;
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetErrRdL(TBool aEnable)
-    {
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        TInt err(KErrNone);
-        
-        if (aEnable)
-            {
-            // make sure that the directory exists
-            iFileOps->MkDirAll(KErrRdPath);        
-
-            // create the file
-            err = iFileOps->CreateEmptyFile(KErrRdPath);
-            }
-        else    
-            {
-            // get TEntry of ErrRd
-            TEntry entry;
-            err = iFs.Entry(KErrRdPath, entry);
-            
-            if (err == KErrNone)
-                {
-                TFileEntry fileEntry;
-                fileEntry.iPath = KErrRdDir;
-                fileEntry.iEntry = entry;
-                
-                err = iFileOps->Delete(fileEntry);                
-                }
-            }        
-
-        // update view
-        RefreshViewL(); 
-    
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("State changed"));
-            }
-        else    
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Cannot change the state"));
-            }        
-        }
-    else
-        {
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
-        }
-    #else
-        aEnable = aEnable;
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in lite version"), _L(""));
-    #endif
-    }
-
-// --------------------------------------------------------------------------------------------
-
-//void CFileBrowserFileUtils::EnableAvkonIconCacheL(TBool aEnable)
-//    {
-//#ifndef __SERIES60_30__
-//    if (AknIconConfig::EnableAknIconSrvCache(aEnable) == KErrNone)
-//        {
-//        iEngine->FileBrowserUI()->ShowConfirmationNote(_L("State changed"));
-//        }
-//    else
-//        {
-//        iEngine->FileBrowserUI()->ShowErrorNote(_L("Unknown error occured"));
-//        }
-// #else
-//    aEnable = aEnable;
-//    iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in S60 3.0"), _L(""));
-// #endif
-// 
-//    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SimulateLeaveL(TInt aLeaveCode)
-    {
-    User::Leave(aLeaveCode);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SimulatePanicL(const TDesC& aPanicCategory, TInt aPanicCode)
-    {
-    User::Panic(aPanicCategory, aPanicCode);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SimulateExceptionL(TInt aExceptionCode)
-    {
-    User::RaiseException((TExcType)aExceptionCode);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TUint32 CFileBrowserFileUtils::GetDebugMask()
-    {
-    return UserSvr::DebugMask();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetDebugMaskL(TUint32 aDbgMask)
-    {
-    User::SetDebugMask(aDbgMask);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::WriteAllAppsL()
-    {
-    _LIT(KAllAppsFileName, "AllApps.txt");
-    TFileName allAppsPath = PathInfo::PhoneMemoryRootPath();
-    allAppsPath.Append(KAllAppsFileName);
-
-    RFile file;
-    if (file.Replace(iFs, allAppsPath, EFileWrite) == KErrNone)
-        {
-        CleanupClosePushL(file);
-        
-        CDesC8Array* appsArray = new(ELeave) CDesC8ArrayFlat(192);
-        CleanupStack::PushL(appsArray);
-        
-        TBuf8<KMaxFileName> fileEntry;
-        TBuf8<KMaxFileName> appFullPath;
-        _LIT8(KAppEntryFormat, "%S (0x%08X)%S");
-        TApaAppInfo appInfo;
-
-        iEngine->LsSession().GetAllApps();        
-
-        while (iEngine->LsSession().GetNextApp(appInfo) == KErrNone)
-            {
-            appFullPath.Copy(appInfo.iFullName);
-            fileEntry.Format(KAppEntryFormat, &appFullPath, appInfo.iUid, &KFileNewLine);
-            appsArray->AppendL(fileEntry);    
-            }
-        
-        appsArray->Sort();
-        
-        for (TInt i=0; i<appsArray->Count(); i++)
-            {
-            file.Write(appsArray->MdcaPoint(i));
-            }
-        
-        CleanupStack::PopAndDestroy(2); //appsArray, file
-        
-        _LIT(KMessage, "App list written to %S");
-        TFileName noteMsg;
-        noteMsg.Format(KMessage, &allAppsPath);
-
-        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg, ETrue); // NoTimeout
-        }
-    else
-        {
-        _LIT(KMessage, "Failed writing to %S");
-        TFileName noteMsg;
-        noteMsg.Format(KMessage, &allAppsPath);
-
-        iEngine->FileBrowserUI()->ShowErrorNote(noteMsg, ETrue); // NoTimeout
-        }    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::WriteAllFilesL()
-    {
-    _LIT(KAllFilesFileName, "AllFiles.txt");
-    TFileName allFilesPath = PathInfo::PhoneMemoryRootPath();
-    allFilesPath.Append(KAllFilesFileName);
-
-    RFile file;
-    if (file.Replace(iFs, allFilesPath, EFileWrite) == KErrNone)
-        {
-        CleanupClosePushL(file);
-        iFindFileEntryList->Reset();
-        
-        iEngine->FileBrowserUI()->ShowWaitDialog(_L("Generating"));
-        
-        for (TInt i=0; i<iDriveEntryList->Count(); i++)
-            {
-            TDriveEntry driveEntry = iDriveEntryList->At(i);
-
-            TBuf<10> driveRoot;
-            driveRoot.Append(driveEntry.iLetter);
-            driveRoot.Append(_L(":\\"));
-
-            // current dir
-            DoFindFiles(_L("*"), driveRoot);
-            
-            // recurse into sub directories
-            DoFindFilesRecursiveL(_L("*"), driveRoot);
-            }
-        
-        // write entries
-        TBuf8<KMaxFileName> writeBuf;
-        for (TInt i=0; i<iFindFileEntryList->Count(); i++)
-            {
-            TFileEntry fileEntry = iFindFileEntryList->At(i);
-            
-            writeBuf.Copy(fileEntry.iPath);
-            writeBuf.Append(fileEntry.iEntry.iName);
-            writeBuf.Append(_L(","));
-            writeBuf.AppendNum(fileEntry.iEntry.iSize);
-            writeBuf.Append(_L(" B"));
-
-//            // date
-//            TTime entryModified = fileEntry.iEntry.iModified;
-//            // convert from universal time
-//            if ( iTz.ConvertToLocalTime( entryModified ) == KErrNone )
-//                {
-//                entryModified = fileEntry.iEntry.iModified; // use universal time
-//                }
-//
-//            _LIT(KDateFormat,               "%D%M%Y%/0%1%/1%2%/2%3%/3");
-//            TBuf<32> dateBuf;
-//            entryModified.FormatL(dateBuf, KDateFormat);
-//            writeBuf.Append(dateBuf);
-//
-//            writeBuf.Append(_L(" "));
-//            // time
-//            _LIT(KTimeFormat, "%-B%:0%J%:1%T%:2%S%:3%+B");
-//            TBuf<32> timeBuf;
-//            entryModified.FormatL(timeBuf, KTimeFormat);
-//            writeBuf.Append(timeBuf);
-//
-            writeBuf.Append(KFileNewLine);
-            file.Write(writeBuf);
-            }
-        
-        iEngine->FileBrowserUI()->CancelWaitDialog();
-        
-        CleanupStack::PopAndDestroy(); //file
-        iFindFileEntryList->Reset();
-        
-        _LIT(KMessage, "File list written to %S");
-        TFileName noteMsg;
-        noteMsg.Format(KMessage, &allFilesPath);
-
-        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg, EFalse); // NoTimeout
-        }
-    else
-        {
-        _LIT(KMessage, "Failed writing to %S");
-        TFileName noteMsg;
-        noteMsg.Format(KMessage, &allFilesPath);
-
-        iEngine->FileBrowserUI()->ShowErrorNote(noteMsg, ETrue); // NoTimeout
-        }    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::DoFindFiles(const TDesC& aFileName, const TDesC& aPath)
-    {
-    TFindFile fileFinder(iFs);
-    CDir* dir;
-    TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir);
-
-    while (err == KErrNone && iAllowProcessing)
-        {
-        iEngine->FileBrowserUI()->ProcessEvents();
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TEntry entry = (*dir)[i];
-
-            // ignore any directory entries
-            if (!entry.IsDir() && entry.iName.Length() && aPath.Length())
-                {
-                TParse parsedName;
-                parsedName.Set(entry.iName, &fileFinder.File(), NULL);
-                
-                if (parsedName.Drive().Length() && aPath.Length() && parsedName.Drive()[0] == aPath[0])
-                    {
-                    TFileEntry fileEntry;
-                    fileEntry.iPath = parsedName.DriveAndPath();
-                    fileEntry.iEntry = entry;
-                    fileEntry.iDirEntries = KErrNotFound;
-                    fileEntry.iIconId = EFixedIconEmpty;
-                    
-                    TRAP(err, iFindFileEntryList->AppendL(fileEntry));             
-                    }
-                }
-            }
-
-        delete dir;
-        dir = NULL;
-        err = fileFinder.FindWild(dir);
-        }
-
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CFileBrowserFileUtils::DoFindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
-	{
-    TInt err(KErrNone);
-    CDirScan* scan = CDirScan::NewLC(iFs);
-    scan->SetScanDataL(aPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst);
-    CDir* dir = NULL;
-
-    for(;;)
-        {
-        TRAP(err, scan->NextL(dir));
-        if (!dir  || (err != KErrNone))
-            break;
-
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TEntry entry = (*dir)[i];
-            
-            if (entry.IsDir())
-                {
-                TFileName path(scan->FullPath());
-                
-                if (path.Length())
-                    {
-                    path.Append(entry.iName);
-                    path.Append(_L("\\"));
-                    DoFindFiles(aFileName, path);
-                    }
-                }
-            }
-        delete(dir);
-        }
-
-    CleanupStack::PopAndDestroy(scan);
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ListOpenFilesL()
-    {
-    iFileEntryList->Reset();
-
-    CFileList* dir = NULL;
-    TOpenFileScan fileScan(iFs);
-    fileScan.NextL(dir);
-    
-    while (dir)
-        {
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TEntry entry = (*dir)[i];
-            TFileName fullPath;
-
-            // TOpenFileScan does not return drive letters for the entries, so try to guess it
-            if (entry.iName.Length() > 2 && entry.iName[1] != ':')
-                {
-                for (TInt i=0; i<iDriveEntryList->Count(); i++)
-                    {
-                    TDriveEntry driveEntry = iDriveEntryList->At(i);
-                    
-                    TFileName guessPath;
-                    guessPath.Append(driveEntry.iLetter);
-                    guessPath.Append(_L(":"));
-                    guessPath.Append(entry.iName);
-                    
-                    // check if the file exists
-                    if (BaflUtils::FileExists(iFs, guessPath))
-                        {
-                        // if it's on read only drive, then take it or check if it's really in use
-                        TBool readOnlyDrive(ETrue);
-                        BaflUtils::DiskIsReadOnly(iFs, guessPath, readOnlyDrive);
-                        
-                        if (readOnlyDrive || iFs.SetEntry(guessPath, entry.iModified, NULL, NULL) == KErrInUse)
-                            {
-                            fullPath = guessPath;
-                            break;
-                            }
-                        }
-                    }
-                }
-            else
-                {
-                fullPath = entry.iName;   
-                }
-
-            TParse nameParser;
-            if (fullPath.Length() && nameParser.SetNoWild(fullPath, NULL, NULL) == KErrNone)
-                {
-                entry.iName = nameParser.NameAndExt();
-                
-                TFileEntry fileEntry;
-                fileEntry.iPath = nameParser.DriveAndPath();
-                fileEntry.iEntry = entry;
-                fileEntry.iDirEntries = KErrNotFound;
-                fileEntry.iIconId = EFixedIconEmpty;
-                
-                iFileEntryList->AppendL(fileEntry);                
-                }
-            }
-            
-        delete dir;
-        dir = NULL;
-        fileScan.NextL(dir);
-        }
-
-    TInt operations = iFileEntryList->Count();
-    
-    iListingMode = EOpenFiles;
-	// TODO
-    //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
-    RefreshViewL();            
-
-    _LIT(KMessage, "%d open files found");
-    TFileName noteMsg;
-    noteMsg.Format(KMessage, operations);
-
-    iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ListMessageAttachmentsL(TInt aType)
-    {
-    iFileEntryList->Reset();
-
-    CMsvSession* session = CMsvSession::OpenSyncL(*this);
-    CleanupStack::PushL(session);
-    
-    CMsvEntry* context = NULL;
-    
-    if (aType == EFileBrowserCmdToolsMsgAttachmentsInbox)
-        context = session->GetEntryL(KMsvGlobalInBoxIndexEntryId);
-    else if (aType == EFileBrowserCmdToolsMsgAttachmentsDrafts)
-        context = session->GetEntryL(KMsvDraftEntryId);
-    else if (aType == EFileBrowserCmdToolsMsgAttachmentsSentItems)
-        context = session->GetEntryL(KMsvSentEntryId);
-    else if (aType == EFileBrowserCmdToolsMsgAttachmentsOutbox)
-        context = session->GetEntryL(KMsvGlobalOutBoxIndexEntryId);
-    else
-        User::Panic(_L("MsgAtt.Mode"), 100);
-    
-    CleanupStack::PushL(context);
-    
-    CDesCArray* attPaths = new(ELeave) CDesCArrayFlat(128);
-    CleanupStack::PushL(attPaths);
-    
-    // read attachment paths
-    ReadAttachmentPathsRecursiveL(session, context, attPaths);
-    
-    // create file entries of the paths
-    for (TInt i=0; i<attPaths->MdcaCount(); i++)
-        {
-        TFileEntry fileEntry;
-        TEntry entry;
-        TParse nameParser;
-        
-        if (attPaths->MdcaPoint(i).Length() &&
-            nameParser.SetNoWild(attPaths->MdcaPoint(i), NULL, NULL) == KErrNone &&
-            iFs.Entry(attPaths->MdcaPoint(i), entry) == KErrNone)
-            {
-            TFileEntry fileEntry;
-            fileEntry.iPath = nameParser.DriveAndPath();
-            fileEntry.iEntry = entry;
-            fileEntry.iDirEntries = KErrNotFound;
-            fileEntry.iIconId = EFixedIconEmpty;
-
-            iFileEntryList->AppendL(fileEntry);                
-            }
-        }
-    
-    CleanupStack::PopAndDestroy(3); //session, context, attPaths
-            
-    TInt operations = iFileEntryList->Count();
-    
-    if (aType == EFileBrowserCmdToolsMsgAttachmentsInbox)
-        iListingMode = EMsgAttachmentsInbox;
-    else if (aType == EFileBrowserCmdToolsMsgAttachmentsDrafts)
-        iListingMode = EMsgAttachmentsDrafts;
-    else if (aType == EFileBrowserCmdToolsMsgAttachmentsSentItems)
-        iListingMode = EMsgAttachmentsSentItems;
-    else if (aType == EFileBrowserCmdToolsMsgAttachmentsOutbox)
-        iListingMode = EMsgAttachmentsOutbox;
-	
-    // TODO
-    //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
-    RefreshViewL();            
-
-    _LIT(KMessage, "%d files found");
-    TFileName noteMsg;
-    noteMsg.Format(KMessage, operations);
-
-    iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ReadAttachmentPathsRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, CDesCArray* aAttPaths)
-    {
-    CMsvEntrySelection* entrySelection = aContext->ChildrenL(); 
-    CleanupStack::PushL(entrySelection);
-    
-    for (TInt i=0; i<entrySelection->Count(); i++)
-        {
-        CMsvEntry* entry = aSession->GetEntryL((*entrySelection)[i]);
-        CleanupStack::PushL(entry);
-        
-        CMsvStore* store = NULL;
-        TRAPD(err, store = entry->ReadStoreL());
-        
-        if (err == KErrNone)
-            {
-            CleanupStack::PushL(store);
-
-            for (TInt j=0; j<store->AttachmentManagerL().AttachmentCount(); j++)
-                {
-                CMsvAttachment* attachment = store->AttachmentManagerL().GetAttachmentInfoL(j);
-                CleanupStack::PushL(attachment);
-                
-                aAttPaths->AppendL(attachment->FilePath());
-                
-                CleanupStack::PopAndDestroy(); //attachment
-                }
-            CleanupStack::PopAndDestroy(); // store
-            }
-
-        // recurse into children
-        if (entry->Count() > 0)
-            {
-            ReadAttachmentPathsRecursiveL(aSession, entry, aAttPaths);
-            }
-
-        CleanupStack::PopAndDestroy(); // entry
-        }      
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::WriteMsgStoreWalkL()
-    {
-    _LIT(KAllAppsFileName, "MsgStoreWalk.txt");
-    TFileName allAppsPath = PathInfo::PhoneMemoryRootPath();
-    allAppsPath.Append(KAllAppsFileName);
-
-    if (iMsgStoreWalkFile.Replace(iFs, allAppsPath, EFileWrite) == KErrNone)
-        {
-        CMsvSession* session = CMsvSession::OpenSyncL(*this);
-        CleanupStack::PushL(session);
-        
-        CMsvEntry* context = session->GetEntryL(KMsvRootIndexEntryId);
-        CleanupStack::PushL(context);
-        
-        iMsgStoreWalkFile.Write(_L8("id  service_id  related_id  type  mtm  date  size  error  biotype  mtmdata1  mtmdata2  mtmdata3  description  details\r\n\r\n"));
-        
-        // write details about the root entry
-        DoWriteMessageEntryInfoL(context, iMsgStoreWalkFile, 0);
-        
-        // get and write info recursively
-        TInt level(1);        
-        WriteMessageEntryInfoRecursiveL(session, context, iMsgStoreWalkFile, level);
-
-        CleanupStack::PopAndDestroy(2); //session, context
-        
-        iMsgStoreWalkFile.Flush();
-        iMsgStoreWalkFile.Close();
-        
-        _LIT(KMessage, "Msg. store walk written to %S");
-        TFileName noteMsg;
-        noteMsg.Format(KMessage, &allAppsPath);
-
-        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg, ETrue); // NoTimeout
-        }
-    else
-        {
-        _LIT(KMessage, "Failed writing to %S");
-        TFileName noteMsg;
-        noteMsg.Format(KMessage, &allAppsPath);
-
-        iEngine->FileBrowserUI()->ShowErrorNote(noteMsg, ETrue); // NoTimeout
-        }    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::WriteMessageEntryInfoRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, RFile& aFile, TInt& aLevel)
-    {
-    CMsvEntrySelection* entrySelection = aContext->ChildrenL(); 
-    CleanupStack::PushL(entrySelection);
-    
-    for (TInt i=0; i<entrySelection->Count(); i++)
-        {
-        CMsvEntry* entry = aSession->GetEntryL((*entrySelection)[i]);
-        CleanupStack::PushL(entry);
-        
-        DoWriteMessageEntryInfoL(entry, aFile, aLevel);
-
-        // recurse into children
-        if (entry->Count() > 0)
-            {
-            aLevel++;
-            WriteMessageEntryInfoRecursiveL(aSession, entry, aFile, aLevel);
-            aLevel--;
-            }
-
-        CleanupStack::PopAndDestroy(); // entry
-        }      
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::DoWriteMessageEntryInfoL(CMsvEntry* aContext, RFile& aFile, TInt aLevel)
-    {
-    TMsvEntry messageEntry = aContext->Entry();
-    
-    for (TInt j=0; j<aLevel; j++)
-        {
-        aFile.Write(_L8("     "));
-        }
-
-    TBuf8<256> desc;
-    desc.Copy(messageEntry.iDescription);
-
-    TBuf8<256> details;
-    details.Copy(messageEntry.iDetails);
-
-    _LIT8(KLine, "-> %d  %d  %d  %d  %d  %Ld  %d  %d  %d  %d  %d  %d  %S  %S\r\n");
-    TBuf8<1024> buf;
-    buf.Format(KLine, messageEntry.Id(), messageEntry.iServiceId, messageEntry.iRelatedId, messageEntry.iType.iUid,
-        messageEntry.iMtm.iUid, messageEntry.iDate.Int64(), messageEntry.iSize, messageEntry.iError, messageEntry.iBioType,
-        messageEntry.iMtmData1, messageEntry.iMtmData2, messageEntry.iMtmData3, &desc, &details);
-
-    aFile.Write(buf);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::FileEditorL(TInt aCurrentItemIndex, TInt /*aType*/)
-    {
-    // TODO
-    // just get current item 
-    //TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
-    
-    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
-        {
-        TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
-        
-        // only valid for files
-        if (!fileEntry.iEntry.IsDir())
-            {
-            TFileName fullPath = fileEntry.iPath;
-            fullPath.Append(fileEntry.iEntry.iName);
-
-//            iEngine->FileListContainer()->SetNaviPaneTextL(fileEntry.iEntry.iName);
-//
-//            TInt editorMode(0);
-//
-//            if (aType == EFileBrowserCmdFileViewText)
-//                editorMode = EFileEditorViewAsText;
-//            else if (aType == EFileBrowserCmdFileViewHex)
-//                editorMode = EFileEditorViewAsHex;
-//            else if (aType == EFileBrowserCmdFileEditText)
-//                editorMode = EFileEditorEditAsText;
-//            else if (aType == EFileBrowserCmdFileEditHex)
-//                editorMode = EFileEditorEditAsHex;
-//            else
-//                User::Panic(_L("Inv.Ed.Mode"), 843);
-//
-//            // launch dialog
-//            CFileBrowserFileEditorDlg* dlg = CFileBrowserFileEditorDlg::NewL(fullPath, editorMode);
-//            dlg->RunDlgLD();
-//
-//            iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
-//
-//            if (aType == EFileBrowserCmdFileEditText || aType == EFileBrowserCmdFileEditHex)
-//                {
-//                RefreshViewL();
-//                }
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CFileBrowserFileUtils::DriveSnapShotPossible()
-    {
-//    // TODO
-//    // check that E-drive is available
-//    TBool EDriveIsOK(EFalse);
-//
-//    for (TInt i=0; i<iDriveEntryList->Count(); i++)
-//        {
-//        TDriveEntry driveEntry = iDriveEntryList->At(i);
-//
-//        if (driveEntry.iNumber == EDriveE)
-//            {
-//            if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAbsent)
-//                EDriveIsOK = EFalse;
-//            else
-//                EDriveIsOK = ETrue;
-//            }
-//        }
-//
-//    if (!EDriveIsOK)
-//        return EFalse;
-//
-//    // get current item
-//    TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
-//
-//    if (iDriveEntryList->Count() > currentItemIndex && currentItemIndex >= 0)
-//        {
-//        TDriveEntry driveEntry = iDriveEntryList->At(currentItemIndex);
-//
-//        // drive snapshot not possible when E-drive is highlighted, since that's where we are copying
-//        if (driveEntry.iNumber == EDriveE)
-//            return EFalse;
-//        else
-//            return ETrue;
-//        }
-    return EFalse;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::DriveSnapShotL()
-    {
-//    if (iEngine->Settings().iBypassPlatformSecurity)
-//        {
-//        // get current item
-//        TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
-//
-//        if (iDriveEntryList->Count() > currentItemIndex && currentItemIndex >= 0)
-//            {
-//            TDriveEntry driveEntry = iDriveEntryList->At(currentItemIndex);
-//
-//            TChar sourceDriveLetter = driveEntry.iLetter;
-//            TChar targetDriveLetter = 'E';  // hardcoded drive letter, could be better if would be queried from the user
-//
-//            // append to the command array
-//            AppendToCommandArrayL(EFileBrowserFileOpCommandDriveSnapShot,
-//                                  new(ELeave)CCommandParamsDriveSnapShot(sourceDriveLetter, targetDriveLetter)
-//                                 );
-//
-//            // execute the operation
-//            StartExecutingCommandsL(_L("Copying"));
-//            }
-//        }
-//    else
-//        {
-//        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
-//        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetDrivePasswordL(TInt aIndex,
-                                              const TFileName &aOldPassword,
-                                              const TFileName &aNewPassword)
-    {    
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TMediaPassword oldPassword;
-        TMediaPassword newPassword;
-
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        ConvertCharsToPwd(aOldPassword, oldPassword);
-        ConvertCharsToPwd(aNewPassword, newPassword);
-
-        // set the password, does not actually lock the drive
-        TInt err = iFs.LockDrive(driveEntry.iNumber, oldPassword, newPassword, ETrue);
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Password set"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::UnlockDriveL(TInt aIndex, const TFileName &aOldPassword)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        TMediaPassword oldPassword;
-        ConvertCharsToPwd(aOldPassword, oldPassword);
-
-        // unlock the drive
-        TInt err = iFs.UnlockDrive(driveEntry.iNumber, oldPassword, ETrue) == KErrNone;
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Drive unlocked"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote( textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ClearDrivePasswordL(TInt aIndex, const TFileName &aOldPassword)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        TMediaPassword oldPassword;
-
-        ConvertCharsToPwd(aOldPassword, oldPassword);
-
-        // clear the password from the drive
-        TInt err = iFs.ClearPassword(driveEntry.iNumber, oldPassword);
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Password cleared"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::EraseDrivePasswordL(TInt aIndex)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-        
-        // erase the password from the drive
-        TInt err(KErrNone);
-        err = iFs.ErasePassword(driveEntry.iNumber);
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Password erased"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Cannot erase, you may have to format the drive first"));
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::FormatDriveL(TInt aIndex, TBool aQuickFormat)
-    {    
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        TInt err(KErrNone);
-        TInt formatCount(0);
-
-        TBuf<10> driveRoot;
-        driveRoot.Append(driveEntry.iLetter);
-        driveRoot.Append(_L(":"));
-
-        TUint formatMode(0);
-        if (aQuickFormat)
-            formatMode = ESpecialFormat|EQuickFormat;
-        else
-            formatMode = ESpecialFormat|EFullFormat;
-
-        // set as system application to prevent getting shut down events
-        iEngine->EikonEnv()->SetSystem(ETrue);
-
-        // first close any open applications
-        CBaBackupSessionWrapper* BSWrapper = CBaBackupSessionWrapper::NewL();
-        CleanupStack::PushL(BSWrapper);
-
-        TBackupOperationAttributes atts(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart);
-        BSWrapper->NotifyBackupOperationL(atts);
-
-        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-        BSWrapper->CloseAll( MBackupObserver::EReleaseLockNoAccess, waiter->iStatus );
-        waiter->StartAndWait();
-        CleanupStack::PopAndDestroy(); //waiter
-
-        // some delay to make sure all applications have been closed
-        User::After(1000000);
-
-        // format the drive
-        RFormat format;
-        err = format.Open(iFs, driveRoot, formatMode, formatCount);
-
-        // Forced format for locked card
-        if ( err == KErrLocked )
-            {
-            // Erase password and try again
-            err = iFs.ErasePassword( driveEntry.iNumber );
-            if ( !err )
-                {
-                err = format.Open(iFs, driveRoot, formatMode, formatCount);
-                }
-            }
-
-        if( err != KErrNone &&  err != KErrLocked )
-            {
-//            CAknQueryDialog* lockQuery = CAknQueryDialog::NewL();
-//            if ( lockQuery->ExecuteLD(R_GENERAL_CONFIRMATION_QUERY, _L("Memory card in use by other application. Proceed anyway?")))
-            // TODO Dialog should be opened in UI part
-            if (iEngine->FileBrowserUI()->ShowConfirmationQuery(_L("Memory card in use by other application. Proceed anyway?")))
-                {
-                // If format could not be started, someone is still keeping
-                // files open on media. Let's try to dismount file system, then
-                // remount with own extension embedded and try again.
-
-                TFullName fsName;
-                err = iFs.FileSystemName( fsName, driveEntry.iNumber );
-
-                if ( err == KErrNone && fsName.Length() > 0 )
-                    {
-                    // Prevent SysAp shutting down applications
-                    RProperty::Set(
-                        KPSUidCoreApplicationUIs,
-                        KCoreAppUIsMmcRemovedWithoutEject,
-                        ECoreAppUIsEjectCommandUsed );
-
-                    TRequestStatus stat;
-                    iFs.NotifyDismount( driveEntry.iNumber, stat, EFsDismountForceDismount );
-                    User::WaitForRequest( stat );
-
-                    // Unfortunately, at the moment we have to wait until clients have received
-                    // notification about card dismount. Otherwise at least causes problems with
-                    // theme selected from card. In future clients should use new notify-API.
-                    User::After( KForcedFormatTimeout );
-
-                    // Let's set priority higher than normally. This is done to decrease the chance
-                    // that someone reopens files on memory card after mandatory file system
-                    // remounting hence preventing formatting again.
-                    TThreadPriority priority( RThread().Priority() );
-                    RThread().SetPriority( EPriorityAbsoluteHigh );
-
-                    // Mount file system back...
-                    err = iFs.MountFileSystem( fsName, driveEntry.iNumber );
-                    err = format.Open(iFs, driveRoot, formatMode, formatCount);
-                    RThread().SetPriority( priority );
-                    }
-                }
-            }
-
-
-        if (err == KErrNone)
-            {
-            // needs to be implemented with active objects
-            // CAknProgressDialog* dlg = new(ELeave) CAknProgressDialog(formatCount, 1, 1, NULL);
-            // dlg->SetTone(CAknNoteDialog::ENoTone);
-            // dlg->ExecuteLD(R_FORMAT_PROGRESS_NOTE);
-
-            while (formatCount && err == KErrNone)
-                {
-                err = format.Next(formatCount);
-                }
-            }
-
-        format.Close();
-
-        // restart closed applications
-        TBackupOperationAttributes atts2(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
-        BSWrapper->NotifyBackupOperationL(atts2);
-        BSWrapper->RestartAll();
-        CleanupStack::PopAndDestroy(); //BSWrapper
-
-        // system status not needed anymore
-        iEngine->EikonEnv()->SetSystem(EFalse);
-
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Format succeeded"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::EraseMBRL(TInt aIndex)
-    {
-    // TODO
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {        
-        if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-            {
-            TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-            TInt err(KErrNone);
-
-            iEngine->FileBrowserUI()->ShowInformationNote(_L("Please wait, this may take 30 seconds"), _L(""));
-
-            // set as system application to prevent getting shut down events
-            iEngine->EikonEnv()->SetSystem(ETrue);
-
-            // first close any open applications
-            CBaBackupSessionWrapper* BSWrapper = CBaBackupSessionWrapper::NewL();
-            CleanupStack::PushL(BSWrapper);
-
-            TBackupOperationAttributes atts(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart);
-            BSWrapper->NotifyBackupOperationL(atts);
-
-            CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-            BSWrapper->CloseAll( MBackupObserver::EReleaseLockNoAccess, waiter->iStatus );
-            waiter->StartAndWait();
-            CleanupStack::PopAndDestroy(); //waiter
-
-            // some delay to make sure all applications have been closed
-            User::After(1000000);
-
-
-            // do the erase MBR operation
-            err = iFileOps->EraseMBR(driveEntry.iNumber);
-
-
-            // restart closed applications
-            TBackupOperationAttributes atts2(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
-            BSWrapper->NotifyBackupOperationL(atts2);
-            BSWrapper->RestartAll();
-            CleanupStack::PopAndDestroy(); //BSWrapper
-
-            // system status not needed anymore
-            iEngine->EikonEnv()->SetSystem(EFalse);
-
-
-            if (err == KErrNone)
-                {
-                iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Erase MBR succeeded"));
-                }
-            else if (err == KErrNotSupported)
-                {
-                iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-                }
-            else
-                {
-                CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-                iEngine->FileBrowserUI()->ShowErrorNote(
-                        textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-                CleanupStack::PopAndDestroy();  //textResolver
-                }
-
-            RefreshViewL();
-            }
-        }
-    else
-        {
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
-        }
-    #else
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in lite version"), _L(""));
-    #endif
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::PartitionDriveL(TInt aIndex, TBool aEraseMBR, TInt aAmountOfPartitions)
-    {
-    // TODO
-    #ifndef FILEBROWSER_LITE
-    if (iEngine->Settings().iBypassPlatformSecurity)
-        {
-        if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-            {
-            TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-            TInt err(KErrNone);
-
-            iEngine->FileBrowserUI()->ShowInformationNote(_L("Please wait, this may take 30 seconds"), _L(""));
-
-            // set as system application to prevent getting shut down events
-            iEngine->EikonEnv()->SetSystem(ETrue);
-
-            // first close any open applications
-            CBaBackupSessionWrapper* BSWrapper = CBaBackupSessionWrapper::NewL();
-            CleanupStack::PushL(BSWrapper);
-
-            TBackupOperationAttributes atts(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart);
-            BSWrapper->NotifyBackupOperationL(atts);
-
-            CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
-            BSWrapper->CloseAll( MBackupObserver::EReleaseLockNoAccess, waiter->iStatus );
-            waiter->StartAndWait();
-            CleanupStack::PopAndDestroy(); //waiter
-
-            // some delay to make sure all applications have been closed
-            User::After(1000000);
-
-            // do the erase operation
-            if (aEraseMBR)
-                {
-                err = iFileOps->EraseMBR(driveEntry.iNumber);
-
-                if (err != KErrNone)
-                    {
-                    iEngine->FileBrowserUI()->ShowErrorNote(_L("Erase MBR failed"));
-                    }
-
-                User::After(500000);
-                }
-
-
-            // do the partition operation
-            err = iFileOps->PartitionDrive(driveEntry.iNumber, aAmountOfPartitions);
-
-
-            // restart closed applications
-            TBackupOperationAttributes atts2(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
-            BSWrapper->NotifyBackupOperationL(atts2);
-            BSWrapper->RestartAll();
-            CleanupStack::PopAndDestroy(); //BSWrapper
-
-            // system status not needed anymore
-            iEngine->EikonEnv()->SetSystem(EFalse);
-
-
-            if (err == KErrNone)
-                {
-                iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Partition succeeded"));
-                }
-            else if (err == KErrNotSupported)
-                {
-                iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-                }
-            else
-                {
-                CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-                iEngine->FileBrowserUI()->ShowErrorNote(
-                        textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-                CleanupStack::PopAndDestroy();  //textResolver
-                }
-
-            RefreshViewL();
-            }
-        }
-    else
-        {
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
-        }
-    #else
-        iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in lite version"), _L(""));
-    #endif
-	}
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::CheckDiskL(TInt aIndex)
-    {    
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-        
-        TBuf<10> driveRoot;
-        driveRoot.Append(driveEntry.iLetter);
-        driveRoot.Append(_L(":"));
-        
-        // check disk
-        TInt err = iFs.CheckDisk(driveRoot);
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Integrity of the disk is ok"));
-            }
-        else if (err == KErrNotReady)
-            {
-            iEngine->FileBrowserUI()->ShowInformationNote(_L("Disk is empty"), _L(""));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Disk is corrupted"));
-            }        
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ScanDriveL(TInt aIndex)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        TBuf<10> driveRoot;
-        driveRoot.Append(driveEntry.iLetter);
-        driveRoot.Append(_L(":"));
-
-        // scan disk
-        TInt err = iFs.ScanDrive(driveRoot);
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Run succesfully"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::GetDriveName(TInt aIndex, TFileName &aDriveName)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        // get existing drive name
-        iFs.GetDriveName(driveEntry.iNumber, aDriveName);
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetDriveNameL(TInt aIndex, const TFileName &aDriveName)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        // set drive name
-        TInt err = iFs.SetDriveName(driveEntry.iNumber, aDriveName);
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Name changed"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::GetDriveVolumeLabel(TInt aIndex, TFileName &aVolumeLabel)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        // get existing volume label
-        aVolumeLabel.Copy(driveEntry.iVolumeInfo.iName);
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SetDriveVolumeLabelL(TInt aIndex, const TFileName &aVolumeLabel)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        // set volume label
-        TInt err = iFs.SetVolumeLabel(aVolumeLabel, driveEntry.iNumber);
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Volume label changed"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::EjectDriveL(TInt aIndex)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-        
-        TInt err(KErrNone);
-        
-        // get current filesystem name
-        TFileName fileSystemName;
-        err = iFs.FileSystemName(fileSystemName, driveEntry.iNumber);
-        
-        if (err == KErrNone)
-            {
-            // Prevent SysAp shutting down applications
-            RProperty::Set(
-                KPSUidCoreApplicationUIs,
-                KCoreAppUIsMmcRemovedWithoutEject,
-                ECoreAppUIsEjectCommandUsed );
-            
-            // dismount the file system
-            err = iFs.DismountFileSystem(fileSystemName, driveEntry.iNumber);
-            
-            if (err == KErrNone)
-                {
-                // remount the file system
-                err = iFs.MountFileSystem(fileSystemName, driveEntry.iNumber);
-                
-                if (err == KErrInUse)
-                    {
-                    // try to remount after a while if locked
-                    User::After(1000000);
-                    err = iFs.MountFileSystem(fileSystemName, driveEntry.iNumber);
-                    }                
-                }
-            }
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Ejected succesfully"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }              
-
-        RefreshViewL();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::DismountFileSystemL(TInt aIndex)
-    {
-    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
-        {
-        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
-
-        TInt err(KErrNone);
-
-        // get current filesystem name
-        TFileName fileSystemName;
-        err = iFs.FileSystemName(fileSystemName, driveEntry.iNumber);
-
-        if (err == KErrNone)
-            {
-            // Prevent SysAp shutting down applications
-            RProperty::Set(
-                KPSUidCoreApplicationUIs,
-                KCoreAppUIsMmcRemovedWithoutEject,
-                ECoreAppUIsEjectCommandUsed );
-
-            // dismount the file system
-            err = iFs.DismountFileSystem(fileSystemName, driveEntry.iNumber);
-            }
-
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Dismounted succesfully"));
-            }
-        else if (err == KErrNotSupported)
-            {
-            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }
-
-        RefreshViewL();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::ConvertCharsToPwd(const TDesC& aWord, TDes8& aConverted) const
-    {
-    aConverted.FillZ(aConverted.MaxLength());
-    aConverted.Zero();
-    
-    if (aWord.Length())
-        {
-        aConverted.Copy( (TUint8*)(&aWord[0]), aWord.Size() );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::EditDataTypesL()
-    {
-	// TODO
-	/*
-    iEngine->FileListContainer()->SetScreenLayoutL(EDisplayModeNormal);
-    iEngine->FileListContainer()->SetNaviPaneTextL(KNullDesC);
-    
-    CFileBrowserDataTypesDlg* dlg = CFileBrowserDataTypesDlg::NewL();
-    dlg->RunQueryLD();
-
-    iEngine->FileListContainer()->SetScreenLayoutL(iEngine->Settings().iDisplayMode);
-    iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);  
-	*/	
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::SecureBackupL(TInt aType)
-    {
-    TInt err(KErrNone);
-    TInt showStatus(EFalse);
-    
-    if (aType == EFileBrowserCmdToolsSecureBackupStartBackup || aType == EFileBrowserCmdToolsSecureBackupStartRestore)
-        {
-//        TInt queryIndexState(0);
-//        TInt queryIndexType(0);
-        
-//        CAknListQueryDialog* listQueryDlgState = new(ELeave) CAknListQueryDialog(&queryIndexState);
-//        if (listQueryDlgState->ExecuteLD(R_SECUREBACKUP_STATE_QUERY))
-//            {
-//
-//            CAknListQueryDialog* listQueryDlgType = new(ELeave) CAknListQueryDialog(&queryIndexType);
-//            if (listQueryDlgType->ExecuteLD(R_SECUREBACKUP_TYPE_QUERY))
-//                {
-//                conn::TBURPartType partType = conn::EBURNormal;
-//                conn::TBackupIncType backupIncType = conn::ENoBackup;
-//                
-//                if (aType == EFileBrowserCmdToolsSecureBackupStartBackup)
-//                    {
-//                    if (queryIndexState == ESecureBackupStateFull)
-//                        partType = conn::EBURBackupFull;
-//                    else if (queryIndexState == ESecureBackupStatePartial)
-//                        partType = conn::EBURBackupPartial;
-//                    }
-//                else if (aType == EFileBrowserCmdToolsSecureBackupStartRestore)
-//                    {
-//                    if (queryIndexState == ESecureBackupStateFull)
-//                        partType = conn::EBURRestoreFull;
-//                    else if (queryIndexState == ESecureBackupStatePartial)
-//                        partType = conn::EBURRestorePartial;
-//                    }
-//                    
-//                if (queryIndexType == ESecureBackupTypeBase)
-//                    backupIncType = conn::EBackupBase;
-//                else if (queryIndexType == ESecureBackupTypeIncremental)    
-//                    backupIncType = conn::EBackupIncrement;    
-//
-//                // start secure backup
-//                err = iFileOps->ActivateSecureBackUp(partType, backupIncType);
-//                showStatus = ETrue;
-//                }
-//            }
-        }
-
-    else if (aType == EFileBrowserCmdToolsSecureBackupStop)
-        {
-        err = iFileOps->DeActivateSecureBackUp();
-        showStatus = ETrue;
-        }
-
-    else
-        User::Panic(_L("Sec.br.mode"), 101);
-    
-    
-    if (showStatus)
-        {
-        if (err == KErrNone)
-            {
-            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Succeeded"));
-            }
-        else
-            {
-            CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
-
-            iEngine->FileBrowserUI()->ShowErrorNote(
-                    textResolver->ResolveErrorString(err, CTextResolver::ECtxNoCtxNoSeparator) );
-
-            CleanupStack::PopAndDestroy();  //textResolver
-            }  
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFileUtils::OpenCommonFileActionQueryL(TInt aCurrentItemIndex)
-    {
-    // TODO
-    // just get current item
-//    TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
-
-    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
-        {
-//        TInt queryIndex(0);
-//
-//        CAknListQueryDialog* listQueryDlg = new(ELeave) CAknListQueryDialog(&queryIndex);
-//
-//        if (listQueryDlg->ExecuteLD(R_COMMON_FILE_ACTION_QUERY))
-//            {
-//            if (queryIndex == ECommonFileActionViewAsTextHex)
-//                {
-//                TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
-//
-//                TFileName fullPath = fileEntry.iPath;
-//                fullPath.Append(fileEntry.iEntry.iName);
-//
-//                TInt viewerType(EFileBrowserCmdFileViewHex);
-//
-//                // check from mime type if it's text
-//                TDataType dataType;
-//                TUid appUid;
-//                if (iEngine->LsSession().AppForDocument(fullPath, appUid, dataType) == KErrNone)
-//                    {
-//                    TBuf<128> mimeTypeBuf;
-//                    mimeTypeBuf.Copy(dataType.Des8());
-//                    if (mimeTypeBuf == KNullDesC)
-//                        mimeTypeBuf.Copy(_L("N/A"));
-//
-//                    if (mimeTypeBuf.CompareF(_L("text/plain")) == 0)
-//                        viewerType = EFileBrowserCmdFileViewText;
-//                    }
-//
-//                FileEditorL(viewerType);
-//                }
-//
-//            else if (queryIndex == ECommonFileActionOpenWithApparc)
-//                {
-//                // TODO
-//                //OpenWithApparcL();
-//                }
-//
-//            else if (queryIndex == ECommonFileActionOpenWithDocHandlerEmbed)
-//                {
-//                // TODO
-//                //OpenWithDocHandlerL(ETrue);
-//                }
-//
-//            else
-//                User::Panic(_L("Unk.Com.Act"), 221);
-//            }
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-	            
-// End of File
--- a/filebrowser/engine/FBFileUtils.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,407 +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 FILEBROWSER_FILEUTILS_H
-#define FILEBROWSER_FILEUTILS_H
-
-// INCLUDES
-#include <e32base.h>
-#include <f32file.h>
-#include <w32std.h>
-#include <badesca.h>
-#include <coedef.h>
-#include <msvapi.h>
-#include <tz.h>
-#include "FB.hrh"
-
-_LIT(KIRAppPath, "z:\\sys\\bin\\irapp.exe");
-_LIT(KBTAppPath, "z:\\sys\\bin\\btui.exe");
-_LIT(KUSBAppPath, "z:\\sys\\bin\\usbclasschangeui.exe");
-_LIT(KErrRdPath, "c:\\resource\\ErrRd");
-_LIT(KErrRdDir, "c:\\resource\\");
-
-
-// FORWARD DECLARATIONS
-class CEngine;
-class CFileBrowserFileOps;
-class CDocumentHandler;
-class CEikProgressInfo;
-class CFBFileOpClient;
-class CEikProgressInfo;
-class CMessageDigest;
-
-// CLASS DECLARATIONS
-
-class TSearchAttributes
-	{
-public:
-    TFileName       iSearchDir;
-    TFileName       iWildCards;
-    TFileName       iTextInFile;
-    TUint           iMinSize;
-    TUint           iMaxSize;
-    TTime           iMinDate;
-    TTime           iMaxDate;
-    TBool           iRecurse;
-    TBool           iDefaultWildCard;
-	};
-
-class TDriveEntry
-	{
-public:
-    TChar           iLetter;
-    TInt            iNumber;
-    TVolumeInfo     iVolumeInfo;
-    TBuf<64>        iMediaTypeDesc;
-    TBuf<128>       iAttributesDesc;
-    TInt            iIconId;
-	};
-
-class TFileEntry
-	{
-public:
-    TFileName       iFullName;	
-    TFileName       iPath;
-    TEntry          iEntry;
-    TInt            iDirEntries;
-    TInt            iIconId;
-	};
-
-class TAppIcon
-	{
-public:
-    TInt            iId;
-    TUid            iUid;
-	};
-
-typedef CArrayFixSeg<TDriveEntry> CDriveEntryList;
-typedef CArrayFixSeg<TFileEntry> CFileEntryList;
-typedef CArrayFixSeg<TAppIcon> CAppIconList;
-
-class TSearchResults
-    {
-public:
-    TInt iNumberOfFoundFiles;
-    //CFileEntryList iFoundFilesList;
-    };
-
-class TOverwriteOptions
-    {
-public:
-    TBool iDoFileOperations/*(ETrue)*/;
-    TInt iQueryIndex/*(0)*/;
-    TFileName iPostFix;
-    TInt iOverWriteFlags/* = CFileMan::EOverWrite*/;
-    };
-
-class CCommandParamsBase : public CBase
-    {
-    };
-
-class CCommandParamsAttribs : public CCommandParamsBase
-    {
-public:
-    TFileEntry iSourceEntry;
-    TUint iSetMask;
-    TUint iClearMask;
-    TTime iTime;
-    TUint iSwitch;
-public:
-    CCommandParamsAttribs(const TFileEntry& aSourceEntry, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) : iSourceEntry(aSourceEntry), iSetMask(aSetMask), iClearMask(aClearMask), iTime(aTime), iSwitch(aSwitch) {}
-    };
-    
-class CCommandParamsCopyOrMove : public CCommandParamsBase
-    {
-public:
-    TFileEntry iSourceEntry;
-    TFileName iTargetPath;
-    TUint iSwitch;
-public:
-    CCommandParamsCopyOrMove(const TFileEntry& aSourceEntry, const TDesC& aTargetPath, TUint aSwitch) : iSourceEntry(aSourceEntry), iTargetPath(aTargetPath), iSwitch(aSwitch) {}
-    };
-        
-class CCommandParamsRename : public CCommandParamsBase
-    {
-public:
-    TFileEntry iSourceEntry;
-    TFileName iTargetPath;
-    TUint iSwitch;
-public:
-    CCommandParamsRename(const TFileEntry& aSourceEntry, const TDesC& aTargetPath, TUint aSwitch) : iSourceEntry(aSourceEntry), iTargetPath(aTargetPath), iSwitch(aSwitch) {}
-    };
-
-class CCommandParamsDelete : public CCommandParamsBase
-    {
-public:
-    TFileEntry iSourceEntry;
-    TUint iSwitch;
-public:
-    CCommandParamsDelete(const TFileEntry& aSourceEntry, TUint aSwitch) : iSourceEntry(aSourceEntry), iSwitch(aSwitch) {}
-    };
-
-class CCommandParamsDriveSnapShot : public CCommandParamsBase
-    {
-public:
-    TInt iSourceDriveLetter;
-    TInt iTargetDriveLetter;
-public:
-    CCommandParamsDriveSnapShot(TChar aSourceDriveLetter, TChar aTargetDriveLetter) : iSourceDriveLetter(aSourceDriveLetter), iTargetDriveLetter(aTargetDriveLetter) {}
-    };
-    
-class TCommand
-    {
-public:
-    TInt iCommandId;
-    CCommandParamsBase* iParameters;
-public:
-    TCommand(TInt aCommandId, CCommandParamsBase* aParameters) : iCommandId(aCommandId), iParameters(aParameters) {}
-    };
-
-typedef CArrayFixSeg<TCommand> CCommandArray;
-
-
-
-class CFileBrowserFileUtils : public CActive, public MMsvSessionObserver
-	{
-private:
-    enum TState // active object states
-    	{
-    	EIdle = 0,              // do nothing
-    	};
-
-//    enum TClipBoardMode
-//    	{
-//    	EClipBoardModeCut = 0,
-//    	EClipBoardModeCopy
-//    	};
-
-public:
-	static CFileBrowserFileUtils* NewL(CEngine* aEngine);
-	~CFileBrowserFileUtils();
-
-private:
-	CFileBrowserFileUtils(CEngine* aEngine);
-	void ConstructL();
-
-private: // from CActive
-	void RunL();
-        TInt RunError(TInt aError);
-	void DoCancel();
-
-private: // from MMsvSessionObserver
-    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
-
-public:  //from MProgressDialogCallback
-    void DialogDismissedL(/*TInt aButtonId*/);
-    
-public: // command handling
-    void StartExecutingCommandsL(const TDesC& aLabel);
-private: // command handling
-    void ExecuteCommand();
-    void CheckForMoreCommandsL();
-    void AppendToCommandArrayL(TInt aCommand, CCommandParamsBase* aParameters);
-    TInt CommandArrayCount() const;
-    void ResetCommandArray();       
-
-private: // misc functionality
-    void GenerateDirectoryDataL();
-    void GetDriveListL();
-    void GetDirectoryListingL();
-//    CAknIconArray* GenerateIconArrayL(TBool aGenerateNewBasicIconArray=EFalse);
-//    void AppendGulIconToIconArrayL(CAknIconArray* aIconArray, const TDesC& aIconFile, TInt aIconId, TInt aMaskId, const TAknsItemID aAknsItemId);
-    TInt AppIconIdForUid(TUid aUid);
-    TUid GetAppUid(TFileEntry aFileEntry);
-//    CDesCArray* GenerateItemTextArrayL();
-//    TInt GetSelectedItemsOrCurrentItemL(CFileEntryList* aFileEntryList);
-    TInt SetSelectedItemsOrCurrentItemL(const CArrayFix<TInt>* selectionIndexes,
-                                        CFileEntryList* aFileEntryList);
-
-//    TBool IsDestinationEntriesExists(const CFileEntryList* aEntryList, const TDesC& aTargetDir);
-    void DoCopyToFolderL(CFileEntryList* aEntryList, const TDesC& aTargetDir, const TOverwriteOptions &aOverwriteOptions, TBool aDeleteSource);
-    TInt DoSearchFiles(const TDesC& aFileName, const TDesC& aPath);
-    TInt DoSearchFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath);
-    TInt DoFindFiles(const TDesC& aFileName, const TDesC& aPath);
-    TInt DoFindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath);
-    void ReadAttachmentPathsRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, CDesCArray* aAttPaths);
-    void WriteMessageEntryInfoRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, RFile& aFile, TInt& aLevel);
-    void DoWriteMessageEntryInfoL(CMsvEntry* aContext, RFile& aFile, TInt aLevel);
-    void ConvertCharsToPwd(const TDesC& aWord, TDes8& aConverted) const;
-    HBufC8* MessageDigestInHexLC(CMessageDigest* aMD, RFile& aFile);
-    void OpenCommonFileActionQueryL(TInt aCurrentItemIndex);
-    
-public: // public interfaces
-    TKeyResponse HandleOfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-    void HandleSettingsChangeL();
-    void SetSortModeL(TInt aSortMode);
-    void SetOrderModeL(TInt aOrderMode);
-    void RefreshViewL();
-    TBool IsCurrentDriveReadOnly();
-    TBool IsItemDirectory(TInt aCurrentItemIndex);
-    void MoveUpOneLevelL();
-    void MoveDownToDirectoryL(TInt aIndex);
-    TInt ClipboardCutL(const CArrayFix<TInt>* aSelectionIndices);
-    TInt ClipboardCopyL(const CArrayFix<TInt>* aSelectionIndices);
-    void ClipboardPasteL(const TOverwriteOptions &aOverwriteOptions);
-    TInt SetCurrentSelection(const CArrayFix<TInt>* aSelectionIndices);
-    void CopyToFolderL(TFileName aTargetDir, const TOverwriteOptions &aOverwriteOptions, TBool aMove=EFalse);
-    void DeleteL();
-    TBool SelectionHasDirs();
-    void TouchL(TBool aRecurse);
-    void RenameL(const TInt aIndex, const TFileName &newName);
-    void SetAttributesL(TUint &aSetAttMask, TUint &aClearAttMask, TBool &aRecurse);
-    void SearchL();
-    void NewFileL(const TFileName &aNewFileName);
-    void NewDirectoryL(const TFileName &aNewDirectoryName);
-    void SendToL();
-    void CompressL();
-    void DecompressL();
-    bool PropertiesL(TInt currentItemIndex, CDesCArray* entryLines, TFileName &titleText);
-    void OpenWithApparcL(TFileName aFileName);
-    void OpenWithDocHandlerL(TFileName aFileName, TBool aEmbed);
-    void OpenWithFileServiceL(TInt aCurrentItemIndex);
-    TBool FileExists(const TDesC& aPath);
-    TInt LaunchProgramL(const TDesC& aPath);
-    void MemoryInfoPopupL();
-    void ShowFileCheckSumsL(TInt aCurrentItemIndex, TInt aType);
-    void SetErrRdL(TBool aEnable);
-//    void EnableAvkonIconCacheL(TBool aEnable);
-    void SimulateLeaveL(TInt aLeaveCode);
-    void SimulatePanicL(const TDesC& aPanicCategory, TInt aPanicCode);
-    void SimulateExceptionL(TInt aExceptionCode);
-    TUint32 GetDebugMask();
-    void SetDebugMaskL(TUint32 aDbgMask);
-    void WriteAllAppsL();
-    void WriteAllFilesL();
-    void ListOpenFilesL();
-    void ListMessageAttachmentsL(TInt aType);
-    void WriteMsgStoreWalkL();
-    void FileEditorL(TInt aCurrentItemIndex, TInt aType);
-    void SetDrivePasswordL(TInt aIndex, const TFileName &aOldPassword, const TFileName &aNewPassword);
-    void UnlockDriveL(TInt aIndex, const TFileName &aOldPassword);
-    void ClearDrivePasswordL(TInt aIndex, const TFileName &aOldPassword);
-    void EraseDrivePasswordL(TInt aIndex);
-    void FormatDriveL(TInt aIndex, TBool aQuickFormat);
-    void CheckDiskL(TInt aIndex);
-    void ScanDriveL(TInt aIndex);
-    void SetDriveNameL(TInt aIndex, const TFileName &aDriveName);
-    void SetDriveVolumeLabelL(TInt aIndex, const TFileName &aVolumeLabel);
-    void EjectDriveL(TInt aIndex);
-    void DismountFileSystemL(TInt aIndex);
-    void EraseMBRL(TInt aIndex);
-    void PartitionDriveL(TInt aIndex, TBool aEraseMBR, TInt aAmountOfPartitions);
-    TBool DriveSnapShotPossible();
-    void DriveSnapShotL();
-    void EditDataTypesL();
-    void SecureBackupL(TInt aType);
-
-    TBool IsDestinationEntriesExists(const TDesC& aTargetDir);
-    TBool TargetExists(const TInt aIndex, const TFileName &newName);
-    void GetDriveName(TInt aIndex, TFileName &aDriveName);
-    void GetDriveVolumeLabel(TInt aIndex, TFileName &aVolumeLabel);
-
-    CFileEntryList* FileEntries() const;
-    CDriveEntryList* DriveEntries() const;
-    
-public:    
-    inline TInt SortMode() { return iSortMode; }
-    inline TInt OrderMode() { return iOrderMode; }
-    inline CFileEntryList* ClipBoardList() { return iClipBoardList; }
-    inline CFileEntryList* CurrentSelectionList() { return iCurrentSelectionList; }
-    inline TBool IsDriveListViewActive() { return iCurrentPath==KNullDesC && iListingMode==ENormalEntries; }
-    inline TBool IsNormalModeActive() { return iListingMode==ENormalEntries; }
-    inline TListingMode ListingMode() { return iListingMode; }
-    inline TFileName CurrentPath() { return iCurrentPath; }
-	
-    inline TSearchAttributes GetSearchAttributes(){ return iSearchAttributes; };
-    inline void ChangeAttributes(TSearchAttributes attributes) { iSearchAttributes = attributes; };
-    inline TSearchResults SearchResults(){ return iFileSearchResults; };
-    inline CFileEntryList* FoundFiles() { return iFileEntryList; };    
-    inline void SetAllowProcessing(TBool aAllowProcessing) { iAllowProcessing = aAllowProcessing; }
-    TClipBoardMode GetClipBoardMode() { return iClipBoardMode; }
-	
-private:
-    TState                          iState;
-    CEngine*                        iEngine;
-    CFileBrowserFileOps*            iFileOps;
-
-    TBool                           isWaitDialog;
-    TBool                           isProgressDialog;
-
-    //CEikProgressInfo*               iProgressInfo;
-    CCommandArray*                  iCommandArray;
-    TInt                            iCurrentEntry;
-    TInt                            iSucceededOperations;
-    TInt                            iFailedOperations;
-    TInt                            iLastError;
-    RTimer                          iTimer;
-    RFs                             iFs;
-    TListingMode                    iListingMode;
-    CFileMan*                       iFileMan;
-    TInt                            iViewMode;
-    TFileName                       iCurrentPath;
-    TInt                            iSortMode;
-    TInt                            iOrderMode;
-//    TInt                            iClipboardMode;
-    CDesCArray*                     iClipboardPaths;
-    CDriveEntryList*                iDriveEntryList;
-    CFileEntryList*                 iFileEntryList;
-    CFileEntryList*                 iFindFileEntryList;
-    CAppIconList*                   iAppIconList;
-    TClipBoardMode                  iClipBoardMode;
-    CFileEntryList*                 iClipBoardList;
-    CFileEntryList*                 iCurrentSelectionList;
-    TSearchAttributes               iSearchAttributes;
-    CDocumentHandler*               iDocHandler;
-
-    RFile                           iMsgStoreWalkFile;
-    TInt                            iPrevFolderIndex;
-    TFileName                       iPrevFolderName;
-    RTz                             iTz;
-    TSearchResults                  iFileSearchResults;
-    CDesCArray*                     iTextArray;
-    TBool                           iAllowProcessing;
-    };
-
-
-// utility class for waiting for asychronous requests
-class CAsyncWaiter : public CActive
-	{
-public:
-	static CAsyncWaiter* NewL( TInt aPriority = EPriorityStandard );
-	static CAsyncWaiter* NewLC( TInt aPriority = EPriorityStandard );
-	~CAsyncWaiter();
-	
-	void StartAndWait();
-	TInt Result() const;
-	
-private:
-	CAsyncWaiter( TInt aPriority );
-	
-	// from CActive
-	void RunL();
-	void DoCancel();
-	
-private:
-    CActiveSchedulerWait iWait;
-	TInt iError;
-	};
-	
-	
-#endif
-
-// End of File
-
--- a/filebrowser/engine/FBFolderSelector.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,622 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies 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 "FBFolderSelector.h"
-#include "FBFileUtils.h"
-#include "FB.hrh"
-#include "FBStd.h"
-
-#if (!defined __SERIES60_30__ && !defined __SERIES60_31__)
-#include <driveinfo.h>
-#endif // !defined __SERIES60_30__ && !defined __SERIES60_31__
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CFileBrowserFolderSelector *CFileBrowserFolderSelector::NewL(
-        TDes& aReturnPath,
-        MFolderSelectorUI *aFolderSelectorUI)
-    {
-    CFileBrowserFolderSelector* self = new(ELeave) CFileBrowserFolderSelector(aReturnPath,
-                                                                              aFolderSelectorUI);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CFileBrowserFolderSelector::~CFileBrowserFolderSelector()
-    {
-    delete iFileEntryList;
-    delete iDriveEntryList;
-    
-    iFs.Close();
-
-    //iEikonEnv->InfoMsgCancel();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CFileBrowserFolderSelector::CFileBrowserFolderSelector(TDes& aReturnPath, MFolderSelectorUI *aFolderSelectorUI) :
-    iReturnPath(aReturnPath),
-    iFolderSelectorUI(aFolderSelectorUI)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFolderSelector::ConstructL()
-    {
-    User::LeaveIfError( iFs.Connect() );
-    iDriveEntryList = new(ELeave) CDriveEntryList(8);
-    iFileEntryList = new(ELeave) CFileEntryList(32);
-    iCurrentPath = KNullDesC;
-    
-    //iIsDragging = EFalse;
-    //EnableDragEvents();
-    
-    // get only writeable drives
-    GetDriveListL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-/*
-void CFileBrowserFolderSelector::HandlePointerEventL(const TPointerEvent &aPointerEvent)
-    {
-    // detect direction of dragging by comparing the start and finish points
-    
-    if (aPointerEvent.iType == TPointerEvent::EButton1Down)
-        {
-        iDragStartPoint = aPointerEvent.iPosition;
-        iIsDragging = EFalse;
-        }
-    else if (aPointerEvent.iType == TPointerEvent::EDrag)
-        {
-        iIsDragging = ETrue;
-        
-        return;
-        }
-    else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
-        {
-        if (iIsDragging)
-            {
-            const TInt KDelta = iDragStartPoint.iX - aPointerEvent.iPosition.iX;
-            const TInt KThreshold = 30;
-            
-            if (KDelta < -KThreshold) // dragging to right
-                {
-                // "emulate" right key press
-                
-                TKeyEvent keyEvent;
-                keyEvent.iCode = EKeyRightArrow;
-                keyEvent.iModifiers = 0;
-                
-                TEventCode type = EEventKey;
-        
-                OfferKeyEventL(keyEvent, type);
-                
-                return;
-                }
-            else if (KDelta > KThreshold) // dragging to left
-                {
-                // "emulate" left key press
-                
-                TKeyEvent keyEvent;
-                keyEvent.iCode = EKeyLeftArrow;
-                keyEvent.iModifiers = 0;
-                
-                TEventCode type = EEventKey;
-        
-                OfferKeyEventL(keyEvent, type);
-                
-                return;
-                }            
-            }
-        iIsDragging = EFalse;
-        }
-    else
-        {
-        iIsDragging = EFalse;        
-        }
-
-    CAknListQueryDialog::HandlePointerEventL(aPointerEvent);    
-    }
-*/
-       
-// --------------------------------------------------------------------------------------------
-
-TKeyResponse CFileBrowserFolderSelector::OfferKeyEventL(const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/)
-    {
-//    if(aType != EEventKey)
-//        return EKeyWasNotConsumed;
-    
-//    if (aKeyEvent.iCode == EKeyLeftArrow && !IsDriveListViewActive())
-//        {
-//        MoveUpOneLevelL();
-//        return EKeyWasConsumed;
-//        }
-//    else if (aKeyEvent.iCode == EKeyRightArrow && ((ListBox()->CurrentItemIndex() > 0 && !IsDriveListViewActive()) || IsDriveListViewActive()))
-//        {
-//        MoveDownToDirectoryL();
-//        return EKeyWasConsumed;
-//        }
-//    else if (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter)
-//        {
-//        if (IsDriveListViewActive())
-//            {
-//            MoveDownToDirectoryL();
-//            return EKeyWasConsumed;
-//            }
-//        else if (ListBox()->CurrentItemIndex() == 0)
-//            {
-//            TryExitL(EAknSoftkeyOk);
-//            return EKeyWasConsumed;
-//            }
-//        else if (ListBox()->CurrentItemIndex() > 0)
-//            {
-//            MoveDownToDirectoryL();
-//            return EKeyWasConsumed;
-//            }
-//        }
-//
-//    TKeyResponse result = CAknDialog::OfferKeyEventL(aKeyEvent, aType);
-//
-//    // update LSK label
-//    if (!IsDriveListViewActive())
-//        {
-//        if (ListBox()->CurrentItemIndex() == 0)
-//            {
-//            ButtonGroupContainer().SetCommandL(0, EAknSoftkeyOk, iLSKActionText);
-//            ButtonGroupContainer().DrawNow();
-//            }
-//        else
-//            {
-//            ButtonGroupContainer().SetCommandL(0, EAknSoftkeyOk, _L("Open dir"));
-//            ButtonGroupContainer().DrawNow();
-//            }
-//        }
-//
-//    return result;
-    return TKeyResponse();
-    }    
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFolderSelector::PreLayoutDynInitL()
-    {
-//    CAknListQueryDialog::PreLayoutDynInitL();
-
-//    static_cast<CEikFormattedCellListBox*>(ListBox())->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFolderSelector::PostLayoutDynInitL()
-    {
-//    CAknListQueryDialog::PostLayoutDynInitL();
-    
-    //w SetIconArrayL(static_cast<CArrayPtr<CGulIcon>*>(iIconArray));
-    
-    RefreshViewL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CFileBrowserFolderSelector::OkToExitL(TInt /*aButtonId*/)
-    {
-//    if (aButtonId == GetLeftCBAShortKeyPress())
-//        {
-//        if (IsDriveListViewActive())
-//            {
-//            MoveDownToDirectoryL();
-//            return EFalse;
-//            }
-//        else if (ListBox()->CurrentItemIndex() == 0)
-//            {
-//            // close the dialog
-//            iReturnPath = iCurrentPath;
-//            return ETrue;
-//            }
-//        else if (ListBox()->CurrentItemIndex() > 0)
-//            {
-//            MoveDownToDirectoryL();
-//            return EFalse;
-//            }
-//        else
-//            return EFalse;
-//        }
-//    else if (aButtonId == GetRightCBAShortKeyPress())
-//        {
-//        return ETrue;
-//        }
-//    else
-//        {
-//        return EFalse;
-//        }
-    return ETrue;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFolderSelector::MoveUpOneLevelL()
-    {
-    if (iCurrentPath.Length() <= 3)
-        {
-        // move to drive list view is the current path is already short enough
-        iCurrentPath = KNullDesC;
-        }
-    else
-        {
-        // move one directory up
-        TInt marker(iCurrentPath.Length());
-        
-        // find second last dir marker
-        for (TInt i=iCurrentPath.Length()-2; i>=0; i--)
-            {
-            if (iCurrentPath[i] == '\\')
-                {
-                marker = i;
-                break;
-                }
-                
-            }
-        iCurrentPath = iCurrentPath.LeftTPtr(marker+1);
-        }    
-
-    // update view
-    RefreshViewL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFolderSelector::MoveDownToDirectoryL(TInt index)
-    {
-    if (index >= 0)
-        {
-        if (IsDriveListViewActive())
-            {
-            // currently in a drive list view, move to root of selected drive
-            if (iDriveEntryList->Count() > index)
-                {
-                TDriveEntry driveEntry = iDriveEntryList->At(index);
-                
-                iCurrentPath.Append(driveEntry.iLetter);    
-                iCurrentPath.Append(_L(":\\"));
-                }
-            }
-        else
-            {
-            // this needed because we have an extra item in the listbox
-            index--;
-
-            // append the new directory
-            if (iFileEntryList->Count() > index)
-                {
-                TFileEntry fileEntry = iFileEntryList->At(index);
-                
-                if (fileEntry.iEntry.IsDir())
-                    {
-                    iCurrentPath.Append(fileEntry.iEntry.iName);
-                    iCurrentPath.Append(_L("\\"));
-                    }
-                }
-            }
-                   
-        // update view
-        RefreshViewL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFolderSelector::RefreshViewL()
-    {
-    if (IsDriveListViewActive())
-        {
-        GetDriveListL();
-        }
-    else
-        {
-        GetFileListL();
-        }
-    iFolderSelectorUI->InformFolderSelectionChanged();
-
-    // TODO
-//    if (iCurrentPath == KNullDesC)
-//        iEikonEnv->InfoMsgWithDuration(_L("<- up dir  down dir ->"), TTimeIntervalMicroSeconds32(KMaxTInt));
-//    else
-//        iEikonEnv->InfoMsgWithDuration(iCurrentPath, TTimeIntervalMicroSeconds32(KMaxTInt));
-   
-//    SetItemTextArray(textArray);
-//    SetOwnershipType(ELbmOwnsItemArray);
-//    ListBox()->HandleItemAdditionL();
-//    Layout();
-//    ListBox()->SetCurrentItemIndex(0);
-//    DrawDeferred();
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-//TBool CFileBrowserFolderSelector::RunCopyDlgLD()
-//    {
-//    iLSKActionText.Copy(_L("Copy"));
-//    return ExecuteLD(1/*R_COPY_TO_FOLDER_SELECTION_QUERY*/);
-//    }
-
-//// --------------------------------------------------------------------------------------------
-
-//TBool CFileBrowserFolderSelector::RunMoveDlgLD()
-//    {
-//    iLSKActionText.Copy(_L("Move"));
-//    return ExecuteLD(1/*R_MOVE_TO_FOLDER_SELECTION_QUERY*/);
-//    }
-
-//// --------------------------------------------------------------------------------------------
-
-//TInt CAknQueryDialog::GetLeftCBAShortKeyPress()
-//    {
-//    return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(0)));
-//    }
-
-//// --------------------------------------------------------------------------------------------
-  
-//TInt CAknQueryDialog::GetRightCBAShortKeyPress()
-//    {
-//    return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(2)));
-//    }
-       
-// --------------------------------------------------------------------------------------------
-
-void CFileBrowserFolderSelector::GetDriveListL()
-    {
-    TDriveList driveList;
-
-    // get drive listing depending of the support for network drives
-    if (true/*TODO iEngine->Settings().iSupportNetworkDrives*/)
-        {
-        #ifndef __SERIES60_30__
-            #ifndef __SERIES60_31__
-                User::LeaveIfError(iFs.DriveList(driveList, KDriveAttAll));
-            #endif
-        #else
-            User::LeaveIfError(iFs.DriveList(driveList));
-        #endif
-        }
-    else
-        {
-        User::LeaveIfError(iFs.DriveList(driveList));
-        }
-
-    iDriveEntryList->Reset();
-
-    //TDriveEntry driveEntry;
-    for (TInt i=0; i<KMaxDrives; i++)
-        {
-        if (driveList[i])
-            {
-            TDriveEntry driveEntry;
-
-            // set default icon
-            driveEntry.iIconId = EFixedIconPhoneMemory;
-
-            // get drive letter and number
-            driveEntry.iLetter = 'A' + i;
-            iFs.CharToDrive(driveEntry.iLetter, driveEntry.iNumber);
-
-            // get volume info and check errors
-            if (iFs.Volume(driveEntry.iVolumeInfo, driveEntry.iNumber) == KErrNone)
-                {
-                // set media type descriptor
-                TInt mediaType = driveEntry.iVolumeInfo.iDrive.iType;
-                TBool extMountable( EFalse );
-
-                if (mediaType == EMediaNotPresent)
-                    driveEntry.iMediaTypeDesc = _L("Not present");
-                else if (mediaType ==EMediaUnknown )
-                    driveEntry.iMediaTypeDesc = _L("Unknown");
-                else if (mediaType ==EMediaFloppy )
-                    driveEntry.iMediaTypeDesc = _L("Floppy");
-                else if (mediaType == EMediaHardDisk)
-                    driveEntry.iMediaTypeDesc = _L("Mass storage");
-                else if (mediaType == EMediaCdRom)
-                    driveEntry.iMediaTypeDesc = _L("CD-ROM");
-                else if (mediaType == EMediaRam)
-                    driveEntry.iMediaTypeDesc = _L("RAM");
-                else if (mediaType == EMediaFlash)
-                    driveEntry.iMediaTypeDesc = _L("Flash");
-                else if (mediaType == EMediaRom)
-                    driveEntry.iMediaTypeDesc = _L("ROM");
-                else if (mediaType == EMediaRemote)
-                    driveEntry.iMediaTypeDesc = _L("Remote");
-                else if (mediaType == EMediaNANDFlash)
-                    driveEntry.iMediaTypeDesc = _L("NAND flash");
-
-                // get real size of the ROM drive
-                if (mediaType == EMediaRom)
-                    {
-                    TMemoryInfoV1Buf ramMemory;
-                    UserHal::MemoryInfo(ramMemory);
-                    driveEntry.iVolumeInfo.iSize = ramMemory().iTotalRomInBytes;
-                    }
-
-                // set attribute descripitions
-                if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatNotSupported)
-                    driveEntry.iAttributesDesc.Append(_L("Battery not supported"));
-                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatGood)
-                    driveEntry.iAttributesDesc.Append(_L("Battery good"));
-                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatLow)
-                    driveEntry.iAttributesDesc.Append(_L("Battery low"));
-                else
-                    driveEntry.iAttributesDesc.Append(_L("Battery state unknown"));
-
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttLocal)
-                    driveEntry.iAttributesDesc.Append(_L(" + Local"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRom)
-                    driveEntry.iAttributesDesc.Append(_L(" + ROM"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRedirected)
-                    driveEntry.iAttributesDesc.Append(_L("+ Redirected"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttSubsted)
-                    driveEntry.iAttributesDesc.Append(_L(" + Substed"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttInternal)
-                    driveEntry.iAttributesDesc.Append(_L(" + Internal"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable)
-                    {
-                    driveEntry.iAttributesDesc.Append(_L(" + Removable"));
-#if (!defined __SERIES60_30__ && !defined __SERIES60_31__)
-                    TUint drvStatus( 0 );
-                    if ( !DriveInfo::GetDriveStatus( iFs, driveEntry.iNumber, drvStatus ) &&
-                         drvStatus & DriveInfo::EDriveExternallyMountable &&
-                         drvStatus & DriveInfo::EDriveInternal )
-                        {
-                        extMountable = ETrue;
-                        // iMediaTypeDesc already set as "Mass storage"
-                        }
-                    else
-                        {
-                        driveEntry.iMediaTypeDesc = _L("Memory card");
-                        }
-#else
-                    driveEntry.iMediaTypeDesc = _L("Memory card");
-#endif
-                    }
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemote)
-                    driveEntry.iAttributesDesc.Append(_L(" + Remote"));
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttTransaction)
-                    driveEntry.iAttributesDesc.Append(_L(" + Transaction"));
-
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttVariableSize)
-                    driveEntry.iAttributesDesc.Append(_L(" + Variable size"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDualDensity)
-                    driveEntry.iAttributesDesc.Append(_L(" + Dual density"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttFormattable)
-                    driveEntry.iAttributesDesc.Append(_L(" + Formattable"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttWriteProtected)
-                    driveEntry.iAttributesDesc.Append(_L(" + Write protected"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLockable)
-                    driveEntry.iAttributesDesc.Append(_L(" + Lockable"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked)
-                    driveEntry.iAttributesDesc.Append(_L(" + Locked"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttHasPassword)
-                    driveEntry.iAttributesDesc.Append(_L(" + Has password"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttReadWhileWrite)
-                    driveEntry.iAttributesDesc.Append(_L(" + Read while write"));
-                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDeleteNotify)
-                    driveEntry.iAttributesDesc.Append(_L(" + Supports DeleteNotify"));
-
-
-                // mark a removable media with memory card icon
-                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable && !extMountable)
-                    {
-                    if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAbsent)
-                        {
-                        driveEntry.iIconId = EFixedIconMemoryCardDisabled;
-                        }
-                    else
-                        {
-                        driveEntry.iIconId = EFixedIconMemoryCard;
-                        }
-                    }
-                }
-
-            // if this fails, likely it's a memory card which is not present
-            else
-                {
-                TVolumeInfo volumeInfo;
-                volumeInfo.iSize = 0;
-                volumeInfo.iFree = 0;
-                volumeInfo.iDrive.iDriveAtt = KDriveAttRemovable;
-                volumeInfo.iDrive.iMediaAtt = KMediaAttWriteProtected;
-                driveEntry.iVolumeInfo = volumeInfo;
-
-                driveEntry.iMediaTypeDesc = _L("Not ready");
-                driveEntry.iIconId = EFixedIconMemoryCardDisabled;
-                }
-// TODO What to do with iPrevFolderName and iPrevFolderIndex
-//            if ( iPrevFolderName != KNullDesC && iPrevFolderName[0] == driveEntry.iLetter )
-//                {
-//                iPrevFolderIndex = iDriveEntryList->Count();
-//                }
-
-            if (driveEntry.iVolumeInfo.iDrive.iMediaAtt != KMediaAttWriteProtected
-                && driveEntry.iVolumeInfo.iDrive.iMediaAtt != KMediaAttLocked
-                && driveEntry.iVolumeInfo.iDrive.iDriveAtt != KDriveAbsent)
-                {
-                iDriveEntryList->AppendL(driveEntry);
-                }
-            }
-        }
-    }
-
-void CFileBrowserFolderSelector::GetFileListL()
-    {
-    iFileEntryList->Reset();
-
-    CDir* dir = NULL;
-    if (iFs.GetDir(iCurrentPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst, dir) == KErrNone)
-        {
-        CleanupStack::PushL(dir);
-
-        for (TInt i=0; i<dir->Count(); i++)
-            {
-            TFileEntry fileEntry;
-            fileEntry.iPath = iCurrentPath;
-            fileEntry.iEntry = (*dir)[i];
-            fileEntry.iDirEntries = KErrNotFound;
-            fileEntry.iIconId = EFixedIconEmpty;
-
-            // check for directory entries
-            if (fileEntry.iEntry.IsDir())
-                {
-                fileEntry.iIconId = EFixedIconFolder;
-
-                TFileName subPath = fileEntry.iPath;
-                subPath.Append(fileEntry.iEntry.iName);
-                subPath.Append(_L("\\"));
-
-                // check if any sub directories
-                CDir* subDir = NULL;
-                if (iFs.GetDir(subPath, KEntryAttDir|KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
-                    {
-                    fileEntry.iDirEntries = subDir->Count();
-
-                    for (TInt j=0; j<subDir->Count(); j++)
-                        {
-                        TEntry entry = (*subDir)[j];
-
-                        if (entry.IsDir())
-                            {
-                            fileEntry.iIconId = EFixedIconFolderSub;
-                            break;
-                            }
-                        }
-
-                    delete subDir;
-                    }
-                    iFileEntryList->AppendL(fileEntry);
-                }
-            }
-
-        CleanupStack::PopAndDestroy(); //dir
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-      
-// End of File
-
--- a/filebrowser/engine/FBFolderSelector.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-#ifndef FILEBROWSER_FILEDLGS_H
-#define FILEBROWSER_FILEDLGS_H
-
-#include "FBFileUtils.h"
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-#include <apgcli.h>
-
-/**
-  * Interface to communicate UI with
-  */
-class MFolderSelectorUI
-{
-public:
-    /**
-     * Shows info message with text
-//     * @param A aText text to be shown in message body.
-//     * @param A aTitle text to be shown in message title.
-     * @return None.
-     */
-    virtual void InformFolderSelectionChanged() = 0;
-};
-
-/**
-  * Backend class for destination folder selection dialog
-  */
-class CFileBrowserFolderSelector
-    {
-public:
-    static CFileBrowserFolderSelector *NewL(TDes& aReturnPath, MFolderSelectorUI *);
-    virtual ~CFileBrowserFolderSelector();
-
-    inline TFileName CurrentPath() const { return iCurrentPath; }
-    inline TBool IsDriveListViewActive() const { return iCurrentPath==KNullDesC; }
-    inline const CDriveEntryList *DriveEntryList() { return iDriveEntryList; }
-    inline const CFileEntryList *FileEntryList() {return iFileEntryList; }
-
-    void MoveDownToDirectoryL(TInt index);
-    void MoveUpOneLevelL();
-
-private: // Constructors
-    CFileBrowserFolderSelector(TDes& aReturnPath, MFolderSelectorUI *);
-    void ConstructL();
-
-protected:  // From CEikDialog
-    TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
-    void PreLayoutDynInitL();
-    void PostLayoutDynInitL();
-    TBool OkToExitL(TInt aButtonId);    
-
-protected:  // From CCoeControl
-    //void HandlePointerEventL(const TPointerEvent &aPointerEvent); 
-
-private: // New methods
-    void RefreshViewL();
-
-    void GetDriveListL();
-    void GetFileListL();
-
-private: // Data
-    TInt                            iSelectedIndex;
-    TBuf<16>                        iLSKActionText;
-    TDes                           &iReturnPath;
-    RFs                             iFs;
-    CDriveEntryList                *iDriveEntryList;
-    CFileEntryList                 *iFileEntryList;
-    TFileName                       iCurrentPath;
-    MFolderSelectorUI               *iFolderSelectorUI;
-    };
-
-#endif
-
-// End of File
-
--- a/filebrowser/engine/FBStd.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FILEBROWSER_STD_H
-#define FILEBROWSER_STD_H
-
-#include <e32cmn.h>
-#include <e32std.h>
-#include <e32base.h>
-
-LOCAL_C inline TBool IsQHD(const TSize& aSize) { return ((aSize.iWidth==640 && aSize.iHeight==360) || (aSize.iWidth==360 && aSize.iHeight==640)); }
-
-#endif
-
-// End of File
-
--- a/filebrowser/engine/FBTraces.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef FILEBROWSER_TRACES_H
-#define FILEBROWSER_TRACES_H
-
-#include <e32def.h>
-
-
-// ---------------------------------------------------------------------------
-// You can change these logging method values below! Recompile the application to take changes effect.
-
-    // logging methods
-    // 0 = No logging
-    // 1 = Flogger
-    // 2 = RDebug
-    // 3 = Flogger and RDebug
-    
-    #ifndef _DEBUG
-        
-        // Logging method for UREL/release builds:
-        #define FILEBROWSER_LOGGING_METHOD  0
-
-    #else
-
-        // Logging method for UDEB/debug builds:
-        #define FILEBROWSER_LOGGING_METHOD  2
-
-    #endif    
-    
-
-
-// ---------------------------------------------------------------------------
-// Do not make any changes to lines below...
-
-    #if FILEBROWSER_LOGGING_METHOD == 1 || FILEBROWSER_LOGGING_METHOD == 3
-
-        #include <flogger.h>
-        _LIT(KLogFolder,"Launcher");
-        _LIT(KLogFile,"Launcher_Trace.txt");
-
-    #endif
-
-    #if FILEBROWSER_LOGGING_METHOD == 2 || FILEBROWSER_LOGGING_METHOD == 3
-
-        #include <e32debug.h>
-
-    #endif
-
-
-    #if FILEBROWSER_LOGGING_METHOD == 0
-    
-        #define LOGTEXT(AAA)
-        #define LOGSTRING(AAA)
-        #define LOGSTRING2(AAA,BBB)
-        #define LOGSTRING3(AAA,BBB,CCC)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD)
-    
-    
-    #elif FILEBROWSER_LOGGING_METHOD == 1
-    
-        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-   
-    #elif FILEBROWSER_LOGGING_METHOD == 2
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
-    
-    #elif FILEBROWSER_LOGGING_METHOD == 3
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-
-    #endif
-
-// ---------------------------------------------------------------------------
-
-#endif
--- a/filebrowser/engine/engine.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,427 +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 FILES
-
-#include "engine.h"
-
-//#include "FBApp.h"
-#include "FB.hrh"
-#include "FBFileUtils.h"
-#include "FBStd.h"
-//#include <filebrowser.rsg>
-
-#include <eikenv.h>
-#include <coeutils.h>
-#include <bautils.h>
-#include <apaid.h>
-#include <s32file.h>
-
-// CONSTANTS
-// UID of the application
-const TUid KUidFileBrowser = { 0x102828D6 };
-
-const TInt KSettingsDrive = EDriveC;
-_LIT(KSettingsFileName, "filebrowser_settings.ini");
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CEngine* CEngine::NewL(MFileBrowserUI *aFileBrowserUI)
-    {
-    CEngine* self = new(ELeave) CEngine;
-    CleanupStack::PushL(self);
-    self->ConstructL(aFileBrowserUI);
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CEngine::CEngine()
-    : iFileUtils(NULL)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::ConstructL(MFileBrowserUI *aFileBrowserUI)
-    {
-    iFileBrowserUI = aFileBrowserUI;
-    iEnv = CEikonEnv::Static();
-    User::LeaveIfError(iLs.Connect());
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CEngine::~CEngine()
-    {
-	if (iFileUtils != NULL)
-	    delete iFileUtils;
-
-	iLs.Close();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CEngine::ActivateEngineL()
-    {
-    TRAP_IGNORE( LoadSettingsL() );
-
-    iFileUtils = CFileBrowserFileUtils::NewL(this);
-    }
-
-// ---------------------------------------------------------------------------
-
-void CEngine::DeActivateEngineL()
-    {
-    }
-	
-// ---------------------------------------------------------------------------
-
-void CEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue)
-    {
-    if (aDicFS->IsPresentL(aUid))
-        {
-        RDictionaryReadStream in;
-        in.OpenLC(*aDicFS, aUid);
-        aValue = in.ReadInt16L();
-        CleanupStack::PopAndDestroy(); // in        
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue)
-    {
-    if (aDicFS->IsPresentL(aUid))
-        {
-        RDictionaryReadStream in;
-        in.OpenLC(*aDicFS, aUid);
-        TInt bufLength = in.ReadInt16L();   // get length of descriptor
-        in.ReadL(aValue, bufLength);        // get the descriptor itself
-        CleanupStack::PopAndDestroy(); // in
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue)
-    {
-    RDictionaryWriteStream out;
-    out.AssignLC(*aDicFS, aUid);
-    out.WriteInt16L(aValue);
-    out.CommitL(); 	
-    CleanupStack::PopAndDestroy(1);// out
-    }
-
-// ---------------------------------------------------------------------------
-
-void CEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue)
-    {
-    RDictionaryWriteStream out;
-    out.AssignLC(*aDicFS, aUid);
-    out.WriteInt16L(aValue.Length());       // write length of the descriptor
-    out.WriteL(aValue, aValue.Length());    // write the descriptor itself
-    out.CommitL(); 	
-    CleanupStack::PopAndDestroy(1);// out
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-void CEngine::LoadSettingsL()
-    {
-    const TSize screenSize = iEnv->ScreenDevice()->SizeInPixels();
-
-    // set defaults
-    iSettings.iDisplayMode = EDisplayModeFullScreen;
-    iSettings.iFileViewMode = IsQHD(screenSize) ? EFileViewModeExtended : EFileViewModeSimple;
-    iSettings.iShowSubDirectoryInfo = EFalse;
-    iSettings.iShowAssociatedIcons = EFalse;
-    iSettings.iRememberLastPath = EFalse;
-    iSettings.iLastPath = KNullDesC;
-    iSettings.iRememberFolderSelection = ETrue;
-//#if 0 // TODO
-//#if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)
-//    if ( AknLayoutUtils::PenEnabled() )
-//        {
-//        iSettings.iEnableToolbar = ETrue;
-//        }
-//    else
-//        {
-//        iSettings.iEnableToolbar = EFalse;
-//        }
-//#else
-//    iSettings.iEnableToolbar = EFalse;
-//#endif
-//#endif // TODO
-
-    iSettings.iSupportNetworkDrives = EFalse;
-    iSettings.iBypassPlatformSecurity = EFalse;
-    iSettings.iRemoveFileLocks = ETrue;
-    iSettings.iIgnoreProtectionsAtts = ETrue;
-    iSettings.iRemoveROMWriteProrection = ETrue;
-
-    // build specific defaults
-#if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
-    iSettings.iSupportNetworkDrives = ETrue;
-#endif 
-
-
-    // make sure that the private path of this app in c-drive exists
-    iEnv->FsSession().CreatePrivatePath( KSettingsDrive ); // c:\\private\\102828d6\\
-    
-    // handle settings always in the private directory 
-    if (iEnv->FsSession().SetSessionToPrivate( KSettingsDrive ) == KErrNone)
-        {
-        // open or create a dictionary file store
-        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iEnv->FsSession(), KSettingsFileName, KUidFileBrowser);
-
-        LoadDFSValueL(settingsStore, KFBSettingDisplayMode,                 iSettings.iDisplayMode);
-        LoadDFSValueL(settingsStore, KFBSettingFileViewMode,                iSettings.iFileViewMode);
-        LoadDFSValueL(settingsStore, KFBSettingShowSubDirectoryInfo,        iSettings.iShowSubDirectoryInfo);
-        LoadDFSValueL(settingsStore, KFBSettingShowAssociatedIcons,         iSettings.iShowAssociatedIcons);
-        LoadDFSValueL(settingsStore, KFBSettingRememberLastPath,            iSettings.iRememberLastPath);
-        LoadDFSValueL(settingsStore, KFBSettingLastPath,                    iSettings.iLastPath);
-        LoadDFSValueL(settingsStore, KFBSettingFolderSelection,             iSettings.iRememberFolderSelection);
-        LoadDFSValueL(settingsStore, KFBSettingEnableToolbar,               iSettings.iEnableToolbar);
-
-        LoadDFSValueL(settingsStore, KFBSettingSupportNetworkDrives,        iSettings.iSupportNetworkDrives);
-        LoadDFSValueL(settingsStore, KFBSettingBypassPlatformSecurity,      iSettings.iBypassPlatformSecurity);
-        LoadDFSValueL(settingsStore, KFBSettingRemoveFileLocks,             iSettings.iRemoveFileLocks);
-        LoadDFSValueL(settingsStore, KFBSettingIgnoreProtectionsAtts,       iSettings.iIgnoreProtectionsAtts);
-        LoadDFSValueL(settingsStore, KFBSettingRemoveROMWriteProtection,    iSettings.iRemoveROMWriteProrection);
-
-        CleanupStack::PopAndDestroy(); // settingsStore         
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::SaveSettingsL(TBool aNotifyModules)
-    {
-    // handle settings always in c:\\private\\102828d6\\
-    if (iEnv->FsSession().SetSessionToPrivate( KSettingsDrive ) == KErrNone)
-        {
-        // delete existing store to make sure that it is clean and not eg corrupted
-        if (BaflUtils::FileExists(iEnv->FsSession(), KSettingsFileName))
-            {
-            iEnv->FsSession().Delete(KSettingsFileName);
-            }
-        
-        // create a dictionary file store
-        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iEnv->FsSession(), KSettingsFileName, KUidFileBrowser);
-
-        SaveDFSValueL(settingsStore, KFBSettingDisplayMode,                 iSettings.iDisplayMode);
-        SaveDFSValueL(settingsStore, KFBSettingFileViewMode,                iSettings.iFileViewMode);
-        SaveDFSValueL(settingsStore, KFBSettingShowSubDirectoryInfo,        iSettings.iShowSubDirectoryInfo);
-        SaveDFSValueL(settingsStore, KFBSettingShowAssociatedIcons,         iSettings.iShowAssociatedIcons);
-        SaveDFSValueL(settingsStore, KFBSettingRememberLastPath,            iSettings.iRememberLastPath);
-        SaveDFSValueL(settingsStore, KFBSettingLastPath,                    iSettings.iLastPath);
-        SaveDFSValueL(settingsStore, KFBSettingFolderSelection,             iSettings.iRememberFolderSelection);
-        SaveDFSValueL(settingsStore, KFBSettingEnableToolbar,               iSettings.iEnableToolbar);
-
-        SaveDFSValueL(settingsStore, KFBSettingSupportNetworkDrives,        iSettings.iSupportNetworkDrives);
-        SaveDFSValueL(settingsStore, KFBSettingBypassPlatformSecurity,      iSettings.iBypassPlatformSecurity);
-        SaveDFSValueL(settingsStore, KFBSettingRemoveFileLocks,             iSettings.iRemoveFileLocks);
-        SaveDFSValueL(settingsStore, KFBSettingIgnoreProtectionsAtts,       iSettings.iIgnoreProtectionsAtts);
-        SaveDFSValueL(settingsStore, KFBSettingRemoveROMWriteProtection,    iSettings.iRemoveROMWriteProrection);
-        
-        settingsStore->CommitL();
-        CleanupStack::PopAndDestroy(); // settingsStore             
-        }
-
-    // update changes to modules
-    if (aNotifyModules)
-        {
-        //iScreenCapture->HandleSettingsChangeL();
-        if (iFileUtils != NULL) 
-			{
-			iFileUtils->HandleSettingsChangeL();
-			}
-        //iFileListContainer->HandleSettingsChangeL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CEngine::LaunchSettingsDialogL()
-    {
-	TInt retValue = KErrNone;
-	// TODO:
-    // set to normal mode
-    //iFileListContainer->SetScreenLayoutL(EDisplayModeNormal);
-    //iFileListContainer->DeleteNaviPane();
-    //iFileListContainer->HideToolbar();
-    
-    // launch the dialog and save settings
-    //CFileBrowserSettingViewDlg* dlg = CFileBrowserSettingViewDlg::NewL(iSettings);
-    //TInt retValue = dlg->ExecuteLD(R_FILEBROWSER_SETTINGS_DIALOG);        
-    //FileListContainer()->CreateEmptyNaviPaneLabelL();
-    TRAP_IGNORE(SaveSettingsL());
-    return retValue;
-    }
-	
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CAsyncWaiter* CAsyncWaiter::NewL(TInt aPriority)
-	{
-	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
-	return self;
-	}
-
-CAsyncWaiter* CAsyncWaiter::NewLC(TInt aPriority)
-	{
-	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
-	CleanupStack::PushL(self);
-	return self;
-	}
-	
-CAsyncWaiter::CAsyncWaiter(TInt aPriority) : CActive(aPriority)
-	{
-	CActiveScheduler::Add(this);
-	}	
-
-CAsyncWaiter::~CAsyncWaiter()
-	{
-	Cancel();
-	}
-	
-void CAsyncWaiter::StartAndWait()
-	{
-        iStatus = KRequestPending;
-        SetActive();
-        iWait.Start();
-	}
-	
-TInt CAsyncWaiter::Result() const
-	{
-	return iError;
-	}
-	
-void CAsyncWaiter::RunL()
-	{
-	iError = iStatus.Int();
-	//CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
-	iWait.AsyncStop();
-	}
-	
-void CAsyncWaiter::DoCancel()
-	{
-	iError = KErrCancel;
-    if( iStatus == KRequestPending )
-        {
-        TRequestStatus* s=&iStatus;
-        User::RequestComplete( s, KErrCancel );
-        }
-
-        //CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
-	iWait.AsyncStop();
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::OpenWithApparcL(TFileName aFileName)
-        {
-	if (iFileUtils != NULL) 
-		{
-		iFileUtils->OpenWithApparcL(aFileName);
-		}
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::OpenWithDocHandlerL(TFileName aFileName, TBool aEmbed)
-        {
-	if (iFileUtils != NULL) 
-		{
-		iFileUtils->OpenWithDocHandlerL(aFileName, aEmbed);
-		}
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//TInt CEngine::QueryCurrentItemIndex()
-//	{
-//        return iFileBrowserUI->QueryCurrentItemIndex();
-//	}
-
-// --------------------------------------------------------------------------------------------	
-
-TSearchAttributes CEngine::GetSearchAttributes()
-	{
-	if (iFileUtils != NULL) 
-		{
-		return iFileUtils->GetSearchAttributes();
-		} 
-	else
-		{
-		return TSearchAttributes(); 
-		}
-	}
-
-// --------------------------------------------------------------------------------------------	
-
-void CEngine::ChangeAttributes(TSearchAttributes attributes) 
-	{ 
-	if (iFileUtils != NULL) 
-		{
-		iFileUtils->ChangeAttributes(attributes); 
-		}
-	}
-
-// --------------------------------------------------------------------------------------------	
-
-TSearchResults CEngine::SearchResults() 
-	{ 
-	if (iFileUtils != NULL) 
-		{
-		return iFileUtils->SearchResults(); 
-		}
-	else
-		{
-		return TSearchResults();
-		}
-	}
-
-// --------------------------------------------------------------------------------------------	
-
-CFileEntryList* CEngine::FoundFiles() 
-	{ 
-	if (iFileUtils != NULL) 
-		{
-		return iFileUtils->FoundFiles(); 
-		}
-	else 
-		{
-		return NULL;
-		}
-	}
-	
-// --------------------------------------------------------------------------------------------	
-
-void CEngine::SearchL() 
-	{ 
-	if (iFileUtils != NULL) 
-		{
-		TRAP_IGNORE(iFileUtils->SearchL()); 
-		}
-	}
-	
-// --------------------------------------------------------------------------------------------	
-	
-// End of File
--- a/filebrowser/engine/engine.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +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 __ENGINE_H__
-#define __ENGINE_H__
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <apgcli.h>
-
-#include "FBFileUtils.h"
-
-// setting keys (do not change uids of existing keys to maintain compatibility to older versions!)
-const TUid KFBSettingDisplayMode                   = { 0x00 };
-const TUid KFBSettingFileViewMode                  = { 0x01 };
-const TUid KFBSettingShowSubDirectoryInfo          = { 0x02 };
-const TUid KFBSettingShowAssociatedIcons           = { 0x03 };
-const TUid KFBSettingRememberLastPath              = { 0x04 };
-const TUid KFBSettingLastPath                      = { 0x05 };
-
-const TUid KFBSettingSupportNetworkDrives          = { 0x06 };
-const TUid KFBSettingBypassPlatformSecurity        = { 0x07 };
-const TUid KFBSettingRemoveFileLocks               = { 0x08 };
-const TUid KFBSettingIgnoreProtectionsAtts         = { 0x09 };
-const TUid KFBSettingRemoveROMWriteProtection      = { 0x0A };
-
-const TUid KFBSettingFolderSelection               = { 0x0B };
-const TUid KFBSettingEnableToolbar                 = { 0x0C };
-
-
-// FORWARD DECLARATIONS
-class CFileBrowserFileListContainer;
-class CFileBrowserScreenCapture;
-class CFileBrowserFileUtils;
-class CEikonEnv;
-class CDictionaryFileStore;
-class MFileBrowserUI;
-
-// CLASS DECLARATIONS
-
-class TFileBrowserSettings
-    {
-public:
-    TInt                                        iDisplayMode;
-    TInt                                        iFileViewMode;
-    TBool                                       iShowSubDirectoryInfo;
-    TBool                                       iShowAssociatedIcons;
-    TBool                                       iRememberLastPath;
-    TFileName                                   iLastPath;
-    TBool                                       iRememberFolderSelection;
-    TBool                                       iEnableToolbar;
-
-    TBool                                       iSupportNetworkDrives;
-    TBool                                       iBypassPlatformSecurity;
-    TBool                                       iRemoveFileLocks;
-    TBool                                       iIgnoreProtectionsAtts;
-    TBool                                       iRemoveROMWriteProrection;
-    };
-
-// INFERFACE FOR COMMUNICATION WITH UI
-
-class MFileBrowserUI
-{
-public:
-//    /**
-//      * Method from getting current index
-//      * @return current index.
-//      */
-//    virtual TInt QueryCurrentItemIndex() = 0;
-
-    /**
-     * Shows info message with text
-     * @param A aText text to be shown in message body.
-     * @param A aTitle text to be shown in message title.
-     * @return None.
-     */
-    virtual void ShowInformationNote(const TDesC &aDescText, const TDesC &aDescTitle) = 0;
-
-    /**
-     * Shows error message with error text
-     * @param aText An error text to be shown in message.
-     * @return None.
-     */
-    virtual void ShowErrorNote(const TDesC& aText, TBool aNoTimeout = EFalse) = 0;
-
-    /**
-     * Shows confirmation message with text
-     * @param aText An text to be shown in message.
-     * @return None.
-     */
-    virtual void ShowConfirmationNote(const TDesC& aText, TBool aNoTimeout = EFalse) = 0;
-
-    /**
-     * Shows progress bar with text
-     * @param aText A text to be shown at top of the progress bar.
-     * @param aMinimum A minimum progress bar value.
-     * @param aMaximum A maximum progress bar value.
-     * @return None.
-     */
-    virtual void ShowProgressDialog(const TDesC& aDescText, TInt aMinimum, TInt aMaximum ) = 0;
-
-    /**
-     * Cancel progress dialog
-     * @return None.
-     */
-    virtual void CancelProgressDialog() = 0;
-
-    /**
-      * Set progress dialog value
-      * @param aValue A vaule to be shown at top of the progress dialog.
-      */
-    virtual void SetProgressValue(TInt aValue) = 0;
-//
-//    /**
-//     * Sets progress bar value
-//     * @param aValue A value between min and max value of the progress bar range
-//     * @return None.
-//     */
-//    virtual void SetProgressBarValue(TInt aValue) = 0;
-//
-//    /**
-//     * Hides progress bar
-//     * @return None.
-//     */
-//    virtual void HideProgressBar() = 0;
-//
-    /**
-     * Shows wait dialog with text
-     * @param aText A text to be shown at top of the wait bar.
-     * @return None.
-     */
-    virtual void ShowWaitDialog(const TDesC& aText) = 0;
-
-    /**
-     * Cancel wait dialog
-     * @return None.
-     */
-    virtual void CancelWaitDialog() = 0;
-
-    /**
-     * Processes all pending events to allow wait/progresa dialog to update itself
-     * @return None.
-     */
-    virtual void ProcessEvents() = 0;
-
-    /**
-     * Shows confirmation dialog
-     * @param aFileName String contaning file name and path
-     * @return ETrue if user pressed OK button, otherwise EFalse.
-     */
-    virtual TBool ShowConfirmationQuery(const TDesC& aDescText) = 0;
-
-    /**
-      * Notify wrapping model data has changed
-      */
-    virtual void NotifyModelHasChanged() = 0;
-
-};
-
-class CEngine : public CBase
-    {
-public:
-    static CEngine* NewL(MFileBrowserUI *aFileBrowserUI);
-    ~CEngine();
-
-private:
-    CEngine();
-    void ConstructL(MFileBrowserUI *aFileBrowserUI);
-    void LoadSettingsL();
-    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue);
-    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue);
-    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue);
-    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue);
-
-public:
-    void ActivateEngineL();
-    void DeActivateEngineL();
-    void SaveSettingsL(TBool aNotifyModules=ETrue);
-    TInt LaunchSettingsDialogL();
-    inline TFileBrowserSettings& Settings() { return iSettings; }
-    inline CEikonEnv* EikonEnv() { return iEnv; }
-    inline RApaLsSession& LsSession() { return iLs; }
-    inline CFileBrowserScreenCapture* ScreenCapture() { return iScreenCapture; }
-    inline CFileBrowserFileUtils* FileUtils() { return iFileUtils; }
-    inline MFileBrowserUI* FileBrowserUI() { return iFileBrowserUI; }
-
-    void OpenWithApparcL(TFileName aFileName);
-    void OpenWithDocHandlerL(TFileName aFileName, TBool aEmbed);
-//    TInt QueryCurrentItemIndex();
-    TSearchAttributes GetSearchAttributes();
-    void ChangeAttributes(TSearchAttributes attributes);
-    TSearchResults SearchResults();
-    CFileEntryList* FoundFiles();	
-    void SearchL();
-
-private:
-    MFileBrowserUI                  *iFileBrowserUI;
-    CFileBrowserScreenCapture       *iScreenCapture;
-    CFileBrowserFileUtils           *iFileUtils;
-    CEikonEnv*                      iEnv;
-    TFileBrowserSettings            iSettings;
-    RApaLsSession                   iLs;
-    TBool                           iIsHashKeySelectionInUse; 
-    };
-   
-
-#endif // __ENGINE_H__
--- a/filebrowser/filebrowser.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +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
-
-DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT QT_NO_DEBUG
-
-SUBDIRS = group \
-          ui
--- a/filebrowser/fileopclient/BWINS/FileBrowserFileOpClientU.DEF	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	??1CFBFileOpClient@@UAE@XZ @ 1 NONAME ; CFBFileOpClient::~CFBFileOpClient(void)
-	?Attribs@CFBFileOpClient@@QAEHABVTDesC16@@IIABVTTime@@I@Z @ 2 NONAME ; int CFBFileOpClient::Attribs(class TDesC16 const &, unsigned int, unsigned int, class TTime const &, unsigned int)
-	?Copy@CFBFileOpClient@@QAEHABVTDesC16@@0I@Z @ 3 NONAME ; int CFBFileOpClient::Copy(class TDesC16 const &, class TDesC16 const &, unsigned int)
-	?CreateEmptyFile@CFBFileOpClient@@QAEHABVTDesC16@@@Z @ 4 NONAME ; int CFBFileOpClient::CreateEmptyFile(class TDesC16 const &)
-	?Delete@CFBFileOpClient@@QAEHABVTDesC16@@I@Z @ 5 NONAME ; int CFBFileOpClient::Delete(class TDesC16 const &, unsigned int)
-	?EraseMBR@CFBFileOpClient@@QAEHI@Z @ 6 NONAME ; int CFBFileOpClient::EraseMBR(unsigned int)
-	?MkDirAll@CFBFileOpClient@@QAEHABVTDesC16@@@Z @ 7 NONAME ; int CFBFileOpClient::MkDirAll(class TDesC16 const &)
-	?NewL@CFBFileOpClient@@SAPAV1@XZ @ 8 NONAME ; class CFBFileOpClient * CFBFileOpClient::NewL(void)
-	?PartitionDrive@CFBFileOpClient@@QAEHII@Z @ 9 NONAME ; int CFBFileOpClient::PartitionDrive(unsigned int, unsigned int)
-	?Rename@CFBFileOpClient@@QAEHABVTDesC16@@0I@Z @ 10 NONAME ; int CFBFileOpClient::Rename(class TDesC16 const &, class TDesC16 const &, unsigned int)
-	?RmDir@CFBFileOpClient@@QAEHABVTDesC16@@I@Z @ 11 NONAME ; int CFBFileOpClient::RmDir(class TDesC16 const &, unsigned int)
-	?CancelOp@CFBFileOpClient@@QAEXXZ @ 12 NONAME ; void CFBFileOpClient::CancelOp(void)
-
--- a/filebrowser/fileopclient/eabi/FileBrowserFileOpClientu.def	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN15CFBFileOpClient14PartitionDriveEjj @ 1 NONAME
-	_ZN15CFBFileOpClient15CreateEmptyFileERK7TDesC16 @ 2 NONAME
-	_ZN15CFBFileOpClient4CopyERK7TDesC16S2_j @ 3 NONAME
-	_ZN15CFBFileOpClient4NewLEv @ 4 NONAME
-	_ZN15CFBFileOpClient5RmDirERK7TDesC16j @ 5 NONAME
-	_ZN15CFBFileOpClient6DeleteERK7TDesC16j @ 6 NONAME
-	_ZN15CFBFileOpClient6RenameERK7TDesC16S2_j @ 7 NONAME
-	_ZN15CFBFileOpClient7AttribsERK7TDesC16jjRK5TTimej @ 8 NONAME
-	_ZN15CFBFileOpClient8EraseMBREj @ 9 NONAME
-	_ZN15CFBFileOpClient8MkDirAllERK7TDesC16 @ 10 NONAME
-	_ZN15CFBFileOpClientD0Ev @ 11 NONAME
-	_ZN15CFBFileOpClientD1Ev @ 12 NONAME
-	_ZN15CFBFileOpClientD2Ev @ 13 NONAME
-	_ZTI15CFBFileOpClient @ 14 NONAME ; #<TI>#
-	_ZTV15CFBFileOpClient @ 15 NONAME ; #<VT>#
-	_ZN15CFBFileOpClient8CancelOpEv @ 16 NONAME
-	_ZTI18CAsyncWaiterClient @ 17 NONAME ; #<TI>#
-	_ZTV18CAsyncWaiterClient @ 18 NONAME ; #<VT>#
-
--- a/filebrowser/fileopclient/group/FBFileOpClient.mmp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-
-TARGET        FileBrowserFileOpClient.dll
-TARGETTYPE    dll
-
-CAPABILITY 	  CAP_GENERAL_DLL
-
-SMPSAFE
-
-UID           0x102828D7
-VENDORID      VID_DEFAULT
-
-
-USERINCLUDE       ../inc
-SOURCEPATH        ../src
-OS_LAYER_SYSTEMINCLUDE
-
-
-SOURCE        FBFileOpClient.cpp
-
-LIBRARY       euser.lib
--- a/filebrowser/fileopclient/group/bld.inf	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-PRJ_MMPFILES
-FBFileOpClient.mmp
--- a/filebrowser/fileopclient/inc/FBFileOpClient.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __FBFILEOPCLIENT_H__
-#define __FBFILEOPCLIENT_H__
-
-// INCLUDES
-#include <e32base.h>
-#include <f32file.h>
-#include "FBFileOpClientServer.h" // TFileOpArgs
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATIONS
-
-class RFBFileOpServerSession : public RSessionBase
-    {
-public:
-    TInt Connect();
-	
-    void Copy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch, TRequestStatus& aStatus);
-    TInt Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch); 
-    TInt Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
-    void RmDir(const TDesC& aDirName, TUint aSwitch, TRequestStatus& aStatus); 
-    void Delete(const TDesC& aName, TUint aSwitch, TRequestStatus& aStatus); 
-    TInt MkDirAll(const TDesC& aPath); 
-    TInt CreateEmptyFile(const TDesC& aName); 
-    TInt EraseMBR(TUint aDriveNumber); 
-    TInt PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions);
-    TInt CancelOp();
-
-private:
-    TVersion Version() const;
-    TPckgBuf<TFileOpArgs> iPckgBuf;
-    };
-
-
-class CFBFileOpClient : public CBase
-    {
-public:
-    IMPORT_C static CFBFileOpClient* NewL();
-    IMPORT_C ~CFBFileOpClient();
-    IMPORT_C TInt Copy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch);
-    IMPORT_C TInt Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch); 
-    IMPORT_C TInt Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
-    IMPORT_C TInt RmDir(const TDesC& aDirName, TUint aSwitch); 
-    IMPORT_C TInt Delete(const TDesC& aName, TUint aSwitch); 
-    IMPORT_C TInt MkDirAll(const TDesC& aPath); 
-    IMPORT_C TInt CreateEmptyFile(const TDesC& aName); 
-    IMPORT_C TInt EraseMBR(TUint aDriveNumber); 
-    IMPORT_C TInt PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions); 
-    IMPORT_C void CancelOp();
-    
-private:
-    CFBFileOpClient();
-    void ConstructL();
-    
- private :
-    RFBFileOpServerSession  iFBFileOpServerSession;
-    };
-
-
-/**
- * Similar class as CAsyncWaiter defined in FBUtils.h, except
- * CAsyncWaiterClient uses iWait.AsyncStop() instead of   
- * CAknEnv::StopSchedulerWaitWithBusyMessage( iWait )
- * to stop the nested loop. This class can be utilized
- * if CAknEnv is not running.
- */
-class CAsyncWaiterClient : public CActive
-    {
-public:
-    static CAsyncWaiterClient* NewL( TInt aPriority = EPriorityStandard );
-    static CAsyncWaiterClient* NewLC( TInt aPriority = EPriorityStandard );
-    ~CAsyncWaiterClient();
-    
-    void StartAndWait();
-    TInt Result() const;
-    
-private:
-    CAsyncWaiterClient( TInt aPriority );
-    
-    // from CActive
-    void RunL();
-    void DoCancel();
-    
-private:
-    CActiveSchedulerWait iWait;
-    TInt iError;
-    };
-
-#endif
-
--- a/filebrowser/fileopclient/inc/FBFileOpClientServer.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies 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 __FBCLIENTSERVER_H__
-#define __FBCLIENTSERVER_H__
-
-#include <e32std.h>
-
-const TUint KCopyServMajorVersionNumber = 1;
-const TUint KCopyServMinorVersionNumber = 0;
-const TUint KCopyServBuildVersionNumber = 0;
-
-_LIT(KMyServerName, "FileBrowserFileOpServer");
-_LIT(KMyServerImg, "FileBrowserFileOpServer");		// EXE name
-const TUid KServerUid3 = {0x102828D8};
-
-enum TFileOpMessages
-	{
-	EFileOpCopy,
-	EFileOpRename,
-	EFileOpAttribs,
-	EFileOpRmDir,
-	EFileOpDelete,
-	EFileOpMkDirAll,
-	EFileOpCreateEmptyFile,
-	EFileOpEraseMBR,
-	EFileOpPartitionDrive,
-	EFileOpCancel
-	};
-
-class TFileOpArgs
-    {
-public:
-    TFileName   iBuf1;
-    TFileName   iBuf2;
-    TUint       iUint1;
-    TUint       iUint2;
-    TUint       iUint3;
-    TTime       iTime1;
-    };
-
-#endif
\ No newline at end of file
--- a/filebrowser/fileopclient/src/FBFileOpClient.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,481 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-// needed for client interface
-#include "FBFileOpClient.h"
-
-const TUint KDefaultMessageSlots=4;
-
-// --------------------------------------------------------------------------------------------
-
-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.
-//
-	{
-	const TUidType serverUid(KNullUid,KNullUid,KServerUid3);
-	RProcess server;
-	TInt r=server.Create(KMyServerImg,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();
-	return r;
-	}
-
-// --------------------------------------------------------------------------------------------
-
-TVersion RFBFileOpServerSession::Version(void) const
-	{
-	return(TVersion(KCopyServMajorVersionNumber,KCopyServMinorVersionNumber,KCopyServBuildVersionNumber));
-	}
-
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::Connect()
-//
-// Connect to the server, attempting to start it if necessary
-//
-	{
-	TInt retry=2;
-	for (;;)
-		{
-		TInt r=CreateSession(KMyServerName,Version(),KDefaultMessageSlots);
-		if (r!=KErrNotFound && r!=KErrServerTerminated)
-			return r;
-		if (--retry==0)
-			return r;
-		r=StartServer();
-		if (r!=KErrNone && r!=KErrAlreadyExists)
-			return r;
-		}
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void RFBFileOpServerSession::Copy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch, TRequestStatus& aStatus) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iBuf1.Copy(aSourceFullName);
-    argsStruct.iBuf2.Copy(aTargetFullName);
-    argsStruct.iUint1 = aSwitch;
-    
-    iPckgBuf = argsStruct;
-    TIpcArgs args(&iPckgBuf);
-    SendReceive(EFileOpCopy, args, aStatus);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iBuf1.Copy(anOld);
-    argsStruct.iBuf2.Copy(aNew);
-    argsStruct.iUint1 = aSwitch;
-    
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    pckgBuf = argsStruct;
-	TIpcArgs args(&pckgBuf);
-	return SendReceive(EFileOpRename, args);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iBuf1.Copy(aName);
-    argsStruct.iUint1 = aSetMask;
-    argsStruct.iUint2 = aClearMask;
-    argsStruct.iTime1 = aTime;
-    argsStruct.iUint3 = aSwitch;
-    
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    pckgBuf = argsStruct;
-	TIpcArgs args(&pckgBuf);
-	return SendReceive(EFileOpAttribs, args);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void RFBFileOpServerSession::RmDir( const TDesC& aDirName,
-                                    TUint aSwitch,
-                                    TRequestStatus& aStatus ) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iBuf1.Copy(aDirName);
-    argsStruct.iUint1 = aSwitch;
-
-    iPckgBuf = argsStruct;
-    TIpcArgs args(&iPckgBuf);
-	SendReceive(EFileOpRmDir, args, aStatus);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void RFBFileOpServerSession::Delete(const TDesC& aName, TUint aSwitch, TRequestStatus& aStatus) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iBuf1.Copy(aName);
-    argsStruct.iUint1 = aSwitch;
-
-    iPckgBuf = argsStruct;
-    TIpcArgs args(&iPckgBuf);
-	SendReceive(EFileOpDelete, args, aStatus);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::MkDirAll(const TDesC& aPath) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iBuf1.Copy(aPath);
-    
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    pckgBuf = argsStruct;
-	TIpcArgs args(&pckgBuf);
-	return SendReceive(EFileOpMkDirAll, args);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::CreateEmptyFile(const TDesC& aName) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iBuf1.Copy(aName);
-    
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    pckgBuf = argsStruct;
-	TIpcArgs args(&pckgBuf);
-	return SendReceive(EFileOpCreateEmptyFile, args);
-    }
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::EraseMBR(TUint aDriveNumber) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iUint1 = aDriveNumber;
-        
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    pckgBuf = argsStruct;
-	TIpcArgs args(&pckgBuf);
-	return SendReceive(EFileOpEraseMBR, args);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions) 
-    {
-    TFileOpArgs argsStruct = TFileOpArgs();
-    argsStruct.iUint1 = aDriveNumber;
-    argsStruct.iUint2 = aNumberOfPartitions;
-        
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    pckgBuf = argsStruct;
-	TIpcArgs args(&pckgBuf);
-	return SendReceive(EFileOpPartitionDrive, args);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt RFBFileOpServerSession::CancelOp() 
-    {
-    TIpcArgs args( NULL );
-    return SendReceive( EFileOpCancel, args );
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C CFBFileOpClient* CFBFileOpClient::NewL()
-    {
-    CFBFileOpClient* self = new(ELeave) CFBFileOpClient;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C CFBFileOpClient::~CFBFileOpClient()
-    {
-    iFBFileOpServerSession.Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CFBFileOpClient::CFBFileOpClient()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpClient::ConstructL()
-    {	
-    User::LeaveIfError(iFBFileOpServerSession.Connect());
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::Copy( const TDesC& aSourceFullName,
-                                     const TDesC& aTargetFullName,
-                                     TUint aSwitch ) 
-    {
-    CAsyncWaiterClient* waiter = CAsyncWaiterClient::NewLC();
-    iFBFileOpServerSession.Copy( aSourceFullName, aTargetFullName, aSwitch, waiter->iStatus );
-    waiter->StartAndWait();
-    TInt err = waiter->Result();
-    
-    if ( err == KErrServerTerminated )
-        {
-        User::LeaveIfError( iFBFileOpServerSession.Connect() );
-        iFBFileOpServerSession.Copy( aSourceFullName, aTargetFullName, aSwitch, waiter->iStatus );
-        waiter->StartAndWait();
-        err = waiter->Result();
-        }
-    CleanupStack::PopAndDestroy( waiter );
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch) 
-    {
-    TInt err = iFBFileOpServerSession.Rename(anOld, aNew, aSwitch);
-        
-    if (err == KErrServerTerminated)
-        {
-        User::LeaveIfError(iFBFileOpServerSession.Connect());
-        err = iFBFileOpServerSession.Rename(anOld, aNew, aSwitch);
-        }
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
-    {
-    TInt err = iFBFileOpServerSession.Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
-    
-    if (err == KErrServerTerminated)
-        {
-        User::LeaveIfError(iFBFileOpServerSession.Connect());
-        err = iFBFileOpServerSession.Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
-        }
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::RmDir(const TDesC& aDirName, TUint aSwitch)
-    {
-    CAsyncWaiterClient* waiter = CAsyncWaiterClient::NewLC();
-    iFBFileOpServerSession.RmDir( aDirName, aSwitch, waiter->iStatus );
-    waiter->StartAndWait();
-    TInt err = waiter->Result();
-    
-    if ( err == KErrServerTerminated )
-        {
-        User::LeaveIfError( iFBFileOpServerSession.Connect() );
-        iFBFileOpServerSession.RmDir( aDirName, aSwitch, waiter->iStatus );
-        waiter->StartAndWait();
-        err = waiter->Result();
-        }
-    CleanupStack::PopAndDestroy( waiter );
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::Delete(const TDesC& aName, TUint aSwitch)
-    {
-    CAsyncWaiterClient* waiter = CAsyncWaiterClient::NewLC();
-    iFBFileOpServerSession.Delete(aName, aSwitch, waiter->iStatus );
-    waiter->StartAndWait();
-    TInt err = waiter->Result();
-    
-    if ( err == KErrServerTerminated )
-        {
-        User::LeaveIfError( iFBFileOpServerSession.Connect() );
-        iFBFileOpServerSession.Delete(aName, aSwitch, waiter->iStatus );
-        waiter->StartAndWait();
-        err = waiter->Result();
-        }
-    CleanupStack::PopAndDestroy( waiter );
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::MkDirAll(const TDesC& aPath) 
-    {
-    TInt err = iFBFileOpServerSession.MkDirAll(aPath);
-    
-    if (err == KErrServerTerminated)
-        {
-        User::LeaveIfError(iFBFileOpServerSession.Connect());
-        err = iFBFileOpServerSession.MkDirAll(aPath);
-        }
-            
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::CreateEmptyFile(const TDesC& aName) 
-    {
-    TInt err = iFBFileOpServerSession.CreateEmptyFile(aName);
-    
-    if (err == KErrServerTerminated)
-        {
-        User::LeaveIfError(iFBFileOpServerSession.Connect());
-        err = iFBFileOpServerSession.CreateEmptyFile(aName);
-        }
-
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::EraseMBR(TUint aDriveNumber) 
-    {
-    TInt err = iFBFileOpServerSession.EraseMBR(aDriveNumber);
-    
-    if (err == KErrServerTerminated)
-        {
-        User::LeaveIfError(iFBFileOpServerSession.Connect());
-        err = iFBFileOpServerSession.EraseMBR(aDriveNumber);
-        }
-
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C TInt CFBFileOpClient::PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions) 
-    {
-    TInt err = iFBFileOpServerSession.PartitionDrive(aDriveNumber, aNumberOfPartitions);
-    
-    if (err == KErrServerTerminated)
-        {
-        User::LeaveIfError(iFBFileOpServerSession.Connect());
-        err = iFBFileOpServerSession.PartitionDrive(aDriveNumber, aNumberOfPartitions);
-        }
-
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-EXPORT_C void CFBFileOpClient::CancelOp() 
-    {
-    TInt err = iFBFileOpServerSession.CancelOp();
-    
-    if ( err == KErrServerTerminated )
-        {
-        User::LeaveIfError( iFBFileOpServerSession.Connect() );
-        err = iFBFileOpServerSession.CancelOp(); // Ignore return value this time
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CAsyncWaiterClient* CAsyncWaiterClient::NewL( TInt aPriority )
-    {
-    CAsyncWaiterClient* self = new(ELeave) CAsyncWaiterClient( aPriority );
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CAsyncWaiterClient* CAsyncWaiterClient::NewLC( TInt aPriority )
-    {
-    CAsyncWaiterClient* self = new (ELeave) CAsyncWaiterClient( aPriority );
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CAsyncWaiterClient::CAsyncWaiterClient( TInt aPriority ) : CActive( aPriority )
-    {
-    CActiveScheduler::Add( this );
-    }   
-
-// --------------------------------------------------------------------------------------------
-
-CAsyncWaiterClient::~CAsyncWaiterClient()
-    {
-    Cancel();
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-void CAsyncWaiterClient::StartAndWait()
-    {
-    SetActive();
-    iWait.Start();
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-TInt CAsyncWaiterClient::Result() const
-    {
-    return iError;
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-void CAsyncWaiterClient::RunL()
-    {
-    iError = iStatus.Int();
-    iWait.AsyncStop();
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-void CAsyncWaiterClient::DoCancel()
-    {
-    iError = KErrCancel;
-    if( iStatus == KRequestPending )
-        {
-        TRequestStatus* s = &iStatus;
-        User::RequestComplete( s, KErrCancel );
-        }
-    iWait.AsyncStop();
-    }
-
-// --------------------------------------------------------------------------------------------
-
--- a/filebrowser/fileopserver/group/FBFileOpServer.mmp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-
-TARGET        FileBrowserFileOpServer.exe
-TARGETTYPE    exe
-UID           0 0x102828D8
-VENDORID      VID_DEFAULT
-
-CAPABILITY    CAP_FILE_SERVER
-
-SMPSAFE
-
-USERINCLUDE   ../inc
-USERINCLUDE   ../../fileopclient/inc
-OS_LAYER_SYSTEMINCLUDE
-//SYSTEMINCLUDE /epoc32/include/kernel
-SOURCEPATH    ../src
-
-
-SOURCE        FBFileOpServer.cpp
-SOURCE        FBDrivePartitioner.cpp
-
-LIBRARY       euser.lib
-LIBRARY       efsrv.lib
-LIBRARY       efile.lib
--- a/filebrowser/fileopserver/group/bld.inf	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-PRJ_MMPFILES
-FBFileOpServer.mmp
--- a/filebrowser/fileopserver/inc/FBDrivePartitioner.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __FBDRIVEPARTITIONER_H__
-#define __FBDRIVEPARTITIONER_H__
-
-#include <e32base.h>
-#include <f32file.h>
-
-class FBDrivePartioner
-    {
-public:
-    static TInt FindLocalDriveNumber(RFs& aFs, TInt aDriveNumber, TInt& aLocalDriveNum);
-    static TInt EraseMBR(RFs& aFs, TInt aDriveNumber);
-    static TInt CreatePartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount);
-    static TInt FormatPartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount);    
-    };
-
-
-#endif
--- a/filebrowser/fileopserver/inc/FBFileOpServer.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies 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 __FBFILEOPSERVER_H__
-#define __FBFILEOPSERVER_H__
-
-#include <e32base.h>
-#include <f32file.h>
-#include "FBFileOpClientServer.h"
-
-// needed for creating server thread.
-//const TUint KDefaultHeapSize=0x10000;
-
-// reasons for server panic
-enum TMyPanic
-	{
-	EPanicBadDescriptor,
-	EPanicIllegalFunction
-	};
-
-class CShutdown : public CTimer
-	{
-	enum {KMyShutdownDelay=0x200000};	// approx 2s
-
-public :
-	inline CShutdown();
-	inline void ConstructL();
-	inline void Start();
-
-private :
-	void RunL();
-	};
-
-//**********************************
-//CFBFileOpServer
-//**********************************
-/**
-Our server class - an active object - and therefore derived ultimately from CActive.
-It accepts requests from client threads and forwards
-them to the client session to be dealt with. It also handles the creation
-of the server-side client session.
-*/
-class CFBFileOpServer : public CServer2
-	{
-
-public :
-	static CServer2* NewLC();
-	void AddSession();
-	void DropSession();
-
-protected :
-
-private :
-	CFBFileOpServer();
-	void ConstructL();
-	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
-
-public :
-
-private :
-	TInt iSessionCount;
-	CShutdown iShutdown;
-	
-	};
-
-//**********************************
-//CRequestObserver
-//**********************************
-/**
-This class is for monitoring asynchronous request
-and for completing related RMessage2 object.
-*/
-class CRequestObserver : public CActive
-    {
-public:
-    CRequestObserver( TInt aPriority );
-    virtual ~CRequestObserver();
-    
-    void StartWaiting( const RMessage2& aMsg );
-    
-private:
-    // from CActive
-    void RunL();
-    void DoCancel();
-    
-private:
-    RMessage2 iMsg;
-    };
-
-
-//**********************************
-//CFBFileOpServerSession
-//**********************************
-/**
-This class represents a session with the  server.
-Functions are provided to respond appropriately to client messages.
-*/
-class CFBFileOpServerSession : public CSession2,
-                               public MFileManObserver
-	{
-
-public :
-	CFBFileOpServerSession();
-
-private: // From MFileManObserver
-    
-    TControl NotifyFileManStarted();
-    TControl NotifyFileManOperation();
-    TControl NotifyFileManEnded();
-    
-protected :
-	// panic the client
-	void PanicClient(const RMessage2& aMessage,TInt aPanic) const;
-
-private :
-	~CFBFileOpServerSession();
-	inline CFBFileOpServer& Server();
-	void CreateL();
-	
-	//service requests
-	void ServiceL(const RMessage2& aMessage);
-	void DispatchMessageL(const RMessage2& aMessage, TBool& aComplete);
-	
-	void CopyL(const RMessage2& aMessage);
-	void RenameL(const RMessage2& aMessage);
-	void AttribsL(const RMessage2& aMessage);
-	void RmDirL(const RMessage2& aMessage, TBool& aComplete);
-	void DeleteL(const RMessage2& aMessage);
-	void MkDirAllL(const RMessage2& aMessage);
-	void CreateEmptyFileL(const RMessage2& aMessage);
-	void EraseMBRL(const RMessage2& aMessage);
-	void PartitionDriveL(const RMessage2& aMessage);
-
-	void ServiceError(const RMessage2& aMessage, TInt aError);
-	
-	void CancelOp();
-					
-private :
-	RFs iFs;
-	RFile iFile;
-	CFileMan* iFileMan;
-	MFileManObserver::TControl iFileManObserverResult;
-	CRequestObserver* iReqObserver;
-	};
-
-
-//**********************************
-//Inlines
-//**********************************
-
-inline CShutdown::CShutdown()
-	:CTimer(-1)
-	{CActiveScheduler::Add(this);}
-
-inline void CShutdown::ConstructL()
-	{CTimer::ConstructL();}
-
-inline void CShutdown::Start()
-	{After(KMyShutdownDelay);}
-
-inline CFBFileOpServer::CFBFileOpServer()
-	:CServer2(0,ESharableSessions)
-	{}
-
-inline CFBFileOpServerSession::CFBFileOpServerSession()
-	{}
-
-inline CFBFileOpServer& CFBFileOpServerSession::Server()
-	{return *static_cast<CFBFileOpServer*>(const_cast<CServer2*>(CSession2::Server()));}
-
-#endif
--- a/filebrowser/fileopserver/src/FBDrivePartitioner.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,454 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies 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 <e32test.h>
-#include <e32std.h>
-#include <f32fsys.h>
-#include <e32property.h>
-
-#include "FBDrivePartitioner.h"
-
-
-// copied from coreapplicationuisdomainpskeys.h
-const TUid KPSUidCoreApplicationUIs = { 0x101F8767 };
-const TUint32 KCoreAppUIsMmcRemovedWithoutEject = 0x00000109;
-enum TCoreAppUIsMmcRemovedWithoutEject
-    {
-    ECoreAppUIsEjectCommandUsedUninitialized = 0,
-    ECoreAppUIsEjectCommandNotUsed,
-    ECoreAppUIsEjectCommandUsed,
-    ECoreAppUIsEjectCommandUsedToDrive // Low 16-bits contain this value and high 16-bits TDriveNumber to eject
-    };
-
-
-// trace macros
-#define TRACE(a) {_LIT( KMsg, a ); RDebug::Print(KMsg);}
-#define TRACE1(a,b) {_LIT( KMsg, a ); RDebug::Print(KMsg,b);}
-#define TRACE2(a,b,c) {_LIT( KMsg, a ); RDebug::Print(KMsg,b,c);}
-
-	
-// Set the partition alignment boundary
-const TInt KPartitionAlignment = 0x1000; // 4kB
-const TInt KMBRSize = 512;
-const TInt KSectorSize = 512;
-const TInt KMBRPartitionInfoOffset = 0x1BE;
-const TInt KLargeFAT16Partition = 0x2000000; // 32MB
-const TInt KPartitionEntrySize = 16;
-
-// Set for the iX86BootIndicator
-//const TInt KPartitionBootable = 0x80;
-const TInt KPartitionNonBootable = 0x0;
-
-
-class TMBRPartition
-	{
-public:
-	TUint8 iX86BootIndicator;
-	TUint8 iStartHead;
-	TUint8 iStartSector;
-	TUint8 iStartCylinder;
-	TUint8 iPartitionType;
-	TUint8 iEndHead;
-	TUint8 iEndSector;
-	TUint8 iEndCylinder;
-	TUint32 iFirstSector;
-	TUint32 iNumSectors;
-	};
-
-
-// --------------------------------------------------------------------------------------------
-
-TInt FBDrivePartioner::FindLocalDriveNumber(RFs& aFs, TInt aDriveNumber, TInt& aLocalDriveNum)
-    {
-    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: start aDriveNumber=%d", aDriveNumber );
-
-    TInt err(KErrNone);
-    
-    TDriveInfo driveInfo;
-    err = aFs.Drive(driveInfo, aDriveNumber);
-
-    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: get DriveInfo err=%d", err );
-
-
-    TVolumeInfo vi;
-    err = aFs.Volume(vi, aDriveNumber);
-
-    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: get VolumeInfo err=%d", err );
-
-
-    TMediaSerialNumber serialNum;
-    err = aFs.GetMediaSerialNumber(serialNum, aDriveNumber);
-
-    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: get MediaSerialNumber err=%d", err );
-
-
-    TInt len = serialNum.Length();
-    TInt n(0);
-    for (n=0; n<len; n+=16)
-        {
-        TBuf16<16*3 +1> buf;
-        for (TInt m=n; m<n+16; m++)
-            {
-            TBuf16<3> hexBuf;
-            hexBuf.Format(_L("%02X "),serialNum[m]);
-            buf.Append(hexBuf);
-            }
-        buf.Append(_L("\n"));
-        }
-
-    TBusLocalDrive drv;
-    TBool chg(EFalse);
-    aLocalDriveNum = -1;
-    for (n=0; n<KMaxLocalDrives; n++)
-        {
-        TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: drv.Connect drive %d", n );
-        err = drv.Connect(n, chg); //for user area
-        TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: drv.Connect returns %d", err );
-
-        if(err != KErrNone)
-            {
-            continue;
-            }    
-
-        TLocalDriveCapsV5Buf capsBuf;
-        TLocalDriveCapsV5& caps = capsBuf();
-        err = drv.Caps(capsBuf);
-        TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: drv.Caps returns %d", err );
-
-        if(err != KErrNone)
-            {
-            continue;
-            }    
-
-        TPtrC8 localSerialNum(caps.iSerialNum, caps.iSerialNumLength);
-        if (serialNum.Compare(localSerialNum) == 0)
-            {
-            TBool sizeMatch = (vi.iSize < caps.iSize)?ETrue:EFalse;
-            if (sizeMatch)
-                {
-                aLocalDriveNum = n;
-                TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: sizeMatch for localDrive %d", n );
-                }
-            else
-                {
-                TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: sizeMatch failed for localDrive %d", n );
-                }
-
-            }
-
-        drv.Disconnect();
-        }
-
-    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: localDriveNum=%d", aLocalDriveNum );
-
-    err = aLocalDriveNum == -1 ? KErrNotFound : KErrNone;
-    
-    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: returns %d", err );
-    return err;    
-
-    }
-	
-// --------------------------------------------------------------------------------------------
-
-TInt FBDrivePartioner::EraseMBR(RFs& aFs, TInt aDriveNumber)
-	{
-    TRACE1( "FBDrivePartitioner::EraseMBR: start aDriveNumber=%d", aDriveNumber );
-
-    // Prevent SysAp shutting down applications
-    RProperty::Set(
-        KPSUidCoreApplicationUIs,
-        KCoreAppUIsMmcRemovedWithoutEject,
-        ECoreAppUIsEjectCommandUsed );
-
-	TInt err(KErrNone);
-
-	TInt localDriveNumber;
-	err = FindLocalDriveNumber(aFs, aDriveNumber, localDriveNumber);
-	
-	if (err != KErrNone)
-	    {
-    	TRACE1("FBDrivePartitioner::EraseMBR: FindLocalDriveNumber err=%d returning", err); 
-	    return err;
-	    }
-	
-	TRACE1("FBDrivePartitioner::EraseMBR: connecting to local drive %d", localDriveNumber); 
-
-	TBusLocalDrive drv;
-	TBool chg(EFalse);
-	err = drv.Connect(localDriveNumber, chg); //for user area
-
-	TRACE1("FBDrivePartitioner::EraseMBR: drv.Connect %d", err);
-
-	
-	TRACE("FBDrivePartitioner::EraseMBR: Now start to invalidate MBR"); 
-
-	// create a buffers of zeros
-	TBuf8<KMBRSize> mbrBuf;
-	mbrBuf.Fill(0, mbrBuf.MaxLength());
-
-/*	
-	// write the next 16 sectors with the buffer. Usually you only write the first one, but this one should erase any following invalid sectors
-	for (TInt i=0; i<16; i++)
-	    {
-    	err = drv.Write(i*KMBRSize, KMBRSize, &mbrBuf, -1 , 0, 0x40000000);  // RLocalDrive::ELocDrvWholeMedia==0x40000000
-       	TRACE2("FBDrivePartitioner::EraseMBR: sector %d, write returns %d", i+1, err); 
-	    }
-*/
-
-    // erase the MBR
-	err = drv.Write(0, KMBRSize, &mbrBuf, -1 , 0, 0x40000000);  // RLocalDrive::ELocDrvWholeMedia==0x40000000
-   	TRACE1("FBDrivePartitioner::EraseMBR: write returns %d", err); 
-
-	drv.Disconnect();
-
-	// force a remount, if this is the protected area, then it will have to be remounted
-    TRACE1( "FBDrivePartitioner::EraseMBR: Remounting drive number %d", aDriveNumber );
-	TInt err2 = aFs.RemountDrive(aDriveNumber, NULL, 0);
-    TRACE1( "FBDrivePartitioner::EraseMBR: RemountDrive err2=%d", err2 );
-
-    TRACE1( "FBDrivePartitioner::EraseMBR: returns %d", err );
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt FBDrivePartioner::CreatePartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount)
-	{
-    TRACE2( "FBDrivePartitioner::CreatePartitions: start aDriveNumber=%d aPartCount=%d", aDriveNumber, aPartCount );
-	TInt err(KErrNone);
-
-    TUint8 MBRPartitionInfo[ KPartitionEntrySize*KMBRMaxPrimaryPartitions ];
-
-    // Prevent SysAp shutting down applications
-    RProperty::Set(
-        KPSUidCoreApplicationUIs,
-        KCoreAppUIsMmcRemovedWithoutEject,
-        ECoreAppUIsEjectCommandUsed );
-
-	// Force the system to read the memory card erased MBR
-	err = aFs.RemountDrive( aDriveNumber );
-	TRACE1( "FBDrivePartitioner::CreatePartitions: Remount result %d", err );
-	
-	// Get the number of partitions from user
-    TUint8 partitionCount(aPartCount);
-	TBool change = EFalse;
-	TInt mcDriveNbr(2);
-	TLocalDriveCapsV4 dc;
-	TInt64 diskSpace(0);
-
-/*
-	err = FindLocalDriveNumber(aFs, aDriveNumber, mcDriveNbr);
-	
-	if (err != KErrNone)
-	    {
-    	TRACE1("FBDrivePartitioner::CreatePartitions: FindLocalDriveNumber err=%d returning", err); 
-	    return err;
-	    }
-*/
-
-	// Seek through the system drives to find memory card drive
-	for (TInt i = 0; i < KMaxLocalDrives; ++i)
-		{
-		RLocalDrive	d;
-		change = EFalse;
-		err = d.Connect(i, change);
-		if (err == KErrNone)
-			{
-			TPckg<TLocalDriveCapsV4> capsPack(dc);
-			
-			if (d.Caps(capsPack) == KErrNone)
-				{
-				if (dc.iType == EMediaHardDisk)
-					{
-					mcDriveNbr = i;
-					diskSpace  = dc.iSize;
-                 	TRACE1( "FBDrivePartitioner::CreatePartitions: found hard drive %d:", mcDriveNbr );
-					}
-				}
-			d.Close();
-			}
-		}
-
-	// Connect to the local drive we found
-	RLocalDrive	localDrive;
-	change = EFalse;
-    err = localDrive.Connect( mcDriveNbr, change );
- 	TRACE2( "FBDrivePartitioner::CreatePartitions: localDrive.Connect %d: %d", mcDriveNbr, err );
-	TRACE1( "FBDrivePartitioner::CreatePartitions: diskSpace in sectors 0x%x, %d", diskSpace / KSectorSize );
-
-	// Let's read the MBR by using RLocalDrive
-	TUint8 data[KMBRSize];
-	TPtr8 buf( &data[0], KMBRSize );
-	err = localDrive.Read( 0, KMBRSize, buf );
-	TRACE1( "FBDrivePartitioner::CreatePartitions: localDrive.Read %d", err );
-	// Let's check the current drive layout here
-	memcpy( MBRPartitionInfo, &data[KMBRPartitionInfoOffset],(sizeof(TMBRPartition)<<2)); 
-	TMBRPartition *partitionInfo = (TMBRPartition*) MBRPartitionInfo;
-
-	// Clean the rest of the MBR buffer
-	buf.FillZ();
-
-	// Print out the partition info
-	for( TInt i = 0; i<KMBRMaxPrimaryPartitions; i++ )
-		{
-		TRACE1( "FBDrivePartitioner::CreatePartitions: Partition %d", i+1 );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iX86BootIndicator %x", partitionInfo[i].iX86BootIndicator );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartHead        %x", partitionInfo[i].iStartHead );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartSector      %x", partitionInfo[i].iStartSector );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartCylinder    %x", partitionInfo[i].iStartCylinder );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iPartitionType    %x", partitionInfo[i].iPartitionType );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndHead          %x", partitionInfo[i].iEndHead );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndSector        %x", partitionInfo[i].iEndSector );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndCylinder      %x", partitionInfo[i].iEndCylinder );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iFirstSector      %x", partitionInfo[i].iFirstSector );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iNumSectors       %x", partitionInfo[i].iNumSectors );
-		}
-
-	// Calculate partition size	
-	TRACE( "FBDrivePartitioner::CreatePartitions: Calculating partition size" );
-	TInt64 partitionSize = (diskSpace / partitionCount) - KPartitionAlignment;
-	//TRACE1( "FBDrivePartitioner::CreatePartitions: PartitionSize in sectors 0x%x", partitionSize/KSectorSize );
-	TRACE1( "FBDrivePartitioner::CreatePartitions: Size of the partition is %Ld bytes", partitionSize );
-
-	// Activate the specified amount of partitions 
-	for( TInt i = 0; i < KMBRMaxPrimaryPartitions; i++ )
-		{
-		if( i < partitionCount )
-			{
-			if( partitionSize <= KLargeFAT16Partition )
-				{
-				partitionInfo[i].iPartitionType = KPartitionTypeFAT16small;
-				}
-			else
-				{
-				partitionInfo[i].iPartitionType = KPartitionTypeFAT16;
-				}
-			partitionInfo[i].iX86BootIndicator = KPartitionNonBootable;
-			}
-		else
-			{
-			partitionInfo[i].iX86BootIndicator = 0;
-			partitionInfo[i].iPartitionType = 0;
-			}
-		}
-
-	TRACE( "FBDrivePartitioner::CreatePartitions: Set first partition start address and change to sector addresses" );
-
-	// Set first partition start address
-	TInt64 offSet = KPartitionAlignment;
-	// Change to sector addresses
-	offSet = offSet / KSectorSize;
-
-	// Align and set the partitions
-	for( TInt i = 0; i < KMBRMaxPrimaryPartitions; i++ )
-		{
-		if( i < partitionCount )
-			{
-			// Start sector
-			partitionInfo[i].iFirstSector = offSet;
-			// Number of sectors in a partition
-			partitionInfo[i].iNumSectors = partitionSize / KSectorSize;
-			// Start of the next partition
-			offSet += ((partitionSize &~ (KPartitionAlignment - 1)) / KSectorSize);
-			}
-		else
-			{
-			partitionInfo[i].iFirstSector = 0;
-			partitionInfo[i].iNumSectors = 0;
-			}
-		// Start address HDD
-		partitionInfo[i].iStartHead = 0;
-		partitionInfo[i].iStartSector = 0;
-		partitionInfo[i].iStartCylinder = 0;
-		// End address HDD
-		partitionInfo[i].iEndHead = 0;
-		partitionInfo[i].iEndSector = 0;
-		partitionInfo[i].iEndCylinder = 0;
-
-		}
-
-	// Print out the new partition boot record
- 	TRACE( "FBDrivePartitioner::CreatePartitions: Partitions created" );
-	for( TInt i = 0; i<KMBRMaxPrimaryPartitions; i++ )
-		{
-		TRACE1("FBDrivePartitioner::CreatePartitions: Partition %d", i+1 );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iX86BootIndicator %x", partitionInfo[i].iX86BootIndicator );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartHead        %x", partitionInfo[i].iStartHead );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartSector      %x", partitionInfo[i].iStartSector );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartCylinder    %x", partitionInfo[i].iStartCylinder );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iPartitionType    %x", partitionInfo[i].iPartitionType );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndHead          %x", partitionInfo[i].iEndHead );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndSector        %x", partitionInfo[i].iEndSector );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndCylinder      %x", partitionInfo[i].iEndCylinder );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iFirstSector      %x", partitionInfo[i].iFirstSector );
-		TRACE1( "FBDrivePartitioner::CreatePartitions: iNumSectors       %x", partitionInfo[i].iNumSectors );
-		}
-
-	// Copy the new layout to MBR buffer
- 	TRACE( "FBDrivePartitioner::CreatePartitions: Copy the new layout to MBR buffer" );
-	memcpy( &data[KMBRPartitionInfoOffset], MBRPartitionInfo, (sizeof(TMBRPartition)<<2) ); 
-
-	// Make sure we have a valid signature
- 	TRACE( "FBDrivePartitioner::CreatePartitions: Make sure we have a valid signature" );
-	*(TUint16*)(&data[KMBRSignatureOffset]) = 0xAA55;
-
-	// Now flush the new partition layout
- 	TRACE( "FBDrivePartitioner::CreatePartitions: Flush the new partition layout" );
-	err = localDrive.Write( 0, buf );
-	TRACE1( "FBDrivePartitioner::CreatePartitions: localDrive.Write err=%d", err );
-	localDrive.Close();
-
-    TRACE1( "FBDrivePartitioner::CreatePartitions: returns %d", err );
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt FBDrivePartioner::FormatPartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount)
-	{
-    TRACE2( "FBDrivePartitioner::FormatPartitions: aDriveNumber=%d aPartCount=%d", aDriveNumber, aPartCount );
-    TInt err(KErrNone);
-
-    for( TInt i = 0; i < aPartCount; i++ )
-        {
-        TDriveName name(TDriveUnit(aDriveNumber + i).Name());
-        TRACE1( "FBDrivePartitioner::FormatPartitions: Format %S start", &name );
-        RFormat fmt;
-        TInt count(0);
-        err = fmt.Open(aFs, name, EQuickFormat, count);
-        TRACE1( "FBDrivePartitioner::FormatPartitions: Format open=%d", err );
-        while (count > 0)
-            {
-            err = fmt.Next(count);
-            if (err != KErrNone)
-                {
-                TRACE1( "FBDrivePartitioner::FormatPartitions: Format error=%d", err );
-                break;
-                }
-            }
-        fmt.Close();
-        TRACE1( "FBDrivePartitioner::FormatPartitions: Format %S end", &name );
-	    }
-
-    TRACE1("FBDrivePartitioner::FormatPartitions returns %d", err);
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
--- a/filebrowser/fileopserver/src/FBFileOpServer.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,474 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies 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 "FBFileOpServer.h"
-#include "FBDrivePartitioner.h"
-
-#include <e32svr.h>
-#include <bautils.h>
-
-// --------------------------------------------------------------------------------------------
-
-//***********************************
-//CFBFileOpServer - implementations
-//***********************************
-
-CServer2* CFBFileOpServer::NewLC()
-	{
-	CFBFileOpServer* self = new(ELeave) CFBFileOpServer;
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	return self;
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//
-// 2nd phase construction - ensure the timer and server objects are running
-//
-void CFBFileOpServer::ConstructL()
-	{
-	StartL(KMyServerName);
-	iShutdown.ConstructL();
-	// ensure that the server still exits even if the 1st client fails to connect
-	iShutdown.Start();
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//
-// Cretae a new client session. This should really check the version number.
-//
-CSession2* CFBFileOpServer::NewSessionL(const TVersion&,const RMessage2&) const
-	{
-	return new(ELeave) CFBFileOpServerSession();
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//
-// A new session is being created
-// Cancel the shutdown timer if it was running
-//
-void CFBFileOpServer::AddSession()
-	{
-	++iSessionCount;
-	iShutdown.Cancel();
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//
-// A session is being destroyed
-// Start the shutdown timer if it is the last session.
-//
-void CFBFileOpServer::DropSession()
-	{
-	if (--iSessionCount==0)
-		iShutdown.Start();
-	}
-
-// --------------------------------------------------------------------------------------------
-    
-CRequestObserver::CRequestObserver( TInt aPriority ) : CActive( aPriority )
-    {
-    CActiveScheduler::Add( this );
-    }   
-
-CRequestObserver::~CRequestObserver()
-    {
-    Cancel();
-    }
-    
-void CRequestObserver::StartWaiting( const RMessage2& aMsg )
-    {
-    iMsg = aMsg;
-    SetActive();
-    }
-    
-void CRequestObserver::RunL()
-    {
-    iMsg.Complete( iStatus.Int() );
-    }
-    
-void CRequestObserver::DoCancel()
-    {
-    iMsg.Complete( KErrCancel );
-    }
-
-// --------------------------------------------------------------------------------------------
-
-//***********************************
-//CFBFileOpServerSession - implementations
-//***********************************
-
-//
-// 2nd phase construct for sessions - called by the CServer framework
-//
-void CFBFileOpServerSession::CreateL()
-	{
-	User::LeaveIfError(iFs.Connect());
-	iFileMan = CFileMan::NewL( iFs, this );
-	iReqObserver = new (ELeave) CRequestObserver( CActive::EPriorityStandard );
-	Server().AddSession();
-	}
-
-// --------------------------------------------------------------------------------------------
-
-CFBFileOpServerSession::~CFBFileOpServerSession()
-	{
-	if (iFileMan)
-		{
-		delete iFileMan;
-		iFileMan = NULL;
-		}
-	iFs.Close();
-	delete iReqObserver;
-	Server().DropSession();
-	}
-
-// --------------------------------------------------------------------------------------------
-	
-/**
-Services a client request.
-*/
-void CFBFileOpServerSession::ServiceL(const RMessage2& aMessage)
-	{
-	TBool completeImmediately( ETrue );
-	TRAPD( err,DispatchMessageL( aMessage, completeImmediately ) );
-	if ( completeImmediately ) aMessage.Complete( err );
-	}
-
-// --------------------------------------------------------------------------------------------
-
-/**
-Called by ServiceL()
-
-It tests the function code and then delegates to
-the appropriate function.
-*/
-void CFBFileOpServerSession::DispatchMessageL(const RMessage2& aMessage, TBool& aComplete)
-	{
-	switch (aMessage.Function())
-        {
-        case EFileOpCopy:
-            CopyL(aMessage);
-            aComplete = EFalse;
-            return;
-
-        case EFileOpRename:
-            RenameL(aMessage);
-            return;            
-
-        case EFileOpAttribs:
-            AttribsL(aMessage);
-            return; 
-
-        case EFileOpRmDir:
-            RmDirL(aMessage, aComplete);
-            return; 
-
-        case EFileOpDelete:
-            DeleteL(aMessage);
-            aComplete = EFalse;
-            return; 
-
-        case EFileOpMkDirAll:
-            MkDirAllL(aMessage);
-            return;             
-
-        case EFileOpCreateEmptyFile:
-            CreateEmptyFileL(aMessage);
-            return;            
-
-        case EFileOpEraseMBR:
-            EraseMBRL(aMessage);
-            return;
-            
-        case EFileOpPartitionDrive:
-            PartitionDriveL(aMessage);
-            return;
-            
-        case EFileOpCancel: 
-            CancelOp();
-            return; 
-            
-        default:
-            PanicClient(aMessage, EPanicIllegalFunction);
-            return;
-        }
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::CopyL( const RMessage2& aMessage )
-    {
-    __ASSERT_ALWAYS( iReqObserver && !iReqObserver->IsActive(), User::Leave( KErrServerBusy ) );
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL( 0, pckgBuf, 0 );
-    TFileOpArgs argsStruct = pckgBuf();
-
-    TInt err = iFileMan->Copy( argsStruct.iBuf1, argsStruct.iBuf2, argsStruct.iUint1, iReqObserver->iStatus );
-    User::LeaveIfError( err );
-    iFileManObserverResult = MFileManObserver::EContinue;
-    iReqObserver->StartWaiting( aMessage ); // start asynchronous waiting
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::RenameL(const RMessage2& aMessage)
-    {
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL(0, pckgBuf, 0);
-    TFileOpArgs argsStruct = pckgBuf();
-    
-    iFileManObserverResult = MFileManObserver::EContinue;
-    User::LeaveIfError(iFileMan->Rename(argsStruct.iBuf1, argsStruct.iBuf2, argsStruct.iUint1));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::AttribsL(const RMessage2& aMessage)
-    {
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL(0, pckgBuf, 0);
-    TFileOpArgs argsStruct = pckgBuf();
-    
-    iFileManObserverResult = MFileManObserver::EContinue;
-    User::LeaveIfError(iFileMan->Attribs(argsStruct.iBuf1, argsStruct.iUint1, argsStruct.iUint2, argsStruct.iTime1, argsStruct.iUint3));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::RmDirL( const RMessage2& aMessage, TBool& aComplete )
-    {
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL( 0, pckgBuf, 0 );
-    TFileOpArgs argsStruct = pckgBuf();
-    
-    if ( argsStruct.iUint1 & CFileMan::ERecurse )
-        {
-        __ASSERT_ALWAYS( iReqObserver && !iReqObserver->IsActive(), User::Leave( KErrServerBusy ) );
-        User::LeaveIfError( iFileMan->RmDir( argsStruct.iBuf1, iReqObserver->iStatus ) );
-        iFileManObserverResult = MFileManObserver::EContinue;
-        aComplete = EFalse;
-        iReqObserver->StartWaiting( aMessage ); // start asynchronous waiting
-        }
-    else
-        {
-        iFileManObserverResult = MFileManObserver::EContinue;
-        User::LeaveIfError( iFs.RmDir( argsStruct.iBuf1 ) );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::DeleteL( const RMessage2& aMessage )
-    {
-    __ASSERT_ALWAYS( iReqObserver && !iReqObserver->IsActive(), User::Leave( KErrServerBusy ) );
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL( 0, pckgBuf, 0 );
-    TFileOpArgs argsStruct = pckgBuf();
-    
-    User::LeaveIfError( iFileMan->Delete(argsStruct.iBuf1, argsStruct.iUint1, iReqObserver->iStatus ) ); 
-    iFileManObserverResult = MFileManObserver::EContinue;
-    iReqObserver->StartWaiting( aMessage ); // start asynchronous waiting
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::MkDirAllL(const RMessage2& aMessage)
-    {
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL(0, pckgBuf, 0);
-    TFileOpArgs argsStruct = pckgBuf();
-    
-    User::LeaveIfError(iFs.MkDirAll(argsStruct.iBuf1));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::CreateEmptyFileL(const RMessage2& aMessage)
-    {
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL(0, pckgBuf, 0);
-    TFileOpArgs argsStruct = pckgBuf();
-    
-    TInt err(KErrNone);
-    RFile newFile;
-    err = newFile.Create(iFs, argsStruct.iBuf1, EFileShareExclusive);
-    if (err == KErrNone)
-        err = newFile.Flush(); 
-    newFile.Close(); 
-    
-    User::LeaveIfError(err);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::EraseMBRL(const RMessage2& aMessage)
-    {
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL(0, pckgBuf, 0);
-    TFileOpArgs argsStruct = pckgBuf();
-
-	RFs fs;
-	CleanupClosePushL(fs);
-	User::LeaveIfError(fs.Connect());
-
-    User::LeaveIfError(FBDrivePartioner::EraseMBR(fs, argsStruct.iUint1));
-
-    CleanupStack::PopAndDestroy(); //fs
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::PartitionDriveL(const RMessage2& aMessage)
-    {
-    TPckgBuf<TFileOpArgs> pckgBuf;
-    aMessage.ReadL(0, pckgBuf, 0);
-    TFileOpArgs argsStruct = pckgBuf();
-
-	RFs fs;
-	CleanupClosePushL(fs);
-	User::LeaveIfError(fs.Connect());
-
-    FBDrivePartioner::CreatePartitions(fs, argsStruct.iUint1, argsStruct.iUint2);
-    User::LeaveIfError(FBDrivePartioner::FormatPartitions(fs, argsStruct.iUint1, argsStruct.iUint2));
-
-    CleanupStack::PopAndDestroy(); //fs
-    }
-               
-// --------------------------------------------------------------------------------------------
-
-//
-// Panics the client
-//
-void CFBFileOpServerSession::PanicClient(const RMessage2& aMessage, TInt aPanic) const
-	{
-	_LIT(KTxtServer,"FBFileOpServer");
-	aMessage.Panic(KTxtServer, aPanic);
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//
-// Handle an error from CFBFileOpServerSession::ServiceL()
-// A bad descriptor error implies a badly programmed client, so panic it;
-// otherwise use the default handling (report the error to the client)
-//
-void CFBFileOpServerSession::ServiceError(const RMessage2& aMessage, TInt aError)
-	{
-	if (aError==KErrBadDescriptor)
-		PanicClient(aMessage,EPanicBadDescriptor);
-	CSession2::ServiceError(aMessage,aError);
-	}
-
-// --------------------------------------------------------------------------------------------
-
-MFileManObserver::TControl CFBFileOpServerSession::NotifyFileManStarted()
-    {
-    return iFileManObserverResult;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-MFileManObserver::TControl CFBFileOpServerSession::NotifyFileManOperation()
-    {
-    return iFileManObserverResult;
-    }
-// --------------------------------------------------------------------------------------------
-
-MFileManObserver::TControl CFBFileOpServerSession::NotifyFileManEnded()
-    {
-    return iFileManObserverResult;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CFBFileOpServerSession::CancelOp()
-    {
-    iFileManObserverResult = MFileManObserver::ECancel;
-    iReqObserver->Cancel();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-//**********************************
-//Global functions
-//**********************************
-
-//
-// Initiate server exit when the timer expires
-//
-void CShutdown::RunL()
-	{
-	CActiveScheduler::Stop();
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//
-// Perform all server initialisation, in particular creation of the
-// scheduler and server and then run the scheduler
-//
-static void RunServerL()
-	{
-	// naming the server thread after the server helps to debug panics
-	User::LeaveIfError(RThread::RenameMe(KMyServerName));
-	//
-	// create and install the active scheduler we need
-	CActiveScheduler* s=new(ELeave) CActiveScheduler;
-	CleanupStack::PushL(s);
-	CActiveScheduler::Install(s);
-	//
-	// create the server (leave it on the cleanup stack)
-	CFBFileOpServer::NewLC();
-	//
-	// Initialisation complete, now signal the client
-	RProcess::Rendezvous(KErrNone);
-	//
-	// Ready to run
-	CActiveScheduler::Start();
-	//
-	// Cleanup the server and scheduler
-	CleanupStack::PopAndDestroy(2);
-	}
-
-// --------------------------------------------------------------------------------------------
-
-//
-// Server process entry-point
-//
-TInt E32Main()
-	{
-	__UHEAP_MARK;
-	//
-	CTrapCleanup* cleanup=CTrapCleanup::New();
-	TInt r=KErrNoMemory;
-	if (cleanup)
-		{
-		TRAP(r,RunServerL());
-		delete cleanup;
-		}
-	//
-	__UHEAP_MARKEND;
-	return r;
-	}
-
-// --------------------------------------------------------------------------------------------
--- a/filebrowser/group/ReleaseNotes_FileBrowser.txt	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +0,0 @@
-===============================================================================
-
-RELEASE NOTES - FILEBROWSER v5.2.0
-RELEASED 27th August 2010
-
-SUPPORTS S60 3.0+
-
-===============================================================================
-
-Product Description:
-====================
-The FileBrowser tool can be used to browse directory hierarchies and perform 
-file operations under the S60 environment. It also contains some smaller tools 
-and functionalities that help RnD development and verification.
-
-Main Features:
-==============
-- Showing a drive list
-- Browsing through directory hierarchies
-- Disk admin tools for generic disk operations
-- Searching files with different parameters
-- Full clipboard functionality
-- Copying/moving files with the help of a separate dialog
-- Creating new files and directories
-- Showing properties of files, directories and disks
-- Sending, deleting, renaming, touching, setting attributes,
-  compressing and uncompressing of files
-- Recursive directory support
-- Sorting and ordering file view
-- Filtering entries with a search field
-- Text and hex viewer for files
-- A settings screen for altering different kind of settings
-- Data type viewer/editor
-- Ability to give TCB capability for file operations
-- Showing message attachments from Symbian messaging store
-- Touch UI toolbar (S60 5.x only)
-
-===============================================================================
-
-What's New in v5.2.0
-====================
-- Error fixes
-- Destination folder selection dialog
-
-===============================================================================
-
-Installation Notes:
-===================
-FileBrowser is typically preinstalled on ROM. If not, it can be added to the
-ROM with the .iby file. Alternatively, the .sis file can be found under the sis-
-directory, but the user need to sign it with their own developer certificate.
-In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
-internal\sis directory.
-
-FileBrowser is provided as full and lite version. Lite version is aimed for
-those who cannot sign with TCB capability. Lite version can be generated by
-defining FILEBROWSER_LITE flag and then by recompiling the application and
-regenerating the sis file.
-
-When signing with own developer certificate, the following capabilities are
-needed in the lite version:
-  ReadDeviceData
-  WriteDeviceData
-  DiskAdmin
-  AllFiles
-  SwEvent
-  NetworkServices
-  LocalServices
-  ReadUserData
-  WriteUserData
-  Location
-  UserEnvironment
-  
-The full version requires these addtional capabilities:
-  CommDD
-  PowerMgmt
-  MultimediaDD
-  DRM
-  TrustedUI
-  ProtServ
-  NetworkControl
-  SurroundingsDD
-  TCB
-
-When builing FileBrowser against S60 3.0 or 3.1, you may need to patch your SDK
-environment first with some fixes. For more information, please refer to the
-instructions under the "envpatcher" directory.  
-
-===============================================================================
-
-System Requirements:
-====================
-Basic Requirements:
-- Any S60 3.x device or emulator environment
-
-===============================================================================
-
-Compatibility Issues:
-=====================
-N/A
-
-===============================================================================
-
-Known Issues:
-=============
-N/A
-
-===============================================================================
-
-Version History:
-================
-
-Version 5.1.1 - 26th June 2010
-====================
-- Error fixes
-- File attributes
-
-Version 5.1.0  - 18th June 2010
-====================
-- Error fixes
-- File filtering
-- Usability improvements
-
-Version 5.0.1 - 21th May 2010
-====================
-- Error fixes
-- All files to text file with file sizes
-- Usability improvements
-
-Version 5.0.0 - 23th April 2010
------------------------------
-- Orbit UI
-
-Version 4.5.2 - 10th December 2009
------------------------------
-- Fix: UI layout problems fixed
-- Fix: Filebrowser crashes with too long filenames
-
-Version 4.5.1 - 15th May 2009
------------------------------
-- Fix: Refreshing display does not work well when starting FileBrowser
-- Fix: Internal Mass storage drive is displayed as Memory Card
-
-Version 4.5.0 - 13th February 2009 
-----------------------------------
-- Feature: Touch UI toolbar introduced with Navigate Up, Filter and Select
-  functionalities (S60 5.x only)
-- Fix: Date and directory attributes don't work correctly with search
-
-Version 4.4.0 - 12th December 2008 
-----------------------------------
-- Feature: "Remember last folder": File list view now remembers which folder
-  had the last focus before navigating deeper in a directory, and selects that
-  folder instead of the root of the directory when navigating back upwards.
-- Fix: Execution of long file operations may cause WSERV 11 panic
-- Fix: Allow formatting even if files are in use
-
-Version 4.3.3 - 8th August 2008 
--------------------------------
-- Fix: Calculation of partition size with 64-bit values caused unwanted side
-  effects
-  
-Version 4.3.2 - 5th May 2008
-------------------------------
-- Fix: Size of drive partitions should be calculated with 64-bit values
-
-Version 4.3.1 - 7th March 2008
-------------------------------
-- Fix: Crash when search field was active and changing file view mode 
-
-Version 4.3.0 - 28th January 2008
----------------------------------
-- Feature: Extended file view now displays also the directory/file time
-- Feature: Text file viewer/editor supports also in UTF-8, UTF-16 little endian
-  and UTF-16 big endian formats
-- Change: Opening with apparc is not anymore a default opening action but now
-  a list of another common actions appears
-- Change: Font size in file list view has been adjusted to suit better in
-  currently used resolution
-- Change: In first time start, extended view is activated in QHD resolution     
-- Change: Font size in file viewer and editor is now smaller so that more text
-  fits to the screen
-- Change: Settings are now saved in dictionary store instead of cenreps  
-- Fix: Copy/move to folder functionality was broken
-- Fix: Scroll bar did not work properly in text viewer when used via touch UI
-- Fix: Last line of hex viewer was not warpped correctly 
-- Fix: Menu bars of file viewer and editor did not work properly
-- Fix: Search should not return directories when searching a string
-- Fix: Hash key selection should not be active in qwerty mode  
-
-Version 4.2.0 - 14th January 2008
----------------------------------
-- Feature: User mapped remote drives are visible in drive list view as normal
-  drive when setting is turned on
-- Feature: Files can be edited in both text and hex modes
-- Feature: Show checksums (message digests) on different algorithms for a file
-- Feature: Error strings are now displayed for various operations instead of
-  generic error messages
-- Feature: Disk can be ejected and dismounted via disk admin
-- Change: Increased maximum heap usage to 32Mb to allow loading large files to
-  file editor    
-- Fix: Trying to create a directory which already exists did not return an
-  error
-- Fix: In the file list view active item not visible when deleting last item in
-  the view
-- Fix: Some file specific commands were visibile in menus also for directory
-  entries  
-- Fix: Utilizing secure backup leaked memory 
-
-Version 4.1.0 - 17th December 2007
-----------------------------------
-- Feature: File operations are now started asynchronously with own recursion
-  handler which allows removing file locks and any protection attributes
-- Feature: Status of each file operation can be monitored via RDebug 
-- Feature: Remove file locks via Secure Backup
-- Feature: File operation functionality can be customized via the settings
-  dialog
-- Feature: Multidrive support with erasing MBR and drive partition for drives
-  which support it
-- Change: Remove screen capture support since the same functionality can be
-  done with the ScreenGrabber tool
-- Fix: Forms were incorrectly constructed in search dialog and attribute editor
-
-Version 4.0.7 - 16th November 2007
---------------------------------
-- Feature: In the list view, left/right arrow keys can be simulated with drag to
-  left/right gestures
-- Fix: Touch click in the listbox view
-- Fix: Scroll bar in the hex/text viewer can be scrolled on a touch UI
-
-Version 4.0.6 - 9th October 2007
---------------------------------
-- Feature: Data type editor
-- Fix: Layout in hex/text viewer in mirrored mode
-  
-Version 4.0.5 - 27th August 2007
---------------------------------
-- Fix: Wrong functionality while moving a folder
-- Change: Handle backup session while formatting a drive
-
-Version 4.0.4 - 23th May 2007
------------------------------
-- Feature: Modify debug mask
-- Feature: Simulate Symbian OS error types
-- Feature: Enable/disable icon server cache
-
-Version 4.0.3 - 28th February 2007
-----------------------------------
-- Feature: Drive snapshot functionality under the main drive selection list
-
-Version 4.0.2 - 31st January 2007
----------------------------------
-- Feature: Dump message store walk into a text file
-- Change: Enhance hex/text viewer
-- Fix: Enhance folder browsing speed in Z-drive
-
-Version 4.0.1 - 17th January 2007
----------------------------------
-- Fix: Opening of search field
-- Fix: Enabling extended errors if c:\resource directory does not already
-  exist
-
-===============================================================================
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-
-This component and the accompanying materials are made available
-under the terms of "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
--- a/filebrowser/group/backup_registration.xml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration>
-  <passive_backup>
-    <include_directory name="\"/>
-  </passive_backup>
-  <system_backup/>
-  <restore requires_reboot = "no"/>
-</backup_registration>
--- a/filebrowser/group/bld_generic.inf	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-#ifndef FILEBROWSER_LITE
-  #include "../fileopserver/group/bld.inf"
-  #include "../fileopclient/group/bld.inf"
-#endif
-
-PRJ_EXPORTS
-../group/backup_registration.xml    Z:/private/102828D6/backup_registration.xml
-../rom/filebrowser.iby CORE_IBY_EXPORT_PATH(tools,filebrowser.iby)
-
-
-PRJ_MMPFILES
-#if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__S60_32__)
-
-  #ifdef MARM
-  gnumakefile filebrowser_stub_sis.mk
-  #endif
-#endif
-
-#if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)
-  PRJ_EXTENSIONS
-
-  #ifdef MARM
-  START EXTENSION app-services/buildstubsis
-  OPTION SRCDIR ../sis
-  OPTION SISNAME FileBrowser_stub
-  END
-  #endif  
-#endif
--- a/filebrowser/group/filebrowser_stub_sis.mk	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:  
-#
-
-
-TARGETDIR=$(EPOCROOT)EPOC32\Data\Z\System\Install
-
-SISNAME=FileBrowser_stub
-PKGNAME=FileBrowser_stub
-
-$(TARGETDIR) :
-	@perl -S emkdir.pl "$(TARGETDIR)"
-
-do_nothing :
-	rem do_nothing
-
-SISFILE=$(TARGETDIR)\$(SISNAME).sis
-
-$(SISFILE) : ..\sis\$(PKGNAME).pkg
-	makesis -s $? $@ 
-
-
-
-MAKMAKE : do_nothing
-
-RESOURCE : do_nothing
-
-SAVESPACE : do_nothing
-
-BLD : do_nothing
-
-FREEZE : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-FINAL : $(TARGETDIR) $(SISFILE)
-
-CLEAN : 
-	@if exist $(SISFILE) erase $(SISFILE)
-
-RELEASABLES : 
-	@echo $(SISFILE)
--- a/filebrowser/group/group.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +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_platforms += "$${LITERAL_HASH}include \"bld_generic.inf\""
--- a/filebrowser/icons/qgn_indi_tb_filebrowser_find.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="text/ecmascript" width="24" baseProfile="tiny" zoomAndPan="magnify" contentStyleType="text/css" viewBox="0 0 24 26" height="26" preserveAspectRatio="xMidYMid meet" version="1.1">
-    <g>
-        <path fill="#496da2" d="M 5.87 16.363 L 9.6 12.516001 L 11.484 14.271001 L 7.867 18.341002 C 6.923 18.275 5.958 16.965 5.87 16.363 z "/>
-        <linearGradient x1="-919.5605" gradientTransform="matrix(3.8462 0 0 -3.8462 3548.5244 5040.7637)" y1="1308.8418" x2="-917.7734" gradientUnits="userSpaceOnUse" y2="1308.0825" xlink:type="simple" xlink:actuate="onLoad" id="XMLID_3_" xlink:show="other">
-            <stop stop-color="#a2c2dd" offset="0"/>
-            <stop stop-color="#ffffff" offset="1"/>
-        </linearGradient>
-        <path fill="url(#XMLID_3_)" d="M 19.906 7.722 C 19.479 10.514 16.677 12.9279995 13.645 13.106 C 10.613001 13.287 8.499001 11.166 8.924 8.374001 C 9.349 5.5810003 12.283999 2.8370004 15.316 2.6580005 C 18.352 2.478 20.334 4.925 19.906 7.722 z " fill-opacity="0.51"/>
-        <linearGradient x1="-919.0566" gradientTransform="matrix(3.8462 0 0 -3.8462 3548.5244 5040.7637)" y1="1308.6963" x2="-919.402" gradientUnits="userSpaceOnUse" y2="1309.1239" xlink:type="simple" xlink:actuate="onLoad" id="XMLID_4_" xlink:show="other">
-            <stop stop-color="#a2c2dd" offset="0"/>
-            <stop stop-color="#ffffff" offset="1"/>
-        </linearGradient>
-        <path fill="url(#XMLID_4_)" d="M 10.728 11.348 C 8.443 6.6909995 12.945999 2.518999 16.723999 3.3749995 C 13.495 3.813 10.113 7.944 10.728 11.348 z " fill-opacity="0.8"/>
-        <path fill="#496da2" d="M 21.509 8.488 C 21.181002 11.9 18.199001 15.295 13.491001 15.164 C 9.954001 15.061999 7.3900013 11.655 8.378001 7.1309996 C 9.128001 3.6999996 13.298001 1.3099995 15.648001 1.5069995 C 18.984 1.787 21.841 4.991 21.509 8.488 z M 15.252 2.298 C 12.221 2.477 9.351999 5.519 8.927 8.311 C 8.5 11.103 10.614 13.224 13.648001 13.04 C 16.679 12.86 19.48 10.448999 19.909 7.658 C 20.334 4.861 18.285 2.117 15.252 2.298 z "/>
-        <path fill="#87a8cb" d="M 7.281 14.871 C 7.2260003 15.705 8.435 16.396 9.432 16.59 L 9.639 16.94 L 4.352 22.91 C 2.7860003 23.168 0.81700015 21.84 1.0810003 20.147999 L 6.8510003 14.739999 L 7.281 14.871 z "/>
-        <path fill="#cadcec" d="M 6.851 14.74 L 7.444 14.734 C 7.5769997 15.496 8.462 16.332 9.601999 16.394001 L 9.638999 16.943 C 8.706 17.225 6.857 16.236 6.851 14.74 z "/>
-        <path fill="#496da2" d="M 8.301 15.938 L 8.03 16.614 C 8.108 16.698 9.019 17.130001 9.639999 16.944 L 9.632999 16.342001 C 9.173 16.393 8.596 16.123 8.301 15.938 z "/>
-        <path fill="#235487" d="M 8.03 16.613 L 2.547 22.556 C 2.916 22.812 3.62 22.928999 4.331 22.939 L 9.641 16.939 C 9.208 17.006 8.554 16.885 8.03 16.613 z "/>
-        <path fill="#496da2" d="M 1.081 20.148 C 0.36499995 22.087 1.4979999 23.697 4.351 22.937 C 3.318 22.938 1.153 22.451 1.081 20.148 z "/>
-        <path fill="#235487" d="M 9.63 16.363 L 11.215 14.584001 C 11.215 14.584001 11.216001 13.828001 10.672 13.500001 L 8.3 15.940001 C 8.432 16.029 9.153 16.396 9.63 16.363 z "/>
-        <path fill="#235487" d="M 18.503 11.612 C 21.16 9.036 20.831001 5.3080006 18.964 3.3960009 C 16.695 1.0740008 13.382001 1.2810009 10.725 3.859001 C 8.067 6.436001 7.7460003 10.074001 10.004001 12.402001 C 10.997001 13.430001 12.376 13.586001 13.892 13.611001 C 15.695 13.639 17.113 12.96 18.503 11.612 z M 10.756 12.027 C 8.901999 10.116 9.216999 6.7910004 11.457999 4.6170006 C 13.698999 2.4430008 17.032 2.2300005 18.889 4.1430006 C 20.741 6.0550003 20.424 9.380001 18.184 11.552 C 16.992 12.71 15.432 13.358 13.902 13.333 C 12.671 13.314 11.552 12.849 10.756 12.027 z "/>
-        <path fill="#87a8cb" d="M 19.259 3.072 C 16.997002 0.74300003 12.998001 0.94499993 10.341001 3.525 C 7.6820006 6.108 7.3570004 10.095 9.615001 12.424 C 10.607 13.45 11.990001 14.026999 13.503 14.05 C 15.309 14.079 17.141 13.3220005 18.533 11.97 C 21.189 9.396 21.517 5.403 19.259 3.072 z M 17.796 11.216 C 16.605 12.375999 15.046 13.021999 13.518 12.997 C 12.285 12.976 11.167 12.513 10.37 11.691 C 8.516 9.78 8.832 6.455 11.073999 4.283 C 13.313999 2.1069999 16.647 1.894 18.504 3.81 C 20.354 5.718 20.039 9.043 17.796 11.216 z "/>
-    </g>
-    <rect width="24" fill="none" height="26"/>
-</svg>
--- a/filebrowser/icons/qgn_indi_tb_filebrowser_folder_parent.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,372 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   version="1.0"
-   width="88"
-   height="88"
-   viewBox="0 0 88 88"
-   id="svg2705">
-  <defs
-     id="defs2833" />
-  <rect
-     width="61.599998"
-     height="61.599998"
-     x="23.295238"
-     y="9.1999998"
-     id="rect2707"
-     style="fill:none" />
-  <linearGradient
-     x1="-734.38959"
-     y1="2417.3193"
-     x2="-725.01208"
-     y2="2428.2275"
-     id="XMLID_1294_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(0.79548,0,0,0.79548,649.13352,-1878.4228)">
-    <stop
-       id="stop2710"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2712"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0.1" />
-    <stop
-       id="stop2714"
-       style="stop-color:#6c83bb;stop-opacity:1"
-       offset="0.71350002" />
-    <stop
-       id="stop2716"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="0.98879999" />
-    <stop
-       id="stop2718"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <path
-     d="M 51.431738,18.1306 L 48.121438,19.1603 C 48.121438,19.1603 45.954238,26.3738 45.730238,27.1207 C 44.988938,26.9926 39.813838,26.1057 39.813838,26.1057 L 34.360838,28.097199 L 39.311938,49.239298 L 68.769338,58.302197 L 79.150338,26.487197 C 79.150338,26.487197 66.138738,24.522997 65.326738,24.401897 C 65.352636,23.696297 65.490538,20.138897 65.490538,20.138897 L 51.538138,18.094897 L 51.431738,18.1306 z"
-     id="path2720"
-     style="fill:url(#XMLID_1294_)" />
-  <linearGradient
-     x1="-765.96832"
-     y1="2409.7793"
-     x2="-720.93799"
-     y2="2409.7793"
-     id="XMLID_1295_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,1.1364,894.0547,-2696.604)">
-    <stop
-       id="stop2723"
-       style="stop-color:#ffffff;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2725"
-       style="stop-color:#ffffff;stop-opacity:1"
-       offset="0.15000001" />
-    <stop
-       id="stop2727"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="23.609,56.738 35.967,14.777 56.066,18.003 55.922,24.229 74.781,27.391 64.507,68.961 23.609,56.738 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2729"
-     style="fill:url(#XMLID_1295_)" />
-  <linearGradient
-     x1="-741.08398"
-     y1="2422.0742"
-     x2="-773.96033"
-     y2="2394.2329"
-     id="XMLID_1296_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,1.1364,894.0547,-2696.604)">
-    <stop
-       id="stop2732"
-       style="stop-color:#e2e6e4;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2734"
-       style="stop-color:#a3740a;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="64.508,68.566 23.408,56.719 16.631,27.439 57.546,35.639 64.508,68.566 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2736"
-     style="fill:url(#XMLID_1296_)" />
-  <linearGradient
-     x1="-751.48633"
-     y1="435.74609"
-     x2="-747.08618"
-     y2="445.71939"
-     id="XMLID_1297_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,-1.1364,894.0547,525.935)">
-    <stop
-       id="stop2739"
-       style="stop-color:#e2e6e4;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2741"
-       style="stop-color:#a3740a;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="64.469,31.873 23.665,24.873 16.631,27.439 57.652,35.797 64.469,31.873 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2743"
-     style="fill:url(#XMLID_1297_)" />
-  <linearGradient
-     x1="-745.625"
-     y1="2389.1016"
-     x2="-743.54358"
-     y2="2383.4521"
-     id="XMLID_1298_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,1.1364,894.0547,-2696.604)">
-    <stop
-       id="stop2746"
-       style="stop-color:#ffffff;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2748"
-       style="stop-color:#ffffff;stop-opacity:1"
-       offset="0.05" />
-    <stop
-       id="stop2750"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="59.557,16.232 40.406,13.427 36.004,14.797 56.066,18.003 59.557,16.232 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2752"
-     style="fill:url(#XMLID_1298_)" />
-  <linearGradient
-     x1="-728.38379"
-     y1="2397.2881"
-     x2="-726.25159"
-     y2="2391.501"
-     id="XMLID_1299_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,1.1364,894.0547,-2696.604)">
-    <stop
-       id="stop2755"
-       style="stop-color:#ffffff;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2757"
-       style="stop-color:#ffffff;stop-opacity:1"
-       offset="0.05" />
-    <stop
-       id="stop2759"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="78.871,25.267 59.32,22.318 55.922,24.229 74.781,27.391 78.871,25.267 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2761"
-     style="fill:url(#XMLID_1299_)" />
-  <linearGradient
-     x1="-721.13037"
-     y1="2414.3672"
-     x2="-735.64697"
-     y2="2419.4033"
-     id="XMLID_1300_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,1.1364,894.0547,-2696.604)">
-    <stop
-       id="stop2764"
-       style="stop-color:#e6eef4;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2766"
-       style="stop-color:#a3740a;stop-opacity:1"
-       offset="0.4438" />
-    <stop
-       id="stop2768"
-       style="stop-color:#474105;stop-opacity:1"
-       offset="0.9382" />
-    <stop
-       id="stop2770"
-       style="stop-color:#474105;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="64.469,31.873 64.512,69.279 57.547,35.854 64.469,31.873 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2772"
-     style="fill:url(#XMLID_1300_)" />
-  <linearGradient
-     x1="-738.81592"
-     y1="2399.9473"
-     x2="-719.41608"
-     y2="2418.4653"
-     id="XMLID_1301_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,1.1364,894.0547,-2696.604)">
-    <stop
-       id="stop2775"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2777"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0.1" />
-    <stop
-       id="stop2779"
-       style="stop-color:#6c83bb;stop-opacity:1"
-       offset="0.71350002" />
-    <stop
-       id="stop2781"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="0.98879999" />
-    <stop
-       id="stop2783"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="78.871,25.267 64.525,69.025 74.781,27.391 78.871,25.267 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2785"
-     style="fill:url(#XMLID_1301_)" />
-  <linearGradient
-     x1="-757.67188"
-     y1="2379.2646"
-     x2="-714.99811"
-     y2="2401.7869"
-     id="XMLID_1302_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,1.1364,894.0547,-2696.604)">
-    <stop
-       id="stop2788"
-       style="stop-color:#ffffff;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2790"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0.34999999" />
-    <stop
-       id="stop2792"
-       style="stop-color:#6c83bb;stop-opacity:1"
-       offset="0.69999999" />
-    <stop
-       id="stop2794"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="56.066,18.003 55.922,24.229 59.32,22.318 59.557,16.232 56.066,18.003 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2796"
-     style="fill:url(#XMLID_1302_)" />
-  <linearGradient
-     x1="-756.70752"
-     y1="406.41599"
-     x2="-726.78888"
-     y2="437.50809"
-     id="XMLID_1303_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.1364,0,0,-1.1364,894.0547,525.935)">
-    <stop
-       id="stop2799"
-       style="stop-color:#e2e6e4;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2801"
-       style="stop-color:#a3740a;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <polygon
-     points="23.609,56.738 31.348,30.449 57.604,35.847 64.525,69.025 23.609,56.738 "
-     transform="matrix(0.7,0,0,0.7,23.295238,9.2)"
-     id="polygon2803"
-     style="fill:url(#XMLID_1303_)" />
-  <linearGradient
-     x1="-675.13483"
-     y1="1794.666"
-     x2="-675.13483"
-     y2="1824.666"
-     id="XMLID_1304_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.86725,0,0,2.1875,1288.8457,-3924.0162)">
-    <stop
-       id="stop2806"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2808"
-       style="stop-color:#6c83bb;stop-opacity:1"
-       offset="0.51459998" />
-    <stop
-       id="stop2810"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <path
-     d="M 33.144905,60.786967 L 33.144905,34.591654 L 42.57265,46.106654 L 49.761563,37.684779 L 28.19856,12.425717 L 6.6392923,37.691342 L 13.82447,46.106654 L 22.983332,34.591654 L 22.987068,72.693529 L 49.406789,72.693529 L 49.406789,60.791342 L 33.144905,60.786967 z"
-     id="path2812"
-     style="fill:url(#XMLID_1304_)" />
-  <linearGradient
-     x1="-658.87738"
-     y1="1794.6602"
-     x2="-658.87738"
-     y2="1824.6655"
-     id="XMLID_1305_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.75,0,0,2.1875,1222.6362,-3924.0163)">
-    <stop
-       id="stop2815"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2817"
-       style="stop-color:#6c83bb;stop-opacity:1"
-       offset="0.51459998" />
-    <stop
-       id="stop2819"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <rect
-     width="7.6195002"
-     height="11.906562"
-     x="65.790535"
-     y="60.786968"
-     id="rect2821"
-     style="fill:url(#XMLID_1305_)" />
-  <linearGradient
-     x1="-651.25732"
-     y1="1794.6602"
-     x2="-651.25732"
-     y2="1824.6655"
-     id="XMLID_1306_"
-     gradientUnits="userSpaceOnUse"
-     gradientTransform="matrix(1.75,0,0,2.1875,1197.6831,-3924.0163)">
-    <stop
-       id="stop2824"
-       style="stop-color:#a2c2dd;stop-opacity:1"
-       offset="0" />
-    <stop
-       id="stop2826"
-       style="stop-color:#6c83bb;stop-opacity:1"
-       offset="0.51459998" />
-    <stop
-       id="stop2828"
-       style="stop-color:#003d6d;stop-opacity:1"
-       offset="1" />
-  </linearGradient>
-  <rect
-     width="7.6195002"
-     height="11.906562"
-     x="54.172432"
-     y="60.786968"
-     id="rect2830"
-     style="fill:url(#XMLID_1306_)" />
-</svg>
--- a/filebrowser/icons/qgn_indi_tb_filebrowser_selection.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   version="1.0"
-   width="13"
-   height="13"
-   viewBox="0 0 13 13"
-   id="svg2">
-  <defs
-     id="defs15" />
-  <g
-     transform="matrix(0.8,0,0,0.8,0.765368,1.2718615)"
-     id="g4">
-    <rect
-       width="13"
-       height="13"
-       x="0"
-       y="0"
-       id="rect6"
-       style="fill:none" />
-    <g
-       id="g8">
-      <polygon
-         points="2.509,5.772 1.665,6.475 4.831,10.096 11.814,1.838 11.078,1.182 4.86,8.38 2.509,5.772 "
-         id="polygon10" />
-      <path
-         d="M 11.008,0.115 L 4.8480005,7.2469997 L 2.583,4.735 L 0.595,6.39 L 4.8409996,11.246 L 12.858,1.7650003 L 11.008,0.115 z M 4.86,8.38 L 11.077,1.1810002 L 11.811999,1.8380003 L 4.83,10.096 L 1.665,6.475 L 2.5089998,5.773 L 4.86,8.38 z"
-         id="path12"
-         style="fill:#f8f8f8" />
-    </g>
-  </g>
-</svg>
--- a/filebrowser/icons/qgn_indi_tb_filebrowser_selection_active.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   version="1.0"
-   width="13"
-   height="13"
-   viewBox="0 0 13 13"
-   id="svg2">
-  <defs
-     id="defs15" />
-  <g
-     transform="matrix(0.8,0,0,0.8,3.3766268e-2,1.3)"
-     id="g4">
-    <rect
-       width="13"
-       height="13"
-       x="0"
-       y="0"
-       id="rect6"
-       style="fill:none" />
-    <g
-       id="g8">
-      <polygon
-         points="2.509,5.772 1.665,6.475 4.831,10.096 11.814,1.838 11.078,1.182 4.86,8.38 2.509,5.772 "
-         id="polygon10" />
-      <path
-         d="M 11.008,0.115 L 4.8480005,7.2469997 L 2.583,4.735 L 0.595,6.39 L 4.8409996,11.246 L 12.858,1.7650003 L 11.008,0.115 z M 4.86,8.38 L 11.077,1.1810002 L 11.811999,1.8380003 L 4.83,10.096 L 1.665,6.475 L 2.5089998,5.773 L 4.86,8.38 z"
-         id="path12"
-         style="fill:#f8f8f8" />
-    </g>
-  </g>
-  <g
-     transform="matrix(0.8,0,0,0.8,2.5943723,1.2155844)"
-     id="g3202">
-    <rect
-       width="13"
-       height="13"
-       x="0"
-       y="0"
-       id="rect3204"
-       style="fill:none" />
-    <g
-       id="g3206">
-      <polygon
-         points="2.509,5.772 1.665,6.475 4.831,10.096 11.814,1.838 11.078,1.182 4.86,8.38 2.509,5.772 "
-         id="polygon3208" />
-      <path
-         d="M 11.008,0.115 L 4.8480005,7.2469997 L 2.583,4.735 L 0.595,6.39 L 4.8409996,11.246 L 12.858,1.7650003 L 11.008,0.115 z M 4.86,8.38 L 11.077,1.1810002 L 11.811999,1.8380003 L 4.83,10.096 L 1.665,6.475 L 2.5089998,5.773 L 4.86,8.38 z"
-         id="path3210"
-         style="fill:#f8f8f8" />
-    </g>
-  </g>
-</svg>
--- a/filebrowser/icons/qgn_menu_filebrowser.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,454 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://web.resource.org/cc/"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   baseProfile="tiny"
-   height="100%"
-   preserveAspectRatio="xMidYMid meet"
-   version="1.0"
-   viewBox="0 0 87.9995117 88.0004883"
-   width="100%"
-   zoomAndPan="magnify"
-   id="svg76799"
-   sodipodi:version="0.32"
-   inkscape:version="0.44"
-   sodipodi:docname="qgn_menu_filebrowser.svg"
-   sodipodi:docbase="Z:\">
-  <metadata
-     id="metadata76883">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <defs
-     id="defs76881">
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#XMLID_4_"
-       id="linearGradient76934"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(-0.105,-0.4005,0.3754,-9.84e-2,-314.9889,-11.936)"
-       x1="-316.0620117"
-       y1="809.9614258"
-       x2="-323.5102844"
-       y2="840.2769165" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#XMLID_4_"
-       id="linearGradient76936"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(-0.105,-0.4005,0.3754,-9.84e-2,-314.9889,-11.936)"
-       x1="-316.0620117"
-       y1="809.9614258"
-       x2="-323.5102844"
-       y2="840.2769165" />
-  </defs>
-  <sodipodi:namedview
-     inkscape:window-height="820"
-     inkscape:window-width="952"
-     inkscape:pageshadow="2"
-     inkscape:pageopacity="0.0"
-     guidetolerance="10.0"
-     gridtolerance="10.0"
-     objecttolerance="10.0"
-     borderopacity="1.0"
-     bordercolor="#666666"
-     pagecolor="#ffffff"
-     id="base"
-     inkscape:zoom="4.2840671"
-     inkscape:cx="43.999756"
-     inkscape:cy="62.674088"
-     inkscape:window-x="66"
-     inkscape:window-y="87"
-     inkscape:current-layer="svg76799" />
-  <g
-     id="g76801"
-     transform="matrix(0.875332,0,0,0.875332,0.2333,0.23342)">
-    <g
-       id="g76803">
-      <rect
-         height="88.000488"
-         width="87.999512"
-         id="rect76805"
-         x="0"
-         y="0"
-         style="fill:none" />
-      <path
-         d="M 39.916016,17.900391 C 39.919434,17.900391 39.92334,17.900391 39.927246,17.900391 C 39.885742,17.900391 39.873047,17.902832 31.596191,19.527832 C 31.416992,19.476074 26.807617,18.142578 26.807617,18.142578 C 26.736816,18.128906 26.474609,18.099121 26.474609,18.099121 L 21.785645,18.360352 C 21.785645,18.360352 21.786621,18.360352 21.786621,18.36084 C 21.786621,18.369629 21.067871,18.680664 21.067871,18.680664 C 20.967774,18.724121 20.907227,18.80127 20.869629,18.903809 L 20.679199,19.42041 C 20.674317,19.433594 20.675293,19.444824 20.671875,19.456543 C 19.964844,19.278809 18.22168,18.841309 18.22168,18.841309 C 17.789551,18.730469 17.334961,18.868652 17.03711,19.200684 C 17.004883,19.236816 16.972656,19.297363 16.955078,19.342285 L 16.756348,19.858399 C 16.738281,19.905274 16.729004,19.955078 16.729004,20.004883 C 16.729004,20.026367 16.730957,20.047852 16.734375,20.068848 L 16.776367,20.324707 C 16.787109,20.368652 17.119141,21.356934 17.320801,21.956055 C 16.562012,22.062988 13.388672,22.510254 13.388672,22.510254 C 12.800293,22.592285 12.355957,23.102539 12.355957,23.697754 C 12.356445,23.719238 12.67627,28.669434 12.778809,30.25586 C 12.211426,30.143067 11.284668,29.958985 11.284668,29.958985 C 11.206543,29.951172 10.875,29.95459 10.875,29.95459 L 6.378418,30.950684 C 5.8271485,31.072266 5.440918,31.553711 5.440918,32.121094 C 5.440918,32.149902 5.440918,32.149902 6.6865235,55.366699 C 6.7143555,55.878418 7.0634766,56.315918 7.5556641,56.456543 C 7.5576172,56.45752 12.411621,57.834473 13.638184,58.184082 C 13.654785,58.691895 13.769043,62.250489 13.769043,62.250489 C 13.785156,62.762207 14.125,63.20752 14.614746,63.358887 L 53.833496,75.559082 C 53.884277,75.574707 53.937012,75.580567 53.988769,75.57666 L 54.601074,75.52002 C 54.653809,75.51416 54.70459,75.499512 54.751465,75.475098 L 76.42334,63.968262 C 76.804199,63.765137 77.04834,63.371582 77.060059,62.940918 L 78.158691,24.119629 C 78.17627,23.507324 77.729981,22.980957 77.121582,22.896973 L 40.238281,17.896484 C 40.18457,17.893066 39.916016,17.900391 39.916016,17.900391 z "
-         id="path76807"
-         style="fill:#7c6800;fill-opacity:0.25;stroke-opacity:0.25" />
-      <polygon
-         points="14.077148,31.736816 13.555664,23.698242 18.919922,22.943359 17.928711,20.003906 22.00293,21.028809 21.854492,19.558594 26.473633,19.29541 31.541992,20.761231 40.077148,19.085938 76.958496,24.085938 75.86084,62.908691 54.188965,74.414551 14.96875,62.212402 14.80957,57.268066 7.8847656,55.302246 6.640625,32.121094 11.050781,31.136231 14.077148,31.736816 "
-         id="polygon76809"
-         style="fill:white" />
-      <polygon
-         points="53.817871,71.10791 73.304199,61.252441 74.040527,25.139648 52.780762,30.843262 53.817871,71.10791 "
-         id="polygon76811"
-         style="fill:#06f" />
-      <polygon
-         points="53.817871,71.10791 53.083496,30.885254 15.444336,24.263672 16.897461,60.968262 53.817871,71.10791 "
-         id="polygon76813"
-         style="fill:#09f" />
-      <polygon
-         points="74.040527,25.139648 38.993164,20.189453 15.444336,24.263672 53.083496,30.885254 74.040527,25.139648 "
-         id="polygon76815"
-         style="fill:#0cf" />
-      <polygon
-         points="19.116211,28.543945 19.602539,52.943848 48.778809,60.572754 48.942871,34.204102 19.116211,28.543945 "
-         id="polygon76817"
-         style="fill:#070791" />
-      <polygon
-         points="29.621094,31.085938 19.97168,34.612305 28.161133,36.790039 29.621094,31.085938 "
-         id="polygon76819"
-         style="fill:#0046b7" />
-      <polyline
-         points="19.6669922,34.8325195 31.8251953,30.7675781 29.9619141,30.3671875       17.9521484,34.1640625 "
-         id="polyline76821"
-         style="fill:#b3ddff" />
-      <polygon
-         points="23.104492,38.689453 22.814453,20 46.210449,26.876953 45.011719,46.129394 43.783203,47.189941 23.104492,38.689453 "
-         id="polygon76823"
-         style="fill:white" />
-      <polygon
-         points="22.835938,20.076172 45.976074,26.93457 49.001465,26.404297 26.605469,20.072266 22.835938,20.076172 "
-         id="polygon76825"
-         style="fill:#ffc400" />
-      <polygon
-         points="45.976074,26.93457 43.477539,47.744629 46.04834,46.354004 49.001465,26.404297 45.976074,26.93457 "
-         id="polygon76827"
-         style="fill:#d98204" />
-      <path
-         d="M 43.552734,47.766113 L 22.87207,38.785156 C 21.706543,27.642578 18.78418,20.716309 18.78418,20.716309 C 23.080078,22.266113 42.229492,28.328613 42.229492,28.328613 C 45.289063,40.192383 43.37207,42.625 43.552734,47.766113 z "
-         id="path76829"
-         style="fill:#fc0" />
-      <linearGradient
-         gradientTransform="matrix(-0.105,-0.4005,0.3754,-9.84e-2,-314.9889,-11.936)"
-         gradientUnits="userSpaceOnUse"
-         id="XMLID_4_"
-         x1="-316.06201"
-         x2="-323.51028"
-         y1="809.96143"
-         y2="840.27692">
-        <stop
-           offset="0"
-           style="stop-color:#FFFFFF"
-           id="stop76832" />
-        <stop
-           offset="1"
-           style="stop-color:#FFCC00"
-           id="stop76834" />
-      </linearGradient>
-      <path
-         d="M 22.844727,22.126953 C 29.491211,24 42.229492,28.328613 42.229492,28.328613 C 45.283203,38.26123 43.242188,45.841309 43.552734,47.766113 L 22.800781,38.818359 L 22.844727,22.126953 z "
-         id="path76836"
-         style="fill:url(#linearGradient76936)" />
-      <polygon
-         points="41.004883,42.025391 40.986328,40.810059 48.065918,37.460449 48.069824,38.693359 41.004883,42.025391 "
-         id="polygon76838"
-         style="fill:#b3ddff" />
-      <polygon
-         points="8.1904297,32.516113 38.138672,39.671875 38.34668,62.253418 9.2324219,54.01416 8.1904297,32.516113 "
-         id="polygon76840"
-         style="fill:#0cf" />
-      <polygon
-         points="10.730469,32.03125 8.1904297,32.516113 38.138672,39.671875 40.969727,38.604004 10.730469,32.03125 "
-         id="polygon76842"
-         style="fill:#cfecff" />
-      <polygon
-         points="17.31543,46.994629 16.231445,47.297363 28.15918,50.725098 29.324219,50.242676 17.31543,46.994629 "
-         id="polygon76844"
-         style="fill:#cfecff" />
-      <polygon
-         points="18.113281,38.503906 18.243164,42.424316 28.248047,45.068359 28.248047,40.839844 18.113281,38.503906 "
-         id="polygon76846"
-         style="fill:#f9f9f9" />
-      <polygon
-         points="28.163086,50.70166 28.295898,52.703613 29.241211,52.10791 29.324219,50.242676 28.163086,50.70166 "
-         id="polygon76848"
-         style="fill:#06f" />
-      <linearGradient
-         gradientUnits="userSpaceOnUse"
-         id="XMLID_5_"
-         x1="11.963867"
-         x2="34.643429"
-         y1="53.834473"
-         y2="60.526596">
-        <stop
-           offset="0"
-           style="stop-color:#66F2EE"
-           id="stop76851" />
-        <stop
-           offset="1"
-           style="stop-color:#464646"
-           id="stop76853" />
-      </linearGradient>
-      <polygon
-         points="9.3466797,52.802246 38.393555,60.729981 38.337891,62.307129 9.2617188,53.941894 9.3466797,52.802246 "
-         id="polygon76855"
-         style="fill:url(#XMLID_5_)" />
-      <polygon
-         points="38.138672,39.671875 40.969727,38.604004 40.969727,42.076172 48.075684,38.633301 48.083496,56.816894 38.34668,62.253418 38.138672,39.671875 "
-         id="polygon76857"
-         style="fill:#0852bc" />
-      <linearGradient
-         gradientUnits="userSpaceOnUse"
-         id="XMLID_6_"
-         x1="53.26709"
-         x2="73.433105"
-         y1="48.185059"
-         y2="48.185059">
-        <stop
-           offset="0"
-           style="stop-color:#00FFFF"
-           id="stop76860" />
-        <stop
-           offset="0.0490068"
-           style="stop-color:#00E1FF"
-           id="stop76862" />
-        <stop
-           offset="0.1141682"
-           style="stop-color:#00C0FF"
-           id="stop76864" />
-        <stop
-           offset="0.1871896"
-           style="stop-color:#00A4FF"
-           id="stop76866" />
-        <stop
-           offset="0.2686932"
-           style="stop-color:#008DFF"
-           id="stop76868" />
-        <stop
-           offset="0.3624018"
-           style="stop-color:#007BFF"
-           id="stop76870" />
-        <stop
-           offset="0.4758376"
-           style="stop-color:#006FFF"
-           id="stop76872" />
-        <stop
-           offset="0.6294785"
-           style="stop-color:#0068FF"
-           id="stop76874" />
-        <stop
-           offset="1"
-           style="stop-color:#0066FF"
-           id="stop76876" />
-      </linearGradient>
-      <polygon
-         points="55.04834,70.125488 53.849121,71.018066 53.26709,30.977051 73.433105,25.351563 55.04834,70.125488 "
-         id="polygon76878"
-         style="fill:url(#XMLID_6_)" />
-    </g>
-  </g>
-  <g
-     id="g66764"
-     transform="matrix(0.580892,0,0,0.580892,30.46276,33.49717)">
-    <g
-       id="g66766">
-      <rect
-         height="88.000488"
-         width="87.998535"
-         id="rect66768"
-         x="0"
-         y="0"
-         style="fill:none" />
-      <path
-         d="M 12.445313,23.541992 C 12.450684,23.536621 12.459961,23.538574 12.46582,23.533203 C 12.399902,23.605469 12.33252,23.711426 12.217773,23.902832 L 11.669434,25.508789 C 11.420898,28.112793 8.7612305,29.766601 7.7451172,29.761719 C 7.7431641,29.761719 7.1030274,29.961914 7.1030274,29.961914 C 7.0551758,29.977051 7.0234376,29.996582 6.9838868,30.027832 L 2.6176759,33.564941 C 2.5869142,33.593262 2.2260743,34.223144 2.2260743,34.223144 C 2.1948243,34.276855 2.1816407,34.330566 2.1782227,34.393066 C 2.1782227,34.393066 2.0952149,35.925781 2.0952149,35.926269 C 2.0952149,41.897461 5.9643555,44.13623 8.7773438,44.98584 C 8.597168,45.19873 8.4672852,45.446777 8.4672852,45.736816 L 11.043945,64.936035 C 11.108399,65.408691 11.444824,65.79834 11.901367,65.929199 L 60.859863,80.074707 C 61.250488,80.188965 61.67041,80.096191 61.980957,79.82666 L 84.133301,60.395019 C 84.172363,60.359863 84.205566,60.315918 84.229004,60.270019 L 84.497559,59.734863 C 84.521973,59.687988 84.535645,59.637207 84.539551,59.585449 C 86.019043,40.415527 86.019043,40.415527 86.019043,40.373535 C 86.019043,39.777344 85.573731,39.266601 84.98291,39.185058 C 84.98291,39.185058 75.30127,37.846191 72.290527,37.430176 C 72.355957,37.376953 72.479004,37.276367 72.479004,37.276367 C 72.439942,37.308594 72.407715,37.306152 72.374512,37.311035 C 72.496582,37.270996 72.809082,37.124023 74.008301,36.560547 C 75.133301,36.081055 76.311035,35.579101 77.156738,34.694824 C 78.469238,33.407715 79.227051,31.364746 79.227051,29.098144 L 79.223145,28.824219 C 79.144043,25.855469 77.844238,23.051758 75.656738,21.126465 C 75.621582,21.094726 75.574707,21.067871 75.529785,21.051269 L 75.010254,20.853515 C 74.965332,20.836914 74.918457,20.827637 74.869629,20.827637 L 71.266113,20.810058 C 70.694824,20.810058 70.199707,21.215332 70.088379,21.773926 C 70.088379,21.773926 69.250488,25.944824 69.046387,26.961426 C 68.818848,26.751465 68.604004,26.479492 68.442871,26.118164 C 68.489746,25.844726 69.39502,20.551269 69.39502,20.551269 C 69.400879,20.512207 69.421387,20.455566 69.421387,20.412109 C 69.421387,20.404785 69.42041,20.399414 69.42041,20.393555 L 69.390137,20.219726 L 69.240723,19.757324 C 69.211426,19.66748 69.222168,19.646973 69.143066,19.597168 L 68.535644,19.21582 C 68.488769,19.186523 68.441894,19.17041 68.387207,19.162597 L 65.260254,18.697754 L 64.92041,18.696777 C 62.097168,19.086914 59.969238,20.297363 58.596191,22.293945 C 57.271973,24.219726 57.074707,26.316894 57.074707,27.395996 L 57.247559,29.104492 C 57.26709,29.184082 57.461426,30.003418 57.461426,30.003418 C 57.737793,31.127441 58.049316,32.395019 58.049316,33.294433 C 58.049316,33.294433 57.946777,33.943359 57.935059,34.017578 C 57.82959,34.20459 57.615723,34.613769 57.205566,35.407715 C 56.671387,35.333984 41.949219,33.300781 41.638672,33.257812 C 41.459961,33.027832 37.396484,27.795898 36.745117,26.957519 C 39.82373,26.290527 47.033691,26.475586 52.600098,27.415527 C 53.043457,27.487793 53.484863,27.312988 53.754395,26.958008 C 54.025879,26.602051 54.07666,26.128906 53.887207,25.723144 L 49.924316,17.249023 C 49.902832,17.205566 49.875488,17.166015 49.840332,17.132324 L 49.436035,16.737793 C 49.401855,16.704101 49.361816,16.676757 49.316895,16.657226 C 38.896973,12.099121 23.738281,11.51416 12.445313,23.541992 z M 16.739746,39.831055 C 16.741211,38.884277 18.64502,37.631348 19.720703,36.945801 C 19.999512,37.088867 21.273926,37.740234 22.068359,38.146484 C 21.14502,38.611816 18.191406,40.099121 16.487305,40.95752 C 16.497559,40.934082 16.739746,40.380859 16.739746,40.380859 C 16.756836,40.341309 16.763184,40.260254 16.763184,40.180664 C 16.763184,40.109375 16.758301,40.039551 16.750488,40.001465 L 16.758789,40.042481 L 16.739746,39.831055 z M 72.281738,37.328613 C 72.303223,37.328613 72.322754,37.327149 72.35498,37.317383 C 72.333496,37.318848 72.312988,37.328613 72.281738,37.328613 z "
-         id="path66770"
-         style="fill:#7c6800;fill-opacity:0.25;stroke-opacity:0.25" />
-      <path
-         d="M 69.965332,38.319824 L 84.818848,40.374023 L 83.342285,59.492676 L 61.191894,78.922363 L 12.233398,64.775879 L 9.6669922,45.736816 L 24.719727,38.153809 L 19.647461,35.561523 C 17.205567,37.086914 15.258789,38.483398 15.573242,40.220703 L 11.157227,44.286621 C 7.8017578,43.873047 2.5927735,41.928711 3.3735352,34.498047 L 7.7392579,30.961426 C 9.4326173,30.969727 12.573242,28.71875 12.807617,25.889649 L 13.319336,24.36377 C 23.454102,13.569824 37.645508,12.861817 48.836426,17.757324 L 52.799317,26.231445 C 46.812988,25.22168 36.821289,24.815918 34.748535,26.342774 L 40.991211,34.379883 L 57.881348,36.712891 L 59.064942,34.420899 C 59.588379,33.134766 58.85791,30.745117 58.424317,28.882813 C 57.906738,26.655762 58.391113,20.8125 65.084473,19.884766 L 68.211426,20.349121 L 67.191895,26.3125 C 67.713379,27.916992 69.350098,28.623047 69.350098,28.623047 L 70.010254,28.255859 L 71.26416,22.009766 L 74.86377,22.027344 C 78.686035,25.392578 78.896973,31.307617 76.289551,33.865234 C 75.240723,34.961426 73.248535,35.453125 71.885254,36.233398 C 70.322754,37.124023 69.965332,38.319824 69.965332,38.319824 z "
-         id="path66772"
-         style="fill:white" />
-      <polygon
-         points="82.98877,41.490234 34.850586,34.807617 10.897461,46.449707 59.643066,56.678223 82.98877,41.490234 "
-         id="polygon66774"
-         style="fill:#ff6" />
-      <polygon
-         points="34.645508,36.333008 77.516113,42.653809 59.053223,54.161621 34.930664,49.486816 34.645508,36.333008 "
-         id="polygon66776"
-         style="fill:#c15200" />
-      <polygon
-         points="34.645508,36.333008 15.549805,45.724121 34.930664,49.486816 34.645508,36.333008 "
-         id="polygon66778"
-         style="fill:#ff7300" />
-      <g
-         id="g66780">
-        <g
-           id="g66782">
-          <path
-             d="M 76.352051,31.694824 C 76.67041,30.902832 76.869629,29.890625 76.838379,28.59375 C 76.791504,27.172852 76.148926,24.931641 74.311035,22.837891 L 71.859863,22.851563 C 73.848144,25.124023 74.611816,27.337891 74.234863,30.358398 C 74.176269,30.860352 74.059082,31.303711 73.904785,31.695801 L 76.352051,31.694824 z "
-             id="path66784"
-             style="fill:url(#linearGradient76934)" />
-          <g
-             id="g66786">
-            <defs
-               id="defs66788">
-              <path
-                 d="M 55.395019,59.633301 L 52.963379,59.641113 C 53.992676,59.63916 54.779785,59.342285 54.828613,59.32666 L 57.260254,59.316895 C 57.213379,59.334473 56.424316,59.628418 55.395019,59.633301 z "
-                 id="XMLID_2_" />
-            </defs>
-            <use
-               xlink:actuate="onLoad"
-               xlink:href="#XMLID_2_"
-               xlink:show="embed"
-               xlink:type="simple"
-               id="use66791"
-               style="fill:#0046b7"
-               x="0"
-               y="0"
-               width="87.999512"
-               height="88.000488" />
-            <g
-               id="g66793">
-              <path
-                 d="M 54.828613,59.32666 L 57.260254,59.316895 C 57.213379,59.334473 56.424316,59.628418 55.39502,59.633301 L 52.963379,59.641113 C 53.992676,59.63916 54.779785,59.342285 54.828613,59.32666"
-                 id="path66795"
-                 style="fill:#0046b7" />
-            </g>
-          </g>
-          <g
-             id="g66797">
-            <polygon
-               points="65.090332,20.790527 67.375488,21.078125 66.404785,26.494141 63.975098,26.501953 65.090332,20.790527 "
-               id="polygon66799"
-               style="fill:#b7b9b9" />
-          </g>
-          <path
-             d="M 73.904785,31.695801 C 73.131348,33.666992 71.398926,34.34668 70.73877,34.55957 C 69.943848,34.8125 67.314942,35.589844 66.088379,37.922852 L 66.104004,37.922852 C 65.13916,39.753418 55.355957,58.328613 54.828613,59.32666 L 57.260254,59.316895 C 57.797363,58.299316 67.977051,38.970703 68.588379,37.811523 L 68.570801,37.811523 C 69.730957,35.546875 72.955566,34.633789 73.383301,34.485352 C 73.703613,34.375 75.479004,33.878418 76.352051,31.694824 L 73.904785,31.695801 z "
-             id="path66801"
-             style="fill:#6d6d6d" />
-          <path
-             d="M 63.971191,26.500977 L 66.393066,26.485352 C 66.766113,27.546875 67.797363,29.191406 69.502441,29.476563 C 66.766113,30.402832 64.658691,28.758789 63.971191,26.500977 z "
-             id="path66803"
-             style="fill:#c9c9c9" />
-          <path
-             d="M 72.650879,33.527832 L 75.080566,33.520019 C 74.645019,33.931641 74.137207,34.241211 73.572754,34.421875 C 71.439941,35.101563 70.23291,35.813477 69.477051,36.530762 L 67.047363,36.539063 C 67.80127,35.820801 69.008301,35.109375 71.141113,34.428711 C 71.70752,34.248047 72.215332,33.940918 72.650879,33.527832"
-             id="path66805"
-             style="fill:#333" />
-          <g
-             id="g66807">
-            <path
-               d="M 71.88916,22.849121 C 76.004395,27.4375 74.67627,33.291992 71.242676,34.388672 C 67.799316,35.486816 66.768066,36.667969 66.158691,37.819824 C 65.54541,38.979492 55.365723,58.307129 54.828613,59.32666 C 54.771973,59.346191 53.721191,59.737793 52.449707,59.615723 C 50.994629,59.477051 49.32666,58.63916 48.854004,55.686035 L 59.963379,34.609375 C 60.756348,32.59082 59.32666,29.636719 59.172363,27.599121 C 59.025879,25.561523 60.932129,21.179687 65.090332,20.790527 L 63.975098,26.501953 C 64.508301,28.180664 65.984863,29.490234 67.687988,29.652344 C 68.600098,29.742187 69.57666,29.5 70.510254,28.811523 L 71.88916,22.849121 z "
-               id="path66809"
-               style="fill:#919191" />
-          </g>
-          <circle
-             cx="52.789551"
-             cy="55.814941"
-             r="1.6933594"
-             id="circle66811"
-             sodipodi:cx="52.789551"
-             sodipodi:cy="55.814941"
-             sodipodi:rx="1.6933594"
-             sodipodi:ry="1.6933594"
-             style="fill:#36c" />
-          <defs
-             id="defs66813">
-            <linearGradient
-               gradientUnits="userSpaceOnUse"
-               id="linearGradient76911"
-               x1="74.182129"
-               x2="74.765144"
-               y1="24.07373"
-               y2="29.573807">
-              <stop
-                 offset="0"
-                 style="stop-color:#B7B9B9"
-                 id="stop66816" />
-              <stop
-                 offset="0.005618"
-                 style="stop-color:#B7B9B9"
-                 id="stop66818" />
-              <stop
-                 offset="1"
-                 style="stop-color:#6D6D6D"
-                 id="stop66820" />
-            </linearGradient>
-          </defs>
-        </g>
-        <g
-           id="g66822">
-          <g
-             id="g66824">
-            <path
-               d="M 50.832519,44.053711 C 43.444336,39.834961 37.477539,33.416992 34.688476,29.511719 L 33.342773,32.220703 C 33.342773,32.220703 46.459473,45.211426 50.13916,46.160645 L 50.832519,44.053711 z "
-               id="path66826"
-               style="fill:#333" />
-            <path
-               d="M 50.469238,45.766113 C 43.623535,42.766602 34.067383,31.725586 34.067383,31.725586 L 27.676758,36.816406 C 31.770508,39.287109 38.879883,43.388672 45.479004,49.699707 L 50.469238,45.766113 z "
-               id="path66828"
-               style="fill:#6d6d6d" />
-            <path
-               d="M 48.385254,20.231445 L 47.199707,19.206055 C 37.325195,15.119141 28.913086,16.099121 16.15918,23.868164 C 15.344727,24.647461 14.579102,24.813477 13.959961,27.211426 C 13.50293,28.967774 12.106445,31.232422 8.3349609,32.696777 L 7.915039,32.555664 L 5.305664,34.822754 C 4.2705077,36.157227 5.0185546,42.132813 11.46582,42.494141 L 13.651367,40.511719 L 13.651367,39.290527 C 14.12793,36.078125 18.623535,34.112793 20.125977,34.132813 L 26.737305,37.532227 C 28.920899,36.6875 34.623535,32.71875 34.852539,31.164063 C 35.080566,29.604492 34.55957,28.042969 34.55957,28.042969 L 32.520508,25.804687 C 32.520508,25.804687 36.00293,22.625 50.541504,24.591797 C 50.541504,24.591797 50.477051,24.333008 48.998535,22.310547 C 48.998535,22.310547 41.084961,19.855469 32.688477,18.334961 C 36.459961,17.017578 42.286133,17.490234 48.385254,20.231445 z "
-               id="path66830"
-               style="fill:#919191" />
-            <path
-               d="M 34.631836,31.655762 C 35.020508,31.074219 35.165039,30.155762 34.55957,28.042969 L 32.520508,25.804687 C 31.510742,26.799316 30.780273,27.730469 32.039551,28.901367 C 33.299805,30.068359 34.631836,31.655762 34.631836,31.655762 z "
-               id="path66832"
-               style="fill:#6d6d6d" />
-            <path
-               d="M 50.541504,24.591797 C 50.541504,24.591797 51.102051,24.30957 49.621582,22.289063 C 49.621582,22.289063 44.786133,18.80957 35.485352,18.399414 C 39.358398,18.367188 42.692383,18.016602 48.793457,20.757324 L 47.498535,18.779297 C 37.625977,14.6875 28.192383,14.202149 16.25293,23.478516 C 15.719727,23.984375 15.051758,24.650391 14.555664,25.546875 L 15.793945,29.016602 C 31.30957,16.411621 45.932129,22.136719 50.541504,24.591797"
-               id="path66834"
-               style="fill:#c9c9c9" />
-            <path
-               d="M 16.586914,32.304688 C 16.586914,32.304688 12.022461,35.138672 10.043945,38.625 L 7.2333984,41.441406 C 8.0732422,41.981445 12.514648,40.385742 13.717773,40.462891 L 13.854492,39.743164 C 13.963867,38.047852 17.163086,34.486816 20.125977,34.132812 L 16.586914,32.304688 z "
-               id="path66836"
-               style="fill:#333" />
-            <path
-               d="M 16.600586,32.283203 C 14.96582,33.356445 11.579101,35.924805 10.036133,38.587891 L 7.2509765,41.455078 C 6.2861327,40.680664 5.1923827,39.529297 4.8251952,38.158203 L 7.5341796,35.494141 C 8.9443359,34.972656 12.993164,32.606445 15.793945,29.016602 L 16.600586,32.283203 z "
-               id="path66838"
-               style="fill:#6d6d6d" />
-            <path
-               d="M 7.7998047,32.655762 L 7.5068359,35.485352 L 4.8154296,38.153808 C 4.5791015,37.099121 4.5419921,35.902344 4.9482421,35.053223 L 7.7998047,32.655762 z "
-               id="path66840"
-               style="fill:#c9c9c9" />
-            <path
-               d="M 7.5068359,35.485352 C 7.5068359,35.485352 9.3134765,37.180664 10.02832,38.601563 L 7.2666015,41.444824 C 6.6435546,41.074219 5.0283202,39.418945 4.8154296,38.153809 L 7.5068359,35.485352 z "
-               id="path66842"
-               style="fill:#b7b9b9" />
-            <path
-               d="M 7.2666016,41.444824 L 10.02832,38.601563 C 10.811524,38.779297 12.194336,39.764648 13.711914,40.511719 L 11.188477,42.78418 C 9.6630859,42.866211 8.0732422,42.018555 7.2666016,41.444824 z "
-               id="path66844"
-               style="fill:#6d6d6d" />
-            <path
-               d="M 44.65332,48.95166 C 47.324707,48.807129 48.992676,46.717285 49.498535,43.475586 L 50.787598,42.709961 L 73.391113,58.754395 C 74.699707,63.26416 70.836426,69.141113 65.439941,69.166504 L 44.274414,50.365723 L 44.65332,48.95166 z "
-               id="path66846"
-               style="fill:#8e8e8e" />
-            <path
-               d="M 44.274414,50.365723 L 44.65332,48.95166 C 47.070801,48.23291 48.980957,46.559082 49.45752,43.18457 L 50.787598,42.709961 C 51.586426,44.164063 49.070801,49.775879 44.274414,50.365723 z "
-               id="path66848"
-               style="fill:#c9c9c9" />
-          </g>
-          <path
-             d="M 50.787598,42.709961 C 50.805176,43.702148 50.92041,44.510742 50.230957,45.887207 L 67.062988,58.01416 L 70.17041,56.402832 L 50.787598,42.709961 z "
-             id="path66850"
-             style="fill:#464646" />
-        </g>
-      </g>
-      <polygon
-         points="24.135742,47.375488 23.672852,49.090332 59.643066,56.678223 80.211426,43.274414 76.771973,43.078125 59.053223,54.161621 24.135742,47.375488 "
-         id="polygon66852"
-         style="fill:#ff6" />
-      <polygon
-         points="60.791504,76.643066 13.458008,62.793457 11.22168,46.449707 59.973144,56.678223 60.791504,76.643066 "
-         id="polygon66854"
-         style="fill:#f90" />
-      <polygon
-         points="60.791504,76.643066 81.945801,58.510254 82.98877,41.490234 59.893066,56.594238 60.791504,76.643066 "
-         id="polygon66856"
-         style="fill:#ff7300" />
-    </g>
-  </g>
-</svg>
--- a/filebrowser/icons/qtg_indi_status_back.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="36px" height="36px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve">
-<defs>
-</defs>
-<path fill="#FFFFFF" d="M2.631,9.923l9.245-7.078c0.286-0.164,0.637-0.164,0.923,0c0.285,0.166,0.461,0.471,0.461,0.801v4.633h7.069
-	c7.455,0.001,13.498,5.043,13.501,12.498c-0.003,7.459-6.046,12.498-13.501,12.502c0,0-0.604,0-1.207,0s-1-0.473-1-1.129
-	c0-0.654,0-2.432,0-2.871s0.493-1.002,1-1.002s2.207,0,2.207,0c4.137-0.008,7.492-3.361,7.499-7.5
-	c-0.007-4.139-3.362-7.493-7.499-7.5H13.26V17.8c0,0.33-0.176,0.635-0.461,0.799c-0.286,0.164-0.637,0.166-0.923,0l-9.245-7.078
-	c-0.285-0.164-0.461-0.469-0.461-0.799C2.17,10.394,2.346,10.089,2.631,9.923z"/>
-<rect fill-rule="evenodd" clip-rule="evenodd" fill="none" width="36" height="36"/>
-</svg>
--- a/filebrowser/rom/filebrowser.iby	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __ORBITFILEBROWSER_IBY__
-#define __ORBITFILEBROWSER_IBY__
-
-S60_APP_EXE(FileBrowser)
-//S60_APP_AIF_ICONS(FileBrowser)
-S60_APP_RESOURCE(FileBrowser)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,FileBrowser)
-
-//#ifdef S60_UPGRADABLE_APP_REG_RSC
-//  S60_UPGRADABLE_APP_REG_RSC(FileBrowser)
-//#else
-//  S60_APP_AIF_RSC(FileBrowser)
-//#endif
-data=ZPRIVATE\10003a3f\import\APPS\FileBrowser_reg.RSC Private\10003a3f\import\Apps\FileBrowser_reg.rsc
-
-#ifndef FILEBROWSER_LITE
-file=ABI_DIR\BUILD_DIR\FileBrowserFileOpServer.exe      PROGRAMS_DIR\FileBrowserFileOpServer.exe
-file=ABI_DIR\BUILD_DIR\FileBrowserFileOpClient.dll      SHARED_LIB_DIR\FileBrowserFileOpClient.dll
-#endif
-
-data=ZPRIVATE\102828D6\backup_registration.xml          private\102828D6\backup_registration.xml
-data=ZSYSTEM\Install\FileBrowser_stub.sis               \system\install\FileBrowser_stub.sis
-
-
-#endif // __ORBITFILEBROWSER_IBY__
--- a/filebrowser/sis/FileBrowser_stub.pkg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-
-
-; Language - standard language definitions
-&EN
-
-; Standard SIS file header
-#{"FileBrowser"},(0x102828D6),1,0,0
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; normal stuff:
-""-"z:\sys\bin\FileBrowser.exe"
-""-"z:\Resource\Apps\FileBrowser.mif"
-""-"z:\Resource\Apps\FileBrowser.rsc"
-""-"z:\private\10003a3f\import\apps\FileBrowser_reg.rsc"
-""-"z:\private\102828D6\backup_registration.xml"
-
-""-"z:\sys\bin\FileBrowserFileOpServer.exe"
-""-"z:\sys\bin\FileBrowserFileOpClient.dll"
--- a/filebrowser/ui/inc/enginewrapper.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +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 ENGINEWRAPPER_H
-#define ENGINEWRAPPER_H
-
-#include "fbdriveentry.h"
-#include "fbfileentry.h"
-#include "filebrowsersettings.h"
-
-#include "engine.h"
-#include "FBFileUtils.h"
-#include "FB.hrh"
-
-#include <QString>
-#include <QStringList>
-#include <QModelIndexList>
-
-class CEngine;
-class SearchAttributes;
-class SearchResults;
-class FileBrowserView;
-class HbProgressDialog;
-
-class QModelIndex;
-
-class OverwriteOptions
-{
-public:
-    OverwriteOptions() :
-            doFileOperations(true),
-            queryIndex(0),
-            overWriteFlags(CFileMan::EOverWrite)
-    {}
-
-    bool doFileOperations;
-    int queryIndex;
-    QString postFix;
-    int overWriteFlags;
-};
-
-/**
- * class that is used for communicating between Symbian and Qt code.
- */
-class EngineWrapper : public QObject, public MFileBrowserUI
-{
-    Q_OBJECT
-public:
-    /**
-     * Constructor
-     */
-    EngineWrapper();
-    
-    /**
-     * Destructor
-     */
-    ~EngineWrapper();
-    
-    /**
-     * Initializes Engine Wrapper
-     * @return true if engine was started successfully
-     */
-    bool init();
-
-public: // from MFileBrowserUI
-    /* Functions that are called from engine: */
-    void ShowInformationNote(const TDesC &aDescText, const TDesC &aDescTitle);
-    void ShowErrorNote(const TDesC& aDescText, TBool aNoTimeout = EFalse);
-    void ShowConfirmationNote(const TDesC& aDescText, TBool aNoTimeout = EFalse);
-
-    void ShowProgressDialog(const TDesC& aDescText, TInt aMinimum, TInt aMaximum);
-    void CancelProgressDialog();
-    void SetProgressValue(TInt aValue);
-
-    void ShowWaitDialog(const TDesC& aText);
-    void CancelWaitDialog();
-    void ProcessEvents();
-
-    TBool ShowConfirmationQuery(const TDesC& aDescText);
-    void NotifyModelHasChanged();
-
-public: 
-    /* Functions that are called from UI */
-    bool searchFiles();
-    SearchAttributes getFileSearchAttributes();
-    int setFileSearchAttributes(SearchAttributes attributes);
-    SearchResults getSearchResults();
-
-    FileBrowserSettings &settings() { return mSettings; }
-    const FileBrowserSettings &settings() const { return mSettings; }
-
-    void saveSettings(bool aNotifyModules = true);
-
-    void startExecutingCommands(const QString &aCommandsExecutionMessage);
-    void refreshView();
-    inline TListingMode listingMode() { return mEngine->FileUtils()->ListingMode(); }
-//    TBool IsCurrentDriveReadOnly();
-//    TBool IsCurrentItemDirectory();
-    void moveUpOneLevel();
-    void moveDownToDirectory(const QModelIndex& index);
-    int clipboardCut(const QModelIndexList &aSelectionIndices);
-    int clipboardCopy(const QModelIndexList &aSelectionIndices);
-    void clipboardPaste(const OverwriteOptions &aOverwriteOptions);
-    void copyToFolder(const QString &aTargetDir, const OverwriteOptions &aOverwriteOptions, bool aMove);
-    void createNewFile(const QString &aNewFileName);
-    void createNewDirectory(const QString &aNewDirectoryName);
-    void deleteItems(const QModelIndexList& aSelectionIndices);
-    bool selectionHasDirs();
-    void rename(const QModelIndex& aIndex, const QString aNewName);
-    void touch(bool aRecurse);
-    void properties(const QModelIndex &aCurrentItemIndex, QStringList &aPropertyList, QString &aTitleText);
-    void setAttributes(quint32 &, quint32 &, bool &);
-
-    bool openAppArc(QString fileName);
-    bool openDocHandler(QString fileName, bool embeddedVal = false);
-
-    bool isDriveListViewActive();
-    bool isCurrentDriveReadOnly();
-    bool isClipBoardListInUse();
-    int itemCount() const;
-    FbDriveEntry getDriveEntry(const QModelIndex& aIndex) const;
-    FbFileEntry getFileEntry(const QModelIndex& aIndex) const;
-	
-    const CArrayFix<TInt> *convertSelectionList(const QModelIndexList &aSelectionIndices);
-    void setCurrentSelection(const QModelIndexList &aSelectionIndices);
-    bool isDestinationEntriesExists(const QModelIndexList &aSelectionIndices, QString aTargetDir);
-    bool targetExists(const QModelIndex& aIndex, const QString aNewName);
-    QString currentPath() const;
-    TOverwriteOptions convertOverwriteOptions(const OverwriteOptions &aOverwriteOptions);
-    bool hasDrivePassword(const QModelIndex &aIndex);
-    bool isDriveRemovable(const QModelIndex &aIndex);
-    bool isDriveLocked(const QModelIndex &aIndex);
-    void GetDriveName(const QModelIndex &aIndex, QString &aDriveName);
-    void GetDriveVolumeLabel(const QModelIndex &aIndex, QString &aDriveName);
-
-    void DiskAdminSetDrivePassword(const QModelIndex &aIndex, const QString &aOldPassword, const QString &aNewPassword);
-    void DiskAdminUnlockDrive(const QModelIndex &aIndex, const QString &aOldPassword);
-    void DiskAdminClearDrivePassword(const QModelIndex &aIndex, const QString &aOldPassword);
-    void DiskAdminEraseDrivePassword(const QModelIndex &aIndex);
-    void DiskAdminFormatDrive(const QModelIndex &aIndex, bool aQuickFormat);
-    void DiskAdminQuickFormatDrive(const QModelIndex &aIndex, bool aQuickFormat);
-    void DiskAdminCheckDisk(const QModelIndex &aIndex);
-    void DiskAdminScanDrive(const QModelIndex &aIndex);
-    void DiskAdminSetDriveName(const QModelIndex &aIndex, const QString &aDriveName);
-    void DiskAdminSetDriveVolumeLabel(const QModelIndex &aIndex, const QString &aVolumeLabel);
-    void DiskAdminEjectDrive(const QModelIndex &aIndex);
-    void DiskAdminDismountDrive(const QModelIndex &aIndex);
-    void DiskAdminEraseMBR(const QModelIndex &aIndex);
-    void DiskAdminPartitionDrive(const QModelIndex &aIndex, bool aEraseMBR, int aAmountOfPartitions);
-
-    void ToolsSetErrRd(bool aEnable);
-    bool ErrRdFileExists();
-
-    void ToolsErrorSimulateLeave(int aLeaveCode);
-    void ToolsErrorSimulatePanic(QString aPanicCategory, int aPanicCode);
-    void ToolsErrorSimulateException(int aExceptionCode);
-
-    quint32 getDebugMask();
-    void toolsSetDebugMask(quint32 aDbgMask);
-
-    void toolsWriteAllFiles();
-
-    void showFileCheckSums(const QModelIndex &aIndex, TFileBrowserCmdFileChecksums checksumType);
-
-    TClipBoardMode getClipBoardMode() { return mEngine->FileUtils()->GetClipBoardMode(); }
-
-signals:
-    void fileSystemDataChanged();
-
-private slots:
-        void progressDialogCancelled();
-        void waitDialogCancelled();
-
-private:
-    // FB engine
-    CEngine *mEngine;
-    // List of found files results for Ui
-    QStringList mFilesFound;
-    FileBrowserSettings mSettings;
-    HbProgressDialog *mProgressDialog;
-    HbProgressDialog *mWaitDialog;
-    };
-
-#endif //ENGINEWRAPPER_H
--- a/filebrowser/ui/inc/fbattributesview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef FBATTRIBUTESVIEW_H
-#define FBATTRIBUTESVIEW_H
-
-#include <HbView>
-
-class HbDataForm;
-class HbDataFormModelItem;
-
-class FbAttributesView : public HbView
-{
-    Q_OBJECT
-
-public:
-    FbAttributesView(quint32 &, quint32 &, bool &);
-    virtual ~FbAttributesView();
-
-    quint32 &setAttributesMask() { return mSetAttributesMask; }
-    quint32 &clearAttributesMask() { return mClearAttributesMask; }
-    bool &recurse() { return mRecurse; }
-
-signals:
-    void finished(bool ok);
-
-public slots:
-    void accept();
-    void reject();
-
-private:
-    void initDataForm();
-    void createToolbar();
-    void loadSettings();
-    void saveSettings();
-
-private:
-    quint32 mSetAttributesMask;
-    quint32 mClearAttributesMask;
-    bool mRecurse;
-
-    HbDataForm *mForm;
-    HbDataFormModelItem *mArchiveItem;
-    HbDataFormModelItem *mHiddenItem;
-    HbDataFormModelItem *mReadOnlyItem;
-    HbDataFormModelItem *mSystemItem;
-    HbDataFormModelItem *mRecurseItem;
-};
-
-#endif // FBATTRIBUTESVIEW_H
--- a/filebrowser/ui/inc/fbdriveentry.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBDRIVEENTRY_H
-#define FBDRIVEENTRY_H
-
-#include "FBFileUtils.h"
-#include <QString>
-#include <QDate>
-
-
-/**
- * class that is used for communicating between Symbian and Qt code.
- */
-class FbDriveEntry {
-
-public:
-    
-    /**
-     * Constructor
-     */
-    FbDriveEntry(TDriveEntry aDriveEntry);
-    
-    /**
-     * Destructor
-     */
-    ~FbDriveEntry();
-    
-    /* Functions that are called from UI */
-public: 
-    QChar driveLetter();
-    int number();
-    QString mediaTypeString();
-    QString attributesString();
-    int iconId();
-    qint64 volumeInfoFree();
-    qint64 volumeInfoSize();
-
-private:
-    TDriveEntry mDriveEntry;
-    };
-
-#endif //FBDRIVEENTRY_H
--- a/filebrowser/ui/inc/fbdrivelistviewitem.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef FBDRIVELISTVIEWITEMS_H
-#define FBDRIVELISTVIEWITEMS_H
-
-#include <HbListViewItem>
-
-#include <QGraphicsWidget>
-#include <QtGlobal>
-
-class HbAbstractViewItem;
-class HbLabel;
-class HbCheckBox;
-class HbWidget;
-
-class QGraphicsLinearLayout;
-class QModelIndex;
-class QGraphicsItem;
-
-class FbDriveListViewItem : public HbListViewItem
-{
-    Q_OBJECT
-
-public:
-    FbDriveListViewItem( QGraphicsItem *parent = 0 );
-    ~FbDriveListViewItem();
-
-    virtual bool canSetModelIndex(const QModelIndex &index) const;
-    virtual HbAbstractViewItem *createItem();
-    virtual void updateChildItems();
-
-private slots:
-    void setCheckedState( int state );
-
-private:
-    virtual void polish(HbStyleParameters& params);
-
-private:
-    void init();
-
-    QGraphicsLinearLayout *hLayout;
-
-    HbLabel *mDiskNameLabel;
-    HbLabel *mSizeLabel;
-    HbLabel *mFreeLabel;
-    //HbCheckBox *mCheckBox;
-    HbLabel *mIconLabel;
-};
-
-#endif // FBDRIVELISTVIEWITEMS_H
--- a/filebrowser/ui/inc/fbdrivemodel.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef FBDRIVEMODELH_H_
-#define FBDRIVEMODELH_H_
-
-#include "fbdriveentry.h"
-
-#include <QAbstractListModel>
-#include <QVariant>
-
-// Forward declarations
-class EngineWrapper;
-class QModelIndex;
-class QFileIconProvider;
-class QObject;
-
-class FbDriveModel : public QAbstractListModel
-{
-    Q_OBJECT
-
-public:
-    explicit FbDriveModel(EngineWrapper *engineWrapper, QObject *parent = 0);
-    virtual ~FbDriveModel();
-
-    int rowCount(const QModelIndex &parent = QModelIndex()) const;
-    QVariant data(const QModelIndex &index, int role) const;
-    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
-
-    FbDriveEntry driveEntry(const QModelIndex &index) const;
-    QString driveLetter( const QModelIndex &index ) const;
-    QString mediaTypeString(const QModelIndex &index) const;
-
-private:
-    EngineWrapper *mEngineWrapper;
-    QFileIconProvider *mFileIconProvider;
-};
-
-
-
-#endif /* FBDRIVEMODELH_H_ */
--- a/filebrowser/ui/inc/fbdriveview.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBDRIVEVIEWH_H_
-#define FBDRIVEVIEWH_H_
-
-#include "menuaction.h"
-#include "enginewrapper.h"
-
-#include <HbView>
-#include <HbApplication>
-
-#include <QModelIndexList>
-
-// Forward declarations
-class QFileInfo;
-class QSignalMapper;
-class QItemSelection;
-class QString;
-class QGraphicsLinearLayout;
-
-class HbListView;
-class HbListWidget;
-class HbToolBar;
-class HbLabel;
-class HbDialog;
-class HbAbstractViewItem;
-class HbMenu;
-class HbSearchPanel;
-
-class EditorView;
-class SearchView;
-class SettingsView;
-class EngineWrapper;
-class FbDriveModel;
-class FileBrowserSortFilterProxyModel;
-
-class FbDriveView : public HbView
-{
-    Q_OBJECT
-
-public:
-    explicit FbDriveView();
-    virtual ~FbDriveView();
-    void init(EngineWrapper *engineWrapper);
-
-public slots:
-    void refreshList();
-
-private:
-    void openListDialog(const QStringList &items, const QString &titleText, QObject *receiver, const char *member);
-
-    void openPropertyDialog(const QStringList &propertyList, const QString &title);
-
-    QModelIndex currentItemIndex();
-    void storeSelectedItemsOrCurrentItem();
-
-    // Menu related methods
-    void createMenu();
-    void createFileMenu();
-    void createEditMenu();
-    void createViewMenu();
-    void createToolsMenu();
-
-    void createSettingsMenuItem();
-    void createAboutMenuItem();
-    void createExitMenuItem();
-
-    void createContextMenu();
-    void createFileContextMenu();
-    void createEditContextMenu();
-    void createViewContextMenu();
-    void createDiskAdminContextMenu();
-
-private slots:
-    // menu action slots
-    // file menu
-    void fileOpenDrive();
-    void fileSearch();
-
-    void fileProperties();
-
-    void fileSetAttributes();
-
-    // edit menu
-    void editSnapShotToE();
-
-    // view menu
-    void viewRefresh();
-
-    // disk admin menu
-    void diskAdminSetDrivePassword();
-    void diskAdminSetDrivePasswordNew(HbAction *);
-    void doDiskAdminSetDrivePassword(HbAction *);
-
-    void diskAdminUnlockDrive();
-    void doDiskAdminUnlockDrive(HbAction *);
-
-    void diskAdminClearDrivePassword();
-    void doDiskAdminClearDrivePassword(HbAction *);
-
-    void diskAdminEraseDrivePassword();
-    void doDiskAdminEraseDrivePassword(int);
-
-    void diskAdminFormatDrive();
-    void doDiskAdminFormatDrive(int);
-
-    void diskAdminQuickFormatDrive();
-    void doDiskAdminQuickFormatDrive(int);
-
-    void diskAdminCheckDisk();
-
-    void diskAdminScanDrive();
-    void doDiskAdminScanDrive(int);
-
-    void diskAdminSetDriveName();
-    void doDiskAdminSetDriveName(HbAction *);
-
-    void diskAdminSetDriveVolumeLabel();
-    void doDiskAdminSetDriveVolumeLabel(HbAction *);
-
-    void diskAdminEjectDrive();
-    void diskAdminDismountDrive();
-    void doDiskAdminDismountDrive(int);
-
-    void diskAdminEraseMBR();
-    void doDiskAdminEraseMBR(int);
-    void doDiskAdminReallyEraseMBR(int);
-    void doDiskAdminNotRemovableReallyEraseMBR(int);
-    
-    void diskAdminPartitionDrive();
-    void diskAdminPartitionDriveProceed(int);
-    void diskAdminPartitionDriveReallyProceed(int);
-    void diskAdminPartitionDriveIsNotRemovable(int);
-    void diskAdminPartitionDriveEraseMbr(int);
-    void diskAdminPartitionDriveGetCount(HbAction *);
-
-    // tools menu
-    void toolsAllAppsToTextFile();
-    void toolsAllFilesToTextFile();
-//    void toolsAvkonIconCacheEnable();
-//    void toolsAvkonIconCacheDisable();
-
-    void toolsDisableExtendedErrors();
-    void toolsDumpMsgStoreWalk();
-    void toolsEditDataTypes();
-    void toolsEnableExtendedErrors();
-
-    void toolsErrorSimulateLeave();
-    void doToolsErrorSimulateLeave(HbAction *);
-
-    void toolsErrorSimulatePanic();
-    void doToolsErrorSimulatePanicCode(HbAction *);
-    void doToolsErrorSimulatePanic(HbAction *);
-
-    void toolsErrorSimulateException();
-    void doToolsErrorSimulateException(HbAction *);
-
-//    void toolsLocalConnectivityActivateInfrared();
-//    void toolsLocalConnectivityLaunchBTUI();
-//    void toolsLocalConnectivityLaunchUSBUI();
-    void toolsMessageInbox();
-    void toolsMessageDrafts();
-    void toolsMessageSentItems();
-    void toolsMessageOutbox();
-    void toolsMemoryInfo();
-    void toolsSecureBackStart();
-    void toolsSecureBackRestore();
-    void toolsSecureBackStop();
-    void toolsSetDebugMaskQuestion();
-    void toolsSetDebugMask(HbAction *);
-    void toolsShowOpenFilesHere();
-
-    // main menu items
-    void about();
-    
-signals:
-    void aboutToShowFileView();
-    void aboutToShowSettingsView();
-    void aboutToShowEditorView(const QString &, bool);
-    void aboutToShowSearchView(const QString &);
-    void aboutToSimulateLeave(int);
-
-private slots:
-    void updateOptionMenu();
-    void updateContextMenu();
-    void selectionChanged(const QItemSelection &, const QItemSelection &);
-    void activated(const QModelIndex& index);
-
-    void onLongPressed(HbAbstractViewItem *, QPointF);
-
-private:
-    EngineWrapper *mEngineWrapper;
-
-    HbListView *mListView;
-    HbLabel *mNaviPane;
-
-    QGraphicsLinearLayout *mMainLayout;
-
-    // file info contains all needed information of selected file from file model
-    QModelIndexList mClipboardIndexes;
-    QModelIndexList mSelectionIndexes;
-
-    FbDriveModel *mFbDriveModel;
-    OptionMenuActions mOptionMenuActions;
-    ContextMenuActions mContextMenuActions;
-    HbMenu *mContextMenu;
-
-    // flags
-    bool mLocationChanged;
-    // flag for removing source file after copied to target file
-    bool mRemoveFileAfterCopied;
-    bool mClipBoardInUse;
-    bool mFolderContentChanged;
-    QModelIndex mCurrentIndex;
-
-    // temporarily storage
-    QString mOldPassword;
-    QString mPanicCategory;
-    QString mAbsoluteFilePath;
-    OverwriteOptions mOverwriteOptions;
-    QModelIndex mModelIndex;
-    QString mNewFileName;
-    bool mProceed;
-    bool mEraseMBR;
-};
-
-
-
-#endif /* FBDRIVEVIEWH_H_ */
--- a/filebrowser/ui/inc/fbeditorview.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBEDITORVIEW_H
-#define FBEDITORVIEW_H
-
-#include <hbview.h>
-
-class HbTextEdit;
-class HbAction;
-
-class FbEditorView : public HbView
-{
-    Q_OBJECT
-
-public:
-    FbEditorView();
-    ~FbEditorView();
-    void open(const QString& fileName, bool flagReadOnly);
-
-signals:
-    void finished(bool ok);
-
-private slots:
-    void backButtonClicked();
-    void displayInText();
-    void displayInHex();
-    void updateMenu();
-
-    /*
-    void newFile();
-    bool save();
-    bool saveAs();
-    void about();
-    void documentWasModified();
-    */
- 
-
-private:
-    void loadFile(const QString &fileName);
-    void createMenu();
-
-    // editor
-    HbTextEdit *mTextEdit;
-    // if flag true, file is currently in hex format
-    bool mFileHex;
-    bool mFlagReadOnly;
-    QString mFileName;
-    QString mFileContent;
-
-    HbAction* mToTextAction;
-    HbAction* mToHexAction;
-    HbAction* mExitAction;
-};
-
-#endif // FBEDITORVIEW_H
--- a/filebrowser/ui/inc/fbfileentry.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +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 FILEEENTRY_H
-#define FILEEENTRY_H
-
-#include "FBFileUtils.h"
-#include <QString>
-#include <QDate>
-#include <QStringList>
-
-/**
- * class that is used for communicating between Symbian and Qt code.
- */
-class FbFileEntry
-{
-public:
-    /**
-     * Constructor
-     */
-    FbFileEntry(TFileEntry aFileEntry);
-    
-    /**
-     * Destructor
-     */
-    ~FbFileEntry();
-    
-    /* Functions that are called from UI */
-public: 
-    QString fullName();
-    QString path();
-
-    int attributes();
-    QString attributesString();
-    bool isArchive() { return mFileEntry.iEntry.IsArchive(); }
-    bool isHidden() { return mFileEntry.iEntry.IsHidden(); }
-    bool isReadOnly() { return mFileEntry.iEntry.IsReadOnly(); }
-    bool isSystem() { return mFileEntry.iEntry.IsSystem(); }
-
-    int size();
-    QString sizeString();
-
-//    QDateTime modified();
-    QString modifiedString();
-//    int Uid(int id);
-    bool isDir();
-    QString name();
-
-    int dirEntries();
-    QString dirEntriesString();
-
-    int iconId();
-
-private:
-    TFileEntry mFileEntry;
-    };
-
-#endif //FBFILEEENTRY_H
--- a/filebrowser/ui/inc/fbfilelistviewitem.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef FBFILELISTVIEWITEM_H
-#define FBFILELISTVIEWITEM_H
-
-#include <HbListViewItem>
-
-#include <QGraphicsWidget>
-#include <QtGlobal>
-
-class HbAbstractViewItem;
-class HbLabel;
-class HbCheckBox;
-class HbWidget;
-
-class QGraphicsLinearLayout;
-class QModelIndex;
-class QGraphicsItem;
-
-class FbFileListViewItem : public HbListViewItem
-{
-    Q_OBJECT
-
-public:
-    FbFileListViewItem( QGraphicsItem *parent = 0 );
-    ~FbFileListViewItem();
-
-    virtual bool canSetModelIndex(const QModelIndex &) const;
-    virtual HbAbstractViewItem *createItem();
-    virtual void updateChildItems();
-
-private slots:
-    void setCheckedState(int state);
-
-private:
-    virtual void polish(HbStyleParameters &);
-
-private:
-    void init();
-
-    QGraphicsLinearLayout *hLayout;
-
-    HbLabel *mDiskNameLabel;
-    HbLabel *mSizeLabel;
-    HbLabel *mFreeLabel;
-    //HbCheckBox *mCheckBox;
-    HbLabel *mIconLabel;
-};
-
-#endif // FBFILELISTVIEWITEM_H
--- a/filebrowser/ui/inc/fbfilemodel.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBFILEMODELH_H_
-#define FBFILEMODELH_H_
-
-#include <QAbstractListModel>
-
-// Forward declarations
-class EngineWrapper;
-class QModelIndex;
-class QFileIconProvider;
-
-class FbFileModel : public QAbstractListModel
-{
-    Q_OBJECT
-
-public:
-    explicit FbFileModel(EngineWrapper *engineWrapper, QObject *parent = 0);
-    virtual ~FbFileModel();
-
-    int rowCount(const QModelIndex &parent = QModelIndex()) const;
-    QVariant data(const QModelIndex &index, int role) const;
-    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
-
-private:
-    EngineWrapper *mEngineWrapper;
-    QFileIconProvider *mFileIconProvider;
-};
-
-
-
-#endif /* FBFILEMODELH_H_ */
--- a/filebrowser/ui/inc/fbfileview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +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 FBFILEVIEWH_H_
-#define FBFILEVIEWH_H_
-
-#include "menuaction.h"
-#include "enginewrapper.h"
-
-#include <HbView>
-#include <HbApplication>
-
-#include <QModelIndexList>
-
-// Forward declarations
-class QFileInfo;
-class QSignalMapper;
-class QItemSelection;
-class QString;
-class QGraphicsLinearLayout;
-
-class HbListView;
-class HbListWidget;
-class HbToolBar;
-class HbLabel;
-class HbDialog;
-class HbAbstractViewItem;
-class HbMenu;
-class HbSearchPanel;
-
-class FbEditorView;
-class SearchView;
-class SettingsView;
-class EngineWrapper;
-class FbFileModel;
-class FileBrowserSortFilterProxyModel;
-
-class FbFileView : public HbView
-{
-    Q_OBJECT
-
-public:
-    explicit FbFileView();
-    virtual ~FbFileView();
-    void init(EngineWrapper *engineWrapper);
-
-public slots:
-    void refreshList();
-
-private:
-    void fileOverwriteDialog();
-    void openListDialog(const QStringList &items, const QString &titleText, QObject *receiver, const char *member);
-
-    void openPropertyDialog(const QStringList &propertyList, const QString &title);
-
-    void storeSelectedItemsOrCurrentItem();
-    QModelIndex currentItemIndex();
-
-    // Menu related methods
-    void createMenu();
-    void createFileMenu();
-    void createEditMenu();
-    void createViewMenu();
-    void createToolsMenu();
-
-    void createSelectionMenuItem();
-    void createSettingsMenuItem();
-    void createAboutMenuItem();
-    void createExitMenuItem();
-
-    void createContextMenu();
-    void createFileContextMenu();
-    void createEditContextMenu();
-    void createViewContextMenu();
-    void createToolBar();
-
-private slots:
-    // menu action slots
-    // file menu
-    void fileBackMoveUp();
-    void fileOpenDirectory();
-    void fileSearch();
-
-    void fileNewFile();
-    void doFileNewFile(HbAction *);
-
-    void fileNewDirectory();
-    void doFileNewDirectory(HbAction *);
-
-    void fileDelete();
-    void doFileDelete(int);
-
-    void fileRename();
-    void doFileRename(HbAction *);
-    void doFileRenameFileExist(int);
-
-    void fileTouch();
-    void doFileTouch(int);
-    void fileProperties();
-
-    void fileChecksumsMD5();
-    void fileChecksumsMD2();
-    void fileChecksumsSHA1();
-    void fileChecksums(TFileBrowserCmdFileChecksums checksumType);
-
-    void fileSetAttributes();
-
-    // edit menu
-    void editSnapShotToE();
-    void editCut();
-    void editCopy();
-    void editPaste();
-
-    void editCopyToFolder();
-    void doEditCopyToFolder(int);
-
-    void editMoveToFolder();
-    void doEditMoveToFolder(int);
-
-    void editSelect();
-    void editUnselect();
-    void editSelectAll();
-    void editUnselectAll();
-
-    // view menu
-    void viewFilterEntries();
-    void filterCriteriaChanged(const QString &);
-    void clearFilterCriteria();
-    void viewRefresh();
-
-    // tools menu
-    void toolsAllAppsToTextFile();
-    void toolsAllFilesToTextFile();
-//    void toolsAvkonIconCacheEnable();
-//    void toolsAvkonIconCacheDisable();
-
-    void toolsDisableExtendedErrors();
-    void toolsDumpMsgStoreWalk();
-    void toolsEditDataTypes();
-    void toolsEnableExtendedErrors();
-
-    void toolsErrorSimulateLeave();
-    void doToolsErrorSimulateLeave(HbAction *);
-
-    void toolsErrorSimulatePanic();
-    void doToolsErrorSimulatePanicCode(HbAction *);
-    void doToolsErrorSimulatePanic(HbAction *);
-
-    void toolsErrorSimulateException();
-    void doToolsErrorSimulateException(HbAction *);
-
-//    void toolsLocalConnectivityActivateInfrared();
-//    void toolsLocalConnectivityLaunchBTUI();
-//    void toolsLocalConnectivityLaunchUSBUI();
-    void toolsMessageInbox();
-    void toolsMessageDrafts();
-    void toolsMessageSentItems();
-    void toolsMessageOutbox();
-    void toolsMemoryInfo();
-    void toolsSecureBackStart();
-    void toolsSecureBackRestore();
-    void toolsSecureBackStop();
-    void toolsSetDebugMaskQuestion();
-    void toolsSetDebugMask(HbAction *);
-    void toolsShowOpenFilesHere();
-
-    // main menu items
-    void selectionModeChanged();
-    void about();
-    
-signals:
-    void aboutToShowDriveView();
-    void aboutToShowSettingsView();
-    void aboutToShowEditorView(const QString &, bool);
-    void aboutToShowSearchView(const QString &);
-    void aboutToShowAttributesView(const QString &, quint32 &, quint32 &, bool &);
-    void aboutToSimulateLeave(int);
-
-private slots:
-    void updateOptionMenu();
-    void updateContextMenu();
-    void selectionChanged(const QItemSelection &, const QItemSelection &);
-    void activated(const QModelIndex& index);
-    void activateSelectionMode();
-    void deActivateSelectionMode();
-    void onLongPressed(HbAbstractViewItem *, QPointF);
-
-    void fileOpen(HbAction *);
-    void fileOverwrite(HbAction *);
-    void fileOverwritePostfix(HbAction *);
-
-private:
-    // Internal methods
-    void proceedFileRename();
-    void proceedFileTouch(bool recurse);
-
-private:
-    EngineWrapper *mEngineWrapper;
-
-    HbListView *mListView;
-    HbToolBar *mToolBar;
-    HbLabel *mNaviPane;
-    HbSearchPanel *mSearchPanel;
-
-    QGraphicsLinearLayout *mMainLayout;
-
-    // file info contains all needed information of selected file from file model
-    QModelIndexList mClipboardIndexes;
-    QModelIndexList mSelectionIndexes;
-
-    FbFileModel *mFbFileModel;
-    FileBrowserSortFilterProxyModel *mSortFilterProxyModel;
-    OptionMenuActions mOptionMenuActions;
-    ContextMenuActions mContextMenuActions;
-    HbMenu *mContextMenu;
-    HbAction *mToolbarBackAction;
-    HbAction* mToolbarFilterAction;
-    HbAction *mToolbarPasteAction;
-
-    // flags
-    bool mItemHighlighted;
-    bool mLocationChanged;
-    // flag for removing source file after copied to target file
-    bool mRemoveFileAfterCopied;
-    bool mClipBoardInUse;
-    bool mFolderContentChanged;
-    QModelIndex mCurrentIndex;
-
-    // temporarily storage
-    QString mOldPassword;
-    QString mPanicCategory;
-    QString mAbsoluteFilePath;
-    OverwriteOptions mOverwriteOptions;
-    QModelIndex mModelIndex;
-    QString mNewFileName;
-    bool mProceed;
-    bool mEraseMBR;
-};
-
-
-
-#endif /* FBFILEVIEWH_H_ */
--- a/filebrowser/ui/inc/fbfolderselectiondialog.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBFOLDERSELECTIONDIALOG_H_
-#define FBFOLDERSELECTIONDIALOG_H_
-
-#include <HbDialog>
-
-// forward declarations
-class FbFolderSelectorWrapper;
-class HbListWidget;
-class HbListWidgetItem;
-class HbLabel;
-class QFileIconProvider;
-
-class FbFolderSelectionDialog : public HbDialog
-{
-    Q_OBJECT
-
-public:
-    explicit FbFolderSelectionDialog(QGraphicsItem *parent = 0);
-    virtual ~FbFolderSelectionDialog();
-
-    QString selectedFolder();
-
-private:
-    void init();
-    void createHeading();
-    void createList();
-    void createToolBar();
-
-private slots:
-    void activated(HbListWidgetItem *);
-    void refreshView();
-    void moveUpPressed();
-
-protected:
-    HbLabel *mTitle;
-
-private:
-    HbListWidget *mFolderList;
-    FbFolderSelectorWrapper *mFolderSelectorWrapper;
-    QFileIconProvider *mFileIconProvider;
-};
-
-class FbCopyToFolderSelectionDialog : public FbFolderSelectionDialog
-{
-    Q_OBJECT
-
-public:
-    explicit FbCopyToFolderSelectionDialog(QGraphicsItem *parent = 0);
-};
-
-class FbMoveToFolderSelectionDialog : public FbFolderSelectionDialog
-{
-    Q_OBJECT
-
-public:
-    explicit FbMoveToFolderSelectionDialog(QGraphicsItem *parent = 0);
-};
-
-#endif // FBFOLDERSELECTIONDIALOG_H_
--- a/filebrowser/ui/inc/fbfolderselectorwrapper.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBFOLDERSELECTORWRAPPER_H_
-#define FBFOLDERSELECTORWRAPPER_H_
-
-#include "fbdriveentry.h"
-#include "fbfileentry.h"
-#include "FBFolderSelector.h"
-
-#include <QString>
-#include <QStringList>
-#include <QModelIndexList>
-
-class CEngine;
-class SearchAttributes;
-class SearchResults;
-class FileBrowserView;
-class HbProgressDialog;
-
-class QModelIndex;
-class CFileBrowserFolderSelector;
-class EngineWrapper;
-
-
-/**
- * class that is used for communicating between Symbian and Qt code.
- */
-class FbFolderSelectorWrapper : public QObject, public MFolderSelectorUI
-{
-    Q_OBJECT
-public:
-    FbFolderSelectorWrapper();
-    ~FbFolderSelectorWrapper();
-    
-    bool init();
-
-    QString currentPath() const;
-    bool isDriveListViewActive() const;
-    int itemCount() const;
-    FbDriveEntry getDriveEntry(const int aIndex) const;
-    FbFileEntry getFileEntry(const int aIndex) const;
-
-    void moveDownToDirectory(int);
-    void moveUpOneLevel();
-
-signals:
-    void FolderSelectionChanged();
-
-public:  // From MFolderSelectorUI
-    virtual void InformFolderSelectionChanged();
-
-private:
-    CFileBrowserFolderSelector *mDestinationFolderSelector;
-};
-
-#endif // FBFOLDERSELECTORWRAPPER_H_
--- a/filebrowser/ui/inc/fbmainwindow.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBMAINWINDOW_H_
-#define FBMAINWINDOW_H_
-
-#include <hbmainwindow.h>
-
-class HbApplication;
-class HbView;
-
-class EngineWrapper;
-class FbDriveView;
-class FbFileView;
-class FbSettingsView;
-class FbEditorView;
-class FbSearchView;
-class FbAttributesView;
-
-class FbMainWindow : public HbMainWindow
-{
-    Q_OBJECT
-
-public:
-    explicit FbMainWindow(QWidget *parent = 0);
-    virtual ~FbMainWindow();
-    
-    void init();
-
-private slots:
-    void openPreviousBrowserView();
-    void openFileBrowserView(bool);
-    void openDriveView();
-    void openFileView();
-    void openSettingsView();
-    void openEditorView(const QString &, bool);
-    void openSearchView(const QString &);
-
-    void openAttributesView(const QString &, quint32 &, quint32 &, bool &);
-    void closeAttributesView(bool);
-    
-private:
-    EngineWrapper *mEngineWrapper;
-    FbDriveView *mDriveView;
-    FbFileView *mFileView;
-    FbSettingsView *mSettingsView;
-    FbEditorView *mEditorView;
-    FbSearchView *mSearchView;
-    FbAttributesView *mAttributesView;
-    HbView *mPreviousView;
-};
-
-#endif /* FBMAINWINDOW_H_ */
--- a/filebrowser/ui/inc/fbsearchview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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 FBSEARCHVIEW_H
-#define FBSEARCHVIEW_H
-
-#include <HbView>
-
-#include <QDateTime>
-
-class QStringList;
-
-class EngineWrapper;
-class HbDataForm;
-class HbDataFormModelItem;
-class HbProgressDialog;
-
-/**
-  * Settings class that is used for 
-  */
-class SearchAttributes
-{
-public:
-    QString   mSearchDir;
-    QString   mWildCards;
-    QString   mTextInFile;
-    int       mMinSize;
-    int       mMaxSize;
-    QDate     mMinDate;
-    QDate     mMaxDate;
-    bool      mRecurse;
-    bool      mDefaultWildCard;
-};
-
-/**
- * search results class.
- */
-class SearchResults
-{
-public:
-    int mNumberOfFoundFiles;
-    QStringList *mFoundFilesList;
-};
-
-class FbSearchView : public HbView
-{
-    Q_OBJECT
-
-public:
-    explicit FbSearchView(EngineWrapper &engineWrapper);
-    ~FbSearchView();
-    void open(const QString &path);
-
-signals:
-    void finished(bool ok);
-
-private slots:
-    void accept();
-    void reject();
-
-private:
-    void initDataForm();
-    void createToolbar();
-    void loadAttributes();
-    void readFormItems();
-
-    void startFileSearch();
-    void fileSearchResults();
-
-private:
-    /* EngineWrapper */
-    EngineWrapper &mEngineWrapper;  
-
-    /* Search attributes */
-    SearchAttributes mAttributes;    
-    /* Search results */
-    SearchResults mResults;
-
-    HbDataForm *mForm;
-    HbDataFormModelItem *mSearchFileNameItem;
-    HbDataFormModelItem *mWildCardItem;
-    HbDataFormModelItem *mHasString;
-    HbDataFormModelItem *mRecurse;
-    HbDataFormModelItem *mMinSize;
-    HbDataFormModelItem *mMaxSize;
-    HbDataFormModelItem *mMinDate;
-    HbDataFormModelItem *mMaxDate;
-    QString mPath;
-    HbProgressDialog *mProgressDialog;
-};
-
-#endif // FBSEARCHVIEW_H
--- a/filebrowser/ui/inc/fbsettingsview.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FBSETTINGSVIEW_H
-#define FBSETTINGSVIEW_H
-
-#include <hbview.h>
-
-class HbDataForm;
-class HbDataFormModelItem;
-class EngineWrapper;
-class FileBrowserSettings;
-
-class FbSettingsView : public HbView
-{
-    Q_OBJECT
-
-public:
-    FbSettingsView(EngineWrapper &engineWrapper);
-    virtual ~FbSettingsView();
-
-    void initDataForm();
-signals:
-    void finished(bool ok);
-
-public slots:
-//    void displayModeChanged();
-//    void fileViewChanged();
-//    void subDirectoryInfoChanged();
-//    void associatedIconsChanged();
-//    void rememberFolderOnExitChanged();
-//    void rememberLastFolderChanged();
-//    void showToolbarChanged();
-
-//    void toggleChange(QModelIndex, QModelIndex);
-    void accept();
-    void reject();
-
-private:
-    void createToolbar();
-    void constructMenu();
-    void loadSettings(const FileBrowserSettings &settings);
-    void saveSettings(FileBrowserSettings &settings);
-
-private:
-    EngineWrapper &mEngineWrapper;
-
-    HbDataForm *mForm;
-    HbDataFormModelItem *mDisplayModeItem;
-    HbDataFormModelItem *mFileViewItem;
-    HbDataFormModelItem *mShowDirectoryInfoItem;
-    HbDataFormModelItem *mShowAssociatedIconsItem;
-    HbDataFormModelItem *mRememberFolderOnExitItem;
-    HbDataFormModelItem *mRememberLastFolderItem;
-    HbDataFormModelItem *mShowToolbarItem;
-
-    HbDataFormModelItem *mSupportNetDrivesItem; //"Support net drives"
-    HbDataFormModelItem *mBypassPlatformSecurityItem; //"Bypass plat.security"
-    HbDataFormModelItem *mUnlockFilesViaSBItem; //"Unlock files via SB"
-    HbDataFormModelItem *mIgnoreProtectionAttributesItem; //"Ign. protection atts"
-    HbDataFormModelItem *mNoROAttributeCopyFromZItem; //"No RO-att copy from Z:"
-
-};
-
-#endif // FBSETTINGSVIEW_H
--- a/filebrowser/ui/inc/filebrowsersettings.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#ifndef FILEBROWSERSETTINGS_H_
-#define FILEBROWSERSETTINGS_H_
-
-#include "engine.h"
-#include "enginewrapper.h"
-
-#include <QString>
-
-/**
-  * Settings class that is used for ui settings handling
-  */
-class FileBrowserSettings
-{
-public:
-    FileBrowserSettings(TFileBrowserSettings *aSettings) : mSettings(aSettings) { }
-    ~FileBrowserSettings() { }
-
-    int displayMode() const { return mSettings->iDisplayMode; }
-    void setDisplayMode(int displayMode) { mSettings->iDisplayMode = displayMode; }
-
-    int fileViewMode() const { return mSettings->iFileViewMode; }
-    void setFileViewMode(int fileViewMode) { mSettings->iFileViewMode = fileViewMode; }
-
-    bool showSubDirectoryInfo() const { return mSettings->iShowSubDirectoryInfo; }
-    void setShowSubDirectoryInfo(bool showSubDirectoryInfo) { mSettings->iShowSubDirectoryInfo = showSubDirectoryInfo; }
-
-    bool showAssociatedIcons() const { return mSettings->iShowAssociatedIcons; }
-    void setShowAssociatedIcons(bool showAssociatedIcons) { mSettings->iShowAssociatedIcons = showAssociatedIcons; }
-
-    bool rememberLastPath() const { return mSettings->iRememberLastPath; }
-    void setRememberLastPath(bool rememberLastPath) { mSettings->iRememberLastPath = rememberLastPath; }
-
-    QString lastPath() const { return QString((QChar*)mSettings->iLastPath.Ptr(),mSettings->iLastPath.Length()); }
-    void lastPath(const QString& lastPath) { mSettings->iLastPath = lastPath.utf16(); }
-
-    bool rememberFolderSelection() const { return mSettings->iRememberFolderSelection; }
-    void setRememberFolderSelection(bool rememberFolderSelection) { mSettings->iRememberFolderSelection = rememberFolderSelection; }
-
-    bool enableToolbar() const { return mSettings->iEnableToolbar; }
-    void setEnableToolbar(bool enableToolbar) { mSettings->iEnableToolbar = enableToolbar; }
-
-    bool supportNetworkDrives() const { return mSettings->iSupportNetworkDrives; }
-    void setSupportNetworkDrives(bool supportNetworkDrives) { mSettings->iSupportNetworkDrives = supportNetworkDrives; }
-
-    bool bypassPlatformSecurity() const { return mSettings->iBypassPlatformSecurity; }
-    void setBypassPlatformSecurity(bool bypassPlatformSecurity) { mSettings->iBypassPlatformSecurity = bypassPlatformSecurity; }
-
-    bool removeFileLocks() const { return mSettings->iRemoveFileLocks; }
-    void setRemoveFileLocks(bool removeFileLocks) { mSettings->iRemoveFileLocks = removeFileLocks; }
-
-    bool ignoreProtectionsAttributes() const { return mSettings->iIgnoreProtectionsAtts; }
-    void setIgnoreProtectionsAttributes(bool ignoreProtectionsAttributes) { mSettings->iIgnoreProtectionsAtts = ignoreProtectionsAttributes; }
-
-    bool removeROMWriteProrection() const { return mSettings->iRemoveROMWriteProrection; }
-    void setRemoveROMWriteProrection(bool removeROMWriteProrection) { mSettings->iRemoveROMWriteProrection = removeROMWriteProrection; }
-
-private:
-    TFileBrowserSettings *mSettings;
-};
-
-#endif /* FILEBROWSERSETTINGS_H_ */
--- a/filebrowser/ui/inc/filebrowsersortfilterproxymodel.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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 FILEBROWSERSORTFILTERPROXYMODEL_H
-#define FILEBROWSERSORTFILTERPROXYMODEL_H
-
-#include <QString>
-#include <QSortFilterProxyModel>
-
-class FileBrowserSortFilterProxyModel : public QSortFilterProxyModel
-{
-    Q_OBJECT
-
-public:
-    FileBrowserSortFilterProxyModel(QObject *parent = 0);
-
-    QString filterCriteria() const { return mFilterCriteria; }
-    void setFilterCriteria(const QString &criteria);
-
-protected:
-    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
-
-private:
-    QString mFilterCriteria;
-};
-
-#endif // FILEBROWSERSORTFILTERPROXYMODEL_H
--- a/filebrowser/ui/inc/menuaction.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,331 +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 MENUACTION_H
-#define MENUACTION_H
-
-class HbMenu;
-class HbAction;
-
-class OptionMenuActions
-{
-public:
-    OptionMenuActions() :
-            mFileMenu(0),
-            mFileBackMoveUp(0),
-            mFileOpenDrive(0),
-            mFileOpenDirectory(0),
-            mFileSearch(0),
-            mFileNewMenu(0),
-            mFileNewFile(0),
-            mFileNewDirectory(0),
-            mFileDelete(0),
-            mFileRename(0),
-            mFileTouch(0),
-            mFileProperties(0),
-            mFileChecksumsMenu(0),
-            mFileChecksumsMD5(0),
-            mFileChecksumsMD2(0),
-            mFileChecksumsSHA1(0),
-            mFileSetAttributes(0),
-            //Edit -
-            mEditMenu(0),
-            mEditSnapShotToE(0),
-            mEditCut(0),
-            mEditCopy(0),
-            mEditPaste(0),
-            mEditCopyToFolder(0),
-            mEditMoveToFolder(0),
-            mEditSelect(0),
-            mEditUnselect(0),
-            mEditSelectAll(0),
-            mEditUnselectAll(0),
-            // View -
-            mViewMenu(0),
-            mViewFilterEntries(0),
-            mViewRefresh(0),
-            // Disk admin -
-            mDiskAdminMenu(0),
-            mDiskAdminSetDrivePassword(0),
-            mDiskAdminUnlockDrive(0),
-            mDiskAdminClearDrivePassword(0),
-            mDiskAdminEraseDrivePassword(0),
-            mDiskAdminFormatDrive(0),
-            mDiskAdminQuickFormatDrive(0),
-            mDiskAdminCheckDisk(0),
-            mDiskAdminScanDrive(0),
-            mDiskAdminSetDriveName(0),
-            mDiskAdminSetDriveVolumeLabel(0),
-            mDiskAdminEjectDrive(0),
-            mDiskAdminDismountDrive(0),
-            mDiskAdminEraseMBR(0),
-            mDiskAdminPartitionDrive(0),
-            // Tools -
-            mToolsMenu(0),
-            mToolsAllAppsToTextFile(0),
-            mToolsAllFilesToTextFile(0),
-            mToolsAvkonIconCacheMenu(0),
-            mToolsAvkonIconCacheEnable(0),
-            mToolsAvkonIconCacheDisable(0),
-            mToolsDisableExtendedErrors(0),
-            mToolsDumpMsgStoreWalk(0),
-            mToolsEditDataTypes(0),
-            mToolsEnableExtendedErrors(0),
-            mToolsErrorSimulateMenu(0),
-            mToolsErrorSimulateLeave(0),
-            mToolsErrorSimulatePanic(0),
-            mToolsErrorSimulateException(0),
-            mToolsMessageAttachmentsMenu(0),
-            mToolsMessageInbox(0),
-            mToolsMessageDrafts(0),
-            mToolsMessageSentItems(0),
-            mToolsMessageOutbox(0),
-            mToolsLocalConnectivityMenu(0),
-            mToolsLocalConnectivityActivateInfrared(0),
-            mToolsLocalConnectivityLaunchBTUI(0),
-            mToolsLocalConnectivityLaunchUSBUI(0),
-            mToolsMemoryInfo(0),
-            mToolsSecureBackupMenu(0),
-            mToolsSecureBackStart(0),
-            mToolsSecureBackRestore(0),
-            mToolsSecureBackStop(0),
-            mToolsSetDebugMask(0),
-            mToolsShowOpenFilesHere(0),
-            mSelection(0),
-            mSetting(0),
-            mAbout(0),
-            mExit(0)
-    {
-
-    }
-
-    ~OptionMenuActions() { }
-public:
-    //File menu operations
-    HbMenu *mFileMenu;
-    HbAction *mFileBackMoveUp;
-    HbAction *mFileOpenDrive;
-    HbAction *mFileOpenDirectory;
-    HbAction *mFileSearch;
-    HbMenu *mFileNewMenu;
-    HbAction *mFileNewFile;
-    HbAction *mFileNewDirectory;
-    HbAction *mFileDelete;
-    HbAction *mFileRename;
-    HbAction *mFileTouch;
-    HbAction *mFileProperties;
-    HbMenu *mFileChecksumsMenu;
-    HbAction *mFileChecksumsMD5;
-    HbAction *mFileChecksumsMD2;
-    HbAction *mFileChecksumsSHA1;
-    HbAction *mFileSetAttributes;
-
-    //Edit -
-    HbMenu *mEditMenu;
-    HbAction *mEditSnapShotToE;
-    HbAction *mEditCut;
-    HbAction *mEditCopy;
-    HbAction *mEditPaste;
-    HbAction *mEditCopyToFolder;
-    HbAction *mEditMoveToFolder;
-    HbAction *mEditSelect;
-    HbAction *mEditUnselect;
-    HbAction *mEditSelectAll;
-    HbAction *mEditUnselectAll;
-
-    // View -
-    HbMenu *mViewMenu;
-    HbAction *mViewFilterEntries;
-    HbAction *mViewRefresh;
-
-    // Disk admin -
-    HbMenu *mDiskAdminMenu;
-    HbAction *mDiskAdminSetDrivePassword;
-    HbAction *mDiskAdminUnlockDrive;
-    HbAction *mDiskAdminClearDrivePassword;
-    HbAction *mDiskAdminEraseDrivePassword;
-    HbAction *mDiskAdminFormatDrive;
-    HbAction *mDiskAdminQuickFormatDrive;
-    HbAction *mDiskAdminCheckDisk;
-    HbAction *mDiskAdminScanDrive;
-    HbAction *mDiskAdminSetDriveName;
-    HbAction *mDiskAdminSetDriveVolumeLabel;
-    HbAction *mDiskAdminEjectDrive;
-    HbAction *mDiskAdminDismountDrive;
-    HbAction *mDiskAdminEraseMBR;
-    HbAction *mDiskAdminPartitionDrive;
-
-    // Tools -
-    HbMenu *mToolsMenu;
-    HbAction *mToolsAllAppsToTextFile;
-    HbAction *mToolsAllFilesToTextFile;
-
-    HbMenu *mToolsAvkonIconCacheMenu;
-    HbAction *mToolsAvkonIconCacheEnable;
-    HbAction *mToolsAvkonIconCacheDisable;
-
-    HbAction *mToolsDisableExtendedErrors;
-    HbAction *mToolsDumpMsgStoreWalk;
-    HbAction *mToolsEditDataTypes;
-
-    HbAction *mToolsEnableExtendedErrors;
-
-    HbMenu *mToolsErrorSimulateMenu;    
-    HbAction *mToolsErrorSimulateLeave;
-    HbAction *mToolsErrorSimulatePanic;
-    HbAction *mToolsErrorSimulateException;
-
-    HbMenu *mToolsMessageAttachmentsMenu;
-    HbAction *mToolsMessageInbox;
-    HbAction *mToolsMessageDrafts;
-    HbAction *mToolsMessageSentItems;
-    HbAction *mToolsMessageOutbox;
-
-    HbMenu *mToolsLocalConnectivityMenu;
-    HbAction *mToolsLocalConnectivityActivateInfrared;
-    HbAction *mToolsLocalConnectivityLaunchBTUI;
-    HbAction *mToolsLocalConnectivityLaunchUSBUI;
-
-    HbAction *mToolsMemoryInfo;
-
-    HbMenu *mToolsSecureBackupMenu;
-    HbAction *mToolsSecureBackStart;
-    HbAction *mToolsSecureBackRestore;
-    HbAction *mToolsSecureBackStop;
-
-    HbAction *mToolsSetDebugMask;
-    HbAction *mToolsShowOpenFilesHere;
-
-    HbAction *mSelection;
-    HbAction *mSetting;
-    HbAction *mAbout;
-    HbAction *mExit;
-};
-
-
-class ContextMenuActions
-{
-public:
-    ContextMenuActions() :
-            mOpenDirectory(0),
-            mSearch(0),
-            //File -
-            mFileMenu(0),
-            mFileBackMoveUp(0),
-            mFileOpenDrive(0),
-            mFileOpenDirectory(0),
-            mFileSearch(0),
-            mFileNewMenu(0),
-            mFileNewFile(0),
-            mFileNewDirectory(0),
-            mFileDelete(0),
-            mFileRename(0),
-            mFileTouch(0),
-            mFileProperties(0),
-            mFileChecksumsMenu(0),
-            mFileChecksumsMD5(0),
-            mFileChecksumsMD2(0),
-            mFileChecksumsSHA1(0),
-            mFileSetAttributes(0),
-            //Edit -
-            mEditMenu(0),
-//            mEditSnapShotToE(0),
-            mEditCut(0),
-            mEditCopy(0),
-            mEditPaste(0),
-            mEditCopyToFolder(0),
-            mEditMoveToFolder(0),
-            // View -
-//            mViewMenu(0),
-//            mViewFilterEntries(0),
-//            mViewRefresh(0),
-            // Disk admin -
-            mDiskAdminMenu(0),
-            mDiskAdminSetDrivePassword(0),
-            mDiskAdminUnlockDrive(0),
-            mDiskAdminClearDrivePassword(0),
-            mDiskAdminEraseDrivePassword(0),
-            mDiskAdminFormatDrive(0),
-            mDiskAdminQuickFormatDrive(0),
-            mDiskAdminCheckDisk(0),
-            mDiskAdminScanDrive(0),
-            mDiskAdminSetDriveName(0),
-            mDiskAdminSetDriveVolumeLabel(0),
-            mDiskAdminEjectDrive(0),
-            mDiskAdminDismountDrive(0),
-            mDiskAdminEraseMBR(0),
-            mDiskAdminPartitionDrive(0)
-    {
-
-    }
-
-    ~ContextMenuActions() { }
-public:
-    HbAction *mOpenDirectory;
-    HbAction *mSearch;
-    //File menu operations
-    HbMenu *mFileMenu;
-    HbAction *mFileBackMoveUp;
-    HbAction *mFileOpenDrive;
-    HbAction *mFileOpenDirectory;
-    HbAction *mFileSearch;
-    HbMenu *mFileNewMenu;
-    HbAction *mFileNewFile;
-    HbAction *mFileNewDirectory;
-    HbAction *mFileDelete;
-    HbAction *mFileRename;
-    HbAction *mFileTouch;
-    HbAction *mFileProperties;
-    HbMenu *mFileChecksumsMenu;
-    HbAction *mFileChecksumsMD5;
-    HbAction *mFileChecksumsMD2;
-    HbAction *mFileChecksumsSHA1;
-    HbAction *mFileSetAttributes;
-
-    //Edit -
-    HbMenu *mEditMenu;
-//    HbAction *mEditSnapShotToE;
-    HbAction *mEditCut;
-    HbAction *mEditCopy;
-    HbAction *mEditPaste;
-    HbAction *mEditCopyToFolder;
-    HbAction *mEditMoveToFolder;
-
-//    // View -
-//    HbMenu *mViewMenu;
-//    HbAction *mViewFilterEntries;
-//    HbAction *mViewRefresh;
-
-    // Disk admin -
-    HbMenu *mDiskAdminMenu;
-    HbAction *mDiskAdminSetDrivePassword;
-    HbAction *mDiskAdminUnlockDrive;
-    HbAction *mDiskAdminClearDrivePassword;
-    HbAction *mDiskAdminEraseDrivePassword;
-    HbAction *mDiskAdminFormatDrive;
-    HbAction *mDiskAdminQuickFormatDrive;
-    HbAction *mDiskAdminCheckDisk;
-    HbAction *mDiskAdminScanDrive;
-    HbAction *mDiskAdminSetDriveName;
-    HbAction *mDiskAdminSetDriveVolumeLabel;
-    HbAction *mDiskAdminEjectDrive;
-    HbAction *mDiskAdminDismountDrive;
-    HbAction *mDiskAdminEraseMBR;
-    HbAction *mDiskAdminPartitionDrive;
-};
-
-#endif // MENUACTION_H
--- a/filebrowser/ui/inc/notifications.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef NOTIFICATIONS_H_
-#define NOTIFICATIONS_H_
-
-#include <hbmessagebox.h>
-
-class HbProgressDialog;
-
-class Notifications
-{
-public:
-    static void showAboutNote();
-    static void showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout = HbPopup::NoTimeout);
-    static void showInformationNote(const QString &text, const QString &title = QString());
-    static void showErrorNote(const QString &text, bool noTimeout = false);
-    static void showConfirmationNote(const QString &text, bool noTimeout = false);
-    static bool showConfirmationQuery(const QString &aText);
-};
-
-#endif // NOTIFICATIONS_H_
--- a/filebrowser/ui/src/enginewrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,828 +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 "enginewrapper.h"
-#include "engine.h"
-#include "FBFileUtils.h"
-#include "notifications.h"
-#include "fbfileview.h"
-#include "fbsearchview.h"
-#include "filebrowsersettings.h"
-//#include "fbsettingsview.h"
-
-#include <HbProgressDialog>
-
-#include <QString>
-#include <QFileInfo>
-#include <QModelIndex>
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::EngineWrapper()
-    : mEngine(0),
-    mFilesFound(),
-    mSettings(0),
-    mProgressDialog(0),
-    mWaitDialog(0)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::~EngineWrapper()
-{
-    if(mEngine != NULL) {
-        TRAP_IGNORE(mEngine->DeActivateEngineL());
-        delete mEngine;
-    } 
-    if (mProgressDialog)
-        delete mProgressDialog;
-
-    if (mWaitDialog)
-        delete mWaitDialog;
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::init()
-{
-    TRAPD(err, mEngine = CEngine::NewL(this));
-    if (err != KErrNone) {
-        return false;
-    } else {
-        TRAP_IGNORE(mEngine->ActivateEngineL());
-        mSettings = FileBrowserSettings(&mEngine->Settings());
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Functions that are called from UI
-// ---------------------------------------------------------------------------
-bool EngineWrapper::searchFiles()
-{
-    TRAPD(err, mEngine->SearchL() );
-    if(err != KErrNone) {
-        return false;
-    }
-    else {
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-SearchAttributes EngineWrapper::getFileSearchAttributes()
-{
-    TSearchAttributes tAttributes = mEngine->GetSearchAttributes();
-    SearchAttributes attributes;
-
-    // Convert TSearchAttributes to SearchAttributes 
-    attributes.mSearchDir  = QString((QChar*)tAttributes.iSearchDir.Ptr(),tAttributes.iSearchDir.Length());
-    attributes.mWildCards  = QString((QChar*)tAttributes.iWildCards.Ptr(),tAttributes.iWildCards.Length()); 
-    attributes.mTextInFile = QString((QChar*)tAttributes.iTextInFile.Ptr(),tAttributes.iTextInFile.Length()); 
-    attributes.mMinSize    = tAttributes.iMinSize;
-    attributes.mMaxSize    = tAttributes.iMaxSize;
-    attributes.mRecurse    = tAttributes.iRecurse;
-    attributes.mDefaultWildCard = tAttributes.iDefaultWildCard;
-    
-    // TTime to QDate
-    TBuf<20> timeString;
-    _LIT(KDateString,"%D%M%Y%/0%1%/1%2%/2%3%/3");
-    TRAP_IGNORE( tAttributes.iMinDate.FormatL(timeString, KDateString) );
-    QString temp = QString::fromUtf16(timeString.Ptr(), timeString.Length());
-    temp.replace(QChar('/'), QChar('-'));
-    attributes.mMinDate = QDate::fromString(temp, "dd-MM-yyyy");
-    
-    
-    TRAP_IGNORE( tAttributes.iMaxDate.FormatL(timeString, KDateString) );
-    temp = QString::fromUtf16(timeString.Ptr(), timeString.Length());
-    temp.replace(QChar('/'), QChar('-'));
-    attributes.mMaxDate = QDate::fromString(temp, "dd-MM-yyyy");
-    
-    return attributes;
-
-}
-
-// ---------------------------------------------------------------------------
-int EngineWrapper::setFileSearchAttributes(SearchAttributes attributes)
-{
-    TSearchAttributes tAttributes;
-    // Convert SearchAttributes to TSearchAttributes 
-    
-    //convert QString to TFilename:
-    tAttributes.iSearchDir = TFileName(attributes.mSearchDir.utf16());
-    tAttributes.iWildCards = TFileName(attributes.mWildCards.utf16());
-    tAttributes.iTextInFile = TFileName(attributes.mTextInFile.utf16());
-    
-    tAttributes.iMinSize    = attributes.mMinSize;
-    tAttributes.iMaxSize    = attributes.mMaxSize;    
-    tAttributes.iRecurse    = attributes.mRecurse;
-    tAttributes.iDefaultWildCard = attributes.mDefaultWildCard;
-    
-    // QDate to TTime for both min- and max Date
-    QString temp = attributes.mMinDate.toString("yyyy-MM-dd");
-    QStringList dateList = temp.split("-");
-    int month = dateList[1].toInt() - 1;
-    int day = dateList[2].toInt() - 1;
-    temp = dateList[0];
-    if (month == 0) {
-        temp.append("00");
-    }
-    else {
-        temp.append(QString::number(month));
-    }
-    if (day == 0) {
-        temp.append("00");
-    }
-    else { 
-        temp.append(QString::number(day));
-    }
-    temp.append(":");
-        
-    TBuf<24> dateString(temp.utf16());
-    tAttributes.iMinDate.Set(dateString);
-    
-    temp = attributes.mMaxDate.toString("yyyy-MM-dd");
-    dateList = temp.split("-");
-    month = dateList[1].toInt() - 1;
-    day = dateList[2].toInt() - 1;
-    temp = dateList[0];
-    if (month == 0) {
-        temp.append("00");
-    }
-    else {
-        temp.append(QString::number(month));
-    }
-    if (day == 0) {
-        temp.append("00");
-    }
-    else { 
-        temp.append(QString::number(day));
-    }
-    temp.append(":");
-    dateString.Copy(temp.utf16());
-    tAttributes.iMaxDate.Set(dateString);
-    
-    mEngine->ChangeAttributes(tAttributes);
-    return KErrNone;
-}
-
-
-// ---------------------------------------------------------------------------
-SearchResults EngineWrapper::getSearchResults()
-{
-    TSearchResults tResults = mEngine->SearchResults();
-    SearchResults results;
-    results.mNumberOfFoundFiles = tResults.iNumberOfFoundFiles;
-    CFileEntryList* foundFilesResult = mEngine->FoundFiles();
-    if (!mFilesFound.isEmpty()) {
-        mFilesFound.clear();
-        }
-    // copy file names and convert them from TFileName format to QStringList items type
-    for (int i = 0; i < foundFilesResult->Count(); i++) {
-            mFilesFound.append(
-                    QString((QChar*)foundFilesResult->At(i).iFullName.Ptr(), 
-                    foundFilesResult->At(i).iFullName.Length()) 
-                    );
-        }
-    results.mFoundFilesList = &mFilesFound;
-    return results;
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::saveSettings(bool aNotifyModules)
-{
-    return mEngine->SaveSettingsL(aNotifyModules);;
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::isDriveListViewActive()
-{
-    // TODO check return value
-    if (mEngine->FileUtils() && mEngine->FileUtils()->IsDriveListViewActive()) {
-        return true;
-    } else {
-        return false;
-    }
-}
-
-bool EngineWrapper::isCurrentDriveReadOnly()
-{
-    // TODO check return value
-    if (mEngine->FileUtils() && mEngine->FileUtils()->IsCurrentDriveReadOnly()) {
-        return true;
-    } else {
-        return false;
-    }
-}
-
-bool EngineWrapper::isClipBoardListInUse()
-{
-    if (mEngine->FileUtils() && mEngine->FileUtils()->ClipBoardList() && mEngine->FileUtils()->ClipBoardList()->Count() != 0)
-        return true;
-    else
-        return false;
-}
-
-// ---------------------------------------------------------------------------
-void EngineWrapper::startExecutingCommands(const QString &aCommandsExecutionMessage)
-{
-    TPtrC commandsExecutionMessage(reinterpret_cast<const TText*>(aCommandsExecutionMessage.constData()));
-    TRAPD(err, mEngine->FileUtils()->StartExecutingCommandsL(commandsExecutionMessage) );
-    Q_UNUSED(err); //TODO
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::refreshView()
-{
-    if (mEngine->FileUtils()) {
-        TRAPD(err, mEngine->FileUtils()->RefreshViewL() );
-        Q_UNUSED(err); //TODO
-    }
-}
-
-void EngineWrapper::moveUpOneLevel()
-{
-    if (mEngine->FileUtils()) {
-        TRAPD(err, mEngine->FileUtils()->MoveUpOneLevelL() );
-        Q_UNUSED(err); //TODO
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::moveDownToDirectory(const QModelIndex& aIndex)
-{
-    if (mEngine->FileUtils()) {
-        TRAPD(err, mEngine->FileUtils()->MoveDownToDirectoryL(aIndex.row()) );
-        Q_UNUSED(err); //TODO
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-int EngineWrapper::clipboardCut(const QModelIndexList& aSelectionIndices)
-{
-    TInt operations = 0;
-    const CArrayFix<TInt> *selectionIndexes = convertSelectionList(aSelectionIndices);
-    if (mEngine->FileUtils()) {
-        TRAPD(err, operations = mEngine->FileUtils()->ClipboardCutL(selectionIndexes) );
-        Q_UNUSED(err); //TODO
-    }
-    delete selectionIndexes;
-    return operations;
-}
-
-// ---------------------------------------------------------------------------
-int EngineWrapper::clipboardCopy(const QModelIndexList& aSelectionIndices)
-{
-    TInt operations = 0;
-    const CArrayFix<TInt> *selectionIndexes = convertSelectionList(aSelectionIndices);
-
-    if (mEngine->FileUtils()) {
-        TRAPD(err, operations = mEngine->FileUtils()->ClipboardCopyL(selectionIndexes));
-        Q_UNUSED(err); //TODO
-    }
-    delete selectionIndexes;
-    return operations;
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::clipboardPaste(const OverwriteOptions &aOverwriteOptions)
-{
-    TOverwriteOptions tOverwriteOptions = convertOverwriteOptions(aOverwriteOptions);
-    if (mEngine->FileUtils()) {
-        TRAPD(err, mEngine->FileUtils()->ClipboardPasteL(tOverwriteOptions));
-        Q_UNUSED(err); //TODO
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::copyToFolder(const QString &aTargetDir, const OverwriteOptions &aOverwriteOptions, bool aMove)
-{
-    TFileName targetDir = TFileName(aTargetDir.utf16());
-    TOverwriteOptions tOverwriteOptions = convertOverwriteOptions(aOverwriteOptions);
-
-
-    TRAPD(err, mEngine->FileUtils()->CopyToFolderL(targetDir, tOverwriteOptions, aMove ? ETrue : EFalse) );
-    Q_UNUSED(err); //TODO
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::createNewFile(const QString &aNewFileName)
-{
-    TFileName fileName = TFileName(aNewFileName.utf16());
-    TRAPD(err, mEngine->FileUtils()->NewFileL(fileName) );
-    Q_UNUSED(err); //TODO
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::createNewDirectory(const QString &aNewDirectoryName)
-{
-    TFileName newDirectoryName = TFileName(aNewDirectoryName.utf16());
-    TRAPD(err, mEngine->FileUtils()->NewDirectoryL(newDirectoryName) );
-    Q_UNUSED(err); //TODO
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::deleteItems(const QModelIndexList& aSelectionIndices)
-{
-    setCurrentSelection(aSelectionIndices);
-    TRAPD(err, mEngine->FileUtils()->DeleteL() );
-    Q_UNUSED(err); //TODO
-}
-
-// ---------------------------------------------------------------------------
-bool EngineWrapper::selectionHasDirs()
-{
-    return mEngine->FileUtils()->SelectionHasDirs();
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::rename(const QModelIndex& aIndex, const QString aNewName)
-{
-    if (mEngine->FileUtils()) {
-        const TFileName newName = TFileName(aNewName.utf16());
-        TRAPD(err, mEngine->FileUtils()->RenameL(aIndex.row(), newName) );
-        Q_UNUSED(err); //TODO
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::touch(bool aRecurse)
-{
-    if (mEngine->FileUtils()) {
-        TRAPD(err, mEngine->FileUtils()->TouchL(aRecurse) );
-        Q_UNUSED(err); //TODO
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::properties(const QModelIndex &aCurrentItemIndex, QStringList &aPropertyList, QString &aTitleText)
-{
-    if (mEngine->FileUtils()) {
-
-        // create an array for the items
-        CDesCArray* entryLines = new(ELeave) CDesCArrayFlat(16);
-//        CleanupStack::PushL(entryLines);
-        TFileName titleText;
-
-        TRAPD(err, mEngine->FileUtils()->PropertiesL(aCurrentItemIndex.row(), entryLines, titleText));
-        Q_UNUSED(err); //TODO
-
-        aTitleText = QString::fromUtf16(titleText.Ptr(), titleText.Length());
-        QString textItem;
-        for (TInt i = 0; i < entryLines->Count(); ++i) {
-            textItem = QString::fromUtf16((*entryLines)[i].Ptr(), (*entryLines)[i].Length());
-            aPropertyList.append(textItem);
-        }
-//        CleanupStack::PopAndDestroy(); //entryLines
-        delete entryLines;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::setAttributes(quint32 &setAttributesMask, quint32 &clearAttributesMask, bool &recurse)
-{
-    if (mEngine->FileUtils()) {
-        TBool tRecurse = recurse ? ETrue : EFalse;
-        TRAPD(err, mEngine->FileUtils()->SetAttributesL(setAttributesMask, clearAttributesMask, tRecurse));
-        Q_UNUSED(err); //TODO
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::openAppArc(QString fileName)
-{
-
-    //convert QString to TFilename:
-    fileName.replace("/", "\\");
-    TFileName fileToOpen = TFileName(fileName.utf16());
-
-    TRAPD(err, mEngine->OpenWithApparcL(fileToOpen) );
-    if(err != KErrNone) {
-        return false;
-    } else {
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::openDocHandler(QString fileName, bool embeddedVal)
-{
-    //convert QString to TFilename:
-    fileName.replace("/", "\\");
-    TFileName fileToOpen = TFileName(fileName.utf16());
-
-    TRAPD(err, mEngine->OpenWithDocHandlerL(fileToOpen, embeddedVal) );
-    if(err != KErrNone) {
-        return false;
-    } else {
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-int EngineWrapper::itemCount() const
-{
-    if (mEngine->FileUtils()->IsDriveListViewActive()) {
-        return mEngine->FileUtils()->DriveEntries()->Count();
-    } else {
-        return mEngine->FileUtils()->FileEntries()->Count();
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-FbDriveEntry EngineWrapper::getDriveEntry(const QModelIndex& aIndex) const
-{
-    TDriveEntry driveEntry;
-    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0) {
-        driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
-    }
-    return FbDriveEntry(driveEntry);
-}
-
-// ---------------------------------------------------------------------------
-
-FbFileEntry EngineWrapper::getFileEntry(const QModelIndex& aIndex) const
-{
-    TFileEntry fileEntry;
-    if (mEngine->FileUtils()->FileEntries()->Count() > aIndex.row() && aIndex.row() >= 0) {
-        fileEntry = mEngine->FileUtils()->FileEntries()->At(aIndex.row());
-    }
-    return FbFileEntry(fileEntry);
-}
-
-// ---------------------------------------------------------------------------
-
-const CArrayFix<TInt> *EngineWrapper::convertSelectionList(const QModelIndexList &aSelectionIndices)
-{
-    CArrayFixFlat<TInt>* selectionIndexes = 0;
-    TRAPD(err, selectionIndexes = new(ELeave)CArrayFixFlat<TInt>(4));
-    if (err != KErrNone) {
-        return 0;
-    }
-
-    for (int i=0; i< aSelectionIndices.count(); ++i) {
-        TRAPD(err, selectionIndexes->AppendL(aSelectionIndices.at(i).row()) );
-        Q_UNUSED(err); //TODO
-    }
-    return selectionIndexes;
-}
-
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::setCurrentSelection(const QModelIndexList &aSelectionIndices)
-{
-    const CArrayFix<TInt> *selectionIndexes = convertSelectionList(aSelectionIndices);
-    mEngine->FileUtils()->SetCurrentSelection(selectionIndexes);
-    delete selectionIndexes;
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::isDestinationEntriesExists(const QModelIndexList &aSelectionIndices, QString aTargetDir)
-{
-    TFileName targetDir = TFileName(aTargetDir.utf16());
-    //setCurrentSelection(aSelectionIndices);
-    Q_UNUSED(aSelectionIndices);
-
-    TBool someEntryExists = mEngine->FileUtils()->IsDestinationEntriesExists(targetDir);
-    return someEntryExists;
-}
-
-// ---------------------------------------------------------------------------
-bool EngineWrapper::targetExists(const QModelIndex& aIndex, const QString aNewName)
-{
-    const TFileName newName = TFileName(aNewName.utf16());
-    return mEngine->FileUtils()->TargetExists(aIndex.row(), newName);
-}
-
-// ---------------------------------------------------------------------------
-
-QString EngineWrapper::currentPath() const
-{
-    return QString::fromUtf16(mEngine->FileUtils()->CurrentPath().Ptr(),
-                              mEngine->FileUtils()->CurrentPath().Length());
-}
-
-TOverwriteOptions EngineWrapper::convertOverwriteOptions(const OverwriteOptions &aOverwriteOptions)
-{
-    TOverwriteOptions tOverwriteOptions;
-    tOverwriteOptions.iDoFileOperations = aOverwriteOptions.doFileOperations;
-    tOverwriteOptions.iQueryIndex = aOverwriteOptions.queryIndex;
-    tOverwriteOptions.iPostFix = TFileName(aOverwriteOptions.postFix.utf16());
-    tOverwriteOptions.iOverWriteFlags = aOverwriteOptions.overWriteFlags;
-    return tOverwriteOptions;
-}
-
-bool EngineWrapper::hasDrivePassword(const QModelIndex &aIndex)
-{
-    bool hasPassword = false;
-    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0)
-    {
-        TDriveEntry driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
-        hasPassword = driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttHasPassword;
-    }
-    return hasPassword;
-}
-
-bool EngineWrapper::isDriveRemovable(const QModelIndex &aIndex)
-{
-    bool isRemovable = false;
-    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0)
-    {
-        TDriveEntry driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
-        isRemovable = driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable;
-    }
-    return isRemovable;
-}
-
-bool EngineWrapper::isDriveLocked(const QModelIndex &aIndex)
-{
-    bool isRemovable = false;
-    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0)
-    {
-        TDriveEntry driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
-        isRemovable = driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked;
-    }
-    return isRemovable;
-}
-
-void EngineWrapper::GetDriveName(const QModelIndex &aIndex, QString &aDriveName)
-{
-    TFileName driveName;
-    mEngine->FileUtils()->GetDriveName(aIndex.row(), driveName);
-    aDriveName = QString::fromUtf16(driveName.Ptr(), driveName.Length());
-}
-
-
-void EngineWrapper::GetDriveVolumeLabel(const QModelIndex &aIndex, QString &aVolumeLabel)
-{
-    TFileName volumeLabel;
-    mEngine->FileUtils()->GetDriveName(aIndex.row(), volumeLabel);
-    aVolumeLabel = QString::fromUtf16(volumeLabel.Ptr(), volumeLabel.Length());
-}
-
-void EngineWrapper::DiskAdminSetDrivePassword(const QModelIndex &aIndex,
-                                              const QString &aOldPassword,
-                                              const QString &aNewPassword)
-{
-    TFileName oldPassword = TFileName(aOldPassword.utf16());
-    TFileName newPassword = TFileName(aNewPassword.utf16());
-    TRAP_IGNORE(mEngine->FileUtils()->SetDrivePasswordL(aIndex.row(), oldPassword, newPassword));
-}
-
-void EngineWrapper::DiskAdminUnlockDrive(const QModelIndex &aIndex, const QString &aOldPassword)
-{
-    TFileName oldPassword = TFileName(aOldPassword.utf16());
-    TRAP_IGNORE(mEngine->FileUtils()->UnlockDriveL(aIndex.row(), oldPassword));
-}
-
-void EngineWrapper::DiskAdminClearDrivePassword(const QModelIndex &aIndex, const QString &aOldPassword)
-{
-    TFileName oldPassword = TFileName(aOldPassword.utf16());
-    TRAP_IGNORE(mEngine->FileUtils()->ClearDrivePasswordL(aIndex.row(), oldPassword));
-}
-
-void EngineWrapper::DiskAdminEraseDrivePassword(const QModelIndex &aIndex)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->EraseDrivePasswordL(aIndex.row()));
-}
-
-void EngineWrapper::DiskAdminFormatDrive(const QModelIndex &aIndex, bool aQuickFormat)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->FormatDriveL(aIndex.row(), aQuickFormat));
-}
-
-void EngineWrapper::DiskAdminQuickFormatDrive(const QModelIndex &aIndex, bool aQuickFormat)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->FormatDriveL(aIndex.row(), aQuickFormat));
-}
-
-void EngineWrapper::DiskAdminCheckDisk(const QModelIndex &aIndex)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->CheckDiskL(aIndex.row()));
-}
-
-void EngineWrapper::DiskAdminScanDrive(const QModelIndex &aIndex)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->ScanDriveL(aIndex.row()));
-}
-
-void EngineWrapper::DiskAdminSetDriveName(const QModelIndex &aIndex, const QString &aDriveName)
-{
-    TFileName driveName = TFileName(aDriveName.utf16());
-    TRAP_IGNORE(mEngine->FileUtils()->SetDriveNameL(aIndex.row(), driveName));
-}
-
-void EngineWrapper::DiskAdminSetDriveVolumeLabel(const QModelIndex &aIndex, const QString &aVolumeLabel)
-{
-    TFileName volumeLabel = TFileName(aVolumeLabel.utf16());
-    TRAP_IGNORE(mEngine->FileUtils()->SetDriveNameL(aIndex.row(), volumeLabel));
-}
-
-void EngineWrapper::DiskAdminEjectDrive(const QModelIndex &aIndex)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->EjectDriveL(aIndex.row()));
-}
-
-void EngineWrapper::DiskAdminDismountDrive(const QModelIndex &aIndex)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->DismountFileSystemL(aIndex.row()));
-}
-
-void EngineWrapper::DiskAdminEraseMBR(const QModelIndex &aIndex)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->EraseMBRL(aIndex.row()));
-}
-
-void EngineWrapper::DiskAdminPartitionDrive(const QModelIndex &aIndex, bool aEraseMBR, int aAmountOfPartitions)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->PartitionDriveL(aIndex.row(), aEraseMBR, aAmountOfPartitions));
-}
-
-void EngineWrapper::ToolsSetErrRd(bool aEnable)
-{
-    TRAP_IGNORE(mEngine->FileUtils()->SetErrRdL(aEnable));
-}
-
-bool EngineWrapper::ErrRdFileExists()
-{
-    return mEngine->FileUtils()->FileExists(KErrRdPath);
-}
-
-void EngineWrapper::ToolsErrorSimulateLeave(int aLeaveCode)
-{
-    mEngine->FileUtils()->SimulateLeaveL(aLeaveCode);
-}
-
-void EngineWrapper::ToolsErrorSimulatePanic(QString aPanicCategory, int aPanicCode)
-{
-    TBuf<128> panicCategory;
-    panicCategory.Copy(aPanicCategory.utf16());
-    mEngine->FileUtils()->SimulatePanicL(panicCategory, aPanicCode);
-}
-
-void EngineWrapper::ToolsErrorSimulateException(int aExceptionCode)
-{
-    mEngine->FileUtils()->SimulateExceptionL(aExceptionCode);
-}
-
-quint32 EngineWrapper::getDebugMask()
-{
-    return mEngine->FileUtils()->GetDebugMask();
-}
-
-void EngineWrapper::toolsSetDebugMask(quint32 aDbgMask)
-{
-    mEngine->FileUtils()->SetDebugMaskL(aDbgMask);
-}
-
-void EngineWrapper::toolsWriteAllFiles()
-{
-    mEngine->FileUtils()->WriteAllFilesL();
-}
-
-void EngineWrapper::showFileCheckSums(const QModelIndex &aIndex, TFileBrowserCmdFileChecksums checksumType)
-{
-    mEngine->FileUtils()->ShowFileCheckSumsL(aIndex.row(), checksumType);
-}
-
-// ---------------------------------------------------------------------------
-// Functions that are called from engine
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowErrorNote(const TDesC& aDescText, TBool aNoTimeout /*= EFalse*/)
-{
-    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
-    Notifications::showErrorNote(qText, aNoTimeout);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowInformationNote(const TDesC &aDescText, const TDesC &aDescTitle)
-{
-    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
-    QString qTitle = QString::fromUtf16(aDescTitle.Ptr(), aDescTitle.Length());
-    Notifications::showInformationNote(qText, qTitle);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowConfirmationNote(const TDesC& aDescText, TBool aNoTimeout /*= EFalse*/)
-{
-    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
-    Notifications::showConfirmationNote(qText, aNoTimeout);
-}
-
-void EngineWrapper::ShowProgressDialog(const TDesC& aDescText, TInt aMinimum, TInt aMaximum )
-{
-    const QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
-    if (!mProgressDialog) {
-        mProgressDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
-        QObject::connect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(progressDialogCancelled()));
-    }
-
-    mProgressDialog->setText(qText);
-    mProgressDialog->setMinimum(aMinimum);
-    mProgressDialog->setMaximum(aMaximum);
-    mEngine->FileUtils()->SetAllowProcessing(true);
-    mProgressDialog->show();
-}
-
-void EngineWrapper::CancelProgressDialog()
-{
-    if (mProgressDialog) {
-        QObject::disconnect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(progressDialogCancelled()));
-        mProgressDialog->cancel();
-        QObject::connect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(progressDialogCancelled()));
-    }
-}
-
-void EngineWrapper::SetProgressValue(TInt aValue)
-{
-    if (mProgressDialog)
-        mProgressDialog->setProgressValue(aValue);
-}
-
-void EngineWrapper::progressDialogCancelled()
-{
-    mEngine->FileUtils()->DialogDismissedL();
-}
-
-void EngineWrapper::ShowWaitDialog(const TDesC& aDescText)
-{
-    const QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
-    if (!mWaitDialog) {
-        mWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
-        QObject::connect(mWaitDialog, SIGNAL(cancelled()), this, SLOT(waitDialogCancelled()));
-    }
-
-    mWaitDialog->setText(qText);
-    mEngine->FileUtils()->SetAllowProcessing(true);
-    //mWaitDialog->setAttribute(Qt::WA_DeleteOnClose);
-    mWaitDialog->show();
-}
-
-void EngineWrapper::CancelWaitDialog()
-{
-    if (mWaitDialog)
-        mWaitDialog->cancel();
-}
-
-void EngineWrapper::waitDialogCancelled()
-{
-    mEngine->FileUtils()->SetAllowProcessing(false);
-}
-
-void EngineWrapper::ProcessEvents()
-{
-    qApp->processEvents();
-}
-
-TBool EngineWrapper::ShowConfirmationQuery(const TDesC& aDescText)
-{
-    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
-    return Notifications::showConfirmationQuery(qText);
-}
-
-void EngineWrapper::NotifyModelHasChanged()
-{
-    emit fileSystemDataChanged();
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbattributesview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +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 "fbattributesview.h"
-
-#include <HbView>
-#include <HbDataForm>
-#include <HbDataFormModel>
-#include <HbDataFormModelItem>
-#include <HbAction>
-#include <HbToolBar>
-
-#include <QGraphicsLinearLayout>
-
-#include <f32file.h>
-
-const QStringList AttributesChoices = QStringList() << "Skip" << "On" << "Off";
-const QStringList RecurseChoices = QStringList() << "Recursive" << "Non-recursive";
-const QString acceptActionText = "OK";
-const QString rejectActionText = "Cancel";
-const int AttributeOn = 1;
-const int AttributeOff = 2;
-const int AttributeEnableRecursion = 0;
-const int AttributeDisableRecursion = 1;
-
-FbAttributesView::FbAttributesView(quint32 &aSetAttMask, quint32 &aClearAttMask, bool &aRecurse) :
-    mSetAttributesMask(aSetAttMask),
-    mClearAttributesMask(aClearAttMask),
-    mRecurse(aRecurse),
-    mForm(0),
-    mArchiveItem(0),
-    mHiddenItem(0),
-    mReadOnlyItem(0),
-    mSystemItem(0),
-    mRecurseItem(0)
-{
-    setTitle("Set attributes");
-
-    // Override back navigation action
-    HbAction *leaveViewAction = new HbAction(Hb::BackNaviAction, this);
-    connect(leaveViewAction, SIGNAL(triggered()), this, SLOT(reject()));
-    setNavigationAction(leaveViewAction);
-
-    initDataForm();
-    createToolbar();
-}
-
-FbAttributesView::~FbAttributesView()
-{
-}
-
-void FbAttributesView::initDataForm()
-{
-    mForm = new HbDataForm(this);
-    HbDataFormModel *model = new HbDataFormModel();
-
-    // Create Group for sequential image components
-    //mGroupSeguantialCapture = model->appendDataFormGroup(QString("Archive"), parent);
-
-    mArchiveItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
-    mArchiveItem->setLabel("Archive");
-    mArchiveItem->setContentWidgetData(QString("items"), AttributesChoices);
-    mArchiveItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
-
-    mHiddenItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
-    mHiddenItem->setLabel("Hidden");
-    mHiddenItem->setContentWidgetData(QString("items"), AttributesChoices);
-    mHiddenItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
-
-    mReadOnlyItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
-    mReadOnlyItem->setLabel("Read only");
-    mReadOnlyItem->setContentWidgetData(QString("items"), AttributesChoices);
-    mReadOnlyItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
-
-    mSystemItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
-    mSystemItem->setLabel("System");
-    mSystemItem->setContentWidgetData(QString("items"), AttributesChoices);
-    mSystemItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
-
-    mRecurseItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
-    mRecurseItem->setLabel("Recurse");
-    mRecurseItem->setContentWidgetData(QString("items"), RecurseChoices);
-    mRecurseItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
-
-    // load file search attribute values from FB engine:
-    loadSettings();
-
-    model->appendDataFormItem(mArchiveItem);
-    model->appendDataFormItem(mHiddenItem);
-    model->appendDataFormItem(mReadOnlyItem);
-    model->appendDataFormItem(mSystemItem);
-    model->appendDataFormItem(mRecurseItem);
-
-    mForm->setModel(model);
-
-    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
-    layout->addItem(mForm);
-    setLayout(layout);
-}
-
-void FbAttributesView::createToolbar()
-{
-    HbToolBar *toolBar = new HbToolBar(this);
-    HbAction *acceptAction = new HbAction(acceptActionText);
-    connect(acceptAction, SIGNAL(triggered()), this, SLOT(accept()));
-    toolBar->addAction(acceptAction);
-
-    HbAction *rejectAction = new HbAction(rejectActionText);
-    connect(rejectAction, SIGNAL(triggered()), this, SLOT(reject()));
-    toolBar->addAction(rejectAction);
-
-    setToolBar(toolBar);
-}
-
-/**
-  Set form item values from settings \a settings.
- */
-void FbAttributesView::loadSettings()
-{
-    if (mSetAttributesMask & KEntryAttArchive)
-        mArchiveItem->setContentWidgetData(QString("selected"), AttributeOn);
-    else if (mClearAttributesMask & KEntryAttArchive)
-        mArchiveItem->setContentWidgetData(QString("selected"), AttributeOff);
-
-    if (mSetAttributesMask & KEntryAttHidden)
-        mHiddenItem->setContentWidgetData(QString("selected"), AttributeOn);
-    else if (mClearAttributesMask & KEntryAttHidden)
-        mHiddenItem->setContentWidgetData(QString("selected"), AttributeOff);
-
-    if (mSetAttributesMask & KEntryAttReadOnly)
-        mReadOnlyItem->setContentWidgetData(QString("selected"), AttributeOn);
-    else if (mClearAttributesMask & KEntryAttReadOnly)
-        mReadOnlyItem->setContentWidgetData(QString("selected"), AttributeOff);
-
-    if (mSetAttributesMask & KEntryAttSystem)
-        mSystemItem->setContentWidgetData(QString("selected"), AttributeOn);
-    else if (mClearAttributesMask & KEntryAttSystem)
-        mSystemItem->setContentWidgetData(QString("selected"), AttributeOff);
-
-    if (mRecurse)
-        mRecurseItem->setContentWidgetData(QString("selected"), AttributeEnableRecursion);
-    else
-        mRecurseItem->setContentWidgetData(QString("selected"), AttributeDisableRecursion);
-}
-
-/**
-  Store form item data into \a settings
- */
-void FbAttributesView::saveSettings()
-{
-    mSetAttributesMask = 0;
-    mClearAttributesMask = 0;
-
-    int archive = mArchiveItem->contentWidgetData(QString("selected")).toInt();
-    if (archive == AttributeOn)
-        mSetAttributesMask |= KEntryAttArchive;
-    else if (archive == AttributeOff)
-        mClearAttributesMask |= KEntryAttArchive;
-
-    int hidden = mHiddenItem->contentWidgetData(QString("selected")).toInt();
-    if (hidden == AttributeOn)
-        mSetAttributesMask |= KEntryAttHidden;
-    else if (hidden == AttributeOff)
-        mClearAttributesMask |= KEntryAttHidden;
-
-    int readOnly = mReadOnlyItem->contentWidgetData(QString("selected")).toInt();
-    if (readOnly == AttributeOn)
-        mSetAttributesMask |= KEntryAttReadOnly;
-    else if (readOnly == AttributeOff)
-        mClearAttributesMask |= KEntryAttReadOnly;
-
-    int system = mSystemItem->contentWidgetData(QString("selected")).toInt();
-    if (system == AttributeOn)
-        mSetAttributesMask |= KEntryAttSystem;
-    else if (system == AttributeOff)
-        mClearAttributesMask |= KEntryAttSystem;
-
-    int recurse = mRecurseItem->contentWidgetData(QString("selected")).toInt();
-    if (recurse == AttributeEnableRecursion)
-        mRecurse = ETrue;
-    else if (recurse == AttributeDisableRecursion)
-        mRecurse = EFalse;
-}
-
-void FbAttributesView::accept()
-{
-    saveSettings();
-    emit finished(true);
-}
-
-void FbAttributesView::reject()
-{
-    emit finished(false);
-}
-
-// End of file
--- a/filebrowser/ui/src/fbdriveentry.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +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 "fbdriveentry.h"
-
-// ---------------------------------------------------------------------------
-
-FbDriveEntry::FbDriveEntry(TDriveEntry aDriveEntry)
-: mDriveEntry(aDriveEntry)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-FbDriveEntry::~FbDriveEntry()
-{
-}
-
-// ---------------------------------------------------------------------------
-
-QChar FbDriveEntry::driveLetter()
-{
-    return QChar(TUint(mDriveEntry.iLetter));
-}
-
-// ---------------------------------------------------------------------------
-
-int FbDriveEntry::number()
-{
-    return mDriveEntry.iNumber;
-}
-
-// ---------------------------------------------------------------------------
-
-QString FbDriveEntry::mediaTypeString()
-{
-    return QString::fromUtf16(mDriveEntry.iMediaTypeDesc.Ptr(), mDriveEntry.iMediaTypeDesc.Length());
-}
-
-// ---------------------------------------------------------------------------
-
-QString FbDriveEntry::attributesString()
-{
-    return QString::fromUtf16(mDriveEntry.iAttributesDesc.Ptr(), mDriveEntry.iAttributesDesc.Length());
-}
-
-// ---------------------------------------------------------------------------
-
-int FbDriveEntry::iconId()
-{
-    return mDriveEntry.iIconId;
-}
-
-// ---------------------------------------------------------------------------
-
-qint64 FbDriveEntry::volumeInfoFree()
-{
-    return mDriveEntry.iVolumeInfo.iFree;
-}
-
-// ---------------------------------------------------------------------------
-
-qint64 FbDriveEntry::volumeInfoSize()
-{
-    return mDriveEntry.iVolumeInfo.iSize;
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbdrivelistviewitem.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +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 "fbdrivelistviewitem.h"
-#include "fbdriveentry.h"
-#include "fbdrivemodel.h"
-
-#include <hblabel.h>
-#include <hbcheckbox.h>
-#include <hbabstractitemview.h>
-
-#include <QString>
-#include <QStringList>
-#include <QFileIconProvider>
-#include <QGraphicsLinearLayout>
-#include <QRectF>
-#include <QPainter>
-
-FbDriveListViewItem::FbDriveListViewItem(QGraphicsItem *parent) :
-    HbListViewItem(parent),
-    hLayout(0),
-    mDiskNameLabel(0),
-    mSizeLabel(0),
-    mFreeLabel(0),
-    mIconLabel(0)
-{
-}
-
-FbDriveListViewItem::~FbDriveListViewItem()
-{
-}
-
-void FbDriveListViewItem::polish(HbStyleParameters& params)
-{
-    Q_UNUSED(params);
-}
-
-bool FbDriveListViewItem::canSetModelIndex(const QModelIndex &index) const
-{
-    Q_UNUSED(index);
-    return true;
-}
-
-
-HbAbstractViewItem *FbDriveListViewItem::createItem()
-{
-    return new FbDriveListViewItem(*this);
-}
-
-void FbDriveListViewItem::updateChildItems()
-{
-    if(!hLayout) {
-        init();
-    }
-
-    // Qt::DisplayRole
-//    QVariant displayRole = modelIndex().data(Qt::DisplayRole);
-//    QString diskName("default");
-    QStringList stringList;
-//    if (displayRole.isValid()) {
-//        if (displayRole.canConvert<QString>()) {                // EFileViewModeSimple
-//            stringList.append(displayRole.toString());
-//        } else if (displayRole.canConvert<QStringList>()) {     // EFileViewModeExtended
-//            stringList = displayRole.toStringList();
-//        }
-//        if (stringList.count() > 0)
-//            diskName = stringList[0]; //modelIndex().data( Qt::UserRole ).toString();
-//
-//        mDiskNameLabel->setPlainText(diskName/*displayString*/);
-//    }
-//    if (stringList.count() > 1)
-//        mSizeLabel->setPlainText( stringList[1] );
-
-
-    // Get the Drive Entry
-    const FbDriveModel* driveModel= qobject_cast<const FbDriveModel *>(modelIndex().model());
-    FbDriveEntry driveEntry = driveModel->driveEntry(modelIndex());
-
-    const QString SimpleDriveEntry("%1: <%2>");
-
-    QString diskName = SimpleDriveEntry.arg(driveEntry.driveLetter()).arg(driveEntry.mediaTypeString());
-    mDiskNameLabel->setPlainText(diskName);
-
-    const QString ExtendedDriveEntry("%1/%2 kB");
-    QString diskSize = ExtendedDriveEntry.arg(QString::number(driveEntry.volumeInfoFree()/1024))
-                                         .arg(QString::number(driveEntry.volumeInfoSize()/1024));
-    mSizeLabel->setPlainText( diskSize );
-
-    //mFreeLabel->setPlainText( stringList[2] );
-
-    //    mCheckBox->setCheckState( checkState() );
-
-    // Qt::DecorationRole
-    // QTBUG-11033 No Icon provided for QFileIconProvider::Desktop, Network, Drive on Symbian
-    QVariant decorationRole = modelIndex().data(Qt::DecorationRole);
-    if (decorationRole.isValid()) {
-        QIcon icon = qvariant_cast<QIcon>(decorationRole);
-    if( icon.isNull() ) {
-        QFileIconProvider fileIconProvider;
-        icon = fileIconProvider.icon(QFileIconProvider::File);
-    }
-    mIconLabel->setIcon(HbIcon(icon));
-    }
-}
-
-void FbDriveListViewItem::setCheckedState(int state)
-{
-    HbAbstractViewItem::setCheckState(static_cast<Qt::CheckState>(state));
-}
-
-void FbDriveListViewItem::init()
-{
-    hLayout = new QGraphicsLinearLayout();
-    hLayout->setContentsMargins(0, 0, 0, 0);
-
-    hLayout->setOrientation( Qt::Horizontal );
-    hLayout->addItem(layout());
-
-    mIconLabel = new HbLabel();
-    hLayout->addItem( mIconLabel );
-    hLayout->setAlignment( mIconLabel, Qt::AlignTop );
-    hLayout->setStretchFactor( mIconLabel, 0 );
-
-    QGraphicsLinearLayout *vLayout = new QGraphicsLinearLayout();
-    //vLayout->setContentsMargins(0, 0, 0, 0);
-    vLayout->setOrientation( Qt::Vertical );
-
-    mDiskNameLabel = new HbLabel();
-    HbFontSpec fontSpecPrimary(HbFontSpec::Primary);
-    //fontSpecPrimary.setTextHeight(18.0);
-    mDiskNameLabel->setFontSpec( fontSpecPrimary );
-    vLayout->addItem( mDiskNameLabel );
-    vLayout->setAlignment( mDiskNameLabel, Qt::AlignLeft );
-
-    mSizeLabel = new HbLabel();
-    HbFontSpec fontSpecSecondary(HbFontSpec::Secondary);
-    //fontSpecSecondary.setTextHeight(18.0);
-    mSizeLabel->setFontSpec(fontSpecSecondary);
-    vLayout->addItem( mSizeLabel );
-    vLayout->setAlignment(mSizeLabel, Qt::AlignLeft);
-
-//    mFreeLabel = new HbLabel();
-//    mFreeLabel->setFontSpec( HbFontSpec( HbFontSpec::Secondary ) );
-//    vLayout->addItem( mFreeLabel );
-//    vLayout->setAlignment( mFreeLabel, Qt::AlignLeft );
-
-    HbWidget *labelsWidget = new HbWidget();
-    labelsWidget->setLayout(vLayout);
-
-    hLayout->setAlignment( labelsWidget, Qt::AlignLeft );
-
-    hLayout->addItem( labelsWidget );
-    hLayout->setStretchFactor( labelsWidget, 1 );
-
-    //this->setMaximumHeight( mDiskNameLabel->preferredHeight() );
-    //setMaximumHeight( mIconLabel->preferredHeight() );
-
-    setLayout( hLayout );
-}
--- a/filebrowser/ui/src/fbdrivemodel.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +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 "fbdrivemodel.h"
-#include "enginewrapper.h"
-#include "fbdriveentry.h"
-#include "filebrowsersettings.h"
-#include "FB.hrh"
-
-#include <QModelIndex>
-#include <QFileIconProvider>
-
-/**
-  Constructs a file browser custom system model with the given \a engineWrapper and \a parent.
-  */
-FbDriveModel::FbDriveModel(EngineWrapper *engineWrapper, QObject *parent) :
-    QAbstractListModel(parent),
-    mEngineWrapper(engineWrapper),
-    mFileIconProvider(0)
-{
-    mFileIconProvider = new QFileIconProvider();
-}
-
-/**
-  Destroys this file browser custom system model.
-  */
-FbDriveModel::~FbDriveModel()
-{  
-    if (mFileIconProvider) {
-        delete mFileIconProvider;
-    }
-}
-
-/**
-  \reimp
-  */
-int FbDriveModel::rowCount(const QModelIndex &parent) const
-{
-    Q_UNUSED(parent);
-    return mEngineWrapper->itemCount();
-}
-
-/**
-  \reimp
-  */
-QVariant FbDriveModel::data(const QModelIndex &index, int role) const
-{
-    if (!index.isValid() || index.model() != this)
-        return QVariant();
-
-    switch (role) {
-    case Qt::EditRole:
-    case Qt::DisplayRole: {
-            QStringList listItem;
-            FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(index));
-            if (mEngineWrapper->settings().fileViewMode() == EFileViewModeSimple)
-            {
-                const QString SimpleDriveEntry("%1: <%2>");
-                listItem /*<< driveEntry.IconId() */
-                        << SimpleDriveEntry.arg(driveEntry.driveLetter())
-                                           .arg(driveEntry.mediaTypeString());
-            } else if (mEngineWrapper->settings().fileViewMode() == EFileViewModeExtended) {
-                const QString SimpleDriveEntry("%1: <%2>");
-                const QString ExtendedDriveEntry("%1/%2 kB");
-                listItem /*<< driveEntry.IconId()*/
-                        << SimpleDriveEntry.arg(driveEntry.driveLetter())
-                                           .arg(driveEntry.mediaTypeString())
-                        << ExtendedDriveEntry.arg(QString::number(driveEntry.volumeInfoFree()/1024))
-                                             .arg(QString::number(driveEntry.volumeInfoSize()/1024));
-
-            }
-            return listItem;
-        }
-    case Qt::DecorationRole: {
-            if (mEngineWrapper) {
-                QIcon icon;
-                //TODO Drive ico has to be provided, for some reason it is not visible
-                icon = mFileIconProvider->icon(QFileIconProvider::Drive);
-                return QVariant(icon);
-            }
-        }
-    }
-    return QVariant();
-}
-
-/**
-  \reimp
-  */
-QVariant FbDriveModel::headerData(int section, Qt::Orientation orientation, int role) const
-{
-    Q_UNUSED(section);
-    Q_UNUSED(orientation);
-    Q_UNUSED(role);
-
-    // TODO, implement or remove
-    return QVariant();
-}
-
-
-FbDriveEntry FbDriveModel::driveEntry(const QModelIndex &index) const
-{
-    return mEngineWrapper->getDriveEntry(index);
-}
-
-QString FbDriveModel::driveLetter(const QModelIndex &index) const
-{
-    QString diskLetter;
-    if (index.row() >= 0 && index.row() < mEngineWrapper->itemCount()) {
-        FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(index));
-        diskLetter = driveEntry.driveLetter();
-    }
-    return diskLetter;
-}
-
-QString FbDriveModel::mediaTypeString(const QModelIndex &index) const
-{
-    QString mediaTypeString;
-    if (index.row() >= 0 && index.row() < mEngineWrapper->itemCount()) {
-        FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(index));
-        mediaTypeString = driveEntry.mediaTypeString();
-    }
-    return mediaTypeString;
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbdriveview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1337 +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 "fbdriveview.h"
-#include "fbsettingsview.h"
-#include "fbeditorview.h"
-#include "fbsearchview.h"
-#include "enginewrapper.h"
-#include "notifications.h"
-
-#include "fbdrivemodel.h"
-#include "filebrowsersortfilterproxymodel.h"
-#include "fbdrivelistviewitem.h"
-
-#include <HbMenu>
-#include <HbPopup>
-#include <HbView>
-#include <HbMessageBox>
-#include <HbAction>
-#include <HbLabel>
-#include <HbListView>
-#include <HbListViewItem>
-#include <HbListWidget>
-#include <HbLineEdit>
-#include <HbAbstractViewItem>
-#include <HbSelectionDialog>
-#include <HbValidator>
-#include <HbInputDialog>
-
-#include <QString>
-#include <QGraphicsLinearLayout>
-#include <QItemSelection>
-#include <QDebug>
-//TODO check if needed to do this way
-#include <FB.hrh>
-
-// ---------------------------------------------------------------------------
-
-FbDriveView::FbDriveView() :
-    mEngineWrapper(0),
-    mListView(0),
-    mNaviPane(0),
-    mMainLayout(0),
-    mFbDriveModel(0),
-    mOptionMenuActions(),
-    mContextMenuActions(),
-    mContextMenu(0),
-    mLocationChanged(false),
-    mRemoveFileAfterCopied(false),
-//    mClipBoardInUse(false),
-    mFolderContentChanged(false),
-    mCurrentIndex(),
-    mOldPassword(),
-    mPanicCategory(),
-    mAbsoluteFilePath(),
-    mOverwriteOptions(),
-    mModelIndex(),
-    mNewFileName(),
-    mProceed(false),
-    mEraseMBR(false)
-{
-    setTitle("File Browser");
-
-    createMenu();
-    createContextMenu();
-}
-
-// ---------------------------------------------------------------------------	
-
-void FbDriveView::init(EngineWrapper *engineWrapper)
-{
-    mEngineWrapper = engineWrapper;
-
-    mListView = new HbListView(this);
-    mListView->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
-
-    mListView->setItemPrototype(new FbDriveListViewItem(mListView));
-
-    mFbDriveModel = new FbDriveModel(mEngineWrapper);
-    if (!mListView->model()) {
-        mEngineWrapper->refreshView();
-        mListView->setModel(mFbDriveModel);
-    }
-
-    //mListView->setRootIndex(mFileSystemModel->index(startPath));
-    //mListView->setRootIndex(model->index());
-
-//    mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
-
-    connect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
-    connect(mListView, SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
-            this, SLOT(onLongPressed(HbAbstractViewItem*, QPointF)));
-
-    mNaviPane = new HbLabel(this);
-    mNaviPane->setPlainText(QString(" ")); // TODO get from settings or default
-    //mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
-    HbFontSpec fontSpec(HbFontSpec::PrimarySmall);
-    mNaviPane->setFontSpec(fontSpec);
-
-    // Create layout and add list view and naviPane into layout:
-    mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
-    mMainLayout->addItem(mNaviPane);
-    mMainLayout->addItem(mListView);
-    setLayout(mMainLayout);
-}
-
-// ---------------------------------------------------------------------------
-
-FbDriveView::~FbDriveView()
-{  
-//    if (mEngineWrapper) {
-//        delete mEngineWrapper;
-//    }
-    if (mContextMenu) {
-        mContextMenu->deleteLater();
-    }
-
-    delete mFbDriveModel;
-    delete mListView;
-}
-
-/**
-  Initial setup for options menu.
-  Dynamic menu update during the runtime is performed by updateOptionMenu() which
-  to menu's aboutToShow() signal.
-  */
-void FbDriveView::createMenu()
-{
-    createFileMenu();
-    createEditMenu();
-    createViewMenu();
-    createToolsMenu();
-
-    createSettingsMenuItem();
-    createAboutMenuItem();
-    createExitMenuItem();
-
-    // menu dynamic update
-    connect(menu(), SIGNAL(aboutToShow()), this, SLOT(updateOptionMenu()));
-}
-
-/**
-  Initial setup for File submenu
-  */
-void FbDriveView::createFileMenu()
-{
-    mOptionMenuActions.mFileMenu = menu()->addMenu("File");
-
-    mOptionMenuActions.mFileSearch = mOptionMenuActions.mFileMenu->addAction("Search...", this, SLOT(fileSearch()));
-    //mOptionMenuActions.mFileSearch->setVisible(false);
-
-    //mOptionMenuActions.mFileNewMenu = mOptionMenuActions.mFileMenu->addMenu("New");
-
-    mOptionMenuActions.mFileSetAttributes = mOptionMenuActions.mFileMenu->addAction("Set attributes...", this, SLOT(fileSetAttributes()));
-    mOptionMenuActions.mFileSetAttributes->setVisible(false);
-}
-
-/**
-  Initial setup for Edit submenu
-  */
-void FbDriveView::createEditMenu()
-{
-    mOptionMenuActions.mEditMenu = menu()->addMenu("Edit");
-
-    mOptionMenuActions.mEditSnapShotToE = mOptionMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
-    mOptionMenuActions.mEditSnapShotToE->setVisible(false);
-}
-
-/**
-  Initial setup for View submenu
-  */
-void FbDriveView::createViewMenu()
-{
-    mOptionMenuActions.mViewMenu = menu()->addMenu("View");
-    //mOptionMenuActions.mViewMenu->menuAction()->setVisible(false);
-
-    //mOptionMenuActions.mViewFilterEntries = mOptionMenuActions.mViewMenu->addAction("Filter entries", this, SLOT(viewFilterEntries()));
-    mOptionMenuActions.mViewRefresh = mOptionMenuActions.mViewMenu->addAction("Refresh", this, SLOT(viewRefresh()));
-}
-
-/**
-  Initial setup for Tools submenu
-  */
-void FbDriveView::createToolsMenu()
-{
-    mOptionMenuActions.mToolsMenu = menu()->addMenu("Tools");
-
-    mOptionMenuActions.mToolsAllAppsToTextFile = mOptionMenuActions.mToolsMenu->addAction("All apps to a text file", this, SLOT(toolsAllAppsToTextFile()));
-    mOptionMenuActions.mToolsAllAppsToTextFile->setVisible(false);
-    mOptionMenuActions.mToolsAllFilesToTextFile = mOptionMenuActions.mToolsMenu->addAction("All files to a text file", this, SLOT(toolsAllFilesToTextFile()));
-    //mOptionMenuActions.mToolsAllFilesToTextFile->setVisible(false);
-
-//    mOptionMenuActions.mToolsAvkonIconCacheMenu = mOptionMenuActions.mToolsMenu->addMenu("Avkon icon cache");
-//    mOptionMenuActions.mToolsAvkonIconCacheMenu->menuAction()->setVisible(false);
-//    mOptionMenuActions.mToolsAvkonIconCacheEnable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Enable", this, SLOT(toolsAvkonIconCacheEnable()));
-//    mOptionMenuActions.mToolsAvkonIconCacheDisable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Clear and disable", this, SLOT(toolsAvkonIconCacheDisable()));
-
-    mOptionMenuActions.mToolsDisableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Disable extended errors", this, SLOT(toolsDisableExtendedErrors()));
-    mOptionMenuActions.mToolsDumpMsgStoreWalk = mOptionMenuActions.mToolsMenu->addAction("Dump msg. store walk", this, SLOT(toolsDumpMsgStoreWalk()));
-    mOptionMenuActions.mToolsDumpMsgStoreWalk->setVisible(false);
-    mOptionMenuActions.mToolsEditDataTypes = mOptionMenuActions.mToolsMenu->addAction("Edit data types", this, SLOT(toolsEditDataTypes()));
-    mOptionMenuActions.mToolsEditDataTypes->setVisible(false);
-    mOptionMenuActions.mToolsEnableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Enable extended errors", this, SLOT(toolsEnableExtendedErrors()));
-
-    mOptionMenuActions.mToolsErrorSimulateMenu = mOptionMenuActions.mToolsMenu->addMenu("Error simulate");
-    mOptionMenuActions.mToolsErrorSimulateLeave = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Leave", this, SLOT(toolsErrorSimulateLeave()));
-    mOptionMenuActions.mToolsErrorSimulatePanic = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Panic", this, SLOT(toolsErrorSimulatePanic()));
-    mOptionMenuActions.mToolsErrorSimulatePanic->setVisible(false);
-    mOptionMenuActions.mToolsErrorSimulateException = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Exception", this, SLOT(toolsErrorSimulateException()));
-
-//    mOptionMenuActions.mLocalConnectivityMenu = mOptionMenuActions.mToolsMenu->addMenu("Local connectivity");
-//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared = mOptionMenuActions.mLocalConnectivityMenu->addAction("Activate infrared", this, SLOT(toolsLocalConnectivityActivateInfrared()));
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch BT UI", this, SLOT(toolsLocalConnectivityLaunchBTUI()));
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch USB UI", this, SLOT(toolsLocalConnectivityLaunchUSBUI()));
-
-    mOptionMenuActions.mToolsMessageAttachmentsMenu = mOptionMenuActions.mToolsMenu->addMenu("Message attachments");
-    mOptionMenuActions.mToolsMessageAttachmentsMenu->menuAction()->setVisible(false);
-    mOptionMenuActions.mToolsMessageInbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Inbox", this, SLOT(toolsMessageInbox()));
-    mOptionMenuActions.mToolsMessageDrafts = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Drafts", this, SLOT(toolsMessageDrafts()));
-    mOptionMenuActions.mToolsMessageSentItems = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Sent items", this, SLOT(toolsMessageSentItems()));
-    mOptionMenuActions.mToolsMessageOutbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Outbox", this, SLOT(toolsMessageOutbox()));
-
-    mOptionMenuActions.mToolsMemoryInfo = mOptionMenuActions.mToolsMenu->addAction("Memory info", this, SLOT(toolsMemoryInfo()));
-    mOptionMenuActions.mToolsMemoryInfo->setVisible(false);
-
-    mOptionMenuActions.mToolsSecureBackupMenu = mOptionMenuActions.mToolsMenu->addMenu("Secure backup");
-    mOptionMenuActions.mToolsSecureBackupMenu->menuAction()->setVisible(false);
-    mOptionMenuActions.mToolsSecureBackStart = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start backup", this, SLOT(toolsSecureBackStart()));
-    mOptionMenuActions.mToolsSecureBackRestore = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start restore", this, SLOT(toolsSecureBackRestore()));
-    mOptionMenuActions.mToolsSecureBackStop = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Stop", this, SLOT(toolsSecureBackStop()));
-
-    mOptionMenuActions.mToolsSetDebugMask = mOptionMenuActions.mToolsMenu->addAction("Set debug mask", this, SLOT(toolsSetDebugMaskQuestion()));
-    mOptionMenuActions.mToolsShowOpenFilesHere = mOptionMenuActions.mToolsMenu->addAction("Show open files here", this, SLOT(toolsShowOpenFilesHere()));
-    mOptionMenuActions.mToolsShowOpenFilesHere->setVisible(false);
-}
-
-/**
-  Creates Setting menu item in option menu
-  */
-void FbDriveView::createSettingsMenuItem()
-{
-    mOptionMenuActions.mSetting = menu()->addAction("Settings...");
-    connect(mOptionMenuActions.mSetting, SIGNAL(triggered()), this, SIGNAL(aboutToShowSettingsView()));
-}
-
-
-/**
-  Creates About menu item in option menu
-  */
-void FbDriveView::createAboutMenuItem()
-{
-    // about note
-    mOptionMenuActions.mAbout = menu()->addAction("About");
-    connect(mOptionMenuActions.mAbout, SIGNAL(triggered()), this, SLOT(about()));
-}
-
-/**
-  Creates Exit menu item in option menu
-  */
-void FbDriveView::createExitMenuItem()
-{
-    // application exit
-    mOptionMenuActions.mExit = menu()->addAction("Exit");
-    connect(mOptionMenuActions.mExit, SIGNAL(triggered()), qApp, SLOT(quit()));
-}
-
-/**
-  update menu: disk admin available only in device root view. edit available only in folder view
-  when file or folder content exist in current folder, or clipboard has copied item.
-  file and view menus updated every time regarding the folder content.
-  tools, settings, about, exit always available.
-  If there's remove and add operations at same time, always remove first
-  to keep to the correct menu items order.
-  */
-void FbDriveView::updateOptionMenu()
-{
-    bool isFileItemListEmpty = mFbDriveModel->rowCount() == 0;
-//    bool isDriveListViewActive = true; //mEngineWrapper->isDriveListViewActive();
-    bool isNormalModeActive = true;       //iModel->FileUtils()->IsNormalModeActive();
-//    bool isCurrentDriveReadOnly = mEngineWrapper->isCurrentDriveReadOnly();   //iModel->FileUtils()->IsCurrentDriveReadOnly();
-//    bool isCurrentItemDirectory = mEngineWrapper->getFileEntry(currentItemIndex()).isDir();
-    // bool currentSelected = true;    //iContainer->ListBox()->View()->ItemIsSelected(iContainer->ListBox()->View()->CurrentItemIndex());
-//    bool isAllSelected = mListView->selectionModel()->selection().count() == mFbDriveModel->rowCount();
-    //bool isNoneSelected = mListView->selectionModel()->selection().count() != 0;
-//    bool hasSelectedItems = mListView->selectionModel()->selection().count() != 0;
-    //bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
-    bool isClipBoardEmpty = !mEngineWrapper->isClipBoardListInUse();
-    bool showSnapShot = false;           //iModel->FileUtils()->DriveSnapShotPossible();
-
-    bool showEditMenu(true);
-    if (!showSnapShot || isFileItemListEmpty && isClipBoardEmpty)
-        showEditMenu = false;
-    else
-        showEditMenu = true;
-
-    mOptionMenuActions.mEditMenu->menuAction()->setVisible(showEditMenu);
-
-    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileOpen, isFileItemListEmpty || isDriveListViewActive || isCurrentItemDirectory);
-
-    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileView, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive);
-    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileEdit, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive);
-    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileSendTo, isFileItemListEmpty || driveListActive || isCurrentItemDirectory);
-
-    // TODO mOptionMenuActions.mFileCompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive));
-    // TODO mOptionMenuActions.mFileDecompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive));
-
-    // TODO mOptionMenuActions.mEditSnapShotToE->setVisible(isDriveListViewActive);
-
-    // TODO mOptionMenuActions.mViewSort->setVisible(!(!isNormalModeActive || isDriveListViewActive || isFileItemListEmpty));
-    // TODO mOptionMenuActions.mViewOrder->setVisible(!(!isNormalModeActive || isDriveListViewActive || isFileItemListEmpty));
-    mOptionMenuActions.mViewRefresh->setVisible(isNormalModeActive);
-    //mOptionMenuActions.mViewFilterEntries->setVisible(!isFileItemListEmpty);
-
-    // TODO R_FILEBROWSER_VIEW_SORT_SUBMENU
-    // aMenuPane->SetItemButtonState(iModel->FileUtils()->SortMode(), EEikMenuItemSymbolOn);
-
-    // TODO R_FILEBROWSER_VIEW_ORDER_SUBMENU
-    // aMenuPane->SetItemButtonState(iModel->FileUtils()->OrderMode(), EEikMenuItemSymbolOn);
-
-    // aResourceId == R_FILEBROWSER_TOOLS_SUBMENU
-    bool noExtendedErrorsAllowed = mEngineWrapper->ErrRdFileExists();
-    mOptionMenuActions.mToolsDisableExtendedErrors->setVisible(noExtendedErrorsAllowed);
-    mOptionMenuActions.mToolsEnableExtendedErrors->setVisible(!noExtendedErrorsAllowed);
-
-//    bool infraRedAllowed = mEngineWrapper->FileExists(KIRAppPath);
-//    bool bluetoothAllowed = mEngineWrapper->FileExists(KBTAppPath);
-//    bool usbAllowed = mEngineWrapper->FileExists(KUSBAppPath);
-//
-//    bool noLocalCon = !infraRedAllowed && !bluetoothAllowed && !usbAllowed;
-//    mOptionMenuActions.mToolsLocalConnectivityMenu->menuAction()->setVisible(!noLocalCon);
-//
-//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared->setVisible(infraRedAllowed);
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI->setVisible(bluetoothAllowed);
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI->setVisible(usbAllowed);
-}
-
-void FbDriveView::createContextMenu()
-{
-    mContextMenu = new HbMenu();
-    connect(mContextMenu, SIGNAL(aboutToShow()), this, SLOT(updateContextMenu()));
-
-    createFileContextMenu();
-    createEditContextMenu();
-    createViewContextMenu();
-    createDiskAdminContextMenu();
-}
-
-
-void FbDriveView::createFileContextMenu()
-{
-    //mContextMenuActions.mFileMenu = mContextMenu->addMenu("File");
-
-    //mContextMenuActions.mFileOpenDrive = mContextMenuActions.mFileMenu->addAction("Open drive (->)", this, SLOT(fileOpenDrive()));
-//    mContextMenuActions.mFileSearch = mContextMenuActions.mFileMenu->addAction("Search...", this, SLOT(fileSearch()));
-    //mContextMenuActions.mFileSearch->setVisible(false);
-
-    //mContextMenuActions.mFileProperties = mContextMenuActions.mFileMenu->addAction("Properties", this, SLOT(fileProperties()));
-    mContextMenuActions.mFileProperties = mContextMenu->addAction("Properties", this, SLOT(fileProperties()));
-    mContextMenuActions.mFileSearch = mContextMenu->addAction("Search...", this, SLOT(fileSearch()));
-
-//    mContextMenuActions.mFileSetAttributes = mContextMenuActions.mFileMenu->addAction("Set attributes...", this, SLOT(fileSetAttributes()));
-//    mContextMenuActions.mFileSetAttributes->setVisible(false);
-}
-
-void FbDriveView::createEditContextMenu()
-{
-//    mContextMenuActions.mEditMenu = mContextMenu->addMenu("Edit");
-
-    //mContextMenuActions.mEditSnapShotToE = mContextMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
-//    mContextMenuActions.mEditSnapShotToE->setVisible(false);
-//    mContextMenuActions.mEditCut = mContextMenuActions.mEditMenu->addAction("Cut", this, SLOT(editCut()));
-//    mContextMenuActions.mEditCopy = mContextMenuActions.mEditMenu->addAction("Copy", this, SLOT(editCopy()));
-//    mContextMenuActions.mEditPaste = mContextMenuActions.mEditMenu->addAction("Paste", this, SLOT(editPaste()));
-//    mContextMenuActions.mEditCopyToFolder = mContextMenuActions.mEditMenu->addAction("Copy to folder...", this, SLOT(editCopyToFolder()));
-//    mContextMenuActions.mEditMoveToFolder = mContextMenuActions.mEditMenu->addAction("Move to folder...", this, SLOT(editMoveToFolder()));
-}
-
-void FbDriveView::createViewContextMenu()
-{
-
-}
-
-/**
-  Initial setup for Disk Admin submenu
-  */
-void FbDriveView::createDiskAdminContextMenu()
-{
-    mContextMenuActions.mDiskAdminMenu = mContextMenu->addMenu("Disk admin");
-    //mContextMenuActions.mDiskAdminMenu->menuAction()->setVisible(false);
-
-    mContextMenuActions.mDiskAdminSetDrivePassword = mContextMenuActions.mDiskAdminMenu->addAction("Set drive password", this, SLOT(diskAdminSetDrivePassword()));
-    mContextMenuActions.mDiskAdminUnlockDrive = mContextMenuActions.mDiskAdminMenu->addAction("Unlock drive", this, SLOT(diskAdminUnlockDrive()));
-    mContextMenuActions.mDiskAdminClearDrivePassword = mContextMenuActions.mDiskAdminMenu->addAction("Clear drive password", this, SLOT(diskAdminClearDrivePassword()));
-    mContextMenuActions.mDiskAdminEraseDrivePassword = mContextMenuActions.mDiskAdminMenu->addAction("Erase drive password", this, SLOT(diskAdminEraseDrivePassword()));
-
-    mContextMenuActions.mDiskAdminFormatDrive = mContextMenuActions.mDiskAdminMenu->addAction("Format drive", this, SLOT(diskAdminFormatDrive()));
-    mContextMenuActions.mDiskAdminFormatDrive->setVisible(false);
-    mContextMenuActions.mDiskAdminQuickFormatDrive = mContextMenuActions.mDiskAdminMenu->addAction("Quick format drive", this, SLOT(diskAdminQuickFormatDrive()));
-    mContextMenuActions.mDiskAdminQuickFormatDrive->setVisible(false);
-
-    mContextMenuActions.mDiskAdminCheckDisk = mContextMenuActions.mDiskAdminMenu->addAction("Check disk", this, SLOT(diskAdminCheckDisk()));
-    mContextMenuActions.mDiskAdminScanDrive = mContextMenuActions.mDiskAdminMenu->addAction("Scan drive", this, SLOT(diskAdminScanDrive()));
-    mContextMenuActions.mDiskAdminSetDriveName = mContextMenuActions.mDiskAdminMenu->addAction("Set drive name", this, SLOT(diskAdminSetDriveName()));
-    mContextMenuActions.mDiskAdminSetDriveVolumeLabel = mContextMenuActions.mDiskAdminMenu->addAction("Set drive volume label", this, SLOT(diskAdminSetDriveVolumeLabel()));
-    mContextMenuActions.mDiskAdminEjectDrive = mContextMenuActions.mDiskAdminMenu->addAction("Eject drive", this, SLOT(diskAdminEjectDrive()));
-    mContextMenuActions.mDiskAdminDismountDrive = mContextMenuActions.mDiskAdminMenu->addAction("Dismount drive", this, SLOT(diskAdminDismountDrive()));
-    mContextMenuActions.mDiskAdminEraseMBR = mContextMenuActions.mDiskAdminMenu->addAction("Erase MBR", this, SLOT(diskAdminEraseMBR()));
-    mContextMenuActions.mDiskAdminPartitionDrive = mContextMenuActions.mDiskAdminMenu->addAction("Partition drive", this, SLOT(diskAdminPartitionDrive()));
-}
-
-void FbDriveView::updateContextMenu()
-{
-    bool isFileItemListEmpty = mFbDriveModel->rowCount() == 0;
-    mContextMenuActions.mFileProperties->setVisible(!isFileItemListEmpty);
-}
-
-// ---------------------------------------------------------------------------
-
-void FbDriveView::onLongPressed(HbAbstractViewItem *listViewItem, QPointF coords)
-{
-    mCurrentIndex = listViewItem->modelIndex();
-
-    mContextMenu->setPreferredPos(coords);
-    mContextMenu->show();
-}
-
-/**
-  Refresh FileBrowser view
-  */
-void FbDriveView::refreshList()
-{
-    mEngineWrapper->refreshView();
-    mListView->reset();
-
-    TListingMode listingMode = mEngineWrapper->listingMode();
-    if (listingMode == ENormalEntries)
-        mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
-    else if (listingMode == ESearchResults)
-        mNaviPane->setPlainText(QString(tr("Search results")));
-    else if (listingMode == EOpenFiles)
-        mNaviPane->setPlainText(QString(tr("Open files")));
-    else if (listingMode == EMsgAttachmentsInbox)
-        mNaviPane->setPlainText(QString(tr("Attachments in Inbox")));
-    else if (listingMode == EMsgAttachmentsDrafts)
-        mNaviPane->setPlainText(QString(tr("Attachments in Drafts")));
-    else if (listingMode == EMsgAttachmentsSentItems)
-        mNaviPane->setPlainText(QString(tr("Attachments in Sent Items")));
-    else if (listingMode == EMsgAttachmentsOutbox)
-        mNaviPane->setPlainText(QString(tr("Attachments in Outbox")));
-}
-
-// ---------------------------------------------------------------------------
-/**
-  Show a list dialog
-  \param List aList of item to select item from.
-  \param Title text titleText of a dialog heading widget
-  \return None
-  */
-void FbDriveView::openListDialog(const QStringList& items, const QString &titleText, QObject* receiver, const char* member)
-{
-    // Create a list and some simple content for it
-    HbSelectionDialog *dlg = new HbSelectionDialog();
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    // Set items to be popup's content
-    dlg->setStringItems(items);
-    dlg->setSelectionMode(HbAbstractItemView::SingleSelection);
-
-    HbLabel *title = new HbLabel(dlg);
-    title->setPlainText(titleText);
-    dlg->setHeadingWidget(title);
-
-    // Launch popup and handle the user response:
-    dlg->open(receiver, member);
-}
-
-// ---------------------------------------------------------------------------
-
-void FbDriveView::openPropertyDialog(const QStringList& propertyList, const QString& title)
-{
-    HbDialog *dialog = new HbDialog();
-    dialog->setDismissPolicy(HbPopup::TapOutside);
-    dialog->setTimeout(HbPopup::NoTimeout);
-
-    HbLabel *titleWidget = new HbLabel();
-    titleWidget->setPlainText(title);
-    dialog->setHeadingWidget(titleWidget);
-
-    // Create a list and some simple content for it
-    HbListWidget *list = new HbListWidget();
-    QString str;
-    foreach (str, propertyList) {
-        list->addItem(str);
-    }
-
-    // Connect list item activation signal to close the popup
-    connect(list, SIGNAL(activated(HbListWidgetItem*)), dialog, SLOT(close()));
-
-    HbAction *cancelAction = new HbAction("Close");
-    dialog->setPrimaryAction(cancelAction);
-
-    // Set listwidget to be popup's content
-    dialog->setContentWidget(list);
-    // Launch popup and handle the user response:
-    dialog->open();
-}
-
-void FbDriveView::storeSelectedItemsOrCurrentItem()
-{
-    QItemSelectionModel *selectionIndexes = mListView->selectionModel();
-
-    // by default use selected items
-    if (selectionIndexes) {
-        if (selectionIndexes->hasSelection()) {
-            mSelectionIndexes = mListView->selectionModel()->selectedIndexes();
-        } else { // or if none selected, use the current item index
-            mSelectionIndexes.clear();
-            mSelectionIndexes.append(mCurrentIndex);
-//            QModelIndex currentIndex = currentItemIndex();
-//            if (mFbDriveModel->rowCount(currentItemIndex) > currentItemIndex && currentItemIndex >= 0)
-//            {
-//                modelIndexList.append(currentIndex);
-//            }
-        }
-    }
-//    mClipBoardInUse = true;
-}
-
-// ---------------------------------------------------------------------------
-
-QModelIndex FbDriveView::currentItemIndex()
-{
-    return mCurrentIndex;//mListView->selectionModel()->currentIndex();
-}
-
-// ---------------------------------------------------------------------------
-// operations in File Menu
-// ---------------------------------------------------------------------------
-
-void FbDriveView::fileOpenDrive()
-{
-    // TODO make a separate function to be called from here and fileOpenDirectory()
-    mLocationChanged = true;
-    // get selected drive or directory from list view model and open it:
-    //if (mListView->selectionModel()->hasSelection()) {
-//    if (mListView->selectionModel()->selection().count() != 0) {
-//        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->moveDownToDirectory(mCurrentIndex);
-        mListView->setRootIndex(mCurrentIndex);
-        refreshList();
-//    } else {
-//        Notifications::showErrorNote("not selected item!");
-//    }
-}
-
-void FbDriveView::fileSearch()
-{
-    QString searchPath;
-    HbAction *contextrMenuAction = static_cast<HbAction *>(sender());
-    if (contextrMenuAction
-        && contextrMenuAction->text().compare(QString("Search..."), Qt::CaseInsensitive) == 0
-        && contextrMenuAction == mContextMenuActions.mFileSearch) {
-        FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(currentItemIndex()));
-        searchPath = driveEntry.driveLetter() + QString(":\\");
-    } else {
-        searchPath = mEngineWrapper->currentPath();
-    }
-    emit aboutToShowSearchView(searchPath);
-}
-
-/**
-  Show file properties
-  */
-void FbDriveView::fileProperties()
-{
-    QModelIndex currentIndex = currentItemIndex();
-    QStringList propertyList;
-    QString titleText;
-    mEngineWrapper->properties(currentIndex, propertyList, titleText);
-    openPropertyDialog(propertyList, titleText);
-}
-
-void FbDriveView::fileSetAttributes()
-{
-
-}
-
-// edit menu
-void FbDriveView::editSnapShotToE()
-{
-
-}
-
-// ---------------------------------------------------------------------------
-// view menu
-// ---------------------------------------------------------------------------
-
-/**
-  Refresh view
-  */
-void FbDriveView::viewRefresh()
-{
-    refreshList();
-}
-
-// ---------------------------------------------------------------------------
-// disk admin menu
-// ---------------------------------------------------------------------------
-
-/**
-  Open old password for the selected drive dialog.
-  */
-void FbDriveView::diskAdminSetDrivePassword()
-{
-    QModelIndex currentIndex = currentItemIndex();
-    // check if the drive has a password
-    if (mEngineWrapper->hasDrivePassword(currentIndex)) {
-        QString heading = QString("Existing password");
-        HbInputDialog::queryText(heading, this, SLOT(diskAdminSetDrivePasswordNew(HbAction*)), QString(), scene());
-    } else {
-        QString heading = QString("New password");
-        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDrivePassword(HbAction*)), mOldPassword, scene());
-    }
-}
-
-/**
-   Open new password for the selected drive dialog.
-  */
-void FbDriveView::diskAdminSetDrivePasswordNew(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        mOldPassword = dlg->value().toString();
-        QString heading = QString("New password");
-        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDrivePassword(HbAction*)), mOldPassword, scene());
-    }
-}
-
-/**
-   Set password for the selected drive.
-  */
-void FbDriveView::doDiskAdminSetDrivePassword(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString newPassword = dlg->value().toString();
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminSetDrivePassword(currentIndex, mOldPassword, newPassword);
-        refreshList();
-        mOldPassword = QString();
-        newPassword = QString();
-    }
-}
-
-/**
-  Open Unlock the selected drive dialog.
-  */
-void FbDriveView::diskAdminUnlockDrive()
-{
-    QModelIndex currentIndex = currentItemIndex();
-    // check if the drive is locked
-    if (mEngineWrapper->isDriveLocked(currentIndex)) {
-        QString heading = QString("Existing password");
-        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminUnlockDrive(HbAction*)), QString(), scene());
-    } else {
-        Notifications::showInformationNote(QString("This drive is not locked"));
-    }
-}
-
-/**
-  Unlock the selected drive.
-  */
-void FbDriveView::doDiskAdminUnlockDrive(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString oldPassword = dlg->value().toString();
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminUnlockDrive(currentIndex, oldPassword);
-        refreshList();
-    }
-}
-
-/**
-  Open clear password of the selected drive dialog.
-  */
-void FbDriveView::diskAdminClearDrivePassword()
-{
-    QModelIndex currentIndex = currentItemIndex();
-    // check if the drive has a password
-    if (mEngineWrapper->hasDrivePassword(currentIndex)) {
-        QString heading = QString("Existing password");
-        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminClearDrivePassword(HbAction*)), QString(), scene());
-    } else {
-        Notifications::showInformationNote(QString("This drive has no password"));
-    }
-}
-
-/**
-  Clear password of the selected drive.
-  */
-void FbDriveView::doDiskAdminClearDrivePassword(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString oldPassword = dlg->value().toString();
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminClearDrivePassword(currentIndex, oldPassword);
-        refreshList();
-    }
-}
-
-
-/**
-  Question for erase password of the selected drive
-  */
-void FbDriveView::diskAdminEraseDrivePassword()
-{
-    // check if the drive has a password
-    QModelIndex currentIndex = currentItemIndex();
-    if (mEngineWrapper->hasDrivePassword(currentIndex)) {
-        HbMessageBox::question(QString("Are you sure? All data can be lost!"),
-                               this,
-                               SLOT(doDiskAdminEraseDrivePassword(int)),
-                               HbMessageBox::Yes | HbMessageBox::No);
-    } else {
-        Notifications::showInformationNote(QString("This drive has no password"));
-    }
-}
-
-/**
-  Erase password of the selected drive
-  */
-void FbDriveView::doDiskAdminEraseDrivePassword(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminEraseDrivePassword(currentIndex);
-        refreshList();
-    }
-}
-
-/**
-  Performs format on the selected drive
-  */
-void FbDriveView::diskAdminFormatDrive()
-{
-    HbMessageBox::question(QString("Are you sure? All data will be lost!"),
-                           this,
-                           SLOT(doDiskAdminFormatDrive(int)),
-                           HbMessageBox::Yes | HbMessageBox::No);
-}
-
-/**
-  Performs format on the selected drive
-  */
-void FbDriveView::doDiskAdminFormatDrive(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminFormatDrive(currentIndex, false);
-    }
-}
-
-/**
-  Performs quick format on the selected drive
-  */
-void FbDriveView::diskAdminQuickFormatDrive()
-{
-    HbMessageBox::question(QString("Are you sure? All data will be lost!"),
-                           this,
-                           SLOT(doDiskAdminQuickFormatDrive(int)),
-                           HbMessageBox::Yes | HbMessageBox::No);
-}
-
-/**
-  Performs quick format on the selected drive
-  */
-void FbDriveView::doDiskAdminQuickFormatDrive(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminFormatDrive(currentIndex, true);
-    }
-}
-
-/**
-    Checks the disk integrity on the selected drive
-  */
-void FbDriveView::diskAdminCheckDisk()
-{
-    QModelIndex currentIndex = currentItemIndex();
-    mEngineWrapper->DiskAdminCheckDisk(currentIndex);
-}
-
-/**
-  Checks the selected drive for errors and corrects them
-  */
-void FbDriveView::diskAdminScanDrive()
-{
-    HbMessageBox::question(QString("This finds errors on disk and corrects them. Proceed?"),
-                           this,
-                           SLOT(doDiskAdminScanDrive(int)),
-                           HbMessageBox::Yes | HbMessageBox::No);
-}
-
-/**
-  Checks the selected drive for errors and corrects them
-  */
-void FbDriveView::doDiskAdminScanDrive(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminScanDrive(currentIndex);
-        refreshList();
-    }
-}
-
-/**
-  Open drive name dialog
-  */
-void FbDriveView::diskAdminSetDriveName()
-{
-    QString driveName;
-
-    // get existing drive name
-    QModelIndex currentIndex = currentItemIndex();
-    mEngineWrapper->GetDriveName(currentIndex, driveName);
-
-    QString heading = QString("New name");
-    HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDriveName(HbAction*)), driveName, scene());
-}
-
-/**
-  Set drive name.
-  */
-void FbDriveView::doDiskAdminSetDriveName(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString driveName = dlg->value().toString();
-
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminSetDriveName(currentIndex, driveName);
-
-        refreshList();
-    }
-}
-
-/**
-  Open drive volume label dialog
-  */
-void FbDriveView::diskAdminSetDriveVolumeLabel()
-{
-    QString volumeLabel;
-
-    // get existing drive name
-    QModelIndex currentIndex = currentItemIndex();
-    mEngineWrapper->GetDriveVolumeLabel(currentIndex, volumeLabel);
-
-    QString heading = QString("New volume label");
-    HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDriveVolumeLabel(HbAction*)), volumeLabel, scene());
-}
-
-/**
-  Set drive volume label.
-  */
-void FbDriveView::doDiskAdminSetDriveVolumeLabel(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString volumeLabel = dlg->value().toString();
-
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminSetDriveVolumeLabel(currentIndex, volumeLabel);
-
-        refreshList();
-    }
-}
-
-/**
-  Eject the selected drive
-  */
-void FbDriveView::diskAdminEjectDrive()
-{
-    QModelIndex currentIndex = currentItemIndex();
-    mEngineWrapper->DiskAdminEjectDrive(currentIndex);
-    refreshList();
-}
-
-/**
-  Dismount the selected drive
-  */
-void FbDriveView::diskAdminDismountDrive()
-{
-    HbMessageBox::question(QString("Are you sure you know what are you doing?"),
-                           this,
-                           SLOT(doDiskAdminDismountDrive(int)),
-                           HbMessageBox::Yes | HbMessageBox::No);
-}
-
-void FbDriveView::doDiskAdminDismountDrive(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminDismountDrive(currentIndex);
-        refreshList();
-    }
-}
-
-/**
-  Erase Master Boot Record of the selected drive
-  */
-void FbDriveView::diskAdminEraseMBR()
-{
-    // TODO What to do with FB LITE macros?
-    HbMessageBox::question(QString("Are you sure? Your media driver must support this!"),
-                           this,
-                           SLOT(doDiskAdminEraseMBR(int)),
-                           HbMessageBox::Yes | HbMessageBox::No);
-}
-
-void FbDriveView::doDiskAdminEraseMBR(int action)
-{
-    // TODO What to do with FB LITE macros?
-    if (action == HbMessageBox::Yes) {
-        HbMessageBox::question(QString("Are you really sure you know what are you doing ?!?"),
-                               this,
-                               SLOT(doDiskAdminReallyEraseMBR(int)),
-                               HbMessageBox::Yes | HbMessageBox::No);
-    }
-}
-
-void FbDriveView::doDiskAdminReallyEraseMBR(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        // warn if the selected drive is not detected as removable
-        if (mEngineWrapper->isDriveRemovable(currentIndex)) {
-            mEngineWrapper->DiskAdminEraseMBR(currentIndex);
-            refreshList();
-        } else {
-            HbMessageBox::question(QString("Selected drive is not removable, really continue?"),
-                                   this,
-                                   SLOT(doDiskAdminNotRemovableReallyEraseMBR(int)),
-                                   HbMessageBox::Yes | HbMessageBox::No);
-        }
-    }
-}
-
-void FbDriveView::doDiskAdminNotRemovableReallyEraseMBR(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->DiskAdminEraseMBR(currentIndex);
-        refreshList();
-    }
-
-}
-
-/**
-  Partition the selected drive
-  */
-void FbDriveView::diskAdminPartitionDrive()
-{
-    HbMessageBox::question(QString("Are you sure? Your media driver must support this!"),
-                           this,
-                           SLOT(diskAdminPartitionDriveProceed(int)),
-                           HbMessageBox::Yes | HbMessageBox::No);
-}
-
-/**
-  Partition the selected drive if user is sure
-  */
-void FbDriveView::diskAdminPartitionDriveProceed(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        HbMessageBox::question(QString("Are you really sure you know what are you doing ?!?"),
-                               this,
-                               SLOT(diskAdminPartitionDriveReallyProceed(int)),
-                               HbMessageBox::Yes | HbMessageBox::No);
-    }
-}
-
-/**
-  Partition the selected drive if user is really sure
-  */
-void FbDriveView::diskAdminPartitionDriveReallyProceed(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        QModelIndex currentIndex = currentItemIndex();
-        mEraseMBR = false;
-        // warn if the selected drive is not detected as removable
-        mProceed = false;
-        if (mEngineWrapper->isDriveRemovable(currentIndex)) {
-            mProceed = true;
-        } else {
-            HbMessageBox::question(QString("Selected drive is not removable, really continue?"),
-                                   this,
-                                   SLOT(diskAdminPartitionDriveIsNotRemovable(int)),
-                                   HbMessageBox::Yes | HbMessageBox::No);
-        }
-
-        if (mProceed) {
-            // query if erase mbr
-            mEraseMBR = false;
-
-            HbMessageBox::question(QString("Erase MBR first (normally needed)?"),
-                                   this,
-                                   SLOT(diskAdminPartitionDriveEraseMbr(int)),
-                                   HbMessageBox::Yes | HbMessageBox::No);
-
-            // TODO use HbListDialog
-            QStringList list;
-            list << "1" << "2" << "3" << "4";
-            openListDialog(list, QString("Partitions?"), this, SLOT(diskAdminPartitionDriveGetCount(HbAction*)));
-        }
-    }
-}
-
-/**
-  Store result of user query about proceeding when drive is not removable.
-  */
-void FbDriveView::diskAdminPartitionDriveIsNotRemovable(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        mProceed = true;
-    } else {
-        mProceed = false;
-    }
-}
-
-/**
-  Store result of user query about erase MBR
-  */
-void FbDriveView::diskAdminPartitionDriveEraseMbr(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        mEraseMBR = true;
-    }
-}
-
-/**
-  Partition the selected drive
-  */
-void FbDriveView::diskAdminPartitionDriveGetCount(HbAction* action)
-{
-    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
-    if(!action && dlg && dlg->selectedItems().count()){
-        int selectionIndex = dlg->selectedItems().at(0).toInt();
-        QModelIndex currentIndex = currentItemIndex();
-        int amountOfPartitions = selectionIndex + 1;
-        mEngineWrapper->DiskAdminPartitionDrive(currentIndex, mEraseMBR, amountOfPartitions);
-        refreshList();
-    }
-}
-
-// ---------------------------------------------------------------------------
-// tools menu
-// ---------------------------------------------------------------------------
-void FbDriveView::toolsAllAppsToTextFile()
-{
-
-}
-
-/**
-  Write all files to text file
-  */
-void FbDriveView::toolsAllFilesToTextFile()
-{
-    mEngineWrapper->toolsWriteAllFiles();
-}
-
-//void FbDriveView::toolsAvkonIconCacheEnable()
-//{
-//
-//}
-//void FbDriveView::toolsAvkonIconCacheDisable()
-//{
-//
-//}
-
-/**
-  Disable extended errors
-  */
-void FbDriveView::toolsDisableExtendedErrors()
-{
-    mEngineWrapper->ToolsSetErrRd(false);
-}
-
-void FbDriveView::toolsDumpMsgStoreWalk()
-{
-
-}
-void FbDriveView::toolsEditDataTypes()
-{
-
-}
-
-/**
-  Enable extended errors
-  */
-void FbDriveView::toolsEnableExtendedErrors()
-{
-    mEngineWrapper->ToolsSetErrRd(true);
-}
-
-/**
-  Open simulate leave dialog
-  */
-void FbDriveView::toolsErrorSimulateLeave()
-{
-    int leaveCode = -6;
-    QString heading = QString("Leave code");
-    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulateLeave(HbAction*)), QString::number(leaveCode), scene());
-}
-
-
-/**
-  Simulate leave.
-  */
-void FbDriveView::doToolsErrorSimulateLeave(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        bool ok;
-        int leaveCode = dlg->value().toString().toInt(&ok);
-        if (leaveCode != 0 || ok) {
-            mEngineWrapper->ToolsErrorSimulateLeave(leaveCode);
-        }
-    }
-}
-
-/**
-  Open simulate panic dialog.
-  */
-void FbDriveView::toolsErrorSimulatePanic()
-{
-    mPanicCategory = QString ("Test Category");
-    QString heading = QString("Panic category");
-    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulatePanicCode(HbAction*)), mPanicCategory, scene());
-}
-
-/**
-  Simulate panic.
-  */
-void FbDriveView::doToolsErrorSimulatePanicCode(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        mPanicCategory = dlg->value().toString();
-        int panicCode(555);
-        QString heading = QString("Panic code");
-        HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulatePanic(HbAction*)), panicCode, scene());
-    }
-}
-
-/**
-  Simulate panic.
-  */
-void FbDriveView::doToolsErrorSimulatePanic(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        bool ok;
-        int panicCode = dlg->value().toInt(&ok);
-        if (panicCode != 0 || ok) {
-            mEngineWrapper->ToolsErrorSimulatePanic(mPanicCategory, panicCode);
-        }
-    }
-}
-
-/**
-  Open simulate exception dialog.
-  */
-void FbDriveView::toolsErrorSimulateException()
-{
-    int exceptionCode = 0;
-    QString heading = QString("Exception code");
-    HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulateException(HbAction*)), exceptionCode, scene());
-}
-
-/**
-  Simulate exception.
-  */
-void FbDriveView::doToolsErrorSimulateException(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        bool ok;
-        int exceptionCode = dlg->value().toInt(&ok);
-        if (exceptionCode != 0 || ok) {
-            mEngineWrapper->ToolsErrorSimulateException(exceptionCode);
-        }
-    }
-}
-
-//    void FbDriveView::toolsLocalConnectivityActivateInfrared()
-//{
-//
-//}
-//    void FbDriveView::toolsLocalConnectivityLaunchBTUI()
-//{
-//
-//}
-//    void FbDriveView::toolsLocalConnectivityLaunchUSBUI()
-//{
-//
-//}
-void FbDriveView::toolsMessageInbox()
-{
-
-}
-void FbDriveView::toolsMessageDrafts()
-{
-
-}
-void FbDriveView::toolsMessageSentItems()
-{
-
-}
-void FbDriveView::toolsMessageOutbox()
-{
-
-}
-void FbDriveView::toolsMemoryInfo()
-{
-
-}
-void FbDriveView::toolsSecureBackStart()
-{
-
-}
-void FbDriveView::toolsSecureBackRestore()
-{
-
-}
-void FbDriveView::toolsSecureBackStop()
-{
-
-}
-
-/**
-  Open debug mask dialog
-  */
-void FbDriveView::toolsSetDebugMaskQuestion()
-{
-    quint32 dbgMask = mEngineWrapper->getDebugMask();
-    QString dbgMaskText = QString("0x").append(QString::number(dbgMask, 16));
-    QString heading = QString("Kernel debug mask in hex format");
-    HbInputDialog::queryText(heading, this, SLOT(toolsSetDebugMask(HbAction*)), dbgMaskText, scene());
-}
-
-/**
-  Set debug mask
-  */
-void FbDriveView::toolsSetDebugMask(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString dbgMaskText = dlg->value().toString();
-        if (dbgMaskText.length() > 2 && dbgMaskText[0]=='0' && dbgMaskText[1]=='x') {
-            bool ok;
-            quint32 dbgMask = dbgMaskText.toUInt(&ok, 16);
-            if (dbgMask != 0 || ok) {
-                mEngineWrapper->toolsSetDebugMask(dbgMask);
-                Notifications::showConfirmationNote(QString("Changed"));
-            } else {
-                Notifications::showErrorNote(QString("Cannot convert value"));
-            }
-        } else {
-            Notifications::showErrorNote(QString("Not in hex format"));
-        }
-    }
-}
-
-void FbDriveView::toolsShowOpenFilesHere()
-{
-
-}
-
-// ---------------------------------------------------------------------------
-// main menu items
-// ---------------------------------------------------------------------------
-
-/**
-  Show about note
-  */
-void FbDriveView::about()
-{
-    Notifications::showAboutNote();
-}
-
-// ---------------------------------------------------------------------------
-// End of operations
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-
-/**
-  Item is selected from list when selection mode is activated from menu
-  */
-void FbDriveView::selectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/)
-{
-    //QItemSelectionModel *selectionModel = mListView->selectionModel();
-}
-
-/**
-  An item is clicked from navigation item list. Navigation item list contains
-  drive-, folder- or file items. Opens selected drive, folder or file popup menu
-  */
-void FbDriveView::activated(const QModelIndex& index)
-{
-    if (mFbDriveModel) {
-//        if (mEngineWrapper->isDriveListViewActive()) {
-            mEngineWrapper->moveDownToDirectory(index);
-            //emit aboutToShowFileView(QString(mEngineWrapper->currentPath()));
-            emit aboutToShowFileView();
-            //refreshList();
-//        }
-    }
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbeditorview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +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 "fbeditorview.h"
-
-#include <HbView>
-#include <HbApplication>
-#include <HbAction>
-#include <HbMenu>
-#include <HbTextEdit>
-#include <hbpushbutton.h>
-
-#include <QGraphicsLinearLayout>
-#include <QFile>
-#include <QFileInfo>
-#include <QTextStream>
-#include <QByteArray>
-#include <QByteRef>
-
-FbEditorView::FbEditorView() :
-    mTextEdit(0),
-    mFileHex(false),
-    mFlagReadOnly(),
-    mFileName(),
-    mFileContent(),
-    mToTextAction(0),
-    mToHexAction(0),
-    mExitAction(0)
-{
-    // Override back navigation action
-    HbAction *backNaviAction = new HbAction(Hb::BackNaviAction, this);
-    connect(backNaviAction, SIGNAL(triggered()), this, SLOT(backButtonClicked()));
-    setNavigationAction(backNaviAction);
-
-    createMenu();
-
-    // text editor
-//    mTextEdit = new QTextEdit();
-//    QGraphicsLinearLayout *editorLayout = new QGraphicsLinearLayout(Qt::Vertical);
-//    QGraphicsProxyWidget *editorWidget = new QGraphicsProxyWidget();
-//    editorWidget->setWidget(mTextEdit);
-//    editorLayout->addItem(editorWidget);
-//    setLayout(editorLayout);
-
-    mTextEdit = new HbTextEdit();
-    mTextEdit->setAlignment(Qt::AlignTop);
-    QGraphicsLinearLayout *editorLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
-    editorLayout->addItem(mTextEdit);
-    setLayout(editorLayout);
-}
-
-FbEditorView::~FbEditorView()
-{
-//    delete mTextEdit;
-//    delete mToTextAction;
-//    delete mToHexAction;
-//    delete mExitAction;
-}
-
-void FbEditorView::open(const QString& fileName, bool flagReadOnly)
-{
-    mFlagReadOnly = flagReadOnly;
-
-    if (!fileName.isEmpty()) {
-        mTextEdit->setReadOnly(mFlagReadOnly);
-        loadFile(fileName);
-    }
-    else {
-        // not valid file name
-    }
-}
-
-void FbEditorView::loadFile(const QString &fileName)
-{
-    mFileName = fileName;
-    QFile file(fileName);
-    QFileInfo baseName(fileName);
-    setTitle(baseName.fileName());
-
-    if (!file.open(QFile::ReadOnly | QFile::Text)) {
-        // note: cannot be opened. readonly or not text
-        return;
-    }
-    QTextStream in(&file);
-    in.setAutoDetectUnicode(false);
-
-    mFileContent = in.readAll();
-    file.close();
-    displayInText();
-}
-
-void FbEditorView::displayInText()
-{
-    mFileHex = false;
-    QByteArray asciiContent = mFileContent.toAscii();
-    mTextEdit->setPlainText(QString(asciiContent));
-}
-
-void FbEditorView::displayInHex()
-{
-    QByteArray asciiContent = mFileContent.toAscii().toHex();
-    QString textInHex = QString(asciiContent);
-    mTextEdit->setPlainText(textInHex);
-    mFileHex = true;
-}
-
-void FbEditorView::createMenu()
-{
-    mToTextAction = menu()->addAction("View as text");
-    connect(mToTextAction, SIGNAL(triggered()), this, SLOT(displayInText()));
-    mToHexAction = menu()->addAction("View as hex");
-    connect(mToHexAction, SIGNAL(triggered()), this, SLOT(displayInHex()));
-//    mExitAction = menu()->addAction("Exit");
-//    connect(mExitAction, SIGNAL(triggered()), this, SLOT(backButtonClicked()));
-
-    // update the menus before showing it:
-    connect(menu(), SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
-}
-
-void FbEditorView::updateMenu()
-{
-    mToTextAction->setVisible(mFileHex);
-    mToHexAction->setVisible(!mFileHex);
-}	
-
-void FbEditorView::backButtonClicked()
-{
-    emit finished(false);
-}
-
--- a/filebrowser/ui/src/fbfileentry.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +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 "fbfileentry.h"
-
-#include <HbExtendedLocale>
-
-// ---------------------------------------------------------------------------
-
-FbFileEntry::FbFileEntry(TFileEntry aFileEntry)
-: mFileEntry(aFileEntry)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-FbFileEntry::~FbFileEntry()
-{
-}
-
-// ---------------------------------------------------------------------------
-
-QString FbFileEntry::fullName()
-{
-    return QString::fromUtf16(mFileEntry.iFullName.Ptr(), mFileEntry.iFullName.Length());
-}
-
-// ---------------------------------------------------------------------------
-
-QString FbFileEntry::path()
-{
-    return QString::fromUtf16(mFileEntry.iPath.Ptr(), mFileEntry.iPath.Length());
-}
-
-// ---------------------------------------------------------------------------
-
-int FbFileEntry::attributes()
-{
-    return mFileEntry.iEntry.iAtt;
-}
-
-QString FbFileEntry::attributesString()
-{
-    QString attributesString;
-    if (mFileEntry.iEntry.IsArchive()) {
-        attributesString.append("A");
-    } else {
-        attributesString.append("-");
-    }
-    if (mFileEntry.iEntry.IsHidden()) {
-        attributesString.append("H");
-    } else {
-        attributesString.append("-");
-    }
-    if (mFileEntry.iEntry.IsReadOnly()) {
-        attributesString.append("R");
-    } else {
-        attributesString.append("-");
-    }
-    if (mFileEntry.iEntry.IsSystem()) {
-        attributesString.append("S");
-    } else {
-        attributesString.append("-");
-    }
-
-    return attributesString;
-}
-
-// ---------------------------------------------------------------------------
-
-int FbFileEntry::size()
-{
-    return mFileEntry.iEntry.iSize;
-}
-
-// ---------------------------------------------------------------------------
-
-QString FbFileEntry::sizeString()
-{
-    QString sizeString;
-    if (size() < 1024) {
-        sizeString.append(QString::number(size()));
-        sizeString.append(" B");
-    } else if (size() < 1024*1024) {
-        qreal sizeKB = static_cast<qreal>(size() / 1024);
-        sizeString.append( QString::number(sizeKB, 'f',1));
-        sizeString.append(" kB");
-    } else {
-        qreal sizeMB = static_cast<qreal>(size() / (1024*1024));
-        sizeString.append( QString::number(sizeMB, 'f',1));
-        sizeString.append(" MB");
-    }
-    return sizeString;
-}
-
-// ---------------------------------------------------------------------------
-
-//QDateTime FbFileEntry::modified()
-//{
-//    QDateTime modified;
-//    TTime time1Jan1970UTC = TTime(_L("19700101:000000.000000"));
-//    TTimeIntervalSeconds intervalSeconds;
-//
-//    TTime entryModified = mFileEntry.iEntry.iModified;
-//
-//    TInt err = /*mFileEntry.iEntry.iModified*/ entryModified.SecondsFrom(time1Jan1970UTC, intervalSeconds);
-//    if (err == KErrNone) {
-//        quint32 secsSince1Jan1970UTC = intervalSeconds.Int();
-//        modified = QDateTime::fromTime_t(secsSince1Jan1970UTC);
-//        qDebug() << "QDateTime:: " << modified.toString();
-//        modified.setTimeSpec(Qt::LocalTime);
-//        qDebug() << "QDateTime:: " << modified.toString() << modified.toLocalTime().toString();
-//    }
-//    return modified;
-//}
-
-// ---------------------------------------------------------------------------
-
-QString FbFileEntry::modifiedString()
-{
-    // TODO use HbExtendedLocale to convert date and time
-//    QDateTime modifiedInLocalTime = modified();//.toLocalTime();
-//    HbExtendedLocale locale = HbExtendedLocale::system();
-//    QString date = locale.format(modifiedInLocalTime.date(), r_qtn_date_usual);
-//    QString time = locale.format(modifiedInLocalTime.time(), r_qtn_time_usual);
-//
-//    return date + " " + time;
-    QString modifiedString;
-    TTime entryModified = mFileEntry.iEntry.iModified;
-    RTz Tz;
-    TInt err = Tz.Connect();
-    if ( err == KErrNone && Tz.ConvertToLocalTime( entryModified ) == KErrNone )
-    {
-        entryModified = mFileEntry.iEntry.iModified;
-        TBuf<128> extraData;
-        _LIT(KCurrentDate,"%D%M%*Y%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B");
-        entryModified.FormatL(extraData, KCurrentDate);
-        modifiedString = QString::fromUtf16(extraData.Ptr(), extraData.Length());
-    }
-    Tz.Close();
-
-    return modifiedString;
-}
-
-// ---------------------------------------------------------------------------
-
-//int FbFileEntry::Uid(int id)
-//{
-//    return id;//mFileEntry.iEntry.iType[id];
-//}
-
-// ---------------------------------------------------------------------------
-
-bool FbFileEntry::isDir()
-{
-    return mFileEntry.iEntry.IsDir();
-}
-
-// ---------------------------------------------------------------------------
-
-
-QString FbFileEntry::name()
-{
-    return QString::fromUtf16(mFileEntry.iEntry.iName.Ptr(), mFileEntry.iEntry.iName.Length());
-}
-
-// ---------------------------------------------------------------------------
-
-int FbFileEntry::dirEntries()
-{
-    return mFileEntry.iDirEntries;
-}
-
-// ---------------------------------------------------------------------------
-
-QString FbFileEntry::dirEntriesString()
-{
-    QString dirEntriesString;
-    dirEntriesString.append(QString::number(dirEntries()));
-    if (dirEntries() == 1) {
-        dirEntriesString.append(" entry");
-    } else {
-        dirEntriesString.append(" entries");
-    }
-    return dirEntriesString;
-}
-
-// ---------------------------------------------------------------------------
-
-int FbFileEntry::iconId()
-{
-    return mFileEntry.iIconId;
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbfilelistviewitem.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +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 "fbfilelistviewitem.h"
-
-#include <QString>
-#include <QStringList>
-#include <QGraphicsLinearLayout>
-#include <QRectF>
-#include <QPainter>
-
-#include <hblabel.h>
-#include <hbcheckbox.h>
-#include <hbabstractitemview.h>
-
-FbFileListViewItem::FbFileListViewItem(QGraphicsItem *parent) :
-    HbListViewItem(parent),
-    hLayout(0),
-    mDiskNameLabel(0),
-    mSizeLabel(0),
-    mFreeLabel(0),
-    mIconLabel(0)
-{
-}
-
-FbFileListViewItem::~FbFileListViewItem()
-{
-}
-
-void FbFileListViewItem::polish(HbStyleParameters &params)
-{
-    Q_UNUSED(params);
-}
-
-bool FbFileListViewItem::canSetModelIndex(const QModelIndex &index) const
-{
-    Q_UNUSED(index);
-    return true;
-}
-
-
-HbAbstractViewItem *FbFileListViewItem::createItem()
-{
-    return new FbFileListViewItem(*this);
-}
-
-void FbFileListViewItem::updateChildItems()
-{
-    if(!hLayout) {
-        init();
-    }
-
-    // Qt::DisplayRole
-    QVariant displayRole = modelIndex().data(Qt::DisplayRole);
-    QString diskName("default");
-    QStringList stringList;
-    if (displayRole.isValid()) {
-        if (displayRole.canConvert<QString>()) {                // EFileViewModeSimple
-            stringList.append(displayRole.toString());
-        } else if (displayRole.canConvert<QStringList>()) {     // EFileViewModeExtended
-            stringList = displayRole.toStringList();
-        }
-        if (stringList.count() > 0)
-            diskName = stringList[0]; //modelIndex().data( Qt::UserRole ).toString();
-
-        mDiskNameLabel->setPlainText(diskName/*displayString*/);
-    }
-
-//    mSizeLabel->setPlainText( hbTrId ( "Size: " ) /*+ FmUtils::formatStorageSize( driverInfo.size() )*/ );
-//    mFreeLabel->setPlainText( hbTrId ( "Free: " ) /*+ FmUtils::formatStorageSize( driverInfo.freeSize() )*/ );
-    if (stringList.count() > 1)
-        mSizeLabel->setPlainText( stringList[1] );
-
-    //mStorageSizeDiagram->setFreeSizePercentage();
-    //mFreeLabel->setPlainText( stringList[2] );
-
-    //    mCheckBox->setCheckState( checkState() );
-
-    // Qt::DecorationRole
-    QVariant decorationRole = modelIndex().data(Qt::DecorationRole);
-    if (decorationRole.isValid()) {
-        QIcon icon = qvariant_cast<QIcon>(decorationRole);
-//    if( icon.isNull() ) {
-//        QFileIconProvider fileIconProvider;
-//        icon = fileIconProvider.icon(QFileIconProvider::Drive);
-//    }
-    mIconLabel->setIcon(HbIcon(icon));
-    }
-}
-
-void FbFileListViewItem::setCheckedState(int state)
-{
-    HbAbstractViewItem::setCheckState(static_cast<Qt::CheckState>(state));
-}
-
-void FbFileListViewItem::init()
-{
-    hLayout = new QGraphicsLinearLayout();
-
-    hLayout->setOrientation( Qt::Horizontal );
-    hLayout->addItem(layout());
-
-    mIconLabel = new HbLabel();
-    hLayout->addItem( mIconLabel );
-    hLayout->setAlignment( mIconLabel, Qt::AlignTop );
-    hLayout->setStretchFactor( mIconLabel, 0 );
-
-//    mStorageSizeDiagram = new FbDriveStorageSizeDiagram(this);
-//    hLayout->addItem( mStorageSizeDiagram );
-//    hLayout->setAlignment( mIconLabel, Qt::AlignTop );
-//    hLayout->setStretchFactor( mStorageSizeDiagram, 0 );
-
-    QGraphicsLinearLayout *vLayout = new QGraphicsLinearLayout();
-    vLayout->setOrientation( Qt::Vertical );
-
-    mDiskNameLabel = new HbLabel();
-    //HbFontSpec fontSpecPrimary(HbFontSpec::Primary);
-    //fontSpecPrimary.setTextHeight(18.0);
-    //mDiskNameLabel->setFontSpec( fontSpecPrimary );
-    vLayout->addItem( mDiskNameLabel );
-    vLayout->setAlignment( mDiskNameLabel, Qt::AlignLeft );
-
-    mSizeLabel = new HbLabel();
-    //HbFontSpec fontSpecSecondary(HbFontSpec::Secondary);
-    //fontSpecSecondary.setTextHeight(18.0);
-    //mSizeLabel->setFontSpec(fontSpecSecondary);
-    vLayout->addItem( mSizeLabel );
-    vLayout->setAlignment(mSizeLabel, Qt::AlignLeft);
-
-//    mFreeLabel = new HbLabel();
-//    mFreeLabel->setFontSpec( HbFontSpec( HbFontSpec::Secondary ) );
-//    vLayout->addItem( mFreeLabel );
-//    vLayout->setAlignment( mFreeLabel, Qt::AlignLeft );
-
-    HbWidget *labelsWidget = new HbWidget();
-    labelsWidget->setLayout(vLayout);
-
-    hLayout->setAlignment( labelsWidget, Qt::AlignLeft );
-
-    hLayout->addItem( labelsWidget );
-    hLayout->setStretchFactor( labelsWidget, 1 );
-
-//    this->setMaximumHeight(80);
-
-    setLayout( hLayout );
-}
--- a/filebrowser/ui/src/fbfilemodel.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +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 "fbfilemodel.h"
-#include "enginewrapper.h"
-#include "fbfileentry.h"
-#include "filebrowsersettings.h"
-#include "FB.hrh"
-
-#include <QModelIndex>
-#include <QFileIconProvider>
-
-/**
-  Constructs a file browser custom system model with the given \a engineWrapper and \a parent.
-  */
-FbFileModel::FbFileModel(EngineWrapper *engineWrapper, QObject *parent) :
-    QAbstractListModel(parent),
-    mEngineWrapper(engineWrapper),
-    mFileIconProvider(0)
-{
-    mFileIconProvider = new QFileIconProvider();
-}
-
-/**
-  Destroys this file browser custom system model.
-  */
-FbFileModel::~FbFileModel()
-{  
-    if (mFileIconProvider) {
-        delete mFileIconProvider;
-    }
-}
-
-/**
-  \reimp
-  */
-int FbFileModel::rowCount(const QModelIndex &parent) const
-{
-    Q_UNUSED(parent);
-    return mEngineWrapper->itemCount();
-}
-
-/**
-  \reimp
-  */
-QVariant FbFileModel::data(const QModelIndex &index, int role) const
-{
-    if (!index.isValid() || index.model() != this)
-        return QVariant();
-
-    switch (role) {
-    case Qt::EditRole:
-    case Qt::DisplayRole: {
-            QStringList listItem;
-            FbFileEntry fileEntry(mEngineWrapper->getFileEntry(index));
-            if (mEngineWrapper->settings().fileViewMode() == EFileViewModeSimple)
-            {
-                listItem /*<< fileEntry.IconId()*/
-                        << fileEntry.name();
-            } else if (mEngineWrapper->settings().fileViewMode() == EFileViewModeExtended) {
-                QString extraData;
-                extraData.append(fileEntry.modifiedString());
-                if (fileEntry.isDir() && fileEntry.dirEntries() >= 0) {
-                    extraData.append(" - ");
-                    extraData.append(fileEntry.dirEntriesString());
-                } else if (!fileEntry.isDir()) {
-                    extraData.append(" - ");
-                    extraData.append(fileEntry.sizeString());
-                }
-                listItem /*<< fileEntry.IconId()*/
-                        << fileEntry.name() << extraData << fileEntry.attributesString();
-            }
-            return listItem;
-        }
-    case Qt::DecorationRole: {
-            if (mEngineWrapper) {
-                QIcon icon;
-                    FbFileEntry fileEntry(mEngineWrapper->getFileEntry(index));
-                    if (fileEntry.isDir()) {
-                        icon = mFileIconProvider->icon(QFileIconProvider::Folder);
-                    } else {
-                        icon = mFileIconProvider->icon(QFileIconProvider::File);
-                    }
-//                }
-                return QVariant(icon);
-            }
-        }
-    }
-
-    return QVariant();
-}
-
-/**
-  \reimp
-  */
-QVariant FbFileModel::headerData(int section, Qt::Orientation orientation, int role) const
-{
-    Q_UNUSED(section)
-    Q_UNUSED(orientation)
-    Q_UNUSED(role)
-
-    // TODO, implement or remove
-    return QVariant();
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbfileview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1598 +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 "fbfileview.h"
-#include "fbsettingsview.h"
-#include "fbeditorview.h"
-#include "fbsearchview.h"
-#include "enginewrapper.h"
-#include "notifications.h"
-#include "fbfolderselectiondialog.h"
-#include "fbfilemodel.h"
-#include "filebrowsersortfilterproxymodel.h"
-//#include "fbfilelistviewitem.h"
-
-#include <HbMenu>
-#include <HbPopup>
-#include <HbView>
-#include <HbMessageBox>
-#include <HbAction>
-#include <HbLabel>
-#include <HbListView>
-#include <HbListViewItem>
-#include <HbListWidget>
-#include <HbLineEdit>
-#include <HbAbstractViewItem>
-#include <HbSelectionDialog>
-#include <HbValidator>
-#include <HbInputDialog>
-#include <HbToolBar>
-#include <HbToolBarExtension>
-#include <HbSearchPanel>
-
-#include <QString>
-#include <QGraphicsLinearLayout>
-#include <QItemSelection>
-#include <QDebug>
-//TODO check if needed to do this way
-#include <FB.hrh>
-
-// ---------------------------------------------------------------------------
-
-FbFileView::FbFileView() :
-    mEngineWrapper(0),
-    mListView(0),
-    mToolBar(0),
-    mNaviPane(0),
-    mSearchPanel(0),
-    mMainLayout(0),
-    mFbFileModel(0),
-    mSortFilterProxyModel(0),
-    mOptionMenuActions(),
-    mContextMenuActions(),
-    mContextMenu(0),
-    mToolbarBackAction(0),
-    mToolbarFilterAction(0),
-    mToolbarPasteAction(0),
-    mItemHighlighted(false),
-    mLocationChanged(false),
-    mRemoveFileAfterCopied(false),
-//    mClipBoardInUse(false),
-    mFolderContentChanged(false),
-    mCurrentIndex(),
-    mOldPassword(),
-    mPanicCategory(),
-    mAbsoluteFilePath(),
-    mOverwriteOptions(),
-    mModelIndex(),
-    mNewFileName(),
-    mProceed(false),
-    mEraseMBR(false)
-{
-    setTitle("File Browser");
-
-    createMenu();
-    createContextMenu();
-    createToolBar();
-}
-
-// ---------------------------------------------------------------------------	
-
-void FbFileView::init(EngineWrapper *engineWrapper)
-{
-    mEngineWrapper = engineWrapper;
-
-    mListView = new HbListView(this);
-    mListView->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
-
-//    mListView->setItemPrototype(new FbDiskListViewItem(mListView));
-
-    mFbFileModel = new FbFileModel(mEngineWrapper);
-    if (!mListView->model()) {
-
-        mEngineWrapper->refreshView();
-
-        mSortFilterProxyModel = new FileBrowserSortFilterProxyModel(this);
-        mSortFilterProxyModel->setSourceModel(mFbFileModel);
-        mSortFilterProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
-        mSearchPanel->setPlaceholderText(QString("Type filter criteria"));
-
-        mListView->setModel(mSortFilterProxyModel);
-    }
-
-    //mListView->setRootIndex(mFileSystemModel->index(startPath));
-    //mListView->setRootIndex(model->index());
-
-    //setItemVisible(Hb::ToolBarItem, !mEngineWrapper->isDriveListViewActive());
-//    mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
-
-    connect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
-    connect(mListView, SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
-            this, SLOT(onLongPressed(HbAbstractViewItem*, QPointF)));
-    connect(mEngineWrapper, SIGNAL(fileSystemDataChanged()), this, SLOT(refreshList()));
-
-    mNaviPane = new HbLabel(this);
-    mNaviPane->setPlainText(QString(" ")); // TODO get from settings or default
-    //mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
-    HbFontSpec fontSpec(HbFontSpec::PrimarySmall);
-    mNaviPane->setFontSpec(fontSpec);
-
-    // Create layout and add list view and toolbar into layout:
-    mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
-    mMainLayout->addItem(mNaviPane);
-    mMainLayout->addItem(mListView);
-    setLayout(mMainLayout);
-}
-
-// ---------------------------------------------------------------------------
-
-FbFileView::~FbFileView()
-{  
-//    if (mEngineWrapper) {
-//        delete mEngineWrapper;
-//    }
-    if (mContextMenu) {
-        mContextMenu->deleteLater();
-    }
-
-    delete mSortFilterProxyModel;
-    delete mFbFileModel;
-    delete mListView;
-    delete mToolBar;
-}
-
-/**
-  Initial setup for options menu.
-  Dynamic menu update during the runtime is performed by updateOptionMenu() which
-  to menu's aboutToShow() signal.
-  */
-void FbFileView::createMenu()
-{
-    createFileMenu();
-    createEditMenu();
-    createViewMenu();
-    createToolsMenu();
-
-    createSelectionMenuItem();
-    createSettingsMenuItem();
-    createAboutMenuItem();
-    createExitMenuItem();
-
-    // menu dynamic update
-    connect(menu(), SIGNAL(aboutToShow()), this, SLOT(updateOptionMenu()));
-}
-
-/**
-  Initial setup for File submenu
-  */
-void FbFileView::createFileMenu()
-{
-    mOptionMenuActions.mFileMenu = menu()->addMenu("File");
-
-    mOptionMenuActions.mFileBackMoveUp = mOptionMenuActions.mFileMenu->addAction("Back/Move up", this, SLOT(fileBackMoveUp()));
-    mOptionMenuActions.mFileSearch = mOptionMenuActions.mFileMenu->addAction("Search...", this, SLOT(fileSearch()));
-
-    mOptionMenuActions.mFileNewMenu = mOptionMenuActions.mFileMenu->addMenu("New");
-    mOptionMenuActions.mFileNewFile = mOptionMenuActions.mFileNewMenu->addAction("File", this, SLOT(fileNewFile()));
-    mOptionMenuActions.mFileNewDirectory = mOptionMenuActions.mFileNewMenu->addAction("Directory", this, SLOT(fileNewDirectory()));
-
-    mOptionMenuActions.mFileDelete = mOptionMenuActions.mFileMenu->addAction("Delete", this, SLOT(fileDelete()));
-    mOptionMenuActions.mFileRename = mOptionMenuActions.mFileMenu->addAction("Rename", this, SLOT(fileRename()));
-    mOptionMenuActions.mFileTouch = mOptionMenuActions.mFileMenu->addAction("Touch", this, SLOT(fileTouch()));
-
-    mOptionMenuActions.mFileSetAttributes = mOptionMenuActions.mFileMenu->addAction("Set attributes...", this, SLOT(fileSetAttributes()));
-}
-
-/**
-  Initial setup for Edit submenu
-  */
-void FbFileView::createEditMenu()
-{
-    mOptionMenuActions.mEditMenu = menu()->addMenu("Edit");
-
-    mOptionMenuActions.mEditSnapShotToE = mOptionMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
-    mOptionMenuActions.mEditSnapShotToE->setVisible(false);
-    mOptionMenuActions.mEditCut = mOptionMenuActions.mEditMenu->addAction("Cut", this, SLOT(editCut()));
-    mOptionMenuActions.mEditCopy = mOptionMenuActions.mEditMenu->addAction("Copy", this, SLOT(editCopy()));
-    mOptionMenuActions.mEditPaste = mOptionMenuActions.mEditMenu->addAction("Paste", this, SLOT(editPaste()));
-
-    mOptionMenuActions.mEditCopyToFolder = mOptionMenuActions.mEditMenu->addAction("Copy to folder...", this, SLOT(editCopyToFolder()));
-    mOptionMenuActions.mEditMoveToFolder = mOptionMenuActions.mEditMenu->addAction("Move to folder...", this, SLOT(editMoveToFolder()));
-
-    mOptionMenuActions.mEditSelect = mOptionMenuActions.mEditMenu->addAction("Select", this, SLOT(editSelect()));
-    mOptionMenuActions.mEditUnselect = mOptionMenuActions.mEditMenu->addAction("Unselect", this, SLOT(editUnselect()));
-    mOptionMenuActions.mEditSelectAll = mOptionMenuActions.mEditMenu->addAction("Select all", this, SLOT(editSelectAll()));
-    mOptionMenuActions.mEditUnselectAll = mOptionMenuActions.mEditMenu->addAction("Unselect all", this, SLOT(editUnselectAll()));
-}
-
-/**
-  Initial setup for View submenu
-  */
-void FbFileView::createViewMenu()
-{
-    mOptionMenuActions.mViewMenu = menu()->addMenu("View");
-    //mOptionMenuActions.mViewMenu->menuAction()->setVisible(false);
-
-    mOptionMenuActions.mViewFilterEntries = mOptionMenuActions.mViewMenu->addAction("Filter entries", this, SLOT(viewFilterEntries()));
-    mOptionMenuActions.mViewRefresh = mOptionMenuActions.mViewMenu->addAction("Refresh", this, SLOT(viewRefresh()));
-}
-
-/**
-  Initial setup for Tools submenu
-  */
-void FbFileView::createToolsMenu()
-{
-    mOptionMenuActions.mToolsMenu = menu()->addMenu("Tools");
-
-    mOptionMenuActions.mToolsAllAppsToTextFile = mOptionMenuActions.mToolsMenu->addAction("All apps to a text file", this, SLOT(toolsAllAppsToTextFile()));
-    mOptionMenuActions.mToolsAllAppsToTextFile->setVisible(false);
-    mOptionMenuActions.mToolsAllFilesToTextFile = mOptionMenuActions.mToolsMenu->addAction("All files to a text file", this, SLOT(toolsAllFilesToTextFile()));
-    //mOptionMenuActions.mToolsAllFilesToTextFile->setVisible(false);
-
-//    mOptionMenuActions.mToolsAvkonIconCacheMenu = mOptionMenuActions.mToolsMenu->addMenu("Avkon icon cache");
-//    mOptionMenuActions.mToolsAvkonIconCacheMenu->menuAction()->setVisible(false);
-//    mOptionMenuActions.mToolsAvkonIconCacheEnable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Enable", this, SLOT(toolsAvkonIconCacheEnable()));
-//    mOptionMenuActions.mToolsAvkonIconCacheDisable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Clear and disable", this, SLOT(toolsAvkonIconCacheDisable()));
-
-    mOptionMenuActions.mToolsDisableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Disable extended errors", this, SLOT(toolsDisableExtendedErrors()));
-    mOptionMenuActions.mToolsDumpMsgStoreWalk = mOptionMenuActions.mToolsMenu->addAction("Dump msg. store walk", this, SLOT(toolsDumpMsgStoreWalk()));
-    mOptionMenuActions.mToolsDumpMsgStoreWalk->setVisible(false);
-    mOptionMenuActions.mToolsEditDataTypes = mOptionMenuActions.mToolsMenu->addAction("Edit data types", this, SLOT(toolsEditDataTypes()));
-    mOptionMenuActions.mToolsEditDataTypes->setVisible(false);
-    mOptionMenuActions.mToolsEnableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Enable extended errors", this, SLOT(toolsEnableExtendedErrors()));
-
-    mOptionMenuActions.mToolsErrorSimulateMenu = mOptionMenuActions.mToolsMenu->addMenu("Error simulate");
-    mOptionMenuActions.mToolsErrorSimulateLeave = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Leave", this, SLOT(toolsErrorSimulateLeave()));
-    mOptionMenuActions.mToolsErrorSimulatePanic = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Panic", this, SLOT(toolsErrorSimulatePanic()));
-    mOptionMenuActions.mToolsErrorSimulatePanic->setVisible(false);
-    mOptionMenuActions.mToolsErrorSimulateException = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Exception", this, SLOT(toolsErrorSimulateException()));
-
-//    mOptionMenuActions.mLocalConnectivityMenu = mOptionMenuActions.mToolsMenu->addMenu("Local connectivity");
-//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared = mOptionMenuActions.mLocalConnectivityMenu->addAction("Activate infrared", this, SLOT(toolsLocalConnectivityActivateInfrared()));
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch BT UI", this, SLOT(toolsLocalConnectivityLaunchBTUI()));
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch USB UI", this, SLOT(toolsLocalConnectivityLaunchUSBUI()));
-
-    mOptionMenuActions.mToolsMessageAttachmentsMenu = mOptionMenuActions.mToolsMenu->addMenu("Message attachments");
-    mOptionMenuActions.mToolsMessageAttachmentsMenu->menuAction()->setVisible(false);
-    mOptionMenuActions.mToolsMessageInbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Inbox", this, SLOT(toolsMessageInbox()));
-    mOptionMenuActions.mToolsMessageDrafts = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Drafts", this, SLOT(toolsMessageDrafts()));
-    mOptionMenuActions.mToolsMessageSentItems = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Sent items", this, SLOT(toolsMessageSentItems()));
-    mOptionMenuActions.mToolsMessageOutbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Outbox", this, SLOT(toolsMessageOutbox()));
-
-    mOptionMenuActions.mToolsMemoryInfo = mOptionMenuActions.mToolsMenu->addAction("Memory info", this, SLOT(toolsMemoryInfo()));
-    mOptionMenuActions.mToolsMemoryInfo->setVisible(false);
-
-    mOptionMenuActions.mToolsSecureBackupMenu = mOptionMenuActions.mToolsMenu->addMenu("Secure backup");
-    mOptionMenuActions.mToolsSecureBackupMenu->menuAction()->setVisible(false);
-    mOptionMenuActions.mToolsSecureBackStart = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start backup", this, SLOT(toolsSecureBackStart()));
-    mOptionMenuActions.mToolsSecureBackRestore = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start restore", this, SLOT(toolsSecureBackRestore()));
-    mOptionMenuActions.mToolsSecureBackStop = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Stop", this, SLOT(toolsSecureBackStop()));
-
-    mOptionMenuActions.mToolsSetDebugMask = mOptionMenuActions.mToolsMenu->addAction("Set debug mask", this, SLOT(toolsSetDebugMaskQuestion()));
-    mOptionMenuActions.mToolsShowOpenFilesHere = mOptionMenuActions.mToolsMenu->addAction("Show open files here", this, SLOT(toolsShowOpenFilesHere()));
-    mOptionMenuActions.mToolsShowOpenFilesHere->setVisible(false);
-}
-
-/**
-  Creates Selection mode menu item in option menu
-  */
-void FbFileView::createSelectionMenuItem()
-{
-    if (!mOptionMenuActions.mSelection) {
-        mOptionMenuActions.mSelection = menu()->addAction("Selection mode");
-        mOptionMenuActions.mSelection->setToolTip("Selection mode");
-        mOptionMenuActions.mSelection->setCheckable(true);
-        connect(mOptionMenuActions.mSelection, SIGNAL(triggered()), this, SLOT(selectionModeChanged()));
-    }
-}
-
-/**
-  Creates Setting menu item in option menu
-  */
-void FbFileView::createSettingsMenuItem()
-{
-    mOptionMenuActions.mSetting = menu()->addAction("Settings...");
-    connect(mOptionMenuActions.mSetting, SIGNAL(triggered()), this, SIGNAL(aboutToShowSettingsView()));
-}
-
-
-/**
-  Creates About menu item in option menu
-  */
-void FbFileView::createAboutMenuItem()
-{
-    // about note
-    mOptionMenuActions.mAbout = menu()->addAction("About");
-    connect(mOptionMenuActions.mAbout, SIGNAL(triggered()), this, SLOT(about()));
-}
-
-/**
-  Creates Exit menu item in option menu
-  */
-void FbFileView::createExitMenuItem()
-{
-    // application exit
-    mOptionMenuActions.mExit = menu()->addAction("Exit");
-    connect(mOptionMenuActions.mExit, SIGNAL(triggered()), qApp, SLOT(quit()));
-}
-
-/**
-  update menu: disk admin available only in device root view. edit available only in folder view
-  when file or folder content exist in current folder, or clipboard has copied item.
-  file and view menus updated every time regarding the folder content.
-  tools, settings, about, exit always available.
-  If there's remove and add operations at same time, always remove first
-  to keep to the correct menu items order.
-  */
-void FbFileView::updateOptionMenu()
-{
-    bool isFileItemListEmpty = mFbFileModel->rowCount() == 0;
-    bool isNormalModeActive = true;       //iModel->FileUtils()->IsNormalModeActive();
-    bool isCurrentDriveReadOnly = mEngineWrapper->isCurrentDriveReadOnly();   //iModel->FileUtils()->IsCurrentDriveReadOnly();
-    // bool isCurrentItemDirectory = mEngineWrapper->getFileEntry(currentItemIndex()).isDir();
-    // bool currentSelected = true;    //iContainer->ListBox()->View()->ItemIsSelected(iContainer->ListBox()->View()->CurrentItemIndex());
-    bool isAllSelected = mListView->selectionModel()->selection().count() == mFbFileModel->rowCount();
-    //bool isNoneSelected = mListView->selectionModel()->selection().count() != 0;
-    bool hasSelectedItems = mListView->selectionModel()->selection().count() != 0;
-    bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
-    bool isClipBoardEmpty = !mEngineWrapper->isClipBoardListInUse();
-    //bool showSnapShot = false;           //iModel->FileUtils()->DriveSnapShotPossible();
-
-    bool showEditMenu(true);
-    if (isFileItemListEmpty && isClipBoardEmpty)
-        showEditMenu = false;
-    else
-        showEditMenu = true;
-
-    mOptionMenuActions.mEditMenu->menuAction()->setVisible(showEditMenu);
-
-    //mOptionMenuActions.mFileBackMoveUp->setVisible( !isDriveListViewActive);
-
-    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileView, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory);
-    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileEdit, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory);
-    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileSendTo, isFileItemListEmpty || driveListActive || isCurrentItemDirectory);
-
-    mOptionMenuActions.mFileNewMenu->menuAction()->setVisible(!isCurrentDriveReadOnly);
-    mOptionMenuActions.mFileDelete->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems/*isSelectionMode*/);
-    mOptionMenuActions.mFileRename->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems /*&& !isSelectionMode*/);
-    mOptionMenuActions.mFileTouch->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems);
-
-    mOptionMenuActions.mFileSetAttributes->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems);
-    // TODO mOptionMenuActions.mFileCompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory));
-    // TODO mOptionMenuActions.mFileDecompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory));
-
-    mOptionMenuActions.mEditMenu->menuAction()->setVisible( (!isSelectionMode && !isClipBoardEmpty && !isCurrentDriveReadOnly)
-                                                            || (isSelectionMode));
-    mOptionMenuActions.mEditCut->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && isSelectionMode && hasSelectedItems);
-    mOptionMenuActions.mEditCopy->setVisible(!isFileItemListEmpty && isSelectionMode && hasSelectedItems);
-    mOptionMenuActions.mEditPaste->setVisible(!isClipBoardEmpty && !isCurrentDriveReadOnly);
-    mOptionMenuActions.mEditCopyToFolder->setVisible(!isFileItemListEmpty && isSelectionMode && hasSelectedItems);
-    mOptionMenuActions.mEditMoveToFolder->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && isSelectionMode && hasSelectedItems);
-
-    mOptionMenuActions.mEditSelect->setVisible(false/*!currentSelected && !isFileItemListEmpty*/);
-    mOptionMenuActions.mEditUnselect->setVisible(false/*currentSelected && !isFileItemListEmpty*/);
-    mOptionMenuActions.mEditSelectAll->setVisible(!isFileItemListEmpty && isSelectionMode && !isAllSelected);
-    mOptionMenuActions.mEditUnselectAll->setVisible(!isFileItemListEmpty && hasSelectedItems);
-
-    // TODO mOptionMenuActions.mViewSort->setVisible(!(!isNormalModeActive || isFileItemListEmpty));
-    // TODO mOptionMenuActions.mViewOrder->setVisible(!(!isNormalModeActive  || isFileItemListEmpty));
-    mOptionMenuActions.mViewRefresh->setVisible(isNormalModeActive);
-    mOptionMenuActions.mViewFilterEntries->setVisible(!isFileItemListEmpty);
-
-    // TODO R_FILEBROWSER_VIEW_SORT_SUBMENU
-    // aMenuPane->SetItemButtonState(iModel->FileUtils()->SortMode(), EEikMenuItemSymbolOn);
-
-    // TODO R_FILEBROWSER_VIEW_ORDER_SUBMENU
-    // aMenuPane->SetItemButtonState(iModel->FileUtils()->OrderMode(), EEikMenuItemSymbolOn);
-
-    // aResourceId == R_FILEBROWSER_TOOLS_SUBMENU
-    bool noExtendedErrorsAllowed = mEngineWrapper->ErrRdFileExists();
-    mOptionMenuActions.mToolsDisableExtendedErrors->setVisible(noExtendedErrorsAllowed);
-    mOptionMenuActions.mToolsEnableExtendedErrors->setVisible(!noExtendedErrorsAllowed);
-
-//    bool infraRedAllowed = mEngineWrapper->FileExists(KIRAppPath);
-//    bool bluetoothAllowed = mEngineWrapper->FileExists(KBTAppPath);
-//    bool usbAllowed = mEngineWrapper->FileExists(KUSBAppPath);
-//
-//    bool noLocalCon = !infraRedAllowed && !bluetoothAllowed && !usbAllowed;
-//    mOptionMenuActions.mToolsLocalConnectivityMenu->menuAction()->setVisible(!noLocalCon);
-//
-//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared->setVisible(infraRedAllowed);
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI->setVisible(bluetoothAllowed);
-//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI->setVisible(usbAllowed);
-}
-
-void FbFileView::createContextMenu()
-{
-    mContextMenu = new HbMenu();
-    connect(mContextMenu, SIGNAL(aboutToShow()), this, SLOT(updateContextMenu()));
-
-    createFileContextMenu();
-    createEditContextMenu();
-    createViewContextMenu();
-}
-
-
-void FbFileView::createFileContextMenu()
-{
-    mContextMenuActions.mFileMenu = mContextMenu->addMenu("File");
-
-    //mContextMenuActions.mFileBackMoveUp = mContextMenuActions.mFileMenu->addAction("Back/Move up (<-)", this, SLOT(fileBackMoveUp()));
-//    mContextMenuActions.mFileOpenDirectory = mContextMenuActions.mFileMenu->addAction("Open directory (->)", this, SLOT(fileOpenDirectory()));
-    mContextMenuActions.mFileOpenDirectory = mContextMenu->addAction("Open directory (->)", this, SLOT(fileOpenDirectory()));
-    mContextMenuActions.mSearch = mContextMenu->addAction("Search...", this, SLOT(fileSearch()));
-    mContextMenuActions.mFileSearch = mContextMenuActions.mFileMenu->addAction("Search...", this, SLOT(fileSearch()));
-
-    mContextMenuActions.mFileDelete = mContextMenuActions.mFileMenu->addAction("Delete", this, SLOT(fileDelete()));
-    mContextMenuActions.mFileRename = mContextMenuActions.mFileMenu->addAction("Rename", this, SLOT(fileRename()));
-    mContextMenuActions.mFileTouch = mContextMenuActions.mFileMenu->addAction("Touch", this, SLOT(fileTouch()));
-    mContextMenuActions.mFileProperties = mContextMenuActions.mFileMenu->addAction("Properties", this, SLOT(fileProperties()));
-
-    mContextMenuActions.mFileChecksumsMenu = mContextMenuActions.mFileMenu->addMenu("Checksums");
-    mContextMenuActions.mFileChecksumsMD5 = mContextMenuActions.mFileChecksumsMenu->addAction("MD5", this, SLOT(fileChecksumsMD5()));
-    mContextMenuActions.mFileChecksumsMD2 = mContextMenuActions.mFileChecksumsMenu->addAction("MD2", this, SLOT(fileChecksumsMD2()));
-    mContextMenuActions.mFileChecksumsSHA1 = mContextMenuActions.mFileChecksumsMenu->addAction("SHA-1", this, SLOT(fileChecksumsSHA1()));
-
-    mContextMenuActions.mFileSetAttributes = mContextMenuActions.mFileMenu->addAction("Set attributes...", this, SLOT(fileSetAttributes()));
-}
-
-void FbFileView::createEditContextMenu()
-{
-    mContextMenuActions.mEditMenu = mContextMenu->addMenu("Edit");
-
-    //mContextMenuActions.mEditSnapShotToE = mContextMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
-//    mContextMenuActions.mEditSnapShotToE->setVisible(false);
-    mContextMenuActions.mEditCut = mContextMenuActions.mEditMenu->addAction("Cut", this, SLOT(editCut()));
-    mContextMenuActions.mEditCopy = mContextMenuActions.mEditMenu->addAction("Copy", this, SLOT(editCopy()));
-    mContextMenuActions.mEditPaste = mContextMenuActions.mEditMenu->addAction("Paste", this, SLOT(editPaste()));
-
-    mContextMenuActions.mEditCopyToFolder = mContextMenuActions.mEditMenu->addAction("Copy to folder...", this, SLOT(editCopyToFolder()));
-    mContextMenuActions.mEditMoveToFolder = mContextMenuActions.mEditMenu->addAction("Move to folder...", this, SLOT(editMoveToFolder()));
-}
-
-void FbFileView::createViewContextMenu()
-{
-
-}
-
-void FbFileView::updateContextMenu()
-{
-    bool isFileItemListEmpty = mFbFileModel->rowCount() == 0;
-//    bool isNormalModeActive = true;       //iModel->FileUtils()->IsNormalModeActive();
-    bool isCurrentDriveReadOnly = mEngineWrapper->isCurrentDriveReadOnly();
-    bool isCurrentItemDirectory = mEngineWrapper->getFileEntry(currentItemIndex()).isDir();
-    bool hasSelectedItems = mListView->selectionModel()->selection().count() != 0;
-    bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
-    bool isClipBoardEmpty = !mEngineWrapper->isClipBoardListInUse();
-
-    mContextMenuActions.mFileOpenDirectory->setVisible(!isFileItemListEmpty && isCurrentItemDirectory && isSelectionMode);
-    mContextMenuActions.mSearch->setVisible(!isFileItemListEmpty && isSelectionMode && isCurrentItemDirectory);
-    mContextMenuActions.mFileSearch->setVisible(!isFileItemListEmpty && !isSelectionMode && isCurrentItemDirectory);
-    // File submenu
-    //mContextMenuActions.mFileBackMoveUp->setVisible();
-    mContextMenuActions.mFileMenu->menuAction()->setVisible(!isSelectionMode);
-
-    mContextMenuActions.mFileDelete->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly);
-    mContextMenuActions.mFileRename->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && !isSelectionMode);
-    mContextMenuActions.mFileTouch->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly);
-    mContextMenuActions.mFileProperties->setVisible(!isFileItemListEmpty && !isSelectionMode);
-
-    mContextMenuActions.mFileChecksumsMenu->menuAction()->setVisible(!isFileItemListEmpty && !isSelectionMode && !isCurrentItemDirectory);
-
-    // Edit submenu
-    mContextMenuActions.mEditMenu->menuAction()->setVisible(!isSelectionMode);
-    mContextMenuActions.mEditCut->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty));
-    mContextMenuActions.mEditCopy->setVisible(!(isFileItemListEmpty));
-    mContextMenuActions.mEditPaste->setVisible(!isClipBoardEmpty && !isCurrentDriveReadOnly);
-    mContextMenuActions.mEditCopyToFolder->setVisible(!isFileItemListEmpty);
-    mContextMenuActions.mEditMoveToFolder->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty));
-}
-
-// ---------------------------------------------------------------------------
-
-void FbFileView::onLongPressed(HbAbstractViewItem *listViewItem, QPointF coords)
-{
-    QModelIndex proxyIndex = listViewItem->modelIndex();
-    //map to source model
-    mCurrentIndex = mSortFilterProxyModel->mapToSource(proxyIndex);
-
-    mContextMenu->setPreferredPos(coords);
-    mContextMenu->show();
-}
-
-/**
-  Create a file browser tool bar
-  */
-void FbFileView::createToolBar()
-{
-    mToolBar = toolBar();
-
-    mToolbarBackAction = new HbAction(mToolBar);
-    mToolbarBackAction->setToolTip("Back");
-    mToolbarBackAction->setIcon(HbIcon(QString(":/qgn_indi_tb_filebrowser_folder_parent.svg")));
-    connect(mToolbarBackAction, SIGNAL(triggered()), this, SLOT(fileBackMoveUp()));
-    mToolBar->addAction(mToolbarBackAction);
-
-    // Find button and its extension
-    HbToolBarExtension* filterExtension = new HbToolBarExtension();
-    // Set search panel widget
-    mSearchPanel = new HbSearchPanel(filterExtension);
-    mSearchPanel->setMinimumWidth( 360 ); // TODO should be based on layout, screen width
-    connect(mSearchPanel, SIGNAL(criteriaChanged(const QString &)), this, SLOT(filterCriteriaChanged(const QString &)));
-    connect(mSearchPanel, SIGNAL(exitClicked()), filterExtension, SLOT(close()));
-    connect(mSearchPanel, SIGNAL(exitClicked()), this, SLOT(clearFilterCriteria()));
-    filterExtension->setContentWidget(mSearchPanel);
-
-    mToolbarFilterAction = mToolBar->addExtension(filterExtension);
-    mToolbarFilterAction->setToolTip("Filter");
-    mToolbarFilterAction->setIcon(HbIcon(QString(":/qgn_indi_tb_filebrowser_find.svg")));
-    //connect(mToolbarFilterAction, SIGNAL(triggered()), this, SLOT(viewFilterEntries()));
-
-    if (mOptionMenuActions.mSelection) {
-        // TODO Selection mode icon to be added
-        //mOptionMenuActions.mSelection->setIcon(HbIcon(QString(":/qgn_indi_tb_filebrowser_selection_active.svg")));
-        mToolBar->addAction(mOptionMenuActions.mSelection);
-    }
-
-    mToolbarPasteAction = new HbAction(mToolBar);
-    mToolbarPasteAction->setText("Paste");
-    mToolbarPasteAction->setToolTip("Paste");
-    // TODO Paste icon to be added
-    //mToolbarPasteAction->setIcon(HbIcon(QString(":/qgn_indi_tb_filebrowser_folder_parent.svg")));
-    connect(mToolbarPasteAction, SIGNAL(triggered()), this, SLOT(editPaste()));
-    mToolBar->addAction(mToolbarPasteAction);
-    mToolbarPasteAction->setEnabled(false);
-}
-
-/**
-  Refresh FileBrowser view
-  */
-void FbFileView::refreshList()
-{
-    editUnselectAll();
-    mEngineWrapper->refreshView();
-    mSearchPanel->setCriteria(QString(""));
-    mListView->reset();
-
-    if (mListView->model() && mListView->model()->rowCount() > 0) {
-        QModelIndex firstIndex = mListView->model()->index(0, 0);
-        mListView->scrollTo(firstIndex);
-    }
-
-    mToolbarPasteAction->setEnabled(mEngineWrapper->isClipBoardListInUse());
-
-    TListingMode listingMode = mEngineWrapper->listingMode();
-    if (listingMode == ENormalEntries)
-        mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
-    else if (listingMode == ESearchResults)
-        mNaviPane->setPlainText(QString(tr("Search results")));
-    else if (listingMode == EOpenFiles)
-        mNaviPane->setPlainText(QString(tr("Open files")));
-    else if (listingMode == EMsgAttachmentsInbox)
-        mNaviPane->setPlainText(QString(tr("Attachments in Inbox")));
-    else if (listingMode == EMsgAttachmentsDrafts)
-        mNaviPane->setPlainText(QString(tr("Attachments in Drafts")));
-    else if (listingMode == EMsgAttachmentsSentItems)
-        mNaviPane->setPlainText(QString(tr("Attachments in Sent Items")));
-    else if (listingMode == EMsgAttachmentsOutbox)
-        mNaviPane->setPlainText(QString(tr("Attachments in Outbox")));
-}
-
-// ---------------------------------------------------------------------------	
-
-void FbFileView::fileOpen(HbAction *action)
-{
-//    Q_UNUSED(action);
-    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
-    if(!action && dlg && dlg->selectedItems().count()){
-        int selectionIndex = dlg->selectedItems().at(0).toInt();
-
-        if (selectionIndex == 0) {
-            // open editor view
-            emit aboutToShowEditorView(mAbsoluteFilePath, true);
-        } else if (selectionIndex == 1) {
-            // AppArc
-            mEngineWrapper->openAppArc(mAbsoluteFilePath);
-        } else {
-            // DocHandler
-            mEngineWrapper->openDocHandler(mAbsoluteFilePath, true);
-        }
-    }
-}
-
-/**
-  Open overwrite dialog
-  */
-void FbFileView::fileOverwriteDialog()
-{
-    mOverwriteOptions = OverwriteOptions();
-    // open user-dialog to select: view as text/hex,  open w/AppArc or open w/DocH. embed
-    QStringList list;
-    list << QString("Overwrite all")
-         << QString("Skip all existing")
-         << QString("Gen. unique filenames")
-         << QString("Query postfix");
-    openListDialog(list, QString("Overwrite?"), this, SLOT(fileOverwrite(HbAction *)));
-}
-
-/**
-  File overwrite
-  */
-void FbFileView::fileOverwrite(HbAction *action)
-{
-    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
-    if(!action && dlg && dlg->selectedItems().count()) {
-        mOverwriteOptions.queryIndex = dlg->selectedItems().at(0).toInt();
-        if (mOverwriteOptions.queryIndex == EFileActionQueryPostFix) {
-            QString heading = QString("Postfix");
-            HbInputDialog::queryText(heading, this, SLOT(fileOverwritePostfix(HbAction *)), QString(), scene());
-        } else if (mOverwriteOptions.queryIndex == EFileActionSkipAllExisting) {
-            mOverwriteOptions.overWriteFlags = 0;
-        }
-    } else {
-        mOverwriteOptions.doFileOperations = false;
-    }
-}
-
-/**
-  File overwrite postfix query dialog
-  */
-void FbFileView::fileOverwritePostfix(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        mOverwriteOptions.postFix = dlg->value().toString();
-    } else {
-        mOverwriteOptions.doFileOperations = false;
-    }
-}
-
-// ---------------------------------------------------------------------------
-/**
-  Show a list dialog
-  \param List aList of item to select item from.
-  \param Title text titleText of a dialog heading widget
-  \return None
-  */
-void FbFileView::openListDialog(const QStringList& items, const QString &titleText, QObject* receiver, const char* member)
-{
-    // Create a list and some simple content for it
-    HbSelectionDialog *dlg = new HbSelectionDialog();
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    // Set items to be popup's content
-    dlg->setStringItems(items);
-    dlg->setSelectionMode(HbAbstractItemView::SingleSelection);
-
-    HbLabel *title = new HbLabel(dlg);
-    title->setPlainText(titleText);
-    dlg->setHeadingWidget(title);
-
-    // Launch popup and handle the user response:
-    dlg->open(receiver, member);
-}
-
-// ---------------------------------------------------------------------------
-
-void FbFileView::openPropertyDialog(const QStringList& propertyList, const QString& title)
-{
-    HbDialog *dialog = new HbDialog();
-    dialog->setDismissPolicy(HbPopup::TapOutside);
-    dialog->setTimeout(HbPopup::NoTimeout);
-
-    HbLabel *titleWidget = new HbLabel();
-    titleWidget->setPlainText(title);
-    dialog->setHeadingWidget(titleWidget);
-
-    // Create a list and some simple content for it
-    HbListWidget *list = new HbListWidget();
-    QString str;
-    foreach (str, propertyList) {
-        list->addItem(str);
-    }
-
-    // Connect list item activation signal to close the popup
-    connect(list, SIGNAL(activated(HbListWidgetItem*)), dialog, SLOT(close()));
-
-    HbAction *cancelAction = new HbAction("Close");
-    dialog->setPrimaryAction(cancelAction);
-
-    // Set listwidget to be popup's content
-    dialog->setContentWidget(list);
-    // Launch popup and handle the user response:
-    dialog->open();
-}
-
-/**
-  Stores selection or current index mapped to source model
-  */
-void FbFileView::storeSelectedItemsOrCurrentItem()
-{
-    QItemSelectionModel *selectionIndexes = mListView->selectionModel();
-
-    // by default use selected items
-    if (selectionIndexes) {
-        bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
-        if (isSelectionMode) {
-            if (selectionIndexes->hasSelection()) {
-                QItemSelection proxyItemSelection = mListView->selectionModel()->selection();
-                QItemSelection itemSelection = mSortFilterProxyModel->mapSelectionToSource(proxyItemSelection);
-                mSelectionIndexes = itemSelection.indexes();
-            } else { // or if none selected, clear selection
-                mSelectionIndexes.clear();
-            }
-        } else { // or if none selected, use the current item index
-            mSelectionIndexes.clear();
-            QModelIndex currentIndex = currentItemIndex();  //alreade mapped to source model
-            mSelectionIndexes.append(currentIndex);
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-QModelIndex FbFileView::currentItemIndex()
-{
-    return mCurrentIndex;
-}
-
-// ---------------------------------------------------------------------------
-// operations in File Menu
-// ---------------------------------------------------------------------------
-
-/**
-  Move back/up in folder browsing history
-  */
-void FbFileView::fileBackMoveUp()
-{
-    mLocationChanged = true;
-    mEngineWrapper->moveUpOneLevel();
-    //mListView->setRootIndex(currentItemIndex());
-    refreshList();
-    if (mEngineWrapper->isDriveListViewActive()) {
-        emit aboutToShowDriveView();
-    }
-}
-
-void FbFileView::fileOpenDirectory()
-{
-    mLocationChanged = true;
-    // get selected drive or directory from list view model and open it:
-    //if (mListView->selectionModel()->hasSelection()) {
-//    if (mListView->selectionModel()->selection().count() != 0) {
-//        QModelIndex currentIndex = currentItemIndex();
-        mEngineWrapper->moveDownToDirectory(currentItemIndex());
-//        mListView->setRootIndex(currentItemIndex());
-        refreshList();
-//    } else {
-//        Notifications::showErrorNote("not selected item!");
-//    }
-}
-
-void FbFileView::fileSearch()
-{
-    QString searchPath;
-    HbAction *contextrMenuAction = static_cast<HbAction *>(sender());
-    if (contextrMenuAction
-        && (contextrMenuAction == mContextMenuActions.mSearch
-            || contextrMenuAction == mContextMenuActions.mFileSearch)
-        && mEngineWrapper->getFileEntry(currentItemIndex()).isDir()) {
-        searchPath = mEngineWrapper->currentPath()
-                     + mEngineWrapper->getFileEntry(currentItemIndex()).name()
-                     + QString("\\");
-    } else {
-        searchPath = mEngineWrapper->currentPath();
-    }
-
-    emit aboutToShowSearchView(searchPath);
-}
-
-/**
-  Open new file dialog
-  */
-void FbFileView::fileNewFile()
-{
-    QString heading = QString("Enter filename");
-    HbInputDialog::queryText(heading, this, SLOT(doFileNewFile(HbAction*)), QString(), scene());
-}
-
-/**
-  Create a new file in current directory with a name queried from user
-  */
-void FbFileView::doFileNewFile(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString newFileName = dlg->value().toString();
-        mEngineWrapper->createNewFile(newFileName);
-        refreshList();
-    }
-}
-
-/**
-  Open new directory dialog
-  */
-void FbFileView::fileNewDirectory()
-{
-    QString heading = QString("Enter directory name");
-    HbInputDialog::queryText(heading, this, SLOT(doFileNewDirectory(HbAction*)), QString(), scene());
-}
-
-/**
-  Create a new directory in current directory with a name queried from user
-  */
-void FbFileView::doFileNewDirectory(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString newDirectoryName = dlg->value().toString();
-        mEngineWrapper->createNewDirectory(newDirectoryName);
-        refreshList();
-    }
-}
-
-/**
-  Question for Delete actually selected files
-  */
-void FbFileView::fileDelete()
-{
-    storeSelectedItemsOrCurrentItem();
-    const QString messageFormat = "Delete %1 entries?";
-    QString message = messageFormat.arg(mSelectionIndexes.count());
-    HbMessageBox::question(message, this, SLOT(doFileDelete(int)), HbMessageBox::Yes | HbMessageBox::No);
-}
-
-/**
-  Delete actually selected files
-  */
-void FbFileView::doFileDelete(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        mEngineWrapper->deleteItems(mSelectionIndexes);
-        mEngineWrapper->startExecutingCommands(QString("Deleting"));
-    }
-}
-
-/**
-  Open rename dialog for actually selected files
-  */
-void FbFileView::fileRename()
-{
-    storeSelectedItemsOrCurrentItem();
-    mEngineWrapper->setCurrentSelection(mSelectionIndexes);
-
-    for (int i(0), ie(mSelectionIndexes.count()); i < ie; ++i ) {
-        mProceed = (i == ie-1); // if the last item
-        mModelIndex = mSelectionIndexes.at(i);
-        FbFileEntry entry = mEngineWrapper->getFileEntry(mModelIndex);
-
-        QString heading = QString("Enter new name");
-        HbInputDialog::queryText(heading, this, SLOT(doFileRename(HbAction*)), entry.name(), scene());
-    }
-}
-
-/**
-  Rename actually selected files
-  */
-void FbFileView::doFileRename(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        mNewFileName = dlg->value().toString();
-
-        if (mEngineWrapper->targetExists(mModelIndex, mNewFileName)) {
-            const QString messageTemplate = QString("%1 already exists, overwrite?");
-            QString message = messageTemplate.arg(mNewFileName);
-            HbMessageBox::question(message, this, SLOT(doFileRenameFileExist(int)), HbMessageBox::Yes | HbMessageBox::No);
-        } else {
-            proceedFileRename();
-        }
-    }
-}
-
-/**
-  Rename actually selected files
-  */
-void FbFileView::doFileRenameFileExist(int action)
-{
-    if (action == HbMessageBox::Yes) {
-        proceedFileRename();
-    }
-}
-
-
-void FbFileView::proceedFileRename()
-{
-    mEngineWrapper->rename(mModelIndex, mNewFileName);
-    if (mProceed) {
-        mEngineWrapper->startExecutingCommands(QString("Renaming"));
-        refreshList();
-    }
-}
-
-/**
-  Touch actually selected files
-  */
-void FbFileView::fileTouch()
-{
-    storeSelectedItemsOrCurrentItem();
-    mEngineWrapper->setCurrentSelection(mSelectionIndexes);
-
-    if (mEngineWrapper->selectionHasDirs()) {
-        const QString message = "Recurse touch for all selected dirs?";
-        HbMessageBox::question(message, this, SLOT(doFileTouch(int)), HbMessageBox::Yes | HbMessageBox::No);
-    } else {
-        proceedFileTouch(false);
-    }
-}
-
-/**
-  Touch actually selected files
-  */
-void FbFileView::doFileTouch(int action)
-{
-    bool recurse = false;
-    if (action == HbMessageBox::Yes) {
-        recurse = true;
-        }
-    proceedFileTouch(recurse);
-}
-
-void FbFileView::proceedFileTouch(bool recurse)
-{
-    mEngineWrapper->touch(recurse);
-    mEngineWrapper->startExecutingCommands(QString("Touching"));
-    refreshList();
-}
-
-void FbFileView::fileChecksumsMD5()
-{
-    fileChecksums(EFileChecksumsMD5);
-}
-
-void FbFileView::fileChecksumsMD2()
-{
-    fileChecksums(EFileChecksumsMD2);
-}
-
-void FbFileView::fileChecksumsSHA1()
-{
-    fileChecksums(EFileChecksumsSHA1);
-}
-
-void FbFileView::fileChecksums(TFileBrowserCmdFileChecksums checksumType)
-{
-    mEngineWrapper->showFileCheckSums(currentItemIndex(), checksumType);
-}
-
-/**
-  Show file properties
-  */
-void FbFileView::fileProperties()
-{
-    QModelIndex currentIndex = currentItemIndex();
-    QStringList propertyList;
-    QString titleText;
-    mEngineWrapper->properties(currentIndex, propertyList, titleText);
-    openPropertyDialog(propertyList, titleText);
-}
-
-void FbFileView::fileSetAttributes()
-{
-    storeSelectedItemsOrCurrentItem();
-    mEngineWrapper->setCurrentSelection(mSelectionIndexes);
-
-    QString attributesViewTitle("Multiple entries");
-
-    quint32 setAttributesMask(0);
-    quint32 clearAttributesMask(0);
-    bool recurse(false);
-
-    // set default masks if only one file selected
-    if (mSelectionIndexes.count() == 1)
-        {
-        mModelIndex = mSelectionIndexes.at(0);
-        FbFileEntry fileEntry = mEngineWrapper->getFileEntry(mModelIndex);
-
-        attributesViewTitle = fileEntry.name();
-
-        if (fileEntry.isArchive())
-            setAttributesMask |= KEntryAttArchive;
-        else
-            clearAttributesMask |= KEntryAttArchive;
-
-        if (fileEntry.isHidden())
-            setAttributesMask |= KEntryAttHidden;
-        else
-            clearAttributesMask |= KEntryAttHidden;
-
-        if (fileEntry.isReadOnly())
-            setAttributesMask |= KEntryAttReadOnly;
-        else
-            clearAttributesMask |= KEntryAttReadOnly;
-
-        if (fileEntry.isSystem())
-            setAttributesMask |= KEntryAttSystem;
-        else
-            clearAttributesMask |= KEntryAttSystem;
-        }
-
-    emit aboutToShowAttributesView(attributesViewTitle, setAttributesMask, clearAttributesMask, recurse);
-}
-
-// edit menu
-void FbFileView::editSnapShotToE()
-{
-
-}
-
-/**
-  Set selected files into clipboard.
-  Selected item will be removed after paste operation.
-  */
-void FbFileView::editCut()
-{
-    storeSelectedItemsOrCurrentItem();
-
-    // Store indices to clipboard
-    mClipboardIndexes.clear();
-    for (int i = 0; i < mSelectionIndexes.size(); ++i) {
-        mClipboardIndexes.append(mSelectionIndexes.at(i));
-    }
-
-    mEngineWrapper->clipboardCut(mClipboardIndexes);
-    mEngineWrapper->setCurrentSelection(mClipboardIndexes);
-
-    int operations = mClipboardIndexes.count();
-    const QString message = QString ("%1 entries cut to clipboard");
-    QString noteMsg = message.arg(operations);
-
-    mToolbarPasteAction->setEnabled(true);
-    Notifications::showInformationNote(noteMsg);
-}
-
-/**
-  Set selected files into clipboard.
-  Selected item will not be removed after paste operation.
-  */
-void FbFileView::editCopy()
-{
-    storeSelectedItemsOrCurrentItem();
-
-    // Store indices to clipboard
-    mClipboardIndexes.clear();
-    for (int i = 0; i < mSelectionIndexes.size(); ++i) {
-        mClipboardIndexes.append(mSelectionIndexes.at(i));
-    }
-
-    mEngineWrapper->clipboardCopy(mClipboardIndexes);
-    mEngineWrapper->setCurrentSelection(mClipboardIndexes);
-
-    int operations = mClipboardIndexes.count();
-
-    const QString message = QString ("%1 entries copied to clipboard");
-    QString noteMsg = message.arg(operations);
-
-    mToolbarPasteAction->setEnabled(true);
-    Notifications::showInformationNote(noteMsg);
-}
-
-/**
-  Moves or copies file selection stored in clipboard to a actual directory.
-  Removing files depend on previous operation, i.e. Cut or Copy
-  */
-void FbFileView::editPaste()
-{
-    bool someEntryExists(false);
-
-    someEntryExists = mEngineWrapper->isDestinationEntriesExists(mClipboardIndexes, mEngineWrapper->currentPath());
-    if (someEntryExists) {
-        fileOverwriteDialog();
-    }
-    
-    mEngineWrapper->clipboardPaste(mOverwriteOptions);
-    mEngineWrapper->startExecutingCommands(mEngineWrapper->getClipBoardMode() == EClipBoardModeCut ?
-                                           QString("Moving") : QString("Copying") );
-}
-
-/**
-  Open copy to folder new filename dialog
-  */
-void FbFileView::editCopyToFolder()
-{
-    QString heading = QString("Enter new name");
-    FbCopyToFolderSelectionDialog *folderSelectionDialog = new FbCopyToFolderSelectionDialog();
-    folderSelectionDialog->open(this, SLOT(doEditCopyToFolder(int)));
-}
-
-/**
-  Copies current file selection to a queried directory.
-  */
-void FbFileView::doEditCopyToFolder(int action)
-{
-    FbCopyToFolderSelectionDialog *dlg = qobject_cast<FbCopyToFolderSelectionDialog*>(sender());
-    if (dlg && action == HbDialog::Accepted) {
-        QString targetDir = dlg->selectedFolder();
-
-        bool someEntryExists(false);
-
-        // TODO Set entry items here
-        storeSelectedItemsOrCurrentItem();
-        mEngineWrapper->setCurrentSelection(mSelectionIndexes);
-
-        someEntryExists = mEngineWrapper->isDestinationEntriesExists(mSelectionIndexes, targetDir);
-        if (someEntryExists) {
-            fileOverwriteDialog();
-        }
-        mEngineWrapper->copyToFolder(targetDir, mOverwriteOptions, false);
-        mEngineWrapper->startExecutingCommands(QString("Copying"));
-    }
-}
-
-/**
-  Open move to folder new filename dialog.
-  */
-void FbFileView::editMoveToFolder()
-{
-    QString heading = QString("Enter new name");
-    FbMoveToFolderSelectionDialog *folderSelectionDialog = new FbMoveToFolderSelectionDialog();
-    folderSelectionDialog->open(this, SLOT(doEditMoveToFolder(int)));
-}
-
-/**
-  Moves current file selection to a queried directory.
-  */
-void FbFileView::doEditMoveToFolder(int action)
-{
-    FbMoveToFolderSelectionDialog *dlg = qobject_cast<FbMoveToFolderSelectionDialog*>(sender());
-    if (dlg && action == HbDialog::Accepted) {
-        QString targetDir = dlg->selectedFolder();
-
-        bool someEntryExists(false);
-
-        // TODO Set entry items here
-        storeSelectedItemsOrCurrentItem();
-        mEngineWrapper->setCurrentSelection(mSelectionIndexes);
-
-        someEntryExists = mEngineWrapper->isDestinationEntriesExists(mSelectionIndexes, targetDir);
-        if (someEntryExists) {
-            fileOverwriteDialog();
-        }
-        mEngineWrapper->copyToFolder(targetDir, mOverwriteOptions, true);
-        mEngineWrapper->startExecutingCommands(QString("Moving"));
-    }
-}
-
-/**
-  Select current file
-  */
-void FbFileView::editSelect()
-{
-    QItemSelectionModel *selectionModel = mListView->selectionModel();
-    if (selectionModel) {
-        selectionModel->select(selectionModel->currentIndex(), QItemSelectionModel::SelectCurrent);
-        selectionModel->select(selectionModel->currentIndex(), QItemSelectionModel::Select);
-        refreshList();
-    }
-}
-
-/**
-  Unselect current file
-  */
-void FbFileView::editUnselect()
-{
-    QItemSelectionModel *selectionModel = mListView->selectionModel();
-    if (selectionModel) {
-        selectionModel->select(selectionModel->currentIndex(), QItemSelectionModel::Deselect);
-//        itemHighlighted(selectionModel->currentIndex());
-    }
-}
-
-/**
-  Select all files
-  */
-void FbFileView::editSelectAll()
-{
-    QItemSelectionModel *selectionModel = mListView->selectionModel();
-    if (selectionModel) {
-
-        //if (mFileBrowserModel->rowCount() > 0) {
-        if (mListView->model() && mListView->model()->rowCount() > 0) {
-            QModelIndex firstIndex = mListView->model()->index(0, 0);
-            QModelIndex lastIndex = mListView->model()->index( (mListView->model()->rowCount() - 1), 0);
-
-            QItemSelection itemSelection(firstIndex, lastIndex);
-            selectionModel->select(itemSelection, QItemSelectionModel::SelectCurrent);
-        }
-    }
-}
-
-/**
-  Unselect all files
-  */
-void FbFileView::editUnselectAll()
-{
-    QItemSelectionModel *selectionModel = mListView->selectionModel();
-    if (selectionModel) {
-        selectionModel->clearSelection();
-    }
-}
-
-// ---------------------------------------------------------------------------
-// view menu
-// ---------------------------------------------------------------------------
-void FbFileView::viewFilterEntries()
-{
-    if (mToolBar && mToolBar->actions().count() > 1 && mToolBar->actions().at(1)) {
-        if (mToolbarFilterAction && mToolbarFilterAction->toolBarExtension()) {
-            HbToolBarExtension *tbeFilter = mToolbarFilterAction->toolBarExtension();
-            tbeFilter->open();
-        }
-    }
-}
-
-/**
-  Set filter criteria to proxy model
-  */
-void FbFileView::filterCriteriaChanged(const QString &criteria)
-{
-    mSortFilterProxyModel->setFilterCriteria(criteria);
-}
-
-/**
-  Set filter criteria to proxy model
-  */
-void FbFileView::clearFilterCriteria()
-{
-    mSearchPanel->setCriteria(QString(""));
-}
-
-/**
-  Refresh view
-  */
-void FbFileView::viewRefresh()
-{
-    refreshList();
-}
-
-// ---------------------------------------------------------------------------
-// tools menu
-// ---------------------------------------------------------------------------
-void FbFileView::toolsAllAppsToTextFile()
-{
-
-}
-
-/**
-  Write all files to text file
-  */
-void FbFileView::toolsAllFilesToTextFile()
-{
-    mEngineWrapper->toolsWriteAllFiles();
-}
-
-//void FbFileView::toolsAvkonIconCacheEnable()
-//{
-//
-//}
-//void FbFileView::toolsAvkonIconCacheDisable()
-//{
-//
-//}
-
-/**
-  Disable extended errors
-  */
-void FbFileView::toolsDisableExtendedErrors()
-{
-    mEngineWrapper->ToolsSetErrRd(false);
-}
-
-void FbFileView::toolsDumpMsgStoreWalk()
-{
-
-}
-void FbFileView::toolsEditDataTypes()
-{
-
-}
-
-/**
-  Enable extended errors
-  */
-void FbFileView::toolsEnableExtendedErrors()
-{
-    mEngineWrapper->ToolsSetErrRd(true);
-}
-
-/**
-  Open simulate leave dialog
-  */
-void FbFileView::toolsErrorSimulateLeave()
-{
-    int leaveCode = -6;
-    QString heading = QString("Leave code");
-    //HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulateLeave(HbAction*)), leaveCode, scene());
-    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulateLeave(HbAction*)), QString::number(leaveCode), scene());
-}
-
-
-/**
-  Simulate leave.
-  */
-void FbFileView::doToolsErrorSimulateLeave(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        bool ok;
-        int leaveCode = dlg->value().toString().toInt(&ok);
-        if (leaveCode != 0 || ok) {
-            mEngineWrapper->ToolsErrorSimulateLeave(leaveCode);
-        }
-    }
-}
-
-/**
-  Open simulate panic dialog.
-  */
-void FbFileView::toolsErrorSimulatePanic()
-{
-    mPanicCategory = QString ("Test Category");
-    QString heading = QString("Panic category");
-    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulatePanicCode(HbAction*)), mPanicCategory, scene());
-}
-
-/**
-  Simulate panic.
-  */
-void FbFileView::doToolsErrorSimulatePanicCode(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        mPanicCategory = dlg->value().toString();
-        int panicCode(555);
-        QString heading = QString("Panic code");
-        HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulatePanic(HbAction*)), panicCode, scene());
-    }
-}
-
-/**
-  Simulate panic.
-  */
-void FbFileView::doToolsErrorSimulatePanic(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        bool ok;
-        int panicCode = dlg->value().toInt(&ok);
-        if (panicCode != 0 || ok) {
-            mEngineWrapper->ToolsErrorSimulatePanic(mPanicCategory, panicCode);
-        }
-    }
-}
-
-/**
-  Open simulate exception dialog.
-  */
-void FbFileView::toolsErrorSimulateException()
-{
-    int exceptionCode = 0;
-    QString heading = QString("Exception code");
-    HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulateException(HbAction*)), exceptionCode, scene());
-}
-
-/**
-  Simulate exception.
-  */
-void FbFileView::doToolsErrorSimulateException(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        bool ok;
-        int exceptionCode = dlg->value().toInt(&ok);
-        if (exceptionCode != 0 || ok) {
-            mEngineWrapper->ToolsErrorSimulateException(exceptionCode);
-        }
-    }
-}
-
-//    void FbFileView::toolsLocalConnectivityActivateInfrared()
-//{
-//
-//}
-//    void FbFileView::toolsLocalConnectivityLaunchBTUI()
-//{
-//
-//}
-//    void FbFileView::toolsLocalConnectivityLaunchUSBUI()
-//{
-//
-//}
-void FbFileView::toolsMessageInbox()
-{
-
-}
-void FbFileView::toolsMessageDrafts()
-{
-
-}
-void FbFileView::toolsMessageSentItems()
-{
-
-}
-void FbFileView::toolsMessageOutbox()
-{
-
-}
-void FbFileView::toolsMemoryInfo()
-{
-
-}
-void FbFileView::toolsSecureBackStart()
-{
-
-}
-void FbFileView::toolsSecureBackRestore()
-{
-
-}
-void FbFileView::toolsSecureBackStop()
-{
-
-}
-
-/**
-  Open debug mask dialog
-  */
-void FbFileView::toolsSetDebugMaskQuestion()
-{
-    quint32 dbgMask = mEngineWrapper->getDebugMask();
-    QString dbgMaskText = QString("0x").append(QString::number(dbgMask, 16));
-    QString heading = QString("Kernel debug mask in hex format");
-    HbInputDialog::queryText(heading, this, SLOT(toolsSetDebugMask(HbAction*)), dbgMaskText, scene());
-}
-
-/**
-  Set debug mask
-  */
-void FbFileView::toolsSetDebugMask(HbAction *action)
-{
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
-        QString dbgMaskText = dlg->value().toString();
-        if (dbgMaskText.length() > 2 && dbgMaskText[0]=='0' && dbgMaskText[1]=='x') {
-            bool ok;
-            quint32 dbgMask = dbgMaskText.toUInt(&ok, 16);
-            if (dbgMask != 0 || ok) {
-                mEngineWrapper->toolsSetDebugMask(dbgMask);
-                Notifications::showConfirmationNote(QString("Changed"));
-            } else {
-                Notifications::showErrorNote(QString("Cannot convert value"));
-            }
-        } else {
-            Notifications::showErrorNote(QString("Not in hex format"));
-        }
-    }
-}
-
-void FbFileView::toolsShowOpenFilesHere()
-{
-
-}
-
-// ---------------------------------------------------------------------------
-// main menu items
-// ---------------------------------------------------------------------------
-void FbFileView::selectionModeChanged()
-{
-    if (mOptionMenuActions.mSelection->isChecked()) {
-         activateSelectionMode();
-     } else {
-         deActivateSelectionMode();
-     }
-}
-
-/**
-  Show about note
-  */
-void FbFileView::about()
-{
-    Notifications::showAboutNote();
-}
-
-// ---------------------------------------------------------------------------
-// End of operations
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-
-/**
-  Item is selected from list when selection mode is activated from menu
-  */
-void FbFileView::selectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/)
-{
-    //QItemSelectionModel *selectionModel = mListView->selectionModel();
-    //itemHighlighted(selectionModel->currentIndex());
-}
-
-/**
-  An item is clicked from navigation item list. Navigation item list contains
-  drive-, folder- or file items. Opens selected drive, folder or file popup menu
-  */
-void FbFileView::activated(const QModelIndex& index)
-{
-    if (mFbFileModel) {
-        //map to source model
-        QModelIndex activatedIndex = mSortFilterProxyModel->mapToSource(index);
-
-        if (mEngineWrapper->getFileEntry(activatedIndex).isDir()) {
-            // populate new content of changed navigation view.
-            // mLocationChanged = true;
-            // mDirectory = filePath;
-            mEngineWrapper->moveDownToDirectory(activatedIndex);
-            refreshList();
-        } else {  // file item
-            // mSelectedFilePath = filePath;
-            FbFileEntry fileEntry = mEngineWrapper->getFileEntry(activatedIndex);
-            mAbsoluteFilePath = fileEntry.path() + fileEntry.name();
-
-            // open user-dialog to select: view as text/hex,  open w/AppArc or open w/DocH. embed
-            QStringList list;
-            list << QString("View as text/hex") << QString("Open w/ AppArc") << QString("Open w/ DocH. embed");
-            openListDialog(list, QString("Open file"), this, SLOT(fileOpen(HbAction *)));
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void FbFileView::activateSelectionMode()
-{
-    QString path;
-    disconnect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
-    mListView->setSelectionMode(HbListView::MultiSelection);
-
-//    QModelIndex index = mFileSystemModel->index(path,0);
-//    mListView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::SelectCurrent);
-//    mListView->selectionModel()->select(index, QItemSelectionModel::Select);
-//    //mListView->setHighlightMode(HbItemHighlight::HighlightAlwaysVisible);
-//    mListView->setFocus();    // TODO use focus in
-    if (mListView->selectionModel()) {
-        connect(mListView->selectionModel(),
-                SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
-                this,
-                SLOT(selectionChanged(QItemSelection, QItemSelection)));
-//        // flag to indicate that selection mode changed, "edit" sub-menu update needed
-//        mFolderContentChanged = true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void FbFileView::deActivateSelectionMode()
-{
-    disconnect(mListView->selectionModel(),
-               SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
-               this,
-               SLOT(selectionChanged(QItemSelection, QItemSelection)));
-    mListView->setSelectionMode(HbListView::NoSelection);
-    connect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
-    editUnselectAll();
-    // flag to indicate that selection mode changed, "edit" sub-menu update needed
-    mFolderContentChanged = true;
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbfolderselectiondialog.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +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 "fbfolderselectiondialog.h"
-#include "fbfolderselectorwrapper.h"
-
-#include <HbListWidget>
-#include <HbAction>
-#include <HbListWidgetItem>
-#include <HbLabel>
-#include <HbPushButton>
-
-#include <QGraphicsLinearLayout>
-#include <QFileInfo>
-#include <QFileIconProvider>
-
-FbFolderSelectionDialog::FbFolderSelectionDialog(QGraphicsItem *parent) :
-        HbDialog(parent),
-        mTitle(0),
-        mFolderList(0),
-        mFolderSelectorWrapper(0),
-        mFileIconProvider(0)
-{
-    init();
-}
-
-FbFolderSelectionDialog::~FbFolderSelectionDialog()
-{
-    if (mFileIconProvider)
-        delete mFileIconProvider;
-}
-
-QString FbFolderSelectionDialog::selectedFolder()
-{
-    return mFolderSelectorWrapper->currentPath();
-}
-
-void FbFolderSelectionDialog::init()
-{
-    setAttribute(Qt::WA_DeleteOnClose);
-
-    mFileIconProvider = new QFileIconProvider();
-
-    createHeading();
-    createList();
-    createToolBar();
-}
-
-void FbFolderSelectionDialog::createHeading()
-{
-    HbWidget *headingWidget = new HbWidget(this);
-    QGraphicsLinearLayout *headingLayout = new QGraphicsLinearLayout(Qt::Horizontal, headingWidget);
-    headingWidget->setLayout(headingLayout);
-
-    mTitle = new HbLabel(this);
-    mTitle->setElideMode(Qt::ElideRight);
-
-    HbPushButton *upButton = new HbPushButton(this);
-    upButton->setIcon(HbIcon(QString(":/qtg_indi_status_back.svg")));
-    connect(upButton, SIGNAL(pressed()),
-            this, SLOT(moveUpPressed()));
-
-    headingLayout->addItem(mTitle);
-    headingLayout->addItem(upButton);
-    headingLayout->setAlignment(upButton, Qt::AlignRight);
-
-    setHeadingWidget(headingWidget);
-}
-
-void FbFolderSelectionDialog::createList()
-{
-    mFolderList = new HbListWidget(this);
-    mFolderSelectorWrapper = new FbFolderSelectorWrapper();
-    mFolderSelectorWrapper->init();
-
-    refreshView();
-
-    setContentWidget(mFolderList);
-    connect(mFolderList, SIGNAL(activated(HbListWidgetItem *)),
-            this, SLOT(activated(HbListWidgetItem *)));
-
-    connect(mFolderSelectorWrapper, SIGNAL(FolderSelectionChanged()),
-            this, SLOT(refreshView()));
-}
-
-void FbFolderSelectionDialog::createToolBar()
-{
-    HbAction *rejectAction = new HbAction(QString("Cancel"), this);
-    addAction(rejectAction);
-}
-
-void FbFolderSelectionDialog::refreshView()
-{
-    mFolderList->clear();
-    QIcon icon;
-    if (mFolderSelectorWrapper->isDriveListViewActive())
-    {
-        const QString KSimpleDriveEntry("%d\t%c: <%S>\t\t");
-        //TODO icon = mFileIconProvider->icon(QFileIconProvider::Drive);
-        icon = mFileIconProvider->icon(QFileIconProvider::File);
-
-        for (TInt i=0; i<mFolderSelectorWrapper->itemCount(); i++) {
-            FbDriveEntry driveEntry = mFolderSelectorWrapper->getDriveEntry(i);
-
-            const QString SimpleDriveEntry("%1: <%2>");
-            QString diskName = SimpleDriveEntry.arg(driveEntry.driveLetter()).arg(driveEntry.mediaTypeString());
-
-            mFolderList->addItem(icon, diskName);
-        }
-    } else {
-        const QString SimpleFileEntry("%1");
-        icon = mFileIconProvider->icon(QFileIconProvider::Folder);
-
-        // append current folder item
-        QString currentAbsolutePath = mFolderSelectorWrapper->currentPath().left(mFolderSelectorWrapper->currentPath().length()-1);
-        QFileInfo fileInfo(currentAbsolutePath);
-        QString currentFolderName = fileInfo.fileName();
-        if (currentFolderName.isEmpty()) {
-            currentFolderName = QString("[root level]");
-        }
-
-        QString currentDirTextEntry = SimpleFileEntry.arg(currentFolderName); ///*<< fileEntry.IconId()*/
-        mFolderList->addItem(icon, currentDirTextEntry);
-
-        for (TInt i=0; i<mFolderSelectorWrapper->itemCount(); i++) {
-            FbFileEntry fileEntry = mFolderSelectorWrapper->getFileEntry(i);
-
-            QString fileName = SimpleFileEntry.arg(fileEntry.name()); ///*<< fileEntry.IconId()*/
-
-            mFolderList->addItem(icon, fileName);
-        }
-    }
-}
-
-void FbFolderSelectionDialog::activated(HbListWidgetItem * item)
-{
-    int row = mFolderList->row(item);
-    if (mFolderSelectorWrapper->isDriveListViewActive()) {
-        mFolderSelectorWrapper->moveDownToDirectory(row);
-    } else if (row == 0) {
-        if (this->actions().count() > 0) {
-            accept();
-        }
-    } else if (row > 0) {
-        mFolderSelectorWrapper->moveDownToDirectory(row);
-    }
-}
-
-void FbFolderSelectionDialog::moveUpPressed()
-{
-    mFolderSelectorWrapper->moveUpOneLevel();
-}
-
-// ---------------------------------------------------------------------------
-
-FbCopyToFolderSelectionDialog::FbCopyToFolderSelectionDialog(QGraphicsItem *parent) :
-        FbFolderSelectionDialog(parent)
-{
-    if (headingWidget()) {
-        mTitle->setPlainText(QString("Copy To"));
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-FbMoveToFolderSelectionDialog::FbMoveToFolderSelectionDialog(QGraphicsItem *parent) :
-        FbFolderSelectionDialog(parent)
-{
-    if (headingWidget()) {
-        mTitle->setPlainText(QString("Move To"));
-    }
-}
-
-// End of file
--- a/filebrowser/ui/src/fbfolderselectorwrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +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 "fbfolderselectorwrapper.h"
-#include "FBFolderSelector.h"
-
-#include <QString>
-
-// ---------------------------------------------------------------------------
-
-/**
- * Constructor
- */
-FbFolderSelectorWrapper::FbFolderSelectorWrapper()
-    : mDestinationFolderSelector(0)
-{
-}
-
-/**
- * Destructor
- */
-FbFolderSelectorWrapper::~FbFolderSelectorWrapper()
-{
-    if (mDestinationFolderSelector)
-        delete mDestinationFolderSelector;
-}
-
-/**
- * Initializes Engine Wrapper
- * @return true if engine was started successfully
- */
-bool FbFolderSelectorWrapper::init()
-{
-    TFileName destinationFolder;
-
-    TRAPD(err, mDestinationFolderSelector = CFileBrowserFolderSelector::NewL(destinationFolder, this));
-    if (err != KErrNone) {
-        return false;
-    } else {
-        //TRAP_IGNORE(mEngine->ActivateEngineL());
-        //mSettings = FileBrowserSettings(&mEngine->Settings());
-        return true;
-    }
-}
-
-/**
-  * Return current path
-  */
-QString FbFolderSelectorWrapper::currentPath() const
-{
-    return QString::fromUtf16(mDestinationFolderSelector->CurrentPath().Ptr(),
-                              mDestinationFolderSelector->CurrentPath().Length());
-}
-
-/**
-  * Return whether drive list view is active
-  */
-bool FbFolderSelectorWrapper::isDriveListViewActive() const
-{
-    return mDestinationFolderSelector->IsDriveListViewActive();
-}
-
-/**
-  * Returns number of either drives or files depending on current view
-  */
-int FbFolderSelectorWrapper::itemCount() const
-{
-    if (isDriveListViewActive()) {
-        return mDestinationFolderSelector->DriveEntryList()->Count();
-    } else {
-        return mDestinationFolderSelector->FileEntryList()->Count();
-    }
-}
-
-/**
-  * Returns drive entry for given \a index
-  */
-FbDriveEntry FbFolderSelectorWrapper::getDriveEntry(const int index) const
-{
-    TDriveEntry driveEntry;
-    if (mDestinationFolderSelector->DriveEntryList()->Count() > index && index >= 0) {
-        driveEntry = mDestinationFolderSelector->DriveEntryList()->At(index);
-    }
-    return FbDriveEntry(driveEntry);
-}
-
-/**
-  * Returns file entry for given \a index
-  */
-FbFileEntry FbFolderSelectorWrapper::getFileEntry(const int index) const
-{
-    TFileEntry fileEntry;
-    if (mDestinationFolderSelector->FileEntryList()->Count() > index && index >= 0) {
-        fileEntry = mDestinationFolderSelector->FileEntryList()->At(index);
-    }
-    return FbFileEntry(fileEntry);
-}
-
-/**
-  * Move down to selected item by \a index
-  */
-void FbFolderSelectorWrapper::moveDownToDirectory(int index)
-{
-    mDestinationFolderSelector->MoveDownToDirectoryL(index);
-}
-
-/**
-  * Move up from folder
-  */
-void FbFolderSelectorWrapper::moveUpOneLevel()
-{
-    mDestinationFolderSelector->MoveUpOneLevelL();
-}
-
-void FbFolderSelectorWrapper::InformFolderSelectionChanged()
-{
-    emit FolderSelectionChanged();
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/src/fbmainwindow.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +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 <HbApplication>
-#include <HbMainWindow>
-
-#include "fbmainwindow.h"
-#include "enginewrapper.h"
-#include "fbfileview.h"
-#include "fbdriveview.h"
-#include "fbsettingsview.h"
-#include "fbeditorview.h"
-#include "fbsearchview.h"
-#include "fbattributesview.h"
-
-FbMainWindow::FbMainWindow(QWidget *parent)
-    : HbMainWindow(parent),
-    mEngineWrapper(0),
-    mDriveView(0),
-    mFileView(0),
-    mSettingsView(0),
-    mEditorView(0),
-    mSearchView(0),
-    mAttributesView(0),
-    mPreviousView(0)
-{
-}
-
-FbMainWindow::~FbMainWindow ()
-{
-    if (mEngineWrapper) {
-        delete mEngineWrapper;
-    }
-}
-
-void FbMainWindow::init()
-{
-    // Create Engine Wrapper and initialize it
-    mEngineWrapper = new EngineWrapper();
-    int error = mEngineWrapper->init();
-    Q_ASSERT_X(error == 1, "FileBrowser", "Engine initialization failed");
-
-    // Create drive view
-    mDriveView = new FbDriveView();
-    connect(mDriveView, SIGNAL(aboutToShowSettingsView()), this, SLOT(openSettingsView()));
-    connect(mDriveView, SIGNAL(aboutToShowFileView()), this, SLOT(openFileView()));
-    mDriveView->init(mEngineWrapper);
-    addView(mDriveView);
-
-    // Create file view
-    mFileView = new FbFileView();
-    connect(mFileView, SIGNAL(aboutToShowSettingsView()), this, SLOT(openSettingsView()));
-    connect(mFileView, SIGNAL(aboutToShowDriveView()), this, SLOT(openDriveView()));
-    mFileView->init(mEngineWrapper);
-    addView(mFileView);
-
-    // Create settings view
-    mSettingsView = new FbSettingsView(*mEngineWrapper);
-    connect(mSettingsView, SIGNAL(finished(bool)), this, SLOT(openPreviousBrowserView()));
-    addView(mSettingsView);
-
-    // Create editor view
-    mEditorView = new FbEditorView();
-    connect(mFileView, SIGNAL(aboutToShowEditorView(const QString &, bool)), this, SLOT(openEditorView(const QString &, bool)));
-    connect(mEditorView, SIGNAL(finished(bool)), this, SLOT(openFileView()));
-    addView(mEditorView);
-
-    // Create Search view
-    mSearchView = new FbSearchView(*mEngineWrapper);
-    connect(mDriveView, SIGNAL(aboutToShowSearchView(QString)), this, SLOT(openSearchView(QString)));
-    connect(mFileView, SIGNAL(aboutToShowSearchView(QString)), this, SLOT(openSearchView(QString)));
-    connect(mSearchView, SIGNAL(finished(bool)), this, SLOT(openFileBrowserView(bool)));
-    addView(mSearchView);
-
-    connect(mFileView, SIGNAL(aboutToShowAttributesView(const QString &, quint32 &, quint32 &, bool &)),
-            this, SLOT(openAttributesView(const QString &, quint32 &, quint32 &, bool &)));
-
-    // Show ApplicationView at startup
-    setCurrentView(mDriveView);
-    mPreviousView = mDriveView;
-
-    // Show HbMainWindow
-    show();
-}
-
-
-void FbMainWindow::openPreviousBrowserView()
-{
-    mDriveView->refreshList();
-    mFileView->refreshList();
-    setCurrentView(mPreviousView);
-}
-
-void FbMainWindow::openFileBrowserView(bool accepted)
-{
-    mDriveView->refreshList();
-    mFileView->refreshList();
-    if (accepted) {
-        setCurrentView(mFileView);
-    } else {
-        setCurrentView(mPreviousView);
-    }
-}
-
-void FbMainWindow::openDriveView()
-{
-    mDriveView->refreshList();
-    setCurrentView(mDriveView);
-    mPreviousView = mDriveView;
-}
-
-void FbMainWindow::openFileView()
-{
-    mDriveView->refreshList();
-//    mFileView->setCurrentpath(path);
-    mFileView->refreshList();
-    setCurrentView(mFileView);
-    mPreviousView = mFileView;
-}
-
-void FbMainWindow::openSettingsView()
-{
-    mSettingsView->initDataForm();
-    setCurrentView(mSettingsView);
-}
-
-void FbMainWindow::openEditorView(const QString &fileName, bool flagReadOnly)
-{
-    mEditorView->open(fileName, flagReadOnly);
-    setCurrentView(mEditorView);
-}
-
-void FbMainWindow::openSearchView(const QString &path)
-{
-    mSearchView->open(path);
-    setCurrentView(mSearchView);
-}
-
-void FbMainWindow::openAttributesView(const QString &attributesViewTitle,
-                                      quint32 &setAttributesMask,
-                                      quint32 &clearAttributesMask,
-                                      bool &recurse)
-{
-    if (!mAttributesView) {
-        // Create attributes view
-        mAttributesView = new FbAttributesView(setAttributesMask, clearAttributesMask, recurse);
-        connect(mAttributesView, SIGNAL(finished(bool)), this, SLOT(closeAttributesView(bool)));
-        mAttributesView->setTitle(attributesViewTitle);
-        addView(mAttributesView);
-        setCurrentView(mAttributesView);
-    }
-}
-
-void FbMainWindow::closeAttributesView(bool accepted)
-{
-    if (accepted) {
-        mEngineWrapper->setAttributes(mAttributesView->setAttributesMask(), mAttributesView->clearAttributesMask(), mAttributesView->recurse());
-    }
-    openFileView();
-    removeView(mAttributesView);
-    mAttributesView->deleteLater();
-    mAttributesView = 0;
-}
-
-// End of file
--- a/filebrowser/ui/src/fbsearchview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +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 "fbsearchview.h"
-#include "enginewrapper.h"
-#include "notifications.h"
-
-#include <HbView>
-#include <HbDataForm>
-#include <HbDataFormModel>
-#include <HbDataFormModelItem>
-#include <HbAction>
-#include <HbListWidget>
-#include <HbListWidgetItem>
-#include <HbDialog>
-#include <HbToolBar>
-#include <HbProgressDialog>
-
-#include <QtGui>
-#include <QDir>
-#include <QFileInfo>
-
-const QStringList RECURSEMODES = (QStringList() << "Non-recursive" << "Recursive");
-const QString acceptActionText = "Search";
-const QString rejectActionText = "Cancel";
-
-
-FbSearchView::FbSearchView(EngineWrapper &engineWrapper)
-    : mEngineWrapper(engineWrapper),
-    mAttributes(),
-    mResults(),
-    mForm(0),
-    mSearchFileNameItem(0),
-    mWildCardItem(0),
-    mHasString(0),
-    mRecurse(0),
-    mMinSize(0),
-    mMaxSize(0),
-    mMinDate(0),
-    mMaxDate(0),
-    mPath(),
-    mProgressDialog(0)
-{
-    // Set title and add this view to main window
-    setTitle("Search");
-
-    // Override back navigation action
-    HbAction *leaveViewAction = new HbAction(Hb::BackNaviAction, this);
-    connect(leaveViewAction, SIGNAL(triggered()), this, SLOT(reject()));
-    setNavigationAction(leaveViewAction);
-
-    initDataForm();
-    createToolbar();
-}
-
-FbSearchView::~FbSearchView()
-{
-}
-
-void FbSearchView::initDataForm() {
-    mForm = new HbDataForm(/*HbFormView::ModeEdit,*/ this);
-    HbDataFormModel *model = new HbDataFormModel();
-
-    mSearchFileNameItem = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
-    mSearchFileNameItem->setLabel("Search dir: ");
-
-    mWildCardItem = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
-    mWildCardItem->setLabel("Wildcards: ");
-
-    mHasString = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
-    mHasString->setLabel("Has string: ");
-
-    mRecurse = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem);
-    mRecurse->setLabel("Recurse: ");
-    mRecurse->setContentWidgetData("items", RECURSEMODES);
-
-    mMinSize = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
-    mMinSize->setLabel("Min size: ");
-
-    mMaxSize = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
-    mMaxSize->setLabel("Max size: ");
-
-    mMinDate = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
-    mMinDate->setLabel("Min date: ");
-    mMinDate->setContentWidgetData("text", "01/01/1980");
-
-    mMaxDate = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
-    mMaxDate->setLabel("Max date: ");
-    mMaxDate->setContentWidgetData("text", "31/12/2060");
-
-    model->appendDataFormItem(mSearchFileNameItem);
-    model->appendDataFormItem(mWildCardItem);
-    model->appendDataFormItem(mHasString);
-    model->appendDataFormItem(mRecurse);
-    model->appendDataFormItem(mMinSize);
-    model->appendDataFormItem(mMaxSize);
-    model->appendDataFormItem(mMinDate);
-    model->appendDataFormItem(mMaxDate);
-    mForm->setModel(model);
-
-    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
-    layout->addItem(mForm);
-    setLayout(layout);
-}
-
-void FbSearchView::createToolbar()
-{
-    HbToolBar *toolBar = new HbToolBar(this);
-    HbAction *acceptAction = new HbAction(acceptActionText);
-    connect(acceptAction, SIGNAL(triggered()), this, SLOT(accept()));
-    toolBar->addAction(acceptAction);
-
-    HbAction *rejectAction = new HbAction(rejectActionText);
-    connect(rejectAction, SIGNAL(triggered()), this, SLOT(reject()));
-    toolBar->addAction(rejectAction);
-
-    setToolBar(toolBar);
-}
-
-void FbSearchView::loadAttributes()
-{
-    // get settings from engine;
-    mAttributes = mEngineWrapper.getFileSearchAttributes();
-
-    // set data:
-    mSearchFileNameItem->setContentWidgetData("text", mPath);
-//    mSearchFileNameItem->setContentWidgetData("text", mAttributes.mSearchDir);
-    if (!mAttributes.mDefaultWildCard) {
-        mWildCardItem->setContentWidgetData("text", mAttributes.mWildCards);
-    }
-    mHasString->setContentWidgetData("text", mAttributes.mTextInFile);
-
-    mRecurse->setContentWidgetData("selected", mAttributes.mRecurse);
-
-    mMinSize->setContentWidgetData("text", mAttributes.mMinSize);
-    mMaxSize->setContentWidgetData("text", mAttributes.mMaxSize);
-
-    mMinDate->setContentWidgetData("text", mAttributes.mMinDate);
-    mMaxDate->setContentWidgetData("text", mAttributes.mMaxDate);
-}
-
-/**
- * Reads form items and saves values of them into member variable mAttributes
- */
-void FbSearchView::readFormItems()
-{
-    mAttributes.mSearchDir  = mSearchFileNameItem->contentWidgetData("text").toString();
-
-    mAttributes.mDefaultWildCard = false;
-    QString wildCard = mWildCardItem->contentWidgetData("text").toString();
-    if (wildCard.trimmed().isEmpty()) {
-        wildCard = QString("*");
-        mAttributes.mDefaultWildCard = true;
-    }
-    mAttributes.mWildCards  = wildCard;
-    mAttributes.mTextInFile = mHasString->contentWidgetData("text").toString();
-    mAttributes.mMinSize    = mMinSize->contentWidgetData("text").toInt();
-    mAttributes.mMaxSize    = mMaxSize->contentWidgetData("text").toInt();
-    mAttributes.mMinDate    = mMinDate->contentWidgetData("text").toDate();
-    mAttributes.mMaxDate    = mMaxDate->contentWidgetData("text").toDate();
-    mAttributes.mRecurse    = mRecurse->contentWidgetData("selected").toBool();
-}
-
-void FbSearchView::open(const QString &path)
-{   
-    mPath = path;
-    // load file search attribute values from FB engine:
-    loadAttributes();
-}
-
-void FbSearchView::startFileSearch()
-{
-    // save form data values and set them as search attributes into FB engine. 
-    readFormItems();
-    mEngineWrapper.setFileSearchAttributes(mAttributes);
-    
-    bool err = mEngineWrapper.searchFiles();
-
-    // show results of file search:
-    mResults = mEngineWrapper.getSearchResults();
-    fileSearchResults();
-}
-
-void FbSearchView::fileSearchResults()
-{
-    QString noteMsg("%1 entries found");
-    Notifications::showInformationNote(noteMsg.arg(mEngineWrapper.itemCount()), QString(""));
-}
-
-void FbSearchView::accept()
-{
-    startFileSearch();
-    emit finished(true);
-}
-
-void FbSearchView::reject()
-{
-    emit finished(false);
-}
--- a/filebrowser/ui/src/fbsettingsview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +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 "fbsettingsview.h"
-#include "enginewrapper.h"
-#include "filebrowsersettings.h"
-
-#include <HbView>
-#include <HbDataForm>
-#include <HbDataFormModel>
-#include <HbDataFormModelItem>
-#include <HbAction>
-#include <HbToolBar>
-
-#include <QGraphicsLinearLayout>
-
-const QStringList DisplayModeModes = (QStringList() << "Full screen" << "Normal");
-const QStringList FileViewModes = (QStringList() << "Simple" << "Extended");
-const QStringList Modes = (QStringList() << "Yes" << "No");
-const QString YesText = QString("Yes");
-const QString NoText = QString("No");
-const QString acceptActionText = "OK";
-const QString rejectActionText = "Cancel";
-
-FbSettingsView::FbSettingsView(EngineWrapper &engineWrapper) :
-    mEngineWrapper(engineWrapper),
-    mForm(0),
-    mDisplayModeItem(0),
-    mFileViewItem(0),
-    mShowDirectoryInfoItem(0),
-    mShowAssociatedIconsItem(0),
-    mRememberFolderOnExitItem(0),
-    mRememberLastFolderItem(0),
-    mShowToolbarItem(0),
-    mSupportNetDrivesItem(0),
-    mBypassPlatformSecurityItem(0),
-    mUnlockFilesViaSBItem(0),
-    mIgnoreProtectionAttributesItem(0),
-    mNoROAttributeCopyFromZItem(0)
-{
-    setTitle("Settings");
-
-    // Override back navigation action
-    HbAction *leaveViewAction = new HbAction(Hb::BackNaviAction, this);
-    connect(leaveViewAction, SIGNAL(triggered()), this, SLOT(reject()));
-    setNavigationAction(leaveViewAction);
-
-    initDataForm();
-    createToolbar();
-}
-
-FbSettingsView::~FbSettingsView()
-{
-}
-
-void FbSettingsView::initDataForm()
-{
-    mForm = new HbDataForm(this);
-    HbDataFormModel *model = new HbDataFormModel();
-
-//    connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
-//            this, SLOT(toggleChange(QModelIndex, QModelIndex)));
-
-
-    // TODO to be done
-//    mDisplayModeItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem);
-//    mDisplayModeItem->setLabel("Display mode: ");
-//    mDisplayModeItem->setContentWidgetData("items", DisplayModeModes);
-//
-//    mFileViewItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem);
-//    mFileViewItem->setLabel("File view: ");
-//    mFileViewItem->setContentWidgetData("items", FileViewModes);
-//
-//    mShowDirectoryInfoItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-//    mShowDirectoryInfoItem->setLabel("Show directory info: ");
-//    mShowDirectoryInfoItem->setContentWidgetData(QString("text"), YesText);
-//    mShowDirectoryInfoItem->setContentWidgetData(QString("additionalText"), NoText);
-//
-//    mShowAssociatedIconsItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-//    mShowAssociatedIconsItem->setLabel("Show associated icons: ");
-//    mShowAssociatedIconsItem->setContentWidgetData(QString("text"), YesText);
-//    mShowAssociatedIconsItem->setContentWidgetData(QString("additionalText"), NoText);
-//
-//    mRememberFolderOnExitItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-//    mRememberFolderOnExitItem->setLabel("Remember folder on exit: ");
-//    mRememberFolderOnExitItem->setContentWidgetData(QString("text"), YesText);
-//    mRememberFolderOnExitItem->setContentWidgetData(QString("additionalText"), NoText);
-//
-//    mRememberLastFolderItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-//    mRememberLastFolderItem->setLabel("Remember last folder: ");
-//    mRememberLastFolderItem->setContentWidgetData(QString("text"), YesText);
-//    mRememberLastFolderItem->setContentWidgetData(QString("additionalText"), NoText);
-//
-//    mShowToolbarItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-//    mShowToolbarItem->setLabel("Show toolbar: ");
-//    mShowToolbarItem->setContentWidgetData(QString("text"), YesText);
-//    mShowToolbarItem->setContentWidgetData(QString("additionalText"), NoText);
-
-    mSupportNetDrivesItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-    mSupportNetDrivesItem->setLabel("Support net drives: ");
-    mSupportNetDrivesItem->setContentWidgetData(QString("text"), YesText);
-    mSupportNetDrivesItem->setContentWidgetData(QString("additionalText"), NoText);
-
-    mBypassPlatformSecurityItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-    mBypassPlatformSecurityItem->setLabel("Bypass plat.security: ");
-    mBypassPlatformSecurityItem->setContentWidgetData(QString("text"), YesText);
-    mBypassPlatformSecurityItem->setContentWidgetData(QString("additionalText"), NoText);
-
-    mUnlockFilesViaSBItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-    mUnlockFilesViaSBItem->setLabel("Unlock files via SB: ");
-    mUnlockFilesViaSBItem->setContentWidgetData(QString("text"), YesText);
-    mUnlockFilesViaSBItem->setContentWidgetData(QString("additionalText"), NoText);
-
-    mIgnoreProtectionAttributesItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-    mIgnoreProtectionAttributesItem->setLabel("Ign. protection atts: ");
-    mIgnoreProtectionAttributesItem->setContentWidgetData(QString("text"), YesText);
-    mIgnoreProtectionAttributesItem->setContentWidgetData(QString("additionalText"), NoText);
-
-    mNoROAttributeCopyFromZItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
-    mNoROAttributeCopyFromZItem->setLabel("No RO-att copy from Z: ");
-    mNoROAttributeCopyFromZItem->setContentWidgetData(QString("text"), YesText);
-    mNoROAttributeCopyFromZItem->setContentWidgetData(QString("additionalText"), NoText);
-
-    // load file search attribute values from FB engine:
-    loadSettings(mEngineWrapper.settings());
-
-//    model->appendDataFormItem(mDisplayModeItem);
-//    model->appendDataFormItem(mFileViewItem);
-//    model->appendDataFormItem(mShowDirectoryInfoItem);
-//    model->appendDataFormItem(mShowAssociatedIconsItem);
-//    model->appendDataFormItem(mRememberFolderOnExitItem);
-//    model->appendDataFormItem(mRememberLastFolderItem);
-//    model->appendDataFormItem(mShowToolbarItem);
-
-    model->appendDataFormItem(mSupportNetDrivesItem);
-    model->appendDataFormItem(mBypassPlatformSecurityItem);
-    model->appendDataFormItem(mUnlockFilesViaSBItem);
-    model->appendDataFormItem(mIgnoreProtectionAttributesItem);
-    model->appendDataFormItem(mNoROAttributeCopyFromZItem);
-
-    mForm->setModel(model);
-
-    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
-    layout->addItem(mForm);
-    setLayout(layout);
-}
-
-void FbSettingsView::createToolbar()
-{
-    HbToolBar *toolBar = new HbToolBar(this);
-    HbAction *acceptAction = new HbAction(acceptActionText);
-    connect(acceptAction, SIGNAL(triggered()), this, SLOT(accept()));
-    toolBar->addAction(acceptAction);
-
-    HbAction *rejectAction = new HbAction(rejectActionText);
-    connect(rejectAction, SIGNAL(triggered()), this, SLOT(reject()));
-    toolBar->addAction(rejectAction);
-
-    setToolBar(toolBar);
-}
-
-/**
-  Set form item values from settings \a settings.
- */
-void FbSettingsView::loadSettings(const FileBrowserSettings &settings)
-{
-//    mDisplayModeItem->setContentWidgetData("text", settings.displayMode());
-//    mFileViewItem->setContentWidgetData("text", settings.fileViewMode());
-//    mShowDirectoryInfoItem->setContentWidgetData("text", settings.showSubDirectoryInfo());
-//    mShowAssociatedIconsItem->setContentWidgetData("text", settings.showAssociatedIcons());
-//    mRememberFolderOnExitItem->setContentWidgetData("text", settings.rememberFolderSelection());
-//    mRememberLastFolderItem->setContentWidgetData("text", settings.rememberLastPath());
-//    mShowToolbarItem->setContentWidgetData("text", settings.enableToolbar());
-
-    mSupportNetDrivesItem->setContentWidgetData("text", settings.supportNetworkDrives() ? YesText : NoText);
-    mSupportNetDrivesItem->setContentWidgetData("additionalText", !settings.supportNetworkDrives() ? YesText : NoText);
-
-    mBypassPlatformSecurityItem->setContentWidgetData("text", settings.bypassPlatformSecurity() ? YesText : NoText);
-    mBypassPlatformSecurityItem->setContentWidgetData("additionalText", !settings.bypassPlatformSecurity() ? YesText : NoText);
-
-    mUnlockFilesViaSBItem->setContentWidgetData("text", settings.removeFileLocks() ? YesText : NoText);
-    mUnlockFilesViaSBItem->setContentWidgetData("additionalText", !settings.removeFileLocks() ? YesText : NoText);
-
-    mIgnoreProtectionAttributesItem->setContentWidgetData("text", settings.ignoreProtectionsAttributes() ? YesText : NoText);
-    mIgnoreProtectionAttributesItem->setContentWidgetData("additionalText", !settings.ignoreProtectionsAttributes() ? YesText : NoText);
-
-    mNoROAttributeCopyFromZItem->setContentWidgetData("text", settings.removeROMWriteProrection() ? YesText : NoText);
-    mNoROAttributeCopyFromZItem->setContentWidgetData("additionalText", !settings.removeROMWriteProrection() ? YesText : NoText);
-}
-
-/**
-  Store form item data into \a settings
- */
-void FbSettingsView::saveSettings(FileBrowserSettings &settings)
-{
-//    settings.setDisplayMode(mDisplayModeItem->contentWidgetData("text").toInt());
-//    settings.setFileViewMode(mFileViewItem->contentWidgetData("text").toInt());
-//    settings.setShowSubDirectoryInfo(mShowDirectoryInfoItem->contentWidgetData("text").toBool());
-//    settings.setShowAssociatedIcons(mShowAssociatedIconsItem->contentWidgetData("text").toBool());
-//    settings.setRememberLastPath(mRememberFolderOnExitItem->contentWidgetData("text").toBool());
-//    //settings.setLastPath(mRememberLastFolderItem->contentWidgetData("text").toString());
-//    settings.setRememberFolderSelection(mRememberLastFolderItem->contentWidgetData("text").toBool());
-//    settings.setEnableToolbar(mShowToolbarItem->contentWidgetData("text").toBool());
-
-    settings.setSupportNetworkDrives(mSupportNetDrivesItem->contentWidgetData("text").toString() == YesText);
-    settings.setBypassPlatformSecurity(mBypassPlatformSecurityItem->contentWidgetData("text").toString() == YesText);
-    settings.setRemoveFileLocks(mUnlockFilesViaSBItem->contentWidgetData("text").toString() == YesText);
-    settings.setIgnoreProtectionsAttributes(mIgnoreProtectionAttributesItem->contentWidgetData("text").toString() == YesText);
-    settings.setRemoveROMWriteProrection(mNoROAttributeCopyFromZItem->contentWidgetData("text").toString() == YesText);
-}
-
-void FbSettingsView::constructMenu()
-{
-    
-}
-
-void FbSettingsView::accept()
-{
-    saveSettings(mEngineWrapper.settings());
-    mEngineWrapper.saveSettings();
-    emit finished(true);
-}
-
-void FbSettingsView::reject()
-{
-    emit finished(false);
-}
-
-// End of file
--- a/filebrowser/ui/src/filebrowser.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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 <HbApplication>
-#include <HbMainWindow>
-
-#include "fbmainwindow.h"
-
-
-int main(int argc, char *argv[])
-{
-    HbApplication app(argc, argv);
-    FbMainWindow window;
-    window.init();
-    int result = app.exec();
-
-    return result;
-}
--- a/filebrowser/ui/src/filebrowsersortfilterproxymodel.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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 "filebrowsersortfilterproxymodel.h"
-
-#include <QString>
-#include <QStringList>
-
-FileBrowserSortFilterProxyModel::FileBrowserSortFilterProxyModel(QObject *parent)
-    : QSortFilterProxyModel(parent)
-{
-}
-
-bool FileBrowserSortFilterProxyModel::filterAcceptsRow(int sourceRow,
-                                                       const QModelIndex &sourceParent) const
-{
-    QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
-
-    QVariant displayRole = index.data(Qt::DisplayRole);
-    QStringList stringList;
-    if (displayRole.isValid()) {
-        if (displayRole.canConvert<QString>()) {
-            stringList.append(displayRole.toString());
-        } else if (displayRole.canConvert<QStringList>()) {
-            stringList = displayRole.toStringList();
-        }
-        QString itemName = stringList.at(0);
-        //QString criteria = filterRegExp().pattern();
-        QString criteria = filterCriteria();
-        if (!criteria.isEmpty()) {
-            bool contains = itemName.contains(criteria, Qt::CaseInsensitive);
-            return contains;
-        } else {
-            //invalidateFilter();
-            return true;
-        }
-    }
-    return true;
-}
-
-void FileBrowserSortFilterProxyModel::setFilterCriteria(const QString &criteria)
-{
-    mFilterCriteria = criteria;
-    invalidate();
-}
-
-
-// End of File
--- a/filebrowser/ui/src/notifications.cpp	Mon Oct 04 10:09:02 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:
-*
-*/
-#include "notifications.h"
-
-#include <HbLabel>
-#include <HbProgressDialog>
-#include <HbMessageBox>
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout)
-{
-    HbMessageBox *messageBox = new HbMessageBox(type);
-    messageBox->setText(text);
-    if (label.length()) {
-        HbLabel *header = new HbLabel(label, messageBox);
-        messageBox->setHeadingWidget(header);
-    }
-    messageBox->setAttribute(Qt::WA_DeleteOnClose);
-    messageBox->setTimeout(timeout);
-    messageBox->open();
-}
-
-void Notifications::showAboutNote()
-{
-    showMessageBox(HbMessageBox::MessageTypeInformation,
-                   "Version 5.1.1 - 26th July 2010. Copyright © 2010 Nokia Corporation"
-                        "and/or its subsidiary(-ies). All rights reserved."
-                        "Licensed under Eclipse Public License v1.0.",
-                   "About File Browser"
-        );
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showInformationNote(const QString &text, const QString &title)
-{
-    showMessageBox(HbMessageBox::MessageTypeInformation, text, title, 3000);
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showErrorNote(const QString &text, bool noTimeout)
-{
-    showMessageBox(HbMessageBox::MessageTypeWarning, text, "",
-                   noTimeout ? HbPopup::NoTimeout : 3000 /*HbPopup::StandardTimeout*/);
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showConfirmationNote(const QString &text, bool noTimeout)
-{
-    showMessageBox(HbMessageBox::MessageTypeInformation, text, "",
-                   noTimeout ? HbPopup::NoTimeout : 3000 /*HbPopup::ConfirmationNoteTimeout*/);
-}
-
-// ---------------------------------------------------------------------------
-
-bool Notifications::showConfirmationQuery(const QString &aText)
-{
-    Q_UNUSED(aText);
-    return false; //HbMessageBox::question(aText);
-}
-
-// ---------------------------------------------------------------------------
--- a/filebrowser/ui/ui.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-#
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-TEMPLATE = app
-TARGET = FileBrowser
-DEPENDPATH += .
-INCLUDEPATH += ./inc
-load(hb.prf)
-symbian:CONFIG -= symbian_i18n
-
-HEADERS += ./inc/menuaction.h \
-           ./inc/enginewrapper.h \
-           ./inc/fbmainwindow.h \
-           ./inc/fbdrivelistviewitem.h \
-           ./inc/fbdrivemodel.h \
-           ./inc/fbdriveentry.h \
-           ./inc/fbdriveview.h \
-           ./inc/fbfilelistviewitem.h \
-           ./inc/fbfilemodel.h \
-           ./inc/fbfileentry.h \
-           ./inc/fbfileview.h \
-           ./inc/filebrowsersortfilterproxymodel.h \
-           ./inc/filebrowsersettings.h \
-           ./inc/fbsettingsview.h \
-           ./inc/fbeditorview.h \
-           ./inc/fbsearchview.h \
-           ./inc/fbattributesview.h \
-           ./inc/fbfolderselectiondialog.h \
-           ./inc/fbfolderselectorwrapper.h \
-           ./inc/notifications.h
-SOURCES += ./src/filebrowser.cpp \
-           ./src/enginewrapper.cpp \
-           ./src/fbmainwindow.cpp \
-           ./src/fbdrivelistviewitem.cpp \
-           ./src/fbdrivemodel.cpp \
-           ./src/fbdriveentry.cpp \
-           ./src/fbdriveview.cpp \
-           ./src/fbfilelistviewitem.cpp \
-           ./src/fbfilemodel.cpp \
-           ./src/fbfileentry.cpp \
-           ./src/fbfileview.cpp \
-           ./src/filebrowsersortfilterproxymodel.cpp \
-           ./src/fbsettingsview.cpp \
-           ./src/fbeditorview.cpp \
-           ./src/fbsearchview.cpp \
-           ./src/fbattributesview.cpp \
-           ./src/fbfolderselectiondialog.cpp \
-           ./src/fbfolderselectorwrapper.cpp \
-           ./src/notifications.cpp
-RESOURCES += ./ui.qrc
-
-symbian {
-    INCLUDEPATH += ../
-    LIBS += -leikcore \
-            -lcommonengine \
-            -ltzclient \
-            -lapmime \
-            -lcommonui \
-            -leuser \
-            -lapparc \
-            -lcone \
-            -lws32 \
-            -lfbscli \
-            -lImageConversion \
-            -lPlatformEnv \
-            -lapgrfx \
-            -lefsrv \
-            -lbafl \
-            -lCentralRepository \
-            -lmediaclientaudio \
-            -lestor \
-            -lgdi \
-            -legul \
-            -lsendui \
-            -lmsgs \
-            -lezlib \
-            -lcdlengine \
-            -lremconcoreapi \
-            -lremconinterfacebase \
-            -lsbeclient \
-            -lhash \
-            -letext \
-            -lcharconv \
-        #ifndef FILEBROWSER_LITE
-            -lfilebrowserfileopclient
-        #endif"
-
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
-    HEADERS += ../engine/engine.h \
-               ../engine/FBFileUtils.h \
-               ../engine/FBFileOps.h \
-               ../engine/FB.hrh \
-               ../engine/FBStd.h \
-               ../engine/FBTraces.h \
-               ../engine/FBFolderSelector.h \
-            #ifndef FILEBROWSER_LITE
-               ../fileopclient/inc/FBFileOpClient.h
-            #endif
-    SOURCES += ../engine/engine.cpp \
-               ../engine/FBFileUtils.cpp \
-               ../engine/FBFileOps.cpp \
-               ../engine/FBFolderSelector.cpp
-    RSS_RULES += "group_name = \"RnD Tools\";"
-    TARGET.CAPABILITY = NetworkServices LocalServices CAP_APPLICATION AllFiles DiskAdmin
-    TARGET.UID3 = 0xE85157B0
-    TARGET.VID = 0x101FB657 // Nokia
-    TARGET.EPOCHEAPSIZE  = 0x20000 0x4000000  // Min 128Kb, Max 64Mb
-    ICON = ../icons/qgn_menu_filebrowser.svg
-} else {
-    error("Only Symbian supported!")
-}
-	
--- a/filebrowser/ui/ui.qrc	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<RCC>
-    <qresource prefix="/">
-        <file alias="qgn_indi_tb_filebrowser_folder_parent.svg" >../icons/qgn_indi_tb_filebrowser_folder_parent.svg</file>
-        <file alias="qgn_indi_tb_filebrowser_find.svg" >../icons/qgn_indi_tb_filebrowser_find.svg</file>
-        <file alias="qgn_indi_tb_filebrowser_selection_active.svg" >../icons/qgn_indi_tb_filebrowser_selection_active.svg</file>
-        <file alias="qtg_indi_status_back.svg" >../icons/qtg_indi_status_back.svg</file>
-    </qresource>
-</RCC>
--- a/launcher/ReleaseNotes_Launcher.txt	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-===============================================================================
-
-RELEASE NOTES - LAUNCHER v4.0.1
-RELEASED 21st May 2010 
-
-SUPPORTS S60 3.0+
-
-===============================================================================
-
-Product Description:
-====================
-Launcher is a testing utility application aimed to help test the launching of
-applications installed in the system, both on user side disk drives and on
-ROM. Launcher tests if an application can be launched and then, if the launch
-has failed, reports the possible reason for the failure. It is a very useful
-application when checking the build as the user can instantly see if the
-applications work. Launcher can also be used when testing binary
-compatibility issues because it can reveal any DLL files missing from the
-device.
-
-Main Features:
-==============
-- Show a list of installed applications in all drives
-- Launch selected applications and read their statuses from threads
-- In case of a failure, report thread's exit type, reason and category
-- Show missing DLL files required by the binary to be launched
-- Show problems on the UI and print all cases to a log file
-- Generate a list of DLLs in the device to a file
-- Analyse binary compatibility of system DLLs comparing them to a user
-  given reference data. Report any binary compatibility issues or missing
-  DLL files.
-
-===============================================================================
-
-What's New in v4.0.1
-====================
-- Feature: Orbit UI improvements
-- Fix: Launching DLL analysis not starting
-
-===============================================================================
-
-Installation Notes:
-===================
-Launcher is typically preinstalled on ROM. If not, it can be added to the
-ROM with the .iby file. Alternatively, a .sis file can be found under the sis-
-directory, but the user needs to sign it with their own developer certificate.
-In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
-internal\sis directory.
-
-When signing with own developer certificate, the following capabilities are
-needed:
-  PowerMgmt
-  ReadDeviceData
-  WriteDeviceData
-  AllFiles
-  ReadUserData
-  WriteUserData
-
-When building Launcher against S60 3.0 or 3.1, you may need to patch your SDK
-environment first with some fixes. For more information, please refer to the
-instructions under the "envpatcher" directory.
-  
-===============================================================================
-
-System Requirements:
-====================
-Basic Requirements:
-- Any S60 3.x device or emulator environment
-
-===============================================================================
-
-Compatibility Issues:
-=====================
-N/A
-
-===============================================================================
-
-Known Issues:
-=============
-
-Fails in a test despite the application is working correctly
-------------------------------------------------------------
-- Some application may exit immediately after a launch. This can be
-  normal behavior and should be checked manually. Such application is, for example, 
-  irapp.exe.
-  
-Binary compatibility check support
-----------------------------------
-- Currently, only uncompressed and deflate compressed ELF binaries are
-  supported. This means that for example WINSCW is not supported.
-
-===============================================================================
-
-Version History:
-================
-3.7.0 - 29th May 2009
-- Feature: Binary compatiblity check for DLLs, which checks UID1, UID2, UID3, SID
-and capability values of system DLLs against an XML-formatted input file.
-- Fix: Launcher panics when comparing a large DLL list against system DLLs.
-- Fix: Launcher panics when application launching is cancelled.
-
-Version 3.6.3 - 14th March 2008
--------------------------------
-- Change: Removed unnecessary capabilities
-
-Version 3.6.2 - 6th November 2007
---------------------------------
-- Fix: Applications can be selected/unselected on a touch UI
-- Fix: Scroll bar in the output view can be scrolled on a touch UI
-
-Version 3.6.1 - 9th October 2007
---------------------------------
-- Fix: Layout in out tab in mirrored mode
-- Fix: Codescanner high warnings
-
-Version 3.6.0 - 25th January 2007
----------------------------------
-- Fix: Re-fix problems when reading import section from binaries
-- Fix: Output screen for larger resolutions
-- Fix: Stopping of launching
-
-Version 3.5.0 - 4th December 2006
----------------------------------
-- Fix: Problems when reading import section from binaries
-- Change: Marquee used for items in the application list view
-
-===============================================================================
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-
-This component and the accompanying materials are made available
-under the terms of "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
--- a/launcher/engine/inc/e32image.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +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 __LAUNCHERE32IMAGE_H__
-#define __LAUNCHERE32IMAGE_H__
-
-#include <e32base.h>
-#include <badesca.h>
-#include <eikenv.h>
-#include <e32ldr_private.h>
-
-class E32ImageHeader;
-class E32ImportSection;
-class E32RelocSection;
-class CEikonEnv;
-
-
-NONSHARABLE_CLASS(E32ImageReader) : public CBase, public TProcessCreateInfo
-	{
-public:
-	static E32ImageReader* NewLC();
-	~E32ImageReader();
-
-public:
-    CDesCArray* ListOfDLLsL(const TDesC& aFullPathToE32Image);
-
-private:
-	E32ImageReader();
-	void ConstructL();
-    TInt LoadData();
-    static TUint8* MemoryMove(TAny* aDestination, const TAny* aSource, TInt aNumberofBytes);
-    TInt LoadFile(TUint32 aCompression);
-    TInt LoadFileNoCompress();
-    void LoadFileInflateL();
-    TInt Read(TText8* aDest, TInt aSize);
-    TInt Read(TInt aPos, TText8* aDest, TInt aSize);
-    TInt ReadImportData();
-
-private:
-	CEikonEnv*      iEnv;
-
-public:
-	E32ImageHeader* iHeader;
-	E32ImportSection* iImportSection;
-	E32RelocSection* iCodeRelocSection;
-	E32RelocSection* iDataRelocSection;
-	TUint32* iImportData;
-	TUint8* iRestOfFileData;
-	TUint32 iRestOfFileSize;
-	TUint32 iConversionOffset;
-	RFile iFile;
-	TUint32 iCodeDelta;
-	TUint32 iDataDelta;
-	TUint32 iExportDirLoad;
-	TBool isDll;
-	TBool iAlreadyLoaded;
-	TAny* iCloseCodeSeg;
-	TInt iCurrentImportCount;
-	TInt iNextImportPos;
-	TUint32* iCurrentImportList;
-	TUint8 iCurrentImportListSorted;
-	TUint8 iExportDirLoadAllocated;
-	TUint8 iPadding1;
-	TUint8 iPadding2;
-	};
-
-#endif // __LAUNCHERE32IMAGE_H__
--- a/launcher/engine/inc/e32imageheaders.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,540 +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 __LAUNCHERE32IMAGEHEADERS_H__
-#define __LAUNCHERE32IMAGEHEADERS_H__
-
-#include <e32uid.h>
-
-// from e32Huffman.h
-
-/** @file
-    @internalTechnology
-*/
-
-/** Bit output stream.
-    Good for writing bit streams for packed, compressed or huffman data algorithms.
-
-    This class must be derived from and OverflowL() reimplemented if the bitstream data
-    cannot be generated into a single memory buffer.
-*/
-class TBitOutput
-    {
-public:
-    IMPORT_C TBitOutput();
-    IMPORT_C TBitOutput(TUint8* aBuf,TInt aSize);
-    inline void Set(TUint8* aBuf,TInt aSize);
-    inline const TUint8* Ptr() const;
-    inline TInt BufferedBits() const;
-//
-    IMPORT_C void WriteL(TUint aValue, TInt aLength);
-    IMPORT_C void HuffmanL(TUint aHuffCode);
-    IMPORT_C void PadL(TUint aPadding);
-private:
-    void DoWriteL(TUint aBits, TInt aSize);
-    virtual void OverflowL();
-private:
-    TUint iCode;        // code in production
-    TInt iBits;
-    TUint8* iPtr;
-    TUint8* iEnd;
-    };
-
-/** Set the memory buffer to use for output
-
-    Data will be written to this buffer until it is full, at which point OverflowL() will
-    be called. This should handle the data and then can Set() again to reset the buffer
-    for further output.
-    
-    @param aBuf The buffer for output
-    @param aSize The size of the buffer in bytes
-*/
-inline void TBitOutput::Set(TUint8* aBuf,TInt aSize)
-    {iPtr=aBuf;iEnd=aBuf+aSize;}
-    
-/** Get the current write position in the output buffer
-
-    In conjunction with the address of the buffer, which should be known to the
-    caller, this describes the data in the bitstream.
-*/
-inline const TUint8* TBitOutput::Ptr() const
-    {return iPtr;}
-    
-/** Get the number of bits that are buffered
-
-    This reports the number of bits that have not yet been written into the
-    output buffer. It will always lie in the range 0..7. Use PadL() to
-    pad the data out to the next byte and write it to the buffer.
-*/
-inline TInt TBitOutput::BufferedBits() const
-    {return iBits+8;}
-
-/** Bit input stream. Good for reading bit streams for packed, compressed or huffman
-    data algorithms.
-*/
-class TBitInput
-    {
-public:
-    IMPORT_C TBitInput();
-    IMPORT_C TBitInput(const TUint8* aPtr, TInt aLength, TInt aOffset=0);
-    IMPORT_C void Set(const TUint8* aPtr, TInt aLength, TInt aOffset=0);
-//
-    IMPORT_C TUint ReadL();
-    IMPORT_C TUint ReadL(TInt aSize);
-    IMPORT_C TUint HuffmanL(const TUint32* aTree);
-private:
-    virtual void UnderflowL();
-private:
-    TInt iCount;
-    TUint iBits;
-    TInt iRemain;
-    const TUint32* iPtr;
-    };
-
-
-/** Huffman code toolkit.
-
-    This class builds a huffman encoding from a frequency table and builds
-    a decoding tree from a code-lengths table
-
-    The encoding generated is based on the rule that given two symbols s1 and s2, with 
-    code length l1 and l2, and huffman codes h1 and h2:
-
-        if l1<l2 then h1<h2 when compared lexicographically
-        if l1==l2 and s1<s2 then h1<h2 ditto
-
-    This allows the encoding to be stored compactly as a table of code lengths
-*/
-class Huffman
-    {
-public:
-    enum {KMaxCodeLength=27};
-    enum {KMetaCodes=KMaxCodeLength+1};
-    enum {KMaxCodes=0x8000};
-public:
-    IMPORT_C static void HuffmanL(const TUint32 aFrequency[],TInt aNumCodes,TUint32 aHuffman[]);
-    IMPORT_C static void Encoding(const TUint32 aHuffman[],TInt aNumCodes,TUint32 aEncodeTable[]);
-    IMPORT_C static void Decoding(const TUint32 aHuffman[],TInt aNumCodes,TUint32 aDecodeTree[],TInt aSymbolBase=0);
-    IMPORT_C static TBool IsValid(const TUint32 aHuffman[],TInt aNumCodes);
-//
-    IMPORT_C static void ExternalizeL(TBitOutput& aOutput,const TUint32 aHuffman[],TInt aNumCodes);
-    IMPORT_C static void InternalizeL(TBitInput& aInput,TUint32 aHuffman[],TInt aNumCodes);
-    };
-
-// end e32Huffman.h
-
-enum TCpu
-	{
-	ECpuUnknown=0, ECpuX86=0x1000, ECpuArmV4=0x2000, ECpuArmV5=0x2001, ECpuArmV6=0x2002, ECpuMCore=0x4000
-	};
-	
-const TInt KOrdinalBase=1;
-const TUint KImageDll				= 0x00000001u;
-const TUint KImageNoCallEntryPoint	= 0x00000002u;
-const TUint KImageFixedAddressExe	= 0x00000004u;
-const TUint KImageOldJFlag			= 0x00000008u;	// so we can run binaries built with pre 2.00 tools (hdrfmt=0)
-const TUint KImageOldElfFlag		= 0x00000010u;	// so we can run binaries built with pre 2.00 tools (hdrfmt=0)
-const TUint KImageABIMask			= 0x00000018u;	// only if hdr fmt not zero
-const TInt	KImageABIShift			= 3;
-const TUint	KImageABI_GCC98r2		= 0x00000000u;	// for ARM
-const TUint	KImageABI_EABI			= 0x00000008u;	// for ARM
-const TUint KImageEptMask			= 0x000000e0u;	// entry point type
-const TInt	KImageEptShift			= 5;
-const TUint KImageEpt_Eka1			= 0x00000000u;
-const TUint KImageEpt_Eka2			= 0x00000020u;
-const TUint KImageHdrFmtMask		= 0x0f000000u;
-const TInt	KImageHdrFmtShift		= 24;
-const TUint KImageHdrFmt_Original	= 0x00000000u;	// without compression support
-const TUint KImageHdrFmt_J			= 0x01000000u;	// with compression support
-const TUint KImageHdrFmt_V			= 0x02000000u;	// with versioning support
-const TUint KImageImpFmtMask		= 0xf0000000u;
-const TInt	KImageImpFmtShift		= 28;
-const TUint KImageImpFmt_PE			= 0x00000000u;	// PE-derived imports
-const TUint KImageImpFmt_ELF		= 0x10000000u;	// ELF-derived imports
-const TUint KImageImpFmt_PE2		= 0x20000000u;	// PE-derived imports without redundant copy of import ordinals
-const TUint KImageHWFloatMask		= 0x00f00000u;
-const TInt	KImageHWFloatShift		= 20;
-const TUint	KImageHWFloat_None		= EFpTypeNone << KImageHWFloatShift; // No hardware floating point used
-const TUint KImageHWFloat_VFPv2		= EFpTypeVFPv2 << KImageHWFloatShift; // ARM VFPv2 floating point used
-
-const TUint KMyFormatNotCompressed=0;
-const TUint KMyUidCompressionDeflate=0x101F7AFC;
-
-const TUint32 KImageCrcInitialiser	= 0xc90fdaa2u;
-/*
-const TUint16 KReservedRelocType        = (TUint16)0x0000;
-const TUint16 KTextRelocType            = (TUint16)0x1000;
-const TUint16 KDataRelocType            = (TUint16)0x2000;
-const TUint16 KInferredRelocType        = (TUint16)0x3000;
-*/
-class RFile;
-class E32ImageHeader
-	{
-public:
-	inline static TUint ABIFromFlags(TUint aFlags)
-		{
-		if (aFlags&KImageHdrFmtMask)
-			return aFlags & KImageABIMask;
-		if (aFlags&KImageOldElfFlag)
-			return KImageABI_EABI;
-		return KImageABI_GCC98r2;
-		}
-	inline static TUint EptFromFlags(TUint aFlags)
-		{
-		if (aFlags&KImageHdrFmtMask)
-			return aFlags & KImageEptMask;
-		if (aFlags&KImageOldJFlag)
-			return KImageEpt_Eka2;
-		return KImageEpt_Eka1;
-		}
-	inline static TUint HdrFmtFromFlags(TUint aFlags)
-		{
-		if (aFlags&KImageHdrFmtMask)
-			return aFlags & KImageHdrFmtMask;
-		if (aFlags&KImageOldJFlag)
-			return KImageHdrFmt_J;
-		return KImageHdrFmt_Original;
-		}
-	inline static TUint ImpFmtFromFlags(TUint aFlags)
-		{
-		if (aFlags&KImageHdrFmtMask)
-			return aFlags & KImageImpFmtMask;
-		if (aFlags&KImageOldElfFlag)
-			return KImageImpFmt_ELF;
-		return KImageImpFmt_PE;
-		}
-	inline TUint32 CompressionType() const
-		{
-		if (HdrFmtFromFlags(iFlags) >= KImageHdrFmt_J)
-			return iCompressionType;
-		return 0;
-		}
-	inline TUint32 ModuleVersion() const
-		{
-		if ((iFlags & KImageHdrFmtMask) >= KImageHdrFmt_V)
-			return iModuleVersion;
-		return 0x00000000u;
-		}
-	inline TInt TotalSize() const;
-	inline TInt UncompressedFileSize() const;
-	inline TUint HeaderFormat() const
-		{ return HdrFmtFromFlags(iFlags); }
-	inline TUint EntryPointFormat() const
-		{ return EptFromFlags(iFlags); }
-	inline TUint ImportFormat() const
-		{ return ImpFmtFromFlags(iFlags); }
-	inline TUint ABI() const
-		{ return ABIFromFlags(iFlags); }
-	inline void GetSecurityInfo(SSecurityInfo& aInfo) const;
-	inline TCpu CpuIdentifier() const;
-	inline TProcessPriority ProcessPriority() const;
-	inline TUint32 ExceptionDescriptor() const;
-	TInt IntegrityCheck(TInt aFileSize);
-	static TInt New(E32ImageHeader*& aHdr, RFile& aFile);
-public:
-	TUint32	iUid1;
-	TUint32	iUid2;
-	TUint32	iUid3;
-	TUint32 iUidChecksum;
-	TUint iSignature;			// 'EPOC'
-	TUint32	iHeaderCrc;			// CRC-32 of entire header
-	TUint32 iModuleVersion;		// Version number for this executable (used in link resolution)
-	TUint32 iCompressionType;	// Type of compression used (UID or 0 for none)
-	TVersion iToolsVersion;		// Version of PETRAN/ELFTRAN which generated this file
-	TUint32 iTimeLo;
-	TUint32 iTimeHi;
-	TUint iFlags;				// 0 = exe, 1 = dll, 2 = fixed address exe
-	TInt iCodeSize;				// size of code, import address table, constant data and export dir
-	TInt iDataSize;				// size of initialised data
-	TInt iHeapSizeMin;
-	TInt iHeapSizeMax;
-	TInt iStackSize;
-	TInt iBssSize;
-	TUint iEntryPoint;			// offset into code of entry point
-	TUint iCodeBase;			// where the code is linked for	
-	TUint iDataBase;			// where the data is linked for
-	TInt iDllRefTableCount;		// filling this in enables E32ROM to leave space for it
-	TUint iExportDirOffset;		// offset into the file of the export address table
-	TInt iExportDirCount;
-	TInt iTextSize;				// size of just the text section, also doubles as the offset for the iat w.r.t. the code section
-	TUint iCodeOffset;			// file offset to code section, also doubles as header size
-	TUint iDataOffset;			// file offset to data section
-	TUint iImportOffset;		// file offset to import section
-	TUint iCodeRelocOffset;		// relocations for code and const
-	TUint iDataRelocOffset;		// relocations for data
-	TUint16 iProcessPriority;	// executables priority
-	TUint16 iCpuIdentifier;		// 0x1000 = X86, 0x2000 = ARM
-	};
-
-class E32ImageHeaderComp : public E32ImageHeader
-	{
-public:
-	TUint32 iUncompressedSize;	// Uncompressed size of file
-								// For J format this is file size - sizeof(E32ImageHeader)
-								//  and this is included as part of the compressed data :-(
-								// For other formats this is file size - total header size
-	};
-
-class E32ImageHeaderV : public E32ImageHeaderComp
-	{
-public:
-	SSecurityInfo iS;
-
-	// Use iSpare1 as offset to Exception Descriptor
-	TUint32 iExceptionDescriptor;   // Offset in bytes from start of code section to Exception Descriptor, bit 0 set if valid
-	TUint32 iSpare2;
-	TUint16	iExportDescSize;	// size of bitmap section
-	TUint8	iExportDescType;	// type of description of holes in export table
-	TUint8	iExportDesc[1];		// description of holes in export table - extend
-	};
-
-// export description type
-const TUint	KImageHdr_ExpD_NoHoles			=0x00;	// no holes, all exports present
-const TUint	KImageHdr_ExpD_FullBitmap		=0x01;	// full bitmap present
-const TUint	KImageHdr_ExpD_SparseBitmap8	=0x02;	// sparse bitmap present, granularity 8
-const TUint	KImageHdr_ExpD_Xip				=0xff;	// XIP file
-
-
-inline TInt E32ImageHeader::TotalSize() const
-	{
-	if (HeaderFormat() == KImageHdrFmt_J && iCompressionType != 0)
-		return sizeof(E32ImageHeaderComp);
-	return iCodeOffset;
-	}
-
-inline TInt E32ImageHeader::UncompressedFileSize() const
-	{
-	TUint hdrfmt = HeaderFormat();
-	if (hdrfmt == KImageHdrFmt_Original || iCompressionType == 0)
-		return -1;			// not compressed
-	else if (hdrfmt == KImageHdrFmt_J)
-		return ((E32ImageHeaderComp*)this)->iUncompressedSize + sizeof(E32ImageHeader);
-	else
-		return ((E32ImageHeaderComp*)this)->iUncompressedSize + iCodeOffset;
-	}
-
-extern const SSecurityInfo KDefaultSecurityInfo;
-inline void E32ImageHeader::GetSecurityInfo(SSecurityInfo& aInfo) const
-	{
-	if (HeaderFormat() >= KImageHdrFmt_V)
-		aInfo = ((E32ImageHeaderV*)this)->iS;
-	else
-		aInfo = KDefaultSecurityInfo;
-	}
-
-inline TCpu E32ImageHeader::CpuIdentifier() const
-	{
-	if (HeaderFormat() >= KImageHdrFmt_V)
-		return (TCpu)iCpuIdentifier;
-	return (TCpu)iHeaderCrc;
-	}
-
-inline TProcessPriority E32ImageHeader::ProcessPriority() const
-	{
-	if (HeaderFormat() >= KImageHdrFmt_V)
-		return (TProcessPriority)iProcessPriority;
-	return *(const TProcessPriority*)&iProcessPriority;
-	}
-
-inline TUint32 E32ImageHeader::ExceptionDescriptor() const
-	{
-	if (HeaderFormat() >= KImageHdrFmt_V)
-		{
-		TUint32 xd = ((E32ImageHeaderV*)this)->iExceptionDescriptor;
-		if ((xd & 1) && (xd != 0xffffffffu))
-			return (xd & ~1);
-		}
-	return 0;
-	}
-
-class E32ImportBlock
-	{
-public:
-	inline const E32ImportBlock* NextBlock(TUint aImpFmt) const;
-	inline TInt Size(TUint aImpFmt) const;
-	inline const TUint* Imports() const;	// import list if present
-public:
-	TUint32	iOffsetOfDllName;	// offset of name of dll importing from
-	TInt	iNumberOfImports;	// no of imports from this dll
-//	TUint	iImport[iNumberOfImports];	// list of imported ordinals, omitted in PE2 import format
-	};
-
-inline TInt E32ImportBlock::Size(TUint aImpFmt) const
-	{
-	TInt r = sizeof(E32ImportBlock);
-	if (aImpFmt!=KImageImpFmt_PE2)
-		r += iNumberOfImports * sizeof(TUint);
-	return r;
-	}
-
-inline const E32ImportBlock* E32ImportBlock::NextBlock(TUint aImpFmt) const
-	{
-	const E32ImportBlock* next = this + 1;
-	if (aImpFmt!=KImageImpFmt_PE2)
-		next = (const E32ImportBlock*)( (TUint8*)next + iNumberOfImports * sizeof(TUint) );
-	return next;
-	}
-
-inline const TUint* E32ImportBlock::Imports() const
-	{
-	return (const TUint*)(this + 1);
-	}
-
-class E32ImportSection
-	{
-public:
-	TInt iSize;					// size of this section
-//	E32ImportBlock[iDllRefTableCount];
-	};
-
-class E32RelocSection
-	{
-public:
-	TInt iSize;					// size of this relocation section
-	TInt iNumberOfRelocs;		// number of relocations in this section
-	};
-
-
-typedef TUint8* (*TMemoryMoveFunction)(TAny* aTrg,const TAny* aSrc,TInt aLength);
-
-const TInt KDeflateLengthMag=8;
-const TInt KDeflateDistanceMag=12;
-const TInt KDeflateMinLength=3;
-const TInt KDeflateMaxLength=KDeflateMinLength-1 + (1<<KDeflateLengthMag);
-const TInt KDeflateMaxDistance=(1<<KDeflateDistanceMag);
-const TInt KDeflateDistCodeBase=0x200;
-const TUint KDeflateHashMultiplier=0xAC4B9B19u;
-const TInt KDeflateHashShift=24;
-const TInt KInflateWindowSize=0x8000;
-
-
-class TEncoding
-	{
-public:
-	enum {ELiterals=256,ELengths=(KDeflateLengthMag-1)*4,ESpecials=1,EDistances=(KDeflateDistanceMag-1)*4};
-	enum {ELitLens=ELiterals+ELengths+ESpecials};
-	enum {EEos=ELiterals+ELengths};
-public:
-	TUint32 iLitLen[ELitLens];
-	TUint32 iDistance[EDistances];
-	};
-
-const TInt KDeflationCodes=TEncoding::ELitLens+TEncoding::EDistances;
-
-NONSHARABLE_CLASS(CInflater) : public CBase
-	{
-public:
-	enum {EBufSize = 0x800, ESafetyZone=8};
-public:
-	static CInflater* NewLC(TBitInput& aInput);
-	~CInflater();
-	TInt ReadL(TUint8* aBuffer,TInt aLength, TMemoryMoveFunction aMemMovefn);
-	TInt SkipL(TInt aLength);
-private:
-	CInflater(TBitInput& aInput);
-	void ConstructL();
-	void InitL();
-	TInt InflateL();
-private:
-	TBitInput* iBits;
-	const TUint8* iRptr;			
-	TInt iLen;
-	const TUint8* iAvail;		
-	const TUint8* iLimit;
-	TEncoding* iEncoding;
-	TUint8* iOut;				
-	};
-
-void DeflateL(const TUint8* aBuf, TInt aLength, TBitOutput& aOutput);
-
-	
-NONSHARABLE_CLASS(TFileInput) : public TBitInput
-	{
- 	enum {KBufSize=KInflateWindowSize};
-public:
-	TFileInput(RFile& aFile);
-	void Cancel();
-private:
-	void UnderflowL();
-private:
-	RFile& iFile;
-	TRequestStatus iStat;
-	TUint8* iReadBuf;
-	TPtr8 iPtr;
-	TUint8 iBuf1[KBufSize];
-	TUint8 iBuf2[KBufSize];
-	};
-
-class TFileNameInfo
-	{
-public:
-	enum
-    	{
-    	EIncludeDrive=1,
-    	EIncludePath=2,
-    	EIncludeBase=4,
-    	EIncludeVer=8,
-    	EForceVer=16,
-    	EIncludeUid=32,
-    	EForceUid=64,
-    	EIncludeExt=128,
-    	EIncludeDrivePath=EIncludeDrive|EIncludePath,
-    	EIncludeBaseExt=EIncludeBase|EIncludeExt,
-    	EIncludeDrivePathBaseExt=EIncludeDrive|EIncludePath|EIncludeBase|EIncludeExt,
-    	};
-	enum
-		{
-		EAllowUid=1,
-		EAllowPlaceholder=2,
-		EAllowDecimalVersion=4,
-		};
-public:
-	TFileNameInfo();
-	TInt Set(const TDesC8& aFileName, TUint aFlags);
-	void Dump() const;
-public:
-	inline TInt DriveLen() const {return iPathPos;}
-	inline TInt PathLen() const {return iBasePos-iPathPos;}
-	inline TInt BaseLen() const {return iVerPos-iBasePos;}
-	inline TInt VerLen() const {return iUidPos-iVerPos;}
-	inline TInt UidLen() const {return iExtPos-iUidPos;}
-	inline TInt ExtLen() const {return iLen-iExtPos;}
-	inline TPtrC8 Drive() const {return TPtrC8(iName, iPathPos);}
-	inline TPtrC8 Path() const {return TPtrC8(iName+iPathPos, iBasePos-iPathPos);}
-	inline TPtrC8 DriveAndPath() const {return TPtrC8(iName, iBasePos);}
-	inline TPtrC8 Base() const {return TPtrC8(iName+iBasePos, iVerPos-iBasePos);}
-	inline TPtrC8 VerStr() const {return TPtrC8(iName+iVerPos, iUidPos-iVerPos);}
-	inline TPtrC8 UidStr() const {return TPtrC8(iName+iUidPos, iExtPos-iUidPos);}
-	inline TPtrC8 Ext() const {return TPtrC8(iName+iExtPos, iLen-iExtPos);}
-	inline TUint32 Version() const {return iVersion;}
-	inline TUint32 Uid() const {return iUid;}
-	void GetName(TDes8& aName, TUint aFlags) const;
-public:
-	const TText8* iName;
-	TInt iPathPos;
-	TInt iBasePos;
-	TInt iVerPos;
-	TInt iUidPos;
-	TInt iExtPos;
-	TInt iLen;
-	TUint32 iVersion;
-	TUint32 iUid;
-	};
-
-
-#endif // __LAUNCHERE32IMAGEHEADERS_H__
--- a/launcher/engine/inc/launcherdllelement.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +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 LAUNCHERDLLELEMENT_H_
-#define LAUNCHERDLLELEMENT_H_
-
-#include <e32base.h>
-
-typedef TBuf8<8> TDllIdValue;
-
-class CLauncherDLLElement : public CBase
-    {
-public:
-    
-    enum TDifference
-        {
-        EDifference_UID1,      // UID1 is different
-        EDifference_UID2,      // UID1 is different
-        EDifference_UID3,      // UID1 is different
-        EDifference_SID,       // SID is different
-        EDifference_Capability // Capabilities are different
-        };
-    
-    virtual ~CLauncherDLLElement();
-    static CLauncherDLLElement* NewL();
-    static CLauncherDLLElement* NewLC(); 
-    
-    /*
-     * Compares DLL elements.
-     * @return ETrue if differencies exist, EFalse otherwise.     
-     * @param aReferenceElement Reference DLL-element for comparison
-     * @param aDifferenceList Differencies are added to this list.
-     */
-    TBool CompareL(const CLauncherDLLElement& aReferenceElement, RArray<TDifference>& aDifferenceList) const;
-    
-    /*
-     * Returns DLL name
-     * @return DLL name
-     */
-    TFileName Name() const;    
-    /*
-     * Sets DLL name
-     * @param aName DLL name
-     */
-    void SetNameL(const TFileName& aName);
-    
-    /*
-     * Returns DLL UID1
-     * @return UID1 object
-     */
-    TUid UID1() const;
-    
-    /*
-     * Sets DLL UID1 
-     * @param aUID1 UID1 object
-     */
-    void SetUID1L(TUid aUID1);
-    
-    /*
-     * Returns DLL UID2
-     * @return UID2 object
-     */
-    TUid UID2() const;
-        
-    /*
-     * Sets DLL UID2 
-     * @param aUID2 UID2 object
-     */
-    void SetUID2L(TUid aUID2);
-        
-    /*
-     * Returns DLL UID3
-     * @return UID3 object
-     */
-    TUid UID3() const;
-    
-    /*
-     * Sets DLL UID3
-     * @param aUID3 UID3 object
-     */
-    void SetUID3L(TUid aUID3);
-    
-    /*
-     * Returns DLL SID
-     * @return SID object
-     */
-    TUid SID() const;
-    
-    /*
-     * Sets DLL SID
-     * @param aSID SID object
-     */
-    void SetSIDL(TUid aSID);
-    
-    /*
-     * Returns DLL capability
-     * @return capability value
-     */    
-    TUint32 Capability() const;
-    
-    /*
-     * Sets DLL capability
-     * @param aCapability capability value
-     */
-    void SetCapabilityL(TUint32 aCapability);
-    
-protected:
-    CLauncherDLLElement();
-    virtual void ConstructL();
-    
-private:
-    TFileName   iName;
-    TUid iUID1;
-    TUid iUID2;
-    TUid iUID3;
-    TUid iSID;
-    TUint32 iCapability;
-    };
-
-#endif /* LAUNCHERDLLELEMENT_H_ */
--- a/launcher/engine/inc/launcherdllparser.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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 LAUNCHERDLLPARSER_H_
-#define LAUNCHERDLLPARSER_H_
-
-#include <e32base.h>
-#include <f32file.h>
-#include "launcherdllelement.h"
-
-#define UID1_OFFSET 0x00
-#define UID2_OFFSET 0x04
-#define UID3_OFFSET 0x08
-#define SID_OFFSET_ROM 0x44
-#define SID_OFFSET_ROFS 0x80
-#define CAPABILITY_OFFSET_ROM 0x4c
-#define CAPABILITY_OFFSET_ROFS 0x88
-
-class CLauncherDLLParser : public CBase
-    {
-public:
-
-    virtual ~CLauncherDLLParser();
-    static CLauncherDLLParser* NewL();
-    static CLauncherDLLParser* NewLC();
-    
-    /**
-     * Reads data from the given DLL-file and sets parsed data to given object.
-     * @param aFileSession Reference to an open file session     
-     * @param aFile Reference to the DLL file object
-     * @param aElement Reference to the element, which will contain the parsed data
-     */
-    void ParseL( RFs& aFileSession, RFile& aFile, CLauncherDLLElement& aElement );
-    
-private:
-
-    CLauncherDLLParser();
-    void ConstructL();
-    
-    /**
-     * Reads 32-bit unsigned integer from the given file.
-     * @return 32-bit unsigned integer value.
-     * @param aFile File handle.
-     */
-    TUint32 ReadUint32L( RFile& aFile );
-    };
-
-#endif /* LAUNCHERDLLPARSER_H_ */
--- a/launcher/engine/inc/launcherengine.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +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 LAUNCHERENGINE_H
-#define LAUNCHERENGINE_H
-
-#include <e32base.h>
-#include <apgcli.h>
-#include <w32std.h>
-#include <e32std.h>
-#include <e32hal.h>
-
-#include "launcherparserobserver.h"
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CEikonEnv;
-class CAppThreadChecker;
-class CAppRunningChecker;
-class CLauncherXMLParser;
-class CLauncherDLLParser;
-
-
-// INFERFACE FOR COMMUNICATION WITH UI
-
-class MLauncherUI
-{
-public:
-    /**
-     * Method for writing text to output window.
-     * @param aText A text to be written.
-     * @return None.
-     */
-    virtual void PrintText(const TDesC& aText) = 0;
-
-    /**
-     * Shows info message with text
-     * @param aText An text to be shown in message.
-     * @return None.
-     */
-    virtual void ShowInfoMessage(const TDesC& aText) = 0;
-    
-    /**
-     * Shows error message with error text
-     * @param aText An error text to be shown in message.
-     * @return None.
-     */
-    virtual void ShowErrorMessage(const TDesC& aText) = 0;
-    
-    /**
-     * Shows progress bar with text
-     * @param aText A text to be shown at top of the progress bar.
-     * @param aMinimum A minimum progress bar value.
-     * @param aMaximum A maximum progress bar value.
-     * @return None.
-     */
-    virtual void ShowProgressBar(const TDesC& aText, TInt aMinimum, TInt aMaximum ) = 0;
-
-    /**
-     * Sets progress bar value
-     * @param aValue A value between min and max value of the progress bar range
-     * @return None.
-     */
-    virtual void SetProgressBarValue(TInt aValue) = 0;
-
-    /**
-     * Hides progress bar
-     * @return None.
-     */
-    virtual void HideProgressBar() = 0;
-
-    /**
-     * Shows wait dialog with text
-     * @param aText A text to be shown at top of the wait bar.
-     * @return None.
-     */
-    virtual void ShowWaitDialog(const TDesC& aText) = 0;
-
-    /**
-     * Hides wait dialog
-     * @return None.
-     */
-    virtual void HideWaitDialog() = 0;
-    
-    /**
-     * Changes focus to output view
-     * @return None.
-     */
-    virtual void ChangeFocusToOutputView() = 0;
-    
-};
-
-// CLASS DECLARATION
-
-class CLauncherEngine: public CActive, public MLauncherParserObserver
-{
-
-public:
-    static CLauncherEngine* NewL(MLauncherUI *aLauncherUI);
-    ~CLauncherEngine();
-    CDesCArray* ListOfAllAppsL();
-    void StartAppLaunchingL(const CArrayFix<TInt>* aSelectedApps, TBool aAutoClose);
-    void CheckIfAppIsRunningL();
-    void CheckWhyThreadDiedL();
-    void StopLaunchingL();
-    TBool LogFileExists();
-    TBool BCLogFileExists();
-    
-    TInt DeleteLogFile();
-    TInt DeleteBCLogFile();
-    
-    void AnalyseDLLsL( const TDesC& aFileName );
-    
-    void ElementParsedL(const CLauncherDLLElement& aDllElement);
-    void DocumentParsedL(TInt aErrorCode);
-    void ParsingProgressedL(TInt aBytes);
-    TInt ReadLineFromFileL(RFile& aFile, TDes& aReadBuf);
-    
-    const TDesC& RequiredDllsFilePath() const { return iRequiredDllsFilePath; };
-    
-    void CancelBCAnalysis();
-    
-private:
-    CLauncherEngine();
-    void ConstructL(MLauncherUI *aLauncherUI);
-    
-    void RunL();
-    void DoCancel();
-        
-    TInt FindFiles(const TDesC& aFileName, const TDesC& aPath);
-    void IssueLaunch();
-    void WriteInitialStuffToTheLogL(const TDesC& aOwnData, RFile& aFile);
-    void CheckForMoreAppsL();
-    void LaunchApplicationL();
-    void DoLaunchApplicationL();
-    CDesCArray* DependencyCheckForE32ImageL();
-
-    /**
-     * Performs binary compatibility analysis based on reference data given
-     * in XML-file.
-     */
-    void DoBCAnalysisL();
-    
-    /**
-     * Compares given DLL list to system DLLs
-     */
-    void DoCompareDLLListsL();
-    
-private:
-
-    MLauncherUI *iLauncherUI;
-    
-    RTimer          iTimer;
-    CEikonEnv*      iEnv;
-    RApaLsSession   iLs;
-    RWsSession      iWs;
-    HBufC8*         iLogWriteBuf;    
-    RFile           iLogFile;
-    RFile           iBCLogFile;  
-    TFileName       iLogFilePath;
-    TFileName       iBCLogFilePath;
-    TFileName       iSystemDllsFilePath;
-    TFileName       iRequiredDllsFilePath;        
-        
-    CDesCArray*     iAppsArray;
-    CDesCArray*     iAllAppsArray;
-    CDesCArray*     iSystemDllArray;
-//  CDesCArray*     iRequiredDllArray;
-
-    TBool           iLaunchingIsActive;
-    TBool           iDLLAnalysisIsActive;
-    TBool           iSkipHiddenAndEmbedOnly;
-    TBool           iAutoClose;
-    TInt            iAppLaunchCounter;
-    TInt            iFailedCases;
-    TInt            iOkCases;
-    TInt            iSkippedCases;
-    TInt            iTotalNumberOfCases;
-
-    TUid            iCurrentAppUid;
-    TThreadId       iCurrentAppThreadId;
-    TBuf<128>       iCurrentAppNameAndExt;
-    RThread         iCurrentAppThread;
-//
-    CAppThreadChecker*          iAppThreadChecker;
-    CAppRunningChecker*         iAppRunningChecker;
-
-    CLauncherXMLParser*     iXMLParser;
-    CLauncherDLLParser*     iDLLParser;
-    CLauncherDLLElement*    iDLLElement;
-    
-    TInt                iFoundBCIssues;
-    HBufC*              iBCIssuesBigBuffer;
-
-        
-public:
-    inline TBool SkipHiddenAndEmbedOnly()              { return iSkipHiddenAndEmbedOnly; };
-    inline void SetSkipHiddenAndEmbedOnly(TBool aSkip) { iSkipHiddenAndEmbedOnly = aSkip; };
-    inline const TDesC& LogFilePath() { return iLogFilePath; }
-    inline const TDesC& BCLogFilePath() { return iBCLogFilePath; }
-    inline const TDesC& SystemDllsFilePath() { return iSystemDllsFilePath; }
-};
-
-
-
-class CAppRunningChecker : public CActive
-    {
-public:
-    static CAppRunningChecker* NewL(CLauncherEngine* aLauncherEngine);
-    ~CAppRunningChecker();
-
-    void StartTesting();
-
-private:
-    CAppRunningChecker();
-    void ConstructL(CLauncherEngine* aLauncherEngine);
-
-    void RunL();
-    void DoCancel();
-
-private:
-    RTimer iTimer;
-    CEikonEnv* iEnv;
-    CLauncherEngine* iLauncherEngine;
-    };
-
-class CAppThreadChecker : public CActive
-    {
-public:
-    static CAppThreadChecker* NewL(CLauncherEngine* aLauncherEngine);
-    ~CAppThreadChecker();
-
-    void ActivateChecking();
-    void CheckIfAppIsRunningL();
-
-private:
-    CAppThreadChecker();
-    void ConstructL(CLauncherEngine* aLauncherEngine);
-
-    void RunL();
-    void DoCancel();
-
-private:
-    CEikonEnv* iEnv;
-    CLauncherEngine* iLauncherEngine;
-    };
-
-
-#endif //LAUNCHERENGINE_H
--- a/launcher/engine/inc/launcherparserobserver.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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 LAUNCHERPARSEROBSERVER_H_
-#define LAUNCHERPARSEROBSERVER_H_
-
-class CLauncherDLLElement;
-
-class MLauncherParserObserver
-{
-public:
-    
-    /**
-     * This method is called when parser has parsed next DLL element     
-     * @param aDllElement Parsed DLL element.     
-     */    
-    virtual void ElementParsedL(const CLauncherDLLElement& aDllElement) = 0;
-    
-    /**
-     * This method is called when the parsing is completed. If parsing was
-     * stopped due to an error, an error code is given in parameter.
-     * @param aErrorCode KErrNone if document was parsed successfully.
-     */
-    virtual void DocumentParsedL(TInt aErrorCode) = 0;
-    
-    /**
-     * Parser calls this function during parsing to indicate the amount of
-     * bytes parsed from the given file.
-     * @param aBytes Amount of data (in bytes) parsed. Amount is incremental.
-     */
-    virtual void ParsingProgressedL(TInt aBytes) = 0;
-    
-};
-
-#endif /* LAUNCHERPARSEROBSERVER_H_ */
--- a/launcher/engine/inc/launchertraces.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef __LAUNCHER_TRACES_H__
-#define __LAUNCHER_TRACES_H__
-
-#include <e32def.h>
-
-
-// ---------------------------------------------------------------------------
-// You change these logging method values below! Recompile the application to take changes effect.
-
-    // logging methods
-    // 0 = No logging
-    // 1 = Flogger
-    // 2 = RDebug
-    // 3 = Flogger and RDebug
-    
-    #ifndef _DEBUG
-        
-        // Logging method for UREL builds:
-        #define LAUNCHER_LOGGING_METHOD  2
-
-    #else
-
-        // Logging method for UDEB builds:
-        #define LAUNCHER_LOGGING_METHOD  0
-
-    #endif    
-    
-
-
-// ---------------------------------------------------------------------------
-// Do not make any changes to lines below...
-
-    #if LAUNCHER_LOGGING_METHOD == 1 || LAUNCHER_LOGGING_METHOD == 3
-
-        #include <flogger.h>
-        _LIT(KLogFolder,"Launcher");
-        _LIT(KLogFile,"Launcher_Trace.txt");
-
-    #endif
-
-    #if LAUNCHER_LOGGING_METHOD == 2 || LAUNCHER_LOGGING_METHOD == 3
-
-        #include <e32debug.h>
-
-    #endif
-
-
-    #if LAUNCHER_LOGGING_METHOD == 0
-    
-        #define LOGTEXT(AAA)
-        #define LOGSTRING(AAA)
-        #define LOGSTRING2(AAA,BBB)
-        #define LOGSTRING3(AAA,BBB,CCC)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD)
-    
-    
-    #elif LAUNCHER_LOGGING_METHOD == 1
-    
-        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-   
-    #elif LAUNCHER_LOGGING_METHOD == 2
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
-    
-    #elif LAUNCHER_LOGGING_METHOD == 3
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-
-    #endif
-
-// ---------------------------------------------------------------------------
-
-#endif // __LAUNCHER_TRACES_H__
-
--- a/launcher/engine/inc/launcherxmlparser.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +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 LAUNCHERXMLPARSER_H_
-#define LAUNCHERXMLPARSER_H_
-
-#include <e32base.h>
-#include <xml/contenthandler.h>
-#include <xml/parser.h>
-#include "launcherdllelement.h"
-#include "launcherparserobserver.h"
-
-using namespace Xml;
-
-const TUint KXMLBufferSize = 1024;
-
-class CLauncherDLLElement;
-
-/**
- * Parses DLL data from the given XML-file
- */
-class CLauncherXMLParser : public CActive, public MContentHandler
-{
-public:
-
-    virtual ~CLauncherXMLParser();
-    static CLauncherXMLParser* NewL(RFs& aFs);
-    static CLauncherXMLParser* NewLC(RFs& aFs);
-    
-    /**
-     * Parses the given XML-file and notifies the observer.
-     * @param aFilePath XML-file's path
-     * @param aObserver Pointer to the observer instance.
-     */
-    void ParseL(const TDesC& aFilePath, MLauncherParserObserver* aObserver);
-        
-protected:
-    
-    // from CActive    
-    void DoCancel();    
-    void RunL();
-    
-private:
-
-    CLauncherXMLParser(RFs& aFs);
-    void ConstructL();
-    
-    /**
-     * Tells whether the current XML element is a sub-element of the 'dll'-element.
-     * @return ETrue if the current XML-element is sub-element of the 'dll'-element.
-     */
-    TBool IsDataElement();
-
-    /**
-     * Deletes current data buffer and zeroes the pointer.
-     */
-    void ClearXMLDataBuffer();
-    
-    /**
-     * Converts 8-bit descriptor to 32-bit unsigned integer
-     * @return Converted 32-bit unsigned integer value.
-     * @param aStr 8-bit descriptor to be converted.
-     */
-    TUint32 ConvertDes8ToUint32L(const TDesC8& aStr);
-                
-public:
-    // From MContentHandler:    
-    void OnStartDocumentL(const RDocumentParameters &aDocParam, TInt aErrorCode);
-    void OnEndDocumentL(TInt aErrorCode);
-    void OnStartElementL(   const RTagInfo& aElement, 
-                            const RAttributeArray& aAttributes, 
-                            TInt aErrorCode);
-    void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
-    void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
-    void OnStartPrefixMappingL( const RString& aPrefix, 
-                                const RString& aUri, 
-                                TInt aErrorCode);
-    void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
-    void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
-    void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
-    void OnProcessingInstructionL(  const TDesC8& aTarget, 
-                                    const TDesC8& aData, 
-                                    TInt aErrorCode);
-    void OnError(TInt aErrorCode);
-    TAny* GetExtendedInterface(const TInt32 aUid);    
-    
-private:
-    CParser* iParser;  // XML parser
-    RFs& iFileSession;
-    RFile iFile; // XML file 
-    TBuf8<KXMLBufferSize> iXMLDataBuffer;
-    MLauncherParserObserver* iObserver;
-    CLauncherDLLElement* iCurrentDllElement;
-    TBuf8<KMaxFileName> iCurrentContent;
-    TBuf8<KMaxName> iCurrentElementName;
-    TBool iIgnoreError;
-    TInt  iParsedBytes;
-};
-
-#endif /* LAUNCHERXMLPARSER_H_ */
--- a/launcher/engine/src/e32image.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,846 +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 "e32image.h"
-#include "e32imageheaders.h"
-#include "launchertraces.h"
-
-
-const TInt KMaxHeaderSize = sizeof(E32ImageHeaderV) + 65536/8;
-
-SCapabilitySet AllCapabilities;
-SCapabilitySet DisabledCapabilities;
-
-// ---------------------------------------------------------------------------
-
-E32ImageReader* E32ImageReader::NewLC()
-    {
-    E32ImageReader* self = new(ELeave) E32ImageReader;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-E32ImageReader::E32ImageReader()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-
-void E32ImageReader::ConstructL()
-    {
-    LOGSTRING("Launcher: E32ImageReader::ConstructL");
-
-    iEnv = CEikonEnv::Static();
-    }
-
-// ---------------------------------------------------------------------------
-
-CDesCArray* E32ImageReader::ListOfDLLsL(const TDesC& aFullPathToE32Image)
-    {
-    LOGSTRING("Launcher: E32ImageReader::ListOfDLLsL");
-
-    // open the file for reading
-    User::LeaveIfError( iFile.Open(iEnv->FsSession(), aFullPathToE32Image, EFileRead) );
-    CleanupClosePushL(iFile);
-    
-    // get local copies of capability sets
-    TCapabilitySet caps;
-    caps.SetAllSupported();
-    AllCapabilities=*(SCapabilitySet*)&caps;
-    caps.SetDisabled();
-    DisabledCapabilities=*(SCapabilitySet*)&caps;
-
-    // read the header of the image
-    User::LeaveIfError( E32ImageHeader::New(iHeader, iFile) );
-
-    // set stuff
-    iHeapSizeMin = iHeader->iHeapSizeMin;
-    iHeapSizeMax = iHeader->iHeapSizeMax;
-    iStackSize = iHeader->iStackSize;
-    iPriority = iHeader->ProcessPriority();
-    iDepCount = iHeader->iDllRefTableCount;
-    iExportDirCount = iHeader->iExportDirCount;
-    iExportDir = iHeader->iExportDirOffset-iHeader->iCodeOffset;
-    iTextSize = iHeader->iTextSize;
-    iCodeSize = iHeader->iCodeSize;
-    iDataSize = iHeader->iDataSize;
-    iBssSize = iHeader->iBssSize;
-    iTotalDataSize = iDataSize+iBssSize;
-    iFileEntryPoint = iHeader->iEntryPoint;
-    iEntryPtVeneer = 0;
-    iExceptionDescriptor = iHeader->ExceptionDescriptor();
-    if (iHeader->iExportDirOffset)
-        iExportDirLoad=iExportDir;
-    
-    // allocate data for the code area
-    iCodeLoadAddress = (TUint32)User::Alloc(iCodeSize);
-    
-    // load data from the binary
-    User::LeaveIfError( LoadData() );
-
-    // create an array for the dll names from the import list
-    CDesCArray* dllArray = new(ELeave) CDesCArrayFlat(100);
-    CleanupStack::PushL(dllArray);
-
-    // get the dll names from the import section
-    E32ImportSection* importSection = (E32ImportSection *)iImportData;
-    E32ImportBlock* block;
-    if(importSection)
-        block = (E32ImportBlock*)(importSection+1);
-    else
-        block = NULL;
-    iNextImportPos = 0;
-
-    // loop through all import data blocks
-    for (TInt i=0; i<iDepCount; i++)
-        {
-        // get a pointer to the dll name
-        TPtrC8 dllname = (const TText8*)((TUint32)iImportData + block->iOffsetOfDllName);
-        TBuf8<KMaxKernelName> rootname;
-        if (dllname.Length() > KMaxKernelName)
-            User::Leave( KErrNotSupported );
-        
-        // parse the filename
-        TFileNameInfo fni;
-        User::LeaveIfError( fni.Set(dllname, TFileNameInfo::EAllowUid) );
-        fni.GetName(rootname, TFileNameInfo::EIncludeBaseExt);
-
-        // append the name to the dll name array
-        TFileName dllName16;
-        dllName16.Copy(rootname);
-        dllArray->AppendL(dllName16);
-
-        // get the next block
-        TUint impfmt = iHeader->ImportFormat();
-        block = (E32ImportBlock*)block->NextBlock(impfmt);
-        }
-
-    CleanupStack::Pop();  //dllArray
-    CleanupStack::PopAndDestroy(); //iFile
-
-    // free memory
-    delete iHeader;
-    iHeader = NULL;
-    delete iImportSection;
-    iImportSection = NULL;
-    delete iCodeRelocSection;
-    iCodeRelocSection = NULL;
-    delete iDataRelocSection;
-    iDataRelocSection = NULL;
-    
-    User::Free((TAny*)iCodeLoadAddress);
-    User::Free(iRestOfFileData);
-    User::Free(iCurrentImportList);
-    if (iExportDirLoadAllocated)
-        User::Free((TAny*)iExportDirLoad);
-
-    return dllArray;
-    }
-
-// ---------------------------------------------------------------------------
-
-E32ImageReader::~E32ImageReader()
-    {
-    LOGSTRING("Launcher: E32ImageReader::~E32ImageReader");
-    }
-
-
-// ---------------------------------------------------------------------------
-
-TInt FileRead(RFile& aFile, TUint8* aDest, TInt aSize)
-    {
-    TPtr8 p(aDest,aSize,aSize);
-    return aFile.Read(p,aSize);
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt E32ImageHeader::New(E32ImageHeader*& aHdr, RFile& aFile)
-    {
-    LOGSTRING("Launcher: E32ImageHeader::New");
-
-    E32ImageHeader* h = NULL;
-    TInt hdrsz = 0;
-    TInt filesize;
-    TInt r = aFile.Size(filesize);
-    if (r!=KErrNone)
-        return r;
-    E32ImageHeader bh;
-    r = FileRead(aFile, (TUint8*)&bh, sizeof(E32ImageHeader));
-    if (r==KErrNone)
-        {
-        hdrsz = bh.TotalSize();
-        if ( (TUint(hdrsz) > TUint(KMaxHeaderSize)) || (TUint(hdrsz) < TUint(sizeof(bh))) )
-            return KErrCorrupt;
-        }
-    h = (E32ImageHeader*)User::Alloc(hdrsz);
-    if (!h)
-        return KErrNoMemory;
-    wordmove(h, &bh, sizeof(E32ImageHeader));
-    if (hdrsz > (TInt)sizeof(E32ImageHeader))
-        r = FileRead(aFile, (TUint8*)(h + 1), hdrsz - sizeof(E32ImageHeader));
-    if (r==KErrNone)
-        r = h->IntegrityCheck(filesize);
-    if (r==KErrNone)
-        {
-        if (h->HeaderFormat() >= KImageHdrFmt_V)
-            {
-            // Overide capabilities in image
-            for(TInt i=0; i<SCapabilitySet::ENCapW; i++)
-                {
-                ((E32ImageHeaderV*)h)->iS.iCaps[i] |= DisabledCapabilities[i];
-                ((E32ImageHeaderV*)h)->iS.iCaps[i] &= AllCapabilities[i];
-                }
-            }
-        aHdr = h;
-        }
-    else
-        {
-        delete h;
-        aHdr = NULL;
-        }
-    return r;
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt E32ImageHeader::IntegrityCheck(TInt aFileSize)
-    {
-    LOGSTRING("Launcher: E32ImageHeader::IntegrityCheck");
-    
-    TInt hdrsz = TotalSize();
-    TUint hdrfmt = HeaderFormat();
-    TUidType uids = *(const TUidType*)&iUid1;
-    E32ImageHeaderV* v = NULL;
-    TCheckedUid chkuid(uids);
-    const TUint32* pChkUid = (const TUint32*)&chkuid;
-
-    if (pChkUid[3] != iUidChecksum)
-        return KErrCorrupt;    
-
-    if (hdrfmt == KImageHdrFmt_V)
-        {
-        TUint32 supplied_crc = iHeaderCrc;
-        iHeaderCrc = KImageCrcInitialiser;
-        TUint32 crc = 0;
-        Mem::Crc32(crc, this, hdrsz);
-        iHeaderCrc = supplied_crc;
-        if (crc != supplied_crc)
-            return KErrCorrupt;    
-        v = (E32ImageHeaderV*)this;
-        TUint total_eds = v->iExportDescSize + sizeof(v->iExportDescSize) + sizeof(v->iExportDescType);
-        total_eds = (total_eds + 3) &~ 3;
-        if (total_eds + (TUint)_FOFF(E32ImageHeaderV, iExportDescSize) != (TUint)hdrsz)
-            return KErrCorrupt;
-        if (TUint(v->iExportDescType) > KImageHdr_ExpD_SparseBitmap8)
-            return KErrNotSupported;
-        }
-    else if (hdrfmt >= KImageHdrFmt_V)
-        return KErrNotSupported; 
-
-    TCpu cpu = CpuIdentifier();
-    TUint abi = ABI();
-    TUint impfmt = ImportFormat();
-    TUint compression = CompressionType();
-
-    TUint uncompressed_size = compression ? UncompressedFileSize() : (TUint)aFileSize;
-
-    if (iSignature != 0x434f5045) // 'EPOC'
-        return KErrCorrupt;
-    if (iCodeSize<0)
-        return KErrCorrupt;
-    if (iDataSize<0)
-        return KErrCorrupt;
-    if (iHeapSizeMin<0)
-        return KErrCorrupt;
-    if (iHeapSizeMax<iHeapSizeMin)
-        return KErrCorrupt;
-    if (iStackSize<0)
-        return KErrCorrupt;
-    if (iBssSize<0)
-        return KErrCorrupt;
-    if (iDllRefTableCount<0)
-        return KErrCorrupt;
-    if (iExportDirOffset >= uncompressed_size)
-        return KErrCorrupt;
-    if (TUint(iExportDirCount)>65535)
-        return KErrCorrupt;
-    if (iTextSize<0)
-        return KErrCorrupt;
-    if (iCodeSize<iTextSize)
-        return KErrCorrupt;
-    if (iCodeOffset >= uncompressed_size)
-        return KErrCorrupt;
-    if (iDataOffset >= uncompressed_size)
-        return KErrCorrupt;
-    if (iImportOffset >= uncompressed_size)
-        return KErrCorrupt;
-    if (iCodeRelocOffset >= uncompressed_size)
-        return KErrCorrupt;
-    if (iDataRelocOffset >= uncompressed_size)
-        return KErrCorrupt;
-    if (TUint(iCodeSize+iDataSize) > uncompressed_size)
-        return KErrCorrupt;
-
-    if (abi>KImageABI_EABI)
-        return KErrNotSupported;
-    if (impfmt>KImageImpFmt_PE2)
-        return KErrNotSupported;
-    if (iUid1 != (TUint32)KExecutableImageUidValue && iUid1 != (TUint32)KDynamicLibraryUidValue)
-        return KErrNotSupported;
-    TUint32 mv = ModuleVersion();
-    if (mv >= 0x80000000u || (mv & 0x0000ffffu) > 0x8000u)
-        return KErrNotSupported;
-
-    return KErrNone;
-    }
-// ---------------------------------------------------------------------------
-
-TInt E32ImageReader::LoadData()
-    {
-    LOGSTRING("Launcher: E32ImageReader::LoadData");
-
-    TInt remainder;
-    iFile.Size(remainder);
-    
-    remainder -= iHeader->TotalSize();
-    TUint32 compression = iHeader->CompressionType();
-    if (compression != KMyFormatNotCompressed)
-        {
-        remainder = iHeader->UncompressedFileSize() - iHeader->iCodeOffset;
-        }
-
-    remainder -= iHeader->iCodeSize;
-    
-    if (remainder > 0)
-        {
-        iRestOfFileData = (TUint8*)User::Alloc(remainder);
-        if (iRestOfFileData)
-            iRestOfFileSize=remainder;
-        else
-            return KErrNoMemory;
-        }
-
-    iConversionOffset = iHeader->iCodeOffset + iHeader->iCodeSize;
-
-    TInt r = LoadFile(compression);
-    if (r !=KErrNone)
-        return r;
-
-
-    TUint8* source=NULL;
-    if (iHeader->iImportOffset)
-        {
-        TUint bufferOffset=iHeader->iImportOffset-iConversionOffset;
-        
-        if(bufferOffset>iRestOfFileSize || bufferOffset+sizeof(E32ImportSection)>iRestOfFileSize)
-            return KErrCorrupt;
-        
-        source=iRestOfFileData+bufferOffset;
-        
-        iImportSection = new E32ImportSection;
-        
-        if (iImportSection)
-            Mem::Move((TText8*)iImportSection, source, sizeof(E32ImportSection));
-        else
-            return KErrNoMemory;
-        }
-
-    iCodeDelta = iCodeRunAddress-iHeader->iCodeBase;
-    iDataDelta = iDataRunAddress-iHeader->iDataBase;
-
-    if (r==KErrNone)
-        r = ReadImportData();
-
-    return r;
-    }
-
-// ---------------------------------------------------------------------------
-
-TUint8* E32ImageReader::MemoryMove(TAny* aDestination, const TAny* aSource, TInt aNumberofBytes)
-    {
-    return Mem::Move(aDestination, aSource, aNumberofBytes);
-    }
-
-// ---------------------------------------------------------------------------
-
-GLDEF_C TInt svRelocateExports(TAny* aPtr)
-    {
-    E32ImageReader* pI=(E32ImageReader*)aPtr;
-    TUint32* destExport=(TUint32*)pI->iExportDirLoad;
-    TInt i=pI->iExportDirCount;
-    TUint32 codeBase=pI->iCodeRunAddress;
-    while (i-->0)
-        *destExport+++=codeBase;
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt E32ImageReader::LoadFile(TUint32 aCompression)
-    {
-    LOGSTRING("Launcher: E32ImageReader::LoadFile");
-
-    TInt r(KErrNone);
-
-    if (aCompression == KMyFormatNotCompressed)
-        r=LoadFileNoCompress();
-    
-    else if (aCompression == KMyUidCompressionDeflate)
-        {
-        TRAP(r, LoadFileInflateL());
-        }
-    
-    else
-        r = KErrNotSupported;
-    
-    return r;
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt E32ImageReader::LoadFileNoCompress()
-    {
-    LOGSTRING("Launcher: E32ImageReader::LoadFileNoCompress");
-
-    TInt r(KErrNone);
-
-    if (iHeader->iCodeSize)
-        {
-        r = Read(iHeader->iCodeOffset, (TText8*)iCodeLoadAddress, iCodeSize);
-        }
-
-    if (r != KErrNone)
-        {
-        return r;
-        }
-
-    if (iRestOfFileSize)
-        {
-        r = Read(iConversionOffset, (TText8*)iRestOfFileData, iRestOfFileSize);
-        }
-    
-    return r;
-    }
-
-// ---------------------------------------------------------------------------
-
-void FileCleanup(TAny* aPtr)
-    {
-    TFileInput* f=(TFileInput*)aPtr;
-    f->Cancel();
-    delete f;
-    }
-
-// ---------------------------------------------------------------------------
-
-void E32ImageReader::LoadFileInflateL()
-    {
-    LOGSTRING("Launcher: E32ImageReader::LoadFileInflateL");
-
-    TInt pos = iHeader->TotalSize();
-    User::LeaveIfError(iFile.Seek(ESeekStart,pos));
-
-    TFileInput* file = new (ELeave) TFileInput(iFile);
-    CleanupStack::PushL(TCleanupItem(&FileCleanup,file));
-    CInflater* inflater = CInflater::NewLC(*file);
-    
-    if (iHeader->iCodeSize)
-        {
-        TInt count = inflater->ReadL((TUint8*)iCodeLoadAddress, iCodeSize, &MemoryMove);
-        
-        if(count!=iCodeSize)
-            User::Leave(KErrCorrupt);
-        }
-
-    if (iRestOfFileSize)
-        {
-        TUint32 count = inflater->ReadL(iRestOfFileData, iRestOfFileSize, &Mem::Move);
-        
-        if(count!=iRestOfFileSize)
-            User::Leave(KErrCorrupt);
-        }
-    
-    CleanupStack::PopAndDestroy(2,file);
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt E32ImageReader::Read(TText8* aDest, TInt aSize)
-    {
-    TPtr8 p(aDest,aSize,aSize);
-    return iFile.Read(p,aSize);
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt E32ImageReader::Read(TInt aPos, TText8* aDest, TInt aSize)
-    {
-    TPtr8 p(aDest,aSize,aSize);
-    if (aPos<0)
-        return KErrCorrupt;
-    return iFile.Read(aPos,p,aSize);
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt E32ImageReader::ReadImportData()
-    {
-    LOGSTRING("Launcher: E32ImageReader::ReadImportData");
-
-    if (!iHeader->iImportOffset)
-        return KErrNone;
-    
-    TUint32 bufferOffset = iHeader->iImportOffset-iConversionOffset;
-    
-    if(bufferOffset>iRestOfFileSize || bufferOffset+iImportSection->iSize>iRestOfFileSize)
-        return KErrCorrupt;
-    
-    iImportData = (TUint32*)(iRestOfFileData+bufferOffset);
-    
-    E32ImportSection* s = (E32ImportSection*)iImportData;
-    E32ImportBlock* b = (E32ImportBlock*)(s + 1);
-    TUint impfmt = iHeader->ImportFormat();
-    TInt i;
-    TInt n = 0;
-    
-    for (i=0; i<iDepCount; ++i)
-        {
-        if (b->iNumberOfImports > n)
-            n = b->iNumberOfImports;
-        b = (E32ImportBlock*)b->NextBlock(impfmt);
-        }
-    
-    iCurrentImportList = (TUint32*)User::Alloc(n * sizeof(TUint32));
-    
-    if (!iCurrentImportList)
-        return KErrNoMemory;
-    
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-
-inline CInflater::CInflater(TBitInput& aInput)
-    :iBits(&aInput),iEncoding(0),iOut(0)
-    {}
-
-// ---------------------------------------------------------------------------
-
-void CInflater::ConstructL()
-    {
-    iEncoding=new(ELeave) TEncoding;
-    InitL();
-    iLen=0;
-    iOut=new(ELeave) TUint8[KDeflateMaxDistance];
-    iAvail=iLimit=iOut;
-    }
-
-// ---------------------------------------------------------------------------
-
-CInflater* CInflater::NewLC(TBitInput& aInput)
-    {
-    CInflater* self=new(ELeave) CInflater(aInput);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CInflater::~CInflater()
-    {
-    delete iEncoding;
-    delete [] iOut;
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CInflater::ReadL(TUint8* aBuffer,TInt aLength, TMemoryMoveFunction aMemMovefn)
-    {
-    TInt tfr=0;
-    for (;;)
-        {
-        TInt len=Min(aLength,iLimit-iAvail);
-        if (len && aBuffer)
-            {
-            aMemMovefn(aBuffer,iAvail,len);
-            aBuffer+=len;
-            }
-        aLength-=len;
-        iAvail+=len;
-        tfr+=len;
-        if (aLength==0)
-            return tfr;
-        len=InflateL();
-        if (len==0)
-            return tfr;
-        iAvail=iOut;
-        iLimit=iAvail+len;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CInflater::SkipL(TInt aLength)
-    {
-    return ReadL(0,aLength,Mem::Move);
-    }
-
-// ---------------------------------------------------------------------------
-
-void CInflater::InitL()
-    {
-    Huffman::InternalizeL(*iBits,iEncoding->iLitLen,KDeflationCodes);
-
-    if (!Huffman::IsValid(iEncoding->iLitLen,TEncoding::ELitLens) ||
-        !Huffman::IsValid(iEncoding->iDistance,TEncoding::EDistances))
-        User::Leave(KErrCorrupt);
-
-    Huffman::Decoding(iEncoding->iLitLen,TEncoding::ELitLens,iEncoding->iLitLen);
-    Huffman::Decoding(iEncoding->iDistance,TEncoding::EDistances,iEncoding->iDistance,KDeflateDistCodeBase);
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CInflater::InflateL()
-    {
-    TUint8* out=iOut;
-    TUint8* const end=out+KDeflateMaxDistance;
-    const TUint32* tree=iEncoding->iLitLen;
-    if (iLen<0)    // EOF
-        return 0;
-    if (iLen>0)
-        goto useHistory;
-
-    while (out<end)
-        {
-        // get a huffman code
-        {
-        TInt val=iBits->HuffmanL(tree)-TEncoding::ELiterals;
-        if (val<0)
-            {
-            *out++=TUint8(val);
-            continue;        
-            }
-        if (val==TEncoding::EEos-TEncoding::ELiterals)
-            {    
-            iLen=-1;
-            break;
-            }
-        
-        TInt code=val&0xff;
-        if (code>=8)
-            {    
-            TInt xtra=(code>>2)-1;
-            code-=xtra<<2;
-            code<<=xtra;
-            code|=iBits->ReadL(xtra);
-            }
-        if (val<KDeflateDistCodeBase-TEncoding::ELiterals)
-            {
-            iLen=code+KDeflateMinLength;
-            tree=iEncoding->iDistance;
-            continue;        
-            }
-        
-        iRptr=out-(code+1);
-        if (iRptr+KDeflateMaxDistance<end)
-            iRptr+=KDeflateMaxDistance;
-        }
-useHistory:
-        TInt tfr=Min(end-out,iLen);
-        iLen-=tfr;
-        const TUint8* from=iRptr;
-        do
-            {
-            *out++=*from++;
-            if (from==end)
-                from-=KDeflateMaxDistance;
-            } while (--tfr!=0);
-        iRptr=from;
-        tree=iEncoding->iLitLen;
-        };
-    
-    return out-iOut;
-    }
-
-// ---------------------------------------------------------------------------
-
-TFileInput::TFileInput(RFile& aFile)
-    :iFile(aFile),iReadBuf(iBuf1),iPtr(iBuf1,KBufSize)
-    {
-    aFile.Read(iPtr,iStat);
-    }
-
-// ---------------------------------------------------------------------------
-
-void TFileInput::Cancel()
-    {
-    if (iReadBuf)
-        User::WaitForRequest(iStat);
-    }
-
-// ---------------------------------------------------------------------------
-
-void TFileInput::UnderflowL()
-    {
-    TUint8* b=iReadBuf;
-    ASSERT(b!=NULL);
-    User::WaitForRequest(iStat);
-    iReadBuf=0;
-    User::LeaveIfError(iStat.Int());
-    if(iPtr.Length()==0)
-        User::Leave(KErrCorrupt);
-    Set(b,iPtr.Length()*8);
-    
-    b = b==iBuf1 ? iBuf2 : iBuf1;
-    iPtr.Set(b,0,KBufSize);
-    iFile.Read(iPtr,iStat);
-    iReadBuf=b;
-    }
-
-// ---------------------------------------------------------------------------
-
-TFileNameInfo::TFileNameInfo()
-    {
-    memclr(this, sizeof(TFileNameInfo));
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt TFileNameInfo::Set(const TDesC8& aFileName, TUint aFlags)
-    {
-    iUid = 0;
-    iVersion = 0;
-    iPathPos = 0;
-    iName = aFileName.Ptr();
-    iLen = aFileName.Length();
-    iExtPos = aFileName.LocateReverse('.');
-    if (iExtPos<0)
-        iExtPos = iLen;
-    TInt osq = aFileName.LocateReverse('[');
-    TInt csq = aFileName.LocateReverse(']');
-    if (!(aFlags & EAllowUid) && (osq>=0 || csq>=0))
-        {
-        return KErrBadName;
-        }
-    if (osq>=iExtPos || csq>=iExtPos)
-        {
-        return KErrBadName;
-        }
-    TInt p = iExtPos;
-    if ((aFlags & EAllowUid) && p>=10 && iName[p-1]==']' && iName[p-10]=='[')
-        {
-        TPtrC8 uidstr(iName + p - 9, 8);
-        TLex8 uidlex(uidstr);
-        TUint32 uid = 0;
-        TInt r = uidlex.Val(uid, EHex);
-        if (r==KErrNone && uidlex.Eos())
-            iUid = uid, p -= 10;
-        }
-    iUidPos = p;
-    TInt ob = aFileName.LocateReverse('{');
-    TInt cb = aFileName.LocateReverse('}');
-    if (ob>=iUidPos || cb>=iUidPos)
-        {
-        return KErrBadName;
-        }
-    if (ob>=0 && cb>=0 && p-1==cb)
-        {
-        TPtrC8 p8(iName, p);
-        TInt d = p8.LocateReverse('.');
-        TPtrC8 verstr(iName+ob+1, p-ob-2);
-        TLex8 verlex(verstr);
-        if (ob==p-10 && d<ob)
-            {
-            TUint32 ver = 0;
-            TInt r = verlex.Val(ver, EHex);
-            if (r==KErrNone && verlex.Eos())
-                iVersion = ver, p = ob;
-            }
-        else if (d>ob && p-1>d && (aFlags & EAllowDecimalVersion))
-            {
-            TUint32 maj = 0;
-            TUint32 min = 0;
-            TInt r = verlex.Val(maj, EDecimal);
-            TUint c = (TUint)verlex.Get();
-            TInt r2 = verlex.Val(min, EDecimal);
-            if (r==KErrNone && c=='.' && r2==KErrNone && verlex.Eos() && maj<32768 && min<32768)
-                iVersion = (maj << 16) | min, p = ob;
-            }
-        }
-    iVerPos = p;
-    if (iLen>=2 && iName[1]==':')
-        {
-        TUint c = iName[0];
-        if (c!='?' || !(aFlags & EAllowPlaceholder))
-            {
-            c |= 0x20;
-            if (c<'a' || c>'z')
-                {
-                return KErrBadName;
-                }
-            }
-        iPathPos = 2;
-        }
-    TPtrC8 pathp(iName+iPathPos, iVerPos-iPathPos);
-    if (pathp.Locate('[')>=0 || pathp.Locate(']')>=0 || pathp.Locate('{')>=0 || pathp.Locate('}')>=0 || pathp.Locate(':')>=0)
-        {
-        return KErrBadName;
-        }
-    iBasePos = pathp.LocateReverse('\\') + 1 + iPathPos;
-
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-
-void TFileNameInfo::GetName(TDes8& aName, TUint aFlags) const
-    {
-    if (aFlags & EIncludeDrive)
-        aName.Append(Drive());
-    if (aFlags & EIncludePath)
-        {
-        if (PathLen() && iName[iPathPos]!='\\')
-            aName.Append('\\');
-        aName.Append(Path());
-        }
-    if (aFlags & EIncludeBase)
-        aName.Append(Base());
-    if ((aFlags & EForceVer) || ((aFlags & EIncludeVer) && VerLen()) )
-        {
-        aName.Append('{');
-        aName.AppendNumFixedWidth(iVersion, EHex, 8);
-        aName.Append('}');        
-        }
-    if ((aFlags & EForceUid) || ((aFlags & EIncludeUid) && UidLen()) )
-        {
-        aName.Append('[');
-        aName.AppendNumFixedWidth(iUid, EHex, 8);
-        aName.Append(']');
-        }
-    if (aFlags & EIncludeExt)
-        aName.Append(Ext());
-    }
-
-// ---------------------------------------------------------------------------
--- a/launcher/engine/src/launcherdllelement.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +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 "launcherdllelement.h"
-#include "launchertraces.h"
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLElement::~CLauncherDLLElement()
-    {
-    LOGSTRING("Launcher: CLauncherDLLElement::~CLauncherDLLElement");    
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLElement::CLauncherDLLElement()
-    {    
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLElement* CLauncherDLLElement::NewL()
-    {
-    LOGSTRING("Launcher: CLauncherDLLElement::NewL");
-    CLauncherDLLElement* self = CLauncherDLLElement::NewLC();    
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLElement* CLauncherDLLElement::NewLC()
-    {
-    LOGSTRING("Launcher: CLauncherDLLElement::NewLC");
-    CLauncherDLLElement* self = new (ELeave) CLauncherDLLElement;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLElement::ConstructL()
-    {
-    
-    }
-
-// ---------------------------------------------------------------------------
-   
-TBool CLauncherDLLElement::CompareL(const CLauncherDLLElement& aReferenceElement, RArray<TDifference>& aDifferenceList) const
-    {
-    LOGSTRING2("Launcher: CLauncherDLLElement::CompareL - DLLName: %S", &iName);
-    if( iName != aReferenceElement.Name())
-        {
-        LOGSTRING("Launcher: CLauncherDLLElement::CompareL: ERROR - DLL names don't match.");
-        User::Leave(KErrArgument);
-        }
-    
-    TBool diff = EFalse;
-            
-    if( iUID1 != aReferenceElement.UID1()) 
-        {
-        diff = ETrue;
-        aDifferenceList.AppendL(this->EDifference_UID1);      
-        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID1s differs: %x vs. %x", iUID1, aReferenceElement.UID1());  
-        }
-    if( iUID2!= aReferenceElement.UID2()) 
-        {
-        diff = ETrue;
-        aDifferenceList.AppendL(this->EDifference_UID2);        
-        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID2s differs: %x vs. %x", iUID2, aReferenceElement.UID2());  
-        }
-    if( iUID3 != aReferenceElement.UID3()) 
-        {
-        diff = ETrue;
-        aDifferenceList.AppendL(this->EDifference_UID3);        
-        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID3s differs: %x vs. %x", iUID3, aReferenceElement.UID3());  
-        }
-    if( iSID != aReferenceElement.SID()) 
-        {
-        diff = ETrue;
-        aDifferenceList.AppendL(this->EDifference_SID);        
-        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - SIDs differs: %x vs. %x", iSID, aReferenceElement.SID());  
-        }
-    if( iCapability != aReferenceElement.Capability()) 
-        {
-        diff = ETrue;
-        aDifferenceList.AppendL(this->EDifference_Capability);        
-        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - Capabilities differs: %x vs. %x", iCapability, aReferenceElement.Capability());  
-        }
-    
-    return diff;
-    }
-
-// ---------------------------------------------------------------------------
-
-TFileName CLauncherDLLElement::Name() const
-    {
-    return iName;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLElement::SetNameL(const TFileName& aName)
-    {    
-    iName.Copy(aName); 
-    }
-
-// ---------------------------------------------------------------------------
-
-TUid CLauncherDLLElement::UID1() const
-    {
-    return iUID1;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLElement::SetUID1L(TUid aUID1)
-    {
-    iUID1.iUid = aUID1.iUid;
-    }
-
-// ---------------------------------------------------------------------------
-
-TUid CLauncherDLLElement::UID2() const
-    {
-    return iUID2;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLElement::SetUID2L(TUid aUID2)
-    {    
-    iUID2 = aUID2;
-    }
-
-// ---------------------------------------------------------------------------
-
-TUid CLauncherDLLElement::UID3() const
-    {    
-    return iUID3;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLElement::SetUID3L(TUid aUID3)
-    {    
-    iUID3 = aUID3;
-    }
-
-// ---------------------------------------------------------------------------
-
-TUid CLauncherDLLElement::SID() const
-    {   
-    return iSID;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLElement::SetSIDL(TUid aSID)
-    {    
-    iSID = aSID;
-    }
-
-// ---------------------------------------------------------------------------
-
-TUint32 CLauncherDLLElement::Capability() const
-    {
-    return iCapability;    
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLElement::SetCapabilityL(TUint32 aCapability)
-    {
-    iCapability = aCapability; 
-    }
--- a/launcher/engine/src/launcherdllparser.cpp	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#include "launcherdllparser.h"
-#include "launchertraces.h"
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLParser::~CLauncherDLLParser()
-    {
-    LOGSTRING("Launcher: CLauncherDLLParser::~CLauncherDLLParser");
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLParser::CLauncherDLLParser()
-    {
-    LOGSTRING("Launcher: CLauncherDLLParser::CLauncherDLLParser");
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLParser* CLauncherDLLParser::NewL()
-    {
-    LOGSTRING("Launcher: CLauncherDLLParser::NewL");
-    CLauncherDLLParser* self = CLauncherDLLParser::NewLC();    
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherDLLParser* CLauncherDLLParser::NewLC()
-    {
-    LOGSTRING("Launcher: CLauncherDLLParser::NewLC");
-    CLauncherDLLParser* self = new (ELeave) CLauncherDLLParser;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLParser::ConstructL()
-    {
-    
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherDLLParser::ParseL( RFs& aFileSession, RFile& aFile, CLauncherDLLElement& aElement )
-    {
-    TFileName dllName;
-    TFileName fullName;
-    TUid tmpUID;
-    TInt offset = 0;
-        
-    aFile.Name(dllName);
-    aFile.FullName(fullName);
-    aElement.SetNameL(dllName);
-    
-    TBool isFileInRom = aFileSession.IsFileInRom(fullName) != 0;
-    
-    /**
-     * Read UID1
-     */
-    offset = UID1_OFFSET;
-    aFile.Seek(ESeekStart, offset); // Set file position   
-    tmpUID.iUid = ReadUint32L(aFile);    
-    aElement.SetUID1L(tmpUID);    
-    
-    /**
-     * Read UID2
-     */
-    offset = UID2_OFFSET;
-    aFile.Seek(ESeekStart, offset); // Set file position
-    tmpUID.iUid = ReadUint32L(aFile);    
-    aElement.SetUID2L(tmpUID);
-        
-    /**
-     * Read UID3
-     */
-    offset = UID3_OFFSET;
-    aFile.Seek(ESeekStart, offset); // Set file position
-    tmpUID.iUid = ReadUint32L(aFile);    
-    aElement.SetUID3L(tmpUID);
-        
-    /**
-     * Read SID
-     */
-    if( isFileInRom )
-        offset = SID_OFFSET_ROM;
-    else
-        offset = SID_OFFSET_ROFS;
-    aFile.Seek(ESeekStart, offset); // Set file position
-    tmpUID.iUid = ReadUint32L(aFile);    
-    aElement.SetSIDL(tmpUID);
-    
-    /**
-     * Read Capability
-     */
-    if( isFileInRom )
-        offset = CAPABILITY_OFFSET_ROM;
-    else
-        offset = CAPABILITY_OFFSET_ROFS;
-    aFile.Seek(ESeekStart, offset); // Set file position
-    TUint32 tmpVal = ReadUint32L(aFile);
-    aElement.SetCapabilityL(tmpVal);    
-    }
-
-// ---------------------------------------------------------------------------
-
-TUint32 CLauncherDLLParser::ReadUint32L( RFile& aFile )
-    {
-    TBuf8<4> tempBuf;    
-    User::LeaveIfError(aFile.Read(tempBuf, 4));
-    const TUint8* ptr = tempBuf.Ptr();    
-    return TUint32(ptr[0] | (ptr[1]<<8) | (ptr[2]<<16) | (ptr[3]<<24));    
-    }
--- a/launcher/engine/src/launcherengine.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1665 +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 <coemain.h>
-#include <eikenv.h>
-#include <pathinfo.h> 
-#include <apgtask.h>
-#include <bautils.h>
- 
-#include "launchertraces.h"
-#include "e32image.h"
-#include "launcherxmlparser.h"
-#include "launcherdllparser.h"
-#include "launcherengine.h"
-
-_LIT(KLogFileName, "LauncherLog.txt");
-_LIT(KBCLogFileName, "LauncherBCLog.txt");
-_LIT(KSystemDllsFileName, "SystemDlls.txt");
-_LIT(KRequiredDllsFileName, "RequiredDlls.xml");
-_LIT(KDotXML,".xml");
-_LIT(KDotLauncherXML,".launcherxml");
-
-_LIT(KFileSeparator, "\t");
-_LIT(KFileNewLine, "\r\n");
-
-_LIT(KNewLine, "\n");
-
-const TInt KMaxAppsArraySize=250;
-const TInt KMaxDllArraySize=5000;
-const TInt KLauncherLogBufferSize = 4096;
-
-// After this many issues, issues are buffered and printed 
-// in the end of analysis
-const TInt KBigBufferUsageThreshold=10;
-
-// Buffer allocation unit
-const TInt KBigBufferAllocBytes=1024;
-
-// ---------------------------------------------------------------------------
-
-CLauncherEngine* CLauncherEngine::NewL(MLauncherUI *aLauncherUI)
-    {
-    CLauncherEngine* self = new(ELeave) CLauncherEngine;
-    CleanupStack::PushL(self);
-    self->ConstructL(aLauncherUI);
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherEngine::CLauncherEngine() : CActive(EActivePriorityIpcEventsHigh)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-
-template <typename T>
-void AppendLogBufferL(const TDesC& aText, T*& aBuf, TInt aIncreaseStep = KLauncherLogBufferSize)
-    {
-    if( aBuf == 0 )
-        {
-        aBuf = T::NewL(aIncreaseStep);
-        }
-    
-    TInt currentMaxLength = aBuf->Des().MaxLength();
-    if( aBuf->Des().Length() + aText.Length() > currentMaxLength )
-        {
-        TInt increaseSize = Max(aText.Length(), aIncreaseStep);                
-        aBuf = aBuf->ReAllocL(aBuf->Des().MaxLength() + increaseSize );
-        }
-    aBuf->Des().Append(aText);        
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::ConstructL(MLauncherUI *aLauncherUI)
-    {
-    LOGSTRING("Launcher: CLauncherEngine::ConstructL");
-    
-    User::LeaveIfNull( aLauncherUI );
-    
-    iLauncherUI = aLauncherUI;
-    
-
-    iEnv = CEikonEnv::Static();
-    iLaunchingIsActive = EFalse;
-    iDLLAnalysisIsActive = EFalse;
-    iSkipHiddenAndEmbedOnly = ETrue;
-
-    User::LeaveIfError(iTimer.CreateLocal());
-
-    User::LeaveIfError(iLs.Connect());
-    User::LeaveIfError(iWs.Connect());
-
-    iAppThreadChecker = CAppThreadChecker::NewL(this);
-    iAppRunningChecker = CAppRunningChecker::NewL(this);
-
-    iAllAppsArray = new(ELeave) CDesCArrayFlat(KMaxAppsArraySize);
-    iAppsArray = new(ELeave) CDesCArrayFlat(KMaxAppsArraySize);
-    iSystemDllArray = new(ELeave) CDesCArrayFlat(KMaxDllArraySize);
-
-    iLogWriteBuf = HBufC8::NewL(KLauncherLogBufferSize);
-
-    iLogFilePath = PathInfo::PhoneMemoryRootPath();
-    iLogFilePath.Append( KLogFileName );
-    
-    iBCLogFilePath = PathInfo::PhoneMemoryRootPath();
-    iBCLogFilePath.Append( KBCLogFileName );
-
-    iSystemDllsFilePath = PathInfo::PhoneMemoryRootPath();
-    iSystemDllsFilePath.Append( KSystemDllsFileName );
-
-    iRequiredDllsFilePath = PathInfo::PhoneMemoryRootPath();
-    iRequiredDllsFilePath.Append( KRequiredDllsFileName );
-            
-    iDLLParser = CLauncherDLLParser::NewL();
-
-    CActiveScheduler::Add(this);
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherEngine::~CLauncherEngine()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::~CLauncherEngine");
-
-    Cancel();
-
-    // close the log
-    iLogFile.Close();
-    iBCLogFile.Close();
-    if (iLogWriteBuf)
-        delete iLogWriteBuf;
-
-    if (iAppRunningChecker)
-        delete iAppRunningChecker;
-    
-    if (iAppThreadChecker)
-        delete iAppThreadChecker;
-
-    if (iSystemDllArray)
-        {
-        iSystemDllArray->Reset();
-        delete iSystemDllArray;
-        }
-
-    if (iAppsArray)
-        {
-        iAppsArray->Reset();
-        delete iAppsArray;
-        }
-
-    
-    if (iAllAppsArray)
-        {
-        iAllAppsArray->Reset();
-        delete iAllAppsArray;
-        }
-    
-    delete iXMLParser;
-   // delete iDLLParser;
-    //delete iDLLElement;
-    delete iBCIssuesBigBuffer;            
-    
-    iWs.Close();
-    iLs.Close();
-    iTimer.Close();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::DoCancel()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::DoCancel");
-    
-    if( iXMLParser )
-        {
-        iXMLParser->Cancel();
-        }
-    iTimer.Cancel();
-    
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::RunL()
-    {
-    
-    LOGSTRING("Launcher: CLauncherEngine::RunL");  
-    TInt err = iStatus.Int();
-    User::LeaveIfError(err);
-    
-    // write full app path to the log file
-    WriteInitialStuffToTheLogL(iAppsArray->MdcaPoint(iAppLaunchCounter), iLogFile);
-
-    // get the uid of the current app
-    iCurrentAppUid = KNullUid;
-    TApaAppInfo appInfo;
-    iLs.GetAllApps();
-    while (iLs.GetNextApp(appInfo) == KErrNone)
-        {
-        if (appInfo.iFullName.CompareF( iAppsArray->MdcaPoint(iAppLaunchCounter) ) == 0)
-            {
-            iCurrentAppUid = appInfo.iUid;
-            break;
-            }
-        }
-
-    if (iCurrentAppUid == KNullUid)
-        {        
-        iLogWriteBuf->Des().Append(_L("[WARN: App has no UID] "));
-        }
-
-    // parse the filename
-    TParse nameParser;
-    nameParser.SetNoWild(iAppsArray->MdcaPoint(iAppLaunchCounter), NULL, NULL);
-    iCurrentAppNameAndExt.Copy(nameParser.Drive());
-    iCurrentAppNameAndExt.Append(nameParser.NameAndExt());
-
-    // do not try to launch these apps
-    if (iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\Launcher.")) != KErrNotFound
-        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\Phone.")) != KErrNotFound
-        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\Startup.")) != KErrNotFound  
-        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\SplashScreen.")) != KErrNotFound  
-        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\eshell.")) != KErrNotFound)  
-        {
-
-        iLauncherUI->PrintText(iCurrentAppNameAndExt);
-        iLauncherUI->PrintText(_L(": SKIPPED automatically\n"));
-        
-        iLogWriteBuf->Des().Append(_L("[SKIPPED automatically] "));
-        iLogWriteBuf->Des().Append(KFileNewLine);
-        iLogFile.Write(iLogWriteBuf->Des());
-
-        iSkippedCases++;
-        CheckForMoreAppsL();
-        }
-
-    else
-        {
-
-        // dependency check not needed if the app is in the ROM/ROFS, because they'll be checked automatically
-        // when the rom image is built
-        
-        if (iCurrentAppNameAndExt[0] != 'Z' && iCurrentAppNameAndExt[0] != 'z')
-            {
-
-            if (iCurrentAppNameAndExt[2] == '[')  // this is quite likely a Java application, no dependency test needed 
-                {
-                iLogWriteBuf->Des().Append(_L("[Dependency check not done] "));
-                }
-            else
-                {  // otherwise check depencies
-            
-                #ifdef __WINS__
-                
-                    // emulator not supported
-
-                #else
-
-                    // ELF binaries
-
-                    CDesCArray* missingDllArray = NULL;
-
-                    TRAPD(err, missingDllArray = DependencyCheckForE32ImageL());
-
-                    // some error happened while processing the E32 image
-                    if (err != KErrNone)
-                        {
-
-                        iLauncherUI->PrintText(iCurrentAppNameAndExt);
-                        iLauncherUI->PrintText(_L(": unable to read import table!\n"));
-                        
-                        iLogWriteBuf->Des().Append(_L("[Unable to read import table!] "));
-                        }
-
-                    // print missing dependencies
-                    else if (err==KErrNone && missingDllArray)
-                        {
-                        if (missingDllArray->MdcaCount() > 0)
-                            {
-                            iLauncherUI->PrintText(iCurrentAppNameAndExt);
-                            iLauncherUI->PrintText(_L(": missing dependencies: "));
-                            
-                            iLogWriteBuf->Des().Append(_L("[Missing dependencies: "));
-
-                            for (TInt k=0; k<missingDllArray->MdcaCount(); k++)
-                                {
-                                iLauncherUI->PrintText(missingDllArray->MdcaPoint(k));
-                                iLauncherUI->PrintText(_L(" "));
-                                
-                                iLogWriteBuf->Des().Append(missingDllArray->MdcaPoint(k));
-                                iLogWriteBuf->Des().Append(_L(" "));
-                                }
-
-                            iLauncherUI->PrintText(_L("\n"));
-
-                            iLogWriteBuf->Des().Append(_L("] "));
-                            }
-                        }
-
-                    if (missingDllArray)
-                        delete missingDllArray;
-
-                #endif
-
-                }  // if '['
-            }  // if 'Z'
-
-
-
-        // check if the app is already running
-        TApaTaskList taskList(iWs);
-        TApaTask thisTask = taskList.FindApp(iCurrentAppUid);
-        if (thisTask.Exists())
-            {
-            iLogWriteBuf->Des().Append(_L(" [OK: App already running]"));
-            iLogWriteBuf->Des().Append(KFileNewLine);
-            iLogFile.Write(iLogWriteBuf->Des());
-
-            iOkCases++;
-            CheckForMoreAppsL();
-            }
-        
-        else
-            {
-            // check the program's capabilities
-            TApaAppCapabilityBuf buf;
-            iLs.GetAppCapability(buf, iCurrentAppUid);
-            TApaAppCapability cap = buf();
-
-            // if it's embeddable only, don't launch if setting is enabled
-            if (cap.iEmbeddability == TApaAppCapability::EEmbeddableOnly && SkipHiddenAndEmbedOnly())  
-                {
-              
-                iLauncherUI->PrintText(iCurrentAppNameAndExt);
-                iLauncherUI->PrintText(_L(": SKIPPED: embeddable only\n"));
-
-                iLogWriteBuf->Des().Append(_L("[SKIPPED: embeddable only] "));
-                iLogWriteBuf->Des().Append(KFileNewLine);
-                iLogFile.Write(iLogWriteBuf->Des());
-
-                iSkippedCases++;
-                CheckForMoreAppsL();
-                }
-        
-            // if it's hidden, don't launch if setting is enabled
-            else if (cap.iAppIsHidden && SkipHiddenAndEmbedOnly())  
-                {
-                
-                iLauncherUI->PrintText(iCurrentAppNameAndExt);
-                iLauncherUI->PrintText(_L(": SKIPPED: hidden\n"));
-                
-                iLogWriteBuf->Des().Append(_L("[SKIPPED: hidden] "));
-                iLogWriteBuf->Des().Append(KFileNewLine);
-                iLogFile.Write(iLogWriteBuf->Des());
-
-                iSkippedCases++;
-                CheckForMoreAppsL();
-                }
-
-            // otherwise do the normal launch test
-            else
-                {
-                LaunchApplicationL();
-                }
-            
-            } //if (thisTask.Exists())
-        
-        } //if (iAppsArray->MdcaPoint(iAppLaunchCounter).FindF
-        
-    }
-
-// ---------------------------------------------------------------------------
-
-CDesCArray* CLauncherEngine::ListOfAllAppsL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::ListOfAllAppsL");
-
-    // find all DLLs from the system
-    iSystemDllArray->Reset();
-    TRAP_IGNORE( FindFiles(_L("*.dll"), _L("\\sys\\bin\\")) );
-
-    // write the list of DLLs to a file
-    RFile dllFile;
-    if (dllFile.Replace(iEnv->FsSession(), iSystemDllsFilePath, EFileWrite) == KErrNone)
-        {
-        TBuf8<KMaxFileName> dllName;
-
-        for (TInt i=0; i<iSystemDllArray->MdcaCount(); i++)
-            {
-            dllName.Copy( iSystemDllArray->MdcaPoint(i) );
-            dllName.Append( KFileNewLine );
-
-            dllFile.Write( dllName );
-            }
-
-        dllFile.Close();
-        }
-
-    // reset the apps list
-    iAllAppsArray->Reset();
-
-    // search all apps
-    TApaAppInfo appInfo;
-    iLs.GetAllApps();
-
-    while (iLs.GetNextApp(appInfo) == KErrNone)
-        {
-        iAllAppsArray->AppendL(appInfo.iFullName);
-        }
-
-
-    // remove launcher.app / launcher.exe from the list
-    for (TInt i=0; i<iAllAppsArray->MdcaCount(); i++)
-        {
-        if (iAllAppsArray->MdcaPoint(i).FindF(_L("\\Launcher.")) != KErrNotFound)
-            {
-            iAllAppsArray->Delete(i);
-            iAllAppsArray->Compress();
-            break;
-            }
-        }
-
-    // sort the elements
-    iAllAppsArray->Sort();
-
-    return iAllAppsArray;
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CLauncherEngine::FindFiles(const TDesC& aFileName, const TDesC& aPath)
-    {
-    TFindFile fileFinder(iEnv->FsSession());
-    CDir* fileList; 
-    TInt err = fileFinder.FindWildByDir(aFileName, aPath, fileList);
-
-    while (err == KErrNone)
-        {
-        for (TInt i=0; i<fileList->Count(); i++)
-            {
-            TParse fullentry;
-            fullentry.Set((*fileList)[i].iName, &fileFinder.File(), NULL);
-
-            TRAP(err, iSystemDllArray->AppendL(fullentry.NameAndExt())); 
-            }
-
-        delete fileList;
-        err = fileFinder.FindWild(fileList);
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-
-
-void CLauncherEngine::StartAppLaunchingL(const CArrayFix<TInt>* aSelectedApps, TBool aAutoClose)
-    {
-    LOGSTRING("Launcher: CLauncherEngine::StartAppLaunchingL");
-
-    // check that we have something to launch
-    if (aSelectedApps->Count() <= 0)
-        {
-        _LIT(message, "Nothing selected");
-        iLauncherUI->ShowErrorMessage(message);
-        }
-    else
-        {
-        // update the list of applications to be tested
-        iAppsArray->Reset();
-
-        TInt ref(0);
-        TKeyArrayFix key(0, ECmpTUint16);
-        TInt index(0);
-
-        for (TInt i=0; i<iAllAppsArray->MdcaCount(); i++)
-            {
-            ref = i;
-
-            // if the application is selected, append it to the apps array
-            if (aSelectedApps->Find(ref, key, index) == 0)  
-                {
-                iAppsArray->AppendL(iAllAppsArray->MdcaPoint(i));
-                }
-            }
-
-
-        // to make sure that our algorithm works correctly
-        if (iAppsArray->MdcaCount() != aSelectedApps->Count())
-            {
-            _LIT(message, "Something went wrong...");
-            iLauncherUI->ShowErrorMessage(message);
-            }
-
-        
-        // init
-        Cancel();
-        iLaunchingIsActive = ETrue;
-        iAutoClose = aAutoClose;
-        iAppLaunchCounter = 0;
-        iFailedCases = 0;
-        iOkCases = 0;
-        iSkippedCases = 0;
-        iTotalNumberOfCases = iAppsArray->MdcaCount();
-        iCurrentAppUid = KNullUid;
-
-        // open the log file for writing
-        if (iLogFile.Open(iEnv->FsSession(), iLogFilePath, EFileWrite) != KErrNone)
-            {
-            iEnv->FsSession().MkDirAll(iLogFilePath);
-            iLogFile.Replace(iEnv->FsSession(), iLogFilePath, EFileWrite);
-            }
-        else
-            {
-            // file opens correctly, seek to the end
-            TInt fileSize=0;
-            iLogFile.Size(fileSize);
-            iLogFile.Seek(ESeekCurrent, fileSize);
-            }
-
-        // change focus to output view!!
-        iLauncherUI->ChangeFocusToOutputView();
-
-        //text to log
-        iLauncherUI->PrintText(_L("New test started.\n"));
-
-        // start the first launch!
-        IssueLaunch();
-
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::IssueLaunch()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::IssueLaunch");
-
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("Timing error?"), 100));
-
-    // this should keep the backlight on
-    User::ResetInactivityTime();
-
-    iDLLAnalysisIsActive = EFalse;
-    // some delay
-    iTimer.After(iStatus, 1000000);    
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::WriteInitialStuffToTheLogL(const TDesC& aOwnData, RFile& aFile)
-    {
-    LOGSTRING("Launcher: CLauncherEngine::WriteInitialStuffToTheLog");
-
-    TTime time;
-    time.HomeTime();
-    TBuf<32> currentTime;
-    TBuf<32> currentDate;
-
-    // current date            
-    _LIT(KCurrentDate,"%D%M%Y%/0%1%/1%2%/2%3%/3");
-    time.FormatL(currentDate, KCurrentDate);    
-    iLogWriteBuf->Des().Copy(currentDate);    
-    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
-
-    // current time
-    _LIT(KCurrentTime,"%-B%:0%J%:1%T%:2%S%:3%+B");
-    time.FormatL(currentTime, KCurrentTime);    
-    AppendLogBufferL(currentTime, iLogWriteBuf);
-    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
-
-    // available RAM memory
-    TMemoryInfoV1Buf memory;
-    UserHal::MemoryInfo(memory);
-    iLogWriteBuf->Des().AppendNum(memory().iFreeRamInBytes);  
-    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
-
-    // own data, eg. application name
-    AppendLogBufferL(aOwnData, iLogWriteBuf);
-    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
-    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);    
-
-    // write the buffer to the file
-    aFile.Write(iLogWriteBuf->Des()); 
-
-    // clear the buffer
-    iLogWriteBuf->Des().Copy(_L(""));
-    }
-
-// ---------------------------------------------------------------------------
-
-
-void CLauncherEngine::CheckForMoreAppsL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::CheckForMoreAppsL");
-
-    // make sure the launcher app is in the foreground
-    TApaTaskList taskList(iWs);
-    TUid launcherAppUid;
-    launcherAppUid.iUid = 0x101FB74F;
-    TApaTask launcherTask = taskList.FindApp(launcherAppUid);
-    launcherTask.BringToForeground();
-
-
-    // check if we have more test to be executed
-    if ( iAppLaunchCounter >= iTotalNumberOfCases-1 )
-        {
-        
-        // all done, show stats
-        TBuf<200> message;
-        message.Append( _L("Done: ") );
-        message.AppendNum( iOkCases );
-        message.Append( _L(" ok, ") );
-        message.AppendNum( iFailedCases );
-        message.Append( _L(" failed, ") );
-        message.AppendNum( iSkippedCases );
-        message.Append( _L(" skipped.") );
-
-        // print the message to the output screen
-        iLauncherUI->PrintText(message);
-        iLauncherUI->PrintText(_L("\n\n"));
-        
-        //write same stuff to the log
-        WriteInitialStuffToTheLogL(message, iLogFile);
-        iLogWriteBuf->Des().Copy(KFileNewLine);
-        iLogWriteBuf->Des().Append(KFileNewLine);        
-        iLogFile.Write(iLogWriteBuf->Des());
-
-        // close the log
-        iLogFile.Close();
-
-        iLaunchingIsActive = EFalse;
-
-        // all apps launched
-        _LIT(KAllDoneMessage, "All apps launched");
-        iLauncherUI->ShowInfoMessage(KAllDoneMessage);
-        }
-    else
-        {
-        // more apps to be launched, maintain requests
-        iAppLaunchCounter++;
-        IssueLaunch();
-        }
-  
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::LaunchApplicationL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::LaunchApplication");
-    LOGSTRING3("Launcher: Trying to launch %S, UID: %d", &iCurrentAppNameAndExt, iCurrentAppUid.iUid);
-
-    TRAPD(err, DoLaunchApplicationL());
-    
-    if (err!=KErrNone)
-        {
-        iLogWriteBuf->Des().Append(_L("[FAIL: Cannot launch the app] "));        
-       
-        iLauncherUI->PrintText(iCurrentAppNameAndExt);
-        iLauncherUI->PrintText(_L(": cannot launch\n"));
-        
-        // write the buffer to the log
-        iLogWriteBuf->Des().Append(KFileNewLine);        
-        iLogFile.Write(iLogWriteBuf->Des());
-
-        // this application isn't even launchable, go to next one
-        iFailedCases++;
-        CheckForMoreAppsL();        
-        }
-    
-    }
-// ---------------------------------------------------------------------------
-
-
-void CLauncherEngine::DoLaunchApplicationL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::DoLaunchApplicationL");
-
-    // create a new handle
-    RThread newThreadHandle;
-    iCurrentAppThread = newThreadHandle;
-
-
-    // Find the task with uid3
-    TApaTaskList tasklist(iWs);
-    TApaTask task=tasklist.FindApp(iCurrentAppUid);
-
-    if (task.Exists())
-        // Task exists, bring it to foreground
-        {
-        task.BringToForeground();
-        }
-    else
-        // Task doesn't exist, launch a new instance of an application
-        {
-        TApaAppInfo appInfo;
-        User::LeaveIfError(iLs.GetAppInfo(appInfo, iCurrentAppUid));
-        TApaAppCapabilityBuf capBuf;
-        User::LeaveIfError(iLs.GetAppCapability(capBuf, iCurrentAppUid));
-        TApaAppCapability& caps = capBuf();
-
-        CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
-        cmdLine->SetExecutableNameL(appInfo.iFullName);
-
-        if ( caps.iLaunchInBackground )
-            // Apps capability defines that the app is launched in background
-            {
-            cmdLine->SetCommandL(EApaCommandBackground);
-            }
-        else
-            {
-            cmdLine->SetCommandL(EApaCommandRun);
-            }
-
-        // start the app
-        User::LeaveIfError(iLs.StartApp(*cmdLine, iCurrentAppThreadId));
-
-        // activate thread checker active object
-        iAppThreadChecker->ActivateChecking();
-
-        // now open a handle to the thread and register death notifier
-        TInt err = iCurrentAppThread.Open(iCurrentAppThreadId);
-        if (err == KErrNone)
-            iCurrentAppThread.Logon(iAppThreadChecker->iStatus);
-        else
-            {
-            iCurrentAppThread.Close();
-            TRequestStatus* status = &iAppThreadChecker->iStatus;
-            User::RequestComplete(status, KErrNone);
-            iAppThreadChecker->Cancel();
-            User::Leave(err);                
-            }
-
-        CleanupStack::PopAndDestroy(); // cmdLine
-        }
-
-    // the application is now running, start a check to see if it's still alive
-    iAppRunningChecker->StartTesting(); 
-
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::CheckIfAppIsRunningL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::CheckIfAppIsRunningL");
-
-    // cancel the death notifier since it isn't needed anymore
-    if( iCurrentAppThread.Handle() != 0 )
-        {
-        iCurrentAppThread.LogonCancel(iAppThreadChecker->iStatus);
-        }
-
-    // cancel checkers
-    iAppThreadChecker->Cancel();
-    iAppRunningChecker->Cancel(); 
-
-
-
-    // check from the window server if the app is running
-    TApaTaskList taskList(iWs);
-    TApaTask thisTask = taskList.FindApp(iCurrentAppUid);
-
-    if( !thisTask.Exists() ) // application not running -> FAIL
-        {
-        // check from the thread why it quit
-        CheckWhyThreadDiedL();
-
-        // --> CheckForMoreApps() and all the other stuff called from CheckWhyThreadDied() !
-
-        }
-    else
-        {
-        // app is running!
-        iOkCases++;
-
-        // close handle to the thread        
-        iCurrentAppThread.Close();
-
-
-        iLogWriteBuf->Des().Append(_L(" [OK]"));
-        iLogWriteBuf->Des().Append(KFileNewLine);        
-        iLogFile.Write(iLogWriteBuf->Des());
-
-
-        // close the running application if needed
-        if (iAutoClose)
-            {
-            // since the application is still open, let's close it
-            thisTask.EndTask();
-            //User::After(1000);
-            //thisTask.SendSystemEvent(EApaSystemEventShutdown);
-            //thisTask.KillTask();
-            //User::After(1000);
-            }
-
-        // this app is done now, move to the next one!
-        CheckForMoreAppsL();
-                
-        }    
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::CheckWhyThreadDiedL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::CheckWhyThreadDiedL");
-
-    // cancel the death notifier since it isn't needed anymore
-    if( iCurrentAppThread.Handle() != 0 )
-        {
-        iCurrentAppThread.LogonCancel(iAppThreadChecker->iStatus);
-        }
-
-    // make sure all checkers are cancelled
-    iAppRunningChecker->Cancel(); 
-    iAppThreadChecker->Cancel(); 
-
-    TBuf<256> outputText;
-    outputText.Append(_L("App.Closed. "));
-
-
-    if (iCurrentAppThread.ExitType() == EExitKill)
-        {
-        outputText.Append(_L("\"EExitKill\""));
-        }
-    else if (iCurrentAppThread.ExitType() == EExitTerminate)
-        {
-        outputText.Append(_L("\"EExitTerminate\""));
-        }
-    else if (iCurrentAppThread.ExitType() == EExitPanic)
-        {
-        outputText.Append(_L("\"EExitPanic\""));
-        }
-    else if (iCurrentAppThread.ExitType() == EExitPending)
-        {
-        outputText.Append(_L("\"EExitPending\""));
-        }
-    else // unknown reason
-        {
-        outputText.Append(_L("\"Exit_Unknown_Reason\""));
-        }        
-    
-    outputText.Append(_L(" code:"));
-    TInt exitReason = iCurrentAppThread.ExitReason();
-    outputText.AppendNum(exitReason);
-    outputText.Append(_L(" \""));
-
-    TPtrC exitCategory = iCurrentAppThread.ExitCategory();
-    outputText.Append(exitCategory);
-
-    outputText.Append(_L("\""));
-
-
-    // print to screen
-    iLauncherUI->PrintText(iCurrentAppNameAndExt);
-    iLauncherUI->PrintText(_L(": "));
-    iLauncherUI->PrintText(outputText);
-    iLauncherUI->PrintText(_L("\n"));
-    
-    // write to the log also
-    iLogWriteBuf->Des().Append(_L(" [FAIL: "));
-    iLogWriteBuf->Des().Append(outputText);
-    iLogWriteBuf->Des().Append(_L("]"));
-    iLogWriteBuf->Des().Append(KFileNewLine);
-    
-    iLogFile.Write(iLogWriteBuf->Des());
-
-    // close handle to the thread
-    //iCurrentAppThread.Close();    <-- not safe the close the handle because of the "App.Closed" dialog
-    //                                  somehow takes ownership of the thread or something
-
-    // nothing to do anymore, move to the next app
-    iFailedCases++;
-    CheckForMoreAppsL();
-    }
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-
-CDesCArray* CLauncherEngine::DependencyCheckForE32ImageL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::DependencyCheckForE32ImageL");
-
-    // create an empty array for the missing dll names
-    CDesCArray* missingDllArray = new(ELeave) CDesCArrayFlat(100);
-    CleanupStack::PushL(missingDllArray);
-
-    // get a list of DLLs from the E32 image file
-    E32ImageReader* reader = E32ImageReader::NewLC();
-    CDesCArray* dllArray = reader->ListOfDLLsL( iAppsArray->MdcaPoint(iAppLaunchCounter) );
-    CleanupStack::PopAndDestroy(); // reader
-    CleanupStack::PushL(dllArray);
-
-    // compare system DLL and image DLL arrays
-    TInt pos(0);
-    for (TInt j=0; j<dllArray->MdcaCount(); j++)
-        {
-        if (iSystemDllArray->Find(dllArray->MdcaPoint(j), pos, ECmpFolded) != 0)  
-            {
-            // DLL not found, append the name to the list of missing DLLs
-            missingDllArray->AppendL(dllArray->MdcaPoint(j));  
-            }
-        }
-
-    CleanupStack::PopAndDestroy(); // dllArray
-    CleanupStack::Pop();  // missingDllArray
-
-    LOGSTRING("Launcher: CLauncherEngine::DependencyCheckForE32ImageL returns");
-
-    return missingDllArray;
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CLauncherEngine::DeleteLogFile()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::DeleteLogFile");
-    return BaflUtils::DeleteFile(iEnv->FsSession(), iLogFilePath);
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::StopLaunchingL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::StopLaunchingL");
-    if(iLaunchingIsActive)
-        {
-        //write to the log
-        WriteInitialStuffToTheLogL(_L("Cancelled by the user !!! "), iLogFile);
-        iLogWriteBuf->Des().Copy(KFileNewLine);
-        iLogWriteBuf->Des().Append(KFileNewLine);
-        iLogFile.Write(iLogWriteBuf->Des());
-    
-        // close the log
-        iLogFile.Close();
-    
-        // print to the screen
-        iLauncherUI->PrintText(_L("Launching cancelled.\n\n"));
-    
-        // cancel all active objects
-        if( iCurrentAppThread.Handle() != 0 )
-            {
-            iCurrentAppThread.LogonCancel(iAppThreadChecker->iStatus);
-            }
-        Cancel();
-        iAppRunningChecker->Cancel(); 
-        iAppThreadChecker->Cancel(); 
-        
-        iLaunchingIsActive = EFalse;
-    
-        _LIT(KMessage, "Launching cancelled");
-        iLauncherUI->ShowInfoMessage(KMessage);
-
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-TBool CLauncherEngine::LogFileExists()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::LogFileExists");
-    return BaflUtils::FileExists(iEnv->FsSession(), iLogFilePath);
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CLauncherEngine::DeleteBCLogFile()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::DeleteBCLogFile");
-    return BaflUtils::DeleteFile(iEnv->FsSession(), iBCLogFilePath);
-    }
-
-
-// ---------------------------------------------------------------------------
-
-TBool CLauncherEngine::BCLogFileExists()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::BCLogFileExists");
-    return BaflUtils::FileExists(iEnv->FsSession(), iBCLogFilePath);
-    }
-
-// ---------------------------------------------------------------------------
-void CLauncherEngine::AnalyseDLLsL( const TDesC& aFileName )
-    {
-    LOGSTRING("Launcher: CLauncherEngine::AnalyseDLLsL");
-    _LIT(KStartSeparator, "******************************");
-    _LIT(KStartingAnalysis, "Starting BC Analysis for DLLs.");    
-    _LIT(KInputFileSelected, "Input file selected: ");
-    
-    // Reset found issues counter and buffer
-    iFoundBCIssues = 0;    
-    delete iBCIssuesBigBuffer;
-    iBCIssuesBigBuffer = 0;
-    
-    // Reset log writing buffer:
-    iLogWriteBuf->Des().Zero();
-                
-    if( IsActive() )
-        {
-        Cancel();
-        }   
-    
-    iRequiredDllsFilePath = aFileName;
-    
-    if( BaflUtils::FileExists(iEnv->FsSession(), iRequiredDllsFilePath) == EFalse )
-        {
-        LOGSTRING2("Launcher: CLauncherEngine::AnalyseDLLsL - can't find input file: %S", &iRequiredDllsFilePath);
-        User::Leave( KErrNotFound );
-        }
-    
-    // open the log file for writing
-    if (iBCLogFile.Open(iEnv->FsSession(), iBCLogFilePath, EFileWrite) != KErrNone)
-        {
-        iEnv->FsSession().MkDirAll(iLogFilePath);
-        User::LeaveIfError( iBCLogFile.Replace(iEnv->FsSession(), iBCLogFilePath, EFileWrite) );
-        }
-    else
-        {
-        // file opens correctly, seek to the end
-        TInt fileSize=0;
-        iBCLogFile.Size(fileSize);
-        iBCLogFile.Seek(ESeekCurrent, fileSize);
-        }
-    
-    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-    AppendLogBufferL(KStartSeparator(), iLogWriteBuf);
-    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-    iBCLogFile.Write(iLogWriteBuf->Des());
-    iLogWriteBuf->Des().Zero();
-    
-    // Resolve file type. Should we use XML parsing or just compare DLL list
-    TBool xmlParsing =
-        KDotXML().Compare(iRequiredDllsFilePath.Right(KDotXML().Length())) == 0 ||
-        KDotLauncherXML().Compare(iRequiredDllsFilePath.Right(KDotLauncherXML().Length())) == 0;
-    
-    // Log analysis starting time and selected input file:
-    WriteInitialStuffToTheLogL(KStartingAnalysis, iBCLogFile);    
-    AppendLogBufferL(KInputFileSelected(), iLogWriteBuf);
-    AppendLogBufferL(iRequiredDllsFilePath, iLogWriteBuf);
-    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-    iBCLogFile.Write(iLogWriteBuf->Des());
-    iLogWriteBuf->Des().Zero();
-    
-    if( xmlParsing )
-        {
-        iLauncherUI->ChangeFocusToOutputView();
-        DoBCAnalysisL();
-        }
-    else
-        {
-        DoCompareDLLListsL();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::DoBCAnalysisL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::DoBCAnalysisL");
-    if( iXMLParser == 0 )
-        {
-        iXMLParser = CLauncherXMLParser::NewL(iEnv->FsSession());
-        }
-    
-    TEntry entry;
-    User::LeaveIfError(iEnv->FsSession().Entry(iRequiredDllsFilePath, entry));
-    TInt fileSize = entry.iSize;
-    
-    _LIT(KAnalysing,"Analysing DLLs");
-    iLauncherUI->ShowProgressBar(KAnalysing, 0, fileSize);
-    iDLLAnalysisIsActive = ETrue;
-    
-    iXMLParser->ParseL(iRequiredDllsFilePath, this);
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::CancelBCAnalysis()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::CancelBCAnalysis");
-    if( iXMLParser )
-        {
-        iXMLParser->Cancel();
-        }
-    iLauncherUI->PrintText(_L("\nAnalysis cancelled.\n\n"));
-    WriteInitialStuffToTheLogL(_L("Analysis cancelled by user"), iBCLogFile);
-    iLogWriteBuf->Des().Zero();
-    iBCLogFile.Close();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::DoCompareDLLListsL()
-    {
-    LOGSTRING("Launcher: CLauncherEngine::DoCompareDLLListsL");
-    
-    RFile file;
-    CleanupClosePushL(file);
-        
-    // Show progress bar 
-    _LIT(KAnalysing,"Analysing DLLs");
-    iLauncherUI->ShowWaitDialog(KAnalysing);
-
-    if(file.Open(iEnv->FsSession(), iRequiredDllsFilePath, EFileRead) != KErrNone)
-        {
-        // Hide wait dialog  
-        iLauncherUI->HideWaitDialog();
-        
-        iLauncherUI->ChangeFocusToOutputView();
-
-        TBuf<200> msg;
-
-        
-        msg.Format(_L("Unable to open %S for reading!\n\n"), &iRequiredDllsFilePath);
-        iLauncherUI->PrintText( msg );
-        }
-    else
-        {
-        
-        CDesCArray* requiredDllArray = new(ELeave) CDesCArrayFlat(KMaxDllArraySize);
-        CleanupStack::PushL(requiredDllArray);
-
-        // read all lines the text file
-        TFileName dllName;
-        TInt i(0);
-        while( ReadLineFromFileL(file, dllName) == KErrNone && i<KMaxDllArraySize )
-            {
-            dllName.TrimAll();
-
-            if (dllName.Length() > 1)
-                requiredDllArray->AppendL(dllName);
-            
-            i++;
-            }
-
-        if (requiredDllArray->MdcaCount() == 0)
-            {
-            // Hide wait dialog  
-            iLauncherUI->HideWaitDialog();
-            
-            iLauncherUI->ChangeFocusToOutputView();
-
-            TBuf<200> msg;
-            msg.Format(_L("File %S is empty!\n\n"), &iRequiredDllsFilePath);
-            iLauncherUI->PrintText( msg );
-            }
-        else
-            {
-            // compare the arrays and print any missing items
-            CDesCArray* missingDllArray = new(ELeave) CDesCArrayFlat(KMaxDllArraySize);
-            CleanupStack::PushL(missingDllArray);
-
-            TInt pos(0);
-            for (TInt j=0; j<requiredDllArray->MdcaCount(); j++)
-                {
-                if (iSystemDllArray->Find(requiredDllArray->MdcaPoint(j), pos, ECmpFolded) != 0)  
-                    {
-                    // DLL not found, append the name to the list of missing DLLs
-                    missingDllArray->AppendL(requiredDllArray->MdcaPoint(j));  
-                    }
-                }
-
-            
-            if (missingDllArray->MdcaCount() == 0)
-                {
-                _LIT(KMessage, "No missing files found");
-                AppendLogBufferL(KMessage(), iLogWriteBuf);
-                iLauncherUI->ShowInfoMessage(KMessage);
-                }
-            else
-                {
-                iLauncherUI->ChangeFocusToOutputView();
-                _LIT(KMissingFiles, "Missing files:\n");
-
-                //iLauncherUI->PrintText( KMissingFiles );
-                AppendLogBufferL(KMissingFiles(), iBCIssuesBigBuffer, KBigBufferAllocBytes);
-                
-                AppendLogBufferL(KMissingFiles(), iLogWriteBuf);
-                
-                for (TInt i=0; i<missingDllArray->MdcaCount(); i++)
-                    {
-                    //iLauncherUI->PrintText( missingDllArray->MdcaPoint(i) );
-                    AppendLogBufferL(missingDllArray->MdcaPoint(i), iBCIssuesBigBuffer, KBigBufferAllocBytes);
-                    //iLauncherUI->PrintText( _L("\n") );         
-                    AppendLogBufferL(KNewLine(), iBCIssuesBigBuffer, KBigBufferAllocBytes);
-                    
-                    AppendLogBufferL(missingDllArray->MdcaPoint(i), iLogWriteBuf);
-                    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-                    }
-                AppendLogBufferL(KNewLine(), iBCIssuesBigBuffer, KBigBufferAllocBytes);
-                iLauncherUI->PrintText( iBCIssuesBigBuffer->Des() );
-                }
-            
-            // Hide wait dialog  
-            iLauncherUI->HideWaitDialog();
-            
-            CleanupStack::PopAndDestroy(); // missingDllArray            
-            }
-
-        CleanupStack::PopAndDestroy(); // requiredDllArray
-        }
-
-    CleanupStack::PopAndDestroy(); //file
-    iBCLogFile.Write(iLogWriteBuf->Des());
-    iLogWriteBuf->Des().Zero();
-    iBCLogFile.Close();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::ParsingProgressedL(TInt aBytes)
-    {
-    LOGSTRING2("Launcher: CLauncherEngine::ParsingProgressedL - Bytes: %d", aBytes);
-    iLauncherUI->SetProgressBarValue(aBytes);
-    }
-
-// ---------------------------------------------------------------------------
-
-
-void CLauncherEngine::ElementParsedL(const CLauncherDLLElement& aDllElement)
-    {
-    LOGSTRING("Launcher: CLauncherEngine::ElementParsedL");
-    User::ResetInactivityTime();
-
-    _LIT(KIndent, "    ");
-    _LIT(KIssuesFound, "Binary compatibility issues found:"); 
-    _LIT(KDLLMissing,"DLL is missing");
-    _LIT(KUID1Changed,"UID1 changed");
-    _LIT(KUID2Changed,"UID2 changed");
-    _LIT(KUID3Changed,"UID3 changed");
-    _LIT(KSIDChanged,"SID changed");
-    _LIT(KCapabilityChanged,"Capability changed");
-    
-    if( iDLLElement == 0 )
-        {
-        iDLLElement = CLauncherDLLElement::NewL();
-        }
-    
-    TFindFile fileFinder(iEnv->FsSession());
-    _LIT(KDLLPath, "\\sys\\bin\\");
-    TInt err = fileFinder.FindByPath(aDllElement.Name(), &KDLLPath); 
-    
-    TBuf<256> issueStr;
-    
-    if( err == KErrNotFound )
-        {
-        if( iFoundBCIssues++ == 0 )
-            {                        
-            iLauncherUI->PrintText( KIssuesFound );
-            iLauncherUI->PrintText( KNewLine );            
-            AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-            AppendLogBufferL(KIssuesFound(), iLogWriteBuf);
-            AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-            }
-        issueStr.Copy(aDllElement.Name());
-        issueStr.Append(KNewLine);
-        issueStr.Append(KIndent);
-        issueStr.Append(KDLLMissing);
-        issueStr.Append(KNewLine);
-                
-        AppendLogBufferL(issueStr, iLogWriteBuf);
-        
-        TFileName dllName = aDllElement.Name();
-        LOGSTRING2("Launcher: DLL not found: %S", &dllName);
-        if( iFoundBCIssues > KBigBufferUsageThreshold )
-            {
-            if( iBCIssuesBigBuffer == 0)
-                {
-                iBCIssuesBigBuffer = HBufC::NewL(KBigBufferAllocBytes);
-                }
-            TInt maxSize = iBCIssuesBigBuffer->Des().Length() + issueStr.Length();
-            if( maxSize >= iBCIssuesBigBuffer->Des().MaxLength())
-                {
-                iBCIssuesBigBuffer = iBCIssuesBigBuffer->ReAllocL(maxSize + KBigBufferAllocBytes );                
-                }
-            TPtr ptr(iBCIssuesBigBuffer->Des());
-            ptr += issueStr;            
-            }
-        else
-            {
-            iLauncherUI->PrintText( issueStr);
-            }
-        }
-    else if( err == KErrNone)
-        {
-        // File is found, so let's try to open it:
-        RFile dllFile;
-        CleanupClosePushL(dllFile);        
-        if( dllFile.Open(iEnv->FsSession(), fileFinder.File(), EFileRead) == KErrNone )
-            {
-            // Parse DLL:
-            iDLLParser->ParseL(iEnv->FsSession(), dllFile, *iDLLElement);
-            CleanupStack::PopAndDestroy(); // dllFile            
-            RArray<CLauncherDLLElement::TDifference> diffs;
-            CleanupClosePushL(diffs);
-                        
-            // Compare DLLs:              
-            if( iDLLElement->CompareL(aDllElement, diffs))
-                {                
-                if( iFoundBCIssues++ == 0 )
-                    {
-                    iLauncherUI->PrintText( KIssuesFound );
-                    iLauncherUI->PrintText( KNewLine );                   
-                    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-                    AppendLogBufferL(KIssuesFound(), iLogWriteBuf);
-                    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-                    }
-                // Differencies found:
-                for( TInt i = 0; i < diffs.Count(); ++i )
-                    {                
-                    // Print DLL name:
-                    if( i == 0 )
-                        {
-                        issueStr.Copy(aDllElement.Name());
-                        issueStr.Append(KNewLine);
-                        }
-                    
-                    // Print differencies:
-                    issueStr.Append(KIndent);
-                    switch(diffs[i])
-                        {
-                        case CLauncherDLLElement::EDifference_UID1:
-                            issueStr.Append(KUID1Changed);
-                            break;
-                        case CLauncherDLLElement::EDifference_UID2:
-                            issueStr.Append( KUID2Changed );
-                            break;
-                        case CLauncherDLLElement::EDifference_UID3:
-                            issueStr.Append( KUID3Changed );
-                            break;
-                        case CLauncherDLLElement::EDifference_SID:
-                            issueStr.Append( KSIDChanged );
-                            break;
-                        case CLauncherDLLElement::EDifference_Capability:
-                            issueStr.Append( KCapabilityChanged );
-                            break;
-                        }
-                    issueStr.Append( KNewLine );                    
-                    }
-                AppendLogBufferL(issueStr, iLogWriteBuf);
-                if( iFoundBCIssues > KBigBufferUsageThreshold )
-                    {
-                    // To improve performance, don't print issues to output anymore.
-                    // Instead, store the issues in buffer and print them when analysis is done.
-                    if( iBCIssuesBigBuffer == 0)
-                        {
-                        iBCIssuesBigBuffer = HBufC::NewL(KBigBufferAllocBytes);
-                        }
-                    TInt maxSize = iBCIssuesBigBuffer->Des().Length() + issueStr.Length();
-                    if( maxSize >= iBCIssuesBigBuffer->Des().MaxLength())
-                        {
-                        TInt increaseSize = Max(issueStr.Length(), KBigBufferAllocBytes);
-                        iBCIssuesBigBuffer = iBCIssuesBigBuffer->ReAllocL(maxSize + increaseSize );                            
-                        }
-                    TPtr ptr(iBCIssuesBigBuffer->Des());
-                    ptr += issueStr;
-                    }
-                else
-                    {
-                    iLauncherUI->PrintText( issueStr);
-                    }
-                }
-            CleanupStack::Pop(); // diffs
-            diffs.Close();            
-            }
-        else
-            {
-            CleanupStack::PopAndDestroy(); // dllFile
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-void CLauncherEngine::DocumentParsedL(TInt aErrorCode)
-    {            
-    LOGSTRING2("Launcher: CLauncherEngine::DocumentParsedL (Error code: %d)", aErrorCode);
-        
-    iDLLAnalysisIsActive = EFalse;
-    _LIT(KParseError, "Parse error: ");
-    _LIT(KNoIssues, "No binary compatibility issues found");
-    
-    if( IsActive() )
-        {
-        Cancel();
-        }
-     
-    //hide progress bar 
-    iLauncherUI->HideProgressBar();
-
-    if( aErrorCode != KErrNone )
-        {
-        TBuf<16> errorCodeString;
-        errorCodeString.AppendNum(aErrorCode);
-        iLauncherUI->PrintText( KNewLine );
-        iLauncherUI->PrintText( KParseError );
-        iLauncherUI->PrintText( errorCodeString );
-        iLauncherUI->PrintText( KNewLine );        
-        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-        AppendLogBufferL(KParseError(), iLogWriteBuf);
-        AppendLogBufferL(errorCodeString, iLogWriteBuf);
-        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-        }
-    else if(iFoundBCIssues == 0)
-        {
-        iLauncherUI->PrintText( KNoIssues );
-        iLauncherUI->PrintText( KNewLine );        
-        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-        AppendLogBufferL(KNoIssues(), iLogWriteBuf);
-        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
-        }
-    else if( iBCIssuesBigBuffer && iBCIssuesBigBuffer->Des().Length() > 0 )
-        {
-        iLauncherUI->PrintText(iBCIssuesBigBuffer->Des());
-        delete iBCIssuesBigBuffer;
-        iBCIssuesBigBuffer = 0;
-        }
-    if( iLogWriteBuf->Length() > 0 && iBCLogFile.SubSessionHandle() != 0)
-        {
-        iBCLogFile.Write(iLogWriteBuf->Des());
-        }
-    WriteInitialStuffToTheLogL(_L("Analysis ready"), iBCLogFile);
-    iLogWriteBuf->Des().Zero();
-    iBCLogFile.Close();
-    }
-
-// ---------------------------------------------------------------------------
-
-TInt CLauncherEngine::ReadLineFromFileL(RFile& aFile, TDes& aReadBuf)
-    {
-    LOGSTRING("Launcher: CLauncherEngine::ReadLineFromFile");
-
-    _LIT8(KImcvCRLF, "\r\n");
-    TInt err(KErrNone);
-
-    HBufC8* tempLine = HBufC8::NewLC(1000);
-    TPtr8 buffer = tempLine->Des();
-
-    // clear the target buffer
-    aReadBuf.Zero();
-
-    // get the current file position
-    TInt filePos(0);
-    aFile.Seek(ESeekCurrent, filePos);
-
-    // read the buffer
-    err = aFile.Read(buffer);
-
-    // check if it's the end of file
-    TInt s = buffer.Length();
-    if (s == 0)
-        err = KErrEof;
-
-    if (err == KErrNone)
-        {
-        // copy to the lfcr and then set the file pointer to the point after that
-        TInt pos = buffer.Find(KImcvCRLF);
-        if (pos != -1)
-            {
-            TFileName tempBuf;
-            buffer.SetLength(pos);
-            tempBuf.Copy(buffer);
-            aReadBuf.Justify(tempBuf, pos, ELeft, ' ');
-            filePos += (pos+2);
-
-            // set the file pointer back to after the lfcr
-            aFile.Seek(ESeekStart, filePos);
-            }
-        
-        // else fill the whole buffer
-        else
-            {
-            aReadBuf.Copy(buffer);
-            }
-        }
-
-    CleanupStack::PopAndDestroy(); // tempLine
-    return err;
-    }
-
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-
-
-//////////////////////////////////////////////////////////////////////////////////////
-
-// ---------------------------------------------------------------------------
-
-CAppThreadChecker* CAppThreadChecker::NewL(CLauncherEngine* aLauncherEngine)
-    {
-    LOGSTRING("Launcher: CAppThreadChecker::NewL");
-
-    CAppThreadChecker* self = new(ELeave) CAppThreadChecker;
-    CleanupStack::PushL(self);
-    self->ConstructL(aLauncherEngine);
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CAppThreadChecker::CAppThreadChecker() : CActive(EActivePriorityIpcEventsHigh)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppThreadChecker::ConstructL(CLauncherEngine* aLauncherEngine)
-    {
-    LOGSTRING("Launcher: CAppThreadChecker::ConstructL");
-
-    iEnv = CEikonEnv::Static();
-
-    iLauncherEngine = aLauncherEngine;
-
-    CActiveScheduler::Add(this);
-    }
-
-// ---------------------------------------------------------------------------
-
-CAppThreadChecker::~CAppThreadChecker()
-    {
-    LOGSTRING("Launcher: CAppThreadChecker::~CAppThreadChecker");
-
-    Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppThreadChecker::ActivateChecking()
-    {
-    LOGSTRING("Launcher: CAppThreadChecker::ActivateChecking");
-
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("Thread Checker"), 300));
-
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppThreadChecker::RunL()
-    {
-    LOGSTRING("Launcher: CAppThreadChecker::RunL");
-
-    // check the state of the thread
-    iLauncherEngine->CheckWhyThreadDiedL();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppThreadChecker::DoCancel()
-    {
-    LOGSTRING("Launcher: CAppThreadChecker::DoCancel");
-    }
-
-// ---------------------------------------------------------------------------
-
-
-
-// ---------------------------------------------------------------------------
-
-//////////////////////////////////////////////////////////////////////////////////////
-
-// ---------------------------------------------------------------------------
-
-CAppRunningChecker* CAppRunningChecker::NewL(CLauncherEngine* aLauncherEngine)
-    {
-    LOGSTRING("Launcher: CAppRunningChecker::NewL");
-
-    CAppRunningChecker* self = new(ELeave) CAppRunningChecker;
-    CleanupStack::PushL(self);
-    self->ConstructL(aLauncherEngine);
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CAppRunningChecker::CAppRunningChecker() : CActive(EActivePriorityIpcEventsHigh)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppRunningChecker::ConstructL(CLauncherEngine* aLauncherEngine)
-    {
-    LOGSTRING("Launcher: CAppRunningChecker::ConstructL");
-
-    iEnv = CEikonEnv::Static();
-    User::LeaveIfError(iTimer.CreateLocal());
-
-    iLauncherEngine = aLauncherEngine;
-
-    CActiveScheduler::Add(this);
-    }
-
-// ---------------------------------------------------------------------------
-
-CAppRunningChecker::~CAppRunningChecker()
-    {
-    LOGSTRING("Launcher: CAppRunningChecker::~CAppRunningChecker");
-
-    Cancel();
-
-    iTimer.Close();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppRunningChecker::StartTesting()
-    {
-    LOGSTRING("Launcher: CAppRunningChecker::StartTesting");
-
-    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("Running Checker"), 200));
-
-    // async delay of seven seconds
-    iTimer.After(iStatus, 7000000);    
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppRunningChecker::RunL()
-    {
-    LOGSTRING("Launcher: CAppRunningChecker::RunL");
-
-    // check if the application is running
-    iLauncherEngine->CheckIfAppIsRunningL();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CAppRunningChecker::DoCancel()
-    {
-    LOGSTRING("Launcher: CAppRunningChecker::DoCancel");
-    iTimer.Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-
-
-
-//////////////////////////////////////////////////////////////////////////////////////
-
--- a/launcher/engine/src/launcherxmlparser.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,430 +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 <f32file.h>
-#include <xml/documentparameters.h>
-#include "launcherxmlparser.h"
-#include "launchertraces.h"
-
-_LIT8(KXmlMimeType, "text/xml");
-
-/**
- * XML element names
- */
-_LIT8(KDll, "dll");
-_LIT8(KDllName, "dllname");
-_LIT8(KUID1, "uid1");
-_LIT8(KUID2, "uid2");
-_LIT8(KUID3, "uid3");
-_LIT8(KSID, "sid");
-_LIT8(KCapability, "capability");
-
-// ---------------------------------------------------------------------------
-
-CLauncherXMLParser::CLauncherXMLParser(RFs& aFs)
-:
-CActive( EPriorityIdle ),
-iParser(0),
-iFileSession(aFs),
-iParsedBytes(0)
-    {
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::ConstructL()
-    {
-    LOGSTRING("Launcher: CLauncherXMLParser::ConstructL");
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherXMLParser* CLauncherXMLParser::NewL(RFs& aFs)
-    {
-    LOGSTRING("Launcher: CLauncherXMLParser::NewL");
-    CLauncherXMLParser* self = CLauncherXMLParser::NewLC(aFs);    
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherXMLParser* CLauncherXMLParser::NewLC(RFs& aFs)
-    {
-    LOGSTRING("Launcher: CLauncherXMLParser::NewLC");
-    CLauncherXMLParser* self = new (ELeave) CLauncherXMLParser(aFs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherXMLParser::~CLauncherXMLParser()
-    {
-    LOGSTRING("Launcher: CLauncherXMLParser::~CLauncherXMLParser");
-    Cancel();
-    delete iParser;
-    delete iCurrentDllElement;    
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::ClearXMLDataBuffer()
-    {
-    iXMLDataBuffer.Zero();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::DoCancel()
-    {
-    LOGSTRING("Launcher: CLauncherXMLParser::DoCancel");
-    iIgnoreError = ETrue;
-    if( iParser )
-        {
-        TRAP_IGNORE(iParser->ParseEndL());
-        }
-    iFile.Close();
-    ClearXMLDataBuffer();
-    }
-
-// ---------------------------------------------------------------------------
-// Gives current buffer content to parser for processing. Then reads
-// next part of the file in the buffer and waits for next scheduled run.
-
-void CLauncherXMLParser::RunL()
-    {
-    TInt err = iStatus.Int();
-    LOGSTRING2("Launcher: CLauncherXMLParser::RunL - iStatus: %d", err);
-    if( err != KErrNone )
-        {
-        iObserver->DocumentParsedL(err); // Observer should cancel parsing        
-        iFile.Close();
-        ClearXMLDataBuffer();
-        }
-    else
-        {        
-        iParsedBytes += iXMLDataBuffer.Length();
-        iObserver->ParsingProgressedL(iParsedBytes);
-        // Check if the end of the file is reached:
-        if( iXMLDataBuffer.Length() > 0)
-            {
-            // Parse the data in buffer 
-            LOGSTRING("Launcher: CLauncherXMLParser::RunL: Starting XML parsing");
-            if( iParser )
-                {
-                iParser->ParseL( iXMLDataBuffer );
-                }
-            else
-                {
-                LOGSTRING("CLauncherXMLParser::RunL - Error: NULL parser");
-                User::Leave(KErrGeneral);
-                }
-            // Read new data from XML file to buffer:
-            iFile.Read( iXMLDataBuffer, KXMLBufferSize, iStatus );
-            SetActive();
-            }
-        else
-            {
-            // End of the file reached. Stop parsing and close the file:
-            LOGSTRING("Launcher: CLauncherXMLParser::RunL: Data parsed. Stopping");
-            if( iParser )
-                {
-                iParser->ParseEndL();
-                }
-            iFile.Close();
-            ClearXMLDataBuffer();
-            }    
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::ParseL(const TDesC& aFilePath, MLauncherParserObserver* aObserver)
-    {
-    LOGSTRING2("Launcher: CLauncherXMLParser::ParseL: %S", &aFilePath);
-    iIgnoreError = EFalse;
-    iParsedBytes = 0;
-    if ( IsActive() )
-        {
-        Cancel();
-        }
-    
-    if( aObserver == 0 )
-        {
-        LOGSTRING("Launcher: CLauncherXMLParser::ParseL: Error: Observer is a NULL pointer.");
-        User::Leave(KErrArgument);
-        }
-    
-    // Open the XML-file
-    TInt err = iFile.Open( iFileSession, aFilePath, EFileRead );
-    User::LeaveIfError( err );
-    
-    // Create and start XML-parser:
-    delete iParser;
-    iParser = 0;
-    iParser = CParser::NewL(KXmlMimeType, *this);        
-        
-    // Set observer:
-    iObserver = aObserver;
-    
-    // Initialize the buffer and read first part of the XML-file:
-    ClearXMLDataBuffer();
-    iFile.Read( iXMLDataBuffer, KXMLBufferSize, iStatus );
-    SetActive();   
-    iParser->ParseBeginL(); // Reset the parser to xml-filetype
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnStartDocumentL(const Xml::RDocumentParameters& /*aDocParam*/, TInt aErrorCode)
-    {    
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnStartDocumentL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnEndDocumentL(TInt aErrorCode)
-    {    
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnEndDocumentL (Error code: %d)", aErrorCode);    
-    iObserver->DocumentParsedL(aErrorCode);
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnStartPrefixMappingL( const RString& /*aPrefix*/, 
-                                                const RString& /*aUri*/, 
-                                                TInt aErrorCode)
-    {    
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnStartPrefixMappingL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Launcer: CLauncherXMLParser::OnEndPrefixMappingL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnIgnorableWhiteSpaceL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
-    {
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnSkippedEntityL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnProcessingInstructionL(  const TDesC8& /*aTarget*/, 
-                                    const TDesC8& /*aData*/, 
-                                    TInt aErrorCode)
-    {
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnProcessingInstructionL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnError(TInt aErrorCode)
-    {
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnError: %d", aErrorCode);    
-    if( iIgnoreError == EFalse )
-        {        
-        TRAP_IGNORE(iObserver->DocumentParsedL(aErrorCode));
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-TAny* CLauncherXMLParser::GetExtendedInterface(const TInt32 aUid)
-    {
-    (void)aUid;
-    LOGSTRING2("Launcher: CLauncherXMLParser::GetExtendedInterface (UID: %d)", aUid);
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnStartElementL(   const RTagInfo& aElement,
-                                            const RAttributeArray& /*aAttributes*/,
-                                            TInt aErrorCode)
-    {
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnStartElementL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    else
-        {
-        // Save XML-element name:
-        iCurrentElementName = aElement.LocalName().DesC();
-    
-        // If this is 'dll'-element, initialize new DLL element instance:
-        if( iCurrentDllElement == 0 && iCurrentElementName == KDll )
-            {
-            iCurrentDllElement = CLauncherDLLElement::NewL();
-            }
-        // Clear contents buffer:
-        iCurrentContent.Zero();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherXMLParser::OnEndElementL(const RTagInfo& aElement, TInt aErrorCode)
-    {   
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnEndElementL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    else
-        {
-        // Save XML-element's name:        
-        iCurrentElementName = aElement.LocalName().DesC();    
-        TUid tmpUID;
-
-        if( IsDataElement() )
-            {        
-            // Check that we have a pointer to parent DLL element
-            if( iCurrentDllElement == 0 )
-                {
-                LOGSTRING("Launcher: CLauncherXMLParser: Error in parsing xml (parent DLL element missing).");
-                User::Leave(KErrGeneral);
-                }
-            // DLL name
-            if( iCurrentElementName == KDllName )
-                {
-                TFileName dllName;
-                dllName.Copy(iCurrentContent);
-                iCurrentDllElement->SetNameL(dllName);
-                }
-            // UID1
-            else if( iCurrentElementName == KUID1 )
-                {
-                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
-                iCurrentDllElement->SetUID1L(tmpUID);
-                }
-            // UID2
-            else if( iCurrentElementName == KUID2 )
-                {
-                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
-                iCurrentDllElement->SetUID2L(tmpUID);
-                }
-            // UID3
-            else if( iCurrentElementName == KUID3 )
-                {
-                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
-                iCurrentDllElement->SetUID3L(tmpUID);
-                }
-            // SID
-            else if( iCurrentElementName == KSID )
-                {
-                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
-                iCurrentDllElement->SetSIDL(tmpUID);
-                }
-            // Capability
-            else if( iCurrentElementName == KCapability )
-                {            
-                iCurrentDllElement->SetCapabilityL(ConvertDes8ToUint32L(iCurrentContent));
-                }
-            }
-        else if( iCurrentElementName == KDll )
-            {
-            // DLL element parsed, give current DLL object to observer:
-            iObserver->ElementParsedL(*iCurrentDllElement);
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-TBool CLauncherXMLParser::IsDataElement()
-    {
-    if( iCurrentElementName == KDllName ||
-        iCurrentElementName == KUID1 ||
-        iCurrentElementName == KUID2 ||
-        iCurrentElementName == KUID3 ||
-        iCurrentElementName == KSID ||
-        iCurrentElementName == KCapability )
-        {
-        return ETrue;
-        }
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// Reads content of an xml-element.
-
-void CLauncherXMLParser::OnContentL(const TDesC8& aBytes, TInt aErrorCode)
-    {
-    LOGSTRING2("Launcher: CLauncherXMLParser::OnContentL (Error code: %d)", aErrorCode);
-    if( aErrorCode != KErrNone )
-        {
-        iObserver->DocumentParsedL(aErrorCode);
-        }
-    else if( iCurrentElementName.Length() == 0)
-        {
-        LOGSTRING("Launcher: CLauncherXMLParser: Error in parsing xml (element name missing).");
-        User::Leave(KErrGeneral);
-        }
-    iCurrentContent.Append(aBytes);
-    }
-
-// ---------------------------------------------------------------------------
-
-TUint32 CLauncherXMLParser::ConvertDes8ToUint32L(const TDesC8& aStr)
-    {
-    LOGSTRING("Launcher: CLauncherXMLParser::ConvertDes8ToUintL");
-    TUint32 uintVal = 0;
-    TLex8 lex(aStr);
-    TInt errorCode=lex.Val(uintVal, EHex);
-    User::LeaveIfError(errorCode);
-    return uintVal;
-    }
--- a/launcher/icons/check.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="64px"
-   height="64px"
-   id="svg2425"
-   sodipodi:version="0.32"
-   inkscape:version="0.46"
-   sodipodi:docname="littlecheck.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
-  <defs
-     id="defs2427">
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 32 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="64 : 32 : 1"
-       inkscape:persp3d-origin="32 : 21.333333 : 1"
-       id="perspective2433" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="5.5"
-     inkscape:cx="41.434135"
-     inkscape:cy="30.383938"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     inkscape:document-units="px"
-     inkscape:grid-bbox="true"
-     inkscape:window-width="1680"
-     inkscape:window-height="960"
-     inkscape:window-x="-4"
-     inkscape:window-y="-4" />
-  <metadata
-     id="metadata2430">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <g
-       style="opacity:1"
-       id="g2392"
-       inkscape:label="Taso 1"
-       transform="translate(142.14286,-114.28572)">
-      <path
-         id="path2380"
-         d="M 88.571429,669.50504 C 157.14286,706.6479 165.71429,755.21933 165.71429,755.21933 L 260,755.21933 L 377.14286,498.07647 L 297.14286,520.93361 L 220,683.79075 L 137.14286,615.21933 L 88.571429,669.50504 z"
-         style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
-      <path
-         id="path2382"
-         d="M 166.13825,753.72414 C 160.59283,734.93105 150.56818,718.85592 134.09168,702.33551 C 122.39811,690.61077 109.94955,681.0295 95.667678,672.7617 C 92.528095,670.9442 90.022074,669.29624 90.098744,669.09959 C 90.391504,668.34866 136.88523,616.64733 137.26775,616.64733 C 137.48928,616.64733 156.25397,632.01906 178.96703,650.80675 L 220.26352,684.96615 L 221.01814,683.36302 C 221.43318,682.48128 238.8474,645.7167 259.71641,601.66393 L 297.66005,521.56799 L 336.5681,510.41987 C 357.96753,504.2884 375.52719,499.31453 375.58957,499.3668 C 375.65196,499.41909 349.60366,556.8017 317.70448,626.88374 L 259.70597,754.3056 L 213.01297,754.32277 C 176.07199,754.33635 166.282,754.21133 166.13824,753.72414 L 166.13825,753.72414 z"
-         style="fill:#808080;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
-    </g>
-    <g
-       style="opacity:1"
-       id="g2438"
-       inkscape:label="Taso 1"
-       transform="matrix(0.2179694,0,0,0.244371,-19.028457,-120.49825)">
-      <path
-         id="path2440"
-         d="M 88.571429,669.50504 C 157.14286,706.6479 165.71429,755.21933 165.71429,755.21933 L 260,755.21933 L 377.14286,498.07647 L 297.14286,520.93361 L 220,683.79075 L 137.14286,615.21933 L 88.571429,669.50504 z"
-         style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
-      <path
-         id="path2442"
-         d="M 166.13825,753.72414 C 160.59283,734.93105 150.56818,718.85592 134.09168,702.33551 C 122.39811,690.61077 109.94955,681.0295 95.667678,672.7617 C 92.528095,670.9442 90.022074,669.29624 90.098744,669.09959 C 90.391504,668.34866 136.88523,616.64733 137.26775,616.64733 C 137.48928,616.64733 156.25397,632.01906 178.96703,650.80675 L 220.26352,684.96615 L 221.01814,683.36302 C 221.43318,682.48128 238.8474,645.7167 259.71641,601.66393 L 297.66005,521.56799 L 336.5681,510.41987 C 357.96753,504.2884 375.52719,499.31453 375.58957,499.3668 C 375.65196,499.41909 349.60366,556.8017 317.70448,626.88374 L 259.70597,754.3056 L 213.01297,754.32277 C 176.07199,754.33635 166.282,754.21133 166.13824,753.72414 L 166.13825,753.72414 z"
-         style="fill:#808080;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
-    </g>
-  </g>
-</svg>
--- a/launcher/icons/qgn_menu_launcher.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 88">
-	<defs>
-		<linearGradient id="linearGradient17394" x1="0%" y1="0%" x2="100%"
-			y2="66.6667%" spreadMethod="pad" gradientUnits="objectBoundingBox">
-			<stop id="stop17396" style="stop-opacity:1;stop-color:rgb(242,255,86)"
-				offset="0"/>
-			<stop id="stop17398" style="stop-opacity:1;stop-color:rgb(212,230,7)"
-				offset="1"/>
-		</linearGradient>
-		<linearGradient id="linearGradient17400_1" x1="36.5869" y1="-20.085"
-			x2="117.956" y2="59.4589" xlink:href="#linearGradient17394"
-			gradientUnits="userSpaceOnUse"
-			gradientTransform="matrix(0.53761 0 0 0.926099 1.6227 25.866)">
-		</linearGradient>
-		<linearGradient x1="36.5869" y1="-20.085" x2="117.956" y2="59.4589"
-			xlink:href="#linearGradient17394" gradientUnits="userSpaceOnUse"
-			gradientTransform="matrix(0.53761 0 0 0.926099 1.6227 25.866)">
-		</linearGradient>
-	</defs>
-	<g>
-		<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="30.5986"
-			y1="26.9722" x2="53.4647" y2="54.4606">
-			<stop offset="0" style="stop-opacity:0;stop-color:rgb(255,128,128)"/>
-			<stop offset="1" style="stop-opacity:0;stop-color:rgb(8,66,150)"/>
-		</linearGradient>
-		<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="37.7549"
-			y1="20.2007" x2="60.648" y2="20.2007">
-			<stop offset="0" style="stop-color:rgb(0,92,254)"/>
-			<stop offset="1" style="stop-color:rgb(0,92,230)"/>
-		</linearGradient>
-		<path
-			d="M21.184 21.318 C31.419 9.612 43.98 7.844 53.009 9.984 C62.034 12.124 71.898 19.381
-				72.456 31.2 C67.843 23.4 57.101 19.847 50.403 21.056 C43.972 22.217 38.445
-				25.849 36.84 28.571 C31.699 30.642 23.047 27.536 21.184 21.318 z"
-			 style="fill:url(#XMLID_8_)"/>
-		<polygon points="59.157,31.968 66.832,43.086 78.696,41.706 70.564,31.787"
-			 style="fill:rgb(255,0,0)"/>
-		<radialGradient id="XMLID_10_" cx="-48.0791" cy="39.3374" r="10.3877"
-			fx="-48.0791" fy="39.3374"
-			gradientTransform="matrix(1.0025 0.1408 -0.2587 0.9612 82.2902 3.6922)"
-			gradientUnits="userSpaceOnUse">
-			<stop offset="0" style="stop-color:rgb(194,249,143)"/>
-			<stop offset="1" style="stop-color:rgb(23,139,0)"/>
-		</radialGradient>
-		<path
-			d="M31.926 40.793 C30.315 46.775 23.949 50.912 17.711 50.035 C11.472 49.159 7.714 43.602
-				9.325 37.62 C10.934 31.635 17.301 27.494 23.542 28.368 C29.778 29.244 33.534
-				34.808 31.926 40.793 z"
-			 style="fill:url(#XMLID_10_)"/>
-		<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="37.165"
-			y1="24.022" x2="59.6654" y2="24.022">
-			<stop offset="0" style="stop-color:rgb(81,140,247)"/>
-			<stop offset="1" style="stop-color:rgb(51,102,204)"/>
-		</linearGradient>
-		<path
-			d="M29.906 28.778 C34.77 22.174 43.702 16.404 52.82 16.87 C61.941 17.335 70.128 24.313
-				72.456 31.2 C67.245 24.313 59.706 20.871 53.194 20.965 C47.69 21.043 40.539
-				24.128 36.84 28.571 C34.77 29.432 30.536 29.147 29.906 28.778 z"
-			 style="fill:url(#XMLID_12_)"/>
-		<path id="path19050"
-			d="M40.8495 45.7047 L45.6374 42.2346 L41.7423 36.4286 L43.6873 42.0156 z"
-			 style="stroke-opacity:1;stroke-miterlimit:4;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0;
-			fill-rule:evenodd;fill:rgb(255,0,0)"
-			transform="matrix(1 0 0 1 0 0) translate(-10.5 -11) translate(45.717 45.6311) scale(1.22417 1.22417) translate(-45.717 -45.6311) translate(40.563 41.1383) scale(0.876322 1) translate(-40.563 -41.1383) translate(46.0671 41.1383) scale(1.16936 1) translate(-46.0671 -41.1383) translate(46.0671 35.7119) scale(0.879308 0.962365) translate(-46.0671 -35.7119) translate(46.0671 46.5647) scale(1.10981 0.986965) translate(-46.0671 -46.5647) translate(40.563 41.1383) scale(0.950529 1) translate(-40.563 -41.1383)"
-			/>
-		<path id="path17526"
-			d="M47.4959 34.1139 L42.1697 41.213 L48.3432 46.4067 L44.6166 41.0903 z"
-			 style="stroke-opacity:1;stroke-miterlimit:4;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0;
-			fill-rule:evenodd;fill:rgb(255,0,0)"
-			transform="matrix(1 0 0 1 0 0) translate(5 -1) translate(48.5099 40.0936) scale(0.860598 1) translate(-48.5099 -40.0936) translate(41.3364 40.0936) scale(1.16198 1) translate(-41.3364 -40.0936)"
-			/>
-		<path id="path18288"
-			d="M45.0758 39.3423 L41.8151 46.0623 L43.0468 39.5597 L40.012 34.2418 z"
-			 style="stroke-opacity:1;stroke-miterlimit:4;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0;
-			fill-rule:evenodd;fill:rgb(255,0,0)"
-			transform="matrix(1 0 0 1 0 0) translate(-10.3333 9.83333) translate(39.1149 40.4273) scale(0.857902 1) translate(-39.1149 -40.4273) translate(46.1523 47.7134) scale(1.08282 0.908502) translate(-46.1523 -47.7134)"
-			/>
-		<path id="path16634"
-			d="M22.0745 5.81657 L37.3876 30.5355 L27.8687 39.6137 L37.3876 49.4575 L30.9727 61.5982
-				L66.2549 82.3796 L48.0447 60.0669 L56.3221 50.5512 L44.5268 40.7074 L53.6319
-				28.2386 z"
-			 style="fill-opacity:1;fill-rule:evenodd;stroke-linecap:butt;stroke-linejoin:miter;stroke-width:0.705606px;
-			stroke:rgb(0,0,0);fill:url(#linearGradient17394)"
-			transform="matrix(1 0 0 1 0 0)"/>
-		<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="49.4912"
-			y1="61.1475" x2="28.1645" y2="61.1475">
-			<stop offset="0" style="stop-color:rgb(0,86,228)"/>
-			<stop offset="1" style="stop-color:rgb(0,67,206)"/>
-		</linearGradient>
-		<path
-			d="M11.744 50.158 C12.907 61.196 21.379 70.149 33.682 71.877 C45.074 73.476 57.106 67.547
-				64.156 58.925 L54.005 62.075 L48.376 52.774 C38.759 60.212 17.646 66.188
-				11.744 50.158 z"
-			 style="fill:url(#XMLID_9_)"/>
-		<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="49.1025"
-			y1="59.4443" x2="20.5393" y2="59.4443">
-			<stop offset="0" style="stop-color:rgb(99,147,244)"/>
-			<stop offset="1" style="stop-color:rgb(72,133,254)"/>
-		</linearGradient>
-		<polygon points="47.515,51.789 54.005,62.075 64.156,58.925 57.456,49.496"
-			 style="fill:rgb(77,136,255)"/>
-		<path
-			d="M54.005 62.075 C42.815 72.325 14.88 74.004 11.602 49.722 C16.285 59.661 35.918 64.892
-				47.763 51.583 z"
-			 style="fill:url(#XMLID_11_)"/>
-		<polygon points="58.778,54.839 69.851,53.393 78.73,41.72 66.832,43.086"
-			 style="fill:rgb(153,0,0)"/>
-		<polygon points="58.778,54.839 51.896,44.684 59.119,31.944 67.085,43.071"
-			 style="fill:rgb(255,102,153)"/>
-	</g>
-</svg>
--- a/launcher/inc/applicationview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +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 APPLICATIONVIEW_H
-#define APPLICATIONVIEW_H
-
-#include <hbview.h>
-
-class HbAction;
-class HbDocumentLoader;
-class HbListWidget;
-class CommonActions;
-class EngineWrapper;
-
-class ApplicationView : public HbView
-{
-    Q_OBJECT
-    
-public:
-    
-    /**
-     * Constructor
-     */
-    ApplicationView();
-    
-    /**
-     * Destructor
-     */
-    ~ApplicationView();
-
-    /**
-     * Created Application View
-     */
-    static ApplicationView* create(HbDocumentLoader &loader,
-                        CommonActions *commonActions, 
-                        EngineWrapper *engine);
-    
-    /**
-     * Setter for engine
-     */
-    void setEngine(EngineWrapper *engine);
-    
-private slots:
-
-    
-    /**
-     * Refreshed application list
-     */
-    void refreshAppList();
-    
-    /**
-     * Launches selected applications
-     */
-    void launchSelectedApplications();
-    
-    /**
-     * Launches and closes selected applications
-     */
-    void launchAndCloseSelectedApplications();
-    
-    /**
-     * Selects all list items
-     */
-    void selectAllItems();
-    
-    /**
-     * unselects all items
-     */
-    void unselectAllItems();
-    
-    /**
-     * Changes launch options so that hidden applications are skipped
-     */
-    void launchOptionsSkipHidden();
-    
-    /**
-     * Changes launch options so that hidden applications are not skipped
-     */
-    void launchOptionsDontSkipHidden();
-    
-    /**
-     * Opens output view
-     */
-    void openOutputView();
-
-
-private:
-    
-    /**
-     * Initializes view
-     */
-    void init(HbDocumentLoader &loader, CommonActions *commonActions);
-    
-    /**
-     * connects signals and slots
-     */
-    void connectSignalsAndSlots();
-    
-    /**
-     * Loads all UI items from xml file
-     */
-    void loadItemsFromXml(HbDocumentLoader &loader);
-  
-private slots:
-
-    
-private:
-    EngineWrapper *mEngine;
-    
-    //UI components:
-    HbListWidget *mApplicationList;
-    
-    //Actions:
-    HbAction *mActionRefresh;
-    HbAction *mActionLaunchApps;
-    HbAction *mActionLaunchAndCloseApps;
-    HbAction *mActionSkipHidden;
-    HbAction *mActionDontSkipHidden;
-    HbAction *mActionSelectAll;
-    HbAction *mActionUnselectAll;
-    HbAction *mActionOpenOutputView;
-
-
-};
-
-#endif // APPLICATIONVIEW_H
--- a/launcher/inc/commonActions.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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 COMMONACTIONS_H
-#define COMMONACTIONS_H
-
-#include <qobject.h>
-
-class EngineWrapper;
-class HbAction;
-class HbMenu;
-class HbApplication;
-
-class CommonActions : public QObject
-{
-    Q_OBJECT
-public:
-    
-    /**
-     * Constructor
-     */
-    CommonActions(EngineWrapper *engine, HbApplication *application);
-    
-    /**
-     * Destructor
-     */
-    ~CommonActions();
-    
-    /**
-     * Adds all actions to menu that is given as parameter
-     */
-    void addActionsToMenu(HbMenu *menu);
-    
-public slots:
-
-    /**
-     * Shows about box
-     */
-    void showAbout();
-    
-    /**
-     * Stops launching applications
-     */
-    void stopLaunch();
-    
-    /**
-     * Sends DLL info
-     */
-    void sendDllInfo();
-    
-    /**
-     * Compares DLL infos
-     */
-    void compareDllInfo();
-    
-    /**
-     * Sends log
-     */
-    void sendLog();
-    
-    /**
-     * Deletes log
-     */
-    void deleteLog();
-    
-    /**
-     * Exits launcher
-     */
-    void exit();
-
-private:
-    void connectSignalsAndSlots();
-    
-private:
-    EngineWrapper *mEngine;
-    
-    HbApplication *mApplication;
-    
-    //Actions:
-
-    HbAction *mActionStopLaunch;
-    HbAction *mActionSendDllInfo;
-    HbAction *mActionCompareDllInfo;
-    HbAction *mActionSendLog;
-    HbAction *mActionDeleteLog;
-    HbAction *mActionAbout;
-    HbAction *mActionExit;
-    
-};
-    
-#endif //COMMONACTIONS_H
--- a/launcher/inc/enginewrapper.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +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 ENGINEWRAPPER_H
-#define ENGINEWRAPPER_H
-
-#include <qstringlist.h>
-#include <qabstractitemmodel.h>
-#include <qlist.h>
-#include <coecntrl.h>
-
-#include "launcherengine.h"
-
-class HbProgressDialog;
-class HbDeviceProgressDialog;
-class HbAction;
-
-class LauncherMainWindow;
-
-
-class EngineWrapper : public QObject, public MLauncherUI
-{
-    Q_OBJECT
-    
-public:
-    
-    /**
-     * Constructor
-     */
-    EngineWrapper(LauncherMainWindow* mainWindow);
-    
-    /**
-     * Destructor
-     */
-    ~EngineWrapper();
-    
-    /**
-     * Initializes Engine Wrapper
-     * @return true if engine was started successfully
-     */
-    bool init();
-    
-public:
-    // functions that are called from UI
-    
-    /**
-     * Fetches list of applications from engine
-     */
-    bool listOfAllApps(QStringList &allAppsQStringList);
-    
-    /**
-     * Starts launching applications that are given as parameter
-     */
-    bool startAppLaunching(const QModelIndexList &list, bool autoClose);
-    
-    /**
-     * Sets engine to skip hidden applications when launching
-     */
-    void setSkipHiddenAndEmbedOnly(bool skip);
-    
-    /**
-     * Stops launching applications
-     */
-    bool stopLaunching();
-    
-    /**
-     * Sends log
-     */
-    bool sendLog();
-    
-    /**
-     * Deletes log
-     */
-    bool deleteLog();
-    
-    /**
-     * Compares dll
-     */
-    void compareDlls();
-    
-    /**
-     * Sends list of dlls
-     */
-    bool sendListOfDlls();
-    
-public:
-    // From MLauncherUIEngine
-    // functions that are called from Engine
-    
-    /**
-     * Shows error message with error text
-     */
-    virtual void ShowErrorMessage(const TDesC& aText);
-    
-    /**
-     * Shows information message with info text
-     */
-    virtual void ShowInfoMessage(const TDesC& aText);
-
-    /**
-     * Shows progress bar with text
-     */
-    virtual void ShowProgressBar(const TDesC& aText, TInt aMinimum = 0, TInt aMaximum = 0 );
-
-    /**
-     * Sets progress bar value
-     */
-    virtual void SetProgressBarValue(TInt aValue);
-
-    /**
-     * Hides progress bar
-     */
-    virtual void HideProgressBar();
-
-    /**
-     * Shows wait dialog with text
-     */
-    virtual void ShowWaitDialog(const TDesC& aText);
-
-    /**
-     * Hides wait dialog
-     */
-    virtual void HideWaitDialog();
-
-    /**
-     * Changes focus to output view
-     */
-    virtual void ChangeFocusToOutputView();
-    
-    /**
-     * Prints text to output views log
-     */
-    virtual void PrintText(const TDesC& aText);
-    
-public slots:
-    void doCompareDlls(HbAction*);
-    void CancelDllBCanalysis();
-    
-private:
-    
-    /**
-     * Allocate CArrayFix and copy QList to it
-     */
-    CArrayFix<TInt>* QModelIndexListToCArrayFixL(const QModelIndexList& qlist);
-    
-private:
-    CLauncherEngine *mEngine;
-    LauncherMainWindow *mMainWindow;
-    HbProgressDialog* mProgressDialog;
-    HbDeviceProgressDialog* mWaitDialog;
-};
-
-
-
-
-#endif //ENGINEWRAPPER_H
--- a/launcher/inc/launchermainwindow.h	Mon Oct 04 10:09:02 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:
-*
-*/
-
-
-#ifndef LauncherMainWindow_H_
-#define LauncherMainWindow_H_
-
-#include <hbmainwindow.h>
-#include <hbview.h>
-
-class HbApplication;
-class ApplicationView;
-class OutputView;
-class EngineWrapper;
-class CommonActions;
-
-class LauncherMainWindow : public HbMainWindow
-    {
-public:
-    
-    LauncherMainWindow ( QWidget *parent = 0 );
-    virtual ~LauncherMainWindow ();
-    
-    int init( HbApplication &app );
-    
-    void openApplicationView();
-    void openOutputView();
-    /**
-     * Prints text into output
-     */
-    void printText(const QString &text);
-    
-private: //data
-    EngineWrapper* mEngineWrapper;
-    ApplicationView* mApplicationView;
-    OutputView* mOutputView;
-    CommonActions* mCommonActions;
-    };
-
-#endif /* LauncherMainWindow_H_ */
--- a/launcher/inc/notifications.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef NOTIFICATIONS_H_
-#define NOTIFICATIONS_H_
-
-#include <hbmessagebox.h>
-#include <hbdeviceprogressdialog.h>
-
-
-class Notifications
-    {
-public:
-
-    /**
-     * shows message box of the specified type with text and label
-     */
-    static void showMessageBox(
-        HbMessageBox::MessageBoxType type, 
-        const QString &text, 
-        const QString &label, 
-        int timeout = HbPopup::NoTimeout
-        );
-    
-    /**
-     * shows about box
-     */
-    static void about();
-
-    /**
-     * shows information type message box
-     */
-    static void showInformationNote(const QString &text);
-
-    /**
-     * shows warning type message box
-     */
-    static void showErrorNote(const QString &text);
-    
-     /**
-     * shows progressbar
-     */
-    static HbDeviceProgressDialog* showWaitDialog(const QString &text);
-
-    
-    };
-
-
-
-#endif // NOTIFICATIONS_H_
--- a/launcher/inc/outputview.h	Mon Oct 04 10:09:02 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 OUTPUTVIEW_H
-#define OUTPUTVIEW_H
-
-#include <hbview.h>
-
-class HbDocumentLoader;
-class HbAction;
-class HbTextEdit;
-class CommonActions;
-
-class OutputView : public HbView
-{
-    Q_OBJECT
-    
-public:
-    /**
-     * Constructor
-     */
-    OutputView();
-    
-    /**
-     * Destructor
-     */
-    ~OutputView();
-    
-    /**
-     * Creates output view and adds it into main window
-     */
-    static OutputView* create(HbDocumentLoader &loader, CommonActions *commonActions);
-    
-    /**
-     * Prints text into output
-     */
-    void printText(const QString &text);
-    
-private slots:
-
-    /**
-     * Clears output
-     */
-    void clearOutput();
-    
-    /**
-     * Opens application view
-     */
-    void openApplicationView();
-    
-private:
-    
-    /**
-     * Initializes view
-     */
-    void init(HbDocumentLoader &loader, CommonActions *commonActions);
-    
-    /**
-     * Loads all output view's ui components from xml-file
-     */
-    void loadItemsFromXml(HbDocumentLoader &loader);
-    
-    /**
-     * connects signals and slots to each other
-     */
-    void connectSignalsAndSlots();
-    
-
-private:
-    
-    // Actions
-    HbAction *mActionClear;
-    HbAction *mActionOpenApplicationView;  
-
-    HbTextEdit *mTextOutput;
-    
-};
-
-#endif // OUTPUTVIEW
-
--- a/launcher/launcher.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-TEMPLATE = app
-TARGET = Launcher
-load(hb.prf)
-symbian:CONFIG -= symbian_i18n
-DEPENDPATH += src
-DEPENDPATH += inc
-INCLUDEPATH += inc
-
-HEADERS += launchermainwindow.h applicationview.h enginewrapper.h notifications.h  outputview.h commonActions.h
-SOURCES += main.cpp launchermainwindow.cpp applicationview.cpp enginewrapper.cpp notifications.cpp  outputview.cpp commonActions.cpp
-RESOURCES += launcher.qrc
-
-symbian: {
-
-        BLD_INF_RULES.prj_exports += "./rom/Launcher.iby                CORE_IBY_EXPORT_PATH(tools,Launcher.iby)"
-        BLD_INF_RULES.prj_exports += "./rom/backup_registration.xml     Z:/private/101fb74f/backup_registration.xml"
-
-        launcher_stub_sis_mk = \
-        "$${LITERAL_HASH}if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__S60_32__)" \
-        "   $${LITERAL_HASH}ifdef MARM" \
-        "       gnumakefile .sis/launcher_stub_sis.mk" \
-        "   $${LITERAL_HASH}endif" \
-        "$${LITERAL_HASH}endif"
-        BLD_INF_RULES.prj_mmpfiles += launcher_stub_sis_mk
-        
-        launcher_buildstubsis_extension = \
-        "$${LITERAL_HASH}if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)" \
-        "   $${LITERAL_HASH}ifdef MARM" \
-        "       START EXTENSION app-services/buildstubsis" \
-        "       OPTION SRCDIR sis" \
-        "       OPTION SISNAME Launcher_stub" \
-        "       END" \
-        "   $${LITERAL_HASH}endif" \
-        "$${LITERAL_HASH}endif"
-        BLD_INF_RULES.prj_extensions += launcher_buildstubsis_extension
-        
-        INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-                     
-        DEPENDPATH += engine/inc
-        DEPENDPATH += engine/src
-        INCLUDEPATH += engine/inc
-        
-        HEADERS += launcherengine.h launchertraces.h e32image.h e32imageheaders.h launcherxmlparser.h launcherdllelement.h launcherparserobserver.h launcherdllparser.h
-		SOURCES += launcherengine.cpp e32image.cpp launcherxmlparser.cpp launcherdllelement.cpp launcherdllparser.cpp
-		
-		RSS_RULES += "group_name = \"RnD Tools\"";
-		
-		LIBS += -lapgrfx -lPlatformEnv -lxqutils -lxmlframework -lbafl -lshareui -lws32 -lapparc -lefsrv -lcone
-
-
-        TARGET.CAPABILITY = ReadUserData ReadDeviceData WriteUserData WriteDeviceData PowerMgmt AllFiles
-        
-        TARGET.UID2 = 0x100039CE
-        TARGET.UID3 = 0x101FB74F
-        TARGET.SID = 0x101FB74F
-        TARGET.VID = 0x101FB657 // Nokia
-	
-        TARGET.EPOCHEAPSIZE = 0x20000 0x2000000  // Min 128Kb, Max 32Mb
-
-        ICON = ./icons/qgn_menu_launcher.svg 
-
-} else {
-    error("Only Symbian supported!")
-}
--- a/launcher/launcher.qrc	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<RCC>
-    <qresource prefix="/xml" >
-        <file alias="applicationview.xml" >src/applicationview.xml</file>
-        <file alias="outputview.xml" >src/outputview.xml</file>
-    </qresource>
-    <qresource prefix="/gfx" >
-        <file alias="launcher.svg" >icons/qgn_menu_launcher.svg</file>
-    </qresource>
-</RCC>
--- a/launcher/rom/Launcher.iby	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __LAUNCHER_IBY__
-#define __LAUNCHER_IBY__
-
-S60_APP_EXE(Launcher)
-S60_APP_RESOURCE(Launcher)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,Launcher)
-data=ZPRIVATE\10003a3f\import\APPS\Launcher_reg.RSC Private\10003a3f\import\Apps\Launcher_reg.rsc
-
-//#ifdef S60_UPGRADABLE_APP_REG_RSC
-//  S60_UPGRADABLE_APP_REG_RSC(Launcher)
-//#else
-//  S60_APP_AIF_RSC(Launcher)
-//#endif
-
-data=ZPRIVATE\101FB74F\backup_registration.xml        	private\101FB74F\backup_registration.xml
-data=ZSYSTEM\Install\Launcher_stub.sis                  \system\install\Launcher_stub.sis
-
-#endif
--- a/launcher/rom/backup_registration.xml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration>
-  <passive_backup>
-    <include_directory name="\"/>
-  </passive_backup>
-  <system_backup/>
-  <restore requires_reboot = "no"/>
-</backup_registration>
--- a/launcher/sis/Launcher_S60-5x.pkg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-;
-; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-
-; Language - standard language definitions
-&EN
-
-; Standard SIS file header
-#{"Launcher"},(0x101FB74F),4,0,0,TYPE=SA
-
-;Supports S60 v 5.0
-[0x1028315F], 0, 0, 0, {"S60ProductID"}
-
-;Supports S60 v 5.1
-[0x10283160], 0, 0, 0, {"S60ProductID"}
-
-;Supports S60 v 5.2
-[0x20022E6D], 0, 0, 0, {"S60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; normal stuff:
-"\epoc32\release\armv5\urel\launcher.exe"-"!:\sys\bin\launcher.exe"
-"\epoc32\data\z\resource\apps\launcher.mif"-"!:\resource\apps\launcher.mif"
-"\epoc32\data\z\resource\apps\launcher.rsc"-"!:\resource\apps\launcher.rsc"
-"\epoc32\data\z\private\10003a3f\import\apps\launcher_reg.rsc"-"!:\private\10003a3f\import\apps\launcher_reg.rsc"
-"..\group\backup_registration.xml"-"!:\private\101fb74f\backup_registration.xml"
--- a/launcher/sis/Launcher_stub.pkg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-
-; Language - standard language definitions
-&EN
-
-; Standard SIS file header
-#{"Launcher"},(0x101FB74F),4,0,0
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; normal stuff:
-""-"z:\sys\bin\Launcher.exe"
-""-"z:\Resource\Apps\Launcher.mif"
-""-"z:\Resource\Apps\Launcher.rsc"
-""-"z:\private\10003a3f\import\apps\Launcher_reg.rsc"
-""-"z:\private\101FB74F\backup_registration.xml"
\ No newline at end of file
--- a/launcher/sis/launcher_stub_sis.mk	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:  
-#
-
-
-TARGETDIR=$(EPOCROOT)EPOC32\Data\Z\System\Install
-
-SISNAME=Launcher_stub
-PKGNAME=Launcher_stub
-
-$(TARGETDIR) :
-	@perl -S emkdir.pl "$(TARGETDIR)"
-
-do_nothing :
-	rem do_nothing
-
-SISFILE=$(TARGETDIR)\$(SISNAME).sis
-
-$(SISFILE) : .\$(PKGNAME).pkg
-	makesis -s $? $@ 
-
-
-
-MAKMAKE : do_nothing
-
-RESOURCE : do_nothing
-
-SAVESPACE : do_nothing
-
-BLD : do_nothing
-
-FREEZE : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-FINAL : $(TARGETDIR) $(SISFILE)
-
-CLEAN : 
-	@if exist $(SISFILE) erase $(SISFILE)
-
-RELEASABLES : 
-	@echo $(SISFILE)
--- a/launcher/src/applicationview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,299 +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 <hbdocumentloader.h>
-#include <hblistwidget.h>
-#include <qstandarditemmodel.h>
-#include <hbaction.h>
-#include <hbmenu.h>
-#include <qlist.h>
-
-#include "applicationview.h"
-#include "launchermainwindow.h"
-#include "enginewrapper.h"
-#include "notifications.h"
-#include "commonActions.h"
-#include "outputview.h"
-
-
-
-
-// xml definition of view
-const char *APPLICATIONVIEW_XML = ":/xml/applicationview.xml";
-
-// name of the application view object in the xml file.
-const char *APPLICATIONVIEW = "applicationview";
-const char *LISTVIEW = "applicationList";
-const char *ACTIONREFRESH = "actionRefresh";
-const char *ACTIONLAUNCHAPPS = "actionLaunchApps";
-const char *ACTIONLAUNCHANDCLOSEAPPS = "actionLaunchAppsAndClose";
-const char *ACTIONSELECT = "actionSelectAll";
-const char *ACTIONUNSELECT = "actionUnselectAll";
-const char *ACTIONOPENOUTPUTVIEW = "actionOpenOutputView";
-const char *ACTIONSKIPHIDDEN = "actionSkipHidden";
-const char *ACTIONDONTSKIPHIDDEN = "actionDontSkipHidden";
-
-// ---------------------------------------------------------------------------
-
-ApplicationView* ApplicationView::create(HbDocumentLoader &loader, CommonActions *commonActions, EngineWrapper *engine)
-{
-    
-    // Load xml-file
-    bool ok = false;
-    qDebug("QTLauncher::load xml");
-    loader.load(APPLICATIONVIEW_XML, &ok);
-    
-    // Load Application View:
-    QGraphicsWidget *widget = loader.findWidget(APPLICATIONVIEW);
-    Q_ASSERT_X(ok && (widget != 0), "Launcher", "Invalid launcher.xml file");
-    ApplicationView *applicationView = qobject_cast<ApplicationView *>(widget);
-      
-    // Set enginewrappers pointer to applicationview and initialize it
-    applicationView->setEngine(engine);
-    applicationView->init(loader, commonActions);
-    
-    return applicationView;    
-}
-
-// ---------------------------------------------------------------------------
-
-ApplicationView::ApplicationView()  
-    :   mEngine(0),
-        mActionRefresh(0),
-        mActionLaunchApps(0),
-        mActionLaunchAndCloseApps(0),
-        mActionSkipHidden(0),
-        mActionDontSkipHidden(0),
-        mActionSelectAll(0),
-        mActionUnselectAll(0),
-        mActionOpenOutputView(0)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::setEngine(EngineWrapper *engine)
-{
-    mEngine = engine;
-}
-
-// ---------------------------------------------------------------------------
-
-ApplicationView::~ApplicationView()
-{
-    if(mActionRefresh)
-        mActionRefresh->deleteLater();
-    if(mActionLaunchApps)
-        mActionLaunchApps->deleteLater();
-    if(mActionLaunchAndCloseApps)
-        mActionLaunchAndCloseApps->deleteLater();
-    if(mActionSkipHidden)
-        mActionSkipHidden->deleteLater();
-    if(mActionDontSkipHidden)
-        mActionDontSkipHidden->deleteLater();
-    if(mActionSelectAll)
-        mActionSelectAll->deleteLater();
-    if(mActionUnselectAll)
-        mActionUnselectAll->deleteLater();
-    if(mActionOpenOutputView)
-        mActionOpenOutputView->deleteLater();
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::init(HbDocumentLoader &loader, CommonActions *commonActions)
-{
-    // Load items from xml file
-    loadItemsFromXml(loader);
-    
-    // Set actions checkable and select "Skip hidden & embed"
-    mActionSkipHidden->setCheckable(true);
-    mActionSkipHidden->setChecked(true);
-    mActionDontSkipHidden->setCheckable(true);
-    
-    commonActions->addActionsToMenu(menu());
-    
-    // Set list widget settings
-    mApplicationList->setClampingStyle(HbScrollArea::BounceBackClamping);
-    mApplicationList->setSelectionMode(HbAbstractItemView::MultiSelection);
-    
-    // Refresh application list
-    refreshAppList();
-    
-    // Connect signals and slots
-    connectSignalsAndSlots();
-   
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::refreshAppList()
-{
-    // Clear list
-
-    mApplicationList->clear();
-    QStringList apps;
-
-    // show wait dialog
-    QObject *dialog =  static_cast<QObject*>(Notifications::showWaitDialog("Initializing"));
-
-    // Get application list from engine
-    if(!mEngine->listOfAllApps(apps)) {
-        Notifications::showErrorNote("Unable to refresh list");
-    }
-    
-    // Format values to list widget
-    int i = 0;
-    while(i < apps.size()) {
-        mApplicationList->addItem(/*HbIcon(":/gfx/check.svg"),*/apps.at(i));
-        i++;
-    }
-    mApplicationList->selectAll();
-    
-    // remove the wait dialog
-    delete dialog;
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::connectSignalsAndSlots()
-{
-    // Actions
-    connect(mActionRefresh, SIGNAL(triggered()), this, SLOT(refreshAppList()));
-    connect(mActionLaunchApps, SIGNAL(triggered()), this, SLOT(launchSelectedApplications()));
-    connect(mActionLaunchAndCloseApps, SIGNAL(triggered()), this, SLOT(launchAndCloseSelectedApplications()));
-    connect(mActionSelectAll, SIGNAL(triggered()), this, SLOT(selectAllItems()));
-    connect(mActionUnselectAll, SIGNAL(triggered()), this, SLOT(unselectAllItems()));
-    connect(mActionSkipHidden, SIGNAL(triggered()), this, SLOT(launchOptionsSkipHidden()));
-    connect(mActionDontSkipHidden, SIGNAL(triggered()), this, SLOT(launchOptionsDontSkipHidden()));
-    connect(mActionOpenOutputView, SIGNAL(triggered()), this, SLOT(openOutputView()));
-}
-
-// ---------------------------------------------------------------------------
-
-
-void ApplicationView::loadItemsFromXml(HbDocumentLoader &loader)
-{
-    
-    // List widget:
-    QGraphicsWidget *widget = loader.findWidget(LISTVIEW);
-    Q_ASSERT_X((widget != 0), "Launcher", "Invalid launcher.xml file");
-    mApplicationList = qobject_cast<HbListWidget *>(widget);
-    
-    /* ACTIONS: */
-    //refresh
-    QObject *object= loader.findObject(ACTIONREFRESH);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionRefresh = qobject_cast<HbAction *>(object);
-    
-    // launch applications
-    object= loader.findObject(ACTIONLAUNCHAPPS);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionLaunchApps = qobject_cast<HbAction *>(object);
-
-    // launch and close
-    object= loader.findObject(ACTIONLAUNCHANDCLOSEAPPS);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionLaunchAndCloseApps = qobject_cast<HbAction *>(object);
-    
-    // select all applications
-    object= loader.findObject(ACTIONSELECT);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionSelectAll = qobject_cast<HbAction *>(object);
-    
-    // unselect all applications
-    object= loader.findObject(ACTIONUNSELECT);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionUnselectAll = qobject_cast<HbAction *>(object);
-    
-    // open output view
-    object= loader.findObject(ACTIONOPENOUTPUTVIEW);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionOpenOutputView = qobject_cast<HbAction *>(object);
-    
-    // skip hidden
-    object= loader.findObject(ACTIONSKIPHIDDEN);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionSkipHidden = qobject_cast<HbAction *>(object);
-    
-    // do not skip hidden
-    object= loader.findObject(ACTIONDONTSKIPHIDDEN);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionDontSkipHidden = qobject_cast<HbAction *>(object);
-    
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::launchSelectedApplications()
-{
-    QModelIndexList list = mApplicationList->selectionModel()->selectedIndexes();
-    mEngine->startAppLaunching(list, false);
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::launchAndCloseSelectedApplications()
-{
-    QModelIndexList list = mApplicationList->selectionModel()->selectedIndexes();
-    mEngine->startAppLaunching(list, true);
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::selectAllItems()
-{
-    mApplicationList->selectAll();
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::unselectAllItems()
-{
-    mApplicationList->clearSelection();
-}
-// ---------------------------------------------------------------------------
-
-void ApplicationView::launchOptionsSkipHidden()
-{
-    mActionSkipHidden->setChecked(true);
-    mActionDontSkipHidden->setChecked(false);
-    mEngine->setSkipHiddenAndEmbedOnly(true);
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::launchOptionsDontSkipHidden()
-{
-    mActionSkipHidden->setChecked(false);
-    mActionDontSkipHidden->setChecked(true);
-    mEngine->setSkipHiddenAndEmbedOnly(false);
-}
-
-// ---------------------------------------------------------------------------
-
-void ApplicationView::openOutputView()
-{
-    qDebug("OpenOutputView");
-    LauncherMainWindow *pMainWindow = static_cast< LauncherMainWindow * >( mainWindow() );
-    if( pMainWindow )
-        {
-        pMainWindow->openOutputView();
-        }
-}
-
-// ---------------------------------------------------------------------------
--- a/launcher/src/applicationview.xml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.2">
-    <object name="actionLaunchApps" type="HbAction">
-        <string name="iconText" value="LaunchApps"/>
-        <string name="text" value="Launch selected"/>
-        <string name="toolTip" value="LaunchApps"/>
-    </object>
-    <object name="actionLaunchAppsAndClose" type="HbAction">
-        <string name="iconText" value="LaunchAppsAndClose"/>
-        <string name="text" value="Launch and close selected"/>
-        <string name="toolTip" value="LaunchAppsAndClose"/>
-    </object>
-    <object name="actionRefresh" type="HbAction">
-        <string name="iconText" value="RefreshList"/>
-        <string name="text" value="Refresh list"/>
-        <string name="toolTip" value="RefreshList"/>
-    </object>
-    <object name="actionSelectAll" type="HbAction">
-        <string name="iconText" value="Select/Unselect"/>
-        <string name="text" value="Select all"/>
-        <string name="toolTip" value="Select/Unselect"/>
-    </object>
-    <object name="actionUnselectAll" type="HbAction">
-        <string name="iconText" value="Unselect All"/>
-        <string name="text" value="Unselect all"/>
-        <string name="toolTip" value="Unselect All"/>
-    </object>
-    <object name="actionSkipHidden" type="HbAction">
-        <string name="iconText" value="Skip hidden &amp; embed"/>
-        <string name="text" value="Skip hidden &amp; embed"/>
-        <string name="toolTip" value="Skip hidden &amp; embed"/>
-    </object>
-    <object name="actionDontSkipHidden" type="HbAction">
-        <string name="iconText" value="Do not skip any entries"/>
-        <string name="text" value="Do not skip any entries"/>
-        <string name="toolTip" value="Do not skip any entries"/>
-    </object>
-    <object name="actionOpenOutputView" type="HbAction">
-        <string name="iconText" value="Open output view"/>
-        <string name="text" value="Open output view"/>
-        <string name="toolTip" value="Open output view"/>
-    </object>
-    <widget name="applicationview" type="ApplicationView">
-        <widget name="applicationContent" role="HbView:widget" type="HbWidget">
-            <widget name="applicationList" type="HbListWidget">
-                <sizehint height="320.0" type="PREFERRED" width="240.0"/>
-                <zvalue value="278529.0001"/>
-            </widget>
-            <layout type="anchor" widget="applicationContent">
-                <anchoritem dst="applicationList" dstEdge="LEFT" spacing="0.0" src="" srcEdge="LEFT"/>
-                <anchoritem dst="applicationList" dstEdge="TOP" spacing="0.0" src="" srcEdge="TOP"/>
-                <anchoritem dst="applicationList" dstEdge="RIGHT" spacing="0.0" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="applicationList" dstEdge="BOTTOM" spacing="0.0" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <widget name="viewMenu" role="HbView:menu" type="HbMenu">
-            <ref object="actionLaunchAppsAndClose" role="HbMenu:addAction"/>
-            <ref object="actionLaunchApps" role="HbMenu:addAction"/>
-            <widget name="menuLaunchOptions" role="HbMenu:menu" type="HbMenu">
-                <ref object="actionSkipHidden" role="HbMenu:addAction"/>
-                <ref object="actionDontSkipHidden" role="HbMenu:addAction"/>
-                <string name="title" value="Launch options"/>
-            </widget>
-            <ref object="actionRefresh" role="HbMenu:addAction"/>
-            <ref object="actionSelectAll" role="HbMenu:addAction"/>
-            <ref object="actionUnselectAll" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="viewToobar" role="HbView:toolBar" type="HbToolBar">
-            <ref object="actionOpenOutputView" role="HbToolBar:addAction"/>
-        </widget>
-        <string name="title" value="Applications"/>
-    </widget>
-    <metadata display="QHD portrait" unit="px"/>
-</hbdocument>
--- a/launcher/src/commonActions.cpp	Mon Oct 04 10:09:02 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:
-*
-*/
-
-#include <hbapplication.h>
-#include <hbinstance.h>
-
-#include "hbaction.h"
-#include "hbmenu.h"
-#include "commonActions.h"
-#include "notifications.h"
-#include "enginewrapper.h"
-
-// ---------------------------------------------------------------------------
-
-CommonActions::CommonActions(EngineWrapper *engine, HbApplication *application)
-    : mEngine(engine), mApplication(application)
-{
-
-    
-    mActionStopLaunch = new HbAction("Stop launch", this);
-    mActionSendLog = new HbAction("Send log", this);
-    mActionDeleteLog = new HbAction("Delete log", this);
-    mActionSendDllInfo = new HbAction("Send list of DLLs", this);
-    mActionCompareDllInfo = new HbAction("Dll BC analysis", this);
-    mActionAbout = new HbAction("About", this);
-    mActionExit = new HbAction("Exit", this);
-
-
-    connectSignalsAndSlots();
-}
-
-// ---------------------------------------------------------------------------
-
-CommonActions::~CommonActions()
-{
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::showAbout()
-{
-    Notifications::about();
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::exit()
-{
-    mApplication->exit();
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::sendDllInfo()
-{
-    if (!mEngine->sendListOfDlls()) {
-        Notifications::showErrorNote("Unable to send list");
-    }
-
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::compareDllInfo()
-{
-    mEngine->compareDlls();
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::sendLog()
-{
-    if (!mEngine->sendLog()) {
-        Notifications::showErrorNote("Unable to send log");
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::deleteLog()
-{
-    if (mEngine->deleteLog()) {
-        QString text = "Log file(s) deleted";
-        Notifications::showInformationNote(text);
-    }
-    else {
-        QString text = "Unable to delete";
-        Notifications::showErrorNote(text);
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::stopLaunch()
-{
-    if (!mEngine->stopLaunching()) {
-        Notifications::showErrorNote("Unable to stop launching");
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::addActionsToMenu(HbMenu *menu)
-{
-    menu->addAction(mActionStopLaunch);
-    menu->addAction(mActionSendLog);
-    menu->addAction(mActionDeleteLog);
-    HbMenu *menuDllInfo = menu->addMenu("Dll Info");
-    menuDllInfo->addAction(mActionSendDllInfo);
-    menuDllInfo->addAction(mActionCompareDllInfo);
-    menu->addAction(mActionAbout);
-    menu->addAction(mActionExit);
-}
-
-// ---------------------------------------------------------------------------
-
-void CommonActions::connectSignalsAndSlots()
-{
-    connect(mActionStopLaunch, SIGNAL(triggered()), this, SLOT(stopLaunch()));
-    connect(mActionSendDllInfo, SIGNAL(triggered()), this, SLOT(sendDllInfo()));
-    connect(mActionCompareDllInfo, SIGNAL(triggered()), this, SLOT(compareDllInfo()));
-    connect(mActionSendLog, SIGNAL(triggered()), this, SLOT(sendLog()));
-    connect(mActionDeleteLog, SIGNAL(triggered()), this, SLOT(deleteLog()));
-    connect(mActionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
-    connect(mActionExit, SIGNAL(triggered()), this, SLOT( exit() ) );
-}
-
-
-// ---------------------------------------------------------------------------
--- a/launcher/src/enginewrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,355 +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 <xqconversions.h>
-#include <hbinputdialog.h>
-#include <bautils.h>
-#include <shareuidialog.h>
-#include <eikenv.h>
-#include <hbprogressdialog.h>
-#include <hbaction.h>
-#include <QDebug>
-
-#include "launchermainwindow.h"
-#include "notifications.h"
-#include "enginewrapper.h"
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::EngineWrapper(LauncherMainWindow* mainWindow)
-: mEngine(0), 
-  mMainWindow(mainWindow),
-  mProgressDialog(0),
-  mWaitDialog(0)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::~EngineWrapper()
-{
-    if (mEngine != NULL) {
-        delete mEngine;
-        mEngine = NULL;
-    }
-    if (mProgressDialog != NULL) {
-        delete mProgressDialog;
-        mProgressDialog = NULL;
-    }
-    if (mWaitDialog != NULL) {
-        delete mWaitDialog;
-        mWaitDialog = NULL;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::init()
-{
-    
-    // construct engine
-    TRAPD(error, mEngine = CLauncherEngine::NewL(this));
-    if (error != KErrNone) {
-        return false;
-    }
-    
-    return true;
-   
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::listOfAllApps(QStringList &allAppsQStringList){
-    
-    // Get application CDesCArray list from engine
-    CDesCArray* allAppsCDescArray = 0;
-    TRAPD(error, allAppsCDescArray = mEngine->ListOfAllAppsL());
-    if(error != KErrNone) {
-        return false;
-    }
-        
-    //convert CDesCArray to QStringList
-    for (int i = 0; i < allAppsCDescArray->Count(); i++) {
-        allAppsQStringList.append(QString::fromUtf16(
-                allAppsCDescArray->MdcaPoint(i).Ptr(),
-                allAppsCDescArray->MdcaPoint(i).Length()));
-    }
-    return true;
-}
-
-// ---------------------------------------------------------------------------
-bool EngineWrapper::startAppLaunching(const QModelIndexList &qList, bool autoClose) 
-{
-    
-    // check if used has not selected any files
-    if (qList.size() == 0) {
-        Notifications::showErrorNote("Nothing selected");
-        return false;
-    }
-
-    bool retval(true);
-    CArrayFix<TInt>* pArrayFix = NULL;
-    try{
-        // Create CArrayFix for application numbers that are launched and Qlist into CArrayFix
-        QT_TRAP_THROWING( pArrayFix = QModelIndexListToCArrayFixL(qList) );
-        
-        // Start launching applications
-        QT_TRAP_THROWING(mEngine->StartAppLaunchingL(pArrayFix, autoClose ? ETrue : EFalse));
-    }
-    catch (const std::exception &e){
-        qDebug() << "EngineWrapper::startAppLaunching - exception: " << e.what();
-        retval = false;
-    }
-    
-    if(pArrayFix)
-        delete pArrayFix;
-    
-    return retval;
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::stopLaunching()
-{
-    TRAPD(error, mEngine->StopLaunchingL());
-    if (error != KErrNone) {
-        return false;
-    }
-    else {
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::sendLog()
-{
-    ShareUi dialog;
-    QList<QVariant> fileList;
-
-    if( mEngine->LogFileExists() )
-        {
-        const TDesC& logFilePath = mEngine->LogFilePath();
-        fileList.append( QString::fromUtf16( logFilePath.Ptr(), logFilePath.Length() ) );
-        }
-    if( mEngine->BCLogFileExists() )
-        {
-        const TDesC& BCLogFilePath = mEngine->BCLogFilePath();
-        fileList.append( QString::fromUtf16( BCLogFilePath.Ptr(), BCLogFilePath.Length() ) );
-        }
-    
-    if( !fileList.empty()){
-        dialog.init(fileList,true);   
-        return true;
-    }
-    else{
-        return false;
-    }
-    
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::deleteLog()
-{
-    // if log file exists delete it.
-    if (mEngine->LogFileExists()) {
-        if (mEngine->DeleteLogFile() != KErrNone) {
-            return false;
-        }
-    }
-    
-    //if BC log file exists, delete it.
-    if (mEngine->BCLogFileExists()) {
-        if (mEngine->DeleteBCLogFile() != KErrNone) {
-            return false;
-        }
-    }
-    
-    return true;
-
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::sendListOfDlls()
-{
-    const TDesC& systemDllsFilePath = mEngine->SystemDllsFilePath();
-    
-    if ( BaflUtils::FileExists( CEikonEnv::Static()->FsSession(), systemDllsFilePath) ){
-        ShareUi dialog;
-        QList<QVariant> fileList;
-        fileList.append( QString::fromUtf16( systemDllsFilePath.Ptr(), systemDllsFilePath.Length() ) );
-        dialog.init(fileList,true); 
-        return true;
-    }
-    else{
-        Notifications::showErrorNote("DLL list does not exist");
-        return false;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::doCompareDlls(HbAction* action)
-    {
-    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
-    if( action && !action->text().compare("ok", Qt::CaseInsensitive) )
-        {
-        TFileName fileName( dlg->value().toString().utf16() );
-        TRAPD(error,  mEngine->AnalyseDLLsL( fileName ) );
-        if( error != KErrNone )
-            { 
-            HideWaitDialog();
-            HideProgressBar();
-            Notifications::showErrorNote( QString("Error in analyse: %1").arg( error ) );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::compareDlls()
-{
-    const TDesC& requiredDllsFileName = mEngine->RequiredDllsFilePath();
-    QString fileName = QString::fromUtf16( requiredDllsFileName.Ptr(), requiredDllsFileName.Length() );
-    HbInputDialog::getText( "Select input file for BC analysis:", this, SLOT(doCompareDlls(HbAction*)), fileName );
-}
-
-// ---------------------------------------------------------------------------
-void EngineWrapper::ShowProgressBar(const TDesC& descText, TInt minimum, TInt maximum)
-{
-    QString qStringText = XQConversions::s60DescToQString(descText);
-   
-    if(mProgressDialog){
-        delete mProgressDialog;
-        mProgressDialog = NULL;
-    }
-    mProgressDialog = new HbProgressDialog( HbProgressDialog::ProgressDialog );
-    
-    if( maximum > 0 )
-        mProgressDialog->setRange(minimum, maximum);
-    //iProgressDialog->setAutoClose(true);
-    mProgressDialog->setText(qStringText);
-    connect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(CancelDllBCanalysis()));
-    mProgressDialog->show();
-}
-
-// ---------------------------------------------------------------------------
-void EngineWrapper::SetProgressBarValue(TInt value)
-{
-    if (mProgressDialog && value > 0 ){
-        mProgressDialog->setProgressValue(value);
-    }
-}
-
-// ---------------------------------------------------------------------------
-void EngineWrapper::HideProgressBar()
-{
-    if (mProgressDialog != NULL) {
-        disconnect(mProgressDialog, SIGNAL(cancelled), this, SLOT(CancelDllBCanalysis()));
-        delete mProgressDialog;
-        mProgressDialog = NULL;
-    }
-}
-
-// ---------------------------------------------------------------------------
-void EngineWrapper::CancelDllBCanalysis()
-{
-    mEngine->CancelBCAnalysis();
-}
-
-// ---------------------------------------------------------------------------
-void EngineWrapper::ShowWaitDialog(const TDesC& descText)
-{
-    QString qStringText = XQConversions::s60DescToQString(descText);
-   
-    if(mWaitDialog){
-        delete mWaitDialog;
-        mWaitDialog = NULL;
-    }
-    mWaitDialog = Notifications::showWaitDialog(qStringText);
-}
-
-// ---------------------------------------------------------------------------
-void EngineWrapper::HideWaitDialog()
-{
-    if (mWaitDialog != NULL) {
-        delete mWaitDialog;
-        mWaitDialog = NULL;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::setSkipHiddenAndEmbedOnly(bool skip)
-{
-    if(skip) {
-        mEngine->SetSkipHiddenAndEmbedOnly(ETrue);
-    }
-    else {
-        mEngine->SetSkipHiddenAndEmbedOnly(EFalse);
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ChangeFocusToOutputView()
-{
-    mMainWindow->openOutputView();
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::PrintText(const TDesC& descText)
-{
-    
-    // Convert the descriptor to QString
-    QString qStringText = XQConversions::s60DescToQString(descText);
-    mMainWindow->printText(qStringText);
-}
-
-// ---------------------------------------------------------------------------
-
-CArrayFix<TInt>* EngineWrapper::QModelIndexListToCArrayFixL(const QModelIndexList& qlist)
-{
-    CArrayFix<TInt>* pArrayFix = new (ELeave) CArrayFixFlat<TInt>( qlist.size() );
-    CleanupStack::PushL(pArrayFix);
-    for (int j = 0; j < qlist.size(); j++) {
-        pArrayFix->AppendL(qlist.at(j).row());
-    }
-    CleanupStack::Pop(pArrayFix);
-    return pArrayFix;
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowErrorMessage(const TDesC& descText)
-{
-    QString qStringText = XQConversions::s60DescToQString(descText);
-    Notifications::showErrorNote(qStringText);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowInfoMessage(const TDesC& descText)
-{
-    QString qStringText = XQConversions::s60DescToQString(descText);
-    Notifications::showInformationNote(qStringText);
-}
-
-// End of File
--- a/launcher/src/launchermainwindow.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +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 <hbapplication.h>
-#include <hbmainwindow.h>
-#include <hbdocumentloader.h>
-
-#include "enginewrapper.h"
-#include "commonActions.h"
-#include "applicationview.h"
-#include "outputview.h"
-#include "launchermainwindow.h"
-
-// Here we create custom document loader to be able to use custom views in XML.
-class LauncherDocumentLoader : public HbDocumentLoader
-{
-public:
-    virtual QObject *createObject(const QString& type, const QString &name);
-};
-
-QObject *LauncherDocumentLoader::createObject(const QString& type, const QString &name)
-{
-    // Application view
-    if (type == ApplicationView::staticMetaObject.className()) {
-        QObject *object = new ApplicationView;
-        object->setObjectName(name);
-        return object;
-    }
-    
-    // Output view
-    else if (type == OutputView::staticMetaObject.className()) {
-        QObject *object = new OutputView;
-        object->setObjectName(name);
-        return object;
-    }
-    
-    return HbDocumentLoader::createObject(type, name);
-}
-
-
-LauncherMainWindow::LauncherMainWindow( QWidget *parent ) : HbMainWindow( parent )
-    ,mEngineWrapper(0)
-    ,mApplicationView(0)
-    ,mOutputView(0)
-    ,mCommonActions(0)
-    {
-    }
-
-LauncherMainWindow::~LauncherMainWindow ()
-    {
-    if(mCommonActions)
-        delete mCommonActions;
-    if(mEngineWrapper)
-        delete mEngineWrapper;
-    }
-
-int LauncherMainWindow::init( HbApplication &app )
-    {
-    
-    // Create Engine Wrapper and initialize it
-    mEngineWrapper = new EngineWrapper(this);
-    if (!mEngineWrapper->init()) {
-        return EXIT_FAILURE;
-    }
-    
-    // Create common actions class for actions that are used in all views of Launcher        
-    mCommonActions = new CommonActions(mEngineWrapper, &app);
-
-    // Create document loader
-    LauncherDocumentLoader loader;
-    
-    // Create application view
-    mApplicationView = ApplicationView::create(loader, mCommonActions, mEngineWrapper);
-    // Add view to main window
-    addView(mApplicationView);
-
-    loader.reset();
-    
-    // Create output view
-    mOutputView = OutputView::create(loader, mCommonActions);
-    // Add view to main window
-    addView(mOutputView);
-    
-    // Show ApplicationView at startup
-    setCurrentView(mApplicationView);
-    
-    // Show HbMainWindow
-    show();
-
-    return 0;// no errors
-    }
-
-void LauncherMainWindow::openApplicationView()
-    {
-    setCurrentView(mApplicationView);
-    }
-
-void LauncherMainWindow::openOutputView()
-    {
-    setCurrentView(mOutputView);
-    }
-
-void LauncherMainWindow::printText(const QString &text)
-    {
-    mOutputView->printText(text);
-    }
--- a/launcher/src/main.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <hbapplication.h>
-#include <launchermainwindow.h>
-
-
-int main(int argc, char *argv[])
-{
-
-    // Create application, main window.
-    HbApplication app(argc, argv);
-    // Create main window
-    LauncherMainWindow mainWindow;
-    // init main window
-    int error = mainWindow.init(app);
-    if(error)
-        return error;
-    // enter event loop
-    return app.exec();
-}
-
--- a/launcher/src/notifications.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +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 <hblabel.h>
-#include <hbdeviceprogressdialog.h>
-#include <hbmessagebox.h>
-
-
-#include "notifications.h"
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout )
-{
-    HbMessageBox *messageBox = new HbMessageBox(type);
-    messageBox->setText(text);
-    if(label.length())
-        {
-        HbLabel *header = new HbLabel(label, messageBox);
-        messageBox->setHeadingWidget(header);
-        }
-    messageBox->setAttribute(Qt::WA_DeleteOnClose);
-    messageBox->setTimeout(timeout);
-    messageBox->open();
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::about()
-{
-    Notifications::showMessageBox( 
-        HbMessageBox::MessageTypeInformation, 
-        "Version 4.0.1 - 21st May 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.", 
-        "About Launcher"
-        );
-}
-
-// ---------------------------------------------------------------------------
-
-HbDeviceProgressDialog* Notifications::showWaitDialog(const QString &text)
-{
-    HbDeviceProgressDialog *note = new HbDeviceProgressDialog( HbProgressDialog::WaitDialog );
-    note->setText( text );
-    note->setAction(0);
-    note->show();
-    return note;
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showInformationNote(const QString &text)
-{
-    Notifications::showMessageBox( 
-        HbMessageBox::MessageTypeInformation,
-        text, 
-        "", // no label
-        3000
-        );
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showErrorNote(const QString &text)
-{
-    Notifications::showMessageBox( 
-        HbMessageBox::MessageTypeWarning,
-        text, 
-        "", // no label
-        3000
-        );
-}
-
-// ---------------------------------------------------------------------------
--- a/launcher/src/outputview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +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 <hbdocumentloader.h>
-#include <launchermainwindow.h>
-#include <hbaction.h>
-#include <hbmenu.h>
-#include <hbtextedit.h>
-
-#include "enginewrapper.h"
-#include "commonActions.h"
-#include "outputview.h"
-
-// xml definition of view
-const char *OUTPUTVIEW_XML = ":/xml/outputview.xml";
-
-// name of the output view object in the xml file.
-const char *OUTPUTVIEW = "outputview";
-const char *ACTIONCLEAR = "actionClearWindow";
-const char *TEXTOUTPUT = "textEdit";
-const char *ACTIONOPENAPPLICATIONVIEW = "actionOpenApplicationView";
-
-// ---------------------------------------------------------------------------
-
-
-OutputView::OutputView():
-    mActionClear(0),
-    mActionOpenApplicationView(0),
-    mTextOutput(0)
-{
-
-}
-
-// ---------------------------------------------------------------------------
-
-OutputView::~OutputView()
-{
-    if(mActionClear)
-        mActionClear->deleteLater();
-    if(mActionOpenApplicationView)
-        mActionOpenApplicationView->deleteLater();
-}
-
-
-// ---------------------------------------------------------------------------
-
-OutputView* OutputView::create(HbDocumentLoader &loader, 
-                        CommonActions *commonActions)
-{
-    // Load application view from xml-file
-    bool ok = false;
-    loader.load(OUTPUTVIEW_XML, &ok);
-    
-    // Output View:
-    QGraphicsWidget *widget = loader.findWidget(OUTPUTVIEW);
-    Q_ASSERT_X(ok && (widget != 0), "Launcher", "Invalid launcher.xml file");
-    OutputView *outputView = qobject_cast<OutputView *>(widget);
-    
-    // initialize view
-    outputView->init(loader, commonActions);
-    
-    return outputView;
-}
-
-// ---------------------------------------------------------------------------
-
-
-void OutputView::loadItemsFromXml(HbDocumentLoader &loader)
-{
-
-    // List widget:
-    QGraphicsWidget *widget = loader.findWidget(TEXTOUTPUT);
-    Q_ASSERT_X((widget != 0), "Launcher", "Invalid launcher.xml file");
-    mTextOutput = qobject_cast<HbTextEdit *>(widget);
-
-    // clear action:
-    QObject *object= loader.findObject(ACTIONCLEAR);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionClear = qobject_cast<HbAction *>(object);
-    
-    // open output view
-    object= loader.findObject(ACTIONOPENAPPLICATIONVIEW);
-    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
-    mActionOpenApplicationView = qobject_cast<HbAction *>(object);
-
-}
-
-// ---------------------------------------------------------------------------
-
-
-void OutputView::init(HbDocumentLoader &loader, CommonActions *commonActions)
-{
-    loadItemsFromXml(loader);
-    connectSignalsAndSlots();
-
-    // set text edit components settings
-    mTextOutput->setPlainText("Ready.\n\n");
-    mTextOutput->setReadOnly(true);
-    mTextOutput->setCursorVisibility( Hb::TextCursorHidden );
-    mTextOutput->setAttribute(Qt::WA_InputMethodEnabled, false);
-    
-    // add actions to menu
-    commonActions->addActionsToMenu(menu());
-
-}
-
-// ---------------------------------------------------------------------------
-
-void OutputView::connectSignalsAndSlots()
-{
-    // Clear action
-    connect(mActionClear, SIGNAL(triggered()), this, SLOT(clearOutput()));
-    connect(mActionOpenApplicationView, SIGNAL(triggered()), this, SLOT(openApplicationView()));
-}
-
-// ---------------------------------------------------------------------------
-
-void OutputView::clearOutput()
-{
-    mTextOutput->setPlainText("");
-}
-
-// ---------------------------------------------------------------------------
-
-void OutputView::printText(const QString &text)
-{
-    QString newText = mTextOutput->toPlainText() + text;
-    mTextOutput->setPlainText(newText);
-    mTextOutput->setCursorPosition(newText.length()-1);
-}
-
-// ---------------------------------------------------------------------------
-
-void OutputView::openApplicationView()
-{
-    qDebug("openApplicationView");
-    LauncherMainWindow *pMainWindow = static_cast< LauncherMainWindow * >( mainWindow() );
-    if( pMainWindow )
-        {
-        pMainWindow->openApplicationView();
-        }
-}
-
-// ---------------------------------------------------------------------------
-
--- a/launcher/src/outputview.xml	Mon Oct 04 10:09:02 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.2">
-    <object name="actionClearWindow" type="HbAction">
-        <string name="iconText" value="Clear window"/>
-    </object>
-    <object name="actionOpenApplicationView" type="HbAction">
-        <string name="iconText" value="Open application view"/>
-        <string name="text" value="Open application view"/>
-        <string name="toolTip" value="Open application view"/>
-    </object>
-    <widget name="outputview" type="OutputView">
-        <widget name="OutputContent" role="HbView:widget" type="HbWidget">
-            <widget name="textEdit" type="HbTextEdit">
-                <string name="plainText" value="Text"/>
-                <sizehint height="5.970149423688901un" type="PREFERRED" width="22.388060338833377un"/>
-            </widget>
-            <layout type="anchor" widget="OutputContent">
-                <anchoritem dst="textEdit" dstEdge="LEFT" spacing="0.0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="textEdit" dstEdge="TOP" spacing="0.0un" src="" srcEdge="TOP"/>
-                <anchoritem dst="textEdit" dstEdge="RIGHT" spacing="0.0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="textEdit" dstEdge="BOTTOM" spacing="0.0un" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <widget name="viewMenu" role="HbView:menu" type="HbMenu">
-            <ref object="actionClearWindow" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="viewToobar" role="HbView:toolBar" type="HbToolBar">
-            <ref object="actionOpenApplicationView" role="HbToolBar:addAction"/>
-        </widget>
-        <string name="title" value="Output"/>
-    </widget>
-    <metadata display="QHD portrait" unit="un"/>
-</hbdocument>
--- a/loadgen/engine/inc/loadgen.hrh	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +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 LOADGEN_HRH
-#define LOADGEN_HRH
-
-enum TLoadGenCommandIds
-    {
-    ELoadGenCmdNewLoad,    
-    ELoadGenCmdNewLoadCPULoad,    
-    ELoadGenCmdNewLoadEatMemory,    
-    ELoadGenCmdNewLoadPhoneCall,    
-    ELoadGenCmdNewLoadNetConn,    
-    ELoadGenCmdNewLoadKeyPress,    
-    ELoadGenCmdNewLoadMessages,
-    ELoadGenCmdNewLoadApplications,
-    ELoadGenCmdNewLoadPhotoCaptures,
-    ELoadGenCmdNewLoadBluetooth,
-    ELoadGenCmdNewLoadPointerEvent,
-    ELoadGenStopAll,
-    ELoadGenSuspendAll,
-    ELoadGenResumeAll,
-
-    ELoadGenCmdLaunchPerfMon,
-    ELoadGenCmdAbout,
-
-    ELoadGenCmdSettingsChange,
-    ELoadGenCmdSettingsExit,
-    ELoadGenCmdSettingsBack,
-
-    ELoadGenSettingItemList
-    };
-
-enum TEditorFormItemIds
-    {
-    ELoadGenCPULoadQueryPriority = 1000,
-    ELoadGenCPULoadQueryMode,
-    ELoadGenCPULoadQueryType,
-    ELoadGenCPULoadQueryLength,
-    ELoadGenCPULoadQueryIdle,
-    ELoadGenCPULoadQueryVariance,
-    ELoadGenCPULoadQueryCpu,
-
-    ELoadGenMemoryEatQueryPriority,
-    ELoadGenMemoryEatQuerySource,
-    ELoadGenMemoryEatQueryType,
-    ELoadGenMemoryEatQueryBuffer,
-    ELoadGenMemoryEatQueryIdle,
-    ELoadGenMemoryEatQueryAmount,
-    ELoadGenMemoryEatQueryRandomMin,
-    ELoadGenMemoryEatQueryRandomMax,
-    ELoadGenMemoryEatQueryVariance,
-    
-    ELoadGenPhoneCallQueryPriority,
-    ELoadGenPhoneCallQueryDestination,
-    ELoadGenPhoneCallQueryLength,
-    ELoadGenPhoneCallQueryIdle,
-    ELoadGenPhoneCallQueryVariance,
-    
-    ELoadGenNetConnQueryPriority,
-    ELoadGenNetConnQueryDestination,
-    ELoadGenNetConnQueryIdle,
-    ELoadGenNetConnQueryVariance,
-   
-    ELoadGenKeyPressQueryPriority,
-    ELoadGenKeyPressQueryHeartBeat,
-    ELoadGenKeyPressQueryVariance,
-        
-    ELoadGenMessagesQueryPriority,        
-    ELoadGenMessagesQueryType,            // Message type
-    ELoadGenMessagesQueryDestination,     // Phone number
-    ELoadGenMessagesQueryAmount,          // Messages
-    ELoadGenMessagesQueryLength,          // Message length
-    ELoadGenMessagesQueryMessage,         // Message
-    ELoadGenMessagesQueryIdle,            // idle period 
-    ELoadGenMessagesQueryVariance,
-
-    ELoadGenApplicationsQueryPriority,
-    ELoadGenApplicationsLaunchingInterval,
-    ELoadGenApplicationsKeyPressQueryHeartBeat,
-    ELoadGenApplicationsMaxOpen,
-    ELoadGenApplicationsKeyPressType,
-    ELoadGenApplicationsQueryVariance,
-    
-    ELoadGenPhotoCaptureQueryPriority,
-    ELoadGenPhotoCaptureQueryDevice,    
-    ELoadGenPhotoCaptureQueryIdle,
-    ELoadGenPhotoCaptureQueryVariance,
-           
-    ELoadGenBluetoothQueryPriority,
-    ELoadGenBluetoothQueryIdle,
-    ELoadGenBluetoothQueryVariance,
-    
-    ELoadGenPointerEventQueryPriority,
-    ELoadGenPointerEventQueryHeartBeat,
-    ELoadGenPointerEventQueryVariance
-    };
-
-enum TItemActionMenuTypes
-    {
-    EItemActionMenuTypeStop = 0,
-    EItemActionMenuTypeSuspendResume,    
-    EItemActionMenuTypeEdit    
-    };
-
-enum TThreadPriorityTypes
-    {
-    EThreadPriorityTypeMuchLess = 0,    
-    EThreadPriorityTypeLess,    
-    EThreadPriorityTypeNormal,    
-    EThreadPriorityTypeMore,    
-    EThreadPriorityTypeMuchMore,    
-    EThreadPriorityTypeRealTime,    
-    EThreadPriorityTypeAbsoluteVeryLow,    
-    EThreadPriorityTypeAbsoluteLow,    
-    EThreadPriorityTypeAbsoluteBackground,    
-    EThreadPriorityTypeAbsoluteForeground,    
-    EThreadPriorityTypeAbsoluteHigh
-    };
-
-enum TCpuLoadMode
-    {
-    ECpuLoadModeYielding = 0,
-    ECpuLoadModeBlocking    
-    };
-                    
-enum TCpuLoadTypes
-    {
-    ECpuLoadTypeContinuous = 0,
-    ECpuLoadTypePeriodic    
-    };
-
-enum TMemoryEatTypes
-    {
-    EMemoryEatTypeMemoryToEat = 0,
-    EMemoryEatTypeMemoryToBeLeft,
-    EMemoryEatTypeWavy
-    };        
-
-enum TMemoryEatSourceTypes
-    {
-    EMemoryEatSourceTypeRAM = 0,
-    EMemoryEatSourceTypeDriveC,
-    EMemoryEatSourceTypeDriveD,
-    EMemoryEatSourceTypeDriveE,
-    EMemoryEatSourceTypeDriveF,
-    EMemoryEatSourceTypeDriveG,
-    EMemoryEatSourceTypeDriveH,
-    EMemoryEatSourceTypeDriveI,
-    EMemoryEatSourceTypeDriveJ,
-    EMemoryEatSourceTypeDriveK,
-    EMemoryEatSourceTypeDriveL,
-    EMemoryEatSourceTypeDriveM,
-    EMemoryEatSourceTypeDriveN
-    };
-
-enum TMessageTypes
-    {
-    EMessageTypeSMS = 0,
-    EMessageTypeMMS
-    };      
-
-enum TApplicationsKeyPressTypes
-    {
-    EApplicationsKeyPressTypeNone = 0,
-    EApplicationsKeyPressTypeArrows
-    };      
-
-enum TApplicationsEventTypes
-    {
-    EApplicationsCloseApplication = 0,
-    EApplicationsLaunchApplication
-    };      
-
-#endif      // LOADGEN_HRH
--- a/loadgen/engine/inc/loadgen_applications.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +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 LOADGEN_APPLICATIONS_H
-#define LOADGEN_APPLICATIONS_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <w32std.h>
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-class CLauncherEngine;
-
-// CLASS DECLARATIONS
-
-class CAppLauncher : public CLoadBase
-    {
-public:
-    static CAppLauncher* NewL( TApplicationsAttributes& aAttributes,
-                                TInt aReferenceNumber );
-    virtual ~CAppLauncher();
-        
-private: // Constructors
-    CAppLauncher( TApplicationsAttributes& aAttributes, 
-                    TInt aReferenceNumber );
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TApplicationsAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TApplicationsAttributes& aAttributes) { iAttributes = aAttributes; }
-	
-
-public:  // New static methods
-    static TInt ThreadFunction( TAny* aThreadArg );
-
-private:  // New static methods
-    static void GenerateLoad( TApplicationsAttributes& aAttributes );
-
-private: // Data
-    TApplicationsAttributes         iAttributes;    
-    RThread                         iThread;
-    };
-
-// Class to start launching applications in given period 
-
-// CLASS DECLARATIONS
-class CAppLauncherManager : public CActive
-    {
-public:
-    static CAppLauncherManager* NewL( TApplicationsAttributes& aAttributes );
-    ~CAppLauncherManager();
-
-private:
-    CAppLauncherManager( TApplicationsAttributes& aAttributes );
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    static TInt PeriodicTimerCallBack( TAny* aAny );
-    void SimulateEventL();
-
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-
-private:
-    TApplicationsAttributes&    iAttributes;    
-    CPeriodic*                  iPeriodicTimer;
-    RWsSession                  iWsSession;
-    CLauncherEngine*            iLauncherEngine;
-    TInt                        iAppEventType;
-    }; 
-
-// A class where applicationg launching and ending is implemented 
-#include <aknappui.h>
-#include <apgcli.h>
-
-// FORWARD DECLARATIONS
-class CAppKeyPressManager;
-
-// CLASS DECLARATIONS
-class CLauncherEngine : public CBase
-    {
-public:
-    static CLauncherEngine* NewL( TApplicationsAttributes& aAttributes );
-    ~CLauncherEngine();
-
-public:
-    void StartAppLaunchingL();
-    void StopApplication( TBool aRandomApplication );
-    
-    
-private:
-    CLauncherEngine( TApplicationsAttributes& aAttributes );
-    void ConstructL();
-    TBool LaunchApplicationL();
-    void DoLaunchApplicationL();
-
-public:    
-    inline TInt AppLaunchCounter() { return iAppLaunchCounter; }
-    
-private:
-    RTimer          iTimer;
-    RApaLsSession   iLs;
-    RWsSession      iWs;
-    TInt            iAppLaunchCounter;
-    TUid            iCurrentAppUid;
-    TThreadId       iCurrentAppThreadId;
-    TBuf<128>       iCurrentAppNameAndExt;
-    RThread         iCurrentAppThread;
-    TInt            iParallelApplicationsCounter;
-    TApplicationsAttributes&    iAttributes;
-
-    CAppKeyPressManager* iAppKeyPressManager;
-    };
-
-
-// A class where key presses can be added to application
-#include <e32cmn.h>
-// FORWARD DECLARATIONS
-class CApplicationKeyPresses;
-// CLASS DECLARATIONS
-class CAppKeyPressManager : public CBase
-    {
-public:
-    static CAppKeyPressManager* NewL( TApplicationsAttributes& aAttributes );
-    ~CAppKeyPressManager();
-    void AddNewApplicationUidToKeyEventsL( TUid aUid );
-    TUid KillApplication( TBool aRandomApplication );
-    
-private:
-    CAppKeyPressManager( TApplicationsAttributes& aAttributes );
-    void ConstructL();
-
-private:
-    RPointerArray<CApplicationKeyPresses> iKeyPresses;
-    TApplicationsAttributes& iAttributes;    
-    }; 
-
-// A class which sends key press events to application
-// CLASS DECLARATIONS
-class CApplicationKeyPresses : public CBase
-    {
-public:
-    static CApplicationKeyPresses* NewL( TUid aUid, 
-                                            TApplicationsAttributes& aAttributes );
-    ~CApplicationKeyPresses();
-    
-private:
-    CApplicationKeyPresses( TUid aUid, TApplicationsAttributes& aAttributes );
-    void ConstructL();
-
-private:
-    static TInt PeriodicTimerCallBack( TAny* aAny );
-    void SimulateKeyEvent();
-
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-
-private:
-    TUid                        iUid;
-    TApplicationsAttributes&    iAttributes;
-    CPeriodic*                  iPeriodicTimer;
-    RWsSession                  iWsSession;
-public:
-    inline TUid ApplicationUid() { return iUid; };    
-    }; 
-
-#endif // LOADGEN_APPLICATIONS
--- a/loadgen/engine/inc/loadgen_bluetooth.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +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 LOADGEN_BLUETOOTH_H
-#define LOADGEN_BLUETOOTH_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <centralrepository.h>
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-#include <es_sock.h>
-#include <bt_sock.h>
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATIONS
-
-class CBluetooth : public CLoadBase
-    {
-public:
-    static CBluetooth* NewL(TBluetoothAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CBluetooth();
-        
-private: // Constructors
-    CBluetooth(TBluetoothAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TBluetoothAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TBluetoothAttributes& aAttributes) { iAttributes = aAttributes; }
-    
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-    
-private:  // New static methods
-    static void GenerateLoad(TBluetoothAttributes& aAttributes);    
-    void InitializeBluetoothL();
-    TBool SetBTPowerState(TBool aState);
-    
-private: // Data
-           
-    TBluetoothAttributes    iAttributes;    
-    RThread                 iThread; 
-    };
- 
-
-
- 
-class CBTManager : public CActive//, public MBTPowerManagerObserver
-    {
-    public:
-        
-        static CBTManager* NewL(TBluetoothAttributes& aAttrs);
-        virtual ~CBTManager();
- 
-    private:
-        
-        CBTManager( TBluetoothAttributes& aAttrs);
-        void ConstructL();
-        TInt StartBTDeviceDiscovery();
- 
-    private:
-            
-        static TInt PeriodicTimerCallBack(TAny* aAny);        
-    public:
-                                                        
-        /**
-         * From CActive:
-         */
-        void RunL();
-        void DoCancel();       
-
-    private:
-        
-        CPeriodic*              iPeriodicTimer;
-        TBluetoothAttributes&   iAttributes;  
-        CRepository*            iBTPowerStateCRepo;
-        RSocketServ             iSocketServerHnd;
-        RHostResolver           iHostResolver;        
-        TNameEntry              iBTNameEntry;        
-    };
-
-
-#endif
-
--- a/loadgen/engine/inc/loadgen_cpuload.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +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 LOADGEN_CPULOAD_H
-#define LOADGEN_CPULOAD_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-
-
-
-// CLASS DECLARATIONS
-
-class CCPULoad : public CLoadBase
-    {
-public:
-    static CCPULoad* NewL(TCPULoadAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CCPULoad();
-        
-private: // Constructors
-    CCPULoad(TCPULoadAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TCPULoadAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TCPULoadAttributes& aAttributes) { iAttributes = aAttributes; }
-
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-
-private:  // New static methods
-    static void GenerateLoad(TCPULoadAttributes& aAttributes);
-    static void DoHeaveStuff(TInt aMode);
-
-private: // Data
-    TCPULoadAttributes      iAttributes;    
-    RThread                 iThread;
-    };
- 
-
-#endif
--- a/loadgen/engine/inc/loadgen_httpreceiver.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-
-
-#ifndef CHTTPReceiver_H
-#define CHTTPReceiver_H
-
-#include <http.h>
-#include <mhttpdatasupplier.h>
-#include <mhttptransactioncallback.h>
-#include <Es_sock.h>
-#include <chttpformencoder.h> 
-
-// CONSTANTS
-// None.
-
-// MACROS
-#ifdef _DEBUG
-#define TRACE( text )         RDebug::Printf( text );
-#define TRACE2( text, arg )   RDebug::Printf( text, arg );
-#else
-#define TRACE( text )
-#define TRACE2( text, arg )
-#endif
-
-// DATA TYPES
-// None.
-
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-// None.
-
-class MHTTPRecvObserver
-    {
-    public:
-       
-        /**
-        * Callback for HTTP response received.
-        * @param aStatus Status code.
-        * @return None.
-        */
-        virtual void HTTPFileReceived( TInt aStatus ) = 0;        
-    };
-
-// CLASS DECLARATION
-
-class CHTTPReceiver
-        : public CBase,
-          public MHTTPTransactionCallback
-    {
-    public: // Constructors and destructor
-        
-        /**
-        * Two-phased constructor.
-        */
-        static CHTTPReceiver* NewL( MHTTPRecvObserver& aObserver );
-        
-        /**
-        * Two-phased constructor.
-        */
-        static CHTTPReceiver* NewLC( MHTTPRecvObserver& aObserver );        
-        
-        /**
-        * Destructor.
-        */        
-        virtual ~CHTTPReceiver();
-      
-        /**
-        * Cancels the current HTTP transaction.
-        */   
-        void CancelTransaction();
-
-        /**
-        * Opens a connection to destination aUri and sends data using HTTP GET. 
-        * Callbacks via MHTTPRecvObserver::HTTPFileReceived
-        * Leaves with KErrNotReady If network is not available
-        * @param aUri Destination URL, if http scheme not specified, prepends scheme.       
-        */                                 
-        void SendHTTPGetL( const TDesC8& aUri );
-        
-    protected: // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CHTTPReceiver( MHTTPRecvObserver& aObserver );
-
-        /**
-        * Symbian 2nd phase constructor.
-        */
-        void ConstructL();
-      
-        /**
-        * Sets HTTP header fields.
-        * @param aHeaders HTTP headers.
-        * @param aHdrField Header field to set.
-        * @param aHdrValue Header field value.
-        */   
-        void SetHeaderL(RHTTPHeaders aHeaders, TInt aHdrField,
-						const TDesC8& aHdrValue);
-
-		//From MHTTPTransactionCallback
-        /**
-        * Called by HTTP framework when HTTP events occur.
-        * @param aTransaction The transaction that the event has occurred on.
-        * @param aEvent The event that has occurred.
-        */           
-		void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
-		
-        /**
-        * Called when RunL leaves from a transaction event.
-        * @param aError The leave code that RunL left with.
-        * @param aTransaction The transaction that was being processed.
-        * @param aEvent The event that was being processed.
-        * @return KErrNone.
-        */   
-		TInt MHFRunError(	TInt aError,
-						RHTTPTransaction aTransaction,
-						const THTTPEvent& aEvent);
-						
-		/**
-        * Starts HTTP connection.
-        */   
-       	void SetupConnectionL();
-        
-        /**
-        * Utility:Checks for http uri scheme and prepends if not exists to the url
-        * @param aUri UriParser.
-        * @param aURL URL to check for.
-        * @return None 
-        */
-        void CheckForHTTPSchemeL(TUriParser8& aUri, const TDesC8& aURL);
-
-        /**
-        * Utility: finish receiving, call calback HTTPFileReceived()
-        * @param aError to be signaled
-        * @return None 
-        */
-        void Finalize();
-        
-    private:
-      	
-        // Request uri, might need to prepend http scheme.
-        HBufC8*					iUrl;
-        
-        // RSocketServ object.
-	    RSocketServ 			iSocketServ;
-        
-        // RConnection object.
-	    RConnection 			iConnection;
-	    
-	    // HTTP session.
-		RHTTPSession			iSession;
-		
-		// HTTP transaction used for request.
-		RHTTPTransaction		iTransaction;
-	
-		// Observer to notify.
-		MHTTPRecvObserver&	    iObserver;	
-
-		// ETrue if transaction in progress.
-		TBool					iRunning;	
-		
-		// ETrue if connection set up done.
-		TBool 					iConnectionSetupDone;                        
-		
-		// Response Status 
-		TInt                    iResponseStatus;
-		
-#ifdef _DEBUG
-		// Http response body written to file
-		RFile 					iResponseFile;
-		
-		// RFs to be used for writing to iResponseFile
-		RFs                     iFs;
-#endif
-		
-};
-    
-#endif
-
-// CHTTPReceiver_H
-// End of File	
--- a/loadgen/engine/inc/loadgen_keypress.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +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 LOADGEN_KEYPRESS_H
-#define LOADGEN_KEYPRESS_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <w32std.h>
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-
-
-
-// CLASS DECLARATIONS
-
-class CKeyPress : public CLoadBase
-    {
-public:
-    static CKeyPress* NewL(TKeyPressAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CKeyPress();
-        
-private: // Constructors
-    CKeyPress(TKeyPressAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TKeyPressAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TKeyPressAttributes& aAttributes) { iAttributes = aAttributes; }
-
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-
-private:  // New static methods
-    static void GenerateLoad(TKeyPressAttributes& aAttributes);
-
-private: // Data
-    TKeyPressAttributes         iAttributes;    
-    RThread                     iThread;
-    };
-
-
-class CKeyPressManager : public CActive
-    {
-public:
-    static CKeyPressManager* NewL(TKeyPressAttributes& aAttributes);
-    ~CKeyPressManager();
-
-private:
-    CKeyPressManager(TKeyPressAttributes& aAttributes);
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    static TInt PeriodicTimerCallBack(TAny* aAny);
-    void SimulateKeyEvent();
-
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-
-private:
-    TKeyPressAttributes&    iAttributes;    
-    CPeriodic*              iPeriodicTimer;
-    RWsSession              iWsSession;
-    }; 
-
-#endif
--- a/loadgen/engine/inc/loadgen_loadattributes.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#ifndef LOADGEN_LOADATTRIBUTES_H
-#define LOADGEN_LOADATTRIBUTES_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <badesca.h> // CDesCArray
-
-const TInt KCPUSelection_FreeScheduling = -1;
-const TInt KCPUSelection_AllCPUs        = 999;
-
-// FORWARD DECLARATIONS
-
-
-// CLASS DECLARATIONS
-class TCPULoadAttributes
-    {
-public:
-    TUint iId;        
-    TUint iPriority;        
-    TUint iMode;        
-    TUint iType;        
-    TUint iLength;        
-    TUint iIdle;        
-    TUint iRandomVariance;
-    // iCpu defines in which CPU the load thread should be executed in 
-    // (in SMP environments). 0 = CPU0, 1 = CPU1 etc. Negative value means 
-    // that CPU is undefined. When CPU is undefined, Scheduler can schedule
-    // the load thread freely to any CPU as it pleases.
-    TInt  iCpu;
-    // Defines how many CPUs the running system has.
-    TUint iCpuCount;
-    };
-
-class TMemoryEatAttributes
-    {
-public:
-    TUint iId;        
-    TUint iPriority;        
-    TUint iSource;        
-    TUint iType;
-    TUint iBuffer;
-    TUint iIdle;
-    TInt64 iAmount;
-    TInt64 iRandomMin;
-    TInt64 iRandomMax;
-    TBuf<64> iAmountDes;
-    TBuf<64> iRandomMinDes;
-    TBuf<64> iRandomMaxDes;
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    }; 
-
-class TPhoneCallAttributes
-    {
-public:
-    TUint iId;        
-    TUint iPriority;        
-    TBuf<128> iDestination;
-    TUint iLength;        
-    TUint iIdle;        
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    };
-
-class TNetConnAttributes
-    {
-public:
-    TUint iId;        
-    TUint iPriority;        
-    TBuf<128> iDestination;
-    TUint iIdle;        
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    };
-
-class TKeyPressAttributes
-    {
-public:
-    TUint iId;        
-    TUint iPriority;        
-    TUint iHeartBeat;        
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    };
-
-class TPointerEventAttributes
-    {
-public:
-    TUint iId;        
-    TUint iPriority;        
-    TUint iHeartBeat;        
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    };
-
-class TMessageAttributes
-    {
-public:
-    TUint iId;
-    TInt iMessageType;
-    TBuf<128> iDestination;
-    TUint iPriority; 
-    TUint iAmount;
-    TInt iLength;    
-    TUint iIdle;    
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    };
-
-class TApplicationsAttributes
-    {
-public:
-    TUint iId;        
-    TUint iPriority;
-    TUint iLaunchingInterval;
-    TUint iKeyPressType;
-    TUint iMaxOpen;
-    TUint iHeartBeat;
-    TUint iRandomVariance;
-    CDesCArray* iAppsArray;
-    TRequestStatus* iDeathStatus;
-    };
-
-
-class TPhotoCaptureAttributes
-    {
-public:
-    TUint iId;    
-    TInt iPriority;
-    TInt iCameraCount;
-    TInt iCamera;
-    TUint iIdle;    
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    };
-
-class TBluetoothAttributes
-    {
-public:
-    TUint iId;    
-    TInt iPriority;    
-    TUint iIdle;    
-    TUint iRandomVariance;        
-    TRequestStatus* iDeathStatus;
-    TBool iBluetoothSupported;
-    };
-
-#endif
--- a/loadgen/engine/inc/loadgen_loadbase.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +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 LOADGEN_LOADBASE_H
-#define LOADGEN_LOADBASE_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "loadgen_loadbase.h"
-
-
-// FORWARD DECLARATIONS
-
-
-
-// CLASS DECLARATIONS
-
-class CLoadBase : public CBase
-    {
-public:
-    enum TLoadState
-        {
-        ELoadStateInvalid = -1,
-        ELoadStateConstructed,
-        ELoadStateRunning,
-        ELoadStateSuspended,
-        ELoadStateClosed
-        };
-        
-protected: // Constructors
-    CLoadBase();
-    void ConstructL();
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TInt State() { return iState; }
-    inline TInt Type() { return iType; }
-
-protected: // Data
-    TInt iState;
-    TInt iType;
-    };
- 
-
-#endif
--- a/loadgen/engine/inc/loadgen_memoryeat.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +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 LOADGEN_MEMORYEAT_H
-#define LOADGEN_MEMORYEAT_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-#include <e32hal.h>
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-
-
-
-// CLASS DECLARATIONS
-
-class CMemoryEat : public CLoadBase
-    {
-public:
-    static CMemoryEat* NewL(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CMemoryEat();
-        
-private: // Constructors
-    CMemoryEat(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TMemoryEatAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TMemoryEatAttributes& aAttributes) { iAttributes = aAttributes; }
-
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-private:
-    static void GenerateLoad(TMemoryEatAttributes& aAttributes);
-
-private: // Data
-    TMemoryEatAttributes    iAttributes;    
-    RThread                 iThread;
-    };
-
-
-class CMemoryEatManager : public CActive
-    {
-public:
-    static CMemoryEatManager* NewL(TMemoryEatAttributes& aAttributes);
-    ~CMemoryEatManager();
-
-private:
-    CMemoryEatManager(TMemoryEatAttributes& aAttributes);
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    static TInt PeriodicTimerCallBack(TAny* aAny);
-    void InitMemoryEatL();
-    void DestroyMemoryEat();
-    void EatMemoryL();
-    void DoEatMemoryL( TInt64 aNewSize );
-    void HandleEatMemoryL( TInt64 aNewSize );
-    void AllocMemoryL( TInt64 aNewSize );
-    void FreeMemoryL( TInt64 aNewSize );
-    TInt64 ReadFreeMemory();
-    
-
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-
-private:
-    TMemoryEatAttributes&   iAttributes;    
-    CPeriodic*              iPeriodicTimer;
-    RChunk                  iEatChunk;
-    RFile                   iEatFile;
-    RFs                     iFs;
-    TBool                   iWavyEatMoreMemory;
-    TInt     iFilesCounter;
-    };
-     
-
-#endif
--- a/loadgen/engine/inc/loadgen_messages.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,422 +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 LOADGEN_MESSAGES_H
-#define LOADGEN_MESSAGES_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-class CSmsHandler;
-class CMmsHandler;
-
-const TInt EMaxMessageLength = 512;
-
-// CLASS DECLARATIONS
-
-class CMessages : public CLoadBase
-    {
-public:
-    static CMessages* NewL( TMessageAttributes& aAttributes, TInt aReferenceNumber );
-    virtual ~CMessages();
-        
-private: // Constructors
-    CMessages( TMessageAttributes& aAttributes, TInt aReferenceNumber );
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TMessageAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TMessageAttributes& aAttributes) { iAttributes = aAttributes; }
-
-public:  // New static methods
-    static TInt ThreadFunction( TAny* aThreadArg );
-
-private:  // New static methods
-    static void GenerateLoad( TMessageAttributes& aAttributes );
-
-private: // Data
-    TMessageAttributes            iAttributes;    
-    RThread                     iThread;
-
-    };
-
-
-class CMessageManager : public CActive
-    { 
-private:
-    enum TState
-        {
-        EStateIdle = 0,
-        EStateSend,
-        EStateSending        
-        };
-public:
-    static CMessageManager* NewL( TMessageAttributes& aAttributes );
-    virtual ~CMessageManager();
-
-
-private:
-    CMessageManager( TMessageAttributes& aAttributes );
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    static TInt PeriodicTimerCallBack( TAny* aAny );
-    void HandleMessageSending();
-    void DoDial();
-    void DoHangup();
-    void CreateMessage();    
-
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-    void HandleStatus( TInt aErr );
-
-private:
-    TMessageAttributes&                   iAttributes;
-    CPeriodic*                          iPeriodicTimer;
-    TInt                                iState;
-    CSmsHandler*                        iSmsHandler;
-    CMmsHandler*                        iMmsHandler;
-    TInt                                iMessageCounter;
-    HBufC*                                iMessage;
-    }; 
-
-//  INCLUDES
-#include <e32base.h>
-#include <msvapi.h>
-#include <mtuireg.h>
-#include <txtrich.h>
-// CONSTANTS
-const TInt KBfrLength = 20;
-const TInt KTelephoneNumberMaxLength = 100;
- 
-// FORWARD DECLARATIONS
-class CSmsAppUi;
-class CClientMtmRegistry;
-class CSmsClientMtm;
- 
-// CLASS DECLARATION
-/**
-* CSmsHandler application engine class.
-* Takes care of sending and receiveing SMS messages using the SMS client MTM.
-* Interacts with the application UI class.
-*/
-class CSmsHandler : public CActive, public MMsvSessionObserver
-    {
-    public: // Constructors and destructor
- 
-        /**
-        * NewL.
-        * Two-phased constructor.
-        * @param aSmsAppUi Pointer to AppUi instance.
-        * @return Pointer to the created instance of CSmsHandler.
-        */
-        static CSmsHandler* NewL( CMessageManager& aManager );
- 
-        /**
-        * NewLC.
-        * Two-phased constructor.
-        * @param aSmsAppUi Pointer to AppUi instance.
-        * @return Pointer to the created instance of CSmsHandler.
-        */
-        static CSmsHandler* NewLC( CMessageManager& aManager );
- 
-        /**
-        * ~CSmsHandler
-        * Destructor.
-        */
-        virtual ~CSmsHandler();
- 
-    public: // New functions
-        /**
-        * SendL.
-        * Starts the process of creating and sending an SMS message.
-        * @param aRecipientNumber The number of the recipent.
-        * @param aMessageText The message text.
-        * @return ETrue if successful, EFalse if not.
-        */
-       TBool SendL( const TDesC& aRecipientNumber,
-                    const TDesC& aMessageText );
- 
-    public: // Functions from base classes
- 
-        /**
-        * From MMsvSessionObserver, HandleSessionEventL.
-        * Handles notifications of events from the Message Server.
-        * @param aEvent The event that has taken place
-        * @param aArg1 Event type-specific argument value
-        * @param aArg2 Event type-specific argument value
-        * @param aArg3 Event type-specific argument value
-        */
-        void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1,
-                                  TAny* aArg2, TAny* aArg3 );
- 
-    protected: // Functions from base classes
- 
-        /**
-        * From CActive, DoCancel.
-        * Cancels any outstanding requests.
-        */
-        void DoCancel();
- 
-        /**
-        * From CActive, RunL.
-        * Handles an active object’s request completion event.
-        */
-        void RunL();
- 
-    private: // Constructors
- 
-        /**
-        * CSmsHandler.
-        * C++ default constructor.
-        * @param aSmsAppUi Pointer to AppUi instance.
-        */
-        CSmsHandler( CMessageManager& aManager );
- 
-        /**
-        * ConstructL.
-        * 2nd phase constructor.
-        */
-        void ConstructL();
- 
-    private: // New functions
- 
-        /**
-        * AccessMtmL.
-        * Access the MTM Registry and create an SMS specific Client MTM instance.
-        */
-        void AccessMtmL();
- 
-        /**
-        * CreateMsgL.
-        * Create an SMS message.
-        * @return ETrue if successful, EFalse is unsuccessful.
-        */
-        TBool CreateMsgL();
- 
-        /**
-        * ScheduleL.
-        * Schedule an SMS message for sending.
-        */
-        void ScheduleL();
- 
-        /**
-        * ValidateL.
-        * Validate an SMS message.
-        * @return ETrue if successful, EFalse is unsuccessful.
-        */
-        TBool ValidateL();
- 
-    private: // Enumeration
- 
-        /**
-        * TState, enumeration for the state of the handler, used by RunL().
-        */
-        enum TState
-            {
-            EWaitingForMoving = 1,
-            EWaitingForScheduling
-            };
- 
-    private: // Data
- 
-        /**
-        * iState, the state of the handler.
-        */
-        TState iState;
- 
-        /**
-        * iSession, the contact database.
-        * Owned by CSmsHandler object.
-        */
-        CMsvSession* iSession;
- 
-        /**
-        * iMtmRegistry, client MTM registry.
-        * Owned by CSmsHandler object.
-        */
-        CClientMtmRegistry* iMtmRegistry;
- 
-        /**
-        * iSmsMtm, SMS specific Client MTM.
-        * Owned by CSmsHandler object.
-        */
-        CSmsClientMtm* iSmsMtm;
- 
-        /**
-        * iOperation, the current message server operation.
-        * Owned by CSmsHandler object.
-        */
-        CMsvOperation* iOperation;
- 
-        /**
-        * iRecipientNumber, telephone number of the recipient.
-        */
-        TBuf<KTelephoneNumberMaxLength> iRecipientNumber;
- 
-        /**
-        * iMessageText, SMS message text.
-        */
-        TBuf<EMaxMessageLength> iMessageText;
-
- 
-        /**
-        * iSmsAppUi, application UI
-        * Not owned by CSmsHandler object.
-        */
-        CSmsAppUi* iSmsAppUi;
- 
-        /**
-        * iMtmUiRegistry, User Interface MTM Registry.
-        * Owned by CSmsHandler object.
-        */
-        CMtmUiRegistry* iMtmUiRegistry;
-        
-        CMessageManager& iManager;
- 
-    };
-
-
-// INCLUDES
-#include <msvapi.h>                         // for MMsvSessionObserver 
-#include <mmsclient.h>                      // for CMmsClientMtm
-#include <coecntrl.h>
-
-// Forward declarations
-class CClientMtmRegistry;
-class CMsvSession;
-
-//
-// Container class to draw text on screen
-//
-class CMmsHandler : public CBase, public MMsvSessionObserver
-    {
-public: // Constructors and destructor
-
-    /**
-    * NewL.
-    * Two-phased constructor.
-    * @param aSmsAppUi Pointer to AppUi instance.
-    * @return Pointer to the created instance of CSmsHandler.
-    */
-    static CMmsHandler* NewL( CMessageManager& aManager );
-
-    /**
-    * NewLC.
-    * Two-phased constructor.
-    * @param aSmsAppUi Pointer to AppUi instance.
-    * @return Pointer to the created instance of CSmsHandler.
-    */
-    static CMmsHandler* NewLC( CMessageManager& aManager );
-
-    /**
-    * ~CSmsHandler
-    * Destructor.
-    */
-    virtual ~CMmsHandler();
-
-private: // Constructors
-
-    /**
-    * CSmsHandler.
-    * C++ default constructor.
-    * @param aSmsAppUi Pointer to AppUi instance.
-    */
-    CMmsHandler( CMessageManager& aManager );
-
-    /**
-    * ConstructL.
-    * 2nd phase constructor.
-    */
-    void ConstructL();
-
-public: // New functions
-    
-    /*
-     * Creates client MTM registry when session is ready for use. 
-     * This completes model construction and is called after 'server
-     * ready' event is received after async opening of CMsvSession.
-     */ 
-    void CompleteConstructL();
-       
-    /*
-     * CMmsHandler::CreateNewMessageL()
-     * Creates a new message server entry and set up default values.
-     * In case the attachment file does not found method return EFalse
-     * otherwise ETrue.
-     * There are differenses how to add attachment file between 2nd and 3rd edition.
-     */  
-     TBool CreateMsgL();
-
-    /**
-     * Send the message.
-     * Return values: ETrue or EFalse
-     */
-    TBool SendMessageL();
-        
-     /**
-      * SendL.
-      * Starts the process of creating and sending an SMS message.
-      * @param aRecipientNumber The number of the recipent.
-      * @param aMessageText The message text.
-      * @return ETrue if successful, EFalse if not.
-      */
-     TBool SendL( const TDesC& aRecipientNumber,
-                 const TDesC& aMessageText );     
-           
-private:    
-    // from MMsvSessionObserver
-    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
-  
-    void SetMessageBodyL();
-
-private:
-
-    CMsvSession* iSession;          // Client session on the message server
-    CMmsClientMtm* iMmsMtm;         // Message Type Module (MMS)
-    CClientMtmRegistry* iMtmReg;    // Mtm client registry for creating new mtms
-
-    /**
-    * iRecipientNumber, telephone number of the recipient.
-    */
-    TBuf<KTelephoneNumberMaxLength> iRecipientNumber;
-
-    /**
-    * iMessageText, SMS message text.
-    */
-    TBuf<EMaxMessageLength> iMessageText;
-    
-    CMessageManager& iManager;
-    
-    };
-#endif // LOADGEN_MESSAGES_H
--- a/loadgen/engine/inc/loadgen_netconn.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +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 LOADGEN_NETCONN_H
-#define LOADGEN_NETCONN_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include "loadgen_httpreceiver.h"
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-class CNetConnManager;
-
-
-// CLASS DECLARATIONS
-
-class CNetConn : public CLoadBase
-    {
-public:
-    static CNetConn* NewL(TNetConnAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CNetConn();
-        
-private: // Constructors
-    CNetConn(TNetConnAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TNetConnAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TNetConnAttributes& aAttributes) { iAttributes = aAttributes; }
-
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-
-private:  // New static methods
-    static void GenerateLoad(TNetConnAttributes& aAttributes);
-
-private: // Data
-    TNetConnAttributes          iAttributes;    
-    RThread                     iThread;
-    };
-
-
-class CNetConnManager : public CActive, public MHTTPRecvObserver
-    {
-public:
-    static CNetConnManager* NewL(TNetConnAttributes& aAttributes);
-    ~CNetConnManager();
-
-private:
-    CNetConnManager(TNetConnAttributes& aAttributes);
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    static TInt PeriodicTimerCallBack(TAny* aAny);
-    void StartDownloadL();
-
-private: // MHTTPRecvObserver
-    void HTTPFileReceived( TInt aStatus );
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-
-private:
-    TNetConnAttributes&     iAttributes;    
-    CPeriodic*              iPeriodicTimer;
-    CHTTPReceiver*          iHTTPReceiver;
-    }; 
-
-#endif
--- a/loadgen/engine/inc/loadgen_phonecall.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +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 LOADGEN_PHONECALL_H
-#define LOADGEN_PHONECALL_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <etel3rdparty.h>
-
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-class CPhoneCallManager;
-class CDialer;
-
-
-// CLASS DECLARATIONS
-
-class CPhoneCall : public CLoadBase
-    {
-public:
-    static CPhoneCall* NewL(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CPhoneCall();
-        
-private: // Constructors
-    CPhoneCall(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TPhoneCallAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TPhoneCallAttributes& aAttributes) { iAttributes = aAttributes; }
-	
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-
-private:  // New static methods
-    static void GenerateLoad(TPhoneCallAttributes& aAttributes);
-
-private: // Data
-    TPhoneCallAttributes        iAttributes;    
-    RThread                     iThread;
-    };
-
-    
-
-class CPhoneCallManager : public CActive
-    { 
-private:
-    enum TState
-        {
-        EStateIdle = 0,
-        EStateCall
-        };
-public:
-    static CPhoneCallManager* NewL(TPhoneCallAttributes& aAttributes);
-    ~CPhoneCallManager();
-
-private:
-    CPhoneCallManager(TPhoneCallAttributes& aAttributes);
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    static TInt PeriodicTimerCallBack(TAny* aAny);
-    void HandleCalls();
-    void DoDial();
-    void DoHangup();
-
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-    void HandleStatus(TInt aErr);
-
-private:
-    TPhoneCallAttributes&               iAttributes;
-    CDialer*                            iDialer;   
-    CPeriodic*                          iPeriodicTimer;
-    TInt                                iState;
-    }; 
-
-
-class CDialer : public CActive
-    { 
-public:
-    static CDialer* NewL(CPhoneCallManager& aManager);
-    ~CDialer();
-
-private:
-    CDialer(CPhoneCallManager& aManager);
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-public:
-    void Dial(const TDesC& aDestination);
-    void Hangup();
-
-private:
-    CPhoneCallManager&                  iManager;
-    CTelephony*                         iTelephony;
-    CTelephony::TCallId                 iCallId;
-    CTelephony::TCallParamsV1           iCallParams;
-    CTelephony::TCallParamsV1Pckg       iCallParamsPckg;
-    };
-        
-#endif
--- a/loadgen/engine/inc/loadgen_photocapture.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +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 LOADGEN_PHOTOCAPTURE_H
-#define LOADGEN_PHOTOCAPTURE_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <ecam.h>  // CCamera, MCameraObserver
-
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-class CCameraManager;
-
-
-// CLASS DECLARATIONS
-
-class CPhotoCapture : public CLoadBase
-    {
-public:
-    static CPhotoCapture* NewL(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CPhotoCapture();
-        
-private: // Constructors
-    CPhotoCapture(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TPhotoCaptureAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TPhotoCaptureAttributes& aAttributes) { iAttributes = aAttributes; }
-
-
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-    //static void SetImagesReady(TInt aImages);
-    //static TInt ImagesReady();
-
-private:  // New static methods
-    static void GenerateLoad(TPhotoCaptureAttributes& aAttributes);
-    static void DoHeaveStuff(TInt aMode);
-
-private: // Data
-    TPhotoCaptureAttributes iAttributes;    
-    RThread                 iThread;
-    //static TInt             iImagesReady;
-    };
- 
-
-
- 
-class CCameraManager : public CActive, public MCameraObserver
-    {
-    public:
-        
-        static CCameraManager* NewL(TPhotoCaptureAttributes& aAttrs);        
-        virtual ~CCameraManager();
- 
-    private:
-        
-        CCameraManager(TPhotoCaptureAttributes& aAttrs);
-        void ConstructL();
- 
-    private:
-        /**
-         * From MCameraObserver:
-         */         
-        virtual void ReserveComplete(TInt aError);
-        virtual void PowerOnComplete(TInt aError);
-        virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
-        virtual void ImageReady(CFbsBitmap* aBitmap,
-                HBufC8* aData, TInt aError);
-        virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,
-                TInt aError);
-    
-        static TInt PeriodicTimerCallBack(TAny* aAny);
-    public:
-        
-        /**
-         * Reserves the camera.
-         */
-        void ReserveCameraL();
-        
-        /**
-         * Takes a picture.
-         */
-        void CapturePhotoL();
-        
-        TInt NumberOfPictures();
-                                        
-        /**
-         * From CActive:
-         */
-        void RunL();
-        void DoCancel();
- 
-    private:
-        
-        enum TState
-            {
-            ENotReady,
-            ECameraReserved,
-            EIdle,
-            ECapture
-            };
-
-        CPeriodic*                  iPeriodicTimer;
-        TPhotoCaptureAttributes&    iAttributes;
-        CCamera*                    iCamera;
-        TState                      iState;
-        TInt                        iNumOfPics;
-        TCameraInfo                 iCameraInfo;
-        TInt                        iCurrentCamera;
-    };
-
-
-#endif
--- a/loadgen/engine/inc/loadgen_pointerevent.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +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 LOADGEN_POINTEREVENT_H
-#define LOADGEN_POINTEREVENT_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <w32std.h>
-#include <e32svr.h>
-#include "loadgen_loadbase.h"
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-
-
-
-// CLASS DECLARATIONS
-
-class CPointerEvent : public CLoadBase
-    {
-public:
-    static CPointerEvent* NewL(TPointerEventAttributes& aAttributes, TInt aReferenceNumber);
-    virtual ~CPointerEvent();
-        
-private: // Constructors
-    CPointerEvent(TPointerEventAttributes& aAttributes, TInt aReferenceNumber);
-    void ConstructL();  
-
-public:  // New methods
-    virtual void Resume();
-    virtual void Suspend();
-    virtual void SetPriority();
-    virtual void Close();
-    virtual TPtrC Description();
-    inline TPointerEventAttributes& Attributes() { return iAttributes; }
-	inline void SetAttributes(const TPointerEventAttributes& aAttributes) { iAttributes = aAttributes; }
-
-public:  // New static methods
-    static TInt ThreadFunction(TAny* aThreadArg);
-
-private:  // New static methods
-    static void GenerateLoad(TPointerEventAttributes& aAttributes);
-
-private: // Data
-    TPointerEventAttributes         iAttributes;    
-    RThread                     iThread;
-    };
-
-
-class CPointerEventManager : public CActive
-    {
-public:
-    static CPointerEventManager* NewL(TPointerEventAttributes& aAttributes);
-    ~CPointerEventManager();
-
-private:
-    CPointerEventManager(TPointerEventAttributes& aAttributes);
-    void ConstructL();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    static TInt PeriodicTimerCallBack(TAny* aAny);
-    void SimulatePointerEvent();
-
-public:
-    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
-
-private:
-    TPointerEventAttributes&    iAttributes;    
-    CPeriodic*                  iPeriodicTimer;
-    //RWsSession                  iWsSession;
-    }; 
-
-#endif
--- a/loadgen/engine/inc/loadgen_std.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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 LOADGEN_STD_H
-#define LOADGEN_STD_H
-
-
-
-#endif
-
-// End of File
-
--- a/loadgen/engine/inc/loadgen_traces.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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 __LOADGEN_TRACES_H__
-#define __LOADGEN_TRACES_H__
-
-#include <e32def.h>
-
-
-// ---------------------------------------------------------------------------
-// You change these logging method values below! Recompile the application to take changes effect.
-
-    // logging methods
-    // 0 = No logging
-    // 1 = Flogger
-    // 2 = RDebug
-    // 3 = Flogger and RDebug
-    
-    #ifndef _DEBUG
-        
-        // Logging method for UREL builds:
-        #define LOADGEN_LOGGING_METHOD  3
-
-    #else
-
-        // Logging method for UDEB builds:
-        #define LOADGEN_LOGGING_METHOD  3
-
-    #endif    
-    
-
-
-// ---------------------------------------------------------------------------
-// Do not make any changes to lines below...
-
-    #if LOADGEN_LOGGING_METHOD == 1 || LOADGEN_LOGGING_METHOD == 3
-
-        #include <flogger.h>
-        _LIT(KLogFolder,"loadgen");
-        _LIT(KLogFile,"loadgen_trace.txt");
-
-    #endif
-
-    #if LOADGEN_LOGGING_METHOD == 2 || LOADGEN_LOGGING_METHOD == 3
-
-        #include <e32debug.h>
-
-    #endif
-
-
-    #if LOADGEN_LOGGING_METHOD == 0
-    
-        #define LOGTEXT(AAA)
-        #define LOGSTRING(AAA)
-        #define LOGSTRING2(AAA,BBB)
-        #define LOGSTRING3(AAA,BBB,CCC)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD)
-    
-    
-    #elif LOADGEN_LOGGING_METHOD == 1
-    
-        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-   
-    #elif LOADGEN_LOGGING_METHOD == 2
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
-    
-    #elif LOADGEN_LOGGING_METHOD == 3
-    
-        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
-        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
-        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
-        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
-        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
-
-    #endif
-
-// ---------------------------------------------------------------------------
-
-#endif // __LOADGEN_TRACES_H__
-
--- a/loadgen/engine/inc/loadgen_utils.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#ifndef LOADGEN_UTILS_H
-#define LOADGEN_UTILS_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-const TUint KHalFunction_EKernelHalNumLogicalCpus = 16; //EKernelHalNumLogicalCpus
-const TUint KHalFunction_EKernelHalLockThreadToCpu = 19; //EKernelHalLockThreadToCpu
-
-class CLoadGenUtils {
-
-public:
-		static TThreadPriority SettingItemToThreadPriority(TInt aIndex);
-		static void SettingItemToThreadDescription(TInt aIndex, TDes& aBuf);
-		static void SettingItemToSourceDescription(TInt aIndex, TDes& aBuf);
-		static TInt MilliSecondsToMicroSeconds(TInt aMilliSeconds, TInt aRandomVariance=0);
-		static TInt RandomNumber(TInt aMin, TInt aMax);
-		static TSize ScreenSize();
-
-private:
-          /* Desctructor pure Virtual -> static class cannot be instantiated or inherited */
-		virtual ~CLoadGenUtils()=0;	
-	    static TInt64 iRandomNumberSeed;
-
-};
-
-#endif		  
\ No newline at end of file
--- a/loadgen/engine/src/loadgen_applications.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,683 +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 FILES
-#include "loadgen_applications.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-
-#include <e32math.h>
-#include "loadgen_traces.h"
-
-_LIT(KThreadName, "Applications %d");
-
-const TInt KDefaultStartDelay = 500;
-const TInt KThreadNameLength = 64;
-const TInt KDescriptorBufSize = 256;
-const TInt KPriorityBufSize = 16;
-const TInt KScanCodeStart = 32;
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CAppLauncher* CAppLauncher::NewL( TApplicationsAttributes& aAttributes, TInt aReferenceNumber )
-    {
-    CAppLauncher* self = new(ELeave) CAppLauncher( aAttributes, aReferenceNumber );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CAppLauncher::~CAppLauncher()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CAppLauncher::CAppLauncher(  
-           TApplicationsAttributes& aAttributes, TInt aReferenceNumber ) : 
-           iAttributes( aAttributes )
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CAppLauncher::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadApplications;
-    
-    TBuf<KThreadNameLength> threadName;
-    threadName.Format( KThreadName, iAttributes.iId );
-    
-    // create a thread
-    User::LeaveIfError( iThread.Create( threadName, ThreadFunction, 
-                                        KDefaultStackSize*2, KMinHeapSize, 
-                                        KKilo * KMinHeapSize, (TAny*) &iAttributes ) );
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CAppLauncher::ThreadFunction( TAny* aThreadArg )
-    {
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install( pS );
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad( *( ( TApplicationsAttributes* ) aThreadArg ) );
-
-    delete pS;
-    delete pC;
-    
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CAppLauncher::GenerateLoad( TApplicationsAttributes& aAttributes )
-    {
-    CAppLauncherManager* appLauncherManager = NULL;
-    TRAPD( err, appLauncherManager = CAppLauncherManager::NewL( aAttributes ) );
-    if ( err == KErrNone ) 
-        {
-        CActiveScheduler::Start();
-        }
-    delete appLauncherManager;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CAppLauncher::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CAppLauncher::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CAppLauncher::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority( CLoadGenUtils::SettingItemToThreadPriority( iAttributes.iPriority ) );
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CAppLauncher::Close()
-    {
-    CLoadBase::Close();
-    
-    if ( iThread.ExitReason() == 0 ) // check if the thread is still alive
-        {
-        // signal the thread that it needs to close
-        iThread.RequestComplete( iAttributes.iDeathStatus, KErrCancel );
-
-        // wait the thread to die
-        TRequestStatus waiter;
-        iThread.Logon( waiter );
-        User::WaitForRequest( waiter );
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CAppLauncher::Description()
-    {
-    TBuf<KDescriptorBufSize> buf;
-    TBuf<KPriorityBufSize> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription( iAttributes.iPriority, prioBuf );
-    
-    _LIT(KAppLauncherEntry, "[%d] Appls prio=%S max apps=%d heartbeat=%dms random=%d%%");
-    buf.Format( KAppLauncherEntry, iAttributes.iId, &prioBuf, iAttributes.iMaxOpen, 
-                iAttributes.iHeartBeat, iAttributes.iRandomVariance );
-   
-    return TPtrC( buf );
-    }               
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CAppLauncherManager* CAppLauncherManager::NewL( TApplicationsAttributes& aAttributes )
-    {
-    CAppLauncherManager* self = new(ELeave) CAppLauncherManager(aAttributes);
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CAppLauncherManager::CAppLauncherManager( TApplicationsAttributes& aAttributes ) :
-            CActive( EPriorityStandard ), iAttributes( aAttributes )
-    {
-    iAppEventType = EApplicationsLaunchApplication;
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CAppLauncherManager::~CAppLauncherManager()
-    {
-    if ( iPeriodicTimer )
-        {
-        iPeriodicTimer->Cancel();
-        delete iPeriodicTimer;
-        }
-    delete iLauncherEngine;
-    Cancel();
-    
-    iWsSession.Close();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CAppLauncherManager::ConstructL()
-    {
-    CActiveScheduler::Add( this );
-    
-    // create instance to application launcher
-    iLauncherEngine = CLauncherEngine::NewL( iAttributes );
-    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-    
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    
-    // init
-    User::LeaveIfError( iWsSession.Connect() );
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-    iPeriodicTimer->Start( KDefaultStartDelay, 
-                           CLoadGenUtils::MilliSecondsToMicroSeconds( 
-                               iAttributes.iLaunchingInterval, iAttributes.iRandomVariance ),
-                           TCallBack( PeriodicTimerCallBack, this ) );
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CAppLauncherManager::RunL()
-    {
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CAppLauncherManager::DoCancel()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CAppLauncherManager::PeriodicTimerCallBack( TAny* aAny )
-    {
-    CAppLauncherManager* self = static_cast<CAppLauncherManager*>( aAny );
-
-    TRAPD( err, self->SimulateEventL() );
-    if ( KErrNone != err )
-        {
-        return err;
-        }
-    return KErrNone;
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CAppLauncherManager::SimulateEventL()
-    {    
-    // Randomly start new applications.
-    // After maximum applications launched stop one application.
-    // And after that start launching again.
-    if ( iAppEventType == EApplicationsLaunchApplication && 
-         iAttributes.iMaxOpen == iLauncherEngine->AppLaunchCounter() )
-        {
-        iAppEventType = EApplicationsCloseApplication;
-        }
-    if ( iAppEventType == EApplicationsCloseApplication && 
-         iAttributes.iMaxOpen -1 == iLauncherEngine->AppLaunchCounter() )
-        {
-        iAppEventType = EApplicationsLaunchApplication;
-        }
-    
-    // Launch or stop
-    if ( iAppEventType == EApplicationsLaunchApplication )
-        {
-        iLauncherEngine->StartAppLaunchingL();
-        }  
-    else
-        {
-        iLauncherEngine->StopApplication( ETrue );
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-#include <avkon.hrh>
-#include <e32std.h>
-#include <w32std.h>
-#include <apgtask.h>
-#include <bautils.h>
-#include <s32file.h>
-#include <apgwgnam.h> 
-
-// ---------------------------------------------------------------------------
-
-CLauncherEngine* CLauncherEngine::NewL( TApplicationsAttributes& aAttributes )
-    {
-    CLauncherEngine* self = new(ELeave) CLauncherEngine( aAttributes );
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherEngine::CLauncherEngine( TApplicationsAttributes& aAttributes ) : 
-                        iAttributes( aAttributes )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::ConstructL()
-    {
-    LOGSTRING("LoadGen: CLauncherEngine::ConstructL");
-    iAppKeyPressManager = CAppKeyPressManager::NewL( iAttributes );
-    iAppLaunchCounter = 0;
-    User::LeaveIfError( iTimer.CreateLocal() );
-
-    User::LeaveIfError( iLs.Connect() );
-    User::LeaveIfError( iWs.Connect() );
-
-    }
-
-// ---------------------------------------------------------------------------
-
-CLauncherEngine::~CLauncherEngine()
-    {
-    LOGSTRING("LoadGen: CLauncherEngine::~CLauncherEngine");
-    StopApplication( EFalse );
-    iWs.Close();
-    iLs.Close();
-    iTimer.Close();
-    delete iAppKeyPressManager;
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::StartAppLaunchingL()
-    {
-    LOGSTRING("LoadGen: CLauncherEngine::StartAppLaunchingL");
-    if ( iAppLaunchCounter == iAttributes.iMaxOpen )
-        {
-        return;
-        }
-
-    // start launching
-    TBool launched( EFalse );
-    while ( !launched )
-        {
-        launched = LaunchApplicationL();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-TBool CLauncherEngine::LaunchApplicationL()
-    {
-    LOGSTRING("LoadGen: CLauncherEngine::LaunchApplicationL");
-    TBool result( EFalse );
-    // get the uid of the current app
-    iCurrentAppUid = KNullUid;
-    TApaAppInfo appInfo;
-    
-    // get application list size
-    TInt appsListSize = iAttributes.iAppsArray->MdcaCount();
-    // get random application number in the list
-    TInt appTolaunch = CLoadGenUtils::RandomNumber( 0,  appsListSize - 1 );
-    // get file name of the application to be launched
-    TFileName launchFileName = iAttributes.iAppsArray->MdcaPoint( appTolaunch );
-    iLs.GetAllApps();
-    while ( iLs.GetNextApp( appInfo ) == KErrNone )
-        {
-        // get file name in  current appInfo
-        TFileName appFileName = appInfo.iFullName;
-        // get AppUid
-        if ( appFileName.CompareF( launchFileName ) == 0 )
-            {
-            iCurrentAppUid = appInfo.iUid;
-            break;
-            }
-        }
-
-    if ( iCurrentAppUid != KNullUid )
-        {        
-        // parse the filename
-        TParse nameParser;
-        nameParser.SetNoWild( iAttributes.iAppsArray->MdcaPoint( appTolaunch ), NULL, NULL );
-        iCurrentAppNameAndExt.Copy( nameParser.Drive() );
-        iCurrentAppNameAndExt.Append( nameParser.NameAndExt() );
-           
-        // do not try to launch these apps
-        if ( iCurrentAppUid != KNullUid &&
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch).FindF(_L("\\loadgen.")) == KErrNotFound &&
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\Phone." ) ) == KErrNotFound &&
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch).FindF( _L("\\Startup.") ) == KErrNotFound &&  
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\SplashScreen.") ) == KErrNotFound &&  
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\cameraapp.") ) == KErrNotFound &&
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\eshell.") ) == KErrNotFound &&
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\ConnTest.") ) == KErrNotFound &&
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\Launcher.") ) == KErrNotFound &&
-              
-#ifdef __WINS__
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\DebugAgent.") ) == KErrNotFound &&
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\redirect.") ) == KErrNotFound &&              
-#endif              
-              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\VoiceRecorder.") ) == KErrNotFound )            
-            {
-        
-            // check if the app is already running
-            TApaTaskList taskList( iWs );
-            TApaTask thisTask = taskList.FindApp( iCurrentAppUid );
-            if ( !thisTask.Exists( ))
-                {
-                // check the program's capabilities
-                TApaAppCapabilityBuf buf;
-                iLs.GetAppCapability( buf, iCurrentAppUid );
-                TApaAppCapability cap = buf();
-        
-                // if it's embeddable only, don't launch if setting is enabled
-                // if it's hidden, don't launch if setting is enabled
-                if ( cap.iEmbeddability != TApaAppCapability::EEmbeddableOnly &&
-                     !cap.iAppIsHidden )
-                    {
-                    LOGSTRING2("launchFileName = %S", &launchFileName);
-                    
-                    DoLaunchApplicationL();
-                    result = ETrue;
-                    }            
-                } 
-            }
-        }
-    return result;
-    }
-
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::DoLaunchApplicationL()
-    {
-    LOGSTRING("LoadGen: CLauncherEngine::DoLaunchApplicationL");
-
-    // Find the task with uid3
-    TApaTaskList tasklist( iWs );
-    TApaTask task=tasklist.FindApp( iCurrentAppUid );
-
-    if ( !task.Exists() )
-        // Task doesn't exist, launch a new instance of an application
-        {
-        TApaAppInfo appInfo;
-        User::LeaveIfError( iLs.GetAppInfo( appInfo, iCurrentAppUid ) );
-
-        CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
-        cmdLine->SetExecutableNameL( appInfo.iFullName );
-
-        // app is launched in background
-        cmdLine->SetCommandL( EApaCommandBackground );       
-
-        // start the app
-        User::LeaveIfError( iLs.StartApp( *cmdLine ) );
-        iAppKeyPressManager->AddNewApplicationUidToKeyEventsL( iCurrentAppUid );
-        iAppLaunchCounter++;
-
-        CleanupStack::PopAndDestroy( cmdLine );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void CLauncherEngine::StopApplication( TBool aRandomApplication )
-    {
-    LOGSTRING("LoadGen: CLauncherEngine::StopApplication");
-
-    // remove key pressing instance
-    TUid appToDelete = iAppKeyPressManager->KillApplication( aRandomApplication );
-    if ( appToDelete != KNullUid )
-        {
-        TApaTaskList taskList( iWs );
-        TApaTask thisTask = taskList.FindApp( appToDelete );
-    
-        if ( thisTask.Exists() )
-            {
-            // since the application is still open, let's close it
-            thisTask.EndTask();
-            }
-        iAppLaunchCounter--;
-        }
-    
-    // return if only one application requested
-    if ( aRandomApplication )
-        {
-        return;
-        }
-    
-    // remove all launched applications because load is requested to be closed
-    while ( appToDelete != KNullUid )
-        {
-        appToDelete = iAppKeyPressManager->KillApplication( aRandomApplication );
-            
-        if ( appToDelete != KNullUid )
-            {
-            TApaTaskList taskList( iWs );
-            TApaTask thisTask = taskList.FindApp( appToDelete );
-        
-            if ( thisTask.Exists() )
-                {
-                // since the application is still open, let's close it
-                thisTask.EndTask();
-                }
-            iAppLaunchCounter--;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CAppKeyPressManager* CAppKeyPressManager::NewL( TApplicationsAttributes& aAttributes )
-    {
-    LOGSTRING("LoadGen: CAppKeyPressManager::NewL");
-    CAppKeyPressManager* self = new(ELeave) CAppKeyPressManager( aAttributes );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CAppKeyPressManager::CAppKeyPressManager( TApplicationsAttributes& aAttributes ) :
-                                            iAttributes( aAttributes )
-    {
-    LOGSTRING("LoadGen: CAppKeyPressManager::CAppKeyPressManager");
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CAppKeyPressManager::~CAppKeyPressManager()
-    {
-    LOGSTRING("LoadGen: CAppKeyPressManager::~CAppKeyPressManager");
-    if ( iKeyPresses.Count() != 0 )
-        {
-        iKeyPresses.ResetAndDestroy();
-        }
-
-    iKeyPresses.Close();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CAppKeyPressManager::ConstructL()
-    {
-    LOGSTRING("LoadGen: CAppKeyPressManager::ConstructL");
-    }
-    
-   
-// --------------------------------------------------------------------------------------------
-void CAppKeyPressManager::AddNewApplicationUidToKeyEventsL( TUid aUid )
-    {
-    LOGSTRING("LoadGen: CAppKeyPressManager::AddNewApplicationUidToKeyEventsL");
-    CApplicationKeyPresses* applicationKP = CApplicationKeyPresses::NewL( aUid,
-                                                                    iAttributes );
-    CleanupStack::PushL( applicationKP );
-    User::LeaveIfError( iKeyPresses.Append( applicationKP ) );
-    CleanupStack::Pop( applicationKP );
-    }
-
-// --------------------------------------------------------------------------------------------
-TUid CAppKeyPressManager::KillApplication( TBool aRandomApplication )
-    {
-    TUid applicationUid = KNullUid;
-    TInt appToDelete = iKeyPresses.Count() - 1 ;
-    // remove the newest application if not random 
-    if ( aRandomApplication )
-        {
-         appToDelete = CLoadGenUtils::RandomNumber( 0, iKeyPresses.Count() - 1 );
-        }
-    if ( iKeyPresses.Count() )
-        {
-        // get random application and delete it
-        
-        applicationUid = iKeyPresses[appToDelete]->ApplicationUid();
-        delete iKeyPresses[appToDelete];
-        iKeyPresses.Remove( appToDelete );
-        }
-    return applicationUid;
-    }
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CApplicationKeyPresses* CApplicationKeyPresses::NewL( TUid aUid, TApplicationsAttributes&  
-        aAttributes )
-    {
-    LOGSTRING("LoadGen: CApplicationKeyPresses::NewL");
-    CApplicationKeyPresses* self = new(ELeave) CApplicationKeyPresses( aUid, aAttributes );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CApplicationKeyPresses::CApplicationKeyPresses( TUid aUid, 
-                                                        TApplicationsAttributes& aAttributes ) :
-                                                iUid( aUid ), iAttributes( aAttributes ) 
-    {
-    LOGSTRING("LoadGen: CApplicationKeyPresses::CApplicationKeyPresses");
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CApplicationKeyPresses::~CApplicationKeyPresses()
-    {
-    LOGSTRING("LoadGen: CApplicationKeyPresses::~CApplicationKeyPresses");
-    if ( iPeriodicTimer )
-        {
-        iPeriodicTimer->Cancel();
-        delete iPeriodicTimer;
-        }
-    
-    iWsSession.Close();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CApplicationKeyPresses::ConstructL()
-    {
-    LOGSTRING("LoadGen: CApplicationKeyPresses::ConstructL");
-    // init
-    User::LeaveIfError( iWsSession.Connect() );
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-    if ( iAttributes.iKeyPressType )
-        {
-        iPeriodicTimer->Start( KDefaultStartDelay,
-                               CLoadGenUtils::MilliSecondsToMicroSeconds( 
-                                       iAttributes.iHeartBeat,
-                                       iAttributes.iRandomVariance ),
-                                TCallBack( PeriodicTimerCallBack, this ) );
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TInt CApplicationKeyPresses::PeriodicTimerCallBack( TAny* aAny )
-    {
-    CApplicationKeyPresses* self = static_cast<CApplicationKeyPresses*>( aAny );
-    self->SimulateKeyEvent();
-    return KErrNone;
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CApplicationKeyPresses::SimulateKeyEvent()
-    {
-    LOGSTRING("LoadGen: CApplicationKeyPresses::SimulateKeyEvent");
-    // for arrow key events
-    
-    TInt wgId(0);
-    CApaWindowGroupName::FindByAppUid( iUid, iWsSession, wgId );
-    // generate a random arrow key event
-    TWsEvent event;
-    event.SetType( EEventKey );
-    event.Key()->iCode = CLoadGenUtils::RandomNumber( EKeyLeftArrow, EKeyDownArrow );
-    event.Key()->iScanCode = event.Key()->iCode - KScanCodeStart;
-    event.Key()->iModifiers = 0;
-    event.Key()->iRepeats = 0;
-    iWsSession.SendEventToWindowGroup( wgId, event );
-    }
-
-// End of File
--- a/loadgen/engine/src/loadgen_bluetooth.cpp	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-// INCLUDE FILES
-#include "loadgen_bluetooth.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include "loadgen_traces.h"
-#include <loadgen.rsg>
-#include <e32hal.h>
-#include <u32hal.h>
-#include <e32math.h>
-#include <eikenv.h>
-#include <btserversdkcrkeys.h>
-#include <btnotifierapi.h>
-#include <btpm.h>
-
-_LIT(KThreadName, "Bluetooth %d");
-_LIT(KBTLinkManagerStr, "BTLinkManager");
-
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-   
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CBluetooth* CBluetooth::NewL(TBluetoothAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CBluetooth* self = new(ELeave) CBluetooth(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    TRAPD(err, self->ConstructL());
-    if( err != KErrNone )
-        {
-        User::Leave(err);
-        }
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CBluetooth::~CBluetooth()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CBluetooth::CBluetooth(TBluetoothAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CBluetooth::ConstructL()
-    {    
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadBluetooth;
-    
-    InitializeBluetoothL();
-                        
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-            
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    iState = ELoadStateConstructed;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CBluetooth::ThreadFunction(TAny* aThreadArg)
-    {
-    TInt err = KErrNone;
-    
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad(*((TBluetoothAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CBluetooth::GenerateLoad(TBluetoothAttributes& aAttributes)
-    {    
-    CBTManager* btManager = 0;
-    TRAPD(err, btManager = CBTManager::NewL(aAttributes));
-    if (err == KErrNone) CActiveScheduler::Start();
-    delete btManager;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CBluetooth::Resume()
-    {    
-    CLoadBase::Resume();    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CBluetooth::Suspend()
-    {
-    CLoadBase::Suspend();    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CBluetooth::SetPriority()
-    {
-    CLoadBase::SetPriority();    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CBluetooth::Close()
-    {
-    LOGSTRING2("LoadGen: CBluetooth::~CBluetooth() - State: %d", iState);
-    if( iState != ELoadStateInvalid )
-        {
-        CLoadBase::Close();        
-        // kill the thread immediately
-        iThread.Kill(0);
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-TPtrC CBluetooth::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-        
-    _LIT(KBluetoothEntry, "[%d] Bluetooth prio=%S idle=%dms random=%d%%");
-    buf.Format(KBluetoothEntry, iAttributes.iId, &prioBuf, iAttributes.iIdle, iAttributes.iRandomVariance);
-       
-    return TPtrC(buf);
-    }
-
-// --------------------------------------------------------------------------------------------
-void CBluetooth::InitializeBluetoothL()
-    {
-    // Create central repository for checking and setting bluetooth power state    
-    CRepository* btPowerStateCRepo = CRepository::NewL(KCRUidBluetoothPowerState);
-    
-    // Check if the BT is already turned on:    
-    TInt btPowerState = 0;
-    btPowerStateCRepo->Get(KBTPowerState, btPowerState);
-    delete btPowerStateCRepo;
-    btPowerStateCRepo = 0;
-        
-    if(btPowerState == EBTPowerOff)
-        {
-        // Switch bt power on:
-        if (SetBTPowerState(ETrue) == EFalse)
-            {
-            LOGSTRING("LoadGen: Bluetooth could not be switched on");
-            User::Leave(KErrNotReady);
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-TBool CBluetooth::SetBTPowerState(TBool aState)
-    {    
-    // Ask user to turn on the bluetooth device:
-    RNotifier btPowerNotifier;
-    TInt errCode = btPowerNotifier.Connect();
-    
-    TBool retVal = errCode == KErrNone;
-    
-    if( errCode == KErrNone )
-        {
-        TPckgBuf<TBool> powerRequest(aState);
-        TPckgBuf<TBool> powerReply(EFalse);
-        TRequestStatus powerRequestStatus;
-        btPowerNotifier.StartNotifierAndGetResponse(powerRequestStatus, 
-                                                KPowerModeSettingNotifierUid, 
-                                                powerRequest, 
-                                                powerReply);
-        User::WaitForRequest(powerRequestStatus);
-        btPowerNotifier.CancelNotifier(KPowerModeSettingNotifierUid);
-        btPowerNotifier.Close();  
-        if( powerReply() == EFalse )
-            {
-            LOGSTRING("LoadGen: Bluetooth activating cancelled.");
-            }
-        retVal = powerReply();
-        }
-    
-    return retVal; 
-    }
-
-// --------------------------------------------------------------------------------------------
-CBTManager* CBTManager::NewL(   TBluetoothAttributes& aAttrs)
-    {
-    CBTManager* self = new (ELeave) CBTManager( aAttrs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
- 
-// --------------------------------------------------------------------------------------------
-CBTManager::~CBTManager()
-    {    
-    if (iPeriodicTimer)
-        {
-        iPeriodicTimer->Cancel();
-        delete iPeriodicTimer;
-        }    
-    iHostResolver.Close();        
-    Cancel();
-    }
- 
-// --------------------------------------------------------------------------------------------
-CBTManager::CBTManager( TBluetoothAttributes& aAttrs) 
-: 
-CActive(EPriorityStandard),
-iAttributes(aAttrs)
-    {    
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CBTManager::ConstructL()
-    {
-    // Socket server session initiation:
-    User::LeaveIfError(iSocketServerHnd.Connect());    
-
-    CActiveScheduler::Add(this);
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-        
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-
-// --------------------------------------------------------------------------------------------
-void CBTManager::DoCancel()
-    {
-    LOGSTRING("LoadGen: CBTManager::DoCancel()");    
-    }
-
-// --------------------------------------------------------------------------------------------
-void CBTManager::RunL()
-    {    
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();    
-    }
-
-// --------------------------------------------------------------------------------------------
-TInt CBTManager::StartBTDeviceDiscovery()
-    {
-    TInt retVal = KErrNone; 
-    RThread myThread;
-           
-    // Initialize host resolver      
-    iHostResolver.Close();        
-    TProtocolDesc protocolInfo;
-    retVal = iSocketServerHnd.FindProtocol(KBTLinkManagerStr(), protocolInfo);
-    if( retVal == KErrNone )
-        {
-        retVal = iHostResolver.Open(iSocketServerHnd, protocolInfo.iAddrFamily, protocolInfo.iProtocol);        
-        }
-    
-    if( retVal == KErrNone )
-        {
-        TInquirySockAddr socketAddress;
-        socketAddress.SetIAC( KGIAC );
-        socketAddress.SetAction(KHostResInquiry|KHostResName|KHostResIgnoreCache);
-        retVal = iHostResolver.GetByAddress(socketAddress, iBTNameEntry);        
-        // Loop all discovered devices:
-        while( retVal == KErrNone )        
-            {
-            LOGSTRING3("LoadGen: Thread %S found device: %S", &(myThread.Name()), &(iBTNameEntry().iName) );
-            // Get next device
-            retVal = iHostResolver.Next(iBTNameEntry);            
-            }
-        }
-    
-    // KErrEof is returned when no more devices to loop
-    if( retVal == KErrEof )
-        {
-        retVal = KErrNone;
-        }
-            
-    iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
-                        iAttributes.iRandomVariance ), KDefaultPeriod, 
-                        TCallBack( PeriodicTimerCallBack, this ) );
-
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CBTManager::PeriodicTimerCallBack(TAny* aAny)
-    {        
-    CBTManager* self = static_cast<CBTManager*>( aAny );
-    self->iPeriodicTimer->Cancel();
-    // Perform device discovery:
-    self->StartBTDeviceDiscovery();
-    return KErrNone;
-    }
-
-// End of File
--- a/loadgen/engine/src/loadgen_cpuload.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +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 FILES
-#include "loadgen_cpuload.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-#include <e32hal.h>
-#include <u32hal.h>
-#include <e32math.h>
-#include <e32svr.h>
-
-_LIT(KThreadName, "CPULoad %d");
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CCPULoad* CCPULoad::NewL(TCPULoadAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CCPULoad* self = new(ELeave) CCPULoad(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CCPULoad::~CCPULoad()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CCPULoad::CCPULoad(TCPULoadAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CCPULoad::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadCPULoad;
-    
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-    
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CCPULoad::ThreadFunction(TAny* aThreadArg)
-    {
-    TCPULoadAttributes* threadArg = (TCPULoadAttributes*)aThreadArg;
-    TInt err = KErrNone;
-
-    // if a cpu is defined, tie this thread to the given cpu (SMP environment)
-    if (threadArg->iCpu >= 0 && threadArg->iCpu != KCPUSelection_AllCPUs )
-        {
-        UserSvr::HalFunction(EHalGroupKernel, KHalFunction_EKernelHalLockThreadToCpu, (TAny*) threadArg->iCpu, 0);
-        }
-    
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad(*((TCPULoadAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CCPULoad::GenerateLoad(TCPULoadAttributes& aAttributes)
-    {
-    for (;;)
-        {   
-        if (aAttributes.iType == ECpuLoadTypeContinuous)
-            {
-            // do constantly heave stuff
-            DoHeaveStuff(aAttributes.iMode);
-            }
-
-        else if (aAttributes.iType == ECpuLoadTypePeriodic)
-            {
-            // do periodically heave stuff
-            TTime startTime;
-            startTime.HomeTime(); // get start time
-
-            TTime currentTime;
-            TTimeIntervalMicroSeconds interval;
-            TInt processPeriod; 
-			#ifdef QT_SUPPORT
-				
-			#else
-				processPeriod = CLoadGenUtils::MilliSecondsToMicroSeconds(aAttributes.iLength, aAttributes.iRandomVariance);
-			#endif
-            do
-                {
-                // do heave stuff
-                DoHeaveStuff(aAttributes.iMode);
-
-                currentTime.HomeTime();
-                interval = currentTime.MicroSecondsFrom(startTime);                
-                }
-            while (interval.Int64() < processPeriod);       
-
-
-            // now wait
-            User::After( CLoadGenUtils::MilliSecondsToMicroSeconds(aAttributes.iIdle, aAttributes.iRandomVariance) );
-            }   
-
-        else
-            {
-            User::Panic(_L("Unk.type"), 888);
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CCPULoad::DoHeaveStuff(TInt aMode)
-    {
-    TTime now;
-    now.HomeTime();
-    TInt64 seed = now.Int64();
-    
-    TReal random = Math::FRand(seed);
-    
-    TReal target(10);
-    TReal source(10);
-    
-    target += random;
-    
-    Math::Cos(target, source);
-    
-    source = source / 1.0382873;
-    source -= 32.24343;
-    source += 132.24343;
-    source *= random;
-    
-    // yield trick
-    if (aMode == ECpuLoadModeYielding)
-        {
-        // sleep randomly
-        if (User::TickCount() % 50 == 0)
-            User::AfterHighRes(1);            
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CCPULoad::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CCPULoad::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CCPULoad::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CCPULoad::Close()
-    {
-    CLoadBase::Close();
-
-    // kill the thread immediately
-    iThread.Kill(0);   
-
-    iThread.Close();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CCPULoad::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-    
-    if (iAttributes.iType == ECpuLoadTypeContinuous)
-        {
-        if (iAttributes.iMode == ECpuLoadModeYielding)
-            {
-            _LIT(KCPULoadEntryContinuous, "[%d] CPULoad prio=%S mode=yielding type=cont");
-            buf.Format(KCPULoadEntryContinuous, iAttributes.iId, &prioBuf);
-            }
-        else if (iAttributes.iMode == ECpuLoadModeBlocking)
-            {
-            _LIT(KCPULoadEntryContinuous, "[%d] CPULoad prio=%S mode=blocking type=cont");
-            buf.Format(KCPULoadEntryContinuous, iAttributes.iId, &prioBuf);
-            }
-        }
-    
-    else if (iAttributes.iType == ECpuLoadTypePeriodic)
-        {
-        if (iAttributes.iMode == ECpuLoadModeYielding)
-            {
-            _LIT(KCPULoadEntryPeriodic, "[%d] CPULoad prio=%S mode=yielding type=period peak=%dms idle=%dms random=%d%%");
-            buf.Format(KCPULoadEntryPeriodic, iAttributes.iId, &prioBuf, iAttributes.iLength, iAttributes.iIdle, iAttributes.iRandomVariance);
-            }        
-        else if (iAttributes.iMode == ECpuLoadModeBlocking)
-            {
-            _LIT(KCPULoadEntryPeriodic, "[%d] CPULoad prio=%S mode=blocking type=period peak=%dms idle=%dms random=%d%%");
-            buf.Format(KCPULoadEntryPeriodic, iAttributes.iId, &prioBuf, iAttributes.iLength, iAttributes.iIdle, iAttributes.iRandomVariance);
-            }        
-        }
-    
-    // if we are running a load in a specific cpu, add the "name" of the
-    // cpu to the description. (SMP environment)
-    if (iAttributes.iCpu >= 0 && iAttributes.iCpu != KCPUSelection_AllCPUs)
-        {
-        TBuf<15> cpu;
-        _LIT(KCPU, " CPU%d");
-        cpu.Format(KCPU, iAttributes.iCpu);
-        buf.Append(cpu);
-        }
-    
-    return TPtrC(buf);
-    }               
-
-// --------------------------------------------------------------------------------------------
-
-
-// End of File
--- a/loadgen/engine/src/loadgen_httpreceiver.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,353 +0,0 @@
-
-#include <commdb.h>
-#include <commdbconnpref.h>
-#include "loadgen_httpreceiver.h"
-
-// CONSTANTS
-_LIT8( KHttpScheme, "http" );
-_LIT8( KSchemeAddon, "://" );
-// This client accepts all content types.
-_LIT8(KAccept, "*/*");
-
-CHTTPReceiver* CHTTPReceiver::NewL( MHTTPRecvObserver& aObserver )
-	{
-	CHTTPReceiver* self = CHTTPReceiver::NewLC( aObserver );
-	CleanupStack::Pop( self );
-	return self;
-	}
-
-CHTTPReceiver* CHTTPReceiver::NewLC( MHTTPRecvObserver& aObserver )
-	{
-	CHTTPReceiver* self = new (ELeave)CHTTPReceiver( aObserver );
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	return self;
-	}
-
-CHTTPReceiver::CHTTPReceiver( MHTTPRecvObserver& aObserver ) :
-	iObserver(aObserver), iRunning(EFalse), iConnectionSetupDone(EFalse)
-	{
-	}
-
-void CHTTPReceiver::ConstructL()
-	{
-#ifdef _DEBUG
-    User::LeaveIfError( iFs.Connect() );
-#endif
-	}
-
-CHTTPReceiver::~CHTTPReceiver()
-	{
-	TRACE( "Entry: CHTTPReceiver::~CHTTPReceiver" );
-
-	CancelTransaction();
-
-	TRAP_IGNORE( iSession.DisconnectL() );
-	iSession.Close();
-	iConnection.Stop();
-	iConnection.Close();
-	iSocketServ.Close();
-    
-	TRACE( "Entry: CHTTPReceiver::~CHTTPReceiver - delete iUrl" );
-	delete iUrl;
-
-#ifdef _DEBUG
-	iFs.Close();
-#endif
-	TRACE( "Exit: CHTTPReceiver::~CHTTPReceiver" );
-	}
-
-void CHTTPReceiver::CancelTransaction()
-	{
-	if ( !iRunning)
-		return;
-
-	TRACE( "Entry: CHTTPReceiver::CancelTransaction" );
-
-	if ( iRunning)
-		{
-		iTransaction.Close();
-		iRunning = EFalse;
-		}
-
-	TRACE( "Exit: CHTTPReceiver::CancelTransaction" );
-	}
-
-// ----------------------------------------------------------------------------
-// CHTTPReceiver::SendHTTPGetL()
-//
-// Start a new HTTP GET transaction.
-// ----------------------------------------------------------------------------
-void CHTTPReceiver::SendHTTPGetL( const TDesC8& aURL )
-	{
-	TRACE( "Entry: CHTTPReceiver::SendHTTPGetL" );
-	
-	iResponseStatus = KErrGeneral;
-	
-#ifdef _DEBUG
-    iResponseFile.Replace( iFs, _L("C:\\Data\\loadgen.htm"), EFileWrite );
-#endif
-    
-	SetupConnectionL();	
-	
-	// Parse string to URI (as defined in RFC2396)
-	TUriParser8 uri;
-	
-	CheckForHTTPSchemeL(uri, aURL);
-
-	RStringF method = iSession.StringPool().StringF(HTTP::EGET, RHTTPSession::GetTable());
-	CleanupClosePushL( method );
-
-	iTransaction = iSession.OpenTransactionL(uri, *this, method);
-
-	// Set headers for request: accepted content type
-	RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
-	SetHeaderL(hdr, HTTP::EAccept, KAccept);
-
-	iTransaction.SubmitL();
-
-	iRunning = ETrue;
-	CleanupStack::PopAndDestroy();
-	TRACE( "Exit: CHTTPReceiver::SendHTTPGetL" );
-	return;
-	}
-
-void CHTTPReceiver::CheckForHTTPSchemeL(TUriParser8& aUri, const TDesC8& aURL)
-	{
-	if( iUrl )
-	    {
-	    delete iUrl;
-	    iUrl = NULL;
-	    }
-	
-	iUrl = aURL.AllocL();
-	aUri.Parse( *iUrl );
-
-	TPtrC8 scheme( aUri.Extract (EUriScheme) );
-
-	// unsupported or no scheme in url.
-	// Insert 'http://' to the beginning of it.
-	if ( scheme != KHttpScheme )
-		{
-		HBufC8* tempBuf = HBufC8::NewL( KHttpScheme().Length() + KSchemeAddon().Length() + aURL.Length() );
-		CleanupStack::PushL( tempBuf );
-		tempBuf->Des().Append( KHttpScheme );
-		tempBuf->Des().Append( KSchemeAddon );
-		tempBuf->Des().Append( aURL );
-
-		if( iUrl )
-		    {
-            delete iUrl;
-            iUrl = NULL;
-		    }
-		iUrl = tempBuf;
-		aUri.Parse( *iUrl );
-		CleanupStack::PopAndDestroy( tempBuf );
-		}
-	}
-
-// Used to set header value to HTTP request
-void CHTTPReceiver::SetHeaderL (RHTTPHeaders aHeaders, TInt aHdrField, const TDesC8& aHdrValue)
-	{
-	RStringF valStr = iSession.StringPool().OpenFStringL (aHdrValue);
-	CleanupClosePushL (valStr);
-	THTTPHdrVal val(valStr);
-	aHeaders.SetFieldL (iSession.StringPool().StringF (aHdrField, RHTTPSession::GetTable ()), val);
-	CleanupStack::PopAndDestroy (); // valStr
-	}
-
-// Inherited from MHTTPTransactionCallback
-// Called by framework to pass transaction events.
-// ----------------------------------------------------------------------------
-void CHTTPReceiver::MHFRunL( RHTTPTransaction aTransaction,	const THTTPEvent& aEvent )
-	{
-	TRACE( "Entry: CHTTPReceiver::MHFRunL" );
-	TRACE2( "Entry: CHTTPReceiver::MHFRunL <%d>", aEvent.iStatus );
-
-	// state check
-	if ( !iRunning )
-		{
-		TRACE( "Exit1: CHTTPReceiver::MHFRunL: recv in wrong state" );
-		return;
-		}
-
-	switch ( aEvent.iStatus )
-		{
-	case THTTPEvent::EGotResponseHeaders:
-		{
-		TRACE( "Entry: CHTTPReceiver::MHFRunL EGotResponseHeaders" );
-		// Get HTTP status code from header (e.g. 200)
-		RHTTPResponse resp = aTransaction.Response();
-		iResponseStatus = resp.StatusCode();
-		}
-		break;
-
-	case THTTPEvent::EGotResponseBodyData:
-		{
-		// Get the body data supplier
-		TRACE( "Entry: CHTTPReceiver::MHFRunL EGotResponseBodyData" );
-		MHTTPDataSupplier* body = aTransaction.Response().Body ();
-		TPtrC8 dataChunk;
-		body->GetNextDataPart ( dataChunk );
-#ifdef _DEBUG
-		if ( dataChunk.Length() )
-		    {
-			iResponseFile.Write( dataChunk );
-		    }
-#endif
-		body->ReleaseData ();
-		}
-		break;
-
-	case THTTPEvent::EResponseComplete:
-		{
-		// Indicates that header & body of response is completely received.
-		// Notify Observer
-		TRACE( "Entry: CHTTPReceiver::MHFRunL EResponseComplete" );
-		}
-		break;
-
-	case THTTPEvent::ESucceeded:
-		{
-		// Transaction can be closed now. It's not needed anymore.
-		TRACE( "Entry: CHTTPReceiver::MHFRunL ESucceeded" );
-		Finalize();
-		}
-		break;
-
-	case THTTPEvent::EFailed:
-		{
-		TRACE( "Entry: CHTTPReceiver::MHFRunL EFailed" );
-		iResponseStatus = KErrGeneral;
-		Finalize();
-		}
-		break;
-
-	default:
-		TRACE( "Entry: CHTTPReceiver::MHFRunL EDefault" );
-		break;
-		}
-	}
-
-// Called by framework when *leave* occurs in handling of transaction event.
-// These errors must be handled, or otherwise HTTP-CORE 6 panic is thrown.
-// ----------------------------------------------------------------------------
-TInt CHTTPReceiver::MHFRunError ( TInt aError, RHTTPTransaction /*aTransaction*/, const THTTPEvent& /*aEvent*/ )
-	{
-	TRACE( "Entry: CHTTPReceiver::MHFRunError" );
-	iResponseStatus = aError;
-	Finalize();
-
-	TRACE( "Exit: CHTTPReceiver::MHFRunError" );
-	return KErrNone;
-	}
-
-void CHTTPReceiver::SetupConnectionL ()
-	{
-	TRACE( "Entry: CHTTPReceiver::StartConnectionL" );
-
-	// check if conncetion is already open
-	if ( iRunning )
-		{
-		return;
-		}
-
-	if ( iConnectionSetupDone )
-	    {
-		return;
-	    }
-
-	iConnectionSetupDone = ETrue;
-	
-	// open HTTP session
-	iSession.OpenL();
-
-	// open socket server
-	TInt result = iSocketServ.Connect();
-	if ( result == KErrNone)
-		{
-		// open connection
-		result = iConnection.Open(iSocketServ);
-		if ( result == KErrNone)
-			{
-			// set overrides
-			TCommDbConnPref pref;
-			pref.SetDialogPreference (ECommDbDialogPrefPrompt);
-			//pref.SetDirection (ECommDbConnectionDirectionOutgoing);
-			//pref.SetIapId (accessPoint);
-
-			// start with overrides
-			result = iConnection.Start(pref);
-
-			if ( result == KErrNone)
-				{
-				// get connection info from iSession
-				RHTTPConnectionInfo connInfo = iSession.ConnectionInfo ();
-				RStringPool pool = iSession.StringPool ();
-
-				// set socket server
-				connInfo.SetPropertyL (pool.StringF (HTTP::EHttpSocketServ,
-						RHTTPSession::GetTable () ),
-						THTTPHdrVal( iSocketServ.Handle () ) );
-
-				// attach to connection
-				TInt connectionPtr= REINTERPRET_CAST( TInt,
-						&iConnection );
-
-				connInfo.SetPropertyL (pool.StringF (
-						HTTP::EHttpSocketConnection,
-						RHTTPSession::GetTable () ),
-						THTTPHdrVal (connectionPtr) );
-
-#if defined(__WINSCW__) || defined(__WINS__) // if Emulator
-				_LIT8(KProxyAddr, "192.168.0.252:4040");
-				TBufC8<30> proxyAddr(KProxyAddr);
-
-				RStringF prxAddr = iSession.StringPool().OpenFStringL (proxyAddr);
-				CleanupClosePushL (prxAddr);
-				THTTPHdrVal prxUsage(iSession.StringPool().StringF (HTTP::EUseProxy,
-						RHTTPSession::GetTable ()));
-				iSession.ConnectionInfo().SetPropertyL (iSession.StringPool().StringF (HTTP::EProxyUsage,
-						RHTTPSession::GetTable ()), prxUsage);
-				iSession.ConnectionInfo().SetPropertyL (iSession.StringPool().StringF (HTTP::EProxyAddress,
-						RHTTPSession::GetTable ()), prxAddr);
-				CleanupStack::PopAndDestroy (); // prxAddr	
-#endif 
-
-				}
-			else
-				{
-				TRACE2( "CHTTPReceiver:: connection start: <%d>", result );
-				}
-			}
-		else
-			{
-			TRACE2( "CHTTPReceiver:: connection open: <%d>", result );
-			}
-		}
-	else
-		{
-		TRACE2( "CHTTPReceiver:: connection to socket server: <%d>", result );		
-		}
-
-	User::LeaveIfError( result );
-	
-	TRACE( "Exit: CHTTPReceiver::StartConnectionL" );
-	}
-
-// ----------------------------------------------------------------------------
-// CHTTPReceiver::Finalize
-// 
-// ----------------------------------------------------------------------------
-//
-void CHTTPReceiver::Finalize()
-    {
-    TRACE( "Exit: CHTTPReceiver::Finalize" );
-#ifdef _DEBUG
-    iResponseFile.Close();
-#endif
-    iTransaction.Close();
-    iRunning = EFalse;
-    iObserver.HTTPFileReceived( iResponseStatus );
-    TRACE( "Exit: CHTTPReceiver::Finalize" );
-    }
--- a/loadgen/engine/src/loadgen_keypress.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +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 FILES
-#include "loadgen_keypress.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-
-#include <e32math.h>
-
-_LIT(KThreadName, "KeyPress %d");
-
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CKeyPress* CKeyPress::NewL(TKeyPressAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CKeyPress* self = new(ELeave) CKeyPress(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CKeyPress::~CKeyPress()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CKeyPress::CKeyPress(TKeyPressAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CKeyPress::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadKeyPress;
-    
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-    
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CKeyPress::ThreadFunction(TAny* aThreadArg)
-    {
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad(*((TKeyPressAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-    
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CKeyPress::GenerateLoad(TKeyPressAttributes& aAttributes)
-    {
-    CKeyPressManager* keyPressManager = NULL;
-    TRAPD(err, keyPressManager = CKeyPressManager::NewL(aAttributes));
-    if (err == KErrNone) CActiveScheduler::Start();
-    delete keyPressManager;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CKeyPress::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CKeyPress::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CKeyPress::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CKeyPress::Close()
-    {
-    CLoadBase::Close();
-    
-    if (iThread.ExitReason() == 0) // check if the thread is still alive
-        {
-        // signal the thread that it needs to close
-        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
-
-        // wait the thread to die
-        TRequestStatus waiter;
-        iThread.Logon(waiter);
-        User::WaitForRequest(waiter);
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CKeyPress::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-    
-    _LIT(KKeyPressEntry, "[%d] KeyPress prio=%S heartbeat=%dms random=%d%%");
-    buf.Format(KKeyPressEntry, iAttributes.iId, &prioBuf, iAttributes.iHeartBeat, iAttributes.iRandomVariance);
-   
-    return TPtrC(buf);
-    }               
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CKeyPressManager* CKeyPressManager::NewL(TKeyPressAttributes& aAttributes)
-    {
-    CKeyPressManager* self = new(ELeave) CKeyPressManager(aAttributes);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CKeyPressManager::CKeyPressManager(TKeyPressAttributes& aAttributes) :
-    CActive(EPriorityStandard), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CKeyPressManager::~CKeyPressManager()
-    {
-    Cancel();
-    
-    iWsSession.Close();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CKeyPressManager::ConstructL()
-    {
-    CActiveScheduler::Add(this);
-    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-    
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    
-    // init
-    User::LeaveIfError( iWsSession.Connect() );
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CKeyPressManager::RunL()
-    {
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CKeyPressManager::DoCancel()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CKeyPressManager::PeriodicTimerCallBack(TAny* aAny)
-    {
-    CKeyPressManager* self = static_cast<CKeyPressManager*>( aAny );
-
-    self->iPeriodicTimer->Cancel();
-    self->SimulateKeyEvent();
-
-    return KErrNone;
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CKeyPressManager::SimulateKeyEvent()
-    {
-    // generate a random key event from a to z
-    TKeyEvent keyEvent;
-    keyEvent.iCode = CLoadGenUtils::RandomNumber('a','z');
-    keyEvent.iScanCode = keyEvent.iCode - 32;
-    keyEvent.iModifiers = 0;
-    keyEvent.iRepeats = 0;
-    
-    iWsSession.SimulateKeyEvent(keyEvent);
-    iWsSession.Flush();
-    
-    // call timer
-    iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iHeartBeat, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-// End of File
--- a/loadgen/engine/src/loadgen_loadbase.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +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 FILES
-#include "loadgen_loadbase.h"
-#include "loadgen.hrh"
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CLoadBase::CLoadBase()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadBase::ConstructL()
-    {
-    iState = ELoadStateInvalid;
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadBase::Resume()
-    {
-    iState = ELoadStateRunning;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadBase::Suspend()
-    {
-    iState = ELoadStateSuspended;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadBase::SetPriority()
-    {
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadBase::Close()
-    {
-    iState = ELoadStateClosed;
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CLoadBase::Description()
-    {
-    return TPtrC(KNullDesC);
-    }               
-               
-// --------------------------------------------------------------------------------------------
-
-// End of File
--- a/loadgen/engine/src/loadgen_memoryeat.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,603 +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 FILES
-#include "loadgen_memoryeat.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include "loadgen_traces.h"
-#include <loadgen.rsg>
-
-#include <e32math.h>
-
-_LIT(KThreadName, "MemEat %d");
-_LIT(KChunkName, "LoadGen %d");
-_LIT(KFilePath, "%c:\\system\\temp\\LoadGen-%d_%d.$$$");
-
-// currently can only handle 2GB
-const TInt64 KMaxEatSize = 2147483647;
-
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CMemoryEat* CMemoryEat::NewL(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CMemoryEat* self = new(ELeave) CMemoryEat(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CMemoryEat::~CMemoryEat()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CMemoryEat::CMemoryEat(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEat::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadEatMemory;
-    
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-    
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 32*1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CMemoryEat::ThreadFunction(TAny* aThreadArg)
-    {
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start memory eat, pass pointer to arguments
-    GenerateLoad(*((TMemoryEatAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEat::GenerateLoad(TMemoryEatAttributes& aAttributes)
-    {
-    CMemoryEatManager* memoryEatManager = NULL;
-    TRAPD(err, memoryEatManager = CMemoryEatManager::NewL(aAttributes));
-    if (err == KErrNone) CActiveScheduler::Start();
-    delete memoryEatManager;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEat::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEat::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEat::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEat::Close()
-    {
-    CLoadBase::Close();
-    
-    if (iThread.ExitReason() == 0) // check if the thread is still alive
-        {
-        // signal the thread that it needs to close
-        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
-
-        // wait the thread to die
-        TRequestStatus waiter;
-        iThread.Logon(waiter);
-        User::WaitForRequest(waiter);
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CMemoryEat::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-    TBuf<16> srcBuf;
-    CLoadGenUtils::SettingItemToSourceDescription(iAttributes.iSource, srcBuf);
-    
-    if (iAttributes.iType == EMemoryEatTypeMemoryToEat)
-        {
-        _LIT(KMemoryEatEntryMemoryToEat, "[%d] MemEat src=%S prio=%S type=MemToEat amount=%LDB buf=%dB idle=%dms");
-        
-        buf.Format(KMemoryEatEntryMemoryToEat, iAttributes.iId, &srcBuf, &prioBuf, iAttributes.iAmount, iAttributes.iBuffer, iAttributes.iIdle);
-        }
-    else if (iAttributes.iType == EMemoryEatTypeMemoryToBeLeft)
-        {
-        _LIT(KMemoryEatEntryMemoryToBeLeft, "[%d] MemEat src=%S prio=%S type=MemToBeLeft amount=%LDB buf=%dB idle=%dms");
-        
-        buf.Format(KMemoryEatEntryMemoryToBeLeft, iAttributes.iId, &srcBuf, &prioBuf, iAttributes.iAmount, iAttributes.iBuffer, iAttributes.iIdle);
-        }        
-
-    else if (iAttributes.iType == EMemoryEatTypeWavy)
-        {
-        _LIT(KMemoryEatEntryRandom, "[%d] MemEat src=%S prio=%S type=Random min=%LDB max=%LDB buf=%dB idle=%dms");
-        
-        buf.Format(KMemoryEatEntryRandom, iAttributes.iId, &srcBuf, &prioBuf, iAttributes.iRandomMin, iAttributes.iRandomMax, iAttributes.iBuffer, iAttributes.iIdle);
-        } 
-            
-    return TPtrC(buf);
-    }               
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CMemoryEatManager* CMemoryEatManager::NewL(TMemoryEatAttributes& aAttributes)
-    {
-    CMemoryEatManager* self = new(ELeave) CMemoryEatManager(aAttributes);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CMemoryEatManager::CMemoryEatManager(TMemoryEatAttributes& aAttributes) :
-    CActive(EPriorityStandard), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CMemoryEatManager::~CMemoryEatManager()
-    {
-    Cancel();
-    DestroyMemoryEat();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CMemoryEatManager::ConstructL()
-    {
-    CActiveScheduler::Add(this);
-    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-    
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    
-    // init
-    InitMemoryEatL();
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CMemoryEatManager::RunL()
-    {
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CMemoryEatManager::DoCancel()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CMemoryEatManager::PeriodicTimerCallBack(TAny* aAny)
-    {
-    TInt result = KErrNone;
-    CMemoryEatManager* self = static_cast<CMemoryEatManager*>( aAny );
-
-    self->iPeriodicTimer->Cancel();
-    TRAP( result, self->EatMemoryL() );
-
-    return result;
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CMemoryEatManager::InitMemoryEatL()
-    {
-    // create a chunk for RAM
-    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
-        {
-        TBuf<64> chunkName;
-        chunkName.Format(KChunkName, iAttributes.iId);
-        
-        // set max size of the chunk to be size of the RAM memory
-        TMemoryInfoV1Buf ramMemory;
-        UserHal::MemoryInfo(ramMemory);
-    
-        User::LeaveIfError( iEatChunk.CreateGlobal(chunkName, 0, ramMemory().iMaxFreeRamInBytes-1, EOwnerThread) );
-        }
-    
-    // create a temporary file to disk
-    else
-        {
-        // connect to RFs
-        User::LeaveIfError( iFs.Connect() );
-        
-        iFilesCounter = 0;
-        
-        TFileName eatFileName;
-        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, 1 );
-
-        iFs.MkDirAll( eatFileName );
-        User::LeaveIfError( iEatFile.Replace( iFs, eatFileName, EFileWrite ) );
-        iFilesCounter++;        
-        } 
-    
-    iWavyEatMoreMemory = ETrue;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEatManager::DestroyMemoryEat()
-    {
-    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
-        {
-        iEatChunk.Adjust(0);
-        iEatChunk.Close();
-        }
-    else
-        {
-        // close current file
-        
-        iEatFile.Flush();
-        iEatFile.Close();
-
-        // delete created files
-        for ( TInt k = 1; k <= iFilesCounter; k++ )
-            {            
-            TFileName eatFileName;
-            eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, k );
-            iFs.Delete( eatFileName );
-            }
-        iFs.Close();
-        } 
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CMemoryEatManager::EatMemoryL()
-    {
-    // get current sizes
-    TInt64 eatSizeNow(0);
-    TInt sizeNow(0);
-    TInt64 freeSystemMemory(0);
-
-    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
-        {
-        eatSizeNow = iEatChunk.Size(); // get current chunk size
-        }
-    else
-        {
-        User::LeaveIfError( iEatFile.Size( sizeNow ) );
-        if ( iFilesCounter > 1)
-            {
-            eatSizeNow += sizeNow + ( ( iFilesCounter - 1 ) * KMaxEatSize );
-        	}
-        else
-            { 
-            eatSizeNow = sizeNow ; 
-            }
-        }
-    LOGSTRING2("Loadgen:EatMemoryL eatSizeNow = %d", eatSizeNow );
-    
-    freeSystemMemory = ReadFreeMemory();
-    
-    // eat until specific amount of memory at most amount of buffer at a time  
-    if (iAttributes.iType == EMemoryEatTypeMemoryToEat)
-        {
-        // grow partial buffer to match exact amount 
-        if ( ( iAttributes.iAmount - eatSizeNow >= 0 && 
-               iAttributes.iAmount - eatSizeNow < iAttributes.iBuffer ) )
-            {
-               DoEatMemoryL( eatSizeNow + ( iAttributes.iAmount - eatSizeNow ) );
-            }
-        
-        // grow full buffer
-        else if ( eatSizeNow < iAttributes.iAmount )
-            {
-            DoEatMemoryL( eatSizeNow + iAttributes.iBuffer );
-            }
-        // shrink partial buffer to match exact amount
-        else if (eatSizeNow - iAttributes.iAmount >= 0 && eatSizeNow - iAttributes.iAmount < iAttributes.iBuffer)
-            {
-            DoEatMemoryL(eatSizeNow - (eatSizeNow - iAttributes.iAmount));
-            }                
-        
-        // shrink full buffer
-        else if (eatSizeNow > iAttributes.iAmount)
-            {
-            DoEatMemoryL(eatSizeNow - iAttributes.iBuffer);
-            }                
-        }
-
-    
-    // eat until specific amount of free memory has been reached at most amount of buffer at a time
-    else if (iAttributes.iType == EMemoryEatTypeMemoryToBeLeft)
-        {
-        // grow partial buffer to match exact amount
-        if (freeSystemMemory - iAttributes.iAmount >= 0 && freeSystemMemory - iAttributes.iAmount < iAttributes.iBuffer)
-            {
-            DoEatMemoryL(eatSizeNow + (freeSystemMemory - iAttributes.iAmount));
-            }
-
-        // grow full buffer
-        else if (freeSystemMemory > iAttributes.iAmount)
-            {
-            DoEatMemoryL(eatSizeNow + iAttributes.iBuffer);
-            }
-
-        // shrink partial buffer to match exact amount
-        if (iAttributes.iAmount - freeSystemMemory >= 0 && iAttributes.iAmount - freeSystemMemory < iAttributes.iBuffer)
-            {
-            DoEatMemoryL(eatSizeNow - (iAttributes.iAmount - freeSystemMemory));
-            }
-
-        // shrink full buffer
-        else if (freeSystemMemory < iAttributes.iAmount)
-            {
-            DoEatMemoryL(eatSizeNow - iAttributes.iBuffer);
-            }
-        }        
-        
-    // wavy memory eat
-    else if (iAttributes.iType == EMemoryEatTypeWavy)
-        {
-        // grow to max value if not under it
-        if (freeSystemMemory > iAttributes.iRandomMax)
-            {
-            DoEatMemoryL(eatSizeNow + (freeSystemMemory - iAttributes.iRandomMax) + iAttributes.iBuffer);
-            iWavyEatMoreMemory = ETrue; // change direction
-            }
-        
-        // shrink to min value if not below it
-        else if (freeSystemMemory < iAttributes.iRandomMin)
-            {
-            DoEatMemoryL(eatSizeNow - (iAttributes.iRandomMin - freeSystemMemory) - iAttributes.iBuffer);
-            iWavyEatMoreMemory = EFalse; // change direction
-            }                
-        
-        // grow or shrink
-        else
-            {
-            if (iWavyEatMoreMemory)
-                {
-                // grow partial buffer to match exact amount
-                if (freeSystemMemory - iAttributes.iRandomMin >= 0 && freeSystemMemory - iAttributes.iRandomMin < iAttributes.iBuffer)
-                    {
-                    DoEatMemoryL(eatSizeNow + (freeSystemMemory - iAttributes.iRandomMin));
-                    iWavyEatMoreMemory = EFalse; // change direction since limit reached
-                    }
-                
-                // grow full buffer
-                else
-                    {
-                    DoEatMemoryL(eatSizeNow + iAttributes.iBuffer);
-                    }
-                }
-
-            else // shrink
-                {
-                // shrink partial buffer to match exact amount
-                if (iAttributes.iRandomMax - freeSystemMemory >= 0 && iAttributes.iRandomMax - freeSystemMemory < iAttributes.iBuffer)
-                    {
-                    DoEatMemoryL(eatSizeNow - (iAttributes.iRandomMax - freeSystemMemory));
-                    iWavyEatMoreMemory = ETrue; // change direction since limit reached
-                    }                
-                
-                // shrink full buffer
-                else
-                    {
-                    DoEatMemoryL(eatSizeNow - iAttributes.iBuffer);
-                    }                 
-                }
-            }
-        }
-        
-
-    // call timer
-    iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iIdle, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CMemoryEatManager::DoEatMemoryL( TInt64 aNewSize )
-    {
-    // check that new size is in valid range
-    if (aNewSize < 0)
-        {
-        aNewSize = 0;
-        }
-    LOGSTRING2("Loadgen::DoEatMemoryL aNewSize = %ld", aNewSize );
-    // set new size
-    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
-        {
-        TInt err = iEatChunk.Adjust( aNewSize );
-        }
-    else
-        {
-        HandleEatMemoryL( aNewSize );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMemoryEatManager::HandleEatMemoryL( TInt64 aNewSize )
-    {
-    // current size = open file size + full files sizes
-    TInt currentFileSize = 0;        
-    User::LeaveIfError( iEatFile.Size( currentFileSize ) );    
-    TInt64 currentSize = currentFileSize + ( ( iFilesCounter - 1 ) * KMaxEatSize );
-    
-    if ( aNewSize > currentSize ) // increasing
-        {
-        AllocMemoryL( aNewSize );
-        }
-    else if ( aNewSize < currentSize )//decreasing
-        {
-        FreeMemoryL( aNewSize );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-void CMemoryEatManager::AllocMemoryL( TInt64 aNewSize )
-    {
-    LOGSTRING("Loadgen: CMemoryEatManager::AllocMemoryL =>");
-    // size of the file that remains open
-    TInt64 sizeLeft = aNewSize % KMaxEatSize;
-    // amount of the files that is needed
-    TInt64 filesNeeded = aNewSize / KMaxEatSize; 
-    if ( sizeLeft > 0 )
-        {
-        filesNeeded++;
-        }
-
-    if ( filesNeeded > iFilesCounter )
-        {
-        // update current file size to 2 GB
-        User::LeaveIfError( iEatFile.SetSize( KMaxEatSize ) );
-        // close current file
-        iEatFile.Flush();
-        iEatFile.Close();
-        
-        // open new file
-        TFileName eatFileName;
-        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, ++iFilesCounter );
-        
-        iFs.MkDirAll( eatFileName );
-        User::LeaveIfError( iEatFile.Replace( iFs, eatFileName, EFileWrite ) );
-        
-        }
-    User::LeaveIfError( iEatFile.SetSize( sizeLeft ) );
-    LOGSTRING("Loadgen: CMemoryEatManager::AllocMemoryL <=");
-    }
-
-// --------------------------------------------------------------------------------------------
-void CMemoryEatManager::FreeMemoryL( TInt64 aNewSize )    
-    {
-    LOGSTRING("Loadgen: CMemoryEatManager::FreeMemoryL =>");
-    // size of the file that remains open
-    TInt sizeLeft = aNewSize % KMaxEatSize;
-        
-    LOGSTRING2("Loadgen: sizeLeft = %d ",  sizeLeft );
-    // amount of the files that is needed
-    TInt filesNeeded = aNewSize / KMaxEatSize; 
-  
-    if ( filesNeeded == 0 )
-            {
-            filesNeeded = 1;
-            }
-
-    if ( iFilesCounter > 1 && filesNeeded < iFilesCounter )
-        {
-        TFileName eatFileName;
-
-        // close current open file 
-        iEatFile.Flush();
-        iEatFile.Close();
-        // remove file
-        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, iFilesCounter-- );
-        iFs.Delete( eatFileName );
-        
-        // remove files not needed
-        while ( iFilesCounter > filesNeeded )
-            {
-            eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, iFilesCounter-- );
-            iFs.Delete( eatFileName );
-            }
-
-        // open new file
-        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, iFilesCounter );
-        User::LeaveIfError( iEatFile.Open( iFs, eatFileName, EFileWrite ) );
-        }
-    User::LeaveIfError( iEatFile.SetSize( sizeLeft ) );
-    LOGSTRING("Loadgen: CMemoryEatManager::FreeMemoryL <=");
-    }
-
-// --------------------------------------------------------------------------------------------
-TInt64 CMemoryEatManager::ReadFreeMemory()    
-    {
-    if ( iAttributes.iSource == EMemoryEatSourceTypeRAM )
-        {   
-        TMemoryInfoV1Buf ramMemory;
-        UserHal::MemoryInfo( ramMemory ); // get available RAM
-        return (TInt64)ramMemory().iFreeRamInBytes;
-        }
-    else
-        {   
-        TVolumeInfo volumeInfo;
-        iFs.Volume( volumeInfo, iAttributes.iSource + 1 ); // get available disk      
-        return volumeInfo.iFree;
-        }
-    }
-// --------------------------------------------------------------------------------------------
-
-// End of File
--- a/loadgen/engine/src/loadgen_messages.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,990 +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 FILES
-#include "loadgen_messages.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-#include <e32math.h>
-
-_LIT(KThreadName, "Messages %d");
-_LIT(KMessageSMS, "A test message from LoadGen S60 RnD tool. ");
-_LIT( KMessageSMSType, "SMS" );
-_LIT( KMessageMMSType, "MMS" );
-
-const TInt KTestMessageLength = 42;
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CMessages* CMessages::NewL( TMessageAttributes& aAttributes, TInt aReferenceNumber )
-    {
-    CMessages* self = new(ELeave) CMessages( aAttributes, aReferenceNumber );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CMessages::~CMessages()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CMessages::CMessages( TMessageAttributes& aAttributes, 
-                       TInt aReferenceNumber ) 
-                            : iAttributes( aAttributes )
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMessages::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadMessages;
-    
-    TBuf<64> threadName;
-    threadName.Format( KThreadName, iAttributes.iId );
-    
-    // create a thread
-    User::LeaveIfError( iThread.Create( threadName, 
-                                        ThreadFunction, 
-                                        KDefaultStackSize * 2, 
-                                        KMinHeapSize, 
-                                        1024 * KMinHeapSize, 
-                                        (TAny*) &iAttributes ) );
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CMessages::ThreadFunction(TAny* aThreadArg)
-    {
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install( pS );
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad( *( ( TMessageAttributes* ) aThreadArg ) );
-
-    delete pS;
-    delete pC;
-    
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMessages::GenerateLoad( TMessageAttributes& aAttributes )
-    {
-    CMessageManager* messagesManager = NULL;
-    TRAPD( err, messagesManager = CMessageManager::NewL( aAttributes ) );
-
-    if ( err == KErrNone )
-        {
-        CActiveScheduler::Start();
-        }
-    delete messagesManager;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMessages::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMessages::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMessages::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority( CLoadGenUtils::SettingItemToThreadPriority( iAttributes.iPriority ) );
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CMessages::Close()
-    {
-    CLoadBase::Close();
-
-    if ( iThread.ExitReason() == 0 ) // check if the thread is still alive
-        {
-        // signal the thread that it needs to close
-        iThread.RequestComplete( iAttributes.iDeathStatus, KErrCancel );
-
-        // wait the thread to die
-        TRequestStatus waiter;
-        iThread.Logon( waiter );
-        User::WaitForRequest( waiter );
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CMessages::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    TBuf<3> typeBuf;
-    CLoadGenUtils::SettingItemToThreadDescription( iAttributes.iPriority, prioBuf );
-    if ( iAttributes.iMessageType == EMessageTypeSMS )
-        {
-        typeBuf.Copy( KMessageSMSType );
-        }
-    else
-        {
-        typeBuf.Copy( KMessageMMSType );
-        }
-    _LIT(KMessagesEntry, "[%d] Type=%S prio=%S dest=%S idle=%dms random=%d%%");
-    buf.Format( KMessagesEntry,  iAttributes.iId, &typeBuf, &prioBuf, &iAttributes.iDestination, 
-                iAttributes.iIdle, iAttributes.iRandomVariance );
-    
-    return TPtrC( buf );
-    }               
-// --------------------------------------------------------------------------------------------
-
-CMessageManager* CMessageManager::NewL( TMessageAttributes& aAttributes )
-    {
-    CMessageManager* self = new(ELeave) CMessageManager( aAttributes );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-CMessageManager::CMessageManager( TMessageAttributes& aAttributes ) :
-    CActive( EPriorityStandard ), iAttributes( aAttributes ), iState( EStateIdle )
-    {
-    iMessageCounter = 0;
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CMessageManager::~CMessageManager()
-    {
-    Cancel();
-    delete iMessage;
-    if ( iPeriodicTimer )
-        {
-        iPeriodicTimer->Cancel();
-        delete iPeriodicTimer;
-        }
-    if ( iAttributes.iMessageType == EMessageTypeSMS && iSmsHandler )
-        {
-        delete iSmsHandler;
-        }
-    else if ( iMmsHandler )
-        {
-        delete iMmsHandler;
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CMessageManager::ConstructL()
-    {
-    CActiveScheduler::Add( this );
-    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-    
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    if ( iAttributes.iAmount > 0 )
-        {
-        iState = EStateSend;
-        }
-    iMessage = HBufC::NewL( iAttributes.iLength );
-    CreateMessage();
-
-    // init SMS sender ao
-    if ( iAttributes.iMessageType == EMessageTypeSMS )
-        {
-        iSmsHandler = CSmsHandler::NewL( *this );
-        }
-    else
-        {
-        iMmsHandler = CMmsHandler::NewL( *this );
-        }
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-    iPeriodicTimer->Start( KDefaultStart, KDefaultPeriod, 
-                        TCallBack( PeriodicTimerCallBack, this ) );
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CMessageManager::RunL()
-    {
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CMessageManager::DoCancel()
-    {
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TInt CMessageManager::PeriodicTimerCallBack(TAny* aAny)
-    {
-    CMessageManager* self = static_cast<CMessageManager*>( aAny );
-
-    self->iPeriodicTimer->Cancel();
-    self->HandleMessageSending();
-
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMessageManager::CreateMessage()
-    {
-    // Message body
-    TBuf<KTestMessageLength> mToYou( KMessageSMS );
-    TPtr ptr = iMessage->Des();
-
-    // Take as many characters as user requested to create the message
-    for ( TInt j = 0; j < iAttributes.iLength; j++ )
-          {
-           for ( TInt k = 0; k < KTestMessageLength;  k++ )
-               {
-               ptr.Append( mToYou[k] );
-               j++;
-               if ( j == iAttributes.iLength )
-                   {
-                   break;
-                   }
-               }        
-           }
-    }
-
-
-// --------------------------------------------------------------------------------------------
-
-void CMessageManager::HandleMessageSending()
-    {
-    if ( iState == EStateSend && iAttributes.iDestination.Length() <= KTelephoneNumberMaxLength )
-        {
-        TBool err( KErrNone );        
-
-        // make a new call
-        iState = EStateSending;
- 
-        iMessageCounter++;
-        if ( iAttributes.iMessageType == EMessageTypeSMS )
-            {
-            TRAP( err, iSmsHandler->SendL( iAttributes.iDestination, *iMessage ) );
-            if ( !err )
-                {
-                iState = EStateIdle;
-                iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
-                            iAttributes.iRandomVariance ), KDefaultPeriod, 
-                            TCallBack( PeriodicTimerCallBack, this ) );
-
-                }
-            }
-        else
-            {
-            TRAP( err, iMmsHandler->SendL( iAttributes.iDestination, *iMessage ) );            
-            if ( err )
-                {
-                HandleStatus( EStateIdle );
-                }
-            }
-        }
-    else
-        {
-        iState = EStateIdle;
-        iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
-                    iAttributes.iRandomVariance ), KDefaultPeriod, 
-                    TCallBack( PeriodicTimerCallBack, this ) );
-
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CMessageManager::HandleStatus( TInt /*aErr*/ )
-    {
-    // timer after wait
-    if ( iMessageCounter < iAttributes.iAmount )
-        {
-        iState = EStateSend;
-        iPeriodicTimer->Cancel();
-        iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
-                    iAttributes.iRandomVariance ), KDefaultPeriod, 
-                    TCallBack( PeriodicTimerCallBack, this ) );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-// INCLUDE FILES
-#include <eikenv.h>
-#include <coemain.h>
-#include <e32std.h>
-#include <msvids.h>
-#include <msvstd.h>
-#include <smsclnt.h>
-#include <smut.h>
-#include <mtclreg.h>
-#include <txtrich.h>
-#include <smscmds.h>
-#include <mtmuibas.h>
-#include <mtmdef.h>
-#include <StringLoader.h>
-#include "smutset.h"
-#include "smuthdr.h"
- 
- 
- 
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// CSmsHandler::CSmsHandler()
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CSmsHandler::CSmsHandler( CMessageManager& aManager )
-    : CActive( CActive::EPriorityStandard ), iManager( aManager )
-    {
-    CActiveScheduler::Add( this );
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CSmsHandler::ConstructL()
-    {
-    // Session to message server is opened asynchronously.
-    iSession = CMsvSession::OpenAsyncL( *this );
- 
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::NewL()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSmsHandler* CSmsHandler::NewL( CMessageManager& aManager  )
-    {
-    CSmsHandler* self = NewLC( aManager );
-    CleanupStack::Pop( self );
-    return self;
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::NewLC()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSmsHandler* CSmsHandler::NewLC(  CMessageManager& aManager )
-    {
-    CSmsHandler* self = new ( ELeave ) CSmsHandler( aManager );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
- 
-// ----------------------------------------------------------
-// CSmsHandler::~CSmsHandler()
-// Destructor.
-// ----------------------------------------------------------
-//
-CSmsHandler::~CSmsHandler()
-    {
-    Cancel();           // cancel any outstanding request
- 
-    delete iOperation;
-    delete iMtmUiRegistry;
-    delete iSmsMtm;
-    delete iMtmRegistry;
-    delete iSession;    // session must be deleted last
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::DoCancel()
-// Cancels a request.
-// -----------------------------------------------------------------------------
-//
-void CSmsHandler::DoCancel()
-    {
-    if ( iOperation )
-        {
-        iOperation->Cancel();
-        }
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::RunL()
-// Handles request completion events.
-// -----------------------------------------------------------------------------
-//
-void CSmsHandler::RunL()
-    {
-    User::LeaveIfError( iStatus != KErrNone );
- 
-    // Determine the current operations progress.
-    // ProgressL returns an 8 bit descriptor.
-    TBufC8<KMsvProgressBufferLength> progress( iOperation->ProgressL() );
-    _LIT8( KCompare, "KErrNone" );
-    User::LeaveIfError( !progress.Compare( KCompare ) );
- 
-    // The pointer to the current CMsvOperation object is no longer needed.
-    delete iOperation;
-    iOperation = NULL;
- 
-    // Determine which request has finished.
-    switch ( iState )
-        {
-        case EWaitingForMoving:
-            // Once a message is moved to Outbox it is scheduled for sending.
-            ScheduleL();
-            break;
- 
-        case EWaitingForScheduling:
-            {
-            TMsvEntry entry( iSmsMtm->Entry().Entry() );
-            TInt state( entry.SendingState() );
- 
-            if ( state == KMsvSendStateWaiting || state == KMsvSendStateScheduled)
-                {
-                // notify the observer that status has changed
-                iManager.HandleStatus( iStatus.Int() );
-                }
-            break;
-            }
- 
-        default:
-            break;
-        }
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::HandleSessionEventL()
-// Handles notifications of events from the Message Server.
-// -----------------------------------------------------------------------------
-//
-void CSmsHandler::HandleSessionEventL( TMsvSessionEvent aEvent,
-                                      TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
-    {
-    switch ( aEvent )
-        {
-        // Session to server established
-        case EMsvServerReady:
-            {
-            TMsvId serviceId( KUidMsgTypeSMS.iUid ); // SMS service id
- 
-            // Determine if the event was succesful.
-            // ServiceProgress inserts TBuf8 value in progress.
-            TBuf8<KBfrLength> progress;
-            iSession->ServiceProgress( serviceId, progress );
-            _LIT8( KCompare, "KErrNone" );
- 
-            if ( progress.Compare( KCompare ) )
-                {
-                // Check that MtmRegistry has not already been accessed.
-                if ( !iMtmRegistry )
-                    {
-                    AccessMtmL();
-                    }
-                }
-            break;
-            }
- 
-        // All other events are ignored.
-        default:
-            break;
-        }
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::AccessMtmL()
-// Access the MTM Registry and create a SMS specific Client MTM instance.
-// -----------------------------------------------------------------------------
-//
-void CSmsHandler::AccessMtmL()
-    {
-    // Create an MTM Registry object.
-    iMtmRegistry = CClientMtmRegistry::NewL( *iSession );
- 
-    // Create an SMS Client MTM object.
-    iSmsMtm = STATIC_CAST( CSmsClientMtm*, iMtmRegistry->NewMtmL( KUidMsgTypeSMS ) );
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::SendL()
-// Starts the process of creating and sending an SMS message.
-// -----------------------------------------------------------------------------
-//
-TBool CSmsHandler::SendL( const TDesC& aRecipientNumber,
-                            const TDesC& aMessageText )
-    {
-    iRecipientNumber = aRecipientNumber;
-    iMessageText = aMessageText;
- 
-    if ( CreateMsgL() )
-        {
-        return ETrue;
-        }
- 
-    return EFalse;
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::CreateMsgL()
-// Create an SMS message.
-// -----------------------------------------------------------------------------
-//
-TBool CSmsHandler::CreateMsgL()
-    {
-	if(!iSmsMtm)
-		{
-		return EFalse;
-		}
-    // Current entry is the Draft folder.
-    iSmsMtm->SwitchCurrentEntryL( KMsvDraftEntryId );
- 
-    // Create a new SMS message entry as a child of the current context.
-    iSmsMtm->CreateMessageL( KUidMsgTypeSMS.iUid );
- 
-    CMsvEntry& serverEntry = iSmsMtm->Entry();
-    TMsvEntry entry( serverEntry.Entry() );
- 
-    CRichText& body = iSmsMtm->Body();   // the body of the message
-    body.Reset();
-    // Insert the message text gotten as input from user.
-    body.InsertL( 0, iMessageText );
- 
-    // Message will be sent immediately.
-    entry.SetSendingState( KMsvSendStateWaiting );
- 
-    entry.iDate.UniversalTime(); // insert current time //Solution for HomeTime()
-
-    // Set the SMS message settings for the message.
-    CSmsHeader& header = iSmsMtm->SmsHeader();
-    CSmsSettings* settings = CSmsSettings::NewL();
-    CleanupStack::PushL( settings );
- 
-    settings->CopyL( iSmsMtm->ServiceSettings() );    // restore settings
-    settings->SetDelivery( ESmsDeliveryImmediately ); // to be delivered immediately
-    settings->SetDeliveryReport(ETrue);
-    header.SetSmsSettingsL( *settings );              // new settings
- 
-    // Let's check if there is a service center address.
-    if ( header.Message().ServiceCenterAddress().Length() == 0 )
-        {
-        // No, there isn't. We assume there is at least one service center
-        // number set and use the default service center number.
-        CSmsSettings* serviceSettings = &( iSmsMtm->ServiceSettings() );
- 
-        // Check if number of service center addresses in the list is null.
- 
-        //Changed for 3rd Edition specially
-        if ( !serviceSettings->ServiceCenterCount() )
-            {
-            CleanupStack::PopAndDestroy( settings ); 
-            return EFalse;     // quit creating the message
-            }
- 
-        else
-            {
-            //Changed for 3rd Edition specially            
-            CSmsNumber* smsCenter= CSmsNumber::NewL();
-            CleanupStack::PushL(smsCenter);
-            smsCenter->SetAddressL((serviceSettings->GetServiceCenter( 
-                            serviceSettings->DefaultServiceCenter())).Address());
-            header.Message().SetServiceCenterAddressL( smsCenter->Address() );
-            CleanupStack::PopAndDestroy(smsCenter);
-            }
-        }
- 
-    CleanupStack::PopAndDestroy( settings );
- 
-    // Recipient number is displayed also as the recipient alias.
-    entry.iDetails.Set( iRecipientNumber );
-    // Add addressee.
-    iSmsMtm->AddAddresseeL( iRecipientNumber, entry.iDetails );
- 
-    // Validate message.
-    if ( !ValidateL() )
-        {
-        return EFalse;
-        }
- 
-    entry.SetVisible( ETrue );          // set message as visible
-    entry.SetInPreparation( EFalse );   // set together with the visibility flag
-    serverEntry.ChangeL( entry );       // commit changes        
-    iSmsMtm->SaveMessageL();            // save message
- 
-    TMsvSelectionOrdering selection;
-    CMsvEntry* parentEntry = CMsvEntry::NewL( iSmsMtm->Session(), KMsvDraftEntryId, selection );
-    CleanupStack::PushL( parentEntry );
- 
-    // Move message to Outbox.
-    iOperation =parentEntry->MoveL( entry.Id(), KMsvGlobalOutBoxIndexEntryId, iStatus );
- 
-    CleanupStack::PopAndDestroy( parentEntry );
- 
-    iState = EWaitingForMoving;
-    SetActive();
- 
-    return ETrue;
-  }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::ValidateL()
-// Validate an SMS message.
-// -----------------------------------------------------------------------------
-//
-TBool CSmsHandler::ValidateL()
-    {
-	if( !iSmsMtm )
-		{
-		return EFalse;
-		}
-    // Empty part list to hold the result.
-    TMsvPartList result( KMsvMessagePartNone );
- 
-    // Validate message body.
-    result = iSmsMtm->ValidateMessage( KMsvMessagePartBody );
- 
-    if ( result != KMsvMessagePartNone )
-        {
-        return EFalse;
-        }
- 
-    // Validate recipient.
-    result = iSmsMtm->ValidateMessage( KMsvMessagePartRecipient );
- 
-    if ( result != KMsvMessagePartNone )
-        {
-        return EFalse;
-        }
- 
-    return ETrue;
-    }
- 
-// -----------------------------------------------------------------------------
-// CSmsHandler::ScheduleL()
-// Schedule an SMS message for sending.
-// -----------------------------------------------------------------------------
-//
-void CSmsHandler::ScheduleL()
-    {
-	if( !iSmsMtm )
-		{
-		return;
-		}
-    CMsvEntrySelection* selection = new ( ELeave ) CMsvEntrySelection;
-    CleanupStack::PushL( selection );
-    selection->AppendL( iSmsMtm->Entry().EntryId() ); // add message to selection
- 
-    // Add entry to task scheduler.
-    TBuf8<1> dummyParams;   // dummy parameters needed for InvokeAsyncFunctionL
-    iOperation = iSmsMtm->InvokeAsyncFunctionL( ESmsMtmCommandScheduleCopy,
-                          *selection, dummyParams, iStatus );
- 
-    CleanupStack::PopAndDestroy( selection );
- 
-    iState = EWaitingForScheduling;
-    SetActive();
-    }
- 
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-
-
-// INCLUDE FILES
-#include <mtclreg.h>                  // for CClientMtmRegistry 
-#include <msvids.h>                   // for Message type IDs
-#include <mmsclient.h>                // for CMmsClientMtm
-#include <AknQueryDialog.h>           // for CAknTextQueryDialog
-#include <f32file.h>                
-#include <coeutils.h>                  // Check the file exist
-
-#include <cmsvmimeheaders.h>        //Attachemt mimeheader
-#include <mmsvattachmentmanager.h>    //Attachment manager
-
-// -----------------------------------------------------------------------------
-// CMmsHandler::CSmsHandler()
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CMmsHandler::CMmsHandler( CMessageManager& aManager ) : iManager( aManager )
-    {
-    }
- 
-// -----------------------------------------------------------------------------
-// CMmsHandler::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CMmsHandler::ConstructL()
-    {
-    // Session to message server is opened asynchronously.
-    iSession = CMsvSession::OpenAsyncL( *this );
- 
-    }
- 
-// -----------------------------------------------------------------------------
-// CMmsHandler::NewL()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CMmsHandler* CMmsHandler::NewL( CMessageManager& aManager  )
-    {
-    CMmsHandler* self = NewLC( aManager );
-    CleanupStack::Pop( self );
-    return self;
-    }
- 
-// -----------------------------------------------------------------------------
-// CMmsHandler::NewLC()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CMmsHandler* CMmsHandler::NewLC(  CMessageManager& aManager )
-    {
-    CMmsHandler* self = new ( ELeave ) CMmsHandler( aManager );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
- 
-// ----------------------------------------------------------
-// CMmsHandler::~CSmsHandler()
-// Destructor.
-// ----------------------------------------------------------
-//
-CMmsHandler::~CMmsHandler()
-    {
-    delete iMmsMtm;
-    delete iMtmReg;
-    delete iSession;    // session must be deleted last (and constructed first)
-    }
-
-/*
------------------------------------------------------------------------------
-    CMmsHandler::CompleteConstructL()
-    Creates client MTM registry when session is ready for use. 
-    This completes model construction and is called after 'server
-    ready' event is received after async opening of CMsvSession.
------------------------------------------------------------------------------
-*/
-void CMmsHandler::CompleteConstructL()
-    {
-    // We get a MtmClientRegistry from our session
-    // this registry is used to instantiate new mtms.
-    iMtmReg = CClientMtmRegistry::NewL( *iSession );
-    iMmsMtm = (CMmsClientMtm*)iMtmReg->NewMtmL( KUidMsgTypeMultimedia );
-    }
-   
-/*
------------------------------------------------------------------------------
-    CMmsHandler::HandleSessionEventL()
-
-    Receives session events from observer and calls event handling functions. 
-    Note that if additional session event handlers are defined 
-    in the session, they are called before this function (as this is the
-    main session observer).
-    The type of event is indicated by the value of aEvent. The 
-    interpretation of the TAny arguments depends on this type. 
------------------------------------------------------------------------------
-*/
-void CMmsHandler::HandleSessionEventL(TMsvSessionEvent aEvent, 
-                                        TAny* /*aArg1*/, 
-                                        TAny* /*aArg2*/, 
-                                        TAny* /*aArg3*/)
-    {
-    switch ( aEvent )
-        {
-        // This event tells us that the session has been opened
-        case EMsvServerReady:
-            {
-            CompleteConstructL();       // Construct the mtm registry & MMS mtm
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CSmsHandler::SendL()
-// Starts the process of creating and sending an SMS message.
-// -----------------------------------------------------------------------------
-//
-TBool CMmsHandler::SendL( const TDesC& aRecipientNumber,
-                            const TDesC& aMessageText )
-    {
-    TInt result( EFalse );
-    
-    iRecipientNumber = aRecipientNumber;
-    iMessageText = aMessageText;
- 
-    if ( CreateMsgL() )
-        {
-        if ( SendMessageL() )
-            {
-            result = ETrue;
-            }
-        }
- 
-    return result;
-    }
-
-/*
------------------------------------------------------------------------------
-    CMmsHandler::CreateMsgL()
-    Creates a new message server entry and set up default values.
-    In case the attachment file does not found method return EFalse
-    otherwise ETrue.
-    There are differenses how to add attachment file between 2nd and 3rd edition. 
------------------------------------------------------------------------------
-*/
-TBool CMmsHandler::CreateMsgL()
-    {
-
-    // - CMsvEntry accesses and acts upon a particular Message Server entry.
-    // - NewL() does not create a new entry, but simply a new object to access an existing entry.
-    // - It takes in as parameters the client's message server session,
-    //   ID of the entry to access and initial sorting order of the children of the entry. 
-    CMsvEntry* entry = CMsvEntry::NewL( *iSession, 
-                                        KMsvGlobalOutBoxIndexEntryId, 
-                                        TMsvSelectionOrdering() );
-    CleanupStack::PushL( entry );
-
-    // Set context to the parent folder (Outbox)
-    iMmsMtm->SwitchCurrentEntryL( entry->EntryId() );
-    
-    // Create new message in the parent folder (Outbox) and set it as the current context.
-    iMmsMtm->CreateMessageL( iMmsMtm->DefaultServiceL() );
-
-    CleanupStack::PopAndDestroy( entry ); 
-    
-    // Setting recipients
-    // use this to add the "To" recipients.
-    iMmsMtm->AddAddresseeL( iRecipientNumber );
-    
-    //Setting message subject
-    _LIT(KMessageSubject, "MMS Message");
-    iMmsMtm->SetSubjectL( KMessageSubject );
-    
-    // add message text
-    SetMessageBodyL();
-   
-    TMsvEntry ent = iMmsMtm->Entry().Entry();
-    // Set InPreparation to false
-    ent.SetInPreparation( EFalse );
-    ent.SetVisible( ETrue );            // mark as visible, after this the message can be seen in Outbox and, after sending, in Sent folder.
-  
-    iMmsMtm->Entry().ChangeL( ent );    // Commit changes
-    
-    //Save the changes
-    iMmsMtm->SaveMessageL();
-    
-    return ETrue;
-    }
-
-//---------------------------------------------------------------------------------
-void CMmsHandler::SetMessageBodyL()
-    {
-    _LIT (KFilenameText, "msg.txt");
-    CMsvStore* store = iMmsMtm->Entry().EditStoreL();
-    CleanupStack::PushL( store );
-
-    TMsvAttachmentId attachmentId = KMsvNullIndexEntryId;
-
-    iMmsMtm->CreateTextAttachmentL ( *store,
-                                     attachmentId,
-                                     iMessageText,
-                                     KFilenameText );
-
-    store->CommitL();
-
-    CleanupStack::PopAndDestroy( store );
-    }
-
-/* 
------------------------------------------------------------------------------
-    CMmsHandler::SendMessageL()
-    Sends the message.
-    Return values: ETrue or EFalse
------------------------------------------------------------------------------
-*/
-TBool CMmsHandler::SendMessageL()
-    {
-
-    // Start sending the message via the Server MTM to the MMS server
-    CMsvOperationWait* wait = CMsvOperationWait::NewLC();
-    wait->iStatus = KRequestPending;
-    CMsvOperation* op = NULL;
-       op = iMmsMtm->SendL( wait->iStatus );
-    wait->Start();
-    CleanupStack::PushL( op );
-    CActiveScheduler::Start();
-
-    // The following is to ignore the completion of other active objects. It is not
-    // needed if the app has a command absorbing control.
-    while( wait->iStatus == KRequestPending )
-        {
-        CActiveScheduler::Start();
-        }
-
-    iManager.HandleStatus( wait->iStatus.Int() );
-    CleanupStack::PopAndDestroy(2); // op, wait
-    
-    return ETrue;
-    }
-// End of File
--- a/loadgen/engine/src/loadgen_netconn.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +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 FILES
-#include "loadgen_netconn.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-
-#include <e32math.h>
-#include <commdb.h>
-
-_LIT(KThreadName, "NetConn %d");
-
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CNetConn* CNetConn::NewL(TNetConnAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CNetConn* self = new(ELeave) CNetConn(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CNetConn::~CNetConn()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CNetConn::CNetConn(TNetConnAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CNetConn::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadNetConn;
-
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-    
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, 1024*KMinHeapSize, 16*1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CNetConn::ThreadFunction(TAny* aThreadArg)
-    {
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad(*((TNetConnAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-    
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CNetConn::GenerateLoad(TNetConnAttributes& aAttributes)
-    {
-    CNetConnManager* netConnManager = NULL;
-    TRAPD(err, netConnManager = CNetConnManager::NewL(aAttributes));
-    if (err == KErrNone) CActiveScheduler::Start();
-    delete netConnManager;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CNetConn::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CNetConn::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CNetConn::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CNetConn::Close()
-    {
-    CLoadBase::Close();
-
-    if (iThread.ExitReason() == 0) // check if the thread is still alive
-        {
-        // signal the thread that it needs to close
-        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
-
-        // wait the thread to die
-        TRequestStatus waiter;
-        iThread.Logon(waiter);
-        User::WaitForRequest(waiter);
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CNetConn::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-    
-    _LIT(KNetConnEntry, "[%d] NetConn prio=%S dest=%S idle=%dms random=%d%%");
-    buf.Format(KNetConnEntry, iAttributes.iId, &prioBuf, &iAttributes.iDestination, iAttributes.iIdle, iAttributes.iRandomVariance);
-   
-    return TPtrC(buf);
-    }
-                   
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CNetConnManager* CNetConnManager::NewL(TNetConnAttributes& aAttributes)
-    {
-    CNetConnManager* self = new(ELeave) CNetConnManager(aAttributes);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CNetConnManager::CNetConnManager(TNetConnAttributes& aAttributes) :
-    CActive(EPriorityStandard), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CNetConnManager::~CNetConnManager()
-    {
-    Cancel();
-
-    delete iHTTPReceiver;
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CNetConnManager::ConstructL()
-    {
-    CActiveScheduler::Add(this);
-    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-    
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    
-    iHTTPReceiver = CHTTPReceiver::NewL( *this );
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CNetConnManager::RunL()
-    {
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CNetConnManager::DoCancel()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CNetConnManager::PeriodicTimerCallBack(TAny* aAny)
-    {
-    CNetConnManager* self = static_cast<CNetConnManager*>( aAny );
-
-    self->iPeriodicTimer->Cancel();
-    TRAPD(err,self->StartDownloadL());
-
-    return err;
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CNetConnManager::StartDownloadL()
-    {
-
-    // create new download    
-    TBuf8<256> url;
-    url.Copy(iAttributes.iDestination);
-    
-    iHTTPReceiver->SendHTTPGetL( url );
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CNetConnManager::HTTPFileReceived( TInt aStatus )
-    {
-    switch ( aStatus )
-        {
-        case 200:
-            {
-            // assume that the download has finished in this stage
-            iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iIdle, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-            break;
-            }
-
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-// End of File
--- a/loadgen/engine/src/loadgen_phonecall.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,353 +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 FILES
-#include "loadgen_phonecall.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-
-#include <e32math.h>
-
-_LIT(KThreadName, "PhoneCall %d");
-
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CPhoneCall* CPhoneCall::NewL(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CPhoneCall* self = new(ELeave) CPhoneCall(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPhoneCall::~CPhoneCall()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPhoneCall::CPhoneCall(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCall::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadPhoneCall;
-    
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-    
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CPhoneCall::ThreadFunction(TAny* aThreadArg)
-    {
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad(*((TPhoneCallAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-    
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCall::GenerateLoad(TPhoneCallAttributes& aAttributes)
-    {
-    CPhoneCallManager* phoneCallManager = NULL;
-    TRAPD(err, phoneCallManager = CPhoneCallManager::NewL(aAttributes));
-    if (err == KErrNone) CActiveScheduler::Start();
-    delete phoneCallManager;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCall::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCall::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCall::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCall::Close()
-    {
-    CLoadBase::Close();
-
-    if (iThread.ExitReason() == 0) // check if the thread is still alive
-        {
-        // signal the thread that it needs to close
-        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
-
-        // wait the thread to die
-        TRequestStatus waiter;
-        iThread.Logon(waiter);
-        User::WaitForRequest(waiter);
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CPhoneCall::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-    
-    _LIT(KPhoneCallEntry, "[%d] PhoneCall prio=%S dest=%S length=%dms idle=%dms random=%d%%");
-    buf.Format(KPhoneCallEntry, iAttributes.iId, &prioBuf, &iAttributes.iDestination, iAttributes.iLength, iAttributes.iIdle, iAttributes.iRandomVariance);
-   
-    return TPtrC(buf);
-    }               
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CPhoneCallManager* CPhoneCallManager::NewL(TPhoneCallAttributes& aAttributes)
-    {
-    CPhoneCallManager* self = new(ELeave) CPhoneCallManager(aAttributes);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPhoneCallManager::CPhoneCallManager(TPhoneCallAttributes& aAttributes) :
-    CActive(EPriorityStandard), iAttributes(aAttributes), iState(EStateIdle)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CPhoneCallManager::~CPhoneCallManager()
-    {
-    Cancel();
-    
-    if (iPeriodicTimer)
-        {
-        iPeriodicTimer->Cancel();
-        delete iPeriodicTimer;
-        }
-        
-    delete iDialer;
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CPhoneCallManager::ConstructL()
-    {
-    CActiveScheduler::Add(this);
-    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-    
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-
-    // init dialer ao
-    iDialer = CDialer::NewL(*this);
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CPhoneCallManager::RunL()
-    {
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CPhoneCallManager::DoCancel()
-    {
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TInt CPhoneCallManager::PeriodicTimerCallBack(TAny* aAny)
-    {
-    CPhoneCallManager* self = static_cast<CPhoneCallManager*>( aAny );
-
-    self->iPeriodicTimer->Cancel();
-    self->HandleCalls();
-
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCallManager::HandleCalls()
-    {
-    if (iState == EStateIdle)
-        {
-        // make a new call
-        iState = EStateCall;
-        iDialer->Dial(iAttributes.iDestination);
-        }
-    
-    else if (iState == EStateCall)
-        {
-        // hangup existing call
-        iState = EStateIdle;
-        iDialer->Hangup();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhoneCallManager::HandleStatus(TInt /*aErr*/)
-    {
-    // call timer after wait
-    if (iState == EStateCall)
-        {
-        iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iLength, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-        }
-
-    else if (iState == EStateIdle)
-        {
-        iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iIdle, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-        }        
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CDialer* CDialer::NewL(CPhoneCallManager& aManager)
-    {
-    CDialer* self = new(ELeave) CDialer(aManager);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CDialer::CDialer(CPhoneCallManager& aManager) :
-    CActive(EPriorityStandard), iManager(aManager), iCallParamsPckg(iCallParams)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CDialer::~CDialer()
-    {
-    Cancel();
-    delete iTelephony;
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CDialer::ConstructL()
-    {
-    CActiveScheduler::Add(this);
-    
-    // init telephony object
-    iTelephony = CTelephony::NewL();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CDialer::RunL()
-    {
-    // notify the observer that status has changed
-    iManager.HandleStatus(iStatus.Int());
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CDialer::DoCancel()
-    {
-    iTelephony->CancelAsync(CTelephony::EDialNewCallCancel);
-    iTelephony->CancelAsync(CTelephony::EHangupCancel);
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-void CDialer::Dial(const TDesC& aDestination)
-    {
-    CTelephony::TTelNumber telNumber(aDestination);
-    iCallParams.iIdRestrict = CTelephony::ESendMyId;
-    iTelephony->DialNewCall(iStatus, iCallParamsPckg, telNumber, iCallId);
-    SetActive();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CDialer::Hangup()
-    {
-    iTelephony->Hangup(iStatus, iCallId);
-    SetActive();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-    
-
-// End of File
--- a/loadgen/engine/src/loadgen_photocapture.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,389 +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 FILES
-#include "loadgen_photocapture.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include "loadgen_traces.h"
-#include <loadgen.rsg>
-#include <e32hal.h>
-#include <u32hal.h>
-#include <e32math.h>
-#include <eikenv.h>
-
-_LIT(KThreadName, "PhotoCapture %d");
-
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-
-//TInt CPhotoCapture::iImagesReady = 0;
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CPhotoCapture* CPhotoCapture::NewL(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CPhotoCapture* self = new(ELeave) CPhotoCapture(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPhotoCapture::~CPhotoCapture()
-    {    
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPhotoCapture::CPhotoCapture(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {    
-    iAttributes.iId = aReferenceNumber;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhotoCapture::ConstructL()
-    {    
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadPhotoCaptures;
-    
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-    
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CPhotoCapture::ThreadFunction(TAny* aThreadArg)
-    {
-    TInt err = KErrNone;
-    
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad(*((TPhotoCaptureAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-    
-    return err;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhotoCapture::GenerateLoad(TPhotoCaptureAttributes& aAttributes)
-    {    
-    CCameraManager* cameraManager = 0;
-    TRAPD(err, cameraManager = CCameraManager::NewL(aAttributes));
-    if (err == KErrNone) CActiveScheduler::Start();
-    delete cameraManager;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhotoCapture::Resume()
-    {    
-    CLoadBase::Resume();    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhotoCapture::Suspend()
-    {    
-    CLoadBase::Suspend();    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPhotoCapture::SetPriority()
-    {    
-    CLoadBase::SetPriority();    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CPhotoCapture::Close()
-    {    
-    CLoadBase::Close();
-
-    // kill the thread immediately
-    iThread.Kill(0);   
-
-    iThread.Close();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CPhotoCapture::Description()
-    {    
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-        
-    _LIT(KPhotoCaptureEntry, "[%d] PhotoCapture camera=%d prio=%S idle=%dms random=%d%%");
-    buf.Format(KPhotoCaptureEntry, iAttributes.iId, iAttributes.iCamera, &prioBuf, iAttributes.iIdle, iAttributes.iRandomVariance);
-       
-    return TPtrC(buf);
-    }               
-
-// --------------------------------------------------------------------------------------------
-
-
-// --------------------------------------------------------------------------------------------
-CCameraManager* CCameraManager::NewL(TPhotoCaptureAttributes& aAttrs)
-    {
-    CCameraManager* self = new (ELeave) CCameraManager(aAttrs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
- 
-// --------------------------------------------------------------------------------------------
-CCameraManager::~CCameraManager()
-    {    
-    delete iCamera;
-    if (iPeriodicTimer)
-        {
-        iPeriodicTimer->Cancel();
-        delete iPeriodicTimer;
-        }
-    }
- 
-// --------------------------------------------------------------------------------------------
-CCameraManager::CCameraManager(TPhotoCaptureAttributes& aAttrs) 
-: 
-CActive(EPriorityStandard),
-iAttributes(aAttrs)
-    {        
-    iState = ENotReady;
-    iNumOfPics = 0;
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CCameraManager::ConstructL()
-    {   
-    CActiveScheduler::Add(this);    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-        
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-
-// --------------------------------------------------------------------------------------------
-void CCameraManager::DoCancel()
-    {    
-    }
-
-// --------------------------------------------------------------------------------------------
-void CCameraManager::RunL()
-    {    
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CCameraManager::ReserveCameraL()
-    {
-    LOGSTRING2("LoadGen: CCameraManager::ReserveCameraL() - Using Camera %d", iAttributes.iCamera);
-    if( iCamera )
-        {
-        iCamera->Release();
-        }
-    delete iCamera;
-    iCamera = 0;
-    TRAPD( err, iCamera = CCamera::NewL(*this, iAttributes.iCamera));
-    iCurrentCamera = iAttributes.iCamera;
-    if(err != KErrNone)
-        {
-        LOGSTRING2("LoadGen: CCamera::NewL leaves with error: %d", err);
-        User::Leave(err);
-        }
-    iCamera->CameraInfo(iCameraInfo);
-    iCamera->Reserve();    
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CCameraManager::ReserveComplete(TInt aError)
-    {
-    if( aError != KErrNone )
-        LOGSTRING2("LoadGen: CCameraManager::ReserveComplete() - Error: %d", aError);
-    
-    if( aError == KErrNone )
-        {
-        iState = ECameraReserved;
-        iCamera->PowerOn();
-        }
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CCameraManager::PowerOnComplete(TInt aError)
-    {
-    if( aError != KErrNone )
-        {
-        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - Error: %d", aError);
-        return;
-        }
-
-    // Define image format, try JPEG images first:
-    CCamera::TFormat format = CCamera::EFormatExif;
-
-    if(iCameraInfo.iImageFormatsSupported & CCamera::EFormatExif)
-        {
-        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - EXIF JPEG supported");
-        format = CCamera::EFormatExif;
-        }
-    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatJpeg )
-        {
-        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - JFIF JPEG supported");
-        format = CCamera::EFormatJpeg;
-        }
-    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor4K )
-        {
-        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - Bitmap 4K Color supported");
-        format = CCamera::EFormatFbsBitmapColor4K;
-        }
-    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor64K )
-        {
-        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - Bitmap 64K Color supported");
-        format = CCamera::EFormatFbsBitmapColor64K;
-        }
-    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor16M )
-        {
-        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - Bitmap 16M Color supported");
-        format = CCamera::EFormatFbsBitmapColor16M;
-        }
-    else
-        {
-        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - JPEGs not supported, trying \"User defined\" (Supported formats: %d)", iCameraInfo.iImageFormatsSupported);
-        format = CCamera::EFormatUserDefined;
-        }
-    const TInt KImageSizeIndex = 0;  // Largest image size
-    TRAPD( err, iCamera->PrepareImageCaptureL(format, KImageSizeIndex));
-    if( err != KErrNone )
-        {
-        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - Error while preparing camera: %d", err);        
-        }
-    // Camera ready:
-    iState = EIdle;
-    // Take photo:
-    TRAP(err, CapturePhotoL());
-    if( err != KErrNone )
-        {
-        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - Photo capture error: %d", err);
-        }
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CCameraManager::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-void CCameraManager::ImageReady(CFbsBitmap* aBitmap, HBufC8* aData, TInt aError)
-    {    
-    if( aError != KErrNone )
-        {
-        LOGSTRING2("LoadGen: CCameraManager::ImageReady() - Error: %d", aError);
-        }    
-    else
-        {
-        iNumOfPics++;    
-        LOGSTRING2("LoadGen: CCameraManager::ImageReady() - Images successfully captured: %d", iNumOfPics);
-        }
-    delete aBitmap;
-    delete aData;
-    iState = EIdle;
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CCameraManager::FrameBufferReady(MFrameBuffer* /*aFrameBuffer*/, TInt aError)
-    {
-    if( aError != KErrNone )
-        LOGSTRING2("LoadGen: CCameraManager::FrameBufferReady() - Error: %d", aError);
-    }
- 
-// --------------------------------------------------------------------------------------------
-void CCameraManager::CapturePhotoL()
-    {    
-    // Camera Manager must be in idle state when taking a photo
-    if( iState == ENotReady )
-        {
-        // Not ready, camera must be reserved:
-        ReserveCameraL();
-        }
-    else if (iState == EIdle)
-        {
-        if( iCurrentCamera != iAttributes.iCamera )
-            {
-            LOGSTRING3("LoadGen: CCameraManager::CapturePhotoL() - Switching from Camera %d to Camera %d", iCurrentCamera, iAttributes.iCamera);
-            ReserveCameraL();
-            }
-        else
-            {
-            iState = ECapture;
-            if( iCameraInfo.iFlashModesSupported & CCamera::EFlashForced)
-                {
-                iCamera->SetFlashL(CCamera::EFlashForced);
-                }
-            iCamera->CaptureImage();
-            iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
-                iAttributes.iRandomVariance ), KDefaultPeriod, 
-                TCallBack( PeriodicTimerCallBack, this ) );
-            }
-        }
-    else
-        {
-        iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
-                                    iAttributes.iRandomVariance ), KDefaultPeriod, 
-                                    TCallBack( PeriodicTimerCallBack, this ) );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CCameraManager::PeriodicTimerCallBack(TAny* aAny)
-    {
-    CCameraManager* self = static_cast<CCameraManager*>( aAny );
-    self->iPeriodicTimer->Cancel();
-    TRAP_IGNORE(self->CapturePhotoL());   
-    return KErrNone;
-    }
-
-// End of File
--- a/loadgen/engine/src/loadgen_pointerevent.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +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 FILES
-#include "loadgen_pointerevent.h"
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-
-#include <e32math.h>
-
-_LIT(KThreadName, "PointerEvent %d");
-
-const TInt KDefaultStart = 50;
-const TInt KDefaultPeriod = 5000000;
-    
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CPointerEvent* CPointerEvent::NewL(TPointerEventAttributes& aAttributes, TInt aReferenceNumber)
-    {
-    CPointerEvent* self = new(ELeave) CPointerEvent(aAttributes, aReferenceNumber);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPointerEvent::~CPointerEvent()
-    {
-    Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPointerEvent::CPointerEvent(TPointerEventAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
-    {
-    iAttributes.iId = aReferenceNumber;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPointerEvent::ConstructL()
-    {
-    CLoadBase::ConstructL();
-    
-    iType = ELoadGenCmdNewLoadPointerEvent;
-    
-    TBuf<64> threadName;
-    threadName.Format(KThreadName, iAttributes.iId);
-    
-    // create a thread
-    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
-    
-    // set priority of the thread
-    SetPriority();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CPointerEvent::ThreadFunction(TAny* aThreadArg)
-    {
-    CTrapCleanup* pC = CTrapCleanup::New();
-    CActiveScheduler* pS = new CActiveScheduler;
-    CActiveScheduler::Install(pS);
-
-    // start generating load, pass pointer to arguments
-    GenerateLoad(*((TPointerEventAttributes*) aThreadArg));
-
-    delete pS;
-    delete pC;
-    
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPointerEvent::GenerateLoad(TPointerEventAttributes& aAttributes)
-    {
-    CPointerEventManager* pointerEventManager = NULL;
-    TRAPD(err, pointerEventManager = CPointerEventManager::NewL(aAttributes));
-    if (err == KErrNone) CActiveScheduler::Start();
-    delete pointerEventManager;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPointerEvent::Resume()
-    {
-    CLoadBase::Resume();
-    
-    iThread.Resume();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPointerEvent::Suspend()
-    {
-    CLoadBase::Suspend();
-    
-    iThread.Suspend();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CPointerEvent::SetPriority()
-    {
-    CLoadBase::SetPriority();
-    
-    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CPointerEvent::Close()
-    {
-    CLoadBase::Close();
-    
-    if (iThread.ExitReason() == 0) // check if the thread is still alive
-        {
-        // signal the thread that it needs to close
-        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
-
-        // wait the thread to die
-        TRequestStatus waiter;
-        iThread.Logon(waiter);
-        User::WaitForRequest(waiter);
-        iThread.Close();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TPtrC CPointerEvent::Description()
-    {
-    TBuf<256> buf;
-    TBuf<16> prioBuf;
-    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
-    
-    _LIT(KPointerEventEntry, "[%d] PointerEvent prio=%S heartbeat=%dms random=%d%%");
-    buf.Format(KPointerEventEntry, iAttributes.iId, &prioBuf, iAttributes.iHeartBeat, iAttributes.iRandomVariance);
-   
-    return TPtrC(buf);
-    }               
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CPointerEventManager* CPointerEventManager::NewL(TPointerEventAttributes& aAttributes)
-    {
-    CPointerEventManager* self = new(ELeave) CPointerEventManager(aAttributes);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CPointerEventManager::CPointerEventManager(TPointerEventAttributes& aAttributes) :
-    CActive(EPriorityStandard), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-CPointerEventManager::~CPointerEventManager()
-    {
-    Cancel();    
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CPointerEventManager::ConstructL()
-    {
-    CActiveScheduler::Add(this);
-    
-    // set the status as pending
-    iStatus = KRequestPending;
-    SetActive();
-    
-    // set the death status pointer point to the request status of this ao
-    iAttributes.iDeathStatus = &iStatus;
-    
-    // init    
-    
-    // start timer    
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CPointerEventManager::RunL()
-    {
-    // request status has completed by the main thread meaning that we need to stop now
-    CActiveScheduler::Stop();
-    }
-
-// --------------------------------------------------------------------------------------------
- 
-void CPointerEventManager::DoCancel()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CPointerEventManager::PeriodicTimerCallBack(TAny* aAny)
-    {
-    CPointerEventManager* self = static_cast<CPointerEventManager*>( aAny );
-
-    self->iPeriodicTimer->Cancel();
-    self->SimulatePointerEvent();
-
-    return KErrNone;
-    }
-    
-// --------------------------------------------------------------------------------------------
- 
-void CPointerEventManager::SimulatePointerEvent()
-    {
-    // Check the screen size and select pointer event position
-    // randomly
-    TSize screenSize = CLoadGenUtils::ScreenSize();
-        
-    TInt x1 = CLoadGenUtils::RandomNumber(0, screenSize.iWidth);
-    TInt y1 = CLoadGenUtils::RandomNumber(0, screenSize.iHeight);
-    
-    // Generate "Pointer down" event:
-    TRawEvent eventPointerDown;    
-    eventPointerDown.Set(TRawEvent::EButton1Down, x1, y1);
-    UserSvr::AddEvent(eventPointerDown);
-    
-    // Get new random position for "Move pointer" and 
-    // "Pointer up" events
-    TInt x2 = CLoadGenUtils::RandomNumber(0, screenSize.iWidth);
-    TInt y2 = CLoadGenUtils::RandomNumber(0, screenSize.iHeight);
-    
-    // Generate "Move pointer" event:
-    TRawEvent eventMovePointer;
-    eventMovePointer.Set(TRawEvent::EPointerMove, x2, y2);
-    UserSvr::AddEvent(eventMovePointer);
-    
-    // Generate "Pointer up" event:
-    TRawEvent eventPointerUp;
-    eventPointerUp.Set(TRawEvent::EButton1Up, x2, y2);
-    UserSvr::AddEvent(eventPointerUp);
-    
-    // call timer
-    iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iHeartBeat, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-// End of File
--- a/loadgen/engine/src/loadgen_utils.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +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 FILES
-#include <e32math.h> 
-#include <u32hal.h>
-#include <hal.h> 
-
-#include "loadgen_utils.h"
-#include "loadgen.hrh"
-
-inline TInt64 INIT_SEED()
-{
-    TTime now; 
-    now.HomeTime(); 
-    return now.Int64();
-}
-
-TInt64 CLoadGenUtils::iRandomNumberSeed = INIT_SEED();
-
-TThreadPriority CLoadGenUtils::SettingItemToThreadPriority(TInt aIndex)
-    {
-    TThreadPriority threadPriority = EPriorityNull;
-    
-    switch ( aIndex )
-        {
-        case EThreadPriorityTypeMuchLess:
-            {
-            threadPriority = EPriorityMuchLess; break;
-            }
-        case EThreadPriorityTypeLess:
-            {
-            threadPriority = EPriorityLess; break;
-            }
-        case EThreadPriorityTypeNormal:
-            {
-            threadPriority = EPriorityNormal; break;
-            }
-        case EThreadPriorityTypeMore:
-            {
-            threadPriority = EPriorityMore; break;
-            }
-        case EThreadPriorityTypeMuchMore:
-            {
-            threadPriority = EPriorityMuchMore; break;
-            }
-        case EThreadPriorityTypeRealTime:
-            {
-            threadPriority = EPriorityRealTime; break;
-            }
-        case EThreadPriorityTypeAbsoluteVeryLow:
-            {
-            threadPriority = EPriorityAbsoluteVeryLow; break;
-            }
-        case EThreadPriorityTypeAbsoluteLow:
-            {
-            threadPriority = EPriorityAbsoluteLow; break;
-            }
-        case EThreadPriorityTypeAbsoluteBackground:
-            {
-            threadPriority = EPriorityAbsoluteBackground; break;
-            }
-        case EThreadPriorityTypeAbsoluteForeground:
-            {
-            threadPriority = EPriorityAbsoluteForeground; break;
-            }
-        case EThreadPriorityTypeAbsoluteHigh:
-            {
-            threadPriority = EPriorityAbsoluteHigh; break;
-            }
-
-        default:
-            {
-            User::Panic(_L("Wrong tp index"), 276);
-            break;
-            }
-        }
-
-    return threadPriority;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenUtils::SettingItemToThreadDescription(TInt aIndex, TDes& aBuf)
-    {
-    switch ( aIndex )
-        {
-        case EThreadPriorityTypeMuchLess:
-            {
-            aBuf.Append(_L("ML(-20)")); break;
-            }
-        case EThreadPriorityTypeLess:
-            {
-            aBuf.Append(_L("L(-10)")); break;
-            }
-        case EThreadPriorityTypeNormal:
-            {
-            aBuf.Append(_L("NO(0)")); break;
-            }
-        case EThreadPriorityTypeMore:
-            {
-            aBuf.Append(_L("M(10)")); break;
-            }
-        case EThreadPriorityTypeMuchMore:
-            {
-            aBuf.Append(_L("MM(20)")); break;
-            }
-        case EThreadPriorityTypeRealTime:
-            {
-            aBuf.Append(_L("RL(30)")); break;
-            }
-        case EThreadPriorityTypeAbsoluteVeryLow:
-            {
-            aBuf.Append(_L("AVL(100)")); break;
-            }
-        case EThreadPriorityTypeAbsoluteLow:
-            {
-            aBuf.Append(_L("AL(200)")); break;
-            }
-        case EThreadPriorityTypeAbsoluteBackground:
-            {
-            aBuf.Append(_L("ABG(300)")); break;
-            }
-        case EThreadPriorityTypeAbsoluteForeground:
-            {
-            aBuf.Append(_L("AFG(400)")); break;
-            }
-        case EThreadPriorityTypeAbsoluteHigh:
-            {
-            aBuf.Append(_L("AH(500)")); break;
-            }
-
-        default:
-            {
-            User::Panic(_L("Wrong td index"), 277);
-            break;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenUtils::SettingItemToSourceDescription(TInt aIndex, TDes& aBuf)
-    {
-    switch ( aIndex )
-        {
-        case EMemoryEatSourceTypeRAM:
-            {
-            aBuf.Append(_L("RAM")); break;
-            }
-        case EMemoryEatSourceTypeDriveC:
-            {
-            aBuf.Append(_L("C:")); break;
-            }
-        case EMemoryEatSourceTypeDriveD:
-            {
-            aBuf.Append(_L("D:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveE:
-            {
-            aBuf.Append(_L("E:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveF:
-            {
-            aBuf.Append(_L("F:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveG:
-            {
-            aBuf.Append(_L("G:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveH:
-            {
-            aBuf.Append(_L("H:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveI:
-            {
-            aBuf.Append(_L("I:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveJ:
-            {
-            aBuf.Append(_L("J:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveK:
-            {
-            aBuf.Append(_L("K:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveL:
-            {
-            aBuf.Append(_L("L:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveM:
-            {
-            aBuf.Append(_L("M:")); break;
-            }            
-        case EMemoryEatSourceTypeDriveN:
-            {
-            aBuf.Append(_L("N:")); break;
-            }            
-
-        default:
-            {
-            User::Panic(_L("Wrong src index"), 278);
-            break;
-            }
-        }
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TInt CLoadGenUtils::MilliSecondsToMicroSeconds(TInt aMilliSeconds, TInt aRandomVariance)
-    {
-    __ASSERT_ALWAYS(aRandomVariance >= 0 && aRandomVariance <= 100, User::Panic(_L("Inv.var."), 180));
-    __ASSERT_ALWAYS(aMilliSeconds >=0, User::Panic(_L("Inv.ms."), 181));
-    
-    // if no variance defined, just do a quick conversion
-    if (aRandomVariance == 0 || aMilliSeconds == 0)
-        return aMilliSeconds * 1000;
-    
-    // otherwise calculate difference
-    TInt diff = 1000 * aMilliSeconds / 2 * aRandomVariance / 100;  
-    
-    return RandomNumber(aMilliSeconds*1000-diff, aMilliSeconds*1000+diff);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CLoadGenUtils::RandomNumber(TInt aMin, TInt aMax)
-    {
-    TInt range = (aMax > aMin ? aMax - aMin : aMin - aMax) + 1;
-    TInt random = (TInt) (range * Math::FRand(iRandomNumberSeed));
-    
-    random = (random % range) + aMin;
-
-    if (random > aMax)
-        random = aMax;
-    else if (random < aMin)
-        random = aMin;
-    
-    return random;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TSize CLoadGenUtils::ScreenSize()
-    {    
-    TInt x = 0;
-    TInt y = 0;
-    HAL::Get(HALData::EDisplayXPixels, x);
-    HAL::Get(HALData::EDisplayYPixels, y);
-    return TSize(x, y);
-    }
--- a/loadgen/envpatcher/EnvPatcher.pl	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,498 +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: 
-# Environment Patcher - Patches older S60 SDKs for supporting
-# tricks in newer platforms
-#
-
-
-require v5.6.1;	
-
-use File::Copy;
-use strict;
-
-# check amount of commandline options is valid
-if (@ARGV != 1)
-{
-    print "Usage: EnvPatcher <EPOCROOT>\n";
-    exit 1;
-}
-
-
-# get epocroot and convert, convert \ -> /
-(my $epocroot = $ARGV[0]) =~ s{\\}{/}g;
-
-# remove any trailing forward slashes
-$epocroot =~ s/\/$//;
-
-
-# create variables for paths
-my $e32toolsdir = $epocroot."/epoc32/tools";
-my $e32includedir = $epocroot."/epoc32/include";
-my $e32includeoemdir = $e32includedir."/oem";
-my $platformpathspath = $e32includedir."/platform_paths.hrh";
-my $domainplatformpathspath = $e32includedir."/domain/osextensions/platform_paths.hrh";
-my $mmppmpath = $e32toolsdir."/mmp.pm";
-my $pathutlpmpath = $e32toolsdir."/pathutl.pm";
-my $prepfilepmpath = $e32toolsdir."/prepfile.pm";
-
-# variables for hacked content
-my $dependshack = "\t\t\tif (/^DEPENDS\$/o) {\r\n\t\t\t\tnext LINE;  # Ignore DEPENDS keyword, not needed by ABLD\r\n\t\t\t}\r\n";
-my $forwardslashhack = "\t\t# EnvPatcher forwardslash hack begins\r\n\t\t\$_=~s{/}{\\\\}g;   # convert all forward slashes to backslashes\r\n\t\t# EnvPatcher forwardslash hack ends\r\n\r\n";
-my $coreibyexportsupport = "\r\n// Following definition is used for exporting tools and stubs IBY files to\r\n// Core image.\r\n#define CORE_IBY_EXPORT_PATH(path,exported)  /epoc32/rom/include/##exported\r\n";
-
-
-# check epoc32\tools exists
-unless (-d $e32toolsdir)
-{
-    print "$e32toolsdir not found, please check valid epocroot has been given!\n";
-    exit 1;
-}
-
-# check epoc32\include exists
-unless (-d $e32includedir)
-{
-    print "$e32includedir not found, please check valid epocroot has been given!\n";
-    exit 1;
-}
-
-
-# create epoc32\include\oem if it does not exist
-unless (-d $e32includeoemdir)
-{
-    mkdir $e32includeoemdir or die;
-    print "Missing directory $e32includeoemdir created succesfully.\n";
-}
-
-
-# check if epoc32\include\domain\osextensions\platform_paths.hrh exists
-if (-e $domainplatformpathspath)
-{
-    # show an error if the file does not have any platform macros
-    unless (string_exists_in_file($domainplatformpathspath, "OS_LAYER_SYSTEMINCLUDE"))
-    {
-        print "ERROR: $domainplatformpathspath does not have SF macros.\n";
-        print "Please check your environment, if you have S60 3.2 OEM or newer, please get the latest version!\n";
-        exit 2;
-    }
-}
-
-
-# check if epoc32\include\platform_paths.hrh exists
-if (-e $platformpathspath)
-{
-    print "$platformpathspath already exists, not checking it.\n";    
-}
-else
-{
-    # create the file missing file
-    create_default_platform_paths_hrh();
-    print "Missing file $platformpathspath created succesfully.\n";    
-}
-
-
-# check if CORE_IBY_EXPORT_PATH macro exist in the platform_paths.hrh
-unless (string_exists_in_file($platformpathspath, "CORE_IBY_EXPORT_PATH"))
-{
-    # read content of the platform_paths.hrh
-    my @filecontent = read_file_to_array($platformpathspath);  
-
-    my $match_found = 0;
-    my $i = 0;
-    my $match_found_pos = 0;
-    
-    # find the position where the include guards start (this should be a safe position)
-    foreach (@filecontent)
-    {
-        if ($_ =~ /#define PLATFORM_PATHS_HRH/)
-        {
-            $match_found = 1;
-            $match_found_pos = $i;
-            last;
-        } 
-
-        $i++;
-    }
-    
-    if ($match_found)
-    {
-        # insert the patched content to the file
-        splice(@filecontent, $match_found_pos+1, 0, $coreibyexportsupport);
-        
-        # write the modified array to the file
-        write_file_from_array($platformpathspath, @filecontent);
-    
-        print "Platform_paths.hrh updated to support CORE_IBY_EXPORT_PATH macro.\n";
-    }
-    else
-    {
-        print "WARNING: $platformpathspath is corrupted or not supported!\n";    
-    }
-}
- 
-    
-# check if epoc32\tools\mmp.pm exists
-if (-e $mmppmpath)
-{
-    # check if DEPENDS keyword already exists in the file
-    if (string_exists_in_file($mmppmpath, "DEPENDS"))
-    {
-        print "The SDK has already been patched with DEPENDS keyword hack.\n";        
-    }
-    else
-    {
-        # read content of the mmp.pm file
-        my @filecontent = read_file_to_array($mmppmpath);
-        
-        my $match_found = 0;
-        my $i = 0;
-        my $match_found_pos = 0;
-        
-        # loop through the array to find the correct place
-        foreach (@filecontent)
-        {
-            if ($_ =~ /Unrecognised Resource Keyword/)
-            {
-                $match_found = 1;
-                $match_found_pos = $i;
-                last;
-            } 
-
-            $i++;
-        }
-        
-        if ($match_found)
-        {
-            # insert the patched content to the file
-            splice(@filecontent, $match_found_pos-1, 0, $dependshack);
-            
-            # write the modified array to the file
-            write_file_from_array($mmppmpath, @filecontent);
-        
-            print "Mmp.pm patched with DEPENDS keyword hack.\n";
-        }
-        else
-        {
-            print "ERROR: Unable to find correct place from $mmppmpath for patching!\n";
-            print "Your SDK environment probably is not supported by this script!\n";
-            exit(2);    
-        }
-    }
-}
-else
-{
-    print "WARNING: $mmppmpath not found, this environment is not supported!\n";
-}
-
-
-# check if epoc32\tools\pathutl.pm exists
-if (-e $pathutlpmpath)
-{
-    # check if "sub Path_Norm" already exists in the pathutil.pm file
-    # if it does not exists, then we need to patch prepfile.pm
-    if (string_exists_in_file($pathutlpmpath, "sub Path_Norm"))
-    {
-        print "The SDK is non Symbian OS 9.1, no need to add forward slash hack.\n";        
-    }
-    else
-    {
-        # check if prepfile.pm has already been patched
-        if (string_exists_in_file($prepfilepmpath, "EnvPatcher forwardslash hack"))
-        {        
-            print "The SDK has already been patched with forwardslash hack.\n";         
-        }
-        else
-        {    
-            # read content of the prepfile.pm file
-            my @filecontent = read_file_to_array($prepfilepmpath);  
-    
-            my $match_found = 0;
-            my $i = 0;
-            my $match_found_pos = 0;
-            
-            # loop through the array to find the correct place
-            foreach (@filecontent)
-            {
-                if ($_ =~ /# skip blank lines/)
-                {
-                    $match_found = 1;
-                    $match_found_pos = $i;
-                    last;
-                } 
-    
-                $i++;
-            }
-            
-            if ($match_found)
-            {
-                # insert the patched content to the file
-                splice(@filecontent, $match_found_pos+6, 0, $forwardslashhack);
-                
-                # write the modified array to the file
-                write_file_from_array($prepfilepmpath, @filecontent);
-            
-                print "Prepfile.pm patched with forward slash hack.\n";
-            }
-            else
-            {
-                print "ERROR: Unable to find correct place from $prepfilepmpath for patching!\n";
-                print "Your SDK environment probably is not supported by this script!\n";
-                exit(2);    
-            }
-        }
-    }    
-}
-else
-{
-    print "WARNING: $pathutlpmpath not found, this environment is not supported!\n";
-}
- 
- 
- 
-# checks if string exists in the file    
-sub string_exists_in_file
-{
-    my $filepath = $_[0];
-    my $findstring = $_[1];
-    my $match_found = 0;     
-
-    open(FILE, "<", $filepath) or die "Failed to open $filepath for reading!";
-
-    # loop through the file for occurances
-    while (<FILE>)
-    {
-        if ($_ =~ /$findstring/)
-        {
-            $match_found = 1;
-            last;
-        } 
-    }
-
-    close FILE;
-    
-    return $match_found;
-}
-
-
-# reads lines from a file to an array    
-sub read_file_to_array
-{
-    my $filepath = $_[0];
-
-    open(FILE, "<", $filepath) or die "Failed to open $filepath for reading!";
-    my @data = <FILE>;
-    close FILE;
-    
-    return(@data);
-}
-
-
-# writes lines from an array to a file
-sub write_file_from_array
-{
-    my ($filepath, @data) = @_;
-    
-    # take a backup of the file
-    copy ($filepath, $filepath."EnvPatcher") or die "Cannot take backup of $filepath to $filepath.EnvPatcher";
-        
-    open(FILE, ">", $filepath) or die "Failed to open $filepath for writing!";
-
-    # write the array to file
-    foreach my $line (@data)
-    {
-        print FILE "$line";
-    }
-
-    close FILE;
-}
-
-sub create_default_platform_paths_hrh
-{
-    # the file does not exist, so create the missing file
-    open(FILE, ">", $platformpathspath) or die "Failed to open $platformpathspath for writing!\n";
-    
-    print FILE <<ENDOFTHEFILE;
-#ifndef PLATFORM_PATHS_HRH
-#define PLATFORM_PATHS_HRH
-
-/**
-* ---------------------------------------
-* Location, where the applications layer specific public headers should be exported
-* See usage on top of this hrh-file.
-* ---------------------------------------
-*/
-#define APP_LAYER_SDK_EXPORT_PATH(exported) /epoc32/include/##exported
-#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported
-
-/**
-* ---------------------------------------
-* Location, where the applications layer specific platform headers should be exported
-* See usage on top of this hrh-file.
-* ---------------------------------------
-*/
-#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) /epoc32/include/##exported
-#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/##exported
-
-/**
-* ---------------------------------------
-* Location, where the middleware layer specific public headers should be exported
-* See usage on top of this hrh-file.
-* ---------------------------------------
-*/
-#define MW_LAYER_SDK_EXPORT_PATH(exported) /epoc32/include/##exported
-#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported
-
-/**
-* ---------------------------------------
-* Location, where the middleware layer specific platform headers should be exported
-* ---------------------------------------
-*/
-#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) /epoc32/include/##exported
-#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/##exported
-
-/**
-* ---------------------------------------
-* Location, where the os layer specific public headers should be exported
-* ---------------------------------------
-*/
-#define  OSEXT_LAYER_SDK_EXPORT_PATH(exported) /epoc32/include/##exported
-#define  OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported
-
-/**
-* ---------------------------------------
-* Location, where the os specific platform headers should be exported
-* ---------------------------------------
-*/
-#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) /epoc32/include/##exported
-#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/##exported
-
-/**
-* ---------------------------------------
-* Location, where the  cenrep excel sheets should be exported
-* Deprecated: should no longer be used. Kept for compability.
-* ---------------------------------------
-*/
-#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/##exported
-
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be 
-* used in the mmp-files that are part of the applications-layer. It includes all 
-* the needed directories from the /epoc32/include, that are valid ones for the 
-* application-layer components. 
-*
-* Applications layer is the last one in the list, since most likely the most of 
-* the headers come from middleware or os-layer  => thus they are first.
-*/
-#define APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include /epoc32/include/oem
- 
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
-* used in the mmp-files that are part of the middleware-layer. It includes all 
-* the needed directories from the /epoc32/include, that are valid ones for the 
-* middleware-layer components. 
-*/
-#define MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include /epoc32/include/oem
-
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
-* used in the mmp-files that are part of the  osextensions-layer. It includes all
-* the needed directories from the /epoc32/include, that are valid ones for the
-* os-layer components. 
-*/
-#define OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include /epoc32/include/oem
-
-
-// Below statement is Deprecated and the OS_LAYER_SYSTEMINCLUDE-macro has to be
-// used.
-#define OSEXT_LAYER_SYSTEMINCLUDE OS_LAYER_SYSTEMINCLUDE
-
-/**
-* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
-* used in the mmp-files that are part of the os-layer. This is intended 
-* to be only used by those components which need to use in their mmp-file either
-* kern_ext.mmh or nkern_ext.mmh. Reason is that those
-* 2 files already contain the /epoc32/include  as system include path.
-* 
-*/
-#define OS_LAYER_KERNEL_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/oem
-
-
-// Below statement is Deprecated and the OS_LAYER_KERNEL_SYSTEMINCLUDE-macro 
-// has to be used.
-#define OSEXT_LAYER_KERNEL_SYSTEMINCLUDE OS_LAYER_KERNEL_SYSTEMINCLUDE
-
-/**
-****************************************************************************
-* Definitions that also define the paths to the layer specific source directories.
-****************************************************************************
-*/
-/**
-* The below 3 macros define the paths to the layer-specific source dirs.
-* See usage on top of this hrh-file, these are used the same way as 
-* for instance the OS_LAYER_DOMAIN_EXPORT_PATH
-* Deprecated: is not allowed to be using in Symbian Foundation
-*/
-#define APP_LAYER_SOURCE_PATH(rest)    /s60/app/##rest
-#define MW_LAYER_SOURCE_PATH(rest)     /s60/mw/##rest
-#define OSEXT_LAYER_SOURCE_PATH(rest)  /s60/osext/##rest
-
-/**
-****************************************************************************
-* Definitions to export IBY files to different folders where they will be taken 
-* to ROM image
-****************************************************************************
-*/
-// Following definition is used for exporting tools and stubs IBY files to 
-// Core image.
-#define CORE_IBY_EXPORT_PATH(path,exported)  /epoc32/rom/include/##exported
-
-/**
-* ---------------------------------------
-* Macros for Configuration tool migration. 
-* The below macros define the location under epoc32, where the confml 
-* (Configuration Markup Language) and crml (Central Repository Markup Language) 
-* files should be exported.
-* ---------------------------------------
-*/
-#define CONFML_EXPORT_PATH(file,category)           /epoc32/rom/config/confml_data/##category##/##file
-#define CRML_EXPORT_PATH(file,category)             /epoc32/rom/config/confml_data/##category##/##file
-#define GCFML_EXPORT_PATH(file,category)            /epoc32/rom/config/confml_data/##category##/##file
-#define CONFML_CONFIG_EXPORT_PATH(file,category)    /epoc32/rom/config/confml_data/##category##/config/##file
-
-#define APP_LAYER_CONFML(exported) 	                CONFML_EXPORT_PATH(exported,s60)
-#define APP_LAYER_CRML(exported)                    CRML_EXPORT_PATH(exported,s60)
-#define APP_LAYER_GCFML(exported)                   GCFML_EXPORT_PATH(exported,s60)
-#define APP_LAYER_CONFML_CONFIG(exported)           CONFML_CONFIG_EXPORT_PATH(exported,s60)
-                                                    
-#define MW_LAYER_CONFML(exported)                   CONFML_EXPORT_PATH(exported,s60)
-#define MW_LAYER_CRML(exported)                     CRML_EXPORT_PATH(exported,s60)
-#define MW_LAYER_GCFML(exported)                    GCFML_EXPORT_PATH(exported,s60)
-#define MW_LAYER_CONFML_CONFIG(exported)            CONFML_CONFIG_EXPORT_PATH(exported,s60)
-       
-// Deprecate: Use the OS_LAYER_* macros instead of OSEXT_LAYER_*                                             
-#define OSEXT_LAYER_CONFML(exported)                CONFML_EXPORT_PATH(exported,s60)
-#define OSEXT_LAYER_CRML(exported)                  CRML_EXPORT_PATH(exported,s60)
-#define OSEXT_LAYER_GCFML(exported)                 GCFML_EXPORT_PATH(exported,s60)
-#define OSEXT_LAYER_CONFML_CONFIG(exported)         CONFML_CONFIG_EXPORT_PATH(exported,s60)
-#define OS_LAYER_CONFML(exported)                   CONFML_EXPORT_PATH(exported,s60)
-#define OS_LAYER_CRML(exported)                     CRML_EXPORT_PATH(exported,s60)
-#define OS_LAYER_GCFML(exported)                    GCFML_EXPORT_PATH(exported,s60)
-#define OS_LAYER_CONFML_CONFIG(exported)            CONFML_CONFIG_EXPORT_PATH(exported,s60)
-
-#endif  // end of PLATFORM_PATHS_HRH
-
-ENDOFTHEFILE
-
-    close FILE;    
-}
--- a/loadgen/envpatcher/ReadMe.txt	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-Environment Patcher
-===================
-
-Updated: 9th January 2009
-
-
-Introduction:
--------------
-This tool can be used to patch your S60 SDK environment so that the tricks and
-macros introduced in the latest SDKs can be used in a public SDK and older
-OEM releases.
-
-This tool can perform the following tasks:
-- Adds support for forward slashes in paths in bld.inf/.mmp files in S60 3.0 
-- Removes an unncessary warning about DEPENDS resource keyword in an .mmp file
-- Creates a missing epoc32\include\platform_paths.hrh file for supporting
-  platform macros introduced since S60 3.2 OEM and Symbian Foundation releases
-- Modifies epoc32\include\platform_paths.hrh for missing macros   
-- Creates a missing epoc32\include\oem directory to suppress a possible warning
-
-
-Usage:
-------
-EnvPatcher.pl <EPOCROOT>
-
-Where EPOCROOT is the path to the root of the SDK, for example:
-  EnvPatcher.pl c:\Symbian\9.1\S60_3rd_MR
-  EnvPatcher.pl z:\
-
-
-Requirements:
--------------
-- S60 SDK (public or OEM), version 3.0 or newer
-- Perl 5.6.1 or newer
-
-
-
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights
-reserved.
-
-This material, including documentation and any related computer programs, is
-protected by copyright controlled by Nokia. All rights are reserved. Copying,
-including reproducing, storing, adapting or translating, any or all of this
-material requires the prior written consent of Nokia. This material also
-contains confidential information which may not be disclosed to others without
-the prior written consent of Nokia.
--- a/loadgen/group/ReleaseNotes_LoadGen.txt	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-===============================================================================
-
-RELEASE NOTES - LOAD GENERATOR v1.5.0
-RELEASED 23rd April 2010
-
-SUPPORTS S60 3.0+
-
-===============================================================================
-
-Product Description:
-====================
-LoadGen is an S60 UI application that provides an easy way to generate load
-into a device. You can use LoadGen to simulate the behavior and possible
-problems of a device when put under a heavy load in actual usage scenarios. 
-
-Main Features:
-==============
-- Load types: 
-  - CPU load (yielding or blocking)
-  - Memory eat (RAM and disks)
-  - Phone calls
-  - Network connection
-  - Key press
-  - SMS and MMS sending
-  - Launching applications
-  - Photo captures
-  - Bluetooth device discovery
-  - Touch UI pointer events
-- Each load type can be executed periodically (that is, idle time can be
-  applied after each round)
-- Each started load will be run in a separate thread
-- Each load type can be paused/resumed and stopped
-
-===============================================================================
-
-What's New in v1.5.0
-====================
-- Feature: Orbit UI introduced
-
-
-===============================================================================
-
-Installation Notes:
-===================
-LoadGen is typically preinstalled on ROM. If not, it can be added to the
-ROM with the .iby file. Alternatively, the .sis file can be found under the sis-
-directory, but the user need to sign it with their own developer certificate.
-In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
-internal\sis directory.
-
-When signing with own developer certificate, the following capabilities are
-needed:
-  NetworkServices
-  SwEvent
-  ReadUserData
-  WriteUserData
-
-When builing LoadGen against S60 3.0 or 3.1, you may need to patch your SDK
-environment first with some fixes. For more information, please refer to the
-instructions under the "envpatcher" directory.
-
-===============================================================================
-
-System Requirements:
-====================
-Basic Requirements:
-- Any S60 3.x device or emulator environment
-
-===============================================================================
-
-Compatibility Issues:
-=====================
-N/A
-
-===============================================================================
-
-Known Issues:
-=============
-- Launched applications are not always terminated by LoadGen. This occurs with
-  applications that are waiting for user input.
- 
-===============================================================================
-
-Version History:
-================
-
-Version 1.4.0
-====================
-- Feature: New load: Photo capture.
-- Feature: New load: Bluetooth actions.
-- Feature: New load: Pointer (touch ui) events. 
-
-Version 1.3.0 - 30th June 2009
-==============================
-- Feature: SMP support: CPU can be selected for CPU load.
-
-Version 1.2.1 - 6th March 2009
-==============================
-- Fix: Messages load crashes Load Generator
-
-Version 1.2.0 - 20th February 2009
-==================================
-- Feature: New load: application launch
-- Fix: LoadGen crashes when changing the Type of CPU load
-
-Version 1.1.0 - 12th December 2008
-==================================
-- Feature: SMS and MMS messages can be sent 
-- Fix: It was not possible to eat more memory than 2GB
-
-Version 1.0.1 - 18th March 2008
-===============================
-- Fix: It was possible to edit source type for existing memory eat item
-- Fix: Thread priority was not changed when editing existing item 
-- Fix: Memory eat did not work properly or caused crash in some cases
-- Fix: Editing existing memory eat replaced values with default values
-- Fix: Memory about queries did not have any check for maximum value 
-- Fix: Stopping a crashed load crashed the whole application
-
-
-Version 1.0.0 - 6th March 2008
-------------------------------
-- Initial version
-
-===============================================================================
-
- 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".
-
-
--- a/loadgen/group/backup_registration.xml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration>
-  <passive_backup>
-    <include_directory name="\"/>
-  </passive_backup>
-  <system_backup/>
-  <restore requires_reboot = "no"/>
-</backup_registration>
--- a/loadgen/group/bld.inf	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-// ============================================================================
-// * Makefile for building: group
-// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-17T13:18:03
-// * This file is generated by qmake and should not be modified by the
-// * user.
-// * Project:  group.pro
-// * Template: subdirs
-// ============================================================================
-
-#define BLD_INF_GROUP_037FC092
-
-
-prj_platforms
-
-WINSCW GCCE ARMV5 ARMV6
-#include "bld_generic.inf"
-#include "../ui/avkon/group/bld.inf"
-
-
-prj_mmpfiles
-
-
-prj_extensions
-
-
-#if defined(WINSCW)
-#endif
-
-START EXTENSION qt/qmake_store_build
-END
-
-
--- a/loadgen/group/bld_generic.inf	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-
-PRJ_EXPORTS
-../group/backup_registration.xml    Z:/private/20011384/backup_registration.xml
-
-
-PRJ_MMPFILES
-#if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__S60_32__)
-  gnumakefile loadgen_icons_aif.mk
-  gnumakefile loadgen_extraicons.mk
-
-  #ifdef MARM
-  gnumakefile loadgen_stub_sis.mk
-  #endif
-#endif
-
-
-#if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)
-  PRJ_EXTENSIONS
-  START EXTENSION s60/mifconv
-  OPTION TARGETFILE loadgen_aif.mif
-  OPTION SOURCEDIR ../icons
-  OPTION SOURCES -c8,8 qgn_menu_loadgen
-  END
-
-  START EXTENSION s60/mifconv
-  OPTION TARGETFILE loadgen_extraicons.mif
-  OPTION HEADERFILE loadgen_extraicons.mbg
-  OPTION SOURCEDIR ../icons
-  OPTION SOURCES -c8,8 qgn_prob_status_red -c8,8 qgn_prob_status_green
-  END
-
-  #ifdef MARM
-  START EXTENSION app-services/buildstubsis
-  OPTION SRCDIR ../sis
-  OPTION SISNAME LoadGen_stub
-  END
-  #endif  
-#endif
--- a/loadgen/group/group.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-
-
-TEMPLATE = subdirs
-
-BLD_INF_RULES.prj_platforms += "$${LITERAL_HASH}include \"bld_generic.inf\""
--- a/loadgen/group/loadgen_extraicons.mk	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\loadgen_extraicons.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\loadgen_extraicons.mbg
-
-
-do_nothing :
-	@rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN :
-	@if exist $(ICONTARGETFILENAME) erase $(ICONTARGETFILENAME)
-	@if exist $(HEADERFILENAME) erase $(HEADERFILENAME)
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-RESOURCE : $(ICONTARGETFILENAME)
-
-$(ICONTARGETFILENAME) (HEADERFILENAME) : ..\icons\qgn_prob_status_red.svg ..\icons\qgn_prob_status_green.svg
-	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
-		/c8,8 ..\icons\qgn_prob_status_red.svg \
-		/c8,8 ..\icons\qgn_prob_status_green.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME) && \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/loadgen/group/loadgen_icons_aif.mk	Mon Oct 04 10:09:02 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: 
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\loadgen_aif.mif
-
-
-do_nothing :
-	@rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN :
-	@if exist $(ICONTARGETFILENAME) erase $(ICONTARGETFILENAME)
-	
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-RESOURCE : $(ICONTARGETFILENAME)
-
-$(ICONTARGETFILENAME) : ..\icons\qgn_menu_loadgen.svg
-	mifconv $(ICONTARGETFILENAME) \
-		/c8,8 ..\icons\qgn_menu_loadgen.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/loadgen/group/loadgen_stub_sis.mk	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-
-TARGETDIR=$(EPOCROOT)EPOC32\Data\Z\System\Install
-
-SISNAME=LoadGen_stub
-PKGNAME=LoadGen_stub
-
-$(TARGETDIR) :
-	@perl -S emkdir.pl "$(TARGETDIR)"
-
-do_nothing :
-	rem do_nothing
-
-SISFILE=$(TARGETDIR)\$(SISNAME).sis
-
-$(SISFILE) : ..\sis\$(PKGNAME).pkg
-	makesis -s $? $@ 
-
-
-
-MAKMAKE : do_nothing
-
-RESOURCE : do_nothing
-
-SAVESPACE : do_nothing
-
-BLD : do_nothing
-
-FREEZE : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-FINAL : $(TARGETDIR) $(SISFILE)
-
-CLEAN : 
-	@if exist $(SISFILE) erase $(SISFILE)
-
-RELEASABLES : 
-	@echo $(SISFILE)
--- a/loadgen/icons/qgn_menu_loadgen.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   version="1.0"
-   width="100%"
-   height="100%"
-   viewBox="0 0 88.000488 88.000488"
-   id="svg2384">
-  <defs
-     id="defs2568" />
-  <path
-     d="M 92.562272,40.587092 C 92.562272,40.539915 92.562272,40.492737 92.562272,40.587092 z "
-     style="fill:#deaa87;fill-opacity:1;stroke:none"
-     id="path4589" />
-  <path
-     d="M 59.869601,34.19566 C 61.463087,33.186059 64.570066,32.712826 66.883961,32.335134 C 69.325288,31.936642 71.523774,31.762664 74.044456,31.762664 C 76.43802,31.762664 78.799579,34.270637 80.620419,35.340599 C 81.649767,35.945465 82.958539,39.560266 82.958539,40.77906 C 82.958539,42.460983 81.373013,43.169098 80.620419,44.643229 C 79.961438,45.933997 76.50304,47.39368 75.213515,47.934931 C 74.872539,48.078047 74.531563,48.221165 74.190587,48.364283 C 72.224802,49.189378 70.085492,49.509222 67.90689,49.509222 C 66.640408,49.509222 65.373925,49.509222 64.107444,49.509222 C 63.147628,49.509222 62.494214,49.07987 61.477059,49.07987 C 60.498073,49.07987 59.648418,48.650517 58.554408,48.650517"
-     style="fill:#806600;fill-opacity:1;stroke:none"
-     id="path4603" />
-  <path
-     d="M 58.846672,38.05983 C 58.582814,38.214879 60.464851,36.914891 62.938384,36.914891 C 64.00489,36.914891 64.952424,36.771774 66.007167,36.771774 C 66.649872,36.771774 67.235643,36.485538 68.053021,36.485538 C 68.979759,36.485538 69.831044,36.056186 70.829539,36.056186 C 71.608914,36.056186 72.388287,36.056186 73.16766,36.056186 C 74.014376,36.056186 74.853503,36.003819 75.651913,36.199304 C 76.479983,36.402051 76.745312,36.90981 77.113238,37.630478 C 77.414129,38.219843 77.52268,38.805102 77.697768,39.491003 C 77.858235,40.11963 77.843901,40.723695 77.843901,41.494648 C 77.843901,42.010665 77.202737,42.321165 76.967105,42.782704 C 76.595804,43.509985 76.038323,43.523748 75.213515,43.927643 C 74.425127,44.313704 73.799243,44.166578 73.021527,44.356995 C 72.032407,44.599174 71.384653,44.385805 70.683407,45.072582 C 69.658456,46.076387 67.941862,46.217521 66.591696,46.217521 C 65.706564,46.217521 64.737092,46.360639 63.815178,46.360639 C 63.006586,46.360639 62.208946,46.396718 61.477059,46.217521 C 60.662477,46.018078 59.762202,46.074405 58.992806,46.074405 C 58.034351,46.074405 57.835929,45.94322 57.385348,45.501935 C 57.077939,45.200869 57.239216,43.921154 57.239216,43.355174 C 57.239216,42.651785 57.259075,41.846199 57.385348,41.351529 C 57.563388,40.65406 57.384702,39.922885 57.531481,39.347886 C 57.67107,38.801049 58.246912,38.412262 58.846672,38.05983 z "
-     style="fill:#deaa87;fill-opacity:1;stroke:none"
-     id="path4605" />
-  <path
-     d="M 28.283831,32.335134 C 26.690345,31.325532 23.583365,30.8523 21.26947,30.474608 C 18.828144,30.076116 16.629658,29.902138 14.108976,29.902138 C 11.715412,29.902138 9.353853,32.410111 7.5330128,33.480073 C 6.5036648,34.084939 5.1948929,37.699739 5.1948929,38.918533 C 5.1948929,40.600456 6.7804184,41.30857 7.5330128,42.782703 C 8.1919934,44.073471 11.650392,45.533154 12.939916,46.074405 C 13.280892,46.217521 13.621868,46.360639 13.962845,46.503755 C 15.928629,47.328851 18.06794,47.648694 20.246542,47.648694 C 21.513024,47.648694 22.779506,47.648694 24.045988,47.648694 C 25.005804,47.648694 25.659217,47.219344 26.676373,47.219344 C 27.655358,47.219344 28.505014,46.789991 29.599023,46.789991"
-     style="fill:#806600;fill-opacity:1;stroke:none"
-     id="path4587" />
-  <path
-     d="M 29.306759,36.199303 C 29.570618,36.354353 27.68858,35.054365 25.215048,35.054365 C 24.148542,35.054365 23.201007,34.911247 22.146265,34.911247 C 21.503559,34.911247 20.917788,34.625012 20.10041,34.625012 C 19.173673,34.625012 18.322388,34.19566 17.323893,34.19566 C 16.544518,34.19566 15.765145,34.19566 14.985772,34.19566 C 14.139056,34.19566 13.299929,34.143293 12.501518,34.338777 C 11.673449,34.541524 11.408119,35.049282 11.040193,35.769952 C 10.739302,36.359317 10.630752,36.944575 10.455664,37.630477 C 10.295196,38.259103 10.309531,38.863169 10.309531,39.634121 C 10.309531,40.150139 10.950695,40.460637 11.186327,40.922178 C 11.557628,41.649459 12.115109,41.663222 12.939916,42.067117 C 13.728305,42.453177 14.354188,42.306052 15.131904,42.496468 C 16.121025,42.738648 16.768778,42.525279 17.470024,43.212056 C 18.494976,44.215859 20.211569,44.356995 21.561736,44.356995 C 22.446867,44.356995 23.41634,44.500113 24.338253,44.500113 C 25.146846,44.500113 25.944486,44.536192 26.676373,44.356995 C 27.490954,44.157551 28.39123,44.213878 29.160626,44.213878 C 30.119081,44.213878 30.317502,44.082693 30.768083,43.641408 C 31.075493,43.340342 30.914216,42.060628 30.914216,41.494648 C 30.914216,40.791259 30.894357,39.985673 30.768083,39.491003 C 30.590044,38.793534 30.76873,38.062358 30.621951,37.48736 C 30.482361,36.940522 29.906519,36.551735 29.306759,36.199303 z "
-     style="fill:#deaa87;fill-opacity:1;stroke:none"
-     id="path4595" />
-  <path
-     d="M 44.212275,10.58129 C 44.2345,10.603057 41.002223,9.7502562 38.220842,10.295055 C 34.550458,11.013986 31.881682,10.928739 28.576095,12.871168 C 26.740276,13.949934 25.555975,16.067552 24.630517,17.880278 C 23.686516,19.729326 22.370775,20.941694 21.707867,22.889386 C 21.150289,24.527607 20.392675,26.352057 20.392675,28.041612 C 20.392675,29.520492 20.392675,30.999371 20.392675,32.478251 C 20.392675,33.891206 21.123337,35.160307 21.123337,36.628656 C 21.123337,38.211553 23.834473,38.982567 22.730794,40.063474 C 21.819559,40.955908 20.337894,41.852417 19.515879,42.925822 C 18.07587,44.806219 17.282954,47.030553 16.885494,49.366104 C 16.42949,52.045674 14.839639,54.130522 14.839639,56.808209 C 14.839639,59.013809 14.69247,61.382896 15.131904,63.534727 C 15.609467,65.873277 17.514459,67.94023 19.515879,69.116305 C 21.509135,70.287582 23.212938,71.785399 25.361179,72.837357 C 25.750868,73.02818 26.140553,73.219004 26.53024,73.409828 C 28.496085,74.372468 30.808323,75.745337 32.960072,76.272175 C 33.349757,76.367586 33.739444,76.462998 34.129131,76.558409 C 36.704288,77.188916 38.963263,77.76633 41.58189,78.132701 C 44.262074,78.507685 46.936842,78.663031 49.619179,78.991405 C 52.186124,79.305654 55.603781,78.325754 57.948732,77.560232 C 60.307975,76.790042 62.318179,76.286403 64.086298,74.554767 C 65.79103,72.885206 67.626803,71.516662 69.347069,69.831891 C 71.609737,67.615908 72.977226,65.051402 74.607839,62.389788 C 75.589833,60.7869 74.753972,56.685268 74.753972,54.804565 C 74.753972,52.794861 74.473592,51.536148 73.584912,49.795457 C 72.718469,48.098324 71.871975,46.114219 70.516129,44.786347 C 69.392472,43.685874 67.765549,42.951226 66.716683,41.924 C 66.119702,41.339337 65.688673,40.912225 65.401489,40.349709 C 65.06473,39.690086 67.354427,37.400497 67.73961,36.771773 C 68.601292,35.365269 68.238992,30.940018 67.73961,29.472786 C 67.011887,27.334662 65.980425,25.360955 64.81696,23.461855 C 64.601372,23.109957 64.329851,22.793974 64.086298,22.460034 C 62.633818,20.468517 61.099625,18.574327 59.117792,17.021572 C 57.510912,15.762592 55.737829,14.793991 53.857022,13.872991 C 53.564756,13.729873 53.272491,13.586755 52.980226,13.443638 C 51.89167,12.910591 50.922122,12.150783 50.203708,11.869347 C 49.436956,11.568975 48.831155,11.555024 48.303985,11.296877 C 47.534861,10.92025 46.221225,10.867524 45.381335,10.867524 C 44.816725,10.867524 44.907972,10.853827 44.212275,10.58129 z "
-     style="fill:#806600;stroke:#806600;stroke-width:1.02179408"
-     id="path2594" />
-  <path
-     d="M 43.627744,23.461855 C 43.444601,23.020581 42.753719,22.140055 42.020287,21.601329 C 41.159391,20.968979 40.313262,20.288894 39.243769,20.027038 C 39.048925,19.979332 38.854082,19.931628 38.659238,19.883921 C 37.306569,19.55273 35.96343,19.311451 34.567529,19.311451 C 33.836866,19.311451 33.106203,19.311451 32.375541,19.311451 C 31.220078,19.311451 31.005557,19.365112 30.329685,20.027038 C 29.885249,20.462304 29.167519,20.586004 28.722229,21.458213 C 28.339717,22.20745 28.317984,23.008376 28.137697,23.891208 C 27.9311,24.90289 27.845433,25.987192 27.845433,27.039791 C 27.845433,28.346937 27.6993,29.579009 27.6993,30.90396 C 27.6993,31.921753 28.203232,32.448748 28.429962,33.336955 C 28.594839,33.982851 28.756585,34.978543 29.014494,35.483717 C 29.349387,36.139685 29.401555,36.957456 29.745155,37.630478 C 30.171579,38.465729 30.329685,39.043906 30.329685,39.920357 C 30.329685,41.155941 30.90055,40.076857 29.745155,41.208412 C 29.323234,41.62163 27.743563,42.320839 27.114771,42.782704 C 26.490018,43.2416 26.054675,43.928472 25.507312,44.64323 C 24.895884,45.441646 24.510308,46.309863 24.045988,47.219343 C 23.360082,48.562851 22.983175,50.016697 22.292397,51.369749 C 21.881637,52.174319 21.931541,53.212744 21.707867,54.088979 C 21.440691,55.135636 21.707867,56.585877 21.707867,57.666913 C 21.707867,59.657175 21.770313,61.530666 22.584662,63.391609 C 22.670474,63.587706 22.779505,63.773256 22.876928,63.964079 C 23.485836,65.15677 24.157466,66.407399 25.507312,67.398895 C 26.23025,67.929912 28.464255,68.872127 29.452891,69.259422 C 30.758305,69.770814 31.985095,70.296466 33.106203,71.119949 C 34.36628,72.045507 37.001085,72.486866 38.513107,72.980475 C 40.322996,73.571324 41.842542,73.775741 43.627744,74.125414 C 45.70602,74.532493 47.772786,74.697883 49.911443,74.697883 C 51.896628,74.697883 53.627389,74.628368 55.464479,74.268531 C 57.458354,73.877984 58.506167,72.557757 60.286852,72.12177 C 62.264584,71.637539 63.176162,69.721427 64.524694,68.400718 C 65.663347,67.285559 66.306551,66.63717 67.155081,65.252135 C 68.15914,63.613231 70.07773,62.806122 70.07773,60.815496 C 70.07773,59.770434 70.184863,58.659074 69.931598,57.666913 C 69.621811,56.453331 69.454251,55.18631 69.200935,53.945861 C 68.907434,52.50863 67.892522,50.663013 67.008948,49.509222 C 66.340191,48.635944 65.694813,47.649732 64.963092,46.933108 C 64.331139,46.314194 63.850473,45.557211 63.209503,44.929465 C 62.61449,44.346731 61.282493,43.9076 60.72525,43.498292 C 60.256351,43.153874 59.877458,42.667991 59.556189,42.353353 C 58.726673,41.540951 61.357059,40.875874 62.186575,40.063474 C 62.799019,39.463665 62.401919,37.788698 62.624971,36.914892 C 63.10147,35.048227 63.063369,33.302428 63.063369,31.333313 C 63.063369,29.732748 62.784098,28.359658 62.186575,26.896673 C 62.032008,26.518228 61.894309,26.133381 61.748177,25.751734 C 61.227627,24.39224 60.718004,23.01831 60.14072,21.887564 C 59.974816,21.562604 59.848454,21.219683 59.702322,20.885743 C 59.228729,19.803494 57.880003,19.156571 56.925805,18.595864 C 55.430415,17.717144 54.066297,17.307809 52.395696,17.307809 C 51.404363,17.307809 50.627488,17.243407 49.911443,17.594043 C 49.085643,17.998424 48.661324,17.582024 47.865587,18.166512 C 46.949155,18.839655 46.734143,19.787094 46.111998,20.599508 C 45.582415,21.291051 45.198022,21.637743 44.796804,22.030682 C 44.27166,22.544992 43.849292,22.593953 43.627744,23.461855 z "
-     style="fill:#deaa87;stroke:#806600;stroke-width:1.02179408"
-     id="path2598" />
-  <path
-     d="M 28.084882,56.092622 C 27.999183,56.020034 28.499334,58.973884 28.760751,59.52744 C 29.274724,60.615798 31.180968,61.5774 32.140086,62.389788 C 33.075109,63.181765 34.00683,63.795085 35.350455,64.250314 C 36.284513,64.566777 37.377917,65.287886 38.560824,65.53837 C 40.41885,65.931814 42.104276,66.826426 43.967762,66.826426 C 45.803759,66.826426 47.706322,67.112661 49.543665,67.112661 C 50.756895,67.112661 52.803761,66.018222 53.936802,65.53837 C 55.274656,64.971779 57.295056,64.226417 58.160973,63.248491 C 58.69085,62.65007 59.755702,61.924537 60.357539,61.244849 C 60.941448,60.585408 61.533935,59.819072 62.216176,59.241205 C 62.515065,58.988041 62.435117,57.354477 62.554109,56.951326 C 62.738309,56.32724 62.554109,55.451665 62.554109,54.804565 C 62.554109,53.658453 62.152438,54.4292 61.709274,54.804565 C 61.069544,55.346427 61.346291,56.415476 60.951105,57.084934 C 60.554099,57.757475 60.20877,58.491717 59.681674,59.086993 C 59.176477,59.657538 59.426063,59.786189 58.896068,60.235103 C 58.254907,60.778176 57.269144,61.448265 56.416436,61.809393 C 55.783098,62.077616 55.173285,62.53735 54.530367,62.809631 C 53.544404,63.227194 53.061487,63.348519 52.109963,63.952985 C 51.375595,64.419502 50.722542,64.382337 49.744429,64.382337 C 48.843272,64.382337 47.659051,64.806934 46.757894,64.806934 C 45.744095,64.806934 44.447229,64.240804 43.433427,64.240804 C 42.588592,64.240804 41.74376,63.957739 40.898926,63.957739 C 39.800703,63.957739 39.180675,63.224769 38.222891,62.81914 C 37.306238,62.43093 36.570701,62.119425 35.519422,61.6742 C 34.794779,61.367309 33.683204,61.519938 33.432591,61.095391 C 33.063645,60.470385 32.335877,60.046836 31.770357,59.807335 C 30.863505,59.423276 30.427799,58.229803 29.774551,57.953148 C 29.208861,57.713574 28.957945,57.118353 28.591784,56.808209 C 28.35956,56.611513 28.253851,56.331152 28.084882,56.092622 z "
-     style="fill:#784421;stroke:none"
-     id="path4558" />
-  <path
-     d="M 54.357063,39.011125 C 54.357063,41.3525 52.622178,43.252746 50.484551,43.252746 C 48.346925,43.252746 46.61204,41.3525 46.61204,39.011125 C 46.61204,36.669751 48.346925,34.769506 50.484551,34.769506 C 52.622178,34.769506 54.357063,36.669751 54.357063,39.011125 z "
-     style="fill:#050607;fill-opacity:1;stroke:#07040b;stroke-width:1.06075895;stroke-opacity:1"
-     id="path6786" />
-  <path
-     d="M 43.218553,39.030234 C 43.218553,41.371608 41.483668,43.271854 39.346042,43.271854 C 37.208415,43.271854 35.47353,41.371608 35.47353,39.030234 C 35.47353,36.688859 37.208415,34.788615 39.346042,34.788615 C 41.483668,34.788615 43.218553,36.688859 43.218553,39.030234 z "
-     style="fill:#050607;fill-opacity:1;stroke:#07040b;stroke-width:1.06075895;stroke-opacity:1"
-     id="path7845" />
-</svg>
--- a/loadgen/icons/qgn_prob_status_green.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" height="100%" preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 100 100" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify">
-<switch>
-<foreignObject content="structured text" height="1" requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/" width="1" x="0" y="0"/>
-<g>
-<g>
-<rect fill="none" height="100" width="100"/>
-<radialGradient cx="-213.9155" cy="624.8184" fx="-213.9155" fy="624.8184" gradientTransform="matrix(6.0623 0 0 -6.0623 1346.8223 3837.8408)" gradientUnits="userSpaceOnUse" id="XMLID_40_" r="8.2473">
-<stop offset="0" style="stop-color:#4FFF9B"/>
-<stop offset="1" style="stop-color:#00FF7C"/>
-</radialGradient>
-<circle cx="50" cy="50" fill="url(#XMLID_40_)" r="50"/>
-<radialGradient cx="25.0381" cy="16.4775" fx="25.0381" fy="16.4775" gradientUnits="userSpaceOnUse" id="XMLID_41_" r="18.1317">
-<stop offset="0" style="stop-color:#00FF7C"/>
-<stop offset="1" style="stop-color:#00C024"/>
-</radialGradient>
-<path d="M7.969,31.954c7.5-1.246,28.746-10.007,35-15.623c6.254-5.615-0.977-14.661-2.223-15.277       c-0.685-0.346-5.923,1.039-10.992,3.277c-4.215,1.862-8.277,4.462-9.908,5.754c-1.423,1.108-4.062,3.285-6.346,5.808       c-3.508,3.846-6.408,7.885-6.723,8.5c-0.308,0.639-2.185,4.577-2.185,4.577s0.969,1.877,1.5,2.369       C6.623,31.823,7.969,31.954,7.969,31.954z" fill="url(#XMLID_41_)"/>
-<radialGradient cx="-243.0728" cy="466.7393" fx="-243.0728" fy="466.7393" gradientTransform="matrix(7.6923 0 0 -7.6923 1911.5386 3618.3823)" gradientUnits="userSpaceOnUse" id="XMLID_42_" r="4.2652">
-<stop offset="0" style="stop-color:#00FF7C"/>
-<stop offset="1" style="stop-color:#00C024"/>
-</radialGradient>
-<path d="M52.723,99.877c0,0-0.754-14.877-6.376-16.754c-5.631-1.877-15.631,0.631-20.008-7.5       C21.969,67.5,27.385,59.777,33.746,55c2.5-1.877,11.323-2.1,13.846-1.246C51.254,55,52.861,56.746,55,57.5       c1.785,0.631,5.823,1.2,9.377,0c1.877-0.615,5-1.861,5-4.984c0-1.531-1.646-4.4-4.377-5c-5.623-1.246-5.293,5.616-8.123,5       c-3.154-0.692-9.1-6.254-10.631-6.254c-4.369,0-5.623,6.254-8.746,6.254S33.523,50.8,33.123,50       C32.5,48.754,33.746,46.262,35,45c0.623-0.615,3.246-0.361,3.746-2.492c0.554-2.393-0.077-7.454,0.623-8.746       C43.123,26.877,48.746,22.508,55.092,20c5.361-2.1,10,1.262,10-1.861c0-3.124-6.877-10.008-5.631-13.77       c1.254-3.738,22.785,8.308,25.285,10.815c2.5,2.492,9.454,11.162,10.238,12.8c0.785,1.654,3.516,8.446,4.216,13.446       c0.708,5-1.5,15.731-3.485,16.062c-1.984,0.346-3.746-4.984-5.623-5.615c-9.576-3.185-3.776,4.369-4.377,10.623       C85,70.016,77.5,82.5,75.623,86.254c-1.685,3.354-2.984,8.23-2.984,8.23s-3.746,2.416-10.547,3.984       C56.861,99.793,52.723,99.877,52.723,99.877z" fill="url(#XMLID_42_)"/>
-</g>
-</g>
-</switch>
-</svg>
--- a/loadgen/icons/qgn_prob_status_red.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" height="100%" preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 100 100" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify">
-<switch>
-<foreignObject content="structured text" height="1" requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/" width="1" x="0" y="0"/>
-<g>
-<g>
-<rect fill="none" height="100" width="100"/>
-<radialGradient cx="-213.9155" cy="624.8184" fx="-213.9155" fy="624.8184" gradientTransform="matrix(6.0623 0 0 -6.0623 1346.8223 3837.8408)" gradientUnits="userSpaceOnUse" id="XMLID_40_" r="8.2473">
-<stop offset="0" style="stop-color:#FF799B"/>
-<stop offset="1" style="stop-color:#FF437C"/>
-</radialGradient>
-<circle cx="50" cy="50" fill="url(#XMLID_40_)" r="50"/>
-<radialGradient cx="25.0381" cy="16.4775" fx="25.0381" fy="16.4775" gradientUnits="userSpaceOnUse" id="XMLID_41_" r="18.1317">
-<stop offset="0" style="stop-color:#FF437C"/>
-<stop offset="1" style="stop-color:#FF0232"/>
-</radialGradient>
-<path d="M7.969,31.954c7.5-1.246,28.746-10.007,35-15.623c6.254-5.615-0.977-14.661-2.223-15.277       c-0.685-0.346-5.923,1.039-10.992,3.277c-4.215,1.862-8.277,4.462-9.908,5.754c-1.423,1.108-4.062,3.285-6.346,5.808       c-3.508,3.846-6.408,7.885-6.723,8.5c-0.308,0.639-2.185,4.577-2.185,4.577s0.969,1.877,1.5,2.369       C6.623,31.823,7.969,31.954,7.969,31.954z" fill="url(#XMLID_41_)"/>
-<radialGradient cx="-243.0728" cy="466.7393" fx="-243.0728" fy="466.7393" gradientTransform="matrix(7.6923 0 0 -7.6923 1911.5386 3618.3823)" gradientUnits="userSpaceOnUse" id="XMLID_42_" r="4.2652">
-<stop offset="0" style="stop-color:#FF437C"/>
-<stop offset="1" style="stop-color:#FF0232"/>
-</radialGradient>
-<path d="M52.723,99.877c0,0-0.754-14.877-6.376-16.754c-5.631-1.877-15.631,0.631-20.008-7.5       C21.969,67.5,27.385,59.777,33.746,55c2.5-1.877,11.323-2.1,13.846-1.246C51.254,55,52.861,56.746,55,57.5       c1.785,0.631,5.823,1.2,9.377,0c1.877-0.615,5-1.861,5-4.984c0-1.531-1.646-4.4-4.377-5c-5.623-1.246-5.293,5.616-8.123,5       c-3.154-0.692-9.1-6.254-10.631-6.254c-4.369,0-5.623,6.254-8.746,6.254S33.523,50.8,33.123,50       C32.5,48.754,33.746,46.262,35,45c0.623-0.615,3.246-0.361,3.746-2.492c0.554-2.393-0.077-7.454,0.623-8.746       C43.123,26.877,48.746,22.508,55.092,20c5.361-2.1,10,1.262,10-1.861c0-3.124-6.877-10.008-5.631-13.77       c1.254-3.738,22.785,8.308,25.285,10.815c2.5,2.492,9.454,11.162,10.238,12.8c0.785,1.654,3.516,8.446,4.216,13.446       c0.708,5-1.5,15.731-3.485,16.062c-1.984,0.346-3.746-4.984-5.623-5.615c-9.576-3.185-3.776,4.369-4.377,10.623       C85,70.016,77.5,82.5,75.623,86.254c-1.685,3.354-2.984,8.23-2.984,8.23s-3.746,2.416-10.547,3.984       C56.861,99.793,52.723,99.877,52.723,99.877z" fill="url(#XMLID_42_)"/>
-</g>
-</g>
-</switch>
-</svg>
--- a/loadgen/loadgen.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +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
-
-DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT QT_NO_DEBUG
-
-SUBDIRS = group \
-          ui/hb
--- a/loadgen/sis/LoadGen_S60-30.pkg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-;
-; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: 
-;
-
-; Language - standard language definitions
-&EN
-
-; Standard SIS file header
-#{"LoadGen"},(0x20011384),1,4,0,TYPE=SA
-
-; Supports S60 v 3.0
-[0x101F7961], 0, 0, 0, {"S60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; normal stuff:
-"\epoc32\RELEASE\armv5\UREL\LoadGen.exe"-"!:\sys\bin\LoadGen.exe"
-"\epoc32\data\z\Resource\apps\LoadGen_aif.mif"-"!:\Resource\Apps\LoadGen_aif.mif"
-"\epoc32\data\z\Resource\apps\LoadGen_ExtraIcons.mif"-"!:\Resource\Apps\LoadGen_ExtraIcons.mif"
-"\epoc32\data\z\Resource\apps\LoadGen.rsc"-"!:\Resource\Apps\LoadGen.rsc"
-"\epoc32\data\z\PRIVATE\10003A3F\APPS\LoadGen_reg.rsc"-"!:\private\10003a3f\import\apps\LoadGen_reg.rsc"
-"..\group\backup_registration.xml"-"!:\private\20011384\backup_registration.xml"
Binary file loadgen/sis/LoadGen_S60-30.sis has changed
--- a/loadgen/sis/LoadGen_stub.pkg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-;
-; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: 
-;
-
-
-; Language - standard language definitions
-&EN
-
-; Standard SIS file header
-#{"LoadGen"},(0x20011384),1,0,0
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; normal stuff:
-""-"z:\sys\bin\LoadGen.exe"
-""-"z:\Resource\Apps\LoadGen.mif"
-""-"z:\Resource\Apps\LoadGen_aif.mif"
-""-"z:\Resource\Apps\LoadGen_ExtraIcons.mif"
-""-"z:\Resource\Apps\LoadGen.rsc"
-""-"z:\private\10003a3f\import\apps\LoadGen_reg.rsc"
-""-"z:\private\20011384\backup_registration.xml"
--- a/loadgen/ui/avkon/data/loadgen.rss	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1421 +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: 
-*
-*/
-
-
-
-NAME MATT
-
-#include <eikon.rh>
-#include <eikon.rsg>
-#include <eikon.hrh>
-#include <avkon.rh>
-#include <avkon.rsg>
-#include <avkon.mbg>
-#include <CommonDialogs.hrh>
-#include <CommonDialogs.rh>
-#include <pathconfiguration.hrh>
-#include <data_caging_paths_strings.hrh>
-#include <appinfo.rh>
-
-#include "loadgen.hrh"
-#include "loadgen_std.h"
-
-
-// ---------------------------------------------------------
-//   
-//    Define the resource file signature 
-//    This resource should be empty.
-//
-// ---------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE { }
-
-// ---------------------------------------------------------
-//   
-//    Default Document Name
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_default_document_name { buf=""; }
-
-// ---------------------------------------------------------
-//   
-//    Define default menu and CBA key.
-//
-// ---------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
-    {
-    //status_pane = r_loadgen_status_pane;
-    //menubar = r_loadgen_menubar;
-    //cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
-    }
-
-    
-//----------------------------------------------------
-//   
-//    r_loadgen_hotkeys
-//
-//----------------------------------------------------
-//
-RESOURCE HOTKEYS r_loadgen_hotkeys
-    {
-    control=
-        {
-        HOTKEY { command=EAknCmdExit; key='e'; }
-        };
-    }
-
-
-//----------------------------------------------------
-//    r_loadgen_view_main
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_loadgen_view_main
-    {
-    hotkeys=r_loadgen_hotkeys;
-    menubar=r_loadgen_menubar_view_main;  
-    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;    
-    }
-
-//----------------------------------------------------
-//    r_loadgen_menubar_view_main
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_loadgen_menubar_view_main
-    {
-    titles=
-        {
-        MENU_TITLE { menu_pane=r_loadgen_app_menu; txt="App"; },
-        MENU_TITLE { menu_pane=r_loadgen_view_main_menu; txt="Main"; }
-        };
-    }
-
-//----------------------------------------------------
-//    r_loadgen_view_main_menu
-//----------------------------------------------------
-//
-
-RESOURCE MENU_PANE r_loadgen_view_main_menu
-    {
-    items=
-        {
-        };
-    }
-
-           
-        
-//----------------------------------------------------
-//    r_loadgen_app_menu
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_loadgen_app_menu
-    {
-    items=
-        {
-        MENU_ITEM { command=ELoadGenCmdNewLoad; txt="New load"; cascade=r_loadgen_newload_submenu; },
-        MENU_ITEM { command=ELoadGenStopAll; txt="Stop all"; },
-        MENU_ITEM { command=ELoadGenSuspendAll; txt="Suspend all"; },
-        MENU_ITEM { command=ELoadGenResumeAll; txt="Resume all"; },
-        MENU_ITEM { command=ELoadGenCmdLaunchPerfMon; txt="Launch PerfMon"; },
-        MENU_ITEM { command=ELoadGenCmdAbout; txt="About"; },
-        MENU_ITEM { command=EAknCmdExit; txt="Exit"; }
-        };
-    }
-
-RESOURCE MENU_PANE r_loadgen_newload_submenu
-    {
-    items = 
-        {
-        MENU_ITEM { command=ELoadGenCmdNewLoadCPULoad; txt="CPU load"; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadEatMemory; txt="Eat memory"; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadPhoneCall; txt="Phone calls"; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadMessages; txt="Messages"; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadNetConn; txt="Network conn."; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadKeyPress; txt="Key presses"; },        
-        MENU_ITEM { command=ELoadGenCmdNewLoadApplications; txt="Applications"; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadPhotoCaptures; txt="Photo captures"; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadBluetooth; txt="Bluetooth actions"; },
-        MENU_ITEM { command=ELoadGenCmdNewLoadPointerEvent; txt="Pointer events"; }
-        };
-    }
-    
-//----------------------------------------------------
-//    r_loadgen_settings_dialog
-//    Dialog for setting list
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_loadgen_settings_dialog
-    {
-    flags =
-        EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
-        EEikDialogFlagButtonsRight | EEikDialogFlagCbaButtons |
-        EEikDialogFlagWait | EEikDialogFlagNoTitleBar;
-    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtSettingListBox;
-            id = ELoadGenSettingItemList;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = LISTBOX
-                {
-                flags = EAknListBoxSelectionList;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    r_loadgen_settings_menubar
-//----------------------------------------------------
-//
-
-RESOURCE MENU_BAR r_loadgen_settings_menubar
-    {
-    titles =
-        {
-        MENU_TITLE
-            {
-            menu_pane = r_loadgen_settings_menupane;
-            txt = " ";   // dummy
-            }
-        };
-    }
-
-RESOURCE MENU_PANE r_loadgen_settings_menupane
-    {
-    items =
-        {
-        MENU_ITEM
-            {
-            command = ELoadGenCmdSettingsChange;
-            txt = "Change";
-            },
-        MENU_ITEM
-            {
-            command = ELoadGenCmdSettingsExit;
-            txt = "Exit";
-            }
-        };
-    }
-
-
-
-  
-// ---------------------------------------------------------
-//   
-//   r_loadgen_about_dialog
-//   About dialog - show version and copyright info etc.
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_loadgen_about_dialog
-    {
-    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
-    items=
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupHeadingPane;
-            id = EAknMessageQueryHeaderId;
-            control = AVKON_HEADING
-                {
-                label = "About LoadGen";
-                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtMessageQuery;
-            id = EAknMessageQueryContentId;
-            control = AVKON_MESSAGE_QUERY
-                {
-                message = "Version 1.5.1 - 9th September 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.";
-                };
-            }
-        };
-    }
-
-// ---------------------------------------------------------
-//   r_general_confirmation_query
-// ---------------------------------------------------------
-//
-
-RESOURCE DIALOG r_general_confirmation_query
-    {
-    flags = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationQueryLayout;
-                };
-            }
-        };
-    }
-
-// ---------------------------------------------------------
-//   r_general_text_query
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_general_text_query
-    {
-    flags = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    items=
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control = AVKON_DATA_QUERY
-                {
-                layout = EDataLayout;
-                control = EDWIN
-                    {
-                    width = 256;
-                    lines = 3;
-                    maxlength = 256;
-                    };
-                };
-            }
-        };
-    }
-
-// ---------------------------------------------------------
-//   r_general_text_query
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_general_numeric_query
-    {
-    flags = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control= AVKON_DATA_QUERY
-                {
-                layout = ENumberLayout;
-                control = AVKON_INTEGER_EDWIN
-                    {
-                    min = -999999;
-                    max = 999999;
-                    };
-                };
-            }
-        };
-    }
-
-
-// ---------------------------------------------------------
-//   r_item_action_query
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_item_action_query
-    {
-    flags = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    items =
-        {
-        AVKON_LIST_QUERY_DLG_LINE
-            {
-            control= AVKON_LIST_QUERY_CONTROL
-                {
-                listtype = EAknCtSinglePopupMenuListBox;
-                listbox = AVKON_LIST_QUERY_LIST
-                    {
-                    array_id = r_item_action_query_array;
-                    };
-                heading = "";
-                };
-            }
-        };
-    }
-
-RESOURCE ARRAY r_item_action_query_array
-    {
-    items =
-        {
-        LBUF {txt = "Stop"; },
-        LBUF {txt = "Resume/suspend"; },
-        LBUF {txt = "Edit"; }
-        };
-    }     
-
-
-// ---------------------------------------------------------
-//   r_cpuload_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_cpuload_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_cpuload_form;
-    }
-
-RESOURCE FORM r_cpuload_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenCPULoadQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Load mode";
-            id = ELoadGenCPULoadQueryMode;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_cpuloadmode_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Type";
-            id = ELoadGenCPULoadQueryType;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_cpuloadtype_textarray;
-                active = 0;    
-                };
-            }
-        };
-    }
-
-RESOURCE DLG_LINE r_cpuload_dlg_line_periodic_length
-    {
-    type = EEikCtNumberEditor;
-    prompt = "Length (ms)";
-    id = ELoadGenCPULoadQueryLength;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = NUMBER_EDITOR
-        {
-        min = 0;    
-        max = 999999999;    
-        };
-    }
-
-RESOURCE DLG_LINE r_cpuload_dlg_line_periodic_idle
-    {
-    type = EEikCtNumberEditor;
-    prompt = "Idle (ms)";
-    id = ELoadGenCPULoadQueryIdle;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = NUMBER_EDITOR
-        {
-        min = 0;    
-        max = 999999999;    
-        };
-    }
-
-RESOURCE DLG_LINE r_cpuload_dlg_line_periodic_variance
-    {
-    type = EEikCtNumberEditor;
-    prompt = "Random variance (%)";
-    id = ELoadGenCPULoadQueryVariance;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = NUMBER_EDITOR
-        {
-        min = 0;    
-        max = 100;    
-        };
-    }
-
-RESOURCE DLG_LINE r_cpuload_dlg_line_cpu
-    {
-    type = EAknCtPopupFieldText;
-    prompt = "CPU";
-    id = ELoadGenCPULoadQueryCpu;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = POPUP_FIELD_TEXT
-        {
-        popupfield = POPUP_FIELD
-            {
-            width = 100;
-            };
-        textarray = r_cpuloadcpu_textarray;
-        active = 0;    
-        };
-    }
-
-                
-// ---------------------------------------------------------
-//   r_memoryeat_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_memoryeat_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_memoryeat_form;
-    }
-
-RESOURCE FORM r_memoryeat_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenMemoryEatQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Source";
-            id = ELoadGenMemoryEatQuerySource;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_memoryeatsource_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Type";
-            id = ELoadGenMemoryEatQueryType;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_memoryeattype_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Buffer (B)";
-            id = ELoadGenMemoryEatQueryBuffer;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Idle after buffer (ms)";
-            id = ELoadGenMemoryEatQueryIdle;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Random variance (%)";
-            id = ELoadGenMemoryEatQueryVariance;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            }
-        };
-    }
-
-RESOURCE DLG_LINE r_memoryeat_dlg_line_amount
-    {
-    type = EEikCtEdwin;
-    prompt = "Amount (B)";
-    id = ELoadGenMemoryEatQueryAmount;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = EDWIN
-        {
-        flags = KMultiLineExpandingEditorFlags | EEikEdwinNoLineOrParaBreaks;
-        maxlength = 14;    
-        width = 6;
-        default_input_mode = EAknEditorNumericInputMode;
-        allowed_input_modes = EAknEditorNumericInputMode;    
-        };
-    }
-    
-RESOURCE DLG_LINE r_memoryeat_dlg_line_random_min
-    {
-    type = EEikCtEdwin;
-    prompt = "Min to be left (B)";
-    id = ELoadGenMemoryEatQueryRandomMin;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = EDWIN
-        {
-        flags = KMultiLineExpandingEditorFlags | EEikEdwinNoLineOrParaBreaks;
-        maxlength = 14;    
-        width = 6;
-        default_input_mode = EAknEditorNumericInputMode;
-        allowed_input_modes = EAknEditorNumericInputMode;    
-        };
-    }
-
-RESOURCE DLG_LINE r_memoryeat_dlg_line_random_max
-    {
-    type = EEikCtEdwin;
-    prompt = "Max to be left (B)";
-    id = ELoadGenMemoryEatQueryRandomMax;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = EDWIN
-        {
-        flags = KMultiLineExpandingEditorFlags | EEikEdwinNoLineOrParaBreaks;
-        maxlength = 14;    
-        width = 6;
-        default_input_mode = EAknEditorNumericInputMode;
-        allowed_input_modes = EAknEditorNumericInputMode;    
-        };
-    }
-
-
-
-// ---------------------------------------------------------
-//   r_phonecall_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_phonecall_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_phonecall_form;
-    }
-
-RESOURCE FORM r_phonecall_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenPhoneCallQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtEdwin;
-            prompt = "Phone number";
-            id = ELoadGenPhoneCallQueryDestination;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = EDWIN
-                {
-                width = 255;    
-                maxlength = 255;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Length (ms)";
-            id = ELoadGenPhoneCallQueryLength;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Idle (ms)";
-            id = ELoadGenPhoneCallQueryIdle;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Random variance (%)";
-            id = ELoadGenPhoneCallQueryVariance;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            }
-        };
-    }
-
-
-// ---------------------------------------------------------
-//   r_netconn_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_netconn_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_netconn_form;
-    }
-
-RESOURCE FORM r_netconn_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenNetConnQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtEdwin;
-            prompt = "Destination URL";
-            id = ELoadGenNetConnQueryDestination;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = EDWIN
-                {
-                width = 255;    
-                maxlength = 255;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Idle (ms)";
-            id = ELoadGenNetConnQueryIdle;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Random variance (%)";
-            id = ELoadGenNetConnQueryVariance;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            }
-        };
-    }
-
-
-// ---------------------------------------------------------
-//   r_keypress_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_keypress_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_keypress_form;
-    }
-
-RESOURCE FORM r_keypress_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenKeyPressQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Heartbeat (ms)";
-            id = ELoadGenKeyPressQueryHeartBeat;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Random variance (%)";
-            id = ELoadGenKeyPressQueryVariance;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            }
-        };
-    }    
-
-// ---------------------------------------------------------
-//   r_pointerevent_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_pointerevent_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_pointerevent_form;
-    }
-
-RESOURCE FORM r_pointerevent_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenPointerEventQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Heartbeat (ms)";
-            id = ELoadGenPointerEventQueryHeartBeat;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Random variance (%)";
-            id = ELoadGenPointerEventQueryVariance;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            }
-        };
-    }
-
-// ---------------------------------------------------------
-//   r_messages_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_messages_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_messages_form;
-    }
-
-RESOURCE FORM r_messages_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenMessagesQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },
-            DLG_LINE
-                {
-                type = EAknCtPopupFieldText;
-                prompt = "Type";
-                id = ELoadGenMessagesQueryType;
-                itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-                control = POPUP_FIELD_TEXT
-                    {
-                    popupfield = POPUP_FIELD
-                        {
-                        width = 100;
-                        };
-                    textarray = r_message_type_textarray;
-                    active = 0;    
-                    };
-                },            
-        DLG_LINE
-            {
-            type = EEikCtEdwin;
-            prompt = "Phone number";
-            id = ELoadGenMessagesQueryDestination;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = EDWIN
-                {
-                width = 255;    
-                maxlength = 255;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Maximum amount of messages";
-            id = ELoadGenMessagesQueryAmount;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 1000;    
-                };
-            },            
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Message length";
-            id = ELoadGenMessagesQueryLength;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 512;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Idle (ms)";
-            id = ELoadGenMessagesQueryIdle;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Random variance (%)";
-            id = ELoadGenMessagesQueryVariance;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            }
-        };
-    }
-
-// ---------------------------------------------------------
-//   r_applicatios_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_applications_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_applications_form;
-    }
-
-RESOURCE FORM r_applications_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Priority";
-            id = ELoadGenApplicationsQueryPriority;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_thread_priority_textarray;
-                active = 0;    
-                };
-            },            
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Max parallel applications";
-            id = ELoadGenApplicationsMaxOpen;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Launching interval (ms)";
-            id = ELoadGenApplicationsLaunchingInterval;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-            
-        DLG_LINE
-            {
-            type = EAknCtPopupFieldText;
-            prompt = "Key press type";
-            id = ELoadGenApplicationsKeyPressType;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = POPUP_FIELD_TEXT
-                {
-                popupfield = POPUP_FIELD
-                    {
-                    width = 100;
-                    };
-                textarray = r_applications_keypress_type_textarray;
-                active = 0;    
-                };
-            },            
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Key press interval (ms)";
-            id = ELoadGenApplicationsKeyPressQueryHeartBeat;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 999999999;    
-                };
-            },
-        DLG_LINE
-            {
-            type = EEikCtNumberEditor;
-            prompt = "Random variance (%)";
-            id = ELoadGenApplicationsQueryVariance;
-            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-            control = NUMBER_EDITOR
-                {
-                min = 0;    
-                max = 100;    
-                };
-            }
-        };
-    }    
-
-// ---------------------------------------------------------
-//   r_photocapture_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_photocapture_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_photocapture_form;
-    }
-
-RESOURCE FORM r_photocapture_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-                DLG_LINE
-                    {
-                    type = EAknCtPopupFieldText;
-                    prompt = "Priority";
-                    id = ELoadGenPhotoCaptureQueryPriority;
-                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-                    control = POPUP_FIELD_TEXT
-                        {
-                        popupfield = POPUP_FIELD
-                            {
-                            width = 100;
-                            };
-                        textarray = r_thread_priority_textarray;
-                        active = 0;    
-                        };
-                    },
-                DLG_LINE
-                    {
-                    type = EEikCtNumberEditor;
-                    prompt = "Idle (ms)";
-                    id = ELoadGenPhotoCaptureQueryIdle;
-                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-                    control = NUMBER_EDITOR
-                        {
-                        min = 0;    
-                        max = 999999999;    
-                        };
-                    },
-                DLG_LINE
-                    {
-                    type = EEikCtNumberEditor;
-                    prompt = "Random variance (%)";
-                    id = ELoadGenPhotoCaptureQueryVariance;
-                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-                    control = NUMBER_EDITOR
-                        {
-                        min = 0;    
-                        max = 100;    
-                        };
-                    }
-        };
-    }
-
-/*RESOURCE DLG_LINE r_photocapture_dlg_line_periodic_idle
-    {
-    type = EEikCtNumberEditor;
-    prompt = "Idle (ms)";
-    id = ELoadGenPhotoCaptureQueryIdle;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = NUMBER_EDITOR
-        {
-        min = 0;    
-        max = 999999999;    
-        };
-    }
-
-RESOURCE DLG_LINE r_photocapture_dlg_line_periodic_variance
-    {
-    type = EEikCtNumberEditor;
-    prompt = "Random variance (%)";
-    id = ELoadGenPhotoCaptureQueryVariance;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = NUMBER_EDITOR
-        {
-        min = 0;    
-        max = 100;    
-        };
-    }*/
-
-RESOURCE DLG_LINE r_photocapture_dlg_line_device
-    {
-    type = EAknCtPopupFieldText;
-    prompt = "Device";
-    id = ELoadGenPhotoCaptureQueryDevice;
-    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-    control = POPUP_FIELD_TEXT
-        {
-        popupfield = POPUP_FIELD
-            {
-            width = 100;
-            };
-        textarray = r_photocapturedevice_textarray;
-        active = 0;    
-        };
-    }
-
-// ---------------------------------------------------------
-//   r_photocapture_form_dialog
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_bluetooth_form_dialog
-    {
-    flags = EAknDialogGenericFullScreen;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    form = r_bluetooth_form;
-    }
-
-RESOURCE FORM r_bluetooth_form
-    {
-    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
-    items = 
-        {
-                DLG_LINE
-                    {
-                    type = EAknCtPopupFieldText;
-                    prompt = "Priority";
-                    id = ELoadGenBluetoothQueryPriority;
-                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-                    control = POPUP_FIELD_TEXT
-                        {
-                        popupfield = POPUP_FIELD
-                            {
-                            width = 100;
-                            };
-                        textarray = r_thread_priority_textarray;
-                        active = 0;    
-                        };
-                    },
-                DLG_LINE
-                    {
-                    type = EEikCtNumberEditor;
-                    prompt = "Idle (ms)";
-                    id = ELoadGenBluetoothQueryIdle;
-                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-                    control = NUMBER_EDITOR
-                        {
-                        min = 0;    
-                        max = 999999999;    
-                        };
-                    },
-                DLG_LINE
-                    {
-                    type = EEikCtNumberEditor;
-                    prompt = "Random variance (%)";
-                    id = ELoadGenBluetoothQueryVariance;
-                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
-                    control = NUMBER_EDITOR
-                        {
-                        min = 0;    
-                        max = 100;    
-                        };
-                    }
-        };
-    }
-
-// ---------------------------------------------------------
-// Arrays for forms:    
-    
-RESOURCE ARRAY r_thread_priority_textarray
-    {
-    items =
-        {
-        LBUF { txt = "Much less (-20)"; },
-        LBUF { txt = "Less (-10)"; },
-        LBUF { txt = "Normal (0)"; },
-        LBUF { txt = "More (10)"; },
-        LBUF { txt = "Much more (20)"; },
-        LBUF { txt = "Real time (30)"; },
-        LBUF { txt = "Abs. very low (100)"; },
-        LBUF { txt = "Abs. low (200)"; },
-        LBUF { txt = "Abs. backgr. (300)"; },
-        LBUF { txt = "Abs. foregr. (400)"; },
-        LBUF { txt = "Abs. high (500)"; }
-        };
-    } 
-
-RESOURCE ARRAY r_cpuloadmode_textarray
-    {
-    items =
-        {
-        LBUF { txt = "Yielding"; },
-        LBUF { txt = "Blocking"; }
-        };
-    } 
-    
-RESOURCE ARRAY r_cpuloadtype_textarray
-    {
-    items =
-        {
-        LBUF { txt = "Continuous"; },
-        LBUF { txt = "Periodic"; }
-        };
-    }       
-
-RESOURCE ARRAY r_cpuloadcpu_textarray
-    {
-    items =
-        {
-        LBUF { txt = "CPU0"; }
-        };
-    }       
-
-RESOURCE ARRAY r_memoryeatsource_textarray
-    {
-    items =
-        {
-        LBUF { txt = "RAM"; },
-        LBUF { txt = "C:"; },
-        LBUF { txt = "D:"; },
-        LBUF { txt = "E:"; },
-        LBUF { txt = "F:"; },
-        LBUF { txt = "G:"; },
-        LBUF { txt = "H:"; },
-        LBUF { txt = "I:"; },
-        LBUF { txt = "J:"; },
-        LBUF { txt = "K:"; },
-        LBUF { txt = "L:"; },
-        LBUF { txt = "M:"; },
-        LBUF { txt = "N:"; }
-        };
-    }
-    
-RESOURCE ARRAY r_memoryeattype_textarray
-    {
-    items =
-        {
-        LBUF { txt = "Memory to eat"; },
-        LBUF { txt = "Memory to be left"; },
-        LBUF { txt = "Alternate min/max"; }
-        };
-    }
-    
-RESOURCE ARRAY r_message_type_textarray
-    {
-    items =
-        {
-        LBUF { txt = "SMS"; },
-        LBUF { txt = "MMS"; }
-        };
-    } 
-
-RESOURCE ARRAY r_applications_keypress_type_textarray
-    {
-    items =
-        {
-        LBUF { txt = "None"; },
-        LBUF { txt = "Arrow keys"; }
-        };
-    } 
-
-RESOURCE ARRAY r_photocapturedevice_textarray
-    {
-    items =
-        {
-        LBUF { txt = "Camera 1"; }
-        };
-    } 
-
-
-RESOURCE LOCALISABLE_APP_INFO r_loadgen_localisable_app_info
-    {
-    short_caption = "LoadGen";
-    caption_and_icon = 
-    CAPTION_AND_ICON_INFO
-        {
-        caption = "Load Gener.";
-
-        number_of_icons = 1;
-
-        // Note for ROM-based apps it is recommended to add the drive letter
-        // icon_file = "z:"APP_BITMAP_DIR"\\myapp_aif.mif";
-        icon_file = APP_BITMAP_DIR"\\loadgen_aif.mif";
-        };
-    }
-
-
-
-// ---------------------------------------------------------
-//   
-//    RESOURCE LOCALISABLE_APP_INFO
-//
-// ---------------------------------------------------------
-//
--- a/loadgen/ui/avkon/data/loadgen_reg.rss	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-
-#include <loadgen.rsg>
-#include <appinfo.rh>
-#include <data_caging_paths_strings.hrh>
-
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x20011384
-
-
-RESOURCE APP_REGISTRATION_INFO
-    {
-    app_file = "LoadGen";
-    localisable_resource_file = APP_RESOURCE_DIR"\\LoadGen";
-    localisable_resource_id = R_LOADGEN_LOCALISABLE_APP_INFO;
-    group_name = "RnD Tools";    
-    }
--- a/loadgen/ui/avkon/group/bld.inf	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* ============================================================================
-*  Name        : bld.inf
-*  Part of     : LoadGen / LoadGenUI
-*  Description : Build information file for project LoadGen
-*  Version     : %version: 1 %
-*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-PRJ_PLATFORMS
-
-WINSCW ARMV5
-
-
-PRJ_EXPORTS
-../rom/loadgen.iby CORE_IBY_EXPORT_PATH(tools,loadgen.iby)
-
-PRJ_MMPFILES
-
-
-loadgen.mmp
-
-
-PRJ_TESTMMPFILES
-
-
-PRJ_TESTEXPORTS
-
--- a/loadgen/ui/avkon/group/loadgen.mmp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +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 <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-
-TARGET            LoadGen.exe
-TARGETTYPE        exe
-EPOCSTACKSIZE     0x5000
-EPOCHEAPSIZE      0x10000 0x1000000  // Min 64Kb, Max 16Mb
-
-UID               0x100039CE 0x20011384
-
-VENDORID          VID_DEFAULT
-CAPABILITY        swevent ReadUserData WriteUserData NetworkServices UserEnvironment CAP_APPLICATION AllFiles
-
-LANG              SC
-
-SMPSAFE
-
-START RESOURCE    ../data/loadgen.rss
-HEADER
-TARGETPATH        APP_RESOURCE_DIR
-END
-
-START RESOURCE    ../data/loadgen_reg.rss
-DEPENDS           loadgen.rsg
-TARGETPATH        /private/10003a3f/apps
-END
-
-APP_LAYER_SYSTEMINCLUDE
-USERINCLUDE		  /epoc32/include/mw/http
-USERINCLUDE       ../inc
-SOURCEPATH        ../src
-
-SOURCE            loadgen_app.cpp
-SOURCE            loadgen_document.cpp 
-SOURCE            loadgen_appui.cpp
-SOURCE            loadgen_model.cpp
-SOURCE            loadgen_mainview.cpp 
-SOURCE            loadgen_maincontainer.cpp 
-SOURCE            loadgen_settingsviewdlg.cpp
-SOURCE            loadgen_editors.cpp
-
-USERINCLUDE       ../../../engine/inc
-SOURCEPATH        ../../../engine/src
-
-
-
-SOURCE            loadgen_loadbase.cpp
-SOURCE            loadgen_cpuload.cpp
-SOURCE            loadgen_memoryeat.cpp
-SOURCE            loadgen_phonecall.cpp
-SOURCE            loadgen_netconn.cpp
-SOURCE            loadgen_keypress.cpp
-SOURCE            loadgen_messages.cpp 
-SOURCE            loadgen_applications.cpp 
-SOURCE 			  loadgen_photocapture.cpp
-SOURCE			  loadgen_bluetooth.cpp 
-SOURCE			  loadgen_pointerevent.cpp
-SOURCE			  loadgen_utils.cpp
-SOURCE			  loadgen_httpreceiver.cpp
-
-LIBRARY           euser.lib
-LIBRARY           commonengine.lib
-LIBRARY           apparc.lib
-LIBRARY           cone.lib 
-LIBRARY           eikcore.lib
-LIBRARY           eikcoctl.lib
-LIBRARY           eikctl.lib
-LIBRARY           eikdlg.lib  
-LIBRARY           avkon.lib 
-LIBRARY           ws32.lib 
-LIBRARY           apgrfx.lib
-LIBRARY           efsrv.lib
-LIBRARY           bafl.lib
-LIBRARY           gdi.lib
-LIBRARY           aknicon.lib
-LIBRARY           aknskins.lib
-LIBRARY           aknskinsrv.lib
-LIBRARY           egul.lib
-LIBRARY           etel3rdparty.lib
-LIBRARY           downloadmgr.lib
-LIBRARY           commdb.lib
-LIBRARY           flogger.lib
-LIBRARY           estor.lib 
-LIBRARY           msgs.lib
-LIBRARY           smcm.lib
-LIBRARY           gsmu.lib
-LIBRARY           etext.lib
-LIBRARY           sendas2.lib
-LIBRARY  		  ecam.lib
-LIBRARY			  featdiscovery.lib 
-LIBRARY			  centralrepository.lib
-LIBRARY           esock.lib
-LIBRARY           bluetooth.lib
-LIBRARY			  hal.lib
-LIBRARY			  http.lib
-LIBRARY			  inetprotutil.lib
-
-// End of File
--- a/loadgen/ui/avkon/inc/loadgen_app.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef LOADGEN_APP_H
-#define LOADGEN_APP_H
-
-
-// INCLUDES
-#include <aknapp.h>
-
-// CONSTANTS
-// UID of the application
-const TUid KUidLoadGen = { 0x20011384 };
-
-// CLASS DECLARATION
-
-/**
-* CLoadGenApp application class.
-* Provides factory to create concrete document object.
-* 
-*/
-class CLoadGenApp : public CAknApplication
-    {
-    
-    public: // Functions from base classes
-        /**
-        * From CApaApplication, overridden to enable INI file support.
-        * @return A pointer to the dictionary store
-        */
-    CDictionaryStore* OpenIniFileLC(RFs& aFs) const;
-    private:
-
-        /**
-        * From CApaApplication, creates CLoadGenDocument document object.
-        * @return A pointer to the created document object.
-        */
-        CApaDocument* CreateDocumentL();
-        
-        /**
-        * From CApaApplication, returns application's UID (KUidLoadGen).
-        * @return The value of KUidLoadGen.
-        */
-        TUid AppDllUid() const;
-    };
-
-#endif
-
-// End of File
-
--- a/loadgen/ui/avkon/inc/loadgen_appui.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef LOADGEN_APPUI_H
-#define LOADGEN_APPUI_H
-
-// INCLUDES
-#include <eikapp.h>
-#include <eikdoc.h>
-#include <e32std.h>
-#include <coeccntx.h>
-#include <aknViewAppUi.h>
-#include <akntabgrp.h>
-#include <aknnavide.h>
-#include "loadgen_std.h"
-
-// FORWARD DECLARATIONS
-class CLoadGenModel;
-class CAknNavigationControlContainer;
-class CAknTabGroup;
-class CAknNavigationDecorator;
-
-
-// CLASS DECLARATIONS
-
-class CLoadGenAppUi : public CAknViewAppUi
-    {
-public: // constructors and destructor
-    void ConstructL();
-    ~CLoadGenAppUi();
-    
-private: // From MEikMenuObserver
-    void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
-private:
-    void HandleCommandL(TInt aCommand);
-
-    virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
-
-private: //Data
-    CLoadGenModel*                  iModel;
-    CAknNavigationControlContainer* iNaviPane;
-    CAknTabGroup*                   iTabGroup;
-    CAknNavigationDecorator*        iDecoratedTabGroup;
-    };
-
-#endif
-
-// End of File
--- a/loadgen/ui/avkon/inc/loadgen_document.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +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 LOADGEN_DOCUMENT_H
-#define LOADGEN_DOCUMENT_H
-
-// INCLUDES
-#include <AknDoc.h>
-   
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CEikAppUi;
-class CLoadGenModel;
-
-
-// CLASS DECLARATION
-
-/**
-*  CLoadGenDocument application class.
-*/
-class CLoadGenDocument : public CAknDocument
-    {
-    public: // Constructors and destructor
-        static CLoadGenDocument* NewL(CEikApplication& aApp);
-        virtual ~CLoadGenDocument();
-
-    public: // New functions
-
-    public:// from CEikDocument
-    CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs);
-    protected:  // New functions
-
-    protected:  // Functions from base classes
-
-    private:
-
-        /**
-        * EPOC default constructor.
-        */
-        CLoadGenDocument(CEikApplication& aApp);
-        void ConstructL();
-
-    private:
-
-        /**
-        * From CEikDocument, create CLoadGenAppUi "App UI" object.
-        */
-        CEikAppUi* CreateAppUiL();
-
-    public:
-        inline CLoadGenModel* Model() { return iModel; }
-
-    private:
-        CLoadGenModel* iModel;
-
-    };
-
-#endif
-
-// End of File
-
--- a/loadgen/ui/avkon/inc/loadgen_editors.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#ifndef LOADGEN_EDITORS_H
-#define LOADGEN_EDITORS_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <AknForm.h> 
-
-#include "loadgen_loadattributes.h"
-
-
-// FORWARD DECLARATIONS
-class CAknQueryValueText;
-class CAknQueryValueTextArray;
-
-// CLASS DECLARATIONS
-
-class CLoadGenLoadTypeEditorBase : public CAknForm
-    {
-protected: // Constructors
-    CLoadGenLoadTypeEditorBase(TBool aEditingExisting);
-    void ConstructL(const TDesC& aTitleText);        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-
-protected:  // New methods
-    virtual TBool DoRunQueryLD(TInt aResource);
-    
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-protected:  // New methods
-    void InsertFieldAfterL(TInt aResourceId, TInt aControlId, TInt aPrevControlId);
-    void UpdateFormL();
-
-protected: // Data
-    TBool iEditingExisting;
-    };
-
-
-
-
-class CLoadGenCPULoadEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenCPULoadEditor* NewL(TCPULoadAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenCPULoadEditor();
-
-private: // Constructors
-    CLoadGenCPULoadEditor(TCPULoadAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    void LoadCPUsL();
-    
-private: // Data
-    TCPULoadAttributes&         iAttributes;
-    CAknQueryValueText*         iCpuQueryValText;
-    CAknQueryValueTextArray*    iCpuTextArray;
-    CDesCArray*                 iCPUsArray;
-    };
-
-
-
-
-class CLoadGenMemoryEatEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenMemoryEatEditor* NewL(TMemoryEatAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenMemoryEatEditor();
-
-private: // Constructors
-    CLoadGenMemoryEatEditor(TMemoryEatAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    void UpdateAvailableMemoryL();
-
-private: // Data
-    TMemoryEatAttributes&              iAttributes;
-    }; 
-
-
-
-class CLoadGenPhoneCallEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenPhoneCallEditor* NewL(TPhoneCallAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenPhoneCallEditor();
-
-private: // Constructors
-    CLoadGenPhoneCallEditor(TPhoneCallAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    
-private: // Data
-    TPhoneCallAttributes&              iAttributes;
-    };
-
-
-
-class CLoadGenNetConnEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenNetConnEditor* NewL(TNetConnAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenNetConnEditor();
-
-private: // Constructors
-    CLoadGenNetConnEditor(TNetConnAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    
-private: // Data
-    TNetConnAttributes&              iAttributes;
-    };
-    
- 
- 
-
-class CLoadGenKeyPressEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenKeyPressEditor* NewL(TKeyPressAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenKeyPressEditor();
-
-private: // Constructors
-    CLoadGenKeyPressEditor(TKeyPressAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    
-private: // Data
-    TKeyPressAttributes&              iAttributes;
-    };
-
-class CLoadGenPointerEventEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenPointerEventEditor* NewL(TPointerEventAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenPointerEventEditor();
-
-private: // Constructors
-    CLoadGenPointerEventEditor(TPointerEventAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    
-private: // Data
-    TPointerEventAttributes&              iAttributes;
-    };
-
-
-
-class CLoadGenMessagesEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenMessagesEditor* NewL( TMessageAttributes& aAttributes, 
-                                         TBool aEditingExisting = EFalse );
-    virtual ~CLoadGenMessagesEditor();
-
-private: // Constructors
-    CLoadGenMessagesEditor( TMessageAttributes& aAttributes, 
-                            TBool aEditingExisting = EFalse );
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL( TInt aButtonId );    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL( TInt aControlId );
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL( TBool aFormInit = EFalse );
-    
-private: // Data
-    TMessageAttributes&              iAttributes;
-    };
-
-class CLoadGenApplicationsEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenApplicationsEditor* NewL( TApplicationsAttributes& aAttributes, 
-                                         TBool aEditingExisting = EFalse );
-    virtual ~CLoadGenApplicationsEditor();
-
-private: // Constructors
-    CLoadGenApplicationsEditor( TApplicationsAttributes& aAttributes, 
-                            TBool aEditingExisting = EFalse );
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL( TInt aButtonId );    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL( TInt aControlId );
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL( TBool aFormInit = EFalse );
-    
-private: // Data
-    TApplicationsAttributes&              iAttributes;
-    };
-
-class CLoadGenPhotoCaptureEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenPhotoCaptureEditor* NewL(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenPhotoCaptureEditor();
-
-private: // Constructors
-    CLoadGenPhotoCaptureEditor(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    void LoadCamerasL();
-    
-private: // Data
-    TPhotoCaptureAttributes&    iAttributes;
-    CAknQueryValueText*         iCameraQueryValText;
-    CAknQueryValueTextArray*    iCameraTextArray;
-    CDesCArray*                 iCamerasArray;
-    };
-
-class CLoadGenBluetoothEditor : public CLoadGenLoadTypeEditorBase
-    {
-public:
-    static CLoadGenBluetoothEditor* NewL(TBluetoothAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    virtual ~CLoadGenBluetoothEditor();
-
-private: // Constructors
-    CLoadGenBluetoothEditor(TBluetoothAttributes& aAttributes, TBool aEditingExisting=EFalse);
-    void ConstructL();        
-
-protected:  // From CEikDialog
-    TBool OkToExitL(TInt aButtonId);    
-    void PreLayoutDynInitL();
-    void HandleControlStateChangeL(TInt aControlId);
-        
-public:  // New methods
-    virtual TBool RunQueryLD();
-
-private:  // New methods
-    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
-    
-private: // Data
-    TBluetoothAttributes&              iAttributes;
-    };
-
-#endif
--- a/loadgen/ui/avkon/inc/loadgen_maincontainer.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#ifndef LOADGEN_VALUESCONTAINER_H
-#define LOADGEN_VALUESCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h> 
-#include <aknlists.h> 
-
-// FORWARD DECLARATIONS
-class CLoadGenModel;
-class CLoadGenCAknSingleGraphicStyleListBox;
-
-// CLASS DECLARATIONS
-
-class CLoadGenMainContainer : public CCoeControl, MCoeControlObserver, MEikListBoxObserver
-    {
-public:
-    void ConstructL(const TRect& aRect);
-    ~CLoadGenMainContainer();
-
-private:
-    void SizeChanged();  
-    TInt CountComponentControls() const;
-    CCoeControl* ComponentControl(TInt aIndex) const;
-    void Draw(const TRect& aRect) const;
-    void HandleResourceChange(TInt aType);
-    void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);  // From MEikListBoxObserver
-    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);  // From MCoeControlObserver
-    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
-public:
-    const CArrayFix<TInt>* ListBoxSelectionIndexes();
-    TInt ListBoxSelectionIndexesCount();
-    void SetDefaultTitlePaneTextL();
-    TInt CurrentListBoxItemIndex();
-    void SetListBoxTextArrayL(CDesCArray* aTextArray);
-    inline CLoadGenCAknSingleGraphicStyleListBox* ListBox() { return iListBox; }
-
-private:
-    CLoadGenModel*                              iModel;
-    CLoadGenCAknSingleGraphicStyleListBox*      iListBox;
-    };
-
-class CLoadGenCAknSingleGraphicStyleListBox : public CAknSingleGraphicStyleListBox
-    {
-    void SizeChanged();
-    void SizeChangedL();
-    };
-        
-#endif
-
-// End of File
--- a/loadgen/ui/avkon/inc/loadgen_mainview.h	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#ifndef LOADGEN_VALUESVIEW_H
-#define LOADGEN_VALUESVIEW_H
-
-// INCLUDES
-#include <aknview.h>
-
-#include "loadgen_std.h"
-
-
-
-// CONSTANTS
-// UID of view
-const TUid KMainViewUID = {1};
-
-
-// FORWARD DECLARATIONS
-class CLoadGenMainContainer;
-class CLoadGenModel;
-
-
-// CLASS DECLARATION
-
-/**
-*  CLoadGenMainView view class.
-* 
-*/
-class CLoadGenMainView : public CAknView
-    {
-    public: // Constructors and destructor
-        void ConstructL();
-        ~CLoadGenMainView();
-
-    public: // Functions from base classes
-        TUid Id() const;
-        void HandleCommandL(TInt aCommand);
-        void HandleClientRectChange();
-
-    private: // From MEikMenuObserver
-        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
-    private: // From AknView
-        void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
-        void DoDeactivate();
-
-    private: // Data
-        CLoadGenMainContainer*        iContainer;
-        CLoadGenModel*                  iModel;
-    };
-
-#endif
-
-// End of File
--- a/loadgen/ui/avkon/inc/loadgen_model.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +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 LOADGEN_MODEL_H
-#define LOADGEN_MODEL_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <apgcli.h>
-
-#include "loadgen_loadattributes.h"
-
-// FORWARD DECLARATIONS
-class CLoadGenMainContainer;
-class CLoadGenGraphsContainer;
-class CEikonEnv;
-class CLoadBase;
-
-
-typedef CArrayFixSeg<CLoadBase*> CLoadItemList;
-
-const TUint KMaxCPUs = 4;
-
-// CLASS DECLARATIONS
-
-class TLoadGenSettings
-    {
-public:
-    };
-
-class CLoadGenModel : public CActive
-    {
-private:
-    enum TContainerDrawState
-        {
-        EDrawStateInvalid = -1,
-        EDrawStateMain
-        };
-
-public:
-    static CLoadGenModel* NewL();
-    ~CLoadGenModel();
-    void ActivateModelL();
-    void DeActivateModelL();
-
-private:
-    void RunL();
-    void DoCancel();
-        
-private:
-    CLoadGenModel();
-    void ConstructL();
-    void LoadSettingsL();
-    void EditLoadL(CLoadBase* aItem);
-    void DoStartNewLoadL(TInt aCommand);
-    void AppendToLoadItemListL(CLoadBase* aItem);
-    void DeleteFromLoadItemListL(TInt aIndex);
-    void SuspendOrResumeFromLoadItemListL(TInt aIndex);
-    void DeleteAllLoadItems();
-    void RefreshViewL(TBool aClearSelection=ETrue);
-    CDesCArray* ListOfAllAppsL();    
-    
-public:
-    void StopAllLoadItemsL();
-    void SuspendAllLoadItemsL();
-    void ResumeAllLoadItemsL();
-            
-    TInt LoadItemCount() const;
-    void ShowItemActionMenuL();
-    void StopSelectedOrHighlightedItemsL();
-    void SuspendOrResumeSelectedOrHighlightedItemsL();
-
-    CDesCArray* GenerateListBoxItemTextArrayL();
-    void StartNewLoadL(TInt aCommand);
-    void SaveSettingsL();
-    void SetMainContainer(CLoadGenMainContainer* aContainer);
-    TInt LaunchSettingsDialogL();
-    inline TLoadGenSettings& Settings() { return iSettings; }
-    inline CEikonEnv* EikonEnv() { return iEnv; }
-    inline RApaLsSession& LsSession() { return iLs; }
-    inline CLoadGenMainContainer* MainContainer() { return iMainContainer; }
-    inline TBool LoadItemsExists() { return iLoadItemList->Count() > 0; } 
-
-
-private:
-    RTimer                          iTimer;
-    CLoadGenMainContainer*          iMainContainer;
-    CEikonEnv*                      iEnv;
-    TLoadGenSettings                iSettings;
-    RApaLsSession                   iLs;
-    TInt                            iDrawState;
-    CLoadItemList*                  iLoadItemList;
-    TInt                            iReferenceNumber;
-    TCPULoadAttributes              iCpuLoadAttributes;
-    TMemoryEatAttributes            iMemoryEatAttributes;
-    TPhoneCallAttributes            iPhoneCallAttributes;
-    TNetConnAttributes              iNetConnAttributes;
-    TKeyPressAttributes             iKeyPressAttributes;
-    TMessageAttributes              iMessageAttributes;
-    TApplicationsAttributes			iApplicationsAttributes;
-    TPhotoCaptureAttributes         iPhotoCaptureAttributes;
-    TBluetoothAttributes            iBluetoothAttributes;
-    TPointerEventAttributes         iPointerEventAttributes;
-    static TInt64                   iRandomNumberSeed;
-    };
- 
-
-#endif
--- a/loadgen/ui/avkon/inc/loadgen_settingsviewdlg.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +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 LOADGEN_SETTINGSVIEWDLG_H
-#define LOADGEN_SETTINGSVIEWDLG_H
-
-//  INCLUDES
-#include <AknDialog.h>
-#include <eiklbo.h>
-#include <AknTabObserver.h> 
-#include <akntabgrp.h>
-
-//  FORWARD DECLARATIONS
-class CAknSettingItemArray;
-class CAknSettingStyleListBox;
-class CAknNavigationControlContainer;
-class CAknNavigationDecorator;
-class CAknTabGroup; 
-class TLoadGenSettings;
-
-
-//  CLASS DEFINITIONS
-
-class CLoadGenSettingsViewDlg : public CAknDialog, public MEikListBoxObserver, public MAknTabObserver
-    {
-public:
-    static CLoadGenSettingsViewDlg* NewL(TLoadGenSettings& aSettings);
-    virtual ~CLoadGenSettingsViewDlg();
-
-public: // From MEikListBoxObserver
-    void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
-public: // From MAknTabObserver
-    void TabChangedL(TInt aIndex); 
-
-public: // From CAknDialog
-    void ProcessCommandL(TInt aCommandId);
-
-protected: // From CEikDialog
-    TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
-    void PreLayoutDynInitL();
-    TBool OkToExitL(TInt aButtonId);    
-
-private: // New methods
-    void ShowSettingPageL(TBool aCalledFromMenu);
-    void SetVisibilitiesOfSettingItemsL();
-    void UpdateListBoxL();
-    void AddSettingItemL(TInt aId, TInt aTitleResource, TInt aSettingPageResource, TInt aAssociatedResource, TInt aOrdinal);
-
-private: // Constructors
-    CLoadGenSettingsViewDlg(TLoadGenSettings& aSettings);
-    void ConstructL();        
-
-private: // Data
-    CAknSettingItemArray*               iSettingItemArray;
-    CAknSettingStyleListBox*            iListBox;
-    CAknNavigationControlContainer*     iNaviContainer;
-    CAknNavigationDecorator*            iDecoratedTabGroup;
-    CAknTabGroup*                       iTabGroup;
-    TLoadGenSettings&               iSettings;
-    };
-
-
-#endif
-
-// End of File
-
--- a/loadgen/ui/avkon/rom/loadgen.iby	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-
-#ifndef __LOADGEN_IBY__
-#define __LOADGEN_IBY__
-
-S60_APP_EXE(LoadGen)
-S60_APP_AIF_ICONS(LoadGen)
-S60_APP_RESOURCE(LoadGen)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,LoadGen_ExtraIcons)
-#ifdef S60_UPGRADABLE_APP_REG_RSC
-  S60_UPGRADABLE_APP_REG_RSC(LoadGen)
-#else
-  S60_APP_AIF_RSC(LoadGen)
-#endif
-
-data=ZPRIVATE\20011384\backup_registration.xml        	private\20011384\backup_registration.xml
-data=ZSYSTEM\Install\LoadGen_stub.sis                   \system\install\LoadGen_stub.sis
-
-#endif // __LOADGEN_IBY__
--- a/loadgen/ui/avkon/src/loadgen_app.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +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 FILES
-#include "loadgen_app.h"
-#include "loadgen_document.h"
-
-#include <eikstart.h>
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CLoadGenApp::AppDllUid()
-// Returns application UID
-// ---------------------------------------------------------
-//
-TUid CLoadGenApp::AppDllUid() const
-    {
-    return KUidLoadGen;
-    }
-
-// ---------------------------------------------------------
-// CDictionaryStore* CLoadGenApp::OpenIniFileLC(RFs& aFs) const
-// overrides CAknApplication::OpenIniFileLC to enable INI file support
-// ---------------------------------------------------------
-//
-CDictionaryStore* CLoadGenApp::OpenIniFileLC(RFs& aFs) const
-    {
-    return CEikApplication::OpenIniFileLC(aFs);
-    }
-   
-// ---------------------------------------------------------
-// CLoadGenApp::CreateDocumentL()
-// Creates CLoadGenDocument object
-// ---------------------------------------------------------
-//
-CApaDocument* CLoadGenApp::CreateDocumentL()
-    {
-    return CLoadGenDocument::NewL( *this );
-    }
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-
-LOCAL_C CApaApplication* NewApplication()
-    {
-    return new CLoadGenApp;
-    }
-
-
-GLDEF_C TInt E32Main()
-    {
-    return EikStart::RunApplication(NewApplication);
-    }
-   
-
-// End of File  
-
--- a/loadgen/ui/avkon/src/loadgen_appui.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +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 FILES
-#include "loadgen_appui.h"
-#include "loadgen_mainview.h"
-#include "loadgen.hrh"
-#include "loadgen_model.h"
-#include "loadgen_document.h"
-#include <loadgen.rsg>
-
-#include <avkon.hrh>
-#include <AknQueryDialog.h>
-#include <aknmessagequerydialog.h> 
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-void CLoadGenAppUi::ConstructL()
-    {
-    // disable window server priority control for this application
-    iEikonEnv->WsSession().ComputeMode( RWsSession::EPriorityControlDisabled );
-    
-    // set as system application to prevent getting shut down events 
-    iEikonEnv->SetSystem(ETrue);
-        
-
-    BaseConstructL(EAknEnableSkin);
-
-    iModel = static_cast<CLoadGenDocument*>(reinterpret_cast<CEikAppUi*>(iEikonEnv->AppUi())->Document())->Model();
-
-    CLoadGenMainView* mainView = new(ELeave) CLoadGenMainView;
-    CleanupStack::PushL(mainView);
-    mainView->ConstructL();
-    AddViewL(mainView);           // transfer ownership to CAknViewAppUi
-    CleanupStack::Pop();          // mainView
-    
-    SetDefaultViewL(*mainView);
-
-    // notify the model that everything has been constructed
-    iModel->ActivateModelL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenAppUi::~CLoadGenAppUi()
-    {
-    // notify the model that the application is closing 
-    if (iModel)   
-        TRAP_IGNORE(iModel->DeActivateModelL());
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
-    {
-    if (aResourceId == R_LOADGEN_APP_MENU)
-        {
-        aMenuPane->SetItemDimmed(ELoadGenStopAll, !iModel->LoadItemsExists());
-        aMenuPane->SetItemDimmed(ELoadGenSuspendAll, !iModel->LoadItemsExists());
-        aMenuPane->SetItemDimmed(ELoadGenResumeAll, !iModel->LoadItemsExists());
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TKeyResponse CLoadGenAppUi::HandleKeyEventL(const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/)
-    {
-    return EKeyWasNotConsumed;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenAppUi::HandleCommandL(TInt aCommand)
-    {
-    switch ( aCommand )
-        {
-        case ELoadGenCmdLaunchPerfMon:
-            {
-            // launch Performance Monitor
-            const TUid KUidPerfMon = { 0x20011385 };
-            
-            RWsSession ws;
-            User::LeaveIfError( ws.Connect() );
-            CleanupClosePushL(ws);
-            
-            RApaLsSession ls;
-            User::LeaveIfError( ls.Connect() );
-            CleanupClosePushL(ls);
-            
-            
-            // try to find the task of PerfMon
-            TApaTaskList tasklist(ws);
-            TApaTask task = tasklist.FindApp(KUidPerfMon);
-
-            if (task.Exists())
-                {
-                // task exists, bring it to foreground
-                task.BringToForeground();
-                }
-            else
-                {
-                TApaAppInfo appInfo;
-                User::LeaveIfError(ls.GetAppInfo(appInfo, KUidPerfMon));
-                
-                CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
-                cmdLine->SetExecutableNameL(appInfo.iFullName);
-                cmdLine->SetCommandL(EApaCommandBackground);
-
-                // start the app
-                User::LeaveIfError(ls.StartApp(*cmdLine));
-                
-                CleanupStack::PopAndDestroy(); //cmdLine                
-                }
-            
-            CleanupStack::PopAndDestroy(2); //ws,ls
-            }
-            break;
-            
-        case ELoadGenCmdAbout:
-            {
-            CAknMessageQueryDialog* dialog = new(ELeave) CAknMessageQueryDialog;
-            dialog->ExecuteLD(R_LOADGEN_ABOUT_DIALOG);
-            }
-            break;
-            
-        // a normal way to close an application
-        case EAknCmdExit:
-        case EEikCmdExit:
-        case EAknSoftkeyExit: 
-            {
-            Exit();
-            }
-            break;
-
-        default:
-            break;      
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-// End of File  
--- a/loadgen/ui/avkon/src/loadgen_document.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +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 FILES
-#include "loadgen_document.h"
-#include "loadgen_appui.h"
-#include "loadgen_model.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// constructor
-CLoadGenDocument::CLoadGenDocument(CEikApplication& aApp)
-: CAknDocument(aApp)    
-    {
-    }
-
-// ----------------------------------------------------
-
-// destructor
-CLoadGenDocument::~CLoadGenDocument()
-    {
-    delete iModel;
-    }
-
-// ----------------------------------------------------
-
-// EPOC default constructor can leave.
-void CLoadGenDocument::ConstructL()
-    {
-    iModel = CLoadGenModel::NewL();
-    }
-
-// ----------------------------------------------------
-
-// Two-phased constructor.
-CLoadGenDocument* CLoadGenDocument::NewL(CEikApplication& aApp)
-    {
-    CLoadGenDocument* self = new(ELeave) CLoadGenDocument(aApp);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-    }
-    
-// ----------------------------------------------------
-// CLoadGenDocument::CreateAppUiL()
-// constructs CLoadGenAppUi
-// ----------------------------------------------------
-//
-CEikAppUi* CLoadGenDocument::CreateAppUiL()
-    {
-    return new (ELeave) CLoadGenAppUi;
-    }
-
-// ----------------------------------------------------
-// CLoadGenDocument::OpenFileL
-// Overrides CAknDocument::OpenFileL to support document file
-// ----------------------------------------------------
-//
-CFileStore* CLoadGenDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs)
-    {
-    return CEikDocument::OpenFileL(aDoOpen, aFilename, aFs);
-    }
-
-// ----------------------------------------------------
-
-// End of File  
--- a/loadgen/ui/avkon/src/loadgen_editors.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1437 +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 FILES
-#include "loadgen_editors.h"
-#include "loadgen_loadattributes.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-
-#include <AknForm.h> 
-#include <eikedwin.h> 
-#include <eikmfne.h>
-#include <AknPopupFieldText.h>
-#include <AknQueryValueText.h>
-#include <eikspane.h> 
-#include <akntitle.h> 
-#include <eikcapc.h>
-#include <e32hal.h> 
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenLoadTypeEditorBase::CLoadGenLoadTypeEditorBase(TBool aEditingExisting):
-    iEditingExisting(aEditingExisting)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenLoadTypeEditorBase::ConstructL(const TDesC& aTitleText)
-    {
-    CAknForm::ConstructL();
-
-    // set title text
-    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
-    CAknTitlePane* tp = static_cast<CAknTitlePane*>( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-    tp->SetTextL( aTitleText );
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenLoadTypeEditorBase::PreLayoutDynInitL()
-    {
-    CAknForm::PreLayoutDynInitL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenLoadTypeEditorBase::OkToExitL(TInt /*aButtonId*/)
-    {
-    return ETrue;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(TInt aControlId)
-    {
-    CAknForm::HandleControlStateChangeL(aControlId);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenLoadTypeEditorBase::RunQueryLD()
-    {
-    User::Panic(_L("Unk.form"), 222);
-    
-    return ETrue;
-    }
-               
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenLoadTypeEditorBase::DoRunQueryLD(TInt aResource)
-    {
-    return ExecuteLD(aResource);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenLoadTypeEditorBase::InsertFieldAfterL(TInt aResourceId, TInt aControlId, TInt aPrevControlId)
-    {
-    CCoeControl* prevControl = Control(aPrevControlId);
-    __ASSERT_DEBUG(prevControl, User::Panic(_L("Form.Ctrl.Null"), 111));
-    TInt pos = FindLineIndex(*prevControl);
-    pos = pos + 1;
-    InsertLineL(pos, aResourceId);
-    Line(aControlId)->ActivateL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenLoadTypeEditorBase::UpdateFormL()
-    {
-    UpdatePageL(ETrue);
-    }
-               
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenCPULoadEditor* CLoadGenCPULoadEditor::NewL(TCPULoadAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenCPULoadEditor* self = new(ELeave) CLoadGenCPULoadEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenCPULoadEditor::~CLoadGenCPULoadEditor()
-    {
-    delete iCpuQueryValText;
-    delete iCpuTextArray;
-    delete iCPUsArray;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenCPULoadEditor::CLoadGenCPULoadEditor(TCPULoadAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenCPULoadEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("CPU load"));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenCPULoadEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryPriority));
-    CAknPopupFieldText* edMode = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryMode));
-    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryType));
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
-    edMode->SetCurrentValueIndex(iAttributes.iMode);
-    edType->SetCurrentValueIndex(iAttributes.iType);
-    
-    LoadCPUsL();
-
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenCPULoadEditor::LoadCPUsL()
-    {
-    // if we are running in SMP environment
-    if (iAttributes.iCpuCount > 1)
-        {
-        // insert possibility to select which cpu the load is generated to
-        InsertFieldAfterL(R_CPULOAD_DLG_LINE_CPU, ELoadGenCPULoadQueryCpu, ELoadGenCPULoadQueryType);
-
-        iCPUsArray = new (ELeave) CDesCArrayFlat( 5 );
-        
-        // "Free scheduling" means that no specific cpu is selected. Scheduler desides
-        // which CPUu runs load thread at which time.
-        iCPUsArray->AppendL(_L("Free scheduling"));
-        
-        // add CPUs
-        for (int i = 0; i < iAttributes.iCpuCount; i++) 
-            {
-            TBuf<10> cpu;
-            _LIT(KCPU, "CPU%d");
-            cpu.Format(KCPU, i);
-            iCPUsArray->AppendL(cpu);
-            }
-        
-        // "All CPUs" means that one thread is started for each CPU.
-        iCPUsArray->AppendL(_L("All CPUs"));
-    
-        iCpuTextArray = CAknQueryValueTextArray::NewL();
-        iCpuTextArray->SetArray( *iCPUsArray );  
-        iCpuQueryValText = CAknQueryValueText::NewL();    
-        iCpuQueryValText->SetArrayL( iCpuTextArray );
-        // CPU is not defined, set "Free scheduling" as default selection in query list
-        if (iAttributes.iCpu < 0)
-            {
-            iCpuQueryValText->SetCurrentValueIndex(0);
-            }
-        // "All CPUs" selected. It is last choise in the selection list.
-        else if (iAttributes.iCpu == KCPUSelection_AllCPUs)
-            {
-            iCpuQueryValText->SetCurrentValueIndex(iCpuTextArray->MdcaCount()-1);
-            }
-        // CPU is defined, set the correct CPU as default selection in query list
-        else
-            {
-            // iCpu starts from zero (i.e. CPU0 is first CPU), but index zero
-            // in iCpuQueryValText is "Free scheduling", hence iCpu+1.
-            iCpuQueryValText->SetCurrentValueIndex(iAttributes.iCpu+1);
-            }
-
-        CAknPopupField* popup = static_cast<CAknPopupField*>(Control( ELoadGenCPULoadQueryCpu)); 
-        popup->SetQueryValueL( iCpuQueryValText );
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenCPULoadEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryPriority));
-        CAknPopupFieldText* edMode = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryMode));
-        CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryType));
-        CEikNumberEditor* edPeak = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenCPULoadQueryLength));
-        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenCPULoadQueryIdle));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenCPULoadQueryVariance));
-        
-        // we are running in SMP environment
-        if (iAttributes.iCpuCount > 1)
-            {
-            TInt currentValueIndex = iCpuQueryValText->CurrentValueIndex();
-            // user selected a specific CPU in which the load thread should be run in.
-            if (currentValueIndex == 0)
-                {
-                // User selected "Free scheduling"
-                iAttributes.iCpu = KCPUSelection_FreeScheduling;
-                }            
-            else if( currentValueIndex == iCpuTextArray->MdcaCount()-1 )
-                {
-                // User selected "All CPUs", which is the last item in the selection list
-                iAttributes.iCpu = KCPUSelection_AllCPUs;
-                }
-            else
-                {                
-                // iCpu should start from zero (CPU0 is the first cpu)
-                // but zero in currentValueIndex means "Free scheduling". CPU0 in
-                // currentValueIndex is at index 1, hence -1.
-                iAttributes.iCpu = currentValueIndex - 1;
-                }
-            }
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        iAttributes.iMode = edMode->CurrentValueIndex();
-        iAttributes.iType = edType->CurrentValueIndex();
-        if (edPeak) iAttributes.iLength = edPeak->Number();
-        if (edIdle) iAttributes.iIdle = edIdle->Number();
-        if (edVariance) iAttributes.iRandomVariance = edVariance->Number();
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenCPULoadEditor::UpdateVisibilitiesOfFieldsL(TBool aFormInit)
-    {
-    // filter based on selected cpu load type
-    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>( Control( ELoadGenCPULoadQueryType ) );
-
-    if ( !aFormInit && edType->CurrentValueIndex() == ECpuLoadTypeContinuous )
-        {
-        // save values before deleting the items
-        CCoeControl* control = ControlOrNull( ELoadGenCPULoadQueryLength );
-        if ( control )
-            {
-            CEikNumberEditor* edPeak = static_cast<CEikNumberEditor*>( control );
-            iAttributes.iLength = edPeak->Number();
-            DeleteLine( ELoadGenCPULoadQueryLength );
-            control = NULL;
-            }
-        control = ControlOrNull( ELoadGenCPULoadQueryIdle );
-        if ( control )
-            {
-            CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>( control );
-            iAttributes.iIdle = edIdle->Number();
-            DeleteLine( ELoadGenCPULoadQueryIdle );
-            control = NULL;
-            }
-        control = ControlOrNull( ELoadGenCPULoadQueryVariance );
-        if ( control )
-            {
-            CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>( control );
-            iAttributes.iRandomVariance = edVariance->Number();
-            DeleteLine( ELoadGenCPULoadQueryVariance );
-            }
-        }
-    else if ( edType->CurrentValueIndex() == ECpuLoadTypePeriodic )
-        {
-        // insert new fields
-        InsertFieldAfterL(R_CPULOAD_DLG_LINE_PERIODIC_LENGTH, ELoadGenCPULoadQueryLength, ELoadGenCPULoadQueryType);
-        InsertFieldAfterL(R_CPULOAD_DLG_LINE_PERIODIC_IDLE, ELoadGenCPULoadQueryIdle, ELoadGenCPULoadQueryLength);
-        InsertFieldAfterL(R_CPULOAD_DLG_LINE_PERIODIC_VARIANCE, ELoadGenCPULoadQueryVariance, ELoadGenCPULoadQueryIdle);
-        
-        // load values to just created editors
-        CEikNumberEditor* edPeak = static_cast<CEikNumberEditor*>(Control(ELoadGenCPULoadQueryLength));
-        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenCPULoadQueryIdle));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenCPULoadQueryVariance));
-        edPeak->SetNumber(iAttributes.iLength);
-        edIdle->SetNumber(iAttributes.iIdle);
-        edVariance->SetNumber(iAttributes.iRandomVariance);
-        }
-
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenCPULoadEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-
-    // update visibilities of fields    
-    if (aControlId == ELoadGenCPULoadQueryType)
-        {
-        UpdateVisibilitiesOfFieldsL();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenCPULoadEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_CPULOAD_FORM_DIALOG);
-    }
-       
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenMemoryEatEditor* CLoadGenMemoryEatEditor::NewL(TMemoryEatAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenMemoryEatEditor* self = new(ELeave) CLoadGenMemoryEatEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenMemoryEatEditor::~CLoadGenMemoryEatEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenMemoryEatEditor::CLoadGenMemoryEatEditor(TMemoryEatAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMemoryEatEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("Memory eat"));
-    
-    // convert int64 vals to descs
-    iAttributes.iAmountDes.Copy(KNullDesC);
-    iAttributes.iRandomMinDes.Copy(KNullDesC);
-    iAttributes.iRandomMaxDes.Copy(KNullDesC);
-    
-    iAttributes.iAmountDes.AppendNum(iAttributes.iAmount);
-    iAttributes.iRandomMinDes.AppendNum(iAttributes.iRandomMin);
-    iAttributes.iRandomMaxDes.AppendNum(iAttributes.iRandomMax);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMemoryEatEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryPriority));
-    CAknPopupFieldText* edSource = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQuerySource));
-    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryType));
-    CEikNumberEditor* edBuffer = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryBuffer));
-    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryIdle));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryVariance));
-
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
-    edSource->SetCurrentValueIndex(iAttributes.iSource);
-    edType->SetCurrentValueIndex(iAttributes.iType);
-    edBuffer->SetNumber(iAttributes.iBuffer);
-    edIdle->SetNumber(iAttributes.iIdle);
-    edVariance->SetNumber(iAttributes.iRandomVariance);
-            
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    UpdateAvailableMemoryL();
-    
-    // set source as dimmed if editing existing item
-    if (iEditingExisting)
-        {
-        SetLineDimmedNow(ELoadGenMemoryEatQuerySource, ETrue); 
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenMemoryEatEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryPriority));
-        CAknPopupFieldText* edSource = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQuerySource));
-        CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryType));
-        CEikNumberEditor* edBuffer = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryBuffer));
-        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryIdle));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        iAttributes.iSource = edSource->CurrentValueIndex();
-        iAttributes.iType = edType->CurrentValueIndex();
-        iAttributes.iBuffer = edBuffer->Number();
-        iAttributes.iIdle = edIdle->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-
-
-        CEikEdwin* edAmount = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryAmount));
-        CEikEdwin* edRandomMin = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryRandomMin));
-        CEikEdwin* edRandomMax = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryRandomMax));
-
-        // get desc values and convert to int64
-        if (edAmount)
-            {
-            edAmount->GetText(iAttributes.iAmountDes);
-
-            TLex converter;
-            converter.Assign(iAttributes.iAmountDes);
-            User::LeaveIfError(converter.Val(iAttributes.iAmount));
-            }
-
-        if (edRandomMin)
-            {
-            edRandomMin->GetText(iAttributes.iRandomMinDes);
-
-            TLex converter;
-            converter.Assign(iAttributes.iRandomMinDes);
-            User::LeaveIfError(converter.Val(iAttributes.iRandomMin));
-            }
-
-        if (edRandomMax)
-            {
-            edRandomMax->GetText(iAttributes.iRandomMaxDes);
-
-            TLex converter;
-            converter.Assign(iAttributes.iRandomMaxDes);
-            User::LeaveIfError(converter.Val(iAttributes.iRandomMax));
-            
-            // swap min max values if they in wrong order
-            if (iAttributes.iRandomMin > iAttributes.iRandomMax)
-                {
-                TInt64 temp(iAttributes.iRandomMin);
-                iAttributes.iRandomMin = iAttributes.iRandomMax;
-                iAttributes.iRandomMax = temp; 
-                }
-            
-            }                        
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMemoryEatEditor::UpdateVisibilitiesOfFieldsL(TBool aFormInit)
-    {
-    // filter based on selected memory eat type
-    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryType));
-
-    if (!aFormInit && (edType->CurrentValueIndex() == EMemoryEatTypeMemoryToEat || edType->CurrentValueIndex() == EMemoryEatTypeMemoryToBeLeft))
-        {
-        // no need for changes if amount field is already active
-        CEikNumberEditor* edAmount = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenMemoryEatQueryAmount));
-        if (edAmount) return;
-        
-        // save values before deleting the items
-        CEikEdwin* edRandomMin = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMin));
-        CEikEdwin* edRandomMax = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMax));
-        edRandomMin->GetText(iAttributes.iRandomMinDes);
-        edRandomMax->GetText(iAttributes.iRandomMaxDes);
-        
-        DeleteLine(ELoadGenMemoryEatQueryRandomMin);
-        DeleteLine(ELoadGenMemoryEatQueryRandomMax);
-        }
-    else if (!aFormInit && edType->CurrentValueIndex() == EMemoryEatTypeWavy)
-        {
-        // save values before deleting the items
-        CEikEdwin* edAmount = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryAmount));
-        edAmount->GetText(iAttributes.iAmountDes);
-        
-        DeleteLine(ELoadGenMemoryEatQueryAmount);
-        }
-    
-    if (edType->CurrentValueIndex() == EMemoryEatTypeMemoryToEat || edType->CurrentValueIndex() == EMemoryEatTypeMemoryToBeLeft)
-        {
-        // insert new fields
-        InsertFieldAfterL(R_MEMORYEAT_DLG_LINE_AMOUNT, ELoadGenMemoryEatQueryAmount, ELoadGenMemoryEatQueryType);
-        
-        // load values to just created editors
-        CEikEdwin* edAmount = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryAmount));
-        edAmount->SetTextL(&iAttributes.iAmountDes);
-        }
-    else if (edType->CurrentValueIndex() == EMemoryEatTypeWavy)
-        {
-        // insert new fields
-        InsertFieldAfterL(R_MEMORYEAT_DLG_LINE_RANDOM_MIN, ELoadGenMemoryEatQueryRandomMin, ELoadGenMemoryEatQueryType);
-        InsertFieldAfterL(R_MEMORYEAT_DLG_LINE_RANDOM_MAX, ELoadGenMemoryEatQueryRandomMax, ELoadGenMemoryEatQueryRandomMin);
-        
-        // load values to just created editors
-        CEikEdwin* edRandomMin = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMin));
-        CEikEdwin* edRandomMax = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMax));
-        edRandomMin->SetTextL(&iAttributes.iRandomMinDes);
-        edRandomMax->SetTextL(&iAttributes.iRandomMaxDes);
-        }
-    
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMemoryEatEditor::UpdateAvailableMemoryL()
-    {
-    // this feature is used only when not editing existing load
-    if (!iEditingExisting)
-        {
-        CAknPopupFieldText* edSource = static_cast<CAknPopupFieldText*>(ControlOrNull(ELoadGenMemoryEatQuerySource));
-        CEikEdwin* edAmount = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryAmount));
-        
-        if (edAmount && edSource)
-            {
-            iAttributes.iAmountDes.Copy(KNullDesC);
-
-            if (edSource->CurrentValueIndex() == EMemoryEatSourceTypeRAM)
-                {
-                // RAM
-                TMemoryInfoV1Buf ramMemory;
-                UserHal::MemoryInfo(ramMemory);
-                
-                iAttributes.iAmountDes.AppendNum(ramMemory().iFreeRamInBytes);
-                }
-            else
-                {
-                // get drive
-                TVolumeInfo volumeInfo;
-                if (CEikonEnv::Static()->FsSession().Volume(volumeInfo, edSource->CurrentValueIndex()+1) == KErrNone)
-                    {
-                    iAttributes.iAmountDes.AppendNum(volumeInfo.iFree);
-                    }
-                else
-                    {
-                    iAttributes.iAmountDes.AppendNum(0);
-                    }
-                }
-
-            edAmount->SetTextL(&iAttributes.iAmountDes);
-            }        
-        }
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMemoryEatEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-    
-    // update visibilities of fields    
-    if (aControlId == ELoadGenMemoryEatQueryType)
-        {
-        UpdateVisibilitiesOfFieldsL();
-        }
-    
-    // update memory when source changes
-    else if (aControlId == ELoadGenMemoryEatQuerySource)
-        {
-        UpdateAvailableMemoryL();
-        }
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenMemoryEatEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_MEMORYEAT_FORM_DIALOG);
-    }
-
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPhoneCallEditor* CLoadGenPhoneCallEditor::NewL(TPhoneCallAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenPhoneCallEditor* self = new(ELeave) CLoadGenPhoneCallEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPhoneCallEditor::~CLoadGenPhoneCallEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPhoneCallEditor::CLoadGenPhoneCallEditor(TPhoneCallAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhoneCallEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("Phone calls"));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhoneCallEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-    
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhoneCallQueryPriority));
-    CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenPhoneCallQueryDestination));
-    CEikNumberEditor* edLength = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryLength));
-    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryIdle));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryVariance));
-
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
-    edDestination->SetTextL(&iAttributes.iDestination);   
-    edLength->SetNumber(iAttributes.iLength);   
-    edIdle->SetNumber(iAttributes.iIdle);   
-    edVariance->SetNumber(iAttributes.iRandomVariance);   
-    
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenPhoneCallEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhoneCallQueryPriority));
-        CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenPhoneCallQueryDestination));
-        CEikNumberEditor* edLength = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryLength));
-        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryIdle));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        edDestination->GetText(iAttributes.iDestination);
-        iAttributes.iLength = edLength->Number();
-        iAttributes.iIdle = edIdle->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhoneCallEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhoneCallEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenPhoneCallEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_PHONECALL_FORM_DIALOG);
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenNetConnEditor* CLoadGenNetConnEditor::NewL(TNetConnAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenNetConnEditor* self = new(ELeave) CLoadGenNetConnEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenNetConnEditor::~CLoadGenNetConnEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenNetConnEditor::CLoadGenNetConnEditor(TNetConnAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenNetConnEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("Network conn."));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenNetConnEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-    
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenNetConnQueryPriority));
-    CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenNetConnQueryDestination));
-    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryIdle));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryVariance));
-
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
-    edDestination->SetTextL(&iAttributes.iDestination);   
-    edIdle->SetNumber(iAttributes.iIdle);   
-    edVariance->SetNumber(iAttributes.iRandomVariance);
-       
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenNetConnEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenNetConnQueryPriority));
-        CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenNetConnQueryDestination));
-        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryIdle));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        edDestination->GetText(iAttributes.iDestination);
-        iAttributes.iIdle = edIdle->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenNetConnEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenNetConnEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenNetConnEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_NETCONN_FORM_DIALOG);
-    }
-
-// --------------------------------------------------------------------------------------------
-       
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenKeyPressEditor* CLoadGenKeyPressEditor::NewL(TKeyPressAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenKeyPressEditor* self = new(ELeave) CLoadGenKeyPressEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenKeyPressEditor::~CLoadGenKeyPressEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenKeyPressEditor::CLoadGenKeyPressEditor(TKeyPressAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenKeyPressEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("Key presses"));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenKeyPressEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenKeyPressQueryPriority));
-    CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryHeartBeat));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryVariance));
-
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
-    edHeartBeat->SetNumber(iAttributes.iHeartBeat);
-    edVariance->SetNumber(iAttributes.iRandomVariance);
-
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenKeyPressEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenKeyPressQueryPriority));
-        CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryHeartBeat));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        iAttributes.iHeartBeat = edHeartBeat->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenKeyPressEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenKeyPressEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenKeyPressEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_KEYPRESS_FORM_DIALOG);
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenMessagesEditor* CLoadGenMessagesEditor::NewL( TMessageAttributes& aAttributes, 
-                                                      TBool aEditingExisting )
-    {
-    CLoadGenMessagesEditor* self = new(ELeave) CLoadGenMessagesEditor( aAttributes, 
-                                                                        aEditingExisting );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenMessagesEditor::~CLoadGenMessagesEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenMessagesEditor::CLoadGenMessagesEditor( TMessageAttributes& aAttributes, 
-                                                TBool aEditingExisting ) :
-                                            CLoadGenLoadTypeEditorBase( aEditingExisting ), 
-                                            iAttributes( aAttributes )
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMessagesEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL( _L("Messages") );
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMessagesEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-    
-    // load values to static editors
-    CAknPopupFieldText* edPriority = 
-                    static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryPriority ) );
-    CAknPopupFieldText* edType = 
-                    static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryType ) );                    
-    CEikEdwin* edDestination = 
-                    static_cast<CEikEdwin*>( Control( ELoadGenMessagesQueryDestination ) );
-    CEikNumberEditor* edAmount = 
-                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryAmount ) );                
-    CEikNumberEditor* edLength = 
-                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryLength ) );
-    CEikNumberEditor* edIdle = 
-                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryIdle ) );
-    CEikNumberEditor* edVariance = 
-                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryVariance ) );
-
-    edPriority->SetCurrentValueIndex( iAttributes.iPriority );
-    edType->SetCurrentValueIndex( iAttributes.iMessageType );
-    edDestination->SetTextL( &iAttributes.iDestination );
-    edAmount->SetNumber( iAttributes.iAmount );
-    edLength->SetNumber( iAttributes.iLength );   
-    edIdle->SetNumber( iAttributes.iIdle );   
-    edVariance->SetNumber( iAttributes.iRandomVariance );   
-       
-    UpdateVisibilitiesOfFieldsL( ETrue );
-    // set type selection as dimmed if editing existing item
-    if (iEditingExisting)
-        {
-        SetLineDimmedNow(ELoadGenMessagesQueryType, ETrue); 
-        }
-    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenMessagesEditor::OkToExitL( TInt aButtonId )
-    {
-    if ( aButtonId == EAknSoftkeyOk )
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = 
-                static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryPriority ) );
-        CAknPopupFieldText* edType = 
-                static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryType ) );                
-        CEikEdwin* edDestination = 
-                static_cast<CEikEdwin*>( Control( ELoadGenMessagesQueryDestination ) );
-        CEikNumberEditor* edLength = 
-                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryLength ) );
-        CEikNumberEditor* edAmount = 
-                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryAmount ) );                
-        CEikNumberEditor* edIdle = 
-                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryIdle ) );
-        CEikNumberEditor* edVariance =
-                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryVariance ) );
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        iAttributes.iMessageType = edType->CurrentValueIndex();
-        edDestination->GetText( iAttributes.iDestination );
-        iAttributes.iAmount = edAmount->Number();
-        iAttributes.iLength = edLength->Number();
-        iAttributes.iIdle = edIdle->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMessagesEditor::UpdateVisibilitiesOfFieldsL( TBool /*aFormInit*/ )
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMessagesEditor::HandleControlStateChangeL( TInt aControlId )
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL( aControlId );
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenMessagesEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD( R_MESSAGES_FORM_DIALOG );
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenApplicationsEditor* CLoadGenApplicationsEditor::NewL( TApplicationsAttributes& aAttributes, 
-                                                      TBool aEditingExisting )
-    {
-    CLoadGenApplicationsEditor* self = new(ELeave) CLoadGenApplicationsEditor( aAttributes, 
-                                                                        aEditingExisting );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenApplicationsEditor::~CLoadGenApplicationsEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenApplicationsEditor::CLoadGenApplicationsEditor( TApplicationsAttributes& aAttributes, 
-                                                TBool aEditingExisting ) :
-                                            CLoadGenLoadTypeEditorBase( aEditingExisting ), 
-                                            iAttributes( aAttributes )
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenApplicationsEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL( _L("Applications") );
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenApplicationsEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsQueryPriority));
-    CEikNumberEditor* edLaunchingInterval = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsLaunchingInterval));
-    CAknPopupFieldText* edKeyPressType = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsKeyPressType));
-    CEikNumberEditor* edMaxOpen = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsMaxOpen));
-    CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsKeyPressQueryHeartBeat));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsQueryVariance));
-
-    edPriority->SetCurrentValueIndex( iAttributes.iPriority );
-    edLaunchingInterval->SetNumber( iAttributes.iLaunchingInterval );
-    edKeyPressType->SetCurrentValueIndex( iAttributes.iKeyPressType );
-    edMaxOpen->SetNumber( iAttributes.iMaxOpen );
-    edHeartBeat->SetNumber( iAttributes.iHeartBeat );
-    edVariance->SetNumber( iAttributes.iRandomVariance );
-
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenApplicationsEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsQueryPriority));
-        CEikNumberEditor* edLaunchingInterval = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsLaunchingInterval));
-        CAknPopupFieldText* edKeyPressType = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsKeyPressType));
-        CEikNumberEditor* edMaxOpen = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsMaxOpen));
-        CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsKeyPressQueryHeartBeat));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        iAttributes.iLaunchingInterval = edLaunchingInterval->Number();
-        iAttributes.iKeyPressType = edKeyPressType->CurrentValueIndex();
-        iAttributes.iMaxOpen = edMaxOpen->Number();
-        iAttributes.iHeartBeat = edHeartBeat->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-        }
-    
-    return ETrue;
-    }       
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenApplicationsEditor::UpdateVisibilitiesOfFieldsL( TBool /*aFormInit*/ )
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenApplicationsEditor::HandleControlStateChangeL( TInt aControlId )
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL( aControlId );
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenApplicationsEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD( R_APPLICATIONS_FORM_DIALOG );
-    }
-
-// --------------------------------------------------------------------------------------------
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPhotoCaptureEditor* CLoadGenPhotoCaptureEditor::NewL(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenPhotoCaptureEditor* self = new(ELeave) CLoadGenPhotoCaptureEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPhotoCaptureEditor::~CLoadGenPhotoCaptureEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPhotoCaptureEditor::CLoadGenPhotoCaptureEditor(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhotoCaptureEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("Photo captures"));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhotoCaptureEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-    
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhotoCaptureQueryPriority));
-    //CAknPopupFieldText* edDevice = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhotoCaptureQueryDevice));    
-    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryIdle));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryVariance));
-
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
-    //edDevice->SetCurrentValueIndex(0);
-    edIdle->SetNumber(iAttributes.iIdle);   
-    edVariance->SetNumber(iAttributes.iRandomVariance);
-    
-    LoadCamerasL();
-    
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-void CLoadGenPhotoCaptureEditor::LoadCamerasL()
-    {    
-    if (iAttributes.iCameraCount > 0)
-        {
-        // insert possibility to select which cpu the load is generated to
-        InsertFieldAfterL(R_PHOTOCAPTURE_DLG_LINE_DEVICE, ELoadGenPhotoCaptureQueryDevice, ELoadGenPhotoCaptureQueryPriority);
-        
-        iCamerasArray = new (ELeave) CDesCArrayFlat( iAttributes.iCameraCount );   
-        
-        // add Cameras
-        for (int i = 0; i < iAttributes.iCameraCount; i++) 
-            {
-            TBuf<16> cam;
-            _LIT(KCam, "Camera %d");
-            cam.Format(KCam, i);
-            iCamerasArray->AppendL(cam);
-            }    
-       
-        iCameraTextArray = CAknQueryValueTextArray::NewL();
-        iCameraTextArray->SetArray( *iCamerasArray );  
-        iCameraQueryValText = CAknQueryValueText::NewL();    
-        iCameraQueryValText->SetArrayL( iCameraTextArray );
-        if( iAttributes.iCameraCount > 0 )
-            {
-            iCameraQueryValText->SetCurrentValueIndex(iAttributes.iCamera);
-            }
-        CAknPopupField* popup = static_cast<CAknPopupField*>(Control( ELoadGenPhotoCaptureQueryDevice)); 
-        popup->SetQueryValueL( iCameraQueryValText );        
-        }    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenPhotoCaptureEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhotoCaptureQueryPriority));        
-        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryIdle));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();        
-        iAttributes.iIdle = edIdle->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-        
-        if (iAttributes.iCameraCount > 1)
-            {
-            iAttributes.iCamera = iCameraQueryValText->CurrentValueIndex();
-            }
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhotoCaptureEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPhotoCaptureEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenPhotoCaptureEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_PHOTOCAPTURE_FORM_DIALOG);
-    }
-
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenBluetoothEditor* CLoadGenBluetoothEditor::NewL(TBluetoothAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenBluetoothEditor* self = new(ELeave) CLoadGenBluetoothEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenBluetoothEditor::~CLoadGenBluetoothEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenBluetoothEditor::CLoadGenBluetoothEditor(TBluetoothAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenBluetoothEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("Bluetooth"));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenBluetoothEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-    
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenBluetoothQueryPriority));        
-    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryIdle));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryVariance));
-
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);    
-    edIdle->SetNumber(iAttributes.iIdle);   
-    edVariance->SetNumber(iAttributes.iRandomVariance);
-        
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenBluetoothEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenBluetoothQueryPriority));        
-        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryIdle));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();        
-        iAttributes.iIdle = edIdle->Number();
-        iAttributes.iRandomVariance = edVariance->Number();                
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenBluetoothEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenBluetoothEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenBluetoothEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_BLUETOOTH_FORM_DIALOG);
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPointerEventEditor* CLoadGenPointerEventEditor::NewL(TPointerEventAttributes& aAttributes, TBool aEditingExisting)
-    {
-    CLoadGenPointerEventEditor* self = new(ELeave) CLoadGenPointerEventEditor(aAttributes, aEditingExisting);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPointerEventEditor::~CLoadGenPointerEventEditor()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenPointerEventEditor::CLoadGenPointerEventEditor(TPointerEventAttributes& aAttributes, TBool aEditingExisting) :
-    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPointerEventEditor::ConstructL()
-    {
-    CLoadGenLoadTypeEditorBase::ConstructL(_L("Pointer events"));
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPointerEventEditor::PreLayoutDynInitL()
-    {
-    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
-
-    // load values to static editors
-    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPointerEventQueryPriority));
-    CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryHeartBeat));
-    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryVariance));
-
-    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
-    edHeartBeat->SetNumber(iAttributes.iHeartBeat);
-    edVariance->SetNumber(iAttributes.iRandomVariance);
-
-    UpdateVisibilitiesOfFieldsL(ETrue);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenPointerEventEditor::OkToExitL(TInt aButtonId)
-    {
-    if (aButtonId == EAknSoftkeyOk)
-        {
-        // store values from editors
-        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPointerEventQueryPriority));
-        CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryHeartBeat));
-        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryVariance));
-
-        iAttributes.iPriority = edPriority->CurrentValueIndex();
-        iAttributes.iHeartBeat = edHeartBeat->Number();
-        iAttributes.iRandomVariance = edVariance->Number();
-        }
-    
-    return ETrue;
-    }       
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPointerEventEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
-    {
-    UpdateFormL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenPointerEventEditor::HandleControlStateChangeL(TInt aControlId)
-    {
-    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenPointerEventEditor::RunQueryLD()
-    {
-    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_POINTEREVENT_FORM_DIALOG);
-    }
-
-// End of File
--- a/loadgen/ui/avkon/src/loadgen_maincontainer.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,457 +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 FILES
-#include "loadgen_maincontainer.h"
-#include "loadgen.hrh"
-#include "loadgen_document.h"
-#include "loadgen_appui.h"
-#include "loadgen_model.h"
-#include <loadgen_extraicons.mbg>
-
-#include <aknlists.h>
-#include <eikclb.h>
-#include <eikclbd.h>
-#include <aknconsts.h>
-#include <AknUtils.h>
-#include <aknnotewrappers.h>
-#include <AknIconArray.h> 
-#include <f32file.h>
-#include <AknIconUtils.h>
-#include <AknDef.h>
-#include <akntitle.h>
-#include <eikspane.h> 
-
-_LIT(KExtraIconsPath, "\\resource\\apps\\loadgen_extraicons.mif");
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-void CLoadGenMainContainer::ConstructL(const TRect& aRect)
-    {
-    iModel = static_cast<CLoadGenDocument*>(reinterpret_cast<CEikAppUi*>(iEikonEnv->AppUi())->Document())->Model();
-    iModel->SetMainContainer(this);
-
-    CreateWindowL();
-    SetRect(aRect);
-    SetBlank();
-    
-    // init listbox
-    iListBox = new(ELeave) CLoadGenCAknSingleGraphicStyleListBox;
-    iListBox->SetContainerWindowL(*this);
-    iListBox->ConstructL(this, EAknListBoxMarkableList);
-    iListBox->View()->SetListEmptyTextL(_L("No loads activated\n(Select new load from Options to generate new load)"));
-
-    // create icon array and add marking indicator to it
-    CAknIconArray* iconArray = new(ELeave) CAknIconArray(1);
-    CleanupStack::PushL(iconArray);
-    CFbsBitmap* markBitmap = NULL;
-    CFbsBitmap* markBitmapMask = NULL;
-    
-    TRgb defaultColor;
-    defaultColor = iEikonEnv->Color(EColorControlText);
-
-    AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
-            KAknsIIDQgnIndiMarkedAdd,
-            KAknsIIDQsnIconColors,
-            EAknsCIQsnIconColorsCG13,
-            markBitmap,
-            markBitmapMask,
-            AknIconUtils::AvkonIconFileName(),
-            EMbmAvkonQgn_indi_marked_add,
-            EMbmAvkonQgn_indi_marked_add_mask,
-            defaultColor
-            );
-     
-    CGulIcon* markIcon = CGulIcon::NewL(markBitmap, markBitmapMask);
-    iconArray->AppendL(markIcon);                       
-    
-    // append icons from loadgen_extraicons.mif
-    TFileName extraIconsPath;
-    extraIconsPath.Copy(KExtraIconsPath);
-    TParsePtrC parse((CEikonEnv::Static()->EikAppUi()->Application())->AppFullName()); // get path where this app is installed
-    extraIconsPath.Insert(0, parse.Drive()); // drive letter
-    
-    CFbsBitmap* redBitmap = NULL;
-    CFbsBitmap* redBitmapMask = NULL;
-    CFbsBitmap* greenBitmap = NULL;
-    CFbsBitmap* greenBitmapMask = NULL;
-    
-    AknIconUtils::CreateIconL(redBitmap, redBitmapMask, extraIconsPath, EMbmLoadgen_extraiconsQgn_prob_status_red, EMbmLoadgen_extraiconsQgn_prob_status_red_mask);
-    AknIconUtils::CreateIconL(greenBitmap, greenBitmapMask, extraIconsPath, EMbmLoadgen_extraiconsQgn_prob_status_green, EMbmLoadgen_extraiconsQgn_prob_status_green_mask);
-
-    CGulIcon* redIcon = CGulIcon::NewL(redBitmap, redBitmapMask);
-    iconArray->AppendL(redIcon);  
-    
-    CGulIcon* greenIcon = CGulIcon::NewL(greenBitmap, greenBitmapMask);
-    iconArray->AppendL(greenIcon);  
-
-    // set icon array
-    CleanupStack::Pop(); // iconArray
-    iListBox->ItemDrawer()->ColumnData()->SetIconArray(iconArray);
-
-    iListBox->CreateScrollBarFrameL(ETrue);
-    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
-    iListBox->SetListBoxObserver(this);
-    
-    // set size of the listbox
-    TSize outputRectSize;
-    AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRectSize);
-    TRect outputRect(outputRectSize);
-    iListBox->SetRect(outputRect);
-
-    iListBox->ActivateL();    
-    
-    ActivateL();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenMainContainer::~CLoadGenMainContainer()
-    {
-    if (iListBox)
-        delete iListBox;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMainContainer::SizeChanged()
-{
-    TSize outputRectSize;
-    AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRectSize);
-    TRect outputRect(outputRectSize);
-    
-    if (iListBox)
-        iListBox->SetRect(outputRect);
-}
-
-// --------------------------------------------------------------------------------------------
-
-TInt CLoadGenMainContainer::CountComponentControls() const
-    {
-    if (iListBox)
-        return 1;
-    else
-        return 0;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CCoeControl* CLoadGenMainContainer::ComponentControl(TInt /*aIndex*/) const
-    {
-    if (iListBox)
-        return iListBox;
-    else
-        return NULL;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CLoadGenMainContainer::CurrentListBoxItemIndex()
-    {
-    if (iListBox)
-        {
-        return iListBox->CurrentItemIndex();
-        }
-    else
-        return KErrNotFound;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMainContainer::SetListBoxTextArrayL(CDesCArray* aTextArray)
-    {
-    if (iListBox)
-        {    
-        iListBox->Model()->SetItemTextArray(aTextArray);
-        iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
-        iListBox->HandleItemAdditionL();
-        iListBox->UpdateScrollBarsL();
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-const CArrayFix<TInt>* CLoadGenMainContainer::ListBoxSelectionIndexes()
-    {
-    if (iListBox)
-        {
-        const CListBoxView::CSelectionIndexArray* indices = iListBox->SelectionIndexes();
-        return static_cast<const CArrayFix<TInt>*>(indices);
-        }
-    else
-        return NULL;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TInt CLoadGenMainContainer::ListBoxSelectionIndexesCount()
-    {
-    if (iListBox)
-        {
-        return iListBox->SelectionIndexes()->Count();
-        }
-    else
-        return KErrNotFound;
-    }
-                        
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMainContainer::Draw(const TRect& aRect) const
-    {
-    CWindowGc& gc = SystemGc();
-    gc.Clear(aRect);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMainContainer::HandleControlEventL(CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMainContainer::SetDefaultTitlePaneTextL()
-    {
-    _LIT(KTitleText, "Load Gener.");
-
-    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
-    CAknTitlePane* tp = static_cast<CAknTitlePane*>( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-    tp->SetTextL( KTitleText );
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TKeyResponse CLoadGenMainContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
-    {
-    if(aType != EEventKey)
-        return EKeyWasNotConsumed;
-    
-    if (iListBox && iListBox->Model()->NumberOfItems() > 0)
-        {
-        /*
-        if (aKeyEvent.iCode == EKeyBackspace || aKeyEvent.iCode == EKeyDelete)
-            {
-            iModel->StopSelectedOrHighlightedItemsL();
-            return EKeyWasConsumed;
-            }
-        else    
-            {
-            return iListBox->OfferKeyEventL(aKeyEvent, aType);
-            }
-        */
-        TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift) ||
-                                (aKeyEvent.iModifiers & EModifierLeftShift) ||
-                                (aKeyEvent.iModifiers & EModifierRightShift);
-        TBool controlKeyPressed = (aKeyEvent.iModifiers & EModifierCtrl) || 
-                                  (aKeyEvent.iModifiers & EModifierRightCtrl); 
-                                  
-        
-        // handle OK/Enter keys
-        if ((aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && (shiftKeyPressed || controlKeyPressed))
-            {
-            return iListBox->OfferKeyEventL(aKeyEvent, aType); //send to listbox if modifiers
-            }
-
-        // handle OK/Enter keys
-        else if (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter)
-            {
-            iModel->ShowItemActionMenuL();
-            }
-
-        // handle delete key
-        else if (aKeyEvent.iCode == EKeyBackspace || aKeyEvent.iCode == EKeyDelete)
-            {
-            iModel->StopSelectedOrHighlightedItemsL();
-            }
-
-        else
-            return iListBox->OfferKeyEventL(aKeyEvent, aType);
-        }
-    
-    return EKeyWasNotConsumed;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMainContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
-    {
-    switch (aEventType)
-        {
-        case EEventEnterKeyPressed:
-        case EEventItemDoubleClicked:
-            {
-            iModel->ShowItemActionMenuL();
-            }
-            break;
-        default:
-            break;
-        }
-    }
-            
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenMainContainer::HandleResourceChange(TInt aType)
-    {
-    if ( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect);
-        SetRect(mainPaneRect);
-
-        TSize outputRectSize;
-        AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRectSize);
-        TRect outputRect(outputRectSize);
-        iListBox->SetRect(outputRect);
-        }
-    else
-        {
-        CCoeControl::HandleResourceChange(aType);
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenCAknSingleGraphicStyleListBox::SizeChanged()
-    {
-    // call the base class function first
-    CAknSingleGraphicStyleListBox::SizeChanged();
-
-    // customize the list box
-    TRAP_IGNORE(SizeChangedL());
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenCAknSingleGraphicStyleListBox::SizeChangedL()
-    {
-    const TInt KEmptySize = 2;
-    
-    // disable separator line
-    ItemDrawer()->ColumnData()->SetSeparatorLinePosition(ENoLine);
-    
-    // enable marquee
-    ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
-    
-    // set fonts
-    const CFont* font = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont);
-    ItemDrawer()->ColumnData()->SetColumnFontL(0, font);
-    ItemDrawer()->ColumnData()->SetColumnFontL(1, font);
-    ItemDrawer()->ColumnData()->SetColumnFontL(2, font);
-    ItemDrawer()->ColumnData()->SetColumnFontL(3, font);
-
-    // set row height
-    TInt rowHeight = font->HeightInPixels()+5;    
-    TSize itemCellSize = View()->ItemDrawer()->ItemCellSize();
-    itemCellSize.iHeight = rowHeight; 
-    SetItemHeightL(rowHeight);
-    View()->ItemDrawer()->SetItemCellSize(itemCellSize);
-    
-    // set icon sizes
-    TInt normalIconSize = rowHeight * 0.7;
-    TInt markingIconSize = rowHeight * 0.8;
-    ItemDrawer()->ColumnData()->SetSubCellIconSize(0, TSize(normalIconSize,normalIconSize));
-    ItemDrawer()->ColumnData()->SetSubCellIconSize(2, TSize(markingIconSize,markingIconSize));
-    ItemDrawer()->ColumnData()->SetSubCellIconSize(3, TSize(KEmptySize,KEmptySize));
-
-    // set column widths
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(0, normalIconSize + 2*normalIconSize * 0.15);
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(1, itemCellSize.iWidth-KEmptySize-markingIconSize);
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(2, markingIconSize);
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(3, KEmptySize);
-
-    // set baseline for the text
-    ItemDrawer()->ColumnData()->SetColumnBaselinePosL(1, font->HeightInPixels()-font->BaselineOffsetInPixels());
-
-    // set margins
-    TMargins iconMargins;
-    iconMargins.iBottom = 0;
-    iconMargins.iLeft = normalIconSize * 0.15;
-    iconMargins.iRight = normalIconSize * 0.15;
-    iconMargins.iTop = 0;
-
-    TMargins textMargins;
-    textMargins.iBottom = 0;
-    textMargins.iLeft = markingIconSize * 0.15;
-    textMargins.iRight = markingIconSize * 0.15;
-    textMargins.iTop = 0;
-
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(0, iconMargins);
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(1, textMargins);
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(2, iconMargins);
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(3, iconMargins);
-    
-/*
-    const TInt KEmptySize = 2;
-    
-    // enable marquee
-    ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
-    
-    // set fonts
-    const CFont* font = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont);
-    ItemDrawer()->ColumnData()->SetColumnFontL(0, font);
-    ItemDrawer()->ColumnData()->SetColumnFontL(1, font);
-    ItemDrawer()->ColumnData()->SetColumnFontL(2, font);
-    ItemDrawer()->ColumnData()->SetColumnFontL(3, font);
-
-    // set row height
-    TInt rowHeight = font->HeightInPixels()+7;    
-    TSize itemCellSize = View()->ItemDrawer()->ItemCellSize();
-    itemCellSize.iHeight = rowHeight; 
-    SetItemHeightL(rowHeight);
-    View()->ItemDrawer()->SetItemCellSize(itemCellSize);
-
-    // set icon sizes
-    TInt normalIconSize = rowHeight * 0.6;
-    TInt markingIconSize = rowHeight * 0.8;
-    ItemDrawer()->ColumnData()->SetSubCellIconSize(0, TSize(normalIconSize,normalIconSize));
-    ItemDrawer()->ColumnData()->SetSubCellIconSize(2, TSize(markingIconSize,markingIconSize));
-    ItemDrawer()->ColumnData()->SetSubCellIconSize(3, TSize(KEmptySize,KEmptySize));
-
-    // set column widths
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(0, normalIconSize);
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(1, itemCellSize.iWidth-KEmptySize-markingIconSize);
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(2, markingIconSize);
-    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(3, KEmptySize);
-
-    // set baseline for the text
-    ItemDrawer()->ColumnData()->SetColumnBaselinePosL(1, font->HeightInPixels()-font->BaselineOffsetInPixels());
-
-    // set margins
-    TMargins iconMargins;
-    iconMargins.iBottom = 0;
-    iconMargins.iLeft = 0;
-    iconMargins.iRight = 0;
-    iconMargins.iTop = 0;
-
-    TMargins textMargins;
-    textMargins.iBottom = 0;
-    textMargins.iLeft = markingIconSize * 0.15;
-    textMargins.iRight = markingIconSize * 0.15;
-    textMargins.iTop = 0;
-
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(0, iconMargins);
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(1, textMargins);
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(2, iconMargins);
-    ItemDrawer()->ColumnData()->SetColumnMarginsL(3, iconMargins);
-*/
-    }
-
-// --------------------------------------------------------------------------------------------
-        
-// End of File  
--- a/loadgen/ui/avkon/src/loadgen_mainview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +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 FILES
-#include "loadgen.hrh"
-#include "loadgen_mainview.h"
-#include "loadgen_maincontainer.h"
-#include "loadgen_document.h" 
-#include "loadgen_model.h"
-#include "loadgen_traces.h"
-#include <loadgen.rsg>
-
-#include <eikenv.h>
-#include <aknViewAppUi.h> 
-#include <aknnotewrappers.h>
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CLoadGenMainView::ConstructL(const TRect& aRect)
-// EPOC two-phased constructor
-// ---------------------------------------------------------
-//
-void CLoadGenMainView::ConstructL()
-    {
-    BaseConstructL( R_LOADGEN_VIEW_MAIN );
-    iModel = static_cast<CLoadGenDocument*>(reinterpret_cast<CEikAppUi*>(iEikonEnv->AppUi())->Document())->Model();
-    }
-
-// ---------------------------------------------------------
-// CLoadGenMainView::~CLoadGenMainView()
-// ---------------------------------------------------------
-//
-CLoadGenMainView::~CLoadGenMainView()
-    {
-    if (iContainer)
-        {
-        AppUi()->RemoveFromViewStack( *this, iContainer );
-        delete iContainer;
-        iContainer = NULL;
-        }
-    }
-
-// ---------------------------------------------------------
-// TUid CLoadGenMainView::Id()
-// ---------------------------------------------------------
-//
-TUid CLoadGenMainView::Id() const
-    {
-    return KMainViewUID;
-    }
-
-// ---------------------------------------------------------
-// TUid CLoadGenMainView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
-// ---------------------------------------------------------
-//
-void CLoadGenMainView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
-    {
-    AppUi()->DynInitMenuPaneL(aResourceId, aMenuPane);
-    }
-
-  
-// ---------------------------------------------------------
-// CLoadGenMainView::HandleCommandL(TInt aCommand)
-// ---------------------------------------------------------
-//
-void CLoadGenMainView::HandleCommandL(TInt aCommand)
-    {   
-    switch ( aCommand )
-        {
-        case ELoadGenCmdNewLoadCPULoad:
-        case ELoadGenCmdNewLoadEatMemory:
-        case ELoadGenCmdNewLoadPhoneCall:
-        case ELoadGenCmdNewLoadNetConn:
-        case ELoadGenCmdNewLoadKeyPress:
-        case ELoadGenCmdNewLoadMessages:
-        case ELoadGenCmdNewLoadApplications:
-        case ELoadGenCmdNewLoadPhotoCaptures:
-        case ELoadGenCmdNewLoadBluetooth:
-        case ELoadGenCmdNewLoadPointerEvent:
-            {            
-            TRAPD(err, iModel->StartNewLoadL(aCommand));
-            if( err != KErrNone )
-                {
-                LOGSTRING2("LoadGen: Load (command: %d) start failed!", aCommand);
-                _LIT(message, "Load start failed!");
-                CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
-                errorNote->ExecuteLD(message);                
-                }
-            break;
-            }
-        case ELoadGenStopAll:
-            {
-            iModel->StopAllLoadItemsL();
-            break;
-            }
-        case ELoadGenSuspendAll:
-            {
-            iModel->SuspendAllLoadItemsL();
-            break;
-            }
-        case ELoadGenResumeAll:
-            {
-            iModel->ResumeAllLoadItemsL();
-            break;
-            }            
-        default:
-            {
-            AppUi()->HandleCommandL(aCommand);
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------
-// CLoadGenMainView::HandleClientRectChange()
-// ---------------------------------------------------------
-//
-void CLoadGenMainView::HandleClientRectChange()
-    {
-    if ( iContainer )
-        {
-        iContainer->SetRect( ClientRect() );
-        }
-    }
-
-// ---------------------------------------------------------
-// CLoadGenMainView::DoActivateL(...)
-// ---------------------------------------------------------
-//
-void CLoadGenMainView::DoActivateL(
-   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
-   const TDesC8& /*aCustomMessage*/)
-    {
-    if (!iContainer)
-        {
-        iContainer = new (ELeave) CLoadGenMainContainer;
-        iModel->SetMainContainer(iContainer);
-        iContainer->SetMopParent(this);
-        iContainer->ConstructL( ClientRect() );
-        AppUi()->AddToStackL( *this, iContainer );
-        } 
-   }
-
-// ---------------------------------------------------------
-// CLoadGenMainView::DoDeactivate()
-// ---------------------------------------------------------
-//
-void CLoadGenMainView::DoDeactivate()
-    {
-    if (iContainer)
-        {
-        AppUi()->RemoveFromViewStack( *this, iContainer );
-        delete iContainer;
-        iContainer = NULL;
-        }
-    }
-
-// End of File
--- a/loadgen/ui/avkon/src/loadgen_model.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,910 +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 FILES
-#include "loadgen_cpuload.h"
-#include "loadgen_memoryeat.h"
-#include "loadgen_phonecall.h"
-#include "loadgen_netconn.h"
-#include "loadgen_keypress.h"
-#include "loadgen_pointerevent.h"
-#include "loadgen_messages.h"
-#include "loadgen_applications.h"
-#include "loadgen_photocapture.h"
-#include "loadgen_bluetooth.h"
-#include "loadgen_utils.h"
-
-#include "loadgen_traces.h"
-#include "loadgen_editors.h"
-#include "loadgen_loadattributes.h"
-#include "loadgen_model.h"
-#include "loadgen_app.h"
-#include "loadgen_settingsviewdlg.h"
-#include "loadgen_maincontainer.h"
-#include "loadgen.hrh"
-#include <loadgen.rsg>
-
-#include <coeutils.h>
-#include <bautils.h>
-#include <eikenv.h>
-#include <AknQueryDialog.h>
-#include <e32math.h> 
-#include <u32hal.h>
-#include <hal.h> 
-#include <hal_data.h>
-
-#include <ecam.h>
-#include <aknnotewrappers.h>
-#include <featdiscovery.h>
-
-inline TInt64 INIT_SEED()
-{
-    TTime now; 
-    now.HomeTime(); 
-    return now.Int64();
-}
-
-TInt64 CLoadGenModel::iRandomNumberSeed = INIT_SEED();
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CLoadGenModel* CLoadGenModel::NewL()
-    {
-    CLoadGenModel* self = new(ELeave) CLoadGenModel;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenModel::CLoadGenModel() : CActive(EPriorityStandard)
-    {
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::ConstructL()
-    {
-    iDrawState = EDrawStateInvalid;
-    iReferenceNumber = 0;
-    
-    iEnv = CEikonEnv::Static();
-    User::LeaveIfError(iLs.Connect());
-    
-    iLoadItemList = new(ELeave) CLoadItemList(64);
-
-    User::LeaveIfError(iTimer.CreateLocal());
-    CActiveScheduler::Add(this);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::ActivateModelL()
-    {
-    // load settings
-    //TRAP_IGNORE(LoadSettingsL());
-
-    // set defaults to attributes
-    iCpuLoadAttributes.iId = 0;
-    iCpuLoadAttributes.iPriority = EThreadPriorityTypeNormal;
-    iCpuLoadAttributes.iMode = ECpuLoadModeYielding;
-    iCpuLoadAttributes.iType = ECpuLoadTypePeriodic;
-    iCpuLoadAttributes.iLength = 4000;
-    iCpuLoadAttributes.iIdle = 2000;
-    iCpuLoadAttributes.iRandomVariance = 0;
-    iCpuLoadAttributes.iCpu = KCPUSelection_FreeScheduling; // set CPU as "undefined" (can be >= 0 only in SMP environments)
-    iCpuLoadAttributes.iCpuCount = UserSvr::HalFunction(EHalGroupKernel, KHalFunction_EKernelHalNumLogicalCpus, 0, 0);
-    if( iCpuLoadAttributes.iCpuCount < 1 || iCpuLoadAttributes.iCpuCount > KMaxCPUs )
-        {
-        // HAL may not support this function, so let's use CPU count 1:
-        iCpuLoadAttributes.iCpuCount = 1;
-        }
-    iMemoryEatAttributes.iId = 0;
-    iMemoryEatAttributes.iPriority = EThreadPriorityTypeNormal;
-    iMemoryEatAttributes.iSource = 0;
-    iMemoryEatAttributes.iType = EMemoryEatTypeMemoryToBeLeft;
-    iMemoryEatAttributes.iBuffer = 16*1024;
-    iMemoryEatAttributes.iIdle = 0;
-    iMemoryEatAttributes.iAmount = 0;
-    iMemoryEatAttributes.iRandomMin = 1000000;
-    iMemoryEatAttributes.iRandomMax = 1500000;
-    iMemoryEatAttributes.iAmountDes.Copy(KNullDesC);
-    iMemoryEatAttributes.iRandomMinDes.Copy(KNullDesC);
-    iMemoryEatAttributes.iRandomMaxDes.Copy(KNullDesC);
-    iMemoryEatAttributes.iRandomVariance = 0;
-
-    iPhoneCallAttributes.iId = 0;
-    iPhoneCallAttributes.iPriority = EThreadPriorityTypeNormal;
-    iPhoneCallAttributes.iDestination.Copy(_L("+358"));
-    iPhoneCallAttributes.iLength = 60000;
-    iPhoneCallAttributes.iIdle = 10000;
-    iPhoneCallAttributes.iRandomVariance = 0;
-
-    iNetConnAttributes.iId = 0;
-    iNetConnAttributes.iPriority = EThreadPriorityTypeNormal;
-    iNetConnAttributes.iDestination.Copy(_L("http://www.nokia.com"));
-    iNetConnAttributes.iIdle = 10000;
-    iNetConnAttributes.iRandomVariance = 0;
-
-    iKeyPressAttributes.iId = 0;
-    iKeyPressAttributes.iPriority = EThreadPriorityTypeNormal;
-    iKeyPressAttributes.iHeartBeat = 100;
-    iKeyPressAttributes.iRandomVariance = 0;
-    
-    iPointerEventAttributes.iId = 0;
-    iPointerEventAttributes.iPriority = EThreadPriorityTypeNormal;
-    iPointerEventAttributes.iHeartBeat = 1000;
-    iPointerEventAttributes.iRandomVariance = 0;
-
-    iMessageAttributes.iId = 0;
-    iMessageAttributes.iPriority = EThreadPriorityTypeNormal;
-    iMessageAttributes.iMessageType = EMessageTypeSMS;
-    iMessageAttributes.iDestination.Copy(_L("+358"));
-    iMessageAttributes.iAmount = 5;
-    iMessageAttributes.iLength = 160;
-    iMessageAttributes.iIdle = 15000;
-    iMessageAttributes.iRandomVariance = 0;
-    
-    iApplicationsAttributes.iId = 0;
-    iApplicationsAttributes.iLaunchingInterval = 2000;
-    iApplicationsAttributes.iPriority = EThreadPriorityTypeNormal;
-    iApplicationsAttributes.iKeyPressType = EApplicationsKeyPressTypeNone;
-    iApplicationsAttributes.iMaxOpen = 20;
-    iApplicationsAttributes.iHeartBeat = 50;
-    iApplicationsAttributes.iRandomVariance = 0;
-    
-    iPhotoCaptureAttributes.iId = 0;
-    iPhotoCaptureAttributes.iPriority = EThreadPriorityTypeNormal;
-    iPhotoCaptureAttributes.iIdle = 10000;
-    iPhotoCaptureAttributes.iRandomVariance = 0;        
-    iPhotoCaptureAttributes.iCameraCount = CCamera::CamerasAvailable();
-    if(iPhotoCaptureAttributes.iCameraCount > 0)
-        {
-        iPhotoCaptureAttributes.iCamera = 0; // Main camera
-        }
-    else
-        {
-        iPhotoCaptureAttributes.iCamera = -1;
-        }
-    
-    iBluetoothAttributes.iId = 0;
-    iBluetoothAttributes.iPriority = EThreadPriorityTypeNormal;
-    iBluetoothAttributes.iIdle = 10000;
-    iBluetoothAttributes.iRandomVariance = 0;
-    iBluetoothAttributes.iBluetoothSupported = CFeatureDiscovery::IsFeatureSupportedL(KFeatureIdBt);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::DeActivateModelL()
-    {
-    Cancel();
-    
-    // for a faster exit, send the application to background
-    TApaTask selfTask(iEnv->WsSession());
-    selfTask.SetWgId(iEnv->RootWin().Identifier());
-    selfTask.SendToBackground();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-CLoadGenModel::~CLoadGenModel()
-    {
-    if (iLoadItemList)
-        {
-        DeleteAllLoadItems();
-        delete iLoadItemList;
-        }
-    if ( iApplicationsAttributes.iAppsArray )
-        {
-        delete iApplicationsAttributes.iAppsArray;
-        }
-    iTimer.Close();
-    iLs.Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::DoCancel()
-    {
-    iTimer.Cancel();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::RunL()
-    {
-    // continue    
-    //iTimer.After(iStatus, 400000);
-    //SetActive();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::SetMainContainer(CLoadGenMainContainer* aContainer)
-    {
-    iMainContainer = aContainer;
-    iDrawState = EDrawStateMain;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::StartNewLoadL(TInt aCommand)
-    {
-    // show new load query
-    CLoadGenLoadTypeEditorBase* dlg = NULL;
-
-    switch ( aCommand )
-        {
-        case ELoadGenCmdNewLoadCPULoad:
-            {
-            dlg = CLoadGenCPULoadEditor::NewL(iCpuLoadAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadEatMemory:
-            {
-            dlg = CLoadGenMemoryEatEditor::NewL(iMemoryEatAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadPhoneCall:
-            {
-            dlg = CLoadGenPhoneCallEditor::NewL(iPhoneCallAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadNetConn:
-            {
-            dlg = CLoadGenNetConnEditor::NewL(iNetConnAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadKeyPress:
-            {
-            dlg = CLoadGenKeyPressEditor::NewL(iKeyPressAttributes);
-            break;
-            }               
-        case ELoadGenCmdNewLoadMessages:
-            {
-            dlg = CLoadGenMessagesEditor::NewL( iMessageAttributes );
-            break;
-            }
-        case ELoadGenCmdNewLoadApplications:
-            {
-            dlg = CLoadGenApplicationsEditor::NewL( iApplicationsAttributes );
-            break;
-            }
-        case ELoadGenCmdNewLoadPhotoCaptures:
-            {
-            if( iPhotoCaptureAttributes.iCameraCount > 0 )
-                {
-                dlg = CLoadGenPhotoCaptureEditor::NewL( iPhotoCaptureAttributes );
-                }
-            else
-                {
-                _LIT(message, "Cameras not available");
-                CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
-                errorNote->ExecuteLD(message);
-                return;
-                }
-            break;
-            }
-        case ELoadGenCmdNewLoadBluetooth:
-            {
-            if( iBluetoothAttributes.iBluetoothSupported )
-                {
-                dlg = CLoadGenBluetoothEditor::NewL(iBluetoothAttributes);                
-                }
-            else
-                {
-                _LIT(message, "Bluetooth device not available");
-                CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
-                errorNote->ExecuteLD(message);
-                return;
-                }
-            break;
-            }
-        case ELoadGenCmdNewLoadPointerEvent:
-            {
-            dlg = CLoadGenPointerEventEditor::NewL(iPointerEventAttributes);
-            break;
-            } 
-
-        default:
-            {
-            User::Panic(_L("Wrong new load"), 111);
-            break;
-            }
-        }
-
-    TBool dlgResult = dlg->RunQueryLD();
-
-    // set back title
-    if (iMainContainer)
-        iMainContainer->SetDefaultTitlePaneTextL();
-
-    // start creating new load if dialog accepted
-    if (dlgResult)
-        {
-        DoStartNewLoadL(aCommand);
-        }
-
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::EditLoadL(CLoadBase* aItem)
-    {
-    // suspend current
-    aItem->Suspend();
-    
-    // show new load query
-    CLoadGenLoadTypeEditorBase* dlg = NULL;
-
-    switch ( aItem->Type() )
-        {
-        case ELoadGenCmdNewLoadCPULoad:
-            {
-            dlg = CLoadGenCPULoadEditor::NewL(static_cast<CCPULoad*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadEatMemory:
-            {
-            dlg = CLoadGenMemoryEatEditor::NewL(static_cast<CMemoryEat*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadPhoneCall:
-            {
-            dlg = CLoadGenPhoneCallEditor::NewL(static_cast<CPhoneCall*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadNetConn:
-            {
-            dlg = CLoadGenNetConnEditor::NewL(static_cast<CNetConn*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadKeyPress:
-            {
-            dlg = CLoadGenKeyPressEditor::NewL(static_cast<CKeyPress*>(aItem)->Attributes(), ETrue);
-            break;
-            }       
-        case ELoadGenCmdNewLoadMessages:
-            {
-            dlg = CLoadGenMessagesEditor::NewL(static_cast<CMessages*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadApplications:
-            {
-            dlg = CLoadGenApplicationsEditor::NewL( static_cast<CAppLauncher*>(aItem)->Attributes(), ETrue );
-            break;
-            }
-        case ELoadGenCmdNewLoadPhotoCaptures:
-            {
-            dlg = CLoadGenPhotoCaptureEditor::NewL( static_cast<CPhotoCapture*>(aItem)->Attributes(), ETrue );
-            break;
-            }
-        case ELoadGenCmdNewLoadBluetooth:
-            {
-            dlg = CLoadGenBluetoothEditor::NewL( static_cast<CBluetooth*>(aItem)->Attributes(), ETrue );
-            break;
-            }
-        case ELoadGenCmdNewLoadPointerEvent:
-            {
-            dlg = CLoadGenPointerEventEditor::NewL(static_cast<CPointerEvent*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        default:
-            {
-            User::Panic(_L("Wrong edit load"), 114);
-            break;
-            }
-        }
-
-    TBool dlgResult = dlg->RunQueryLD();
-
-    // set back title
-    if (iMainContainer)
-        iMainContainer->SetDefaultTitlePaneTextL();
-    
-    // change priority of the load item
-    aItem->SetPriority();
-
-    // resume execution the item
-    aItem->Resume();
-    
-    if (dlgResult)
-        RefreshViewL(EFalse);
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::DoStartNewLoadL(TInt aCommand)
-    {
-    CLoadBase* item = NULL;
-    
-    switch ( aCommand )
-        {
-        case ELoadGenCmdNewLoadCPULoad:
-            {
-            if( iCpuLoadAttributes.iCpu == KCPUSelection_AllCPUs )
-                {
-                // Call this function recursively for all CPUs:
-                for( TUint i = 0; i < iCpuLoadAttributes.iCpuCount; ++i )
-                    {                    
-                    iCpuLoadAttributes.iCpu = i;
-                    DoStartNewLoadL(aCommand);
-                    }
-                // And finally set user selection back to "All CPUs"
-                iCpuLoadAttributes.iCpu = KCPUSelection_AllCPUs;
-                return;
-                }
-            else
-                {
-                item = CCPULoad::NewL(iCpuLoadAttributes, iReferenceNumber);
-                }
-            break;
-            }
-        case ELoadGenCmdNewLoadEatMemory:
-            {
-            item = CMemoryEat::NewL(iMemoryEatAttributes, iReferenceNumber);
-            break;
-            }
-        case ELoadGenCmdNewLoadPhoneCall:
-            {
-            item = CPhoneCall::NewL(iPhoneCallAttributes, iReferenceNumber);
-            break;
-            }
-        case ELoadGenCmdNewLoadNetConn:
-            {
-            item = CNetConn::NewL(iNetConnAttributes, iReferenceNumber);
-            break;
-            }
-        case ELoadGenCmdNewLoadKeyPress:
-            {
-            item = CKeyPress::NewL(iKeyPressAttributes, iReferenceNumber);
-            break;
-            }        
-        case ELoadGenCmdNewLoadMessages:
-            {
-            item = CMessages::NewL( iMessageAttributes, iReferenceNumber );
-            break;
-            }
-        case ELoadGenCmdNewLoadApplications:
-            {
-            iApplicationsAttributes.iAppsArray = ListOfAllAppsL();
-            item = CAppLauncher::NewL( iApplicationsAttributes, iReferenceNumber );            
-            break;
-            }
-        case ELoadGenCmdNewLoadPhotoCaptures:
-            {
-            item = CPhotoCapture::NewL( iPhotoCaptureAttributes, iReferenceNumber);
-            break;
-            }
-        case ELoadGenCmdNewLoadBluetooth:
-            {
-            item = CBluetooth::NewL( iBluetoothAttributes, iReferenceNumber);            
-            break;
-            }
-        case ELoadGenCmdNewLoadPointerEvent:
-            {
-            item = CPointerEvent::NewL(iPointerEventAttributes, iReferenceNumber);
-            break;
-            }
-            
-        default:
-            {
-            User::Panic(_L("Wrong new load"), 112);
-            break;
-            }
-        }
-    
-    iReferenceNumber++;
-
-    // add item to the array
-    AppendToLoadItemListL(item);
-
-    // update the listbox
-    RefreshViewL(EFalse);
-
-    // set item index to the end
-    iMainContainer->ListBox()->SetCurrentItemIndexAndDraw( iMainContainer->ListBox()->Model()->NumberOfItems()-1 );
-
-    // start the load
-    item->Resume();
-        
-    // refresh again
-    RefreshViewL(EFalse);    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-
-void CLoadGenModel::StopAllLoadItemsL()
-    {
-    DeleteAllLoadItems();
-    
-    RefreshViewL();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::SuspendAllLoadItemsL()
-    {
-    for (TInt i=0; i<LoadItemCount(); i++)
-        {
-        if ( iLoadItemList->At(i) )
-            {
-            iLoadItemList->At(i)->Suspend();
-            }
-        }
-        
-    RefreshViewL();    
-    }
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::ResumeAllLoadItemsL()
-    {
-    for (TInt i=0; i<LoadItemCount(); i++)
-        {
-        if ( iLoadItemList->At(i) )
-            {
-            iLoadItemList->At(i)->Resume();
-            }
-        }
-
-    RefreshViewL();    
-    }    
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::RefreshViewL(TBool aClearSelection)
-    {
-    if (iMainContainer && iDrawState == EDrawStateMain && iMainContainer->ListBox())
-        {
-        // clear selections if any
-        iMainContainer->ListBox()->ClearSelection();
-        
-        // set item index to 0
-        if (aClearSelection)
-            iMainContainer->ListBox()->SetCurrentItemIndex(0); 
-        
-        // set text items
-        iMainContainer->SetListBoxTextArrayL(GenerateListBoxItemTextArrayL());
-        }
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::AppendToLoadItemListL(CLoadBase* aItem)
-    {
-    if (iLoadItemList)
-        iLoadItemList->AppendL( aItem );
-    else
-        User::Leave(KErrNotReady);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::DeleteFromLoadItemListL(TInt aIndex)
-    {
-    if (iLoadItemList)
-        {
-        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
-            {
-            // first call delete on the item
-            if (iLoadItemList->At(aIndex))
-                {                                
-                delete iLoadItemList->At(aIndex);
-                iLoadItemList->At(aIndex) = NULL;
-                }
-            
-            // and them remove the array entry
-            iLoadItemList->Delete(aIndex);
-            iLoadItemList->Compress();
-            }
-        else
-            User::Leave(KErrNotFound);
-        }
-    else
-        User::Leave(KErrNotReady);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::SuspendOrResumeFromLoadItemListL(TInt aIndex)
-    {
-    if (iLoadItemList)
-        {
-        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
-            {
-            if (iLoadItemList->At(aIndex))
-                {
-                if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateRunning)
-                    {
-                    iLoadItemList->At(aIndex)->Suspend();
-                    }
-                else if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateSuspended)
-                    {
-                    iLoadItemList->At(aIndex)->Resume();
-                    }
-                }
-            }
-        else
-            User::Leave(KErrNotFound);
-        }
-    else
-        User::Leave(KErrNotReady);
-    }
-            
-// --------------------------------------------------------------------------------------------
-
-TInt CLoadGenModel::LoadItemCount() const
-    {
-    TInt count(0);
-    
-    if (iLoadItemList)
-        count = iLoadItemList->Count();
-    
-    return count;
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::DeleteAllLoadItems()
-    {
-    // call delete for each entry and free memory allocated for the array
-    for (TInt i=0; i<LoadItemCount(); i++)
-        {
-        if ( iLoadItemList->At(i) )
-            {            
-            delete iLoadItemList->At(i);
-            iLoadItemList->At(i) = NULL;
-            }
-        }
-        
-    iLoadItemList->Reset();    
-    }  
-          
-// --------------------------------------------------------------------------------------------
-
-CDesCArray* CLoadGenModel::GenerateListBoxItemTextArrayL()
-    {
-    CDesCArray* textArray = new(ELeave) CDesCArrayFlat(64);
-    CleanupStack::PushL(textArray);
-
-    _LIT(KEntryTemplateRedIcon,   "1\t%S\t\t");
-    _LIT(KEntryTemplateGreenIcon, "2\t%S\t\t");
-    
-    for (TInt i=0; i<LoadItemCount(); i++)
-        {
-        // add description from each entry
-        TBuf<256> textEntry;
-        TBuf<256> description = iLoadItemList->At(i)->Description();
-        
-        if (iLoadItemList->At(i)->State() == CLoadBase::ELoadStateRunning)
-            textEntry.Format(KEntryTemplateGreenIcon, &description);
-        else
-            textEntry.Format(KEntryTemplateRedIcon, &description);
-        
-        textArray->AppendL(textEntry);
-        }    
-    
-    CleanupStack::Pop(); //textArray
-    return textArray;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::ShowItemActionMenuL()
-    {
-    TInt currentItemIndex = iMainContainer->CurrentListBoxItemIndex();
-    
-    if (LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
-        {
-        // show a query dialog    
-        TInt queryIndex(0);
-        CAknListQueryDialog* listQueryDlg = new(ELeave) CAknListQueryDialog(&queryIndex);
-
-        if (listQueryDlg->ExecuteLD(R_ITEM_ACTION_QUERY))
-            {
-            // stop
-            if (queryIndex == EItemActionMenuTypeStop)
-                {
-                StopSelectedOrHighlightedItemsL();
-                }
-            
-            // suspend or resume
-            else if (queryIndex == EItemActionMenuTypeSuspendResume)
-                {
-                SuspendOrResumeSelectedOrHighlightedItemsL();
-                }
-                           
-            // edit
-            else if (queryIndex == EItemActionMenuTypeEdit)
-                {
-                EditLoadL(iLoadItemList->At(currentItemIndex));
-                }
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::StopSelectedOrHighlightedItemsL()
-    {
-    const CArrayFix<TInt>* selectionIndexes = iMainContainer->ListBoxSelectionIndexes();
-
-    TInt err(KErrNone);
-
-    // by default use selected items
-    if (selectionIndexes && selectionIndexes->Count() > 0)
-        {
-        CAknQueryDialog* query = CAknQueryDialog::NewL();
-        _LIT(KQueryMessage, "Stop %d selections?");
-        TFileName queryMsg;
-        queryMsg.Format(KQueryMessage, selectionIndexes->Count());
-        
-
-        if (query->ExecuteLD(R_GENERAL_CONFIRMATION_QUERY, queryMsg))
-            {
-            TInt deleteIndexCounter(0);
-            TInt ref(0);
-            TKeyArrayFix key(0, ECmpTUint16);
-            TInt index(0);
-            
-            TInt loadCount = LoadItemCount();
-
-            for (TInt i=0; i<loadCount; i++)
-                {
-                ref = i;
-
-                if (selectionIndexes->Find(ref, key, index) == 0)  
-                    {
-                    TRAP(err, DeleteFromLoadItemListL(i-deleteIndexCounter));
-                    deleteIndexCounter++; // amount of indexes decreases after each delete
-                    }
-                }
-            
-            RefreshViewL();
-            User::LeaveIfError(err);
-            }
-        }
-    
-    // or if none selected, use the current item index
-    else
-        {
-        TInt currentItemIndex = iMainContainer->CurrentListBoxItemIndex();
-        
-        if (LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
-            {
-            CAknQueryDialog* query = CAknQueryDialog::NewL();
-           _LIT(KQueryMessage, "Stop hightlighted item?");
-
-            if (query->ExecuteLD(R_GENERAL_CONFIRMATION_QUERY, KQueryMessage))
-                {
-                TRAP(err, DeleteFromLoadItemListL(currentItemIndex));
-                
-                RefreshViewL();
-                User::LeaveIfError(err);
-                }
-            }
-        }  
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::SuspendOrResumeSelectedOrHighlightedItemsL()
-    {
-    const CArrayFix<TInt>* selectionIndexes = iMainContainer->ListBoxSelectionIndexes();
-
-    // by default use selected items
-    if (selectionIndexes && selectionIndexes->Count() > 0)
-        {
-        TInt ref(0);
-        TKeyArrayFix key(0, ECmpTUint16);
-        TInt index(0);
-
-        for (TInt i=0; i<LoadItemCount(); i++)
-            {
-            ref = i;
-
-            if (selectionIndexes->Find(ref, key, index) == 0)  
-                {
-                SuspendOrResumeFromLoadItemListL(i);
-                }
-            }
-        
-        RefreshViewL(EFalse);
-        }
-    
-    // or if none selected, use the current item index
-    else
-        {
-        TInt currentItemIndex = iMainContainer->CurrentListBoxItemIndex();
-        
-        if (LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
-            {
-            SuspendOrResumeFromLoadItemListL(currentItemIndex);
-            
-            RefreshViewL(EFalse);
-            }
-        }  
-    }                                
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::LoadSettingsL()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenModel::SaveSettingsL()
-    {
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TInt CLoadGenModel::LaunchSettingsDialogL()
-    {
-    return 0;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CDesCArray* CLoadGenModel::ListOfAllAppsL()
-    {
-    const TInt KMaxAppsArraySize=250;
-    RApaLsSession ls;
-    CleanupClosePushL(ls);
-
-    User::LeaveIfError( ls.Connect() );
-    CDesCArray* allAppsArray = new(ELeave) CDesCArrayFlat( KMaxAppsArraySize );
-    CleanupStack::PushL( allAppsArray );
-    // reset the apps list
-    allAppsArray->Reset();
-
-    // search all apps
-    TApaAppInfo appInfo;
-    User::LeaveIfError(ls.GetAllApps());
-
-
-    while ( ls.GetNextApp( appInfo ) == KErrNone )
-        {
-        allAppsArray->AppendL( appInfo.iFullName );      
-        }
-    CleanupStack::Pop( allAppsArray );
-    CleanupStack::PopAndDestroy( &ls );
-   
-
-    // remove loadgen.* from the list
-    for ( TInt i = 0; i < allAppsArray->MdcaCount(); i++ )
-        {
-        if ( allAppsArray->MdcaPoint(i).FindF( _L("\\loadgen.") ) != KErrNotFound )
-            {
-            allAppsArray->Delete(i);
-            allAppsArray->Compress();
-            break;
-            }
-        }
-
-    // sort the elements
-    allAppsArray->Sort();
-
-    return allAppsArray; // ownership transferred
-    }
-
-// End of File
--- a/loadgen/ui/avkon/src/loadgen_settingsviewdlg.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,323 +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 FILES
-#include "loadgen_settingsviewdlg.h"
-#include "loadgen_model.h"
-#include "loadgen.hrh"
-#include "loadgen_std.h"
-#include <loadgen.rsg>
-
-#include <aknsettingitemlist.h>
-#include <CAknMemorySelectionSettingItem.h> 
-#include <aknlists.h>
-#include <akntitle.h>
-#include <aknnavi.h>
-#include <aknnavide.h>
-#include <StringLoader.h>
-#include <aknnotewrappers.h> 
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CLoadGenSettingsViewDlg* CLoadGenSettingsViewDlg::NewL(TLoadGenSettings& aSettings)
-    {
-    CLoadGenSettingsViewDlg* self = new(ELeave) CLoadGenSettingsViewDlg(aSettings);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenSettingsViewDlg::~CLoadGenSettingsViewDlg()
-    {
-    // restore default navi pane
-    if (iNaviContainer)
-        iNaviContainer->Pop();
-    
-    if (iSettingItemArray)
-        {
-        iSettingItemArray->ResetAndDestroy();
-        delete iSettingItemArray; 
-        }
-    
-    delete iDecoratedTabGroup;   
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CLoadGenSettingsViewDlg::CLoadGenSettingsViewDlg(TLoadGenSettings& aSettings) : iSettings(aSettings)
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::ConstructL()
-    {
-    // construct a menu bar
-    CAknDialog::ConstructL(R_LOADGEN_SETTINGS_MENUBAR);
-   
-    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
-    
-    // set empty navi pane label
-    iNaviContainer = static_cast<CAknNavigationControlContainer*>(sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)));
-    //iNaviContainer->PushDefaultL();
-    
-    // set title text
-    CAknTitlePane* tp = static_cast<CAknTitlePane*>( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-    tp->SetTextL( _L("Settings") );
-    
-    // create a tab group
-    iDecoratedTabGroup = iNaviContainer->CreateTabGroupL(this);
-    iTabGroup = static_cast<CAknTabGroup*>(iDecoratedTabGroup->DecoratedControl());
-    iTabGroup->SetTabFixedWidthL(KTabWidthWithTwoLongTabs); 
-    
-    // add tabs
-    //iTabGroup->AddTabL(ETabGeneral, _L("General"));
-    //iTabGroup->AddTabL(ETabScreenShot, _L("Screen shot"));
-    //iTabGroup->SetActiveTabByIndex(ETabGeneral);
-    
-    iNaviContainer->PushL( *iDecoratedTabGroup );
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
-    {
-    switch (aEventType)
-        {
-        case EEventEnterKeyPressed:
-        case EEventItemDoubleClicked:
-            ShowSettingPageL(EFalse);
-            break;
-        default:
-            break;
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::TabChangedL(TInt /*aIndex*/)
-    {
-    iListBox->SetCurrentItemIndex(0);
-
-    SetVisibilitiesOfSettingItemsL();   
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::ProcessCommandL(TInt aCommandId)
-    {
-    CAknDialog::ProcessCommandL(aCommandId);
-
-    switch (aCommandId)
-        {
-        case ELoadGenCmdSettingsChange:
-            ShowSettingPageL(ETrue);
-            break;
-        case ELoadGenCmdSettingsExit:
-            TryExitL(EAknCmdExit);
-            break;
-        default:
-            break;
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TKeyResponse CLoadGenSettingsViewDlg::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
-    {
-    if (iTabGroup == NULL)
-        {
-        return EKeyWasNotConsumed;
-        }
-
-    TInt active = iTabGroup->ActiveTabIndex();
-    TInt count = iTabGroup->TabCount();
-
-    switch ( aKeyEvent.iCode )
-        {
-        case EKeyLeftArrow:
-            if (active > 0)
-                {
-                active--;
-                iTabGroup->SetActiveTabByIndex(active);
-                TabChangedL(active); 
-                }
-            break;
-        
-        case EKeyRightArrow:
-            if((active + 1) < count)
-                {
-                active++;
-                iTabGroup->SetActiveTabByIndex(active);
-                TabChangedL(active); 
-                }
-            break;
-        }
-
-    return CAknDialog::OfferKeyEventL(aKeyEvent, aType);
-    }    
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::PreLayoutDynInitL()
-    {
-    iListBox = static_cast<CAknSettingStyleListBox*>( Control(ELoadGenSettingItemList) );
-    iListBox->SetMopParent(this);
-    iListBox->CreateScrollBarFrameL(ETrue);
-    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
-    iListBox->SetListBoxObserver(this);
-
-    iSettingItemArray = new(ELeave) CAknSettingItemArray(16, EFalse, 0);
-
-    CTextListBoxModel* model = iListBox->Model();
-    model->SetItemTextArray(iSettingItemArray);
-    model->SetOwnershipType(ELbmDoesNotOwnItemArray);
-
-    UpdateListBoxL();    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-TBool CLoadGenSettingsViewDlg::OkToExitL(TInt aButtonId)
-    {
-    return CAknDialog::OkToExitL(aButtonId);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::ShowSettingPageL(TInt aCalledFromMenu)
-    {
-    TInt listIndex = iListBox->CurrentItemIndex();
-    TInt realIndex = iSettingItemArray->ItemIndexFromVisibleIndex(listIndex);
-    CAknSettingItem* item = iSettingItemArray->At(realIndex);
-    item->EditItemL(aCalledFromMenu);
-    item->StoreL();
-    SetVisibilitiesOfSettingItemsL();
-    DrawNow();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::SetVisibilitiesOfSettingItemsL()
-    {
-    if (iSettingItemArray->Count() > 0)
-        {
-/*
-        switch (iTabGroup->ActiveTabIndex())
-            {
-
-            case ETabGeneral:
-                {
-                ((*iSettingItemArray)[ESettingListDisplayModeSelection])->SetHidden(EFalse);
-                ((*iSettingItemArray)[ESettingListFileViewModeSelection])->SetHidden(EFalse);
-                break;
-                }
-            
-            case ETabScreenShot:
-                {
-                ((*iSettingItemArray)[ESettingListDisplayModeSelection])->SetHidden(ETrue);
-                ((*iSettingItemArray)[ESettingListFileViewModeSelection])->SetHidden(ETrue);
-                break;            
-                }
-
-            default:
-                User::Panic(_L("TabIOOB"), 50);
-                break;
-            }
-*/
-        iSettingItemArray->RecalculateVisibleIndicesL();
-        iListBox->HandleItemAdditionL();
-        iListBox->UpdateScrollBarsL();
-        }
-    }   
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::UpdateListBoxL()
-    {
-    iSettingItemArray->ResetAndDestroy();
-
-/* 
-    // create items
-    TInt ordinal(0);
-
-    AddSettingItemL(ESettingListDisplayModeSelection,
-                    R_DISPLAYMODESELECTION_SETTING_TITLE,
-                    R_DISPLAYMODESELECTION_SETTING_PAGE,
-                    R_DISPLAYMODESELECTION_SETTING_TEXTS,
-                    ordinal++);
-                    
-    AddSettingItemL(ESettingListFileViewModeSelection,
-                    R_FILEVIEWMODESELECTION_SETTING_TITLE,
-                    R_FILEVIEWMODESELECTION_SETTING_PAGE,
-                    R_FILEVIEWMODESELECTION_SETTING_TEXTS,
-                    ordinal++); 
-*/                                                              
-    SetVisibilitiesOfSettingItemsL(); 
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CLoadGenSettingsViewDlg::AddSettingItemL(TInt aId,
-                                                 TInt aTitleResource,
-                                                 TInt aSettingPageResource,
-                                                 TInt aAssociatedResource,
-                                                 TInt aOrdinal)
-    {
-    // create a setting item
-    CAknSettingItem* settingItem = NULL;
-    
-    switch (aId)
-        {
-/*
-        case ESettingListDisplayModeSelection:
-            settingItem = new(ELeave) CAknEnumeratedTextPopupSettingItem(aId, iSettings.iDisplayMode);
-            break;
-            
-        case ESettingListFileViewModeSelection:
-            settingItem = new(ELeave) CAknEnumeratedTextPopupSettingItem(aId, iSettings.iFileViewMode);
-            break;
-
-        default:
-            User::Panic(_L("NotSetItem"), 50);
-            break;
-*/
-        }
-        
-    CleanupStack::PushL(settingItem);
-
-    // get title text
-    HBufC* itemTitle = StringLoader::LoadLC(aTitleResource);
-
-    // construct the setting item
-    settingItem->ConstructL(EFalse, aOrdinal, *itemTitle, NULL, aSettingPageResource,
-                            EAknCtPopupSettingList, NULL, aAssociatedResource);
-
-    // append the setting item to settingitem array
-    iSettingItemArray->InsertL(aOrdinal, settingItem);
-
-    CleanupStack::PopAndDestroy(); //itemTitle
-    CleanupStack::Pop(); //settingItem
-    }
-
-// --------------------------------------------------------------------------------------------
-    
-// End of File
--- a/loadgen/ui/hb/hb.pro	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-# Contributors:
-# Description:
-TEMPLATE = app
-TARGET = LoadGen
-DEPENDPATH += .
-INCLUDEPATH += . \
-    /inc
-INCLUDEPATH += ./inc \
-    ../../engine/inc
-load(hb.prf)
-symbian:CONFIG -= symbian_i18n
-HEADERS += inc/mainview.h \
-    inc/settingsview.h \
-    inc/notifications.h
-SOURCES += src/main.cpp \
-    src/mainview.cpp \
-    src/settingsview.cpp \
-    src/notifications.cpp
-RESOURCES += loadgen.qrc
-symbian: { 
-    MMP_RULES -= PAGED
-    MMP_RULES *= UNPAGED
-    BLD_INF_RULES.prj_exports += "./rom/loadgen.iby CORE_IBY_EXPORT_PATH(tools,loadgen.iby)"
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-    INCLUDEPATH += /epoc32/include/mw/http
-    HEADERS += inc/engine.h \
-        inc/enginewrapper.h
-    SOURCES += src/engine.cpp \
-        src/enginewrapper.cpp \
-        ../../engine/src/loadgen_utils.cpp \
-        ../../engine/src/loadgen_loadbase.cpp \
-        ../../engine/src/loadgen_cpuload.cpp \
-        ../../engine/src/loadgen_memoryeat.cpp \
-        ../../engine/src/loadgen_phonecall.cpp \
-        ../../engine/src/loadgen_keypress.cpp \
-        ../../engine/src/loadgen_messages.cpp \
-        ../../engine/src/loadgen_applications.cpp \
-        ../../engine/src/loadgen_photocapture.cpp \
-        ../../engine/src/loadgen_bluetooth.cpp \
-        ../../engine/src/loadgen_pointerevent.cpp \
-        ../../engine/src/loadgen_netconn.cpp \
-        ../../engine/src/loadgen_httpreceiver.cpp
-    RSS_RULES += "group_name = \"RnD Tools\"";
-    LIBS += -leuser \
-        -lcommonengine \
-        -lapparc \
-        -lcone \
-        -leikcore \
-        -leikcoctl \
-        -leikctl \
-        -leikdlg \
-        -lws32 \
-        -lapgrfx \
-        -lefsrv \
-        -lbafl \
-        -lgdi \
-        -legul \
-        -letel3rdparty \
-        -lcommdb \
-        -lflogger \
-        -lestor \
-        -lmsgs \
-        -lsmcm \
-        -lgsmu \
-        -letext \
-        -lsendas2 \
-        -lecam \
-        -lfeatdiscovery \
-        -lcentralrepository \
-        -lesock \
-        -lbluetooth \
-        -lhal \
-        -lhttp \
-        -linetprotutil
-    TARGET.CAPABILITY = swevent \
-        ReadUserData \
-        WriteUserData \
-        NetworkServices \
-        UserEnvironment \
-        CAP_APPLICATION \
-        AllFiles
-    TARGET.UID2 = 0x100039CE
-    TARGET.UID3 = 0x20011384
-    // TARGET.SID = 0x20011384
-    TARGET.VID = 0x101FB657 \
-        // \
-        Nokia
-    TARGET.EPOCHEAPSIZE = 0x10000 \
-        0x1000000 \
-        // \
-        Min \
-        64Kb, \
-        Max \
-        16Mb
-    ICON = ../../icons/qgn_menu_loadgen.svg
-}
-else:error("Only Symbian supported!")
--- a/loadgen/ui/hb/inc/engine.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +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 LOADGEN_MODEL_H
-#define LOADGEN_MODEL_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <apgcli.h>
-
-#include "loadgen_loadattributes.h"
-#include "loadgen_loadbase.h"
-
-// FORWARD DECLARATIONS
-class EngineWrapper;
-class MainView;
-class CLoadGenGraphsContainer;
-class CEikonEnv;
-//class CLoadBase;
-
-
-typedef CArrayFixSeg<CLoadBase*> CLoadItemList;
-
-const TUint KMaxCPUs = 4;
-
-// CLASS DECLARATIONS
-
-class TLoadGenSettings
-    {
-public:
-    };
-
-class CEngine : public CActive
-    {
-private:
-    enum TContainerDrawState
-        {
-        EDrawStateInvalid = -1,
-        EDrawStateMain
-        };
-
-public:
-    static CEngine* NewL(EngineWrapper *aEngineWrapper);
-    ~CEngine();
-    void ActivateEngineL();
-    void DeActivateEngineL();
-	void LaunchPerfMonL();
-    void EditLoadL(TInt aIndex);
-	void ExistingLoadEditedL();
-	void ExistingLoadEditCancelled();
-	
-private:
-    void RunL();
-    void DoCancel();
-        
-private:
-    CEngine();
-    void ConstructL(EngineWrapper *aEngineWrapper);
-    void LoadSettingsL();
-    void AppendToLoadItemListL(CLoadBase* aItem);
-    void DeleteFromLoadItemListL(TInt aIndex);
-    void SuspendOrResumeFromLoadItemListL(TInt aIndex);
-    void DeleteAllLoadItems();
-    void RefreshViewL(TBool aClearSelection=ETrue);
-    CDesCArray* ListOfAllAppsL();    
-    
-public:
-    void StopAllLoadItemsL();
-    void SuspendAllLoadItemsL();
-    void ResumeAllLoadItemsL();
-            
-    TInt LoadItemCount() const;
-    void StopSelectedOrHighlightedItemsL(const CArrayFix<TInt>* aSelectionIndexes);
-    void SuspendOrResumeSelectedOrHighlightedItemsL();
-
-    CDesCArray* GenerateListBoxItemTextArrayL();
-    void StartNewLoadL(TInt aCommand);
-	void DoStartNewLoadL(TInt aCommand);
-    void SaveSettingsL();
-    TInt LaunchSettingsDialogL();
-	TCPULoadAttributes GetCPULoadAttributes();
-	TMemoryEatAttributes GetMemoryEatAttributes();
-	TPhoneCallAttributes GetPhoneCallAttributes();
-	TNetConnAttributes GetNetConnAttributes();
-	TKeyPressAttributes GetKeyPressAttributes();
-	TMessageAttributes GetMessageAttributes();
-	TApplicationsAttributes GetApplicationsAttributes();
-	TPhotoCaptureAttributes GetPhotoCaptureAttributes();
-	TBluetoothAttributes    GetBluetoothAttributes();
-	TPointerEventAttributes GetPointerEventAttributes();
-	void ChangeCPULoadAttributes(const TCPULoadAttributes& aAttributes); 
-	void ChangeMemoryEatAttributes(const TMemoryEatAttributes& aAttributes);
-	void ChangePhoneCallAttributes(const TPhoneCallAttributes& aAttributes);
-	void ChangeNetConnAttributes(const TNetConnAttributes& aAttributes);
-	void ChangeKeyPressAttributes(const TKeyPressAttributes& aAttributes);
-	void ChangeMessageAttributes(const TMessageAttributes& aAttributes);
-	void ChangeApplicationsAttributes(const TApplicationsAttributes& aAttributes);
-	void ChangePhotoCaptureAttributes(const TPhotoCaptureAttributes& aAttributes);
-	void ChangeBluetoothAttributes(const TBluetoothAttributes& aAttributes);
-	void ChangePointerEventAttributes(const TPointerEventAttributes& aAttributes);
-	
-    inline TLoadGenSettings& Settings() { return iSettings; }
-    inline CEikonEnv* EikonEnv() 		{ return iEnv; }
-    inline RApaLsSession& LsSession() 	{ return iLs; }
-    inline TBool LoadItemsExists() 		{ return iLoadItemList->Count() > 0; } 
-
-
-private:
-    RTimer                  iTimer;
-    CEikonEnv*              iEnv;
-    TLoadGenSettings        iSettings;
-    RApaLsSession           iLs;
-    CLoadItemList*          iLoadItemList;
-    TInt                    iReferenceNumber;
-    TCPULoadAttributes      iCpuLoadAttributes;
-    TMemoryEatAttributes    iMemoryEatAttributes;
-    TPhoneCallAttributes    iPhoneCallAttributes;
-    TNetConnAttributes      iNetConnAttributes;
-    TKeyPressAttributes     iKeyPressAttributes;
-    TMessageAttributes      iMessageAttributes;
-    TApplicationsAttributes	iApplicationsAttributes;
-    TPhotoCaptureAttributes iPhotoCaptureAttributes;
-    TBluetoothAttributes    iBluetoothAttributes;
-    TPointerEventAttributes iPointerEventAttributes;
-	EngineWrapper*          iEngineWrapper; // used for communicating between QT and Symbian
-	TInt 					iCurrentItemIndex;
-	TBool                   iEditExistingLoad;
-	CLoadBase::TLoadState   iLoadStatusBeforeEdit;
-    };
- 
-
-#endif
-
--- a/loadgen/ui/hb/inc/enginewrapper.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +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 ENGINEWRAPPER_H
-#define ENGINEWRAPPER_H
-
-#include <e32std.h>
-#include <e32base.h>
-#include <badesca.h>
-#include <engine.h>
-#include "loadgen.hrh"
-
-#include <QObject>
-
-class HbMainWindow;
-class HbAction;
-class MainView; 
-class SettingsView;
-class CPULoadAttributes;
-class MemoryEatAttributes;
-class PhoneCallAttributes;
-class NetConnAttributes;
-class KeyPressAttributes;
-class PointerEventAttributes;
-class MessageAttributes;
-class ApplicationsAttributes;
-class PhotoCaptureAttributes;
-class BluetoothAttributes;
-
-/**
- * class that is used for communicating between Symbian and Qt code.
- */
-class EngineWrapper : public QObject
- { 
-	Q_OBJECT
-
-public:
-    
-    /**
-     * Constructor
-     */
-    EngineWrapper(HbMainWindow &mainWindow, MainView &mainView);
-    
-    /**
-     * Destructor
-     */
-    ~EngineWrapper();
-    
-    /**
-     * Initializes Engine Wrapper
-     * @return true if engine was started successfully
-     */
-    bool init();
-		
-public slots:
-    void StopLoadYesNoDialogClosed(HbAction *action);
-	void loadAddedOrEdited(TLoadGenCommandIds cmdId);
-	void loadSettingsCanclled();	
-
-public:
-
-	/* Functions that are called from UI: */
-    
-	/**
-	* Start new load
-	*/
-	bool startNewLoad(int commandId);
-
-	/**
-	* Launch Performance Monitor application.
-	*/
-	void launchPerfMonApp();
-	
-	/**
-	* Edit operation for load settings
-	*/
-	void loadEdit(int rowIndex);
-	
-	/**
-	* CPU load attributes
-	*/
-	CPULoadAttributes getCpuLoadAttributes();
-	
-	/**
-	* Memory eat attributes
-	*/
-	MemoryEatAttributes getMemoryEatAttributes();
-
-	/**
-	* Phone call attributes
-	*/
-	PhoneCallAttributes getPhoneCallAttributes();
-	
-	/**
-	* Network connection attributes
-	*/
-	NetConnAttributes getNetConnAttributes();
-	
-	/**
-	* Key presses attributes
-	*/
-	KeyPressAttributes getKeyPressAttributes();
-
-	/**
-	* Pointer event attributes
-	*/
-	PointerEventAttributes getPointerEventAttributes();
-	
-	/**
-	* Message attributes
-	*/
-	MessageAttributes getMessageAttributes();
-	
-	/**
-	* Applications attributes
-	*/
-	ApplicationsAttributes getApplicationsAttributes();
-	
-	/**
-	* Photo capture attributes
-	*/
-	PhotoCaptureAttributes getPhotoCaptureAttributes();
-	
-	/**
-	* BT attributes
-	*/
-	BluetoothAttributes getBluetoothAttributes();
-	
-	/**
-	* Set attributes for CPU load
-	*/
-	void setCpuLoadAttributes(const CPULoadAttributes& attributes);
-	
-	/**
-	* Set attributes for memory eat
-	*/
-	void setMemoryEatAttributes(const MemoryEatAttributes& attributes);
-
-	/**
-	* Set attributes for phone call
-	*/	
-	void setPhoneCallAttributes(const PhoneCallAttributes& attributes);
-
-	/**
-	* Set attributes for network connection
-	*/		
-	void setNetConnAttributes(const NetConnAttributes& attributes);
-	
-	/**
-	* Set attributes for key presses
-	*/
-	void setKeyPressAttributes(const KeyPressAttributes& attributes);
-	
-	/**
-	* Set pointer event for messages
-	*/
-	void setPointerEventAttributes(const PointerEventAttributes& attributes);
-
-	/**
-	* Set message attributes
-	*/
-	void setMessageAttributes(const MessageAttributes& attributes);
-	
-	/**
-	* Set applications attributes
-	*/
-	void setApplicationsAttributes(const ApplicationsAttributes& attributes);
-	
-	/**
-	* Set photo capture attributes
-	*/
-	void setPhotoCaptureAttributes(const PhotoCaptureAttributes& attributes);
-	
-	/**
-	* Set BT attributes
-	*/	
-	void setBluetoothAttributes(const BluetoothAttributes& attributes);
-	
-	/**
-	* Stop load
-	*/
-	bool stopLoad(bool stopAll);
-	
-	/**
-	* Resume all loads
-	*/ 
-	void resumeAllLoadItems();
-
-	/**
-	* Suspend all loads
-	*/ 	
-	void suspendAllLoadItems();
-	
-	/**
-	* Suspend or resume selected/highlighted item from load list.
-	*/
-	void suspendOrResumeSelectedOrHighlightedItems();
-    
-public:
-
-    /* Functions that are called from engine: */
-    
-	/** 
-     * uses Notifications class to show error message 
-     */
-    void ShowErrorMessage(const TDesC& aErrorMessage);
-
-    /**
-	* uses Notifications class to show user note
-	*/
-	void ShowNote(const TDesC& aNoteMessage);
-	
-	/**
-	* Query item index
-	* @return selected row in load list view
-	*/
-	TInt QueryCurrentItemIndex();
-	
-	/**
-	* selected indexes
-	*/
-	const CArrayFix<TInt>*  QueryListSelectedIndexesOrCurrentItemL();
-
-	/**
-	* Open settings for load.
-	*/
-	void OpenLoadSettings(TInt loadType, bool editExistingLoad);
-	
-	void ReFreshView(CDesCArray* aTextArray);
-	/**
-	* Clear load list selection(s) in Ui
-	*/
-	void ClearSelection();
-	
-	/**
-	* Set current index in load list
-	*/
-	void SetCurrentItemIndex(TInt aIndex);
-	
-public: 
-	inline MainView& ViewReference() { return mMainView; };	
-	inline HbMainWindow& WindowReference() { return mMainWindow; };
-	
-private:
-
-	enum LoadTypes {
-		Cpu,
-		EatMemory,
-		PhoneCalls,
-		Messages,
-		NWConnections,
-		KeyPresses,
-		Apps,
-		Photos,
-		BTAct,
-		PointerEvents
-	};
-    
-    
-    /* LoadGen engine */
-    CEngine* mEngine;
-    
-	MainView &mMainView;
-	HbMainWindow &mMainWindow;
-	bool mEditExistingLoad;
-};
-
-#endif //ENGINEWRAPPER_H
--- a/loadgen/ui/hb/inc/mainview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MAINVIEW_H
-#define MAINVIEW_H
-
-#include <hbview.h>
-
-class EngineWrapper;
-class HbMainWindow;
-class HbApplication;
-class HbAction;
-class HbLabel;
-class HbProgressNote;
-class HbListView;
-class HbAbstractViewItem;
-
-class QStandardItemModel;
-class QSignalMapper;
-class QPointF;
-
-class MainView : public HbView
-{
-    Q_OBJECT
-    
-public:
-
-    MainView(HbMainWindow &mainWindow);
-	~MainView();
-	void init(HbApplication &app);
-	int currentItemIndex();
-	void setCurrentItemIndex(int index);
-	void clearListSelection();
-	void setLoadListData(QStringList& items);
-	QList<int> listSelectionIndexes();
-	
-private:
-    void createMenu(HbApplication &app);
-	void loadListIinit();
-	bool showItemActionPopup(int &index);
-	void loadListDelete();
-	bool stopLoad(bool stopAll /*, int selectedLoad = 0*/);
-   
-private slots:
-    void handleLoadListEvent(HbAbstractViewItem */*listViewItem*/, const QPointF &/*coords*/);
-    void ItemActionPopupClosed(HbAction* action );
-	void showAboutPopup();
-	void stopAllLoads();
-	void updateMenu();
-	void launchPerfMon();
-	void suspendAllLoads();
-	void resumeAllLoads();
-	
-	/**
-	* calls engine wrapper to complete service request, specified by cmd.
-	*/
-	void executeMenuCommand(int cmd);
-    
-private:
-    HbMainWindow &mMainWindow;
-    EngineWrapper *mEngineWrapper;
-	HbListView *mListView;
-	QStandardItemModel *mListModel;
-	QSignalMapper *mSm;
-	bool mIsLoadListEmpty;
-	
-	HbAction *mActionAbout;
-	HbMenu   *mLoadSubMenu1;
-	HbMenu   *mLoadSubMenu2;
-	HbAction *mActionExit;
-	HbAction *mStopAll;
-	HbAction *mSuspendAll;	
-	HbAction *mResumeAll;	
-	HbAction *mActionPerfMon;
-	HbAction *mCpuLoadAction;
-	HbAction *mMemoryEatLoadAction;
-	HbAction *mPhoneCallLoadAction;
-	HbAction *mMessagesLoadAction;
-	HbAction *mNetConnLoadAction;
-	HbAction *mAppsLoadAction;
-	HbAction *mKeyPressLoadAction;
-	HbAction *mPhotoCapturesLoadAction;
-	HbAction *mBtActionsLoadAction;
-	HbAction *mPointerEventsLoadAction;
-	
-};
-
-#endif // MAINVIEW_H
--- a/loadgen/ui/hb/inc/notifications.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +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 NOTIFICATIONS_H_
-#define NOTIFICATIONS_H_
-
-#include <hbmessagebox.h>
-
-
-class Notifications : public HbPopup
-    {
-
-	Q_OBJECT 	
-	
-public:
-    
-    /**
-     * shows about box
-     */
-    static void about();
-    
-    /** 
-     * shows error message 
-     */
-    static void error(const QString& errorMessage);
-	
-    /**
-     * shows global HbGlobalCommonNote type note
-     */
-	static void showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, HbPopup::DefaultTimeout timeout = HbPopup::ConfirmationNoteTimeout);
-    };
-
-
-
-#endif // NOTIFICATIONS_H_
--- a/loadgen/ui/hb/inc/settingsview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +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 SETTINGSVIEW_H
-#define SETTINGSVIEW_H
-
-#include <hbmainwindow.h>
-#include <hbview.h>
-#include "loadgen.hrh"
-
-class EngineWrapper;
-class HbDataFormModelItem;
-class HbDataFormModel;
-class HbDataForm;
-class HbDataFormViewItem;
-class HbRadioButtonList;
-
-class CPULoadAttributes
-    {
-public:
-    uint mId;        
-    uint mPriority;        
-    uint mMode;        
-    uint mType;        
-    uint mLength;        
-    uint mIdle;        
-    uint mRandomVariance;
-    int  mCpu;
-    uint mCpuCount;
-    };
-
-class MemoryEatAttributes
-    {
-public:
-    uint    mId;        
-    uint    mPriority;        
-    uint    mSource;        
-    uint    mType;
-    uint    mBuffer;
-    uint    mIdle;
-    qint64  mAmount;
-    qint64  mRandomMin;
-    qint64  mRandomMax;
-    QString mAmountDes;
-    QString mRandomMinDes;
-    QString mRandomMaxDes;
-    uint    mRandomVariance;        
-    }; 
-
-class PhoneCallAttributes
-    {
-public:
-    uint    mId;        
-    uint    mPriority;        
-    QString mDestination;
-    uint    mLength;        
-    uint    mIdle;        
-    uint    mRandomVariance;        
-    };
-	
-class NetConnAttributes
-    {
-public:
-    uint    mId;        
-    uint    mPriority;        
-    QString mDestination;
-    uint    mIdle;        
-    uint    mRandomVariance;        
-    };
-	
-class KeyPressAttributes
-    {
-public:
-    uint mId;        
-    uint mPriority;        
-    uint mHeartBeat;        
-    uint mRandomVariance;        
-    };	
-	
-class PointerEventAttributes
-    {
-public:
-    uint mId;        
-    uint mPriority;        
-    uint mHeartBeat;        
-    uint mRandomVariance;        
-    };
-
-class MessageAttributes
-    {
-public:
-    uint    mId;
-    int     mMessageType;
-    QString mDestination;
-    uint    mPriority; 
-    uint    mAmount;
-    int     mLength;    
-    uint    mIdle;    
-    uint    mRandomVariance;        
-    };
-
-class ApplicationsAttributes
-    {
-public:
-    uint        mId;        
-    uint        mPriority;
-    uint        mLaunchingInterval;
-    uint        mKeyPressType;
-    uint        mMaxOpen;
-    uint        mHeartBeat;
-    uint        mRandomVariance;
-    QStringList mAppsArray;
-
-    };
-
-
-class PhotoCaptureAttributes
-    {
-public:
-    uint mId;    
-    int  mPriority;
-    int  mCameraCount;
-    int  mCamera;
-    uint mIdle;    
-    uint mRandomVariance;        
-    };
-
-class BluetoothAttributes
-    {
-public:
-    uint mId;    
-    int mPriority;    
-    uint mIdle;    
-    uint mRandomVariance;        
-    bool mBluetoothSupported;
-    };
-	
-
-class SettingsView : public HbView
-{
-    Q_OBJECT
-    
-public:
-    SettingsView(HbView &mainView, HbMainWindow &parent, EngineWrapper &engine);
-    ~SettingsView();
-    void open(const QString &settingsName, TLoadGenCommandIds cmdId);
-
-signals:
-	void loadCompleted(TLoadGenCommandIds cmdId);
-	void loadCanclled();
-	
-private slots:
-   void backButtonPressed();
-   void okExit();
-   void cancelled();
-   void selectionChanged(int index);
-   void dataItemDisplayed(const QModelIndex &index);
-   
-private:
-    void createItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createCpuLoadItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createEatMemoryItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createPhoneCallItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createNetConnItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createKeyOrPointerItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createMessageItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createAppsItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createPhotoItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-	void createBtItems(HbDataFormModel *model, HbDataFormModelItem *parent);
-    void loadAttributes();
-    void saveSettings();
-	void saveCpuLoadSettings();
-	void saveEatMemorySettings();
-	void savePhoneCallSettings();
-	void saveNetConnSettings();
-	void saveKeyPressSettings();
-	void saveMessageSettings();
-	void savePointerEventSettings();
-	void saveApplicationsSettings();
-	void savePhotoSettings();
-	void saveBtSettings();
-    void exit();
-    void setDefaultSettings();
-	void setLoadAttributes();
-    
-private:
-    HbMainWindow &mMainWindow;
-    HbView &mMainView;
-    EngineWrapper &mEngineWrapper;
-	TLoadGenCommandIds mCmdId;
-
-    /* Setting form */
-    HbDataForm *mSettingForm;
-    
-    /* Model for Setting form */
-    HbDataFormModel *mModel;
-    
-    /* Components for the model: */   
-
-    /* grouped load settings */
-    HbDataFormModelItem *mLoadSettings;
-    
-    HbDataFormModelItem *mPriority;
-    HbDataFormModelItem *mLoadMode;
-	HbDataFormModelItem *mSource;
-    HbDataFormModelItem *mType;
-	HbDataFormModelItem *mAmount;
-	HbDataFormModelItem *mMinAmountToBeLeft;
-	HbDataFormModelItem *mMaxAmountToBeLeft;
-	HbDataFormModelItem *mBuffer;
-    HbDataFormModelItem *mLength;
-	HbDataFormModelItem *mDestination;
-	HbDataFormModelItem *mIdle;
-	HbDataFormModelItem *mHeartBeat;
-	HbDataFormModelItem *mRandomVar;
-	HbDataFormModelItem *mMaxParallelApps;
-	HbDataFormModelItem *mLaunchingInterval;
-	HbDataFormModelItem *mKeyPressType;
-	HbDataFormModelItem *mCamera;
-	HbDataFormModelItem *mCpu;
-	
-	HbRadioButtonList *mModes;
-	HbRadioButtonList *mTypes;
-	
-	/* load attributes for each load type*/
-	CPULoadAttributes      mCPULoadAttributes;
-	MemoryEatAttributes    mMemoryEatAttributes;
-	PhoneCallAttributes	   mPhoneCallAttributes;
-	NetConnAttributes	   mNetConnAttributes;
-	KeyPressAttributes     mKeyPressAttributes;
-	PointerEventAttributes mPointerEventAttributes;
-	MessageAttributes      mMessageAttributes;
-	ApplicationsAttributes mApplicationsAttributes;
-	PhotoCaptureAttributes mPhotoCaptureAttributes;
-	BluetoothAttributes    mBluetoothAttributes;
-};
-
-#endif // SETTINGSVIEW_H
--- a/loadgen/ui/hb/loadgen.qrc	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<RCC>
-    <qresource prefix="/" >
-        <file alias="loadgen.svg">..\..\icons\qgn_menu_loadgen.svg</file>
-		<file alias="active.svg">..\..\icons\qgn_prob_status_green.svg</file>
-		<file alias="paused.svg">..\..\icons\qgn_prob_status_red.svg</file>
-    </qresource>
-</RCC>
--- a/loadgen/ui/hb/rom/loadgen.iby	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +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 __LOADGEN_IBY__
-#define __LOADGEN_IBY__
-
-S60_APP_EXE(LoadGen)
-S60_APP_AIF_ICONS(LoadGen)
-S60_APP_RESOURCE(LoadGen)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,LoadGen_ExtraIcons)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,LoadGen)
-
-//#ifdef S60_UPGRADABLE_APP_REG_RSC
-//  S60_UPGRADABLE_APP_REG_RSC(LoadGen)
-//#else
-//  S60_APP_AIF_RSC(LoadGen)
-//#endif
-
-data=ZPRIVATE\10003a3f\import\APPS\LoadGen_reg.RSC Private\10003a3f\import\Apps\LoadGen_reg.rsc
-
-data=ZPRIVATE\20011384\backup_registration.xml        	private\20011384\backup_registration.xml
-data=ZSYSTEM\Install\LoadGen_stub.sis                   \system\install\LoadGen_stub.sis
-
-#endif // __LOADGEN_IBY__
--- a/loadgen/ui/hb/src/engine.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1240 +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 FILES
-#include "engine.h"
-#include "enginewrapper.h"
-#include "settingsview.h"
-#include "loadgen_utils.h"
-#include "loadgen_cpuload.h"
-#include "loadgen_memoryeat.h"
-#include "loadgen_phonecall.h"
-#include "loadgen_netconn.h"
-#include "loadgen_keypress.h"
-#include "loadgen_pointerevent.h"
-#include "loadgen_messages.h"
-#include "loadgen_applications.h"
-#include "loadgen_photocapture.h"
-#include "loadgen_bluetooth.h"
-#include "loadgen_traces.h"
-#include "loadgen_loadattributes.h"
-#include "loadgen.hrh"
-
-//#include "loadgen_editors.h"
-//#include "loadgen_app.h"
-//#include "loadgen_settingsviewdlg.h"
-//#include "loadgen_maincontainer.h"
-
-//#include <loadgen.rsg>
-
-#include <coeutils.h>
-#include <bautils.h>
-#include <eikenv.h>
-//#include <AknQueryDialog.h>
-#include <e32math.h> 
-#include <u32hal.h>
-#include <hal.h> 
-#include <hal_data.h>
-
-#include <ecam.h>
-//#include <aknnotewrappers.h>
-#include <featdiscovery.h>
-
-const TInt KZeroIndex = 0;
-
-// ===================================== MEMBER FUNCTIONS =====================================
-
-CEngine* CEngine::NewL(EngineWrapper *aEngineWrapper)
-    {
-    CEngine* self = new(ELeave) CEngine;
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngineWrapper);
-    CleanupStack::Pop();
-    return self;
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CEngine::CEngine() : CActive(EPriorityStandard)
-    {
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CEngine::ConstructL(EngineWrapper *aEngineWrapper)
-    {
-	iEngineWrapper = aEngineWrapper;
-
-    iReferenceNumber = 0;
-	iCurrentItemIndex = 0;
-	iEditExistingLoad = EFalse;
-    
-    iEnv = CEikonEnv::Static();
-    User::LeaveIfError(iLs.Connect());
-    
-    iLoadItemList = new(ELeave) CLoadItemList(64);
-
-    User::LeaveIfError(iTimer.CreateLocal());
-    CActiveScheduler::Add(this);
-  
-  }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::ActivateEngineL()
-    {
-    // load settings
-    //TRAP_IGNORE(LoadSettingsL());
-
-	// RAM
-	TMemoryInfoV1Buf ramMemory;
-	UserHal::MemoryInfo(ramMemory);
-	                
-	TInt freeRam = ramMemory().iFreeRamInBytes;
-
-	
-    // set defaults to attributes
-    iCpuLoadAttributes.iId = 0;
-    iCpuLoadAttributes.iPriority = EThreadPriorityTypeNormal;
-    iCpuLoadAttributes.iMode = ECpuLoadModeYielding;
-    iCpuLoadAttributes.iType = ECpuLoadTypePeriodic;
-    iCpuLoadAttributes.iLength = 4000;
-    iCpuLoadAttributes.iIdle = 2000;
-    iCpuLoadAttributes.iRandomVariance = 0;
-    iCpuLoadAttributes.iCpu = KCPUSelection_FreeScheduling; // set CPU as "undefined" (can be >= 0 only in SMP environments)
-    iCpuLoadAttributes.iCpuCount = UserSvr::HalFunction(EHalGroupKernel, KHalFunction_EKernelHalNumLogicalCpus, 0, 0);
-    if( iCpuLoadAttributes.iCpuCount < 1 || iCpuLoadAttributes.iCpuCount > KMaxCPUs )
-        {
-        // HAL may not support this function, so let's use CPU count 1:
-        iCpuLoadAttributes.iCpuCount = 1;
-        }
-    iMemoryEatAttributes.iId = 0;
-    iMemoryEatAttributes.iPriority = EThreadPriorityTypeNormal;
-    iMemoryEatAttributes.iSource = 0;
-    iMemoryEatAttributes.iType = EMemoryEatTypeMemoryToBeLeft;
-    iMemoryEatAttributes.iBuffer = 16*1024;
-    iMemoryEatAttributes.iIdle = 0;
-    iMemoryEatAttributes.iAmount = freeRam;//0;
-    iMemoryEatAttributes.iRandomMin = 1000000;
-    iMemoryEatAttributes.iRandomMax = 1500000;
-    iMemoryEatAttributes.iAmountDes.Copy(KNullDesC);
-    iMemoryEatAttributes.iRandomMinDes.Copy(KNullDesC);
-    iMemoryEatAttributes.iRandomMaxDes.Copy(KNullDesC);
-    iMemoryEatAttributes.iRandomVariance = 0;
-
-    iPhoneCallAttributes.iId = 0;
-    iPhoneCallAttributes.iPriority = EThreadPriorityTypeNormal;
-    iPhoneCallAttributes.iDestination.Copy(_L("+358"));
-    iPhoneCallAttributes.iLength = 60000;
-    iPhoneCallAttributes.iIdle = 10000;
-    iPhoneCallAttributes.iRandomVariance = 0;
-
-    iNetConnAttributes.iId = 0;
-    iNetConnAttributes.iPriority = EThreadPriorityTypeNormal;
-    iNetConnAttributes.iDestination.Copy(_L("http://www.nokia.com"));
-    iNetConnAttributes.iIdle = 10000;
-    iNetConnAttributes.iRandomVariance = 0;
-
-    iKeyPressAttributes.iId = 0;
-    iKeyPressAttributes.iPriority = EThreadPriorityTypeNormal;
-    iKeyPressAttributes.iHeartBeat = 100;
-    iKeyPressAttributes.iRandomVariance = 0;
-    
-    iPointerEventAttributes.iId = 0;
-    iPointerEventAttributes.iPriority = EThreadPriorityTypeNormal;
-    iPointerEventAttributes.iHeartBeat = 1000;
-    iPointerEventAttributes.iRandomVariance = 0;
-
-    iMessageAttributes.iId = 0;
-    iMessageAttributes.iPriority = EThreadPriorityTypeNormal;
-    iMessageAttributes.iMessageType = EMessageTypeSMS;
-    iMessageAttributes.iDestination.Copy(_L("+358"));
-    iMessageAttributes.iAmount = 5;
-    iMessageAttributes.iLength = 160;
-    iMessageAttributes.iIdle = 15000;
-    iMessageAttributes.iRandomVariance = 0;
-    
-    iApplicationsAttributes.iId = 0;
-    iApplicationsAttributes.iLaunchingInterval = 2000;
-    iApplicationsAttributes.iPriority = EThreadPriorityTypeNormal;
-    iApplicationsAttributes.iKeyPressType = EApplicationsKeyPressTypeNone;
-    iApplicationsAttributes.iMaxOpen = 20;
-    iApplicationsAttributes.iHeartBeat = 50;
-    iApplicationsAttributes.iRandomVariance = 0;
-    
-    iPhotoCaptureAttributes.iId = 0;
-    iPhotoCaptureAttributes.iPriority = EThreadPriorityTypeNormal;
-    iPhotoCaptureAttributes.iIdle = 10000;
-    iPhotoCaptureAttributes.iRandomVariance = 0;        
-    iPhotoCaptureAttributes.iCameraCount = CCamera::CamerasAvailable();
-    if(iPhotoCaptureAttributes.iCameraCount > 0)
-        {
-        iPhotoCaptureAttributes.iCamera = 0; // Main camera
-        }
-    else
-        {
-        iPhotoCaptureAttributes.iCamera = -1;
-        }
-    
-    iBluetoothAttributes.iId = 0;
-    iBluetoothAttributes.iPriority = EThreadPriorityTypeNormal;
-    iBluetoothAttributes.iIdle = 10000;
-    iBluetoothAttributes.iRandomVariance = 0;
-    iBluetoothAttributes.iBluetoothSupported = CFeatureDiscovery::IsFeatureSupportedL(KFeatureIdBt);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::DeActivateEngineL()
-    {
-    Cancel();
-    
-    // for a faster exit, send the application to background
-    TApaTask selfTask(iEnv->WsSession());
-    selfTask.SetWgId(iEnv->RootWin().Identifier());
-    selfTask.SendToBackground();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-CEngine::~CEngine()
-    {
-    if (iLoadItemList)
-        {
-        DeleteAllLoadItems();
-        delete iLoadItemList;
-        }
-    if ( iApplicationsAttributes.iAppsArray )
-        {
-        delete iApplicationsAttributes.iAppsArray;
-        }
-    iTimer.Close();
-    iLs.Close();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::DoCancel()
-    {
-    iTimer.Cancel();
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::RunL()
-    {
-    // continue    
-    //iTimer.After(iStatus, 400000);
-    //SetActive();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CEngine::StartNewLoadL(TInt aCommand)
-    {
-    // show new load query
-	//CLoadGenLoadTypeEditorBase* dlg = NULL;
-	
-	if(aCommand == ELoadGenCmdNewLoadPhotoCaptures && 
-	   iPhotoCaptureAttributes.iCameraCount == 0)
-		{
-		_LIT(message, "Cameras not available");
-		iEngineWrapper->ShowNote(message);
-		return;
-		}
-	if(aCommand == ELoadGenCmdNewLoadBluetooth &&
-	   iBluetoothAttributes.iBluetoothSupported == EFalse)
-		{
-		_LIT(message, "Bluetooth device not available");
-		iEngineWrapper->ShowNote(message); 
-		return;
-		}
-	/*
-    switch ( aCommand )
-        {
-        case ELoadGenCmdNewLoadCPULoad:
-            {
-            //dlg = CLoadGenCPULoadEditor::NewL(iCpuLoadAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadEatMemory:
-            {
-            //dlg = CLoadGenMemoryEatEditor::NewL(iMemoryEatAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadPhoneCall:
-            {
-            //dlg = CLoadGenPhoneCallEditor::NewL(iPhoneCallAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadNetConn:
-            {
-            //dlg = CLoadGenNetConnEditor::NewL(iNetConnAttributes);
-            break;
-            }
-        case ELoadGenCmdNewLoadKeyPress:
-            {
-            //dlg = CLoadGenKeyPressEditor::NewL(iKeyPressAttributes);
-            break;
-            }               
-        case ELoadGenCmdNewLoadMessages:
-            {
-            //dlg = CLoadGenMessagesEditor::NewL( iMessageAttributes );
-            break;
-            }
-        case ELoadGenCmdNewLoadApplications:
-            {
-            //dlg = CLoadGenApplicationsEditor::NewL( iApplicationsAttributes );
-            break;
-            }
-        case ELoadGenCmdNewLoadPhotoCaptures:
-            {
-            if( iPhotoCaptureAttributes.iCameraCount > 0 )
-                {
-                //dlg = CLoadGenPhotoCaptureEditor::NewL( iPhotoCaptureAttributes );
-                }
-            else
-                {
-                _LIT(message, "Cameras not available");
-				iEngineWrapper->ShowNote(message); 
-                //CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
-                //errorNote->ExecuteLD(message);
-				return;
-                }
-            break;
-            }
-        case ELoadGenCmdNewLoadBluetooth:
-            {
-            if( iBluetoothAttributes.iBluetoothSupported )
-                {
-                //dlg = CLoadGenBluetoothEditor::NewL(iBluetoothAttributes);                
-                }
-            else
-                {
-                _LIT(message, "Bluetooth device not available");
-				iEngineWrapper->ShowNote(message); 
-                //CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
-                //errorNote->ExecuteLD(message);
-                return;
-                }
-            break;
-            }
-        case ELoadGenCmdNewLoadPointerEvent:
-            {
-            //dlg = CLoadGenPointerEventEditor::NewL(iPointerEventAttributes);
-            break;
-            } 
-
-        default:
-            {
-            User::Panic(_L("Wrong new load"), 111);
-            break;
-            }
-        }
-	*/
-	iEditExistingLoad = EFalse;
-    iEngineWrapper->OpenLoadSettings(aCommand, EFalse); // = dlg->RunQueryLD();
-
-    // set back title
-    
-	//if (iMainContainer) 
-    //    iMainContainer->SetDefaultTitlePaneTextL();
-
-    // start creating new load if dialog accepted
-    //if (dlgResult)
-    //    {
-    //    DoStartNewLoadL(aCommand);
-    //    }
-	// DoStartNewLoadL() called from engine wrapper slot function newLoadAdded() after
-	// load settings closed by user select: ok.
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::EditLoadL(TInt aIndex)
-    {
-	CLoadBase* aItem = iLoadItemList->At(aIndex);
-	iCurrentItemIndex = aIndex;
-	iEditExistingLoad = ETrue;
-    // suspend current
-	if (aItem->State() == CLoadBase::ELoadStateRunning)
-		{
-		iLoadStatusBeforeEdit = CLoadBase::ELoadStateRunning;
-		aItem->Suspend();
-		}
-    
-    // show new load query
-
-	/* CLoadGenLoadTypeEditorBase* dlg = NULL;
-	
-
-    switch ( aItem->Type() )
-        {
-        case ELoadGenCmdNewLoadCPULoad:
-            {
-            //dlg = CLoadGenCPULoadEditor::NewL(static_cast<CCPULoad*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadEatMemory:
-            {
-            //dlg = CLoadGenMemoryEatEditor::NewL(static_cast<CMemoryEat*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadPhoneCall:
-            {
-            //dlg = CLoadGenPhoneCallEditor::NewL(static_cast<CPhoneCall*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadNetConn:
-            {
-            //dlg = CLoadGenNetConnEditor::NewL(static_cast<CNetConn*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadKeyPress:
-            {
-            //dlg = CLoadGenKeyPressEditor::NewL(static_cast<CKeyPress*>(aItem)->Attributes(), ETrue);
-            break;
-            }       
-        case ELoadGenCmdNewLoadMessages:
-            {
-            //dlg = CLoadGenMessagesEditor::NewL(static_cast<CMessages*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        case ELoadGenCmdNewLoadApplications:
-            {
-            //dlg = CLoadGenApplicationsEditor::NewL( static_cast<CAppLauncher*>(aItem)->Attributes(), ETrue );
-            break;
-            }
-        case ELoadGenCmdNewLoadPhotoCaptures:
-            {
-            //dlg = CLoadGenPhotoCaptureEditor::NewL( static_cast<CPhotoCapture*>(aItem)->Attributes(), ETrue );
-            break;
-            }
-        case ELoadGenCmdNewLoadBluetooth:
-            {
-            //dlg = CLoadGenBluetoothEditor::NewL( static_cast<CBluetooth*>(aItem)->Attributes(), ETrue );
-            break;
-            }
-        case ELoadGenCmdNewLoadPointerEvent:
-            {
-            //dlg = CLoadGenPointerEventEditor::NewL(static_cast<CPointerEvent*>(aItem)->Attributes(), ETrue);
-            break;
-            }
-        default:
-            {
-            User::Panic(_L("Wrong edit load"), 114);
-            break;
-            }
-        }
-		*/
-	iEngineWrapper->OpenLoadSettings(aItem->Type(), iEditExistingLoad);
-    // ExistingLoadEditedL method called from engine wrapper when load settings view close signal received.
-    
-	//TBool dlgResult = ETrue; //dlg->RunQueryLD();
-
-    // set back title
-	// TODO: check this.
-    //if (iMainContainer)
-    //    iMainContainer->SetDefaultTitlePaneTextL();
-    
-    // change priority of the load item
-    //aItem->SetPriority();
-
-    // resume execution the item
-    //aItem->Resume();
-    
-    //if (dlgResult)
-    //    RefreshViewL(EFalse);
-    }
-
-// --------------------------------------------------------------------------------------------    
-	
-void CEngine::ExistingLoadEditedL()
-	{
-	CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-	// change priority of the load item
-    aItem->SetPriority();
-	if (iLoadStatusBeforeEdit == CLoadBase::ELoadStateRunning)
-		{
-		// resume execution the item
-		aItem->Resume();
-		RefreshViewL(EFalse);
-		}
-	// cancel:
-	
-	}
-	
-// --------------------------------------------------------------------------------------------    
-	
-void CEngine::ExistingLoadEditCancelled()
-	{
-	if (iLoadStatusBeforeEdit == CLoadBase::ELoadStateRunning)
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		// resume execution due to suspend action before edit started:
-		aItem->Resume();
-		}	
-	RefreshViewL(EFalse);
-	}
-	
-// --------------------------------------------------------------------------------------------
-
-void CEngine::DoStartNewLoadL(TInt aCommand)
-    {
-    CLoadBase* item = NULL;
-    
-    switch ( aCommand )
-        {
-        case ELoadGenCmdNewLoadCPULoad:
-            {
-            if( iCpuLoadAttributes.iCpu == KCPUSelection_AllCPUs )
-                {
-                // Call this function recursively for all CPUs:
-                for( TUint i = 0; i < iCpuLoadAttributes.iCpuCount; ++i )
-                    {                    
-                    iCpuLoadAttributes.iCpu = i;
-                    DoStartNewLoadL(aCommand);
-                    }
-                // And finally set user selection back to "All CPUs"
-                iCpuLoadAttributes.iCpu = KCPUSelection_AllCPUs;
-                return;
-                }
-            else
-                {
-                item = CCPULoad::NewL(iCpuLoadAttributes, iReferenceNumber);
-                }
-            break;
-            }
-        case ELoadGenCmdNewLoadEatMemory:
-            {
-            item = CMemoryEat::NewL(iMemoryEatAttributes, iReferenceNumber);
-            break;
-            }
-        case ELoadGenCmdNewLoadPhoneCall:
-            {
-            item = CPhoneCall::NewL(iPhoneCallAttributes, iReferenceNumber);
-            break;
-            }
-        case ELoadGenCmdNewLoadNetConn:
-            {
-            item = CNetConn::NewL(iNetConnAttributes, iReferenceNumber);
-            break;
-            }
-            
-        case ELoadGenCmdNewLoadKeyPress:
-            {
-            item = CKeyPress::NewL(iKeyPressAttributes, iReferenceNumber);
-            break;
-            }        
-        case ELoadGenCmdNewLoadMessages:
-            {
-            item = CMessages::NewL( iMessageAttributes, iReferenceNumber );
-            break;
-            }
-        case ELoadGenCmdNewLoadApplications:
-            {
-            iApplicationsAttributes.iAppsArray = ListOfAllAppsL();
-            item = CAppLauncher::NewL( iApplicationsAttributes, iReferenceNumber );            
-            break;
-            }
-        case ELoadGenCmdNewLoadPhotoCaptures:
-            {
-            item = CPhotoCapture::NewL( iPhotoCaptureAttributes, iReferenceNumber);
-            break;
-            }
-        case ELoadGenCmdNewLoadBluetooth:
-            {
-            item = CBluetooth::NewL( iBluetoothAttributes, iReferenceNumber);            
-            break;
-            }
-        case ELoadGenCmdNewLoadPointerEvent:
-            {
-            item = CPointerEvent::NewL(iPointerEventAttributes, iReferenceNumber);
-            break;
-            }
-            
-        default:
-            {
-            User::Panic(_L("Wrong new load"), 112);
-            break;
-            }
-        }
-    
-    iReferenceNumber++;
-
-    // add item to the array
-    AppendToLoadItemListL(item);
-
-    // update the listbox
-    RefreshViewL(EFalse);
-
-    // set item index to the end
-	// Check this feature to be done in Orbit UI.
-    // iMainContainer->ListBox()->SetCurrentItemIndexAndDraw( iMainContainer->ListBox()->Model()->NumberOfItems()-1 );
-
-    // start the load
-    item->Resume();
-        
-    // refresh again
-    RefreshViewL(EFalse);    
-    }
-
-// --------------------------------------------------------------------------------------------
-
-
-void CEngine::StopAllLoadItemsL()
-    {
-    DeleteAllLoadItems();
-    
-    RefreshViewL();
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CEngine::SuspendAllLoadItemsL()
-    {
-    for (TInt i=0; i<LoadItemCount(); i++)
-        {
-        if ( iLoadItemList->At(i) )
-            {
-            iLoadItemList->At(i)->Suspend();
-            }
-        }
-        
-    RefreshViewL();    
-    }
-// --------------------------------------------------------------------------------------------
-
-void CEngine::ResumeAllLoadItemsL()
-    {
-    for (TInt i=0; i<LoadItemCount(); i++)
-        {
-        if ( iLoadItemList->At(i) )
-            {
-            iLoadItemList->At(i)->Resume();
-            }
-        }
-
-    RefreshViewL();    
-    }    
-    
-// --------------------------------------------------------------------------------------------
-
-void CEngine::RefreshViewL(TBool aClearSelection)
-    {
-	// clear selections if any
-	iEngineWrapper->ClearSelection();
-	if (aClearSelection) 
-		{
-		iEngineWrapper->SetCurrentItemIndex(KZeroIndex);
-		}
-	iEngineWrapper->ReFreshView(GenerateListBoxItemTextArrayL());
-    }
-
-// --------------------------------------------------------------------------------------------
-
-CDesCArray* CEngine::GenerateListBoxItemTextArrayL()
-    {
-    CDesCArray* textArray = new(ELeave) CDesCArrayFlat(64);
-    CleanupStack::PushL(textArray);
-
-    _LIT(KEntryTemplateRedIcon,   "1\t%S\t\t");
-    _LIT(KEntryTemplateGreenIcon, "2\t%S\t\t");
-    TInt cnt = LoadItemCount();
-    for (TInt i=0; i< cnt; i++)
-        {
-        // add description from each entry
-        TBuf<256> textEntry;
-        TBuf<256> description = iLoadItemList->At(i)->Description();
-        
-        if (iLoadItemList->At(i)->State() == CLoadBase::ELoadStateRunning)
-            textEntry.Format(KEntryTemplateGreenIcon, &description);
-        else
-            textEntry.Format(KEntryTemplateRedIcon, &description);
-        
-        textArray->AppendL(textEntry);
-        }    
-    
-    CleanupStack::Pop(); //textArray
-    return textArray;
-    }
-	
-// --------------------------------------------------------------------------------------------
-
-void CEngine::AppendToLoadItemListL(CLoadBase* aItem)
-    {
-    if (iLoadItemList)
-        iLoadItemList->AppendL( aItem );
-    else
-        User::Leave(KErrNotReady);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::DeleteFromLoadItemListL(TInt aIndex)
-    {
-    if (iLoadItemList)
-        {
-        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
-            {
-            // first call delete on the item
-            if (iLoadItemList->At(aIndex))
-                {                                
-                delete iLoadItemList->At(aIndex);
-                iLoadItemList->At(aIndex) = NULL;
-                }
-            
-            // and them remove the array entry
-            iLoadItemList->Delete(aIndex);
-            iLoadItemList->Compress();
-            }
-        else
-            User::Leave(KErrNotFound);
-        }
-    else
-        User::Leave(KErrNotReady);
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::SuspendOrResumeFromLoadItemListL(TInt aIndex)
-    {
-    if (iLoadItemList)
-        {
-        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
-            {
-            if (iLoadItemList->At(aIndex))
-                {
-                if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateRunning)
-                    {
-                    iLoadItemList->At(aIndex)->Suspend();
-                    }
-                else if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateSuspended)
-                    {
-                    iLoadItemList->At(aIndex)->Resume();
-                    }
-                }
-            }
-        else
-            User::Leave(KErrNotFound);
-        }
-    else
-        User::Leave(KErrNotReady);
-    }
-            
-// --------------------------------------------------------------------------------------------
-
-TInt CEngine::LoadItemCount() const
-    {
-    TInt count(0);
-    
-    if (iLoadItemList)
-        count = iLoadItemList->Count();
-    
-    return count;
-    }
-    
-// --------------------------------------------------------------------------------------------
-
-void CEngine::DeleteAllLoadItems()
-    {
-    // call delete for each entry and free memory allocated for the array
-    for (TInt i=0; i<LoadItemCount(); i++)
-        {
-        if ( iLoadItemList->At(i) )
-            {            
-            delete iLoadItemList->At(i);
-            iLoadItemList->At(i) = NULL;
-            }
-        }
-        
-    iLoadItemList->Reset();    
-    }  
-          
-// --------------------------------------------------------------------------------------------
-
-void CEngine::StopSelectedOrHighlightedItemsL(const CArrayFix<TInt>* aSelectionIndexes)
-    {
-    TInt err(KErrNone);
-
-    // by default use selected items
-    if (aSelectionIndexes && aSelectionIndexes->Count() > 0)
-        {
-        TInt deleteIndexCounter(0);
-        TInt ref(0);
-        TKeyArrayFix key(0, ECmpTUint16);
-        TInt index(0);
-        
-        TInt loadCount = LoadItemCount();
-
-        for (TInt i=0; i<loadCount; i++)
-            {
-            ref = i;
-
-            if (aSelectionIndexes->Find(ref, key, index) == 0)  
-                {
-                TRAP(err, DeleteFromLoadItemListL(i-deleteIndexCounter));
-                deleteIndexCounter++; // amount of indexes decreases after each delete
-                }
-            }
-            
-            RefreshViewL();
-            User::LeaveIfError(err);
-        }
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::SuspendOrResumeSelectedOrHighlightedItemsL()
-    {
-    const CArrayFix<TInt>* selectionIndexes = iEngineWrapper->QueryListSelectedIndexesOrCurrentItemL(); //iMainContainer->ListBoxSelectionIndexes();
-
-    // by default use selected items
-    if (selectionIndexes && selectionIndexes->Count() > 0)
-        {
-        TInt ref(0);
-        TKeyArrayFix key(0, ECmpTUint16);
-        TInt index(0);
-
-        for (TInt i=0; i<LoadItemCount(); i++)
-            {
-            ref = i;
-
-            if (selectionIndexes->Find(ref, key, index) == 0)  
-                {
-                SuspendOrResumeFromLoadItemListL(i);
-                }
-            }
-        
-        RefreshViewL(EFalse);
-        }  
-    }                                
-// --------------------------------------------------------------------------------------------
-
-void CEngine::LoadSettingsL()
-    {
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::SaveSettingsL()
-    {
-    }
-        
-// --------------------------------------------------------------------------------------------
-
-TInt CEngine::LaunchSettingsDialogL()
-    {
-    return 0;
-    }
-    
-// --------------------------------------------------------------------------------------------
-CDesCArray* CEngine::ListOfAllAppsL()
-    {
-    const TInt KMaxAppsArraySize=250;
-    RApaLsSession ls;
-    CleanupClosePushL(ls);
-
-    User::LeaveIfError( ls.Connect() );
-    CDesCArray* allAppsArray = new(ELeave) CDesCArrayFlat( KMaxAppsArraySize );
-    CleanupStack::PushL( allAppsArray );
-    // reset the apps list
-    allAppsArray->Reset();
-
-    // search all apps
-    TApaAppInfo appInfo;
-    User::LeaveIfError(ls.GetAllApps());
-
-
-    while ( ls.GetNextApp( appInfo ) == KErrNone )
-        {
-        allAppsArray->AppendL( appInfo.iFullName );      
-        }
-    CleanupStack::Pop( allAppsArray );
-    CleanupStack::PopAndDestroy( &ls );
-   
-
-    // remove loadgen.* from the list
-    for ( TInt i = 0; i < allAppsArray->MdcaCount(); i++ )
-        {
-        if ( allAppsArray->MdcaPoint(i).FindF( _L("\\loadgen.") ) != KErrNotFound )
-            {
-            allAppsArray->Delete(i);
-            allAppsArray->Compress();
-            break;
-            }
-        }
-
-    // sort the elements
-    allAppsArray->Sort();
-
-    return allAppsArray; // ownership transferred
-    }
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::LaunchPerfMonL()
-	{
-	// launch Performance Monitor
-	const TUid KUidPerfMon = { 0x20011385 };
-	
-	RWsSession ws;
-	User::LeaveIfError( ws.Connect() );
-	CleanupClosePushL(ws);
-	
-	RApaLsSession ls;
-	User::LeaveIfError( ls.Connect() );
-	CleanupClosePushL(ls);
-	
-	
-	// try to find the task of PerfMon
-	TApaTaskList tasklist(ws);
-	TApaTask task = tasklist.FindApp(KUidPerfMon);
-
-	if (task.Exists())
-		{
-		// task exists, bring it to foreground
-		task.BringToForeground();
-		}
-	else
-		{
-		TApaAppInfo appInfo;
-		User::LeaveIfError(ls.GetAppInfo(appInfo, KUidPerfMon));
-		
-		CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
-		cmdLine->SetExecutableNameL(appInfo.iFullName);
-		cmdLine->SetCommandL(EApaCommandBackground);
-
-		// start the app
-		User::LeaveIfError(ls.StartApp(*cmdLine));
-		
-		CleanupStack::PopAndDestroy(); //cmdLine                
-		}
-	
-	CleanupStack::PopAndDestroy(2); //ws,ls
-	}
-
-// --------------------------------------------------------------------------------------------
-	
-TCPULoadAttributes CEngine::GetCPULoadAttributes()
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		return iCpuLoadAttributes;
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CCPULoad*>(aItem)->Attributes());
-		}
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::ChangeCPULoadAttributes(const TCPULoadAttributes& aAttributes) 
-	{ 
-	if (iEditExistingLoad == EFalse) 
-		{
-		iCpuLoadAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CCPULoad*>(aItem)->SetAttributes(aAttributes);
-		}
-	}
-
-// --------------------------------------------------------------------------------------------
-
-TMemoryEatAttributes CEngine::GetMemoryEatAttributes()
-	{ 
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iMemoryEatAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CMemoryEat*>(aItem)->Attributes());
-		}
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void CEngine::ChangeMemoryEatAttributes(const TMemoryEatAttributes& aAttributes) 
-	{ 
-	if (iEditExistingLoad == EFalse) 
-		{
-		iMemoryEatAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CMemoryEat*>(aItem)->SetAttributes(aAttributes);
-		}
-	}	
-	
-// --------------------------------------------------------------------------------------------
-
-TPhoneCallAttributes CEngine::GetPhoneCallAttributes()
-	{ 
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iPhoneCallAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CPhoneCall*>(aItem)->Attributes());
-		}
-	}
-
-// --------------------------------------------------------------------------------------------	
-
-void CEngine::ChangePhoneCallAttributes(const TPhoneCallAttributes& aAttributes)
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		iPhoneCallAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CPhoneCall*>(aItem)->SetAttributes(aAttributes);
-		}	
-	}
-	
-// --------------------------------------------------------------------------------------------	
-
-TNetConnAttributes CEngine::GetNetConnAttributes()
-	{ 
-  
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iNetConnAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CNetConn*>(aItem)->Attributes());
-		}
-	
-	}
-
-// --------------------------------------------------------------------------------------------		
-	
-void CEngine::ChangeNetConnAttributes(const TNetConnAttributes& aAttributes)
-	{
-    
-	if (iEditExistingLoad == EFalse) 
-		{
-		iNetConnAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CNetConn*>(aItem)->SetAttributes(aAttributes);
-		}
-			
-	}
-	
-// --------------------------------------------------------------------------------------------	
-
-TKeyPressAttributes CEngine::GetKeyPressAttributes()
-	{ 
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iKeyPressAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CKeyPress*>(aItem)->Attributes());
-		}
-	}	
-
-	
-// --------------------------------------------------------------------------------------------		
-	
-void CEngine::ChangeKeyPressAttributes(const TKeyPressAttributes& aAttributes)
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		iKeyPressAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CKeyPress*>(aItem)->SetAttributes(aAttributes);
-		}	
-	}	
-	
-// --------------------------------------------------------------------------------------------	
-
-TMessageAttributes CEngine::GetMessageAttributes()
-	{ 
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iMessageAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CMessages*>(aItem)->Attributes());
-		}
-	}	
-	
-// --------------------------------------------------------------------------------------------		
-	
-void CEngine::ChangeMessageAttributes(const TMessageAttributes& aAttributes)
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		iMessageAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CMessages*>(aItem)->SetAttributes(aAttributes);
-		}	
-	}
-
-// --------------------------------------------------------------------------------------------	
-
-TApplicationsAttributes CEngine::GetApplicationsAttributes()
-	{ 
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iApplicationsAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CAppLauncher*>(aItem)->Attributes());
-		}
-	}	
-
-// --------------------------------------------------------------------------------------------		
-	
-void CEngine::ChangeApplicationsAttributes(const TApplicationsAttributes& aAttributes)
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		iApplicationsAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CAppLauncher*>(aItem)->SetAttributes(aAttributes);
-		}	
-	}
-	
-// --------------------------------------------------------------------------------------------	
-
-TPhotoCaptureAttributes CEngine::GetPhotoCaptureAttributes()
-	{ 
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iPhotoCaptureAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CPhotoCapture*>(aItem)->Attributes());
-		}
-	}	
-
-// --------------------------------------------------------------------------------------------		
-	
-void CEngine::ChangePhotoCaptureAttributes(const TPhotoCaptureAttributes& aAttributes)
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		iPhotoCaptureAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CPhotoCapture*>(aItem)->SetAttributes(aAttributes);
-		}	
-	}	
-	
-// --------------------------------------------------------------------------------------------	
-	
-TBluetoothAttributes CEngine::GetBluetoothAttributes()
-	{ 
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iBluetoothAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CBluetooth*>(aItem)->Attributes());
-		}
-	}		
-
-	
-// --------------------------------------------------------------------------------------------		
-	
-void CEngine::ChangeBluetoothAttributes(const TBluetoothAttributes& aAttributes)
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		iBluetoothAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CBluetooth*>(aItem)->SetAttributes(aAttributes);
-		}	
-	} 	
-	
-// --------------------------------------------------------------------------------------------	
-	
-TPointerEventAttributes CEngine::GetPointerEventAttributes()
-	{
-	if (iEditExistingLoad == EFalse)
-		{	
-		return iPointerEventAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		return (static_cast<CPointerEvent*>(aItem)->Attributes());
-		}
-	}
-
-// --------------------------------------------------------------------------------------------		
-	
-void CEngine::ChangePointerEventAttributes(const TPointerEventAttributes& aAttributes)
-	{
-	if (iEditExistingLoad == EFalse) 
-		{
-		iPointerEventAttributes = aAttributes; 
-		}
-	else 
-		{
-		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
-		static_cast<CPointerEvent*>(aItem)->SetAttributes(aAttributes);
-		}	
-	} 
-	
-// --------------------------------------------------------------------------------------------
-	
-// End of File
--- a/loadgen/ui/hb/src/enginewrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,736 +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 <hbmainwindow.h>
-//#include <hbcommonnote.h>
-#include <hbpopup.h>
-#include <hbaction.h>
-
-#include <QString>
- #include <QStringList>
- 
-#include <e32std.h>
-#include <e32base.h>
-
-#include "notifications.h"
-#include "enginewrapper.h"
-#include "settingsview.h"
-#include "engine.h"
-#include "mainview.h"
-
-QStringList LOADTYPES = (QStringList() << "CPU load" << "Memory eat" << "Phone calls" << "Messages" 
-									   << "Network conn." << "Key presses" << "Applications" << "Photo captures" 
-									   << "Bluetooth actions" << "Pointer events");
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::EngineWrapper(HbMainWindow &mainWindow, MainView &mainView)
-: mEngine(0), 
-  mMainView(mainView),
-  mMainWindow(mainWindow),
-  mEditExistingLoad(false)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::~EngineWrapper()
-{
-    if (mEngine != 0) {
-		TRAP_IGNORE(mEngine->DeActivateEngineL());
-        delete mEngine;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::init()
-{
-	TInt err = KErrNone;
-    TRAP(err, mEngine = CEngine::NewL(this));
-    if(err != KErrNone) {
-        return false;
-    }
-    else {
-		TRAP(err, mEngine->ActivateEngineL());
-		if (err != KErrNone) {
-			return false;
-		}
-		else {
-			return true;
-		}
-    }
-}
-
-// ---------------------------------------------------------------------------	
-
-bool EngineWrapper::startNewLoad(int commandId)
-{
-	TRAPD(err, mEngine->StartNewLoadL(commandId));
-
-	// error handling
-    if(err != KErrNone) {
-        return false;
-    }
-    else {
-        return true;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::launchPerfMonApp()
-{
-	TRAPD(err, mEngine->LaunchPerfMonL());
-	// error handling
-    if(err != KErrNone) {
-        Notifications::error("Perf Mon launch failed.");
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::loadAddedOrEdited(TLoadGenCommandIds cmdId)
-{
-	if (mEditExistingLoad == false) {
-		TRAP_IGNORE(mEngine->DoStartNewLoadL(cmdId));
-	}
-	else {
-		TRAP_IGNORE(mEngine->ExistingLoadEditedL());
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::loadSettingsCanclled()
-{
-	if (mEditExistingLoad == true) {
-		TRAP_IGNORE(mEngine->ExistingLoadEditCancelled());
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::loadEdit(int rowIndex)
-{
-	TRAPD(err, mEngine->EditLoadL(rowIndex));
-	// error handling
-    if(err != KErrNone) {
-        Notifications::error("Load edit failed.");
-    }
-}
-
-void EngineWrapper::StopLoadYesNoDialogClosed(HbAction *action)
-{
-    if( action && !action->text().compare("yes", Qt::CaseInsensitive) ){
-        const CArrayFix<TInt>* selectionIndexes = NULL;
-        try{
-            QT_TRAP_THROWING( selectionIndexes = QueryListSelectedIndexesOrCurrentItemL() );
-            if(selectionIndexes)
-                QT_TRAP_THROWING( mEngine->StopSelectedOrHighlightedItemsL(selectionIndexes) );
-        }
-        catch(...){
-            Notifications::error("Stop load failed.");
-        }
-        if(selectionIndexes)
-            delete selectionIndexes;
-    }
-}
-
-// ---------------------------------------------------------------------------
-bool EngineWrapper::stopLoad(bool stopAll)
-{
-	TInt err = KErrNone;
-	if (stopAll == true) {
-		TRAP(err, mEngine->StopAllLoadItemsL());
-		// error handling
-        if(err != KErrNone) {
-            return false;
-        }
-        else {
-            return true;
-        }   
-	}
-	else {
-        // by default use selected items
-        QList<int> listIndices = mMainView.listSelectionIndexes();
-        if (listIndices.count() > 0)
-            {
-            QString message = QString("Stop %1 selections?").arg( listIndices.count() );
-            HbMessageBox::question(message, this, SLOT(StopLoadYesNoDialogClosed(HbAction *)), HbMessageBox::Yes|HbMessageBox::No);
-            }
-        else{
-             TInt currentItemIndex = mMainView.currentItemIndex();
-             if (mEngine->LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
-                 {
-                 QString message("Stop highlighted selections?");
-                 HbMessageBox::question(message, this, SLOT(StopLoadYesNoDialogClosed(HbAction *)), HbMessageBox::Yes|HbMessageBox::No);
-                 }
-            }
-        return true;
-	}
-	
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::resumeAllLoadItems()
-{
-	TRAPD(err, mEngine->ResumeAllLoadItemsL());
-	// error handling
-    if(err != KErrNone) {
-        Notifications::error("Error in loads resume.");
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::suspendAllLoadItems()
-{
-	TRAPD(err, mEngine->SuspendAllLoadItemsL());
-	// error handling
-    if(err != KErrNone) {
-        Notifications::error("Error in loads resume.");
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::suspendOrResumeSelectedOrHighlightedItems()
-{
-	TRAPD(err, mEngine->SuspendOrResumeSelectedOrHighlightedItemsL());
-	// error handling
-    if(err != KErrNone) {
-        Notifications::error("Error to show item action menu.");
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowErrorMessage(const TDesC& aErrorMessage)
-{
-    QString errorMessage((QChar*)aErrorMessage.Ptr(),aErrorMessage.Length());
-    Notifications::error(errorMessage);
- 
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowNote(const TDesC& aNoteMessage)
-{
-    QString note((QChar*)aNoteMessage.Ptr(),aNoteMessage.Length());
-    Notifications::showGlobalNote(note, HbMessageBox::MessageTypeInformation, HbPopup::StandardTimeout);
-}
- 
-// ---------------------------------------------------------------------------
-
-TInt EngineWrapper::QueryCurrentItemIndex()
-{
-	return mMainView.currentItemIndex();
-}
-
-// ---------------------------------------------------------------------------
-
-const CArrayFix<TInt>*  EngineWrapper::QueryListSelectedIndexesOrCurrentItemL()
-{
-	QList<int> listIndices = mMainView.listSelectionIndexes();
-	TInt cnt = listIndices.count();
-    CArrayFix<TInt>* indices = new(ELeave)CArrayFixFlat<TInt>( cnt > 0 ? cnt : 1 );
-    CleanupDeletePushL(indices);
-    if(cnt > 0){
-        for (TInt i = 0; i < cnt; i++) {
-            indices->AppendL(listIndices.at(i));
-        }
-    }
-    else{
-        indices->AppendL(mMainView.currentItemIndex());
-    }
-    CleanupStack::Pop(indices);
-    return static_cast<const CArrayFix<TInt>*>(indices);	
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::OpenLoadSettings(TInt loadType, bool editExistingLoad)
-{
-	SettingsView* settings = new SettingsView((HbView&)ViewReference(), 
-											  WindowReference(), 
-											  *this);
-	mEditExistingLoad = editExistingLoad;
-
-	switch (loadType) {
-		case ELoadGenCmdNewLoadCPULoad: {
-			settings->open(LOADTYPES.at(Cpu), 
-			               (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadEatMemory: {
-			settings->open(LOADTYPES.at(EatMemory), 
-			               (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadPhoneCall: {
-			settings->open(LOADTYPES.at(PhoneCalls), 
-			               (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadNetConn: {
-			settings->open(LOADTYPES.at(NWConnections),
-                           (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadKeyPress: {
-			settings->open(LOADTYPES.at(KeyPresses), 
-			               (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadMessages: {
-			settings->open(LOADTYPES.at(Messages), 
-			               (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadApplications: {
-			settings->open(LOADTYPES.at(Apps), 
-			               (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadPhotoCaptures: {
-			settings->open(LOADTYPES.at(Photos), 
-			               (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadBluetooth: {
-			settings->open(LOADTYPES.at(BTAct), 
-						   (TLoadGenCommandIds)loadType);
-			break;
-		}
-		case ELoadGenCmdNewLoadPointerEvent: {
-			settings->open(LOADTYPES.at(PointerEvents),
-						   (TLoadGenCommandIds)loadType);
-			break;
-		}
-		default: {
-			User::Panic(_L("Wrong new load"), 111);
-			break;
-		}
-	}
-}
-
-// ---------------------------------------------------------------------------	
-
-CPULoadAttributes EngineWrapper::getCpuLoadAttributes()
-{
-    TCPULoadAttributes tCpuLoadAttributes = mEngine->GetCPULoadAttributes();
-    CPULoadAttributes attributes;
-	
-	attributes.mId = tCpuLoadAttributes.iId;
-	attributes.mPriority = tCpuLoadAttributes.iPriority;
-	attributes.mMode = tCpuLoadAttributes.iMode;
-	attributes.mType = tCpuLoadAttributes.iType;
-	attributes.mLength = tCpuLoadAttributes.iLength;
-	attributes.mIdle = tCpuLoadAttributes.iIdle;
-	attributes.mRandomVariance = tCpuLoadAttributes.iRandomVariance;
-	attributes.mCpu = tCpuLoadAttributes.iCpu;
-	attributes.mCpuCount = tCpuLoadAttributes.iCpuCount;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setCpuLoadAttributes(const CPULoadAttributes& attributes)
-{
-    TCPULoadAttributes tCpuLoadAttributes;
-
-	tCpuLoadAttributes.iId = attributes.mId;
-	tCpuLoadAttributes.iPriority = attributes.mPriority;
-	tCpuLoadAttributes.iMode = attributes.mMode;
-	tCpuLoadAttributes.iType = attributes.mType;
-	tCpuLoadAttributes.iLength = attributes.mLength;
-	tCpuLoadAttributes.iIdle = attributes.mIdle;
-	tCpuLoadAttributes.iRandomVariance = attributes.mRandomVariance;
-	tCpuLoadAttributes.iCpu = attributes.mCpu;
-	tCpuLoadAttributes.iCpuCount = attributes.mCpuCount;	
-	
-	mEngine->ChangeCPULoadAttributes(tCpuLoadAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-MemoryEatAttributes EngineWrapper::getMemoryEatAttributes()
-{
-
-    TMemoryEatAttributes tMemoryEatAttributes = mEngine->GetMemoryEatAttributes();
-    MemoryEatAttributes attributes;
-
-    // Convert TMemoryEatAttributes to MemoryEatAttributes 
-    attributes.mId         = tMemoryEatAttributes.iId;
-    attributes.mPriority   = tMemoryEatAttributes.iPriority; 
-	attributes.mSource     = tMemoryEatAttributes.iSource;
-	attributes.mType       = tMemoryEatAttributes.iType;
-	attributes.mBuffer     = tMemoryEatAttributes.iBuffer;
-	attributes.mIdle       = tMemoryEatAttributes.iIdle;
-	attributes.mAmount     = tMemoryEatAttributes.iAmount;
-	attributes.mRandomMin  = tMemoryEatAttributes.iRandomMin;
-	attributes.mRandomMax  = tMemoryEatAttributes.iRandomMax;
-
-    TBuf<64> amount;
-    amount.Copy(tMemoryEatAttributes.iAmountDes);
-    attributes.mAmountDes = QString((QChar*)amount.Ptr(), amount.Length()); 
-
-    TBuf<64> min;
-    min.Copy(tMemoryEatAttributes.iRandomMinDes);
-    attributes.mAmountDes = QString((QChar*)min.Ptr(), min.Length()); 
-
-    TBuf<64> max;
-    max.Copy(tMemoryEatAttributes.iRandomMaxDes);
-    attributes.mAmountDes = QString((QChar*)max.Ptr(), max.Length());
-	
-	attributes.mRandomVariance  = tMemoryEatAttributes.iRandomVariance;
-    return attributes;
-}	
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setMemoryEatAttributes(const MemoryEatAttributes& attributes)
-{
-	TMemoryEatAttributes tMemoryEatAttributes = mEngine->GetMemoryEatAttributes();//TMemoryEatAttributes tMemoryEatAttributes;
-
-	tMemoryEatAttributes.iId = attributes.mId;
-	tMemoryEatAttributes.iPriority = attributes.mPriority;
-	tMemoryEatAttributes.iSource = attributes.mSource;
-	tMemoryEatAttributes.iType = attributes.mType;
-	tMemoryEatAttributes.iBuffer = attributes.mBuffer;
-	tMemoryEatAttributes.iIdle = attributes.mIdle;
-	tMemoryEatAttributes.iAmount = attributes.mAmount;
-	tMemoryEatAttributes.iRandomMin = attributes.mRandomMin;
-	tMemoryEatAttributes.iRandomMax = attributes.mRandomMax;
-
-    TBuf<64> amount = attributes.mAmountDes.utf16();
-    tMemoryEatAttributes.iAmountDes.Copy(amount);	
-	
-    TBuf<64> min = attributes.mRandomMinDes.utf16();
-    tMemoryEatAttributes.iRandomMinDes.Copy(min);
-      
-    TBuf<64> max = attributes.mRandomMaxDes.utf16();
-    tMemoryEatAttributes.iRandomMaxDes.Copy(max);
-	
-	tMemoryEatAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangeMemoryEatAttributes(tMemoryEatAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-PhoneCallAttributes EngineWrapper::getPhoneCallAttributes()
-{
-    TPhoneCallAttributes tPhoneCallAttributes = mEngine->GetPhoneCallAttributes();
-    PhoneCallAttributes attributes;
-	
-	attributes.mId = tPhoneCallAttributes.iId;
-	attributes.mPriority = tPhoneCallAttributes.iPriority;
-
-    TBuf<128> dest;
-    dest.Copy(tPhoneCallAttributes.iDestination);
-    attributes.mDestination = QString((QChar*)dest.Ptr(), dest.Length()); 	
-	
-	attributes.mLength = tPhoneCallAttributes.iLength;
-	attributes.mIdle = tPhoneCallAttributes.iIdle;
-	attributes.mRandomVariance = tPhoneCallAttributes.iRandomVariance;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setPhoneCallAttributes(const PhoneCallAttributes& attributes)
-{
-	TPhoneCallAttributes tPhoneCallAttributes = mEngine->GetPhoneCallAttributes(); //TPhoneCallAttributes tPhoneCallAttributes;
-
-	tPhoneCallAttributes.iId = attributes.mId;
-	tPhoneCallAttributes.iPriority = attributes.mPriority;
-
-    TBuf<128> dest = attributes.mDestination.utf16();
-    tPhoneCallAttributes.iDestination.Copy(dest);	
-
-	tPhoneCallAttributes.iLength = attributes.mLength;
-	tPhoneCallAttributes.iIdle = attributes.mIdle;
-	tPhoneCallAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangePhoneCallAttributes(tPhoneCallAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-NetConnAttributes EngineWrapper::getNetConnAttributes()
-{
-    TNetConnAttributes tNetConnAttributes = mEngine->GetNetConnAttributes();
-    NetConnAttributes attributes;
-	
-	attributes.mId = tNetConnAttributes.iId;
-	attributes.mPriority = tNetConnAttributes.iPriority;
-
-    attributes.mDestination = QString::fromUtf16(tNetConnAttributes.iDestination.Ptr(), tNetConnAttributes.iDestination.Length()); 	
-
-	attributes.mIdle = tNetConnAttributes.iIdle;
-	attributes.mRandomVariance = tNetConnAttributes.iRandomVariance;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setNetConnAttributes(const NetConnAttributes& attributes)
-{
-	TNetConnAttributes tNetConnAttributes = mEngine->GetNetConnAttributes(); //TNetConnAttributes tNetConnAttributes;
-
-	tNetConnAttributes.iId = attributes.mId;
-	tNetConnAttributes.iPriority = attributes.mPriority;
-
-    TBuf<128> dest = attributes.mDestination.utf16();
-    tNetConnAttributes.iDestination.Copy(dest);	
-
-	tNetConnAttributes.iIdle = attributes.mIdle;
-	tNetConnAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangeNetConnAttributes(tNetConnAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-KeyPressAttributes EngineWrapper::getKeyPressAttributes()
-{
-    TKeyPressAttributes tKeyPressAttributes = mEngine->GetKeyPressAttributes();
-    KeyPressAttributes attributes;
-	
-	attributes.mId = tKeyPressAttributes.iId;
-	attributes.mPriority = tKeyPressAttributes.iPriority;
-	attributes.mHeartBeat = tKeyPressAttributes.iHeartBeat;	
-	attributes.mRandomVariance = tKeyPressAttributes.iRandomVariance;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setKeyPressAttributes(const KeyPressAttributes& attributes)
-{
-	TKeyPressAttributes tKeyPressAttributes = mEngine->GetKeyPressAttributes(); //TKeyPressAttributes tKeyPressAttributes;
-
-	tKeyPressAttributes.iId = attributes.mId;
-	tKeyPressAttributes.iPriority = attributes.mPriority;
-	tKeyPressAttributes.iHeartBeat = attributes.mHeartBeat;
-	tKeyPressAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangeKeyPressAttributes(tKeyPressAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-PointerEventAttributes EngineWrapper::getPointerEventAttributes()
-{
-    TPointerEventAttributes tPointerEventAttributes = mEngine->GetPointerEventAttributes();
-    PointerEventAttributes attributes;
-	
-	attributes.mId = tPointerEventAttributes.iId;
-	attributes.mPriority = tPointerEventAttributes.iPriority;
-	attributes.mHeartBeat = tPointerEventAttributes.iHeartBeat;	
-	attributes.mRandomVariance = tPointerEventAttributes.iRandomVariance;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setPointerEventAttributes(const PointerEventAttributes& attributes)
-{
-	TPointerEventAttributes tPointerEventAttributes = mEngine->GetPointerEventAttributes();//TPointerEventAttributes tPointerEventAttributes;
-
-	tPointerEventAttributes.iId = attributes.mId;
-	tPointerEventAttributes.iPriority = attributes.mPriority;
-	tPointerEventAttributes.iHeartBeat = attributes.mHeartBeat;
-	tPointerEventAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangePointerEventAttributes(tPointerEventAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-MessageAttributes EngineWrapper::getMessageAttributes()
-{
-    TMessageAttributes tMessageAttributes = mEngine->GetMessageAttributes();
-    MessageAttributes attributes;
-	
-	attributes.mId = tMessageAttributes.iId;
-	attributes.mMessageType = tMessageAttributes.iMessageType;
-
-    TBuf<128> dest;
-    dest.Copy(tMessageAttributes.iDestination);
-    attributes.mDestination = QString((QChar*)dest.Ptr(), dest.Length()); 	
-	
-	attributes.mPriority = tMessageAttributes.iPriority;
-	attributes.mAmount = tMessageAttributes.iAmount;
-	attributes.mLength = tMessageAttributes.iLength;
-	attributes.mIdle = tMessageAttributes.iIdle;
-	attributes.mRandomVariance = tMessageAttributes.iRandomVariance;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setMessageAttributes(const MessageAttributes& attributes)
-{
-	TMessageAttributes tMessageAttributes = mEngine->GetMessageAttributes();//TMessageAttributes tMessageAttributes;
-
-	tMessageAttributes.iId = attributes.mId;
-	tMessageAttributes.iMessageType = attributes.mMessageType;
-    
-	TBuf<128> dest = attributes.mDestination.utf16();
-    tMessageAttributes.iDestination.Copy(dest);	
-	
-	tMessageAttributes.iPriority = attributes.mPriority;
-	tMessageAttributes.iAmount = attributes.mAmount;
-	tMessageAttributes.iLength = attributes.mLength;
-	tMessageAttributes.iIdle = attributes.mIdle;
-	tMessageAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangeMessageAttributes(tMessageAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-ApplicationsAttributes EngineWrapper::getApplicationsAttributes()
-{
-    TApplicationsAttributes tApplicationsAttributes = mEngine->GetApplicationsAttributes();
-    ApplicationsAttributes attributes;
-	
-	attributes.mId = tApplicationsAttributes.iId;
-	attributes.mPriority = tApplicationsAttributes.iPriority;
-	attributes.mLaunchingInterval = tApplicationsAttributes.iLaunchingInterval;
-	attributes.mKeyPressType = tApplicationsAttributes.iKeyPressType;
-	attributes.mMaxOpen = tApplicationsAttributes.iMaxOpen;
-	attributes.mHeartBeat = tApplicationsAttributes.iHeartBeat;
-	attributes.mRandomVariance = tApplicationsAttributes.iRandomVariance;
-
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setApplicationsAttributes(const ApplicationsAttributes& attributes)
-{
-	TApplicationsAttributes tApplicationsAttributes = mEngine->GetApplicationsAttributes(); //TApplicationsAttributes tApplicationsAttributes;
-
-	tApplicationsAttributes.iId = attributes.mId;
-	tApplicationsAttributes.iPriority = attributes.mPriority;
-	tApplicationsAttributes.iLaunchingInterval = attributes.mLaunchingInterval;
-	tApplicationsAttributes.iKeyPressType = attributes.mKeyPressType;
-	tApplicationsAttributes.iMaxOpen = attributes.mMaxOpen;
-	tApplicationsAttributes.iHeartBeat = attributes.mHeartBeat;	
-	tApplicationsAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangeApplicationsAttributes(tApplicationsAttributes);
-}
-
-    QStringList mAppsArray;
-
-// ---------------------------------------------------------------------------	
-
-PhotoCaptureAttributes EngineWrapper::getPhotoCaptureAttributes()
-{
-    TPhotoCaptureAttributes tPhotoCaptureAttributes = mEngine->GetPhotoCaptureAttributes();
-    PhotoCaptureAttributes attributes;
-	
-	attributes.mId = tPhotoCaptureAttributes.iId;
-	attributes.mPriority = tPhotoCaptureAttributes.iPriority;
-	attributes.mCameraCount = tPhotoCaptureAttributes.iCameraCount;	
-	attributes.mCamera = tPhotoCaptureAttributes.iCamera;
-	attributes.mIdle = tPhotoCaptureAttributes.iIdle;
-	attributes.mRandomVariance = tPhotoCaptureAttributes.iRandomVariance;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setPhotoCaptureAttributes(const PhotoCaptureAttributes& attributes)
-{
-	TPhotoCaptureAttributes tPhotoCaptureAttributes;
-
-	tPhotoCaptureAttributes.iId = attributes.mId;
-	tPhotoCaptureAttributes.iPriority = attributes.mPriority;
-	tPhotoCaptureAttributes.iCameraCount = attributes.mCameraCount;	
-	tPhotoCaptureAttributes.iCamera = attributes.mCamera;
-	tPhotoCaptureAttributes.iIdle = attributes.mIdle;
-	tPhotoCaptureAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangePhotoCaptureAttributes(tPhotoCaptureAttributes);
-}
-
-// ---------------------------------------------------------------------------	
-
-BluetoothAttributes EngineWrapper::getBluetoothAttributes()
-{
-    TBluetoothAttributes tBluetoothAttributes = mEngine->GetBluetoothAttributes();
-    BluetoothAttributes attributes;
-	
-	attributes.mId = tBluetoothAttributes.iId;
-	attributes.mPriority = tBluetoothAttributes.iPriority;
-	attributes.mIdle = tBluetoothAttributes.iIdle;
-	attributes.mRandomVariance = tBluetoothAttributes.iRandomVariance;
-	attributes.mBluetoothSupported = tBluetoothAttributes.iBluetoothSupported ? true : false;
-	return attributes;
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::setBluetoothAttributes(const BluetoothAttributes& attributes)
-{
-    TBluetoothAttributes tBluetoothAttributes;
-
-	tBluetoothAttributes.iId = attributes.mId;
-	tBluetoothAttributes.iPriority = attributes.mPriority;
-	tBluetoothAttributes.iIdle = attributes.mIdle;
-	tBluetoothAttributes.iRandomVariance = attributes.mRandomVariance;
-	
-	mEngine->ChangeBluetoothAttributes(tBluetoothAttributes);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ReFreshView(CDesCArray* aTextArray) 
-{
-	QStringList itemList;
-	TInt arrayCnt = aTextArray->Count();
-	for (int i = 0; i < arrayCnt; i++) {
-		itemList.append(QString::fromUtf16(
-				  aTextArray->MdcaPoint(i).Ptr(),
-				  aTextArray->MdcaPoint(i).Length()));
-	}
-	mMainView.setLoadListData(itemList);
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::ClearSelection()
-{
-	mMainView.clearListSelection();
-}
-
-// ---------------------------------------------------------------------------	
-
-void EngineWrapper::SetCurrentItemIndex(TInt aIndex) 
-{
-	mMainView.setCurrentItemIndex(aIndex); 
-}
-
-// ---------------------------------------------------------------------------	
--- a/loadgen/ui/hb/src/main.cpp	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-#include <hbmainwindow.h>
-#include <hbapplication.h>
-#include <eikenv.h>
-#include "mainview.h"
-
-
-int main(int argc, char *argv[])
-{
-	HbApplication app(argc, argv);
-    HbMainWindow mainWindow;
-    
-    // set as system application to prevent getting shut down events 
-    CEikonEnv::Static()->SetSystem( ETrue );
-    
-    //Create main view
-    MainView* view = new MainView(mainWindow);
-
-    //initialize main view
-    view->init(app);
-	// Add Views to main window and reveal it.
-    mainWindow.addView(view);
-    mainWindow.show();
-
-    return app.exec();
-}
--- a/loadgen/ui/hb/src/mainview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,399 +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 "mainview.h"
-#include "enginewrapper.h"
-#include "notifications.h"
-#include "loadgen.hrh"
-#include <hblabel.h>
-#include <hbmenu.h>
-#include <hbaction.h>
-#include <hbmessagebox.h>
-#include <hbmainwindow.h>
-#include <hbapplication.h>
-//#include <hbcommonnote.h>
-//#include <hbconfirmationquery.h>
-#include <hbprogressdialog.h>
-#include <hbtextedit.h>
-#include <hblistview.h>
-#include <hbselectiondialog.h>
-
-#include <QGraphicsLinearLayout>
-#include <QStandardItemModel>
-#include <QStandardItem>
-#include <QSignalMapper>
-
-// ---------------------------------------------------------------------------
-
-MainView::MainView(HbMainWindow &mainWindow) :
-					  mMainWindow(mainWindow),
-					  mEngineWrapper(0),
-					  mIsLoadListEmpty(true),
-					  mStopAll(NULL),
-					  mSuspendAll(NULL),
-					  mResumeAll(NULL)
-					  
-{
-}
-
-// ---------------------------------------------------------------------------
-
-MainView::~MainView()
-{
-    if (mEngineWrapper != 0) {
-        delete mEngineWrapper;
-    }
-    delete mListModel;    
-    delete mListView;
-	delete mSm;	
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::init(HbApplication &app)
-{
-	this->setTitle("Load Gener.");
-    mEngineWrapper = new EngineWrapper(mMainWindow, *this);
-    int error = mEngineWrapper->init();
-    Q_ASSERT_X(error == 1, "LoadGen", "Engine initialization failed");
-    createMenu(app);
-	loadListIinit();
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::createMenu(HbApplication &app)
-{
-    HbMenu *menu = this->menu();
-	
-    // signal mapper for identifying the different command actions  
-	// in executeCommand() handler function:
-    mSm = new QSignalMapper(this);
-    connect(mSm, SIGNAL(mapped(int)), this, SLOT(executeMenuCommand(int)));
-
-    if (menu != NULL) {
-		// Temp work-around for menu item bug in Orbit Wk38,
-		// sub menu cannot contain more than 6 functional action items!
-		// two sub menus created to fix this problem.
-		mLoadSubMenu1 = menu->addMenu("New loads");
-		mLoadSubMenu2 = menu->addMenu("More new loads");
-		mCpuLoadAction = mLoadSubMenu1->addAction("CPU load");
-		connect(mCpuLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mCpuLoadAction, ELoadGenCmdNewLoadCPULoad);
-
-		mMemoryEatLoadAction = mLoadSubMenu1->addAction("Eat memory");
-		connect(mMemoryEatLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mMemoryEatLoadAction, ELoadGenCmdNewLoadEatMemory);
-
-		mPhoneCallLoadAction = mLoadSubMenu1->addAction("Phone calls");
-		connect(mPhoneCallLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mPhoneCallLoadAction, ELoadGenCmdNewLoadPhoneCall);
-
-		mMessagesLoadAction = mLoadSubMenu1->addAction("Messages");
-		connect(mMessagesLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mMessagesLoadAction, ELoadGenCmdNewLoadMessages);
-//TODO to be fixed using replacement for downloadmanager
-
-		mNetConnLoadAction = mLoadSubMenu1->addAction("Network conn.");
-		connect(mNetConnLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mNetConnLoadAction, ELoadGenCmdNewLoadNetConn);
-	
-		mKeyPressLoadAction = mLoadSubMenu2->addAction("Key presses");
-		connect(mKeyPressLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mKeyPressLoadAction, ELoadGenCmdNewLoadKeyPress);
-
-		mAppsLoadAction = mLoadSubMenu2->addAction("Applications");
-		connect(mAppsLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mAppsLoadAction, ELoadGenCmdNewLoadApplications);
-		
-		mPhotoCapturesLoadAction = mLoadSubMenu2->addAction("Photo captures");
-		connect(mPhotoCapturesLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mPhotoCapturesLoadAction, ELoadGenCmdNewLoadPhotoCaptures);
-
-		mBtActionsLoadAction = mLoadSubMenu2->addAction("Bluetooth actions");
-		connect(mBtActionsLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mBtActionsLoadAction, ELoadGenCmdNewLoadBluetooth);
-
-		mPointerEventsLoadAction = mLoadSubMenu2->addAction("Pointer events");
-		connect(mPointerEventsLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
-		mSm->setMapping(mPointerEventsLoadAction, ELoadGenCmdNewLoadPointerEvent);
-		
-		mActionPerfMon = menu->addAction("Launch PerfMon");
-		connect(mActionPerfMon, SIGNAL(triggered()), this, SLOT( launchPerfMon()));
-		
-		mActionAbout = menu->addAction("About");
-		connect(mActionAbout, SIGNAL(triggered()), this, SLOT( showAboutPopup()));
-
-		mActionExit = menu->addAction("Exit");
-		connect(mActionExit, SIGNAL(triggered()), &app, SLOT(quit()));
-
-		// menu dynamic update
-		connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));        		
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::loadListIinit()
-{
-    // Create list view and model for it
-    mListView = new HbListView(this);
-	mListModel = new QStandardItemModel(this);
-	mListView->setModel(mListModel); 
-	mListView->setSelectionMode(HbListView::NoSelection);
-	mListView->setVisible( false ); //HighlightMode(HbItemHighlight::Hidden);
-
-	QStandardItem *item = new QStandardItem(QString("No loads activated. (Select new load from menu to generate new load)"));
-    mListModel->setItem(0, item);
-
-    connect(mListView, 
-			SIGNAL(longPressed(HbAbstractViewItem*, QPointF)), 
-			this, 
-			SLOT(handleLoadListEvent(HbAbstractViewItem*, QPointF)));	
-
-	
-    // Create layout and add list view there:
-    QGraphicsLinearLayout *mainlayout = new QGraphicsLinearLayout(Qt::Vertical, this);
-    mainlayout->addItem(mListView);
-	mainlayout->setAlignment(mListView, Qt::AlignCenter);
-    setLayout(mainlayout);
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::showAboutPopup()
-{
-    Notifications::about();
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::executeMenuCommand(int cmd)
-{
-	mEngineWrapper->startNewLoad(cmd);
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::handleLoadListEvent(HbAbstractViewItem */*listViewItem*/, const QPointF &/*coords*/)
-{
-    const QStringList items = (QStringList() << "Stop" << "Resume/Suspend" << "Edit");
-    HbSelectionDialog *dlg = new HbSelectionDialog();
-    dlg->setAttribute(Qt::WA_DeleteOnClose);
-    dlg->setStringItems(items);
-    dlg->setSelectionMode(HbAbstractItemView::SingleSelection);
-    dlg->open(this, SLOT(ItemActionPopupClosed(HbAction*)));
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::ItemActionPopupClosed(HbAction* action)
-{
-    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
-    if(!action && dlg->selectedItems().count()){
-        int userSelectionIndex = dlg->selectedItems().at(0).toInt();   
-        // all operations for selected list item only. Query selected load list item index from model.
-        if (userSelectionIndex == 0) {
-            // stop selected load from the load list:
-            stopLoad(false);
-        }
-        else if (userSelectionIndex == 1) {
-            // Suspend or Resume
-            mEngineWrapper->suspendOrResumeSelectedOrHighlightedItems();
-        }
-        else {
-            // current selected row number from the load list. 
-            int selectedRow = mListView->selectionModel()->currentIndex().row();
-            // edit load setttings:
-            mEngineWrapper->loadEdit(selectedRow);
-        }
-    }
-}
-
-// --------------------------------------------------------------------------
-
-void MainView::stopAllLoads()
-{
-	stopLoad(true);
-}
-
-// ---------------------------------------------------------------------------
-
-bool MainView::stopLoad(bool stopAll)
-{
-	int success = false;
-	if (mListView != NULL) {
-		if (stopAll == true) {
-			success = mEngineWrapper->stopLoad(stopAll);
-			mIsLoadListEmpty = true;
-		}
-		else {
-			success = mEngineWrapper->stopLoad(stopAll);
-		}
-	}
-	return success;
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::updateMenu()
-{
-	if (mIsLoadListEmpty != true) {
-		if (mStopAll == NULL) {
-			mStopAll = new HbAction("Stop all", menu());
-			connect(mStopAll, SIGNAL(triggered()), this, SLOT(stopAllLoads()));
-			menu()->insertAction(mActionAbout, mStopAll);
-		}
-		else{
-            mStopAll->setVisible(true);
-		}
-		if (mSuspendAll == NULL) {
-			mSuspendAll = new HbAction("Suspend all", menu());
-			connect(mSuspendAll, SIGNAL(triggered()), this, SLOT(suspendAllLoads()));
-			menu()->insertAction(mActionAbout, mSuspendAll);
-		}
-		else{
-            mSuspendAll->setVisible(true);
-        }
-		if (mResumeAll == NULL) {
-			mResumeAll = new HbAction("Resume all", menu());
-			connect(mResumeAll, SIGNAL(triggered()), this, SLOT(resumeAllLoads()));
-			menu()->insertAction(mActionAbout, mResumeAll);
-		}
-		else{
-            mResumeAll->setVisible(true);
-        }
-	}
-	else if (mIsLoadListEmpty == true) {
-		if (mStopAll != NULL && mStopAll->text() == "Stop all") {
-            mStopAll->setVisible(false);
-		}
-		if (mSuspendAll != NULL && mSuspendAll->text() == "Suspend all") {
-            mSuspendAll->setVisible(false);
-		}
-		if (mResumeAll != NULL && mResumeAll->text() == "Resume all") {
-            mSuspendAll->setVisible(false);
-		}		
-	}
-}
-
-
-// ---------------------------------------------------------------------------
-
-int MainView::currentItemIndex()
-{
-	return mListView->selectionModel()->currentIndex().row();
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::setCurrentItemIndex(int index) 
-{
-    QModelIndex newIndex = mListView->model()->index(index, 0);
-    mListView->selectionModel()->setCurrentIndex(newIndex, 
-                                                QItemSelectionModel::SelectCurrent);
-	//mListView->setCurrentIndex( index ); //setCurrentRow(index);
-}	
-
-// ---------------------------------------------------------------------------
-
-void MainView::launchPerfMon()
-{
-	mEngineWrapper->launchPerfMonApp();
-}
-
-// ---------------------------------------------------------------------------
-
-QList<int> MainView::listSelectionIndexes()
-    {
-	QList<int> indices;
-    if (mListView != NULL) {
-		QItemSelectionModel *selectionModel = mListView->selectionModel();
-		if (selectionModel->hasSelection()) {
-			QModelIndexList modelIndexes = selectionModel->selectedIndexes();
-			QModelIndex index;
-			foreach (index, modelIndexes) {
-				indices.append(index.row());
-			}
-		}
-    }
-    return indices;
-	}
-
-// --------------------------------------------------------------------------------------------
-
-void MainView::suspendAllLoads()
-{
-	mEngineWrapper->suspendAllLoadItems();
-}
-
-// ---------------------------------------------------------------------------
-	
-void MainView::resumeAllLoads()
-{
-	mEngineWrapper->resumeAllLoadItems();
-}
-
-void MainView::clearListSelection()
-{
-    if (mListView != NULL) {
-		mListView->clearSelection();
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::setLoadListData(QStringList& items)
-{
-	QString loadItem;
-	QString iconName;
-
-	if (mListView) {
-		mListView->setSelectionMode(HbListView::MultiSelection);
-		mListView->setVisible(true); //setHighlightMode(HbItemHighlight::AlwaysVisible);
-		if(mListModel->rowCount())
-			{
-			mListModel->removeRows(0,mListModel->rowCount());
-			}
-//		mListModel->clear();
-	}
-	if (items.count() > 0) {
-		mIsLoadListEmpty = false;
-	}
-	else if (items.count() == 0) {
-		mIsLoadListEmpty = true;
-	}
-	for (int i = 0; i < items.count(); i++) {
-		QStandardItem *item = new QStandardItem();
-		loadItem = items.at(i);
-		if (loadItem.startsWith("1")) {
-			iconName = ":/paused.svg";
-		}
-		else {
-			iconName = ":/active.svg";
-		}
-		// remove icon indicator info from string
-		// to show in load in load list
-		loadItem.remove(0,2); 
-		item->setText(loadItem);
-		item->setIcon(QIcon(iconName));
-		// set new load to correct row in load list
-		mListModel->insertRow(i, item);
-	}
-}	
-
-// ---------------------------------------------------------------------------
--- a/loadgen/ui/hb/src/notifications.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <hbmessagebox.h>
-#include <hblabel.h>
-#include <QString>
-
-#include "notifications.h"
-
-
-// ---------------------------------------------------------------------------
-
-void Notifications::about()
-{
-    HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
-    messageBox->setText("Version 1.5.2 - September 23rd 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.");
-    HbLabel *header = new HbLabel("About LoadGen", messageBox);
-    messageBox->setHeadingWidget(header);
-    messageBox->setAttribute(Qt::WA_DeleteOnClose);
-    messageBox->setTimeout(HbPopup::NoTimeout);
-    messageBox->open();
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::error(const QString& errorMessage)
-{
-	showGlobalNote(errorMessage, HbMessageBox::MessageTypeWarning );
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, HbPopup::DefaultTimeout timeout)
-{
-    HbMessageBox *messageBox = new HbMessageBox(type);
-    messageBox->setText(text);
-    messageBox->setTimeout(timeout);
-    messageBox->setAttribute(Qt::WA_DeleteOnClose);
-    messageBox->open();
-}
-
-// ---------------------------------------------------------------------------
--- a/loadgen/ui/hb/src/settingsview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1258 +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 "settingsview.h"
-#include "enginewrapper.h"
-#include "loadgen.hrh"
-#include "loadgen_loadattributes.h"
-#include <hbmainwindow.h>
-#include <hbview.h>
-//#include <hbformitem.h>
-#include <hbmenu.h>
-#include <hbaction.h>
-#include <hbmessagebox.h>
-//#include <hbcommonnote.h>
-#include <hbtoolbar.h>
-#include <hbdataform.h>
-#include <hbdataformmodelitem.h>
-#include <hbdataformmodel.h>
-#include <hbdataformviewitem.h>
-#include <hbabstractviewitem.h>
-#include <hbradiobuttonlist.h>
-
-
-#include <QStringList>
-
-QStringList PRIORITIES = (QStringList() << "Much less (-20)" << "Less (-10)" << "Normal (0)" << "More (10)" 
-						 << "Much more (20)" << "Real time (30)" << "Abs. very low (100)" << "Abs. low (200)" 
-						 << "Abs. backgr. (300)" << "Abs. foregr. (400)" << "Abs. high (500)");
-QStringList LOADMODES = (QStringList() << "Yielding" << "Blocking");
-QStringList CPULOADTYPES = (QStringList() << "Continuous" << "Periodic");		   
-QStringList MEMSOURCES = (QStringList() << "RAM" << "C:" << "D:" << "E:" << "F:" << "G:" << "H:" << "J:" << "K:" 
-										<< "L:" << "M:" << "N:");
-QStringList MEMEATTYPES = (QStringList() << "Memory to eat" << "Memory to be left" << "Alternate min/max");
-QStringList KEYPRESSTYPES = (QStringList() << "None" << "Arrow keys");
-QStringList MESSAGETYPES = (QStringList() << "SMS" << "MMS");
-
-		   
-SettingsView::SettingsView(HbView &mainView, HbMainWindow &parent, EngineWrapper &engine)
-                          
-    : mMainWindow(parent),
-      mMainView(mainView),
-      mEngineWrapper(engine),
-	  mAmount(NULL),
-	  mMinAmountToBeLeft(NULL),
-	  mMaxAmountToBeLeft(NULL),
-	  mLength(NULL),
-	  mIdle(NULL),
-	  mRandomVar(NULL)
-{
-}
-
-SettingsView::~SettingsView()
-{
-
-}
-
-// TODO HbDataFormModelItem data operations does not work correctly with WK38.
-// Item data does not get updated correctly as set by initial settings(HbDataFormModelItem::RadioButtonListItem) 
-// or user settings.(HbDataFormModelItem::TextItem)
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::open(const QString &settingsName, TLoadGenCommandIds cmdId)
-{
-	mCmdId = cmdId;
-    // Remove main view from main window and add this view to main window
-    mMainWindow.addView(this);
-    mMainWindow.setCurrentView(this);
-    setTitle(settingsName);
-
-    //create toolbar showing launch popup
-    HbToolBar *toolBar = this->toolBar();
-    HbAction *actionOk = new HbAction("Ok", toolBar);
-    HbAction *actionCancel = new HbAction("Cancel", toolBar);
-    toolBar->addAction( actionOk );
-    toolBar->addAction( actionCancel );	
-
-    //create setting form
-    mSettingForm = new HbDataForm();
-    
-    //create a model class
-    mModel = new HbDataFormModel(this);
-	createItems(mModel, 0);
-    // Set created model to form
-    mSettingForm->setModel(mModel);
-    setWidget(mSettingForm);
-	loadAttributes();	
-	
-    connect(actionOk, SIGNAL(triggered()), this, SLOT(okExit()));
-	connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelled()));
-	connect(this, SIGNAL(aboutToClose()), this, SLOT(backButtonPressed()));
-	//connect(mSettingForm, SIGNAL(activated(const QModelIndex)), this, SLOT(dataItemDisplayed(const QModelIndex)));
-	show();
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createItems(HbDataFormModel *model, 
-							   HbDataFormModelItem *parent)
-{
-	switch (mCmdId) {
-		case ELoadGenCmdNewLoadCPULoad: {
-			createCpuLoadItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadEatMemory: {
-			createEatMemoryItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadPhoneCall: {
-			createPhoneCallItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadNetConn: {
-			createNetConnItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadKeyPress:
-		case ELoadGenCmdNewLoadPointerEvent: {
-			createKeyOrPointerItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadMessages: {
-			createMessageItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadApplications: {
-			createAppsItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadPhotoCaptures: {
-			createPhotoItems(model, parent);
-			break;
-		}
-		case ELoadGenCmdNewLoadBluetooth: {
-			createBtItems(model, parent);
-			break;
-		}
-		default: {
-			break;
-		}
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createCpuLoadItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-
-	mLoadSettings = model->appendDataFormGroup(QString("CPU load settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	// DataFormItem for load mode selection
-	mLoadMode = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Load mode"), 
-										  mLoadSettings);
-	mLoadMode->setContentWidgetData(QString("items"), LOADMODES);		
-
-	// DataFormItem for load type selection
-	mType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-									  QString("Type"), 
-									  mLoadSettings);
-	mType->setContentWidgetData(QString("items"), CPULOADTYPES);
-
-	mSettingForm->addConnection(mType,SIGNAL(itemSelected(int)),this,SLOT(selectionChanged(int)));
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createEatMemoryItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-	mLoadSettings = model->appendDataFormGroup(QString("Eat memory settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	// DataFormItem for memory eat type selection
-	mSource = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-									  QString("Source"), 
-									  mLoadSettings);
-	mSource->setContentWidgetData(QString("items"), MEMSOURCES);
-
-	
-	// DataFormItem for memory eat type selection
-	mType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-									  QString("Type"), 
-									  mLoadSettings);
-	mType->setContentWidgetData(QString("items"), MEMEATTYPES);
-
-	// DataFormItem for idle length selection
-	mBuffer = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Buffer (B)"), 
-									  mLoadSettings);
-	mBuffer->setContentWidgetData("maximum" , 999999999);
-	mBuffer->setContentWidgetData("minimum", 0);	
-	
-	// DataFormItem for idle length selection
-	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Idle after buffer (ms)"), 
-									  mLoadSettings);
-	mIdle->setContentWidgetData("maximum" , 999999999);
-	mIdle->setContentWidgetData("minimum", 0);			
-
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-	
-	mSettingForm->addConnection(mType,SIGNAL(itemSelected(int)),this,SLOT(selectionChanged(int)));
-}	
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createPhoneCallItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-
-	mLoadSettings = model->appendDataFormGroup(QString("Phone calls settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	mDestination = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										QString("Phone number:"), 
-										mLoadSettings);
-	mDestination->setContentWidgetData("maximum" , 99999999999999999999.0 );
-	mDestination->setContentWidgetData("minimum", 0);
-
-	mLength = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										QString("Length (ms)"), 
-										mLoadSettings);
-	mLength->setContentWidgetData("maximum" , 999999999);
-	mLength->setContentWidgetData("minimum", 0);
-	
-	// DataFormItem for idle length selection
-	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Idle (ms)"), 
-									  mLoadSettings);
-	mIdle->setContentWidgetData("maximum" , 999999999);
-	mIdle->setContentWidgetData("minimum", 0);			
-
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createNetConnItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-
-	mLoadSettings = model->appendDataFormGroup(QString("Network conn. settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	mDestination = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										QString("Destination URL:"), 
-										mLoadSettings);
-	
-	// DataFormItem for idle length selection
-	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Idle (ms)"), 
-									  mLoadSettings);
-	mIdle->setContentWidgetData("maximum" , 999999999);
-	mIdle->setContentWidgetData("minimum", 0);			
-
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createKeyOrPointerItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-	QString settingsName;
-	if (mCmdId == ELoadGenCmdNewLoadPointerEvent) {
-		settingsName = "Pointer events settings";
-	}
-	else {
-		settingsName = "Key presses settings";
-	}
-	mLoadSettings = model->appendDataFormGroup(settingsName, parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	
-	// DataFormItem for heartbeat length selection
-	mHeartBeat = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Heartbeat (ms)"), 
-									  mLoadSettings);
-	mHeartBeat->setContentWidgetData("maximum" , 999999999);
-	mHeartBeat->setContentWidgetData("minimum", 0);		
-	
-	// Random variance
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createMessageItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-	mLoadSettings = model->appendDataFormGroup(QString("Messages settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	
-	mType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-									  QString("Type"), 
-									  mLoadSettings);
-	mType->setContentWidgetData(QString("items"), MESSAGETYPES);	
-
-
-	mDestination = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										QString("Phone number:"), 
-										mLoadSettings);
-	mDestination->setContentWidgetData("maximum" , 99999999999999999999.0 );
-	mDestination->setContentWidgetData("minimum", 0);
-	
-	mAmount	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
-									  QString("Maximum amount of messages"), 
-									  mLoadSettings);
-	mAmount->setContentWidgetData("maximum" , 1000);
-	mAmount->setContentWidgetData("minimum", 0);
-
-	mLength = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										QString("Message length"), 
-										mLoadSettings);
-	mLength->setContentWidgetData("maximum" , 999999999);
-	mLength->setContentWidgetData("minimum", 0);
-
-	// DataFormItem for idle length selection
-	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Idle (ms)"), 
-									  mLoadSettings);
-	mIdle->setContentWidgetData("maximum" , 999999999);
-	mIdle->setContentWidgetData("minimum", 0);			
-
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createAppsItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-	mLoadSettings = model->appendDataFormGroup(QString("Applications settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	mMaxParallelApps = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Max parallel applications"), 
-									  mLoadSettings);
-	mMaxParallelApps->setContentWidgetData("maximum" , 100);
-	mMaxParallelApps->setContentWidgetData("minimum", 0);	
-
-
-	// DataFormItem for launching interval length selection
-	mLaunchingInterval = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Launching interval (ms)"), 
-									  mLoadSettings);
-	mLaunchingInterval->setContentWidgetData("maximum" , 999999999);
-	mLaunchingInterval->setContentWidgetData("minimum", 0);	
-	
-	// DataFormItem for key press type selection
-	mKeyPressType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Key press type"), 
-										  mLoadSettings);
-	mKeyPressType->setContentWidgetData(QString("items"), KEYPRESSTYPES);	
-
-	// DataFormItem for heartbeat length selection
-	mHeartBeat = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Key press interval (ms)"), 
-									  mLoadSettings);
-	mHeartBeat->setContentWidgetData("maximum" , 999999999);
-	mHeartBeat->setContentWidgetData("minimum", 0);		
-	
-	// Random variance
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createPhotoItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-	mLoadSettings = model->appendDataFormGroup(QString("Camera settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	
-	// DataFormItem for idle length selection
-	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Idle (ms)"), 
-									  mLoadSettings);
-	mIdle->setContentWidgetData("maximum" , 999999999);
-	mIdle->setContentWidgetData("minimum", 0);		
-	
-	// Random variance
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createBtItems(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-	mLoadSettings = model->appendDataFormGroup(QString("Bluetooth settings"), parent);
-	
-	// DataFormItem for priority selection
-	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-										  QString("Priority"), 
-										  mLoadSettings);
-	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
-
-	
-	// DataFormItem for idle length selection
-	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-									  QString("Idle (ms)"), 
-									  mLoadSettings);
-	mIdle->setContentWidgetData("maximum" , 999999999);
-	mIdle->setContentWidgetData("minimum", 0);		
-	
-	// Random variance
-	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
-										   QString("Random variance (%)"), 
-										   mLoadSettings);
-	mRandomVar->setContentWidgetData("maximum" , 100);
-	mRandomVar->setContentWidgetData("minimum", 0);	
-}
-
-// ---------------------------------------------------------------------------
-// Load attributes from engine & set the data into each form model item:
-
-void SettingsView::loadAttributes()
-{
-	switch (mCmdId)
-	{
-		case ELoadGenCmdNewLoadCPULoad: {
-			mCPULoadAttributes = mEngineWrapper.getCpuLoadAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mCPULoadAttributes.mPriority);
-			mLoadMode->setContentWidgetData(QString("selected"), mCPULoadAttributes.mMode);
-			mType->setContentWidgetData(QString("selected"), mCPULoadAttributes.mType);
-			
-			if (mCPULoadAttributes.mType == ECpuLoadTypePeriodic) {	//if (mCPULoadAttributes.mMode == ECpuLoadTypePeriodic) {
-			// Create and append to model these items: Length, Idle, Random variance, if load type is peridodic.
-				
-				// DataFormItem for load length selection
-				mLength = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-													QString("Length (ms)"), 
-													mLoadSettings);
-				mLength->setContentWidgetData("maximum" , 999999999);
-				mLength->setContentWidgetData("minimum", 0);
-				
-				
-				// DataFormItem for load length selection
-				mIdle = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-												  QString("Idle (ms)"), 
-												  mLoadSettings);
-				mIdle->setContentWidgetData("maximum" , 999999999);
-				mIdle->setContentWidgetData("minimum", 0);			
-
-				mRandomVar = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
-													   QString("Random variance (%)"), 
-													   mLoadSettings);
-				mRandomVar->setContentWidgetData("maximum" , 100);
-				mRandomVar->setContentWidgetData("minimum", 0);	
-			
-				mLength->setContentWidgetData(QString("text"), mCPULoadAttributes.mLength);
-				mIdle->setContentWidgetData(QString("text"), mCPULoadAttributes.mIdle);
-				mRandomVar->setContentWidgetData(QString("text"), mCPULoadAttributes.mRandomVariance);
-			}
-
-			// if there's more than one cpu available in the system, 
-			// insert possibility to select which cpu the load is generated to
-			if (mCPULoadAttributes.mCpuCount > 1)
-            {
-				QStringList cpuArray;
-				cpuArray.append("Free scheduling");
-				// add cpus to list:
-				for (int i = 0; i < mCPULoadAttributes.mCpuCount; i++) 
-					{
-					QString cpu = QString("CPU%1").arg(i);
-					cpuArray.append(cpu);
-					}    
-				// "All CPUs" means that one thread is started for each CPU.	
-				cpuArray.append("All CPUs");
-
-				mCpu = mModel->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
-													 QString("CPU"), 
-													 mLoadSettings);
-				mCpu->setContentWidgetData(QString("items"), cpuArray);				
-
-				if (mCPULoadAttributes.mCpu < 0) {
-					mCpu->setContentWidgetData(QString("selected"), 0);
-				}				
-
-				else if (mCPULoadAttributes.mCpu == KCPUSelection_AllCPUs) {
-					mCpu->setContentWidgetData(QString("selected"), cpuArray.count()-1);
-				}
-				// CPU is defined, set the correct CPU as default selection in query list
-				else {
-				// mCpu starts from zero (i.e. CPU0 is first CPU), but index zero
-				// in settings Ui form item is reserved for "Free scheduling", hence iCpu+1.
-					mCpu->setContentWidgetData(QString("selected"), mCPULoadAttributes.mCpu+1);
-				}
-            }
-			break;
-		}
-		case ELoadGenCmdNewLoadEatMemory: {
-			mMemoryEatAttributes = mEngineWrapper.getMemoryEatAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mMemoryEatAttributes.mPriority);
-			mSource->setContentWidgetData(QString("selected"), mMemoryEatAttributes.mSource);
-			mType->setContentWidgetData(QString("selected"), mMemoryEatAttributes.mType);
-			
-			if (mMemoryEatAttributes.mType == EMemoryEatTypeWavy) {
-				mMinAmountToBeLeft	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
-												  QString("Min to be left (B)"), 
-												  mLoadSettings);
-				mMinAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
-				mMinAmountToBeLeft->setContentWidgetData("minimum", 0);
-				
-				mMaxAmountToBeLeft	= mModel->insertDataFormItem(4, HbDataFormModelItem::TextItem, 
-												  QString("Max to be left (B)"), 
-												  mLoadSettings);
-				mMaxAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
-				mMaxAmountToBeLeft->setContentWidgetData("minimum", 0);
-
-				mMinAmountToBeLeft->setContentWidgetData(QString("text"), mMemoryEatAttributes.mRandomMinDes);
-				mMaxAmountToBeLeft->setContentWidgetData(QString("text"), mMemoryEatAttributes.mRandomMaxDes);
-			}
-			else if (mMemoryEatAttributes.mType == EMemoryEatTypeMemoryToEat ||
-			         mMemoryEatAttributes.mType == EMemoryEatTypeMemoryToBeLeft ) {
-				mAmount	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
-												  QString("Amout(B)"), 
-												  mLoadSettings);
-				mAmount->setContentWidgetData("maximum" , 99999999999999);
-				mAmount->setContentWidgetData("minimum", 0);
-				
-				mAmount->setContentWidgetData(QString("text"), mMemoryEatAttributes.mAmount);	 
-			}
-			mBuffer->setContentWidgetData(QString("text"), mMemoryEatAttributes.mBuffer);
-			mIdle->setContentWidgetData(QString("text"), mMemoryEatAttributes.mIdle);
-			mRandomVar->setContentWidgetData(QString("text"), mMemoryEatAttributes.mRandomVariance);
-			break;
-		}
-		case ELoadGenCmdNewLoadPhoneCall: {
-			mPhoneCallAttributes = mEngineWrapper.getPhoneCallAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mPhoneCallAttributes.mPriority);
-			mDestination->setContentWidgetData(QString("text"), mPhoneCallAttributes.mDestination);
-			mLength->setContentWidgetData(QString("text"), mPhoneCallAttributes.mLength);
-			mIdle->setContentWidgetData(QString("text"), mPhoneCallAttributes.mIdle);
-			mRandomVar->setContentWidgetData(QString("text"), mPhoneCallAttributes.mRandomVariance);
-			break;
-		}
-		case ELoadGenCmdNewLoadNetConn: {
-			mNetConnAttributes = mEngineWrapper.getNetConnAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mNetConnAttributes.mPriority);
-			mDestination->setContentWidgetData(QString("text"), mNetConnAttributes.mDestination);
-			mIdle->setContentWidgetData(QString("text"), mNetConnAttributes.mIdle);
-			mRandomVar->setContentWidgetData(QString("text"), mNetConnAttributes.mRandomVariance);
-			break;
-		}
-		case ELoadGenCmdNewLoadKeyPress: {
-			mKeyPressAttributes = mEngineWrapper.getKeyPressAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mKeyPressAttributes.mPriority);
-			mHeartBeat->setContentWidgetData(QString("text"), mKeyPressAttributes.mHeartBeat);
-			mRandomVar->setContentWidgetData(QString("text"), mKeyPressAttributes.mRandomVariance);			
-			break;
-		}
-		case ELoadGenCmdNewLoadPointerEvent: { 
-			mPointerEventAttributes = mEngineWrapper.getPointerEventAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mPointerEventAttributes.mPriority);
-			mHeartBeat->setContentWidgetData(QString("text"), mPointerEventAttributes.mHeartBeat);
-			mRandomVar->setContentWidgetData(QString("text"), mPointerEventAttributes.mRandomVariance);				
-			break;
-		}
-		case ELoadGenCmdNewLoadMessages: {
-			mMessageAttributes = mEngineWrapper.getMessageAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mMessageAttributes.mPriority);
-			mType->setContentWidgetData(QString("selected"), mMessageAttributes.mMessageType);
-			mDestination->setContentWidgetData(QString("text"), mMessageAttributes.mDestination);
-			mAmount->setContentWidgetData(QString("text"), mMessageAttributes.mAmount);	 
-			mLength->setContentWidgetData(QString("text"), mMessageAttributes.mLength);
-			mIdle->setContentWidgetData(QString("text"), mMessageAttributes.mIdle);
-			mRandomVar->setContentWidgetData(QString("text"), mMessageAttributes.mRandomVariance);
-			break;
-		}
-		case ELoadGenCmdNewLoadApplications: {
-			mApplicationsAttributes = mEngineWrapper.getApplicationsAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mApplicationsAttributes.mPriority);
-			mMaxParallelApps->setContentWidgetData(QString("text"), mApplicationsAttributes.mMaxOpen);
-			mHeartBeat->setContentWidgetData(QString("text"), mApplicationsAttributes.mHeartBeat);
-			mLaunchingInterval->setContentWidgetData(QString("text"), mApplicationsAttributes.mLaunchingInterval);
-			mKeyPressType->setContentWidgetData(QString("selected"), mApplicationsAttributes.mKeyPressType);
-			mRandomVar->setContentWidgetData(QString("text"), mApplicationsAttributes.mRandomVariance);						
-			break;
-		}
-		case ELoadGenCmdNewLoadPhotoCaptures: {
-			mPhotoCaptureAttributes = mEngineWrapper.getPhotoCaptureAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mPhotoCaptureAttributes.mPriority);
-			mIdle->setContentWidgetData(QString("text"), mPhotoCaptureAttributes.mIdle);
-			mRandomVar->setContentWidgetData(QString("text"), mPhotoCaptureAttributes.mRandomVariance);
-			
-			// if there's any cameras avaialable in system, construct form item for it/them:
-			if (mPhotoCaptureAttributes.mCameraCount > 0)
-            {
-				QStringList devices;
-				// add cameras to list:
-				for (int i = 0; i < mPhotoCaptureAttributes.mCameraCount; i++) 
-					{
-					QString cam = QString("Camera %1").arg(i);
-					devices.append(cam);
-					}    
-				mCamera = mModel->insertDataFormItem(1, HbDataFormModelItem::RadioButtonListItem, 
-													 QString("Device"), 
-													 mLoadSettings);
-				mCamera->setContentWidgetData(QString("items"), devices);
-				mCamera->setContentWidgetData(QString("selected"), mPhotoCaptureAttributes.mCamera);
-            }
-			break;
-		}
-		case ELoadGenCmdNewLoadBluetooth: {
-			mBluetoothAttributes = mEngineWrapper.getBluetoothAttributes();
-			mPriority->setContentWidgetData(QString("selected"), mBluetoothAttributes.mPriority);
-			mIdle->setContentWidgetData(QString("text"), mBluetoothAttributes.mIdle);
-			mRandomVar->setContentWidgetData(QString("text"), mBluetoothAttributes.mRandomVariance);	
-			break;
-		}
-		
-		default: {
-			break;
-		}
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::setDefaultSettings()
-{
-
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::backButtonPressed()
-{
-	okExit();	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::saveSettings()
-{
-	switch (mCmdId) {
-		case ELoadGenCmdNewLoadCPULoad: {
-			saveCpuLoadSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadEatMemory: {
-			saveEatMemorySettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadPhoneCall: {
-			savePhoneCallSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadNetConn: {
-			saveNetConnSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadKeyPress: {
-			saveKeyPressSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadPointerEvent: {
-			savePointerEventSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadMessages: {
-			saveMessageSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadApplications: {
-			saveApplicationsSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadPhotoCaptures: {
-			savePhotoSettings();
-			break;
-		}
-		case ELoadGenCmdNewLoadBluetooth: {
-			saveBtSettings();
-			break;
-		}
-		default: {
-			break;
-		}
-	}
-}
-
-// ---------------------------------------------------------------------------	
-	
-void SettingsView::saveCpuLoadSettings()
-{
-	mCPULoadAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
-	mCPULoadAttributes.mMode = mLoadMode->contentWidgetData("selected").toInt();
-	mCPULoadAttributes.mType = mType->contentWidgetData("selected").toInt();
-	if (mType->contentWidgetData("selected").toInt() == ECpuLoadTypePeriodic) {
-		// TODO: remove temp checks if (mLength != NULL) etc. when HbDataFormModelItem bugs fixed.
-		if (mLength != NULL) {
-			mCPULoadAttributes.mLength = mLength->contentWidgetData("text").toInt();
-		}
-		if (mIdle != NULL) {			
-			mCPULoadAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
-		}
-		if (mRandomVar != NULL) {
-			int randVar = mRandomVar->contentWidgetData("text").toInt();
-			if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-				{
-				mCPULoadAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-				}
-			else
-				{
-				mCPULoadAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
-				}
-		}
-	}
-
-	// we are running in SMP environment
-	if (mCPULoadAttributes.mCpuCount > 1)
-		{
-		TInt currentValueIndex = mCpu->contentWidgetData("selected").toInt();
-		// user selected a specific CPU in which the load thread should be run in.
-		if (currentValueIndex == 0)
-			{
-			// User selected "Free scheduling"
-			mCPULoadAttributes.mCpu = KCPUSelection_FreeScheduling;
-			}            
-		else if( currentValueIndex == (mCpu->childCount()-1) )
-			{
-			// User selected "All CPUs", which is the last item in the form radio button selection list
-			mCPULoadAttributes.mCpu = KCPUSelection_AllCPUs;
-			}
-		else
-			{                
-			// mCpu should start from zero (CPU0 is the first cpu)
-			// but zero in Ui form item index means "Free scheduling". CPU0 in
-			// index of form radio button list is at index 1, hence -1.
-			mCPULoadAttributes.mCpu = currentValueIndex - 1;
-			}
-		}
-
-	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::saveEatMemorySettings()
-{
-	mMemoryEatAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
-	mMemoryEatAttributes.mSource = mSource->contentWidgetData("selected").toInt();
-	mMemoryEatAttributes.mType = mType->contentWidgetData("selected").toInt();
-	
-	if (mType->contentWidgetData("selected").toInt() == EMemoryEatTypeWavy) {
-		// TODO: remove temp checks if (mLength != NULL) etc. when HbDataFormModelItem bugs fixed.
-		if (mMinAmountToBeLeft != NULL) {
-			mMemoryEatAttributes.mRandomMin = 
-				mMinAmountToBeLeft->contentWidgetData("text").toInt();
-		}
-		if (mMaxAmountToBeLeft != NULL) {
-			mMemoryEatAttributes.mRandomMax = 
-				mMaxAmountToBeLeft->contentWidgetData("text").toInt();
-		}
-	}
-	else if (mType->contentWidgetData("selected").toInt() == EMemoryEatTypeMemoryToEat ||
-	         mType->contentWidgetData("selected").toInt() == EMemoryEatTypeMemoryToBeLeft) {
-		if (mAmount != NULL) {
-			mMemoryEatAttributes.mAmount = mAmount->contentWidgetData("text").toInt();
-		}
-	}
-	mMemoryEatAttributes.mBuffer = mBuffer->contentWidgetData("text").toInt();
-	mMemoryEatAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
-	
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mMemoryEatAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mMemoryEatAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
-		}
-	
-    // swap min- & max values if they are in wrong order
-	if (mMemoryEatAttributes.mRandomMin > mMemoryEatAttributes.mRandomMax)
-		{
-		qint64 temp(mMemoryEatAttributes.mRandomMin);
-		mMemoryEatAttributes.mRandomMin = mMemoryEatAttributes.mRandomMax;
-		mMemoryEatAttributes.mRandomMax = temp; 
-		}	
-}
-
-// ---------------------------------------------------------------------------	
-	
-void SettingsView::savePhoneCallSettings()
-{
-	mPhoneCallAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
-	mPhoneCallAttributes.mLength   = mLength->contentWidgetData("text").toInt();
-	mPhoneCallAttributes.mIdle     = mIdle->contentWidgetData("text").toInt();
-	
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
-		}
-	
-	
-	mPhoneCallAttributes.mDestination    = mDestination->contentWidgetData("text").toString();
-}
-
-// ---------------------------------------------------------------------------	
-	
-void SettingsView::saveNetConnSettings()
-{
-	mPhoneCallAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
-	mPhoneCallAttributes.mIdle     = mIdle->contentWidgetData("text").toInt();
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
-		}
-	mPhoneCallAttributes.mDestination    = mDestination->contentWidgetData("text").toString();
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::saveKeyPressSettings()
-{
-	mKeyPressAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
-	mKeyPressAttributes.mHeartBeat = mHeartBeat->contentWidgetData("text").toInt();
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mKeyPressAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mKeyPressAttributes.mRandomVariance =  mRandomVar->contentWidgetData("maximum").toInt();
-		}
-	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::savePointerEventSettings()
-{
-	mPointerEventAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
-	mPointerEventAttributes.mHeartBeat = mHeartBeat->contentWidgetData("text").toInt();
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mPointerEventAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mPointerEventAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
-		}
-	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::saveMessageSettings()
-{
-	mMessageAttributes.mPriority    = mPriority->contentWidgetData("selected").toInt();
-	mMessageAttributes.mMessageType = mType->contentWidgetData("selected").toInt();
-	mMessageAttributes.mDestination = mDestination->contentWidgetData("text").toString();
-	int amount = mAmount->contentWidgetData("text").toInt();
-	if( amount  >=0 && amount <= mAmount->contentWidgetData("maximum").toInt() )
-		{
-		mMessageAttributes.mAmount = mAmount->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mMessageAttributes.mAmount = mAmount->contentWidgetData("maximum").toInt();
-		}
-	mMessageAttributes.mLength = mLength->contentWidgetData("text").toInt();
-	mMessageAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mMessageAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mMessageAttributes.mRandomVariance =  mRandomVar->contentWidgetData("maximum").toInt();
-		}
-
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::saveApplicationsSettings()
-{
-	mApplicationsAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
-	int maxApps = mMaxParallelApps->contentWidgetData("text").toInt();
-	if( maxApps >=0 && maxApps <= mMaxParallelApps->contentWidgetData("maximum").toInt() )
-		{
-		mApplicationsAttributes.mMaxOpen   = mMaxParallelApps->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mApplicationsAttributes.mMaxOpen   = mMaxParallelApps->contentWidgetData("maximum").toInt();
-		}
-	mApplicationsAttributes.mLaunchingInterval   = mLaunchingInterval->contentWidgetData("text").toInt();
-	mApplicationsAttributes.mKeyPressType  = mKeyPressType->contentWidgetData("selected").toInt();
-	mPointerEventAttributes.mHeartBeat = mHeartBeat->contentWidgetData("text").toInt();
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mApplicationsAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mApplicationsAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
-		}
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::savePhotoSettings()
-{
-	mPhotoCaptureAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
-	mPhotoCaptureAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mPhotoCaptureAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mPhotoCaptureAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
-		}
-	
-	// update only if there's more than one camera device available in the system, 
-	// for use case of one camera available, the selection cannot be changed by user.
-	if (mPhotoCaptureAttributes.mCameraCount > 1)
-	{
-	mPhotoCaptureAttributes.mCamera = mCamera->contentWidgetData("selected").toInt();
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::saveBtSettings()
-{
-	mBluetoothAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
-	mBluetoothAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
-	int randVar = mRandomVar->contentWidgetData("text").toInt();
-	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
-		{
-		mBluetoothAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
-		}
-	else
-		{
-		mBluetoothAttributes.mRandomVariance =  mRandomVar->contentWidgetData("maximum").toInt();
-		}
-	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::cancelled()
-{
-	connect(this, 
-		SIGNAL(loadCanclled()), 
-		&mEngineWrapper, 
-		SLOT(loadSettingsCanclled()));
-	emit loadCanclled();
-	
-    mMainWindow.removeView(this);
-    mMainWindow.setCurrentView(&mMainView, true);
-    deleteLater();
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::okExit()
-{
-	saveSettings();
-	setLoadAttributes();
-    connect(this, 
-			SIGNAL(loadCompleted(TLoadGenCommandIds)), 
-			&mEngineWrapper, 
-			SLOT(loadAddedOrEdited(TLoadGenCommandIds)));
-	emit loadCompleted(mCmdId);
-			
-    mMainWindow.removeView(this);
-    mMainWindow.setCurrentView(&mMainView, true);
-    deleteLater();
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::setLoadAttributes()
-{
-	switch (mCmdId) {
-		case ELoadGenCmdNewLoadCPULoad: {
-			mEngineWrapper.setCpuLoadAttributes(mCPULoadAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadEatMemory: {
-			mEngineWrapper.setMemoryEatAttributes(mMemoryEatAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadPhoneCall: {
-			mEngineWrapper.setPhoneCallAttributes(mPhoneCallAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadNetConn: {
-			mEngineWrapper.setNetConnAttributes(mNetConnAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadKeyPress: {
-			mEngineWrapper.setKeyPressAttributes(mKeyPressAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadPointerEvent: {
-			mEngineWrapper.setPointerEventAttributes(mPointerEventAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadMessages: {
-			mEngineWrapper.setMessageAttributes(mMessageAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadApplications: {
-			mEngineWrapper.setApplicationsAttributes(mApplicationsAttributes);
-			break;
-		}
-		case ELoadGenCmdNewLoadPhotoCaptures: {
-			mEngineWrapper.setPhotoCaptureAttributes(mPhotoCaptureAttributes); 
-			break;		
-		}
-		case ELoadGenCmdNewLoadBluetooth: {
-			mEngineWrapper.setBluetoothAttributes(mBluetoothAttributes);
-			break;
-		}
-		default: {
-			break;
-		}
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::dataItemDisplayed(const QModelIndex &index)
-{
-	HbDataFormViewItem *item = static_cast<HbDataFormViewItem*>(mSettingForm->itemByIndex(index)); 
-	HbWidget *contentWidget = static_cast<HbWidget*>(item->dataItemContentWidget());
-	switch(mCmdId){
-		case ELoadGenCmdNewLoadCPULoad: {
-			if (index.row() == 2) { // Cpu load type selection is in this row: periodic vs. continuous
-				mModes = static_cast<HbRadioButtonList*>(contentWidget);
-				connect(mModes , SIGNAL(itemSelected(int)), this, SLOT(selectionChanged(int)));
-			}
-			break;
-		}
-		case ELoadGenCmdNewLoadEatMemory: {
-				// Memory eat type is in this row: mem to eat/ mem to be left vs. alternate min/max
-				if (index.row() == 2) { 
-				mTypes = static_cast<HbRadioButtonList*>(contentWidget );
-				connect(mTypes ,SIGNAL(itemSelected(int)), this,SLOT(selectionChanged(int)));
-				}
-			break;
-		}
-	}
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::selectionChanged(int index)
-{
-	switch (mCmdId) {
-		case ELoadGenCmdNewLoadCPULoad: {
-			if (index == ECpuLoadTypePeriodic) {
-			// if periodic selected, add Length, Idle and Random variance to settings,
-			// if they does not exist yet.
-				if (mLength == NULL) {
-					mLength = mModel->insertDataFormItem(3, 
-														 HbDataFormModelItem::TextItem, 
-														 QString("Length (ms)"), 
-														 mLoadSettings);
-					mLength->setContentWidgetData("maximum" , 999999999);
-					mLength->setContentWidgetData("minimum", 0);
-					mLength->setContentWidgetData(QString("text"), mCPULoadAttributes.mLength);
-					}
-				if (mIdle == NULL) {
-					// DataFormItem for load length selection
-					mIdle = mModel->insertDataFormItem(4,
-					                                   HbDataFormModelItem::TextItem, 
-													   QString("Idle (ms)"), 
-													   mLoadSettings);
-					mIdle->setContentWidgetData("maximum" , 999999999);
-					mIdle->setContentWidgetData("minimum", 0);			
-					mIdle->setContentWidgetData(QString("text"), mCPULoadAttributes.mIdle);
-					}
-				if (mRandomVar == NULL) {
-					mRandomVar = mModel->insertDataFormItem(5,
-					                                        HbDataFormModelItem::TextItem,  
-														    QString("Random variance (%)"), 
-														    mLoadSettings);
-					mRandomVar->setContentWidgetData("maximum" , 100);
-					mRandomVar->setContentWidgetData("minimum", 0);	
-					mRandomVar->setContentWidgetData(QString("text"), mCPULoadAttributes.mRandomVariance);
-				}
-			}
-			else if (index == ECpuLoadTypeContinuous) {
-				// if continuous selected, remove existing Length, Idle and Random variance from settings view:
-				// if they does not exist do nothing.
-				if (mLength != NULL) {
-					mModel->removeItem(mLength);
-					mLength = NULL;
-				}
-				if (mIdle != NULL) {
-					mModel->removeItem(mIdle);
-					mIdle = NULL;
-				}
-				if (mRandomVar != NULL) {
-					mModel->removeItem(mRandomVar);
-					mRandomVar = NULL;
-				}	
-			}
-			break;
-		}
-		case ELoadGenCmdNewLoadEatMemory: {
-			if (index == EMemoryEatTypeWavy) {
-				// remove one item, if exists. 
-				if (mAmount != NULL) {
-					mModel->removeItem(mAmount);
-					mAmount = NULL;
-				}
-				// insert two new item rows, if not exists.
-				if (mMinAmountToBeLeft == NULL) {
-					mMinAmountToBeLeft	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
-													  QString("Min to be left (B)"), 
-													  mLoadSettings);
-					mMinAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
-					mMinAmountToBeLeft->setContentWidgetData("minimum", 0);
-					mMinAmountToBeLeft->setContentWidgetData( QString("text"),mMemoryEatAttributes.mRandomMin );
-				}
-				if (mMaxAmountToBeLeft == NULL) {
-					mMaxAmountToBeLeft	= mModel->insertDataFormItem(4, HbDataFormModelItem::TextItem, 
-													  QString("Max to be left (B)"), 
-													  mLoadSettings);
-					mMaxAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
-					mMaxAmountToBeLeft->setContentWidgetData("minimum", 0);				
-					mMaxAmountToBeLeft->setContentWidgetData( QString("text"),mMemoryEatAttributes.mRandomMax );
-				}
-			}
-			else if (index == EMemoryEatTypeMemoryToEat || index == EMemoryEatTypeMemoryToBeLeft) {
-				// remove two item rows, if exists.
-				if (mMinAmountToBeLeft != NULL) {
-					mModel->removeItem(mMinAmountToBeLeft);
-					mMinAmountToBeLeft = NULL;
-				}
-				if (mMaxAmountToBeLeft != NULL) {
-					mModel->removeItem(mMaxAmountToBeLeft);
-					mMaxAmountToBeLeft = NULL;
-				}
-				// insert one item, if not exists.
-				if (mAmount == NULL) {
-					mAmount	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
-													  QString("Amout(B)"), 
-													  mLoadSettings);
-					mAmount->setContentWidgetData("maximum" , 99999999999999);
-					mAmount->setContentWidgetData("minimum", 0);
-					mAmount->setContentWidgetData( QString("text"),mMemoryEatAttributes.mAmount );
-				}				
-			}
-		}
-		default: {
-			break;
-		}
-	}
-}
-
-// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/perfapps/perfmon/icons/PerfMon_application_icon_svgt.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,176 @@
+<?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 version="1.1" baseProfile="tiny" id="Layer_1"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height="200px"
+	 viewBox="0 0 200 200" xml:space="preserve">
+<path fill="#D9D673" d="M63.123,161.91c-4.61,0-11.42-0.418-17.685-2.408c-16.815-5.344-30.556-19.178-36.759-37
+	c-6.003-17.25-4.61-36.396,3.821-52.529c8.793-16.832,24.514-28.412,42.055-30.979c0.213-0.031,5.389-0.904,10.95-0.904
+	c5.442,0,11.9,1.068,16.13,2.066c9.868,2.332,19,7.02,26.41,13.557c0.396,0.35,0.788,0.705,1.18,1.066l7.883-8.775
+	c1.156-1.316,3.42-2.744,6.25-2.744c1.379,0,2.732,0.328,4.022,0.98c1.046,0.52,53.154,25.819,53.154,25.819
+	c3.373,2.059,5.229,5.508,5.087,9.475l0.355,3.896c0.123,1.045,0.041,2.184-0.232,3.287L195,99.537l-55.334,57.783l-11.422-6.92
+	c-1.475,0.572-2.985,0.863-4.51,0.863c-6.986,0-11.418-5.88-11.457-5.938l-1.162-1.763c-1.167,1.183-2.389,2.322-3.648,3.406
+	c-10.257,8.836-24.046,14.182-37.831,14.672C69.636,161.641,66.209,161.91,63.123,161.91L63.123,161.91z"/>
+<path fill="#FFFFFF" d="M46.239,156.986c-16-5.084-29.119-18.262-35.066-35.354c-5.764-16.562-4.428-34.945,3.668-50.438
+	c8.4-16.084,23.39-27.145,40.096-29.588c1.497-0.219,4.263-0.877,10.569-0.877c4.989,0,11.176,0.969,15.522,1.994
+	c9.328,2.205,18.132,6.67,25.27,12.969c1.048,0.922,2.058,1.883,3.05,2.896l9.723-10.822c0.785-0.891,2.342-1.867,4.285-1.867
+	c0.963,0,1.918,0.234,2.838,0.695c1.074,0.539,52.937,25.697,52.937,25.697c2.618,1.6,4.005,4.248,3.845,7.305l0.371,4.07
+	c0.113,0.98-0.002,2.268-0.527,3.51l8.755,12.119l-52.349,54.67l-10.8-6.543c-7.638,3.975-13.698-3.18-13.94-3.549l-3.006-4.562
+	c-1.775,2.013-3.694,3.904-5.733,5.66c-9.878,8.508-22.969,13.562-36.2,14.031C68.871,159.027,56.733,160.32,46.239,156.986z"/>
+<polygon fill="#FAAF40" points="173.488,91.551 187.166,99.137 177.876,86.376 "/>
+<polygon fill="#FAAF40" points="165.896,100.203 179.064,107.668 170.118,95.691 "/>
+<polygon fill="#FAAF40" points="159.002,108.049 171.721,115.396 162.924,103.881 "/>
+<polygon fill="#FAAF40" points="152.712,115.188 165.036,122.432 156.375,111.32 "/>
+<polygon fill="#FAAF40" points="147.176,121.849 158.924,128.865 150.446,118.188 "/>
+<polygon fill="#FAAF40" points="141.884,127.846 153.311,134.771 144.874,124.315 "/>
+<polygon fill="#FAAF40" points="136.771,133.146 148.145,140.211 139.751,129.895 "/>
+<polygon fill="#FAAF40" points="132.188,138.281 143.37,145.236 134.869,134.973 "/>
+<polygon fill="#FAAF40" points="127.909,142.951 138.945,149.893 130.496,139.832 "/>
+<path fill="#DE9B39" d="M129.102,141.67l9.332,7.9l-7.938-9.422C129.988,140.701,129.525,141.209,129.102,141.67z"/>
+<path fill="#DE9B39" d="M133.411,136.924l9.455,7.998l-7.997-9.621C134.365,135.861,133.879,136.404,133.411,136.924z"/>
+<path fill="#DE9B39" d="M138.139,131.643l9.512,8.264l-8.084-9.867C139.08,130.586,138.604,131.117,138.139,131.643z"/>
+<path fill="#DE9B39" d="M143.068,126.094l9.758,8.383l-8.189-10.148C144.107,124.924,143.586,125.512,143.068,126.094z"/>
+<path fill="#DE9B39" d="M148.355,120.123l10.09,8.459l-8.312-10.471C149.537,118.785,148.943,119.455,148.355,120.123z"/>
+<path fill="#DE9B39" d="M154.438,113.23l10.131,8.926l-8.447-10.836C155.561,111.957,154.999,112.594,154.438,113.23z"/>
+<path fill="#DE9B39" d="M160.884,105.908l10.378,9.223l-8.595-11.25C162.077,104.553,161.482,105.227,160.884,105.908z"/>
+<path fill="#DE9B39" d="M167.918,97.902l10.697,9.508l-8.758-11.719C169.225,96.414,168.576,97.152,167.918,97.902z"/>
+<path fill="#DE9B39" d="M177.792,86.641c-0.64,0.729-1.313,1.502-2.026,2.314l10.959,9.937L177.792,86.641z"/>
+<path fill="#008A4A" d="M179.83,84.029l-0.4-4.393c-0.066,0.729-57.426,64.511-58.385,64.494l3.795,0.593
+	c0,0,1.176,0.387,2.684-0.983c1.377-1.255,44.037-48.771,51.379-56.953C180.059,85.674,179.83,84.029,179.83,84.029z"/>
+<path fill="#004C38" d="M177.279,75.297c0,0-51.295-24.859-52.678-25.553c-1.797-0.902-2.927,0.379-2.927,0.379l-12.312,13.705
+	l2.402,69.543l5.651,8.576c0,0,1.403,2.145,3.628,2.183c0.959,0.017,2.066-0.353,3.286-1.462l54.845-61.803
+	c0,0,0.188-0.5,0.254-1.229C179.541,78.412,179.312,76.539,177.279,75.297z"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="86.9277" y1="53.4355" x2="145.0824" y2="111.5902" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#00733D"/>
+	<stop  offset="0.2553" style="stop-color:#00793E"/>
+	<stop  offset="0.6087" style="stop-color:#008B41"/>
+	<stop  offset="1" style="stop-color:#00A745"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M125.803,51.645c5.133,2.58,45.762,23.068,45.762,23.068c2.971,1.814,1.737,5.102,1.737,5.102
+	c-10.144,11.592-47.055,53.723-50.252,56.628c-3.709,3.375-6.336-0.659-6.336-0.659l-3.229-4.857l-3.272-66.109
+	c0,0,9.657-11.004,11.041-12.588c0,0,0.882-1.24,1.899-1.314C124.171,50.842,124.73,51.135,125.803,51.645z"/>
+<path fill="#8BC53F" d="M163.32,77.807c-1.18-0.706-2.498-0.813-3.479-0.405l-17.193-9.473c0.045-0.961-0.584-2.033-1.678-2.687
+	c-1.178-0.705-2.52-0.696-3.337-0.076l-8.765-4.828c0.086-0.801-0.418-1.715-1.338-2.266c-1.166-0.695-2.543-0.541-3.076,0.35
+	c-0.379,0.633-0.221,1.465,0.318,2.145l-1.779,2.005l1.215,0.768l1.721-1.881c0.896,0.404,1.844,0.338,2.426-0.149l8.559,5.169
+	c-0.081,0.979,0.545,2.085,1.666,2.755c1.111,0.666,2.375,0.699,3.201,0.18l11.437,6.835l-9.06,10.733l3.892,3.185
+	c-0.225,1.233,0.534,2.692,1.976,3.556c1.746,1.041,3.808,0.809,4.604-0.521c0.797-1.332,0.027-3.256-1.717-4.299
+	c-1.25-0.747-2.655-0.828-3.647-0.331l-2.52-1.585l8.469-9.545l3.202,1.914c-0.069,1.168,0.687,2.477,2.019,3.273
+	c1.746,1.043,3.807,0.809,4.604-0.521C165.834,80.773,165.064,78.85,163.32,77.807z"/>
+<path fill="#8BC53F" d="M140.146,104.162c-0.092-0.055-0.187-0.092-0.278-0.139l0.241-10.472l-3.66-2.703l-1.379,1.725l2.808,2.02
+	l-0.208,8.936c-0.908,0.056-1.699,0.441-2.125,1.154c-0.797,1.33-0.029,3.254,1.715,4.297c1.746,1.043,3.807,0.81,4.604-0.521
+	C142.66,107.129,141.893,105.203,140.146,104.162z"/>
+<path fill="#8BC53F" d="M124.171,104.973l-1.394,1.715l7.688,6.148l-6.37,7.857c-1.58-0.645-3.256-0.322-3.955,0.848
+	c-0.795,1.33-0.027,3.254,1.717,4.297s3.806,0.809,4.603-0.521c0.59-0.984,0.317-2.293-0.567-3.33l7.681-9.475L124.171,104.973z"/>
+<polygon fill="#666666" points="147.74,77.369 120.605,61.217 119.275,60.891 145.006,76.532 "/>
+<path fill="#999999" d="M122.729,101.572l22.277-25.04l-25.8-15.642l-6.453,7.283L122.729,101.572z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="104.6855" y1="95.2275" x2="136.9742" y2="102.604" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#4D4D4D"/>
+	<stop  offset="0.296" style="stop-color:#494949"/>
+	<stop  offset="0.5898" style="stop-color:#3E3D3D"/>
+	<stop  offset="0.8818" style="stop-color:#2C292A"/>
+	<stop  offset="1" style="stop-color:#231F20"/>
+</linearGradient>
+<path fill="url(#SVGID_2_)" d="M118.664,64.672l-4.689,5.292l8.68,26.752l17.066-19.247L118.664,64.672z"/>
+<path fill="#404040" d="M122.305,107.109l25.436-29.74l-2.734-0.837l-22.279,25.122
+	C122.673,103.479,122.534,105.299,122.305,107.109z"/>
+<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="50.1987" y1="17.0425" x2="50.1987" y2="128.1079" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#63C2E6"/>
+	<stop  offset="1" style="stop-color:#C8E5F2"/>
+</linearGradient>
+<path fill="url(#SVGID_3_)" d="M55.496,44.987C38.61,47.46,25.214,58.935,18.01,72.726c-7.646,14.631-8.869,32.117-3.463,47.65
+	c5.101,14.66,16.566,28.035,32.802,33.149C64.207,158.84,82.08,153.6,94.2,142.215c23.325-21.918,24.237-61.645,0.815-84.164
+	C84.794,48.229,70.223,42.833,55.496,44.987"/>
+<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="82.1792" y1="17.1162" x2="82.1792" y2="127.9409" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#2E6E87"/>
+	<stop  offset="1" style="stop-color:#85CBE6"/>
+</linearGradient>
+<path fill="url(#SVGID_4_)" d="M104.02,58.229C93.866,49.27,79.81,43.956,65.297,44.643c11.222,0.824,21.782,5.781,29.719,13.408
+	c23.421,22.52,22.509,62.246-0.815,84.164c-7.799,7.326-17.981,12.1-28.741,13.162c14.17,0.555,27.956-4.488,38.037-13.172
+	C128.771,120.438,129.596,80.8,104.02,58.229z"/>
+<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="107.9424" y1="48.3198" x2="42.4163" y2="116.782" gradientTransform="matrix(0.9988 0.048 0.048 -0.9988 -21.2947 178.7324)">
+	<stop  offset="0" style="stop-color:#2E6E87"/>
+	<stop  offset="1" style="stop-color:#85CBE6"/>
+</linearGradient>
+<path fill="url(#SVGID_5_)" d="M49.147,148.729c-19.221-3.948-31.738-20.602-35.139-37.584C10.47,93.475,15.805,73.817,30.02,61.223
+	c6.798-6.023,15.582-10.111,25.095-10.838c9.78-0.75,19.466,2.207,27.19,7.754c15.202,10.914,21.621,29.59,19.939,46.716
+	c-1.199,12.193-6.518,24.209-15.927,32.955C76.668,146.775,62.868,151.548,49.147,148.729"/>
+<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="3.6279" y1="72.8691" x2="86.2666" y2="72.8691" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#429EC2"/>
+	<stop  offset="1" style="stop-color:#85CBE6"/>
+</linearGradient>
+<path fill="url(#SVGID_6_)" d="M54.1,145.501c-1.665-0.08-3.332-0.274-4.993-0.584l0,0c-21.083-3.965-32.296-23.537-33.792-40.043
+	c-1.502-16.57,5.581-37.48,24.789-46.844c5.82-2.838,12.252-4.123,18.594-3.818c3.669,0.178,7.307,0.885,10.781,2.135
+	c8.42,3.025,15.85,9.127,20.923,17.18c10.07,15.984,9.751,37.35-0.794,53.165C81.315,139.126,67.782,146.159,54.1,145.501
+	L54.1,145.501z"/>
+<radialGradient id="SVGID_7_" cx="46.1543" cy="72.8066" r="38.8899" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)" gradientUnits="userSpaceOnUse">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="0.308" style="stop-color:#FBFEFF"/>
+	<stop  offset="0.5894" style="stop-color:#F0FBFF"/>
+	<stop  offset="0.8597" style="stop-color:#DEF6FF"/>
+	<stop  offset="1" style="stop-color:#D1F2FF"/>
+</radialGradient>
+<path fill="url(#SVGID_7_)" d="M55.005,59.198c-18.236,1.635-30.511,17.154-33.45,32.699c-3.006,15.908,2.748,34.486,18.047,43.839
+	c7.6,4.646,17.055,6.22,25.841,3.992c8.21-2.08,15.167-7.147,20.046-13.44c10.46-13.494,11.874-32.545,3.859-47.465
+	C82.961,66.929,69.946,57.858,55.005,59.198"/>
+<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="20.6006" y1="55.3286" x2="20.6006" y2="97.355" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#A2E64A"/>
+	<stop  offset="0.1883" style="stop-color:#9EE44A"/>
+	<stop  offset="0.3834" style="stop-color:#91DE4A"/>
+	<stop  offset="0.5817" style="stop-color:#7DD44A"/>
+	<stop  offset="0.7822" style="stop-color:#60C64A"/>
+	<stop  offset="0.9825" style="stop-color:#3BB54A"/>
+	<stop  offset="1" style="stop-color:#37B34A"/>
+</linearGradient>
+<path fill="url(#SVGID_8_)" d="M32.876,75.772c-9.073,11.982-10.086,29.1-2.527,42.08c1.771-1.828,3.542-3.653,5.312-5.481
+	c1.409-1.457,1.259-1.338,0.444-3.123c-2.316-5.106-2.876-10.949-1.664-16.416c0.578-2.598,1.552-5.105,2.898-7.398
+	c1.189-2.029,1.801-1.85,0.423-3.566C36.135,79.835,34.504,77.804,32.876,75.772"/>
+<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="68.4702" y1="48.605" x2="68.4702" y2="98.3696" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#ED0000"/>
+	<stop  offset="0.0326" style="stop-color:#EE0903"/>
+	<stop  offset="0.2972" style="stop-color:#F24F18"/>
+	<stop  offset="0.5356" style="stop-color:#F58629"/>
+	<stop  offset="0.7396" style="stop-color:#F8AE36"/>
+	<stop  offset="0.9011" style="stop-color:#F9C63D"/>
+	<stop  offset="1" style="stop-color:#FACF40"/>
+</linearGradient>
+<path fill="url(#SVGID_9_)" d="M76.596,97.401c0.096,4.025-0.719,8.074-2.424,11.727c-0.806,1.724-1.831,3.076-2.973,4.869
+	l7.92,9.735c12.519-13.442,13.173-35.771,1.232-49.796l-8.584,9.07C74.844,87.589,76.165,92.06,76.596,97.401"/>
+<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="50.3579" y1="108.4561" x2="94.9627" y2="111.3749" gradientTransform="matrix(0.9988 0.048 0.048 -0.9988 -21.2947 178.7324)">
+	<stop  offset="0" style="stop-color:#37B34A"/>
+	<stop  offset="0.1291" style="stop-color:#65BA48"/>
+	<stop  offset="0.2767" style="stop-color:#92C045"/>
+	<stop  offset="0.4253" style="stop-color:#B8C543"/>
+	<stop  offset="0.5726" style="stop-color:#D5CA42"/>
+	<stop  offset="0.7184" style="stop-color:#E9CD41"/>
+	<stop  offset="0.8617" style="stop-color:#F6CE40"/>
+	<stop  offset="1" style="stop-color:#FACF40"/>
+</linearGradient>
+<path fill="url(#SVGID_10_)" d="M70.44,81.394c-8.273-9.139-22.109-9.031-30.309,0.205l-5.9-7.502
+	c11.629-13.49,32.109-14.822,44.674-1.762L70.44,81.394"/>
+<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="40.8423" y1="32.2788" x2="44.214" y2="70.8171" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#85CBE6"/>
+	<stop  offset="0.0816" style="stop-color:#98D3EA"/>
+	<stop  offset="0.2688" style="stop-color:#BDE3F1"/>
+	<stop  offset="0.4562" style="stop-color:#DAEFF7"/>
+	<stop  offset="0.6416" style="stop-color:#EEF8FC"/>
+	<stop  offset="0.824" style="stop-color:#FBFDFE"/>
+	<stop  offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path fill="url(#SVGID_11_)" d="M53.358,101.753c0,0-24.102,24.99-23.943,25.19c2.676,3.396,5.962,6.39,9.871,8.779
+	c7.6,4.646,17.055,6.221,25.84,3.992c4.797-1.217,9.168-3.453,12.945-6.357C78.973,132.665,53.358,101.753,53.358,101.753z"/>
+<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="77.1929" y1="65.1084" x2="66.5088" y2="83.6138" gradientTransform="matrix(0.9988 0.048 0.048 -0.9988 -21.2947 178.7324)">
+	<stop  offset="0" style="stop-color:#429EC2"/>
+	<stop  offset="1" style="stop-color:#85CBE6"/>
+</linearGradient>
+<path fill="url(#SVGID_12_)" d="M62.476,102.609c-1.938-3.786-6.345-6.554-10.957-5.225c-4.302,1.24-6.769,5.352-7.132,9.289
+	c-0.374,4.043,1.32,8.537,5.156,10.844c4.096,2.461,9.127,1.133,11.856-2.354c1.368-1.746,2.011-3.873,2.325-6.002
+	C64.19,105.999,62.476,102.609,62.476,102.609z"/>
+<path fill="#4C78A6" d="M51.301,99.95c-9.12-0.447-9.24,15.067-0.171,15.137C59.949,115.15,60.041,100.38,51.301,99.95"/>
+<path fill="#429EC2" d="M86.493,90.647L60.044,106.23l3.494,0.099l22.177-12.504C85.714,93.825,87.663,91.569,86.493,90.647z"/>
+<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="46.6758" y1="74.6123" x2="75.1729" y2="74.6123" gradientTransform="matrix(0.9999 -0.0173 -0.0173 -0.9999 12.7467 173.4939)">
+	<stop  offset="0" style="stop-color:#429EC2"/>
+	<stop  offset="1" style="stop-color:#85CBE6"/>
+</linearGradient>
+<path fill="url(#SVGID_13_)" d="M86.493,90.647c-0.129-0.951-1.499-1.568-2.711-0.971c-1.912,0.947-25.604,11.369-25.604,11.369
+	c1.037,1.57,1.66,3.361,1.865,5.186c10.019-5.434,20.086-10.785,25.152-13.762C86.229,91.864,86.568,91.198,86.493,90.647z"/>
+<rect fill="none" width="200" height="200"/>
+</svg>
--- a/perfapps/perfmon/ui/avkon/group/perfmon.mmp	Mon Oct 04 10:09:02 2010 +0300
+++ b/perfapps/perfmon/ui/avkon/group/perfmon.mmp	Mon Oct 18 16:30:05 2010 +0300
@@ -87,4 +87,7 @@
 LIBRARY           centralrepository.lib
 LIBRARY           HWRMPowerClient.lib
 
+UNPAGEDDATA
+SMPSAFE
+
 // End of File
--- a/perfapps/perfmon/ui/hb/app/app.pro	Mon Oct 04 10:09:02 2010 +0300
+++ b/perfapps/perfmon/ui/hb/app/app.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -75,7 +75,11 @@
 
     TARGET.EPOCHEAPSIZE = 0x10000 0x2000000  // Min 64Kb, Max 32Mb
 
-    ICON = ../../../icons/qgn_menu_perfmon.svg
+    ICON = ../../../icons/PerfMon_application_icon_svgt.svg
 
     RSS_RULES += "group_name = \"RnD Tools\"";
+    
+    MMP_RULES -= PAGED
+  	MMP_RULES *= UNPAGEDDATA
+  	MMP_RULES += SMPSAFE
 }
--- a/screengrabber/ReleaseNotes_ScreenGrabber.txt	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-===============================================================================
-
-RELEASE NOTES - SCREENGRABBER v5.0.0
-RELEASED 10th March 2010 
-
-SUPPORTS S60 3.0+
-
-===============================================================================
-
-Product Description:
-====================
-ScreenGrabber tool is used to capture images and video of the visible screen
-area in S60 platform. Captures can be handled with the Media Gallery
-application or with PC when the device is connected via PC suite.
-
-Main Features:
-==============
-- Image capture in single or in sequential mode supporting PNG, JPEG and BMP
-  formats
-- Video capture in animated GIF format
-- Configurable saving format, hotkey, time delta in sequential mode, target
-  memory and default filename
-- Ability to change the screen mode to one of the supported more by the device
-
-===============================================================================
-
-What's New in v5.0.0
-====================
-- Orbit UI
-
-===============================================================================
-
-Installation Notes:
-===================
-ScreenGrabber is typically preinstalled on ROM. If not, it can be added to the
-ROM with the .iby file. Alternatively, the .sis file can be found under the sis-
-directory, but the user need to sign it with their own developer certificate.
-In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
-internal\sis directory.
-
-When signing with own developer certificate, the following capabilities are
-needed:
-  WriteDeviceData
-  SwEvent
-
-When builing ScreenGrabber against S60 3.0 or 3.1, you may need to patch your
-SDK environment first with some fixes. For more information, please refer to
-the instructions under the "envpatcher" directory.
-
-===============================================================================
-
-System Requirements:
-====================
-Basic Requirements:
-- Any S60 3.x device or emulator environment
-
-===============================================================================
-
-Compatibility Issues:
-=====================
-N/A
-
-===============================================================================
-
-Known Issues:
-=============
-
-Sluggish UI when capturing video
---------------------------------
-- Video capturing requires huge amount of processing power and thus may cause
-  the UI to become sluggish. If supported by the device, try to decrease the
-  screen resolution.
-
-===============================================================================
-
-Version History:
-================
-Version 4.2.0 - 14th May 2009
-------------------------------
-- Feature: Added a new SIS file for S60 3.2 devices and newer to support the
-  features in newer platforms
-- Feature: Added multidrive support in the settings dialog
-
-Version 4.1.3 - 8th March 2009
-------------------------------
-- Fix: ScreenGrabber does not work in devices which do not have Media Gallery
-  (Media Gallery File Manager API dependency changed from static to dynamic)
-    
-Version 4.1.2 - 8th February 2008
----------------------------------
-- Fix: Transparency errors in GIF animations (hopefully) finally fixed
-  
-Version 4.1.1 - 28th January 2008
----------------------------------
-- Feature: Added hash+* and alternative camera key into selection of capture
-  keys
-- Change: Reimplemented settings handling so that AllFiles and WriteUserData
-  capabilities are no longer needed
-    
-Version 4.1.0 - 14th January 2008
----------------------------------
-- Feature: Added support for GIF and MBM formats although it is always
-  recommended to capture screens in PNG format
-- Feature: JPEG format can now be selected as high quality (97%) or low quality
-  (60%) 
-- Feature: Added POC key under capturing key options
-- Change: Dimensions of a video will be grown if the screen resolution of the
-  device will grow during capturing
-- Change: Capturing is now done always from current focus screen which allows to
-  support secondary displays
-- Change: Send key is now the default key
-- Fix: Black color didn't always work correctly in GIF animation optimization
-  with transparency  
-- Fix: Capturing to JPEG format leaked memory
-
-Version 4.0.3 - 16th November 2007
-----------------------------------
-- Fix: Scroll bar in the main view can be scrolled on a touch UI
-- Fix: Application closes automatically when closed via open applications menu
-
-Version 4.0.2 - 9th October 2007
---------------------------------
-- Fix: Main screen layout in mirrored mode
-  
-Version 4.0.1 - 14th February 2007
-----------------------------------
-- Fix: Help screen on larger displays
-  
-Version 4.0.0 - 25th October 2006
----------------------------------
-- Feature: Support for sequential capture mode
-- Feature: Support for capturing video in animated GIF format
-- Feature: Ability to change screen mode to one of the supported more by the
-  device
-
-===============================================================================
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-
-This component and the accompanying materials are made available
-under the terms of "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
--- a/screengrabber/icons/qgn_menu_screengrabber.svg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://web.resource.org/cc/"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   baseProfile="tiny"
-   width="100%"
-   height="100%"
-   viewBox="0 0 88 88"
-   id="svg1926"
-   sodipodi:version="0.32"
-   inkscape:version="0.44"
-   sodipodi:docname="qgn_menu_screengrabber.svg"
-   sodipodi:docbase="X:\ScreenGrabber\aif">
-  <metadata
-     id="metadata1942">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <sodipodi:namedview
-     inkscape:window-height="1110"
-     inkscape:window-width="1600"
-     inkscape:pageshadow="2"
-     inkscape:pageopacity="0.0"
-     guidetolerance="10.0"
-     gridtolerance="10.0"
-     objecttolerance="10.0"
-     borderopacity="1.0"
-     bordercolor="#666666"
-     pagecolor="#ffffff"
-     id="base"
-     inkscape:zoom="8.4442735"
-     inkscape:cx="43.997928"
-     inkscape:cy="45.030743"
-     inkscape:window-x="-4"
-     inkscape:window-y="-4"
-     inkscape:current-layer="svg1926" />
-  <defs
-     id="defs6909">
-    <linearGradient
-       id="linearGradient14494">
-      <stop
-         style="stop-color:#0000bc;stop-opacity:1;"
-         offset="0"
-         id="stop14496" />
-      <stop
-         style="stop-color:#0000bc;stop-opacity:0.71134019;"
-         offset="1"
-         id="stop14498" />
-    </linearGradient>
-  </defs>
-  <g
-     id="g16387"
-     transform="matrix(0.933931,0,0,0.93923,36.62697,-3.375516)">
-    <g
-       id="g14545"
-       transform="matrix(1.00237,0,0,1.019616,-19.44104,89.03461)">
-      <rect
-         style="fill:white;fill-opacity:1;stroke:black;stroke-width:0.2788493;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-         id="rect11835"
-         width="38.227215"
-         height="46.111416"
-         x="-12.352481"
-         y="-76.984528" />
-      <rect
-         style="fill:#0000c8;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-         id="rect12722"
-         width="37.948029"
-         height="4.0790625"
-         x="-12.204596"
-         y="-67.491203" />
-    </g>
-    <rect
-       y="-76.984528"
-       x="-12.352481"
-       height="46.111416"
-       width="38.227215"
-       id="rect14551"
-       style="fill:white;fill-opacity:1;stroke:black;stroke-width:0.2788493;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-       transform="matrix(1.00237,0,0,1.019616,-12.79656,94.92987)" />
-    <rect
-       y="-67.491203"
-       x="-12.204596"
-       height="4.0790625"
-       width="37.948029"
-       id="rect14553"
-       style="fill:#0000c8;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-       transform="matrix(1.00237,0,0,1.019616,-12.79656,94.92987)" />
-    <rect
-       y="22.592644"
-       x="-17.854233"
-       height="47.015938"
-       width="38.317814"
-       id="rect14559"
-       style="fill:white;fill-opacity:1;stroke:black;stroke-width:0.28190443;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-    <rect
-       y="32.27219"
-       x="-17.705997"
-       height="4.1590772"
-       width="38.037964"
-       id="rect14561"
-       style="fill:#0000c8;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-  </g>
-  <g
-     id="g25295"
-     transform="matrix(1,0,0,0.980624,0,1.576279)">
-    <rect
-       y="37.726677"
-       x="41.746223"
-       height="38.990337"
-       width="34.248974"
-       id="rect2069"
-       style="fill:#d03543;fill-opacity:1;stroke:#d03543;stroke-width:9.26854134;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-    <path
-       id="rect2956"
-       d="M 39.728418,36.017758 L 40.699485,36.017758 L 40.699485,36.980375 L 39.728418,36.980375 L 39.728418,36.017758 z "
-       style="fill:white;fill-opacity:1;stroke:white;stroke-width:0.66800833;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-    <path
-       id="path6507"
-       d="M 77.303471,35.71407 L 78.274536,35.71407 L 78.274536,36.676685 L 77.303471,36.676685 L 77.303471,35.71407 z "
-       style="fill:white;fill-opacity:1;stroke:white;stroke-width:0.66800821;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-    <rect
-       y="33.132401"
-       x="43.185398"
-       height="23.865932"
-       width="31.864567"
-       id="rect8279"
-       style="fill:#f7f7ee;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-    <rect
-       y="63.044537"
-       x="49.107658"
-       height="16.862577"
-       width="20.374096"
-       id="rect9166"
-       style="fill:#d5d5d5;fill-opacity:1;stroke:#d5d5d5;stroke-width:2.6285944;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-    <rect
-       y="62.877068"
-       x="51.151539"
-       height="16.583315"
-       width="6.6384521"
-       id="rect10053"
-       style="fill:#d03543;fill-opacity:1;stroke:#d5d5d5;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-  </g>
-  <g
-     transform="matrix(1.00237,0,0,1.019616,-12.79656,94.92987)"
-     id="g14549" />
-  <g
-     id="g27079"
-     transform="translate(-0.273712,-5.897703)">
-    <path
-       id="path19082"
-       d="M 12.524583,46.800016 L 12.524583,63.174645 L 30.994672,63.174645"
-       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:4.24823713;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
-    <path
-       id="path21741"
-       d="M 23.698213,53.535845 L 32.738803,63.153749 L 24.300919,72.504489"
-       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:4.24823713;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
-  </g>
-</svg>
--- a/screengrabber/inc/application.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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 SGAPPLICATION_H
-#define SGAPPLICATION_H
-
-#include <e32keys.h>
-#include <w32std.h>
-
-#include <hbapplication.h>
-class EngineWrapper;
-
-class SGApplication : public HbApplication
-{
-public:
-    SGApplication(int argc, char *argv[]);//, EngineWrapper &engine);
-    ~SGApplication();
-#if defined(Q_WS_S60)
-
-#if defined(HB_QT_S60_EVENT_FILTER)
-    virtual bool s60EventFilter(TWsEvent *aEvent);
-#else
-    virtual bool symbianEventFilter(const QSymbianEvent *event);
-#endif // (HB_QT_S60_EVENT_FILTER)
-#endif//(Q_WS_S60)    
-    inline void SetEngineWrapper(EngineWrapper *aEngine){iEngine = aEngine;}
-private:
-	RWsSession    		iWsSession_a; 
-    RWindowGroup        iRootWin_a;  
-
-
-    EngineWrapper *iEngine;
-};
-
-#endif // SGAPPLICATION_H
--- a/screengrabber/inc/enginewrapper.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +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 ENGINEWRAPPER_H
-#define ENGINEWRAPPER_H
-
-#include <s32file.h>
-#include <hbapplication.h>
-
-
-class SGEngine;
-class GrabSettings;
-class MainView;
-class TWsEvent;
-class HbDeviceProgressDialog;
-
-/**
- * class that is used for communicating between Symbian and Qt code.
- */
-class EngineWrapper{
-public:
-    
-    /**
-     * Constructor
-     */
-    EngineWrapper();
-    
-    /**
-     * Destructor
-     */
-    ~EngineWrapper();
-    
-    /**
-     * Initializes Engine Wrapper
-     * @return true if engine was started successfully
-     */
-    bool init();
-
-public: 
-    
-    /* Functions that are called from UI */
-
-    /**
-     * Fetches settings from engine and converts Symbian data types to Qt's types.
-     */
-    GrabSettings getGrabSettings();
-    
-    /**
-     * Converts given parameters into Symbian data types and saves them into ScreenGrabber engine
-     * @param settings new settings
-     */
-    bool saveSettings(const GrabSettings& settings); 
-    
-       
-    /*
-     * Sends received s60 event to engine
-     */
-#if defined(HB_QT_S60_EVENT_FILTER)
-	bool handleCaptureCommands(const TWsEvent* aEvent);
-#else
-	bool handleCaptureCommands(const QSymbianEvent *aEvent);
-#endif
-    
-    
-    /**
-     * Sends UI to background
-     */
-    void sendUIToBackground();
-	void EnableRcpOfFoc(TBool aState);
-    void LoadSettings(void);
-public:
-
-    /* Functions that are called from engine: */
-
-    /**
-     * uses Notifications class to show image captured note 
-     */
-    void ShowImageCapturedNote();
-    
-    /**
-     * uses Notifications class to show video captured note 
-     */
-    void ShowVideoCapturedNote();
-    
-    /** 
-     * uses Notifications class to show seguantial images captured note
-     */
-    void ShowSequantialImagesCapturedNote(TInt amount);
-    
-    /** 
-     * uses Notifications class to show error message 
-     */
-    void ShowErrorMessage(const TDesC16& aErrorMessage);
-
-    /**
-     * uses Notifications class to show progressbar
-     */
-    void ShowProgressBar(int max);
-    
-    /**
-     * increments shown progressbar's value
-     */
-    void IncrementProgressbarValue();
-    
-    /**
-     * closes progressbar
-     */
-    void CloseProgressbar();
-
-    
-private:
-    
-    bool convertTBoolToBool(TBool value);
-    
-private:
-    
-    
-    /* Screen grabber engine */
-    SGEngine *iSGEngine;
-    
-    /* progressnote that is shown */
-	HbDeviceProgressDialog *iProgressNote;
-    
-};
-
-#endif; 
-
--- a/screengrabber/inc/gifanimator.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +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 __GIFANIMATOR_H__
-#define __GIFANIMATOR_H__
-
-#include <e32std.h>
-#include <e32base.h>
-#include "sgengine.h"
-
-
-
-class CImageEncoder;
-
-class MDialogCallback
-    {
-public:
-    virtual void DialogDismissedL( TInt aButtonId ) = 0;
-    };
-
-
-class CGifAnimator : public CBase 
-	{
-public:
-	static int CreateGifAnimation(const TDesC& aFileName, TSize aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper);
-	~CGifAnimator();
-
-private:
-    CGifAnimator();
-    void StartL(const TDesC& aFileName, const TSize& aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper);
-    void WriteHeaderL(const TSize& aDimensions);
-    void WriteGraphicControlL(const TVideoFrame& aFrame);
-    void WriteImageDescriptorL(const TVideoFrame& aFrame);
-    CFbsBitmap* GetBitmapLC(TVideoFrame& aFrame, const TSize& aDimensions);
-    void WriteRasterDataL(CFbsBitmap* aBitmap);
-    void WriteFooterL();
-    void FinishL();
-    void WriteInt8L(TInt aValue);
-    void WriteInt16L(TInt aValue);
-    
-    
-    
-private:
-    RFs                         iFs;
-    RFile                       iOutFile;
-	CImageEncoder*              iImageEncoder;
-	HBufC8*                     iGIFImageData;
-    
-    };
-
-		
-	
-#endif // __GIFANIMATOR_H__
--- a/screengrabber/inc/mainview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MAINVIEW_H
-#define MAINVIEW_H
-
-#include <hbview.h>
-#include <hbmainwindow.h>
-
-class EngineWrapper;
-class HbMainWindow;
-class HbApplication;
-class SettingsView;
-class HbAction;
-
-
-
-/**
- * Class that implements the main view of Screen Grabber
- */
-class MainView : public HbView
-{
-    Q_OBJECT
-    
-public:
-    
-    /**
-     * Constructor
-     */
-    MainView(HbMainWindow &mainWindow, EngineWrapper &engineWrapper);
-    
-    /**
-     * Destructor
-     */
-	~MainView();
-
-	/**
-     * Initializes Engine Wrapper
-     * @param app application class of Screen Grabber
-     */
-    void init(HbApplication &app);
-    
-    inline void setSettingsView(SettingsView *aSettingsView){ mSettingsView = aSettingsView; }
-
-    
-private:
-    
-    /**
-     * Creates menu
-     */
-    void createMenu(HbApplication &app);
-    
-    /**
-     * Created info text ui components
-     */
-    void createInfoText();
-    
-    /**
-     * Creates toolbar components
-     */
-    void createToolbar();
-
-public slots:
-
-    
-    /**
-     * Shows about pop-up
-     */
-    void showAboutPopup();
-    
-    /**
-     * Sends UI to background
-     */
-    void sendToBackground();
-    
-    /**
-     * opens settings view
-     */
-    void showSettings();
-
-    void my_quit();
-    
-    void quitYesNoQuestionClosed(HbAction*);
-    
-
-public:
-    
-    /* Main windo of Screen Grabber */
-    HbMainWindow &mMainWindow;
-    
-    /* Settings view */
-    SettingsView *mSettingsView;
-    
-    /* Engine Wrapper */
-    EngineWrapper &mEngineWrapper;
-    
-    /* Actions that are used in toolbars and menus */
-    HbAction* actionSendToBg;
-    HbAction* actionSettings;
-    HbAction* actionAbout;
-    HbAction* actionExit;
-
-};
-
-#endif // MAINVIEW_H
--- a/screengrabber/inc/notifications.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef NOTIFICATIONS_H_
-#define NOTIFICATIONS_H_
-
-#include <hbmessagebox.h> 
-#include <hbdeviceprogressdialog.h>
-
-
-
-class Notifications
-    {
-public:
-    
-    /**
-     * shows about box
-     */
-    static void about();
-    
-    /**
-     * shows image captured note 
-     */
-    static void imageCaptured();
-    
-    /**
-     * shows video captured note 
-     */
-    static void videoCaptured();
-    
-    /** 
-     * shows seguantial images captured note
-     */
-    static void sequantialImagesCaptured(int amount);
-    
-    /** 
-     * shows error message 
-     */
-    static void error(const QString& errorMessage);
-    
-    /**
-     * to shows progressbar
-     */
-    static HbDeviceProgressDialog* showProgressBar(int max);
-    
-    };
-
-
-
-#endif // NOTIFICATIONS_H_
--- a/screengrabber/inc/settingsview.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +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 SETTINGS_H
-#define SETTINGS_H
-
-#include <f32file.h>
-#include <hbmainwindow.h>
-#include <hbview.h>
-
-class EngineWrapper;
-class HbDataFormModelItem;
-class HbDataFormModel;
-class HbDataForm;
-class HbDataFormViewItem;
-    
-const QStringList CAPTUREMODES = (QStringList() << "Single capture" << "Sequential capture" << "Video capture");
-const QStringList KEYS = (QStringList() << "Send key" << "Power key" << "Side key" << "Camera key");
-const QStringList VIDEOFORMATS = (QStringList() << "Animated GIF");
-const QStringList IMAGEFORMATS = (QStringList() << "PNG" << "JPEG high qual." << "JPEG low qual." << "BMP" << "GIF");
-const QStringList MEMORYMODES = (QStringList() << "Phone memory" << "Memory card");
-
-
-/**
- * Settings class that is used for 
- */
-class GrabSettings
-    {
-public:
-    int             mCaptureMode;
-    
-    int             mSingleCaptureHotkey;
-    int             mSingleCaptureImageFormat;
-    int             mSingleCaptureMemoryInUseMultiDrive;
-    QString         mSingleCaptureFileName;
-
-    int             mSequantialCaptureHotkey;
-    int             mSequantialCaptureImageFormat;
-    int             mSequantialCaptureDelay;
-    int             mSequantialCaptureMemoryInUseMultiDrive;
-    QString         mSequantialCaptureFileName;
-
-    int             mVideoCaptureHotkey;
-    int             mVideoCaptureVideoFormat;
-    int             mVideoCaptureMemoryInUseMultiDrive;
-    QString         mVideoCaptureFileName;
-    };
-
-/**
- * Class that creates settings view of Screen Grabber
- */
-class SettingsView : public HbView
-{
-    Q_OBJECT
-
-    enum CaptureMode{ SINGLE, SEQUENTIAL, VIDEO };
-
-public:
-     /**
-     * Constuctor
-     * @param mainView pointer to main view
-     * @param mainWindow pointer to main window
-     */
-    SettingsView(HbView &mainView, HbMainWindow &mainWindow, EngineWrapper &engineWrapper);
-
-    /**
-    * destructor
-    */
-    ~SettingsView();
-
-
-    /**
-     * Loads settings from engine and formats those settings into form items
-     */
-    void loadSettings();
-    
-    
-private slots:
-  
-    /**
-     * saves settings and closes view.
-     */
-    void saveAndClose();
-    
-    /**
-     * closes setting view
-     */
-    void close();
-
-    /**
-     * Slot that is called each time capture mode is changed
-     */
-//    void updateShownItems();
-private:
-    
-    /**
-     * Creates single capture related components
-     */
-    void createSingleCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent);
-    
-    /*
-     * Creates sequential capture related components.
-     */
-    void createSequentialCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent);
-    
-    /**
-     * creates video capture related components
-     */
-    void createVideoCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent);
-    
-    
-    
-    /**
-     * Reads form items and saves them into member variable mSettings
-     */
-    void readFormItems();
-
-private:
-    
-    /* Settings */
-    GrabSettings mSettings;
-    
-    /* EngineWrapper */
-    EngineWrapper &mEngineWrapper;
-    
-    /* Main Window of Screen Grabber */
-    HbMainWindow &mMainWindow;
-    
-    /* Main View of Screen Grabber */
-    HbView &mMainView;
-    
-    /* settingform */
-    HbDataForm *mSettingForm;
-    
-    /* model for settingform */
-    HbDataFormModel *mModel;
-    
-    /* model's components: */   
-    
-    /* mode selection item */
-    HbDataFormModelItem *mModeItem;
-    
-    /* groups that contain mode specific settings */
-    HbDataFormModelItem *mGroupImageCapture;
-    HbDataFormModelItem *mGroupSeguantialCapture;
-    HbDataFormModelItem *mGroupVideoCapture;
-    
-    /* Still image components */
-    HbDataFormModelItem *mImageHotKeyItem;
-    HbDataFormModelItem *mImageFormatItem;
-    HbDataFormModelItem *mImageMemoryInUseItem;
-    HbDataFormModelItem *mImageFileNameItem;
-       
-    /* Sequential image components */
-    HbDataFormModelItem *mSequantialHotKeyItem;
-    HbDataFormModelItem *mSequantialFormatItem;
-    HbDataFormModelItem *mSequantialDelayItem;
-    HbDataFormModelItem *mSequantialMemoryInUseItem;
-    HbDataFormModelItem *mSequantialFileNameItem;
-    
-    /* Video capture components */
-    HbDataFormModelItem *mVideoHotKeyItem;
-    HbDataFormModelItem *mVideoFormatItem;
-    HbDataFormModelItem *mVideoMemoryInUseItem;
-    HbDataFormModelItem *mVideoFileNameItem;
-    
-
-    
-    
-};
-
-#endif
--- a/screengrabber/inc/sgengine.h	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +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 SGENGINE_H
-#define SGENGINE_H
-
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-#include <w32std.h>
-#include <mdaaudiotoneplayer.h> 
-#include <qsymbianevent.h>
-
-
-class CFrameImageData;
-class CDictionaryFileStore;
-class CImageEncoder;
-class EngineWrapper;
-
-
-// setting keys (do not change uids of existing keys to maintain compatibility to older versions!)
-const TUid KSGSettingCaptureMode                            = { 0x00 };
-
-const TUid KSGSettingSingleCaptureHotkey                    = { 0x01 };
-const TUid KSGSettingSingleCaptureImageFormat               = { 0x02 };
-const TUid KSGSettingSingleCaptureMemoryInUseMultiDrive     = { 0x04 };
-const TUid KSGSettingSingleCaptureFileName                  = { 0x05 };
-
-const TUid KSGSettingSequantialCaptureHotkey                = { 0x06 };
-const TUid KSGSettingSequantialCaptureImageFormat           = { 0x07 };
-const TUid KSGSettingSequantialCaptureDelay                 = { 0x08 };
-const TUid KSGSettingSequantialCaptureMemoryInUseMultiDrive = { 0x0A };
-const TUid KSGSettingSequantialCaptureFileName              = { 0x0B };
-
-const TUid KSGSettingVideoCaptureHotkey                     = { 0x0C };
-const TUid KSGSettingVideoCaptureVideoFormat                = { 0x0D };
-const TUid KSGSettingVideoCaptureMemoryInUseMultiDrive      = { 0x0F };
-const TUid KSGSettingVideoCaptureFileName                   = { 0x10 };
-
-const TUid KUidScreenGrabber = { 0x101FB751 };
-
-
-#define TRANSPARENCY_INDEX 30
-#define TRANSPARENCY_ALTERNATIVE_INDEX 24
-
-enum TScreenGrabberSettingCaptureModes
-    {
-    ECaptureModeSingleCapture = 0,
-    ECaptureModeSequantialCapture,
-    ECaptureModeVideoCapture
-    };
-    
-enum TScreenGrabberSettingHotkeys
-    {
-    EHotkeySendKey = 0,
-    EHotkeyPowerKey,
-    EHotkeySideKey,
-    EHotkeyCameraKey1
-    };
-
-enum TScreenGrabberSettingImageFormats
-    {
-    EImageFormatPNG = 0,
-    EImageFormatJPGHQ,
-    EImageFormatJPGLQ,
-    EImageFormatBMP,
-    EImageFormatGIF,
-    EImageFormatMBM
-    };
-
-enum TScreenGrabberSettingVideoFormats
-    {
-    EVideoFormatAnimatedGIF = 0
-    };
-
-enum TScreenGrabberSettingMultiDrive
-	{
-	EPhoneMemory = 0,
-	EMemoryCard
-	};
-	
-
-class TGrabSettings
-    {
-public:
-    TInt            iCaptureMode;
-    
-    TInt            iSingleCaptureHotkey;
-    TInt            iSingleCaptureImageFormat;
-    TInt            iSingleCaptureMemoryInUseMultiDrive;
-    TFileName       iSingleCaptureFileName;
-
-    TInt            iSequantialCaptureHotkey;
-    TInt            iSequantialCaptureImageFormat;
-    TInt            iSequantialCaptureDelay;
-    TInt            iSequantialCaptureMemoryInUseMultiDrive;
-    TFileName       iSequantialCaptureFileName;
-
-    TInt            iVideoCaptureHotkey;
-    TInt            iVideoCaptureVideoFormat;
-    TInt		    iVideoCaptureMemoryInUseMultiDrive;
-    TFileName       iVideoCaptureFileName;
-    };
-
-class TVideoFrame
-    {
-public:
-    TUint       iWidth;
-    TUint       iHeight;
-    TUint       iXPos;
-    TUint       iYPos;
-    TUint       iDelay; // 1000 = 1 sec
-    TBool       iEnableTransparency;
-    TBool       iFillsWholeScreen;
-    TFileName   iFileStorePath;
-    };
-
-
-typedef CArrayFixSeg<TVideoFrame> CVideoFrameArray;
-
-/**
- *  CEngine
- * 
- */
-class SGEngine : public CActive //, public MMdaAudioToneObserver
-    {
-    
-    // active object states
-
-    enum TState 
-        {
-        EIdle = 0,              // do nothing
-        EEncodingImage,         // ICL encoding of an image
-        ESequenceDelay,         // waiting till next capture
-        ECancelCapturing,       // asking to cancel capturing
-        ENextVideoFrame,        // get next frame for video
-        ECancelVideoCapturing,  // asking to cancel video capturing  
-        EQueryDelay             // waiting till to remove query
-        };
-    
-public:
-    // Constructors and destructor
-
-    /**
-     * Destructor.
-     */
-    ~SGEngine();
-
-    /**
-     * Two-phased constructor.
-     */
-    static SGEngine* NewL(EngineWrapper *aEngineWrapper);
-
-    /**
-     * Two-phased constructor.
-     */
-    static SGEngine* NewLC(EngineWrapper *aEngineWrapper);
-    
-    /**
-     * returns current settings
-     */
-    inline TGrabSettings GrabSettings(){ return iGrabSettings; };
-    
-    /**
-     * saves settings to engine
-     */
-    void SaveSettingsL(TGrabSettings aGrabSettings);
-    
-    /**
-     * takes one screen shot
-     */
-    bool TakeScreenShotAndSaveL();
-
-    TBool DriveOK(TDriveNumber aNumber);
-    
-    TBool IsDriveMMC(TDriveNumber aDrive);
-    
-#if defined(HB_QT_S60_EVENT_FILTER)
-    TBool HandleCaptureCommandsL(const TWsEvent* aEvent);
-#else
-    TBool HandleCaptureCommandsL(const QSymbianEvent *event);
-#endif
-	
-    
-    void ActivateModelL();
-    void DeActivateModelL();
-    void ActivateCaptureKeysL(TBool aChangeKey=EFalse);
-	void EnableRcpOfFoc(TBool aState);
-    void LoadSettingsL();
-	
-private:
-
-    void CapturingFinishedL(TInt aErr);
-
-    void RunL();
-    void DoCancel();
-    void SaveVideoL(TInt aErr);
-    void CleanTemporaryFilesL();
-    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue);
-    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue); 
-
-    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue);
-    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue);
-
-    void CancelCapturing();
-    void CaptureFrameForVideoL();
-	
-    
-    /**
-     * Constructor for performing 1st stage construction
-     */
-    SGEngine();
-
-    /**
-     * EPOC default constructor for performing 2nd stage construction
-     */
-    void ConstructL(EngineWrapper *aEngineWrapper);
-    
-    
-private:
-	RFs 		  iFileSession;
-
-    CActiveScheduler* iActiveScheduler;
-	CActiveSchedulerWait* iWait;
- 
-    TGrabSettings           iGrabSettings;              // a simple class to store the settings used in the screen capture
-    RWindowGroup            iRootWin;                   // application's window group
-    TInt                    iCapturedKey;               // a handle to the key which is captured
-    TInt                    iCapturedKeyUnD;            // a handle to the key which is captured, up and down
-    TInt                    iCapturedKeyHash;           // a handle to the hash key which is captured
-    TInt                    iCapturedKeyHashUnD;        // a handle to the hash key which is captured, up and down
-    TBool                   iHashKeyCapturingActivated; // captures hash key is activated    
-    CFbsBitmap*             iPreviouslyCapturedBitmap;  // a previously captured bitmap
-    TFileName               iSaveFileName;   
-    CImageEncoder*          iImageEncoder;              // engine from ICL to do the image conversion// target filename of the taken screen shot
-    CFrameImageData*        iFrameImageData;            // frame and image block data needed by ICL
-    TState                  iState;                     // state of this active object
-    TBool                   iHashKeyDown;               // stores state if hash key is currently down
-    TBool                   iCapturingInProgress;       // boolean to check if capturing is in progress
-    TBool                   iStopCapturing;             // boolean to specify if to ask capturing
-    TUint                   iNumberOfTakenShots;        // a number of the taken screen shots in the sequantial mode
-    RTimer                  iTimer;                     // a timer for async delays
-    TUint                   iCurrentFrameNumber;        // a number of taken frames in video mode
-    TTime                   iPreviousFrameTaken;        // time when the last frame was taken
-    TSize                   iVideoDimensions;           // dimension of the video
-    TSize                   iPreviousFrameScreenDimension; // dimension of the screen in previous frame
-    CVideoFrameArray*       iVideoFrameArray;           // the frames of the video
-    EngineWrapper*          iEngineWrapper;             // Eninewrapper that is used for communicating between QT and Symbian
-    };
-
-
-
-
-
-#endif // SGENGINE_H
--- a/screengrabber/rom/backup_registration.xml	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration>
-  <passive_backup>
-    <include_directory name="\"/>
-  </passive_backup>
-  <system_backup/>
-  <restore requires_reboot = "no"/>
-</backup_registration>
--- a/screengrabber/rom/screengrabber.iby	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __SCREENGRABBER_IBY__
-#define __SCREENGRABBER_IBY__
-
-S60_APP_EXE(ScreenGrabber)
-S60_APP_RESOURCE(ScreenGrabber)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,ScreenGrabber)
-//#ifdef S60_UPGRADABLE_APP_REG_RSC
-//  S60_UPGRADABLE_APP_REG_RSC(ScreenGrabber)
-//#else
-//  S60_APP_AIF_RSC(ScreenGrabber)
-//#endif
-
-data=ZPRIVATE\10003a3f\import\APPS\ScreenGrabber_reg.RSC Private\10003a3f\import\Apps\ScreenGrabber_reg.rsc 
-data=ZPRIVATE\101FB751\backup_registration.xml        	private\101FB751\backup_registration.xml
-data=ZSYSTEM\Install\ScreenGrabber_stub.sis             \system\install\ScreenGrabber_stub.sis
-
-#endif // __SCREENGRABBER_IBY__
--- a/screengrabber/screengrabber.pro	Mon Oct 04 10:09:02 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: 
-#
-#
-
-
-TEMPLATE = app
-TARGET = ScreenGrabber
-DEPENDPATH += src
-INCLUDEPATH += inc
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-load(hb.prf)
-symbian:CONFIG -= symbian_i18n
-
-HEADERS += inc/mainview.h \
-					 inc/settingsview.h \
-					 inc/application.h \
-					 inc/notifications.h
-
-SOURCES += main.cpp \
-					 mainview.cpp \
-					 application.cpp \
-					 settingsview.cpp \
-					 notifications.cpp 
-
-symbian: {
-    BLD_INF_RULES.prj_exports += "./rom/screengrabber.iby CORE_IBY_EXPORT_PATH(tools,screengrabber.iby)
-    BLD_INF_RULES.prj_exports += "./rom/backup_registration.xml     Z:/private/101FB751/backup_registration.xml"
-    
-    screengrabber_buildstubsis_extension = \
-        "$${LITERAL_HASH}ifdef MARM" \
-        "    START EXTENSION app-services/buildstubsis" \
-        "    OPTION SRCDIR sis" \
-        "    OPTION SISNAME screengrabber_stub" \
-        "    END" \
-        "$${LITERAL_HASH}endif" 
-        
-    BLD_INF_RULES.prj_extensions += screengrabber_buildstubsis_extension
-        
-		LIBS += -lestor -lws32 -lPlatformEnv -limageconversion  -lapgrfx -lcommonengine  -lfbscli -lgdi -leikcore -lbafl -lefsrv -lapparc -lcone
-
-		HEADERS += inc/sgengine.h \
-   				   inc/enginewrapper.h \
-				   inc/gifanimator.h
-
-		SOURCES += sgengine.cpp \
-				   enginewrapper.cpp \
-				   gifanimator.cpp
-
-		RSS_RULES += "group_name = \"RnD Tools\"";
-
-    TARGET.CAPABILITY = WriteDeviceData SwEvent
-
-    TARGET.UID2 = 0x100039CE
-    TARGET.UID3 = 0x101FB751
-    TARGET.SID = 0x101FB751
-    TARGET.VID = 0x101FB657 // Nokia
-	
-	
-    TARGET.EPOCHEAPSIZE = 0x20000 0x1000000  // Min 128Kb, Max 16Mb
-
-    ICON = ./icons/qgn_menu_screengrabber.svg 
-
-} else {
-    error("Only Symbian supported!")
-}
--- a/screengrabber/sis/ScreenGrabber_stub.pkg	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-
-; Language - standard language definitions
-&EN
-
-; Standard SIS file header
-#{"ScreenGrabber"},(0x101FB751),1,0,0
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; normal stuff:
-""-"z:\sys\bin\ScreenGrabber.exe"
-""-"z:\Resource\Apps\ScreenGrabber.mif"
-""-"z:\Resource\Apps\ScreenGrabber.rsc"
-""-"z:\private\10003a3f\import\apps\ScreenGrabber_reg.rsc"
-""-"z:\private\101FB751\backup_registration.xml"
--- a/screengrabber/src/application.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +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 <eikenv.h>
-#include "application.h"
-#include "enginewrapper.h"
-
-#define KEY_CAPTURE_PRIORITY 100
-
-SGApplication::SGApplication(int argc, char *argv[])  
-    : HbApplication(argc, argv) 
-     {
-	 
-	
-     }
-
-	 
-SGApplication::~SGApplication()  
-{
-		
-}	
-	 
-// ---------------------------------------------------------------------------
-
-#if defined(Q_WS_S60)
-#if defined(HB_QT_S60_EVENT_FILTER)
-bool SGApplication::s60EventFilter(TWsEvent *aEvent)
-#else
-bool SGApplication::symbianEventFilter(const QSymbianEvent *aEvent)
-#endif // (HB_QT_S60_EVENT_FILTER)
-{
-    // pass event to engine, if engine returns true(event was not handled),
-    // forward it.
-    if(!iEngine->handleCaptureCommands(aEvent)) 
-        {
-        return false;
-        }
-    else
-        {
-#if defined(HB_QT_S60_EVENT_FILTER)
-        return HbApplication::s60EventFilter(aEvent);
-#else
-		return HbApplication::symbianEventFilter(aEvent);
-#endif		
-        }
-    
-    }
-#endif
-
-// ---------------------------------------------------------------------------
--- a/screengrabber/src/enginewrapper.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +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 <eikenv.h>
-#include <apgtask.h>
-#include <hbdeviceprogressdialog.h>
-#include "enginewrapper.h"
-
-#include "settingsview.h"
-#include "sgengine.h"
-#include "mainview.h"
-#include "notifications.h"
-
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::EngineWrapper()
-: iSGEngine(0), iProgressNote(0)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-EngineWrapper::~EngineWrapper()
-{
-    if (iSGEngine) {
-        iSGEngine->DeActivateModelL();
-        delete iSGEngine;
-    }
-    if(iProgressNote){
-        delete iProgressNote;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::init()
-{
-    TRAPD(error, iSGEngine = SGEngine::NewL(this));
-	
-    
-    if (error == KErrNone) {
-        TRAP(error, iSGEngine->ActivateModelL());
-    }
-    
-    if (error != KErrNone) {
-        return false;
-    }
-    else {
-        return true;
-    }
-	
-}
-
-// ---------------------------------------------------------------------------
-
-GrabSettings EngineWrapper::getGrabSettings()
-{
-    TGrabSettings tSettings = iSGEngine->GrabSettings();
-    GrabSettings settings;
-    
-    // Convert TGrabSettings to GrabSettings
-    settings.mCaptureMode = tSettings.iCaptureMode;
-    
-    // Single image settings
-    settings.mSingleCaptureHotkey = tSettings.iSingleCaptureHotkey;
-    settings.mSingleCaptureImageFormat = tSettings.iSingleCaptureImageFormat;
-	settings.mSingleCaptureMemoryInUseMultiDrive = tSettings.iSingleCaptureMemoryInUseMultiDrive;
-    settings.mSingleCaptureFileName = QString((QChar*)tSettings.iSingleCaptureFileName.Ptr(),tSettings.iSingleCaptureFileName.Length());
-    
-    //Seguantial image settings
-    settings.mSequantialCaptureDelay = tSettings.iSequantialCaptureDelay;
-    settings.mSequantialCaptureHotkey = tSettings.iSequantialCaptureHotkey;
-    settings.mSequantialCaptureImageFormat = tSettings.iSequantialCaptureImageFormat;
-	settings.mSequantialCaptureMemoryInUseMultiDrive = tSettings.iSequantialCaptureMemoryInUseMultiDrive;
-    settings.mSequantialCaptureDelay = tSettings.iSequantialCaptureDelay;
-    //convert TFilename to QString
-    settings.mSequantialCaptureFileName = QString((QChar*)tSettings.iSequantialCaptureFileName.Ptr(),tSettings.iSequantialCaptureFileName.Length());
-    
-    
-    // Video settings
-    settings.mVideoCaptureHotkey = tSettings.iVideoCaptureHotkey;
-    settings.mVideoCaptureVideoFormat = tSettings.iVideoCaptureVideoFormat;
-	settings.mVideoCaptureMemoryInUseMultiDrive = tSettings.iVideoCaptureMemoryInUseMultiDrive;
-    //convert TFilename to QString
-    settings.mVideoCaptureFileName = QString((QChar*)tSettings.iVideoCaptureFileName.Ptr(),tSettings.iVideoCaptureFileName.Length());
-    
-    return settings;
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::saveSettings(const GrabSettings& settings)
-{
-    TGrabSettings tSettings;
-    // Convert GrabSettings to TGrabSettings
-    tSettings.iCaptureMode = settings.mCaptureMode;
-    
-    tSettings.iSingleCaptureHotkey = settings.mSingleCaptureHotkey;
-    tSettings.iSingleCaptureImageFormat = settings.mSingleCaptureImageFormat;
-    tSettings.iSingleCaptureMemoryInUseMultiDrive = settings.mSingleCaptureMemoryInUseMultiDrive;
-    //convert TFilename to QString
-    tSettings.iSingleCaptureFileName = TFileName(settings.mSingleCaptureFileName.utf16());
-    tSettings.iSequantialCaptureDelay = settings.mSequantialCaptureDelay;
-    tSettings.iSequantialCaptureHotkey = settings.mSequantialCaptureHotkey;
-    tSettings.iSequantialCaptureImageFormat = settings.mSequantialCaptureImageFormat;
-    tSettings.iSequantialCaptureMemoryInUseMultiDrive = settings.mSequantialCaptureMemoryInUseMultiDrive; 
-    tSettings.iSequantialCaptureDelay = settings.mSequantialCaptureDelay;
-    //convert TFilename to QString
-    tSettings.iSequantialCaptureFileName = TFileName(settings.mSequantialCaptureFileName.utf16());
-    
-    tSettings.iVideoCaptureHotkey = settings.mVideoCaptureHotkey;
-    tSettings.iVideoCaptureVideoFormat = settings.mVideoCaptureVideoFormat;
-    tSettings.iVideoCaptureMemoryInUseMultiDrive = settings.mVideoCaptureMemoryInUseMultiDrive; 
-    //convert TFilename to QString
-    tSettings.iVideoCaptureFileName = TFileName(settings.mVideoCaptureFileName.utf16());
-    TRAPD(error, iSGEngine->SaveSettingsL(tSettings));
-    
-    if (error == KErrNone) {
-        TRAP(error, iSGEngine->ActivateCaptureKeysL(true));
-    }
-    
-    if (error == KErrNone) {
-        return true;
-    }
-    else {
-        return false;
-    }
-    
-    
-}
-
-// ---------------------------------------------------------------------------
-
-
-void EngineWrapper::ShowImageCapturedNote()
-{
-    Notifications::imageCaptured();
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowErrorMessage(const TDesC16& aErrorMessage)
-{
-    QString errorMessage((QChar*)aErrorMessage.Ptr(),aErrorMessage.Length());
-    Notifications::error(errorMessage);
- 
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::sendUIToBackground()
-{
-    CCoeEnv* coeEnv = CCoeEnv::Static();
-    TApaTask selfTask(coeEnv->WsSession());
-    selfTask.SetWgId(coeEnv->RootWin().Identifier());
-    selfTask.SendToBackground();
-}
-
-// ---------------------------------------------------------------------------
-
-
-#if defined(HB_QT_S60_EVENT_FILTER)
-bool EngineWrapper::handleCaptureCommands(const TWsEvent* aEvent)
-#else
-bool EngineWrapper::handleCaptureCommands(const QSymbianEvent *aEvent)
-#endif
-{
-    TBool retVal = ETrue;
-    TRAPD(errorCode, retVal = iSGEngine->HandleCaptureCommandsL(aEvent));
-    if (errorCode != KErrNone) {
-        Notifications::error("Error occured when capturing screen.");
-    }
-    
-    return convertTBoolToBool(retVal);
-    
-}
-
-// ---------------------------------------------------------------------------
-
-bool EngineWrapper::convertTBoolToBool(TBool value)
-{
-    if (value) {
-        return true;
-    }
-    else {
-        return false;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowSequantialImagesCapturedNote(TInt amount)
-{
-    Notifications::sequantialImagesCaptured(amount);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowVideoCapturedNote()
-{
-    Notifications::videoCaptured();
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::ShowProgressBar(int max)
-{
-    iProgressNote = Notifications::showProgressBar(max);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::IncrementProgressbarValue()
-{
-    iProgressNote->setProgressValue(iProgressNote->progressValue() + 1);
-}
-
-// ---------------------------------------------------------------------------
-
-void EngineWrapper::CloseProgressbar()
-{
-    delete iProgressNote;
-    iProgressNote = 0;
-}
-
-void EngineWrapper::EnableRcpOfFoc(TBool aState)
-{
-    iSGEngine->EnableRcpOfFoc(aState);
-}
-
-void EngineWrapper::LoadSettings(void)
-{
-	iSGEngine->LoadSettingsL();
-}
-
-// ---------------------------------------------------------------------------
--- a/screengrabber/src/gifanimator.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,308 +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 "gifanimator.h"
-
-#include <s32file.h>
-#include <fbs.h>
-#include <gdi.h>
-#include <imageconversion.h>
-#include "enginewrapper.h"
-
-    
-// ---------------------------------------------------------------------------
-
-TInt CGifAnimator::CreateGifAnimation(const TDesC& aFileName, TSize aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper)
-    {
-	CGifAnimator* self = new(ELeave) CGifAnimator;
-	CleanupStack::PushL(self);
-	TRAPD(err, self->StartL(aFileName, aDimensions, aVideoFrameArray, aEngineWrapper));
-	CleanupStack::PopAndDestroy();
-	return err;
-    }
-
-// ---------------------------------------------------------------------------
-
-CGifAnimator::CGifAnimator()   
-    {
-    }
-
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::StartL(const TDesC& aFileName, const TSize& aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper)
-    {
-    
-    __ASSERT_ALWAYS(aFileName.Length() > 0, User::Panic(_L("GifAnim"), 100));
-    __ASSERT_ALWAYS(aDimensions.iHeight > 0, User::Panic(_L("GifAnim"), 101));
-    __ASSERT_ALWAYS(aDimensions.iWidth > 0, User::Panic(_L("GifAnim"), 102));
-    __ASSERT_ALWAYS(aVideoFrameArray != NULL, User::Panic(_L("GifAnim"), 103));
-    
-    
-    // show a progress dialog
-    aEngineWrapper.ShowProgressBar(aVideoFrameArray->Count()-1);
-    
-    // open the file for writing
-    User::LeaveIfError(iFs.Connect());
-    User::LeaveIfError(iOutFile.Replace(iFs, aFileName, EFileWrite));
-    
-    // write header
-    WriteHeaderL(aDimensions);
-    
-    // process each frame of the animation
-    for (TInt i=0; i<aVideoFrameArray->Count(); i++)
-        {
-        // write headers and raster block
-        TVideoFrame frame = aVideoFrameArray->At(i);
-        WriteGraphicControlL(frame);
-        CFbsBitmap* bitmap = GetBitmapLC(frame, aDimensions);
-        WriteImageDescriptorL(frame);
-        WriteRasterDataL(bitmap);
-        CleanupStack::PopAndDestroy(); //bitmap
-
-        // update the progress bar
-        aEngineWrapper.IncrementProgressbarValue();
-        }
-
-    // write footer and finish
-    WriteFooterL();
-    FinishL();
-    
-    // remove the progress dialog from the screen
-    aEngineWrapper.CloseProgressbar();
-    }    
-
-// ---------------------------------------------------------------------------
-
-CGifAnimator::~CGifAnimator()
-    {
-    
-    if (iImageEncoder)
-        delete iImageEncoder;
-    
-    if (iGIFImageData)
-        delete iGIFImageData;
-    
-    }
-
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::WriteHeaderL(const TSize& aDimensions)
-    {
-    WriteInt8L('G');
-    WriteInt8L('I');
-    WriteInt8L('F');
-    WriteInt8L('8');
-    WriteInt8L('9');
-    WriteInt8L('a');
-
-    WriteInt16L(aDimensions.iWidth);  // width of animation
-    WriteInt16L(aDimensions.iHeight); // height of animation
-    
-    // logical screen descriptor
-    TUint8 packedFlags = 0;
-	packedFlags |= 8 - 1; // size of colour table is number of bits in each color table minus one (bits 0-2)
-	packedFlags |= (8 - 1) << 4; // colour resolution ie maximum size of the original colour palette (bits 4-6)
-	packedFlags |= 0x80; // use global colour table (bit 7)
-    
-    WriteInt8L(packedFlags);
-    
-    WriteInt8L(TRANSPARENCY_INDEX); // background color index
-    
-    WriteInt8L(0); // pixel aspect ratio, 0=not used
-    
-    // write the Symbian default palette since that's what is used
-    CPalette* palette = CPalette::NewDefaultL(EColor256);
-    CleanupStack::PushL(palette);
-    
-    for (TInt i=0; i<palette->Entries(); i++)
-        {
-        TRgb entry = palette->GetEntry(i);
-
-        WriteInt8L(entry.Red());
-        WriteInt8L(entry.Green());
-        WriteInt8L(entry.Blue());
-        }
-    
-    CleanupStack::PopAndDestroy(); //palette
-    }
-
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::WriteGraphicControlL(const TVideoFrame& aFrame)
-    {
-    TInt packedFlags(0);
-    
-    // enable transparency if needed
-    if (aFrame.iEnableTransparency)
-        packedFlags |= 0x01; 
-
-    // set disposal method:
-    // 0 = disposal method not specified, 1 = do not dispose of graphic,
-    // 2 = overwrite graphic with background color, 3 = overwrite graphic with previous graphic
-    TInt disposalMethod = 1;
-    packedFlags |= ((disposalMethod << 2) & 0x1c);
-    
-    WriteInt8L(0x21); // GIF extension
-    WriteInt8L(0xf9); // GIF graphic control block
-    WriteInt8L(0x04); // block size
-    WriteInt8L(packedFlags); // packed
-    WriteInt16L(aFrame.iDelay); // delay
-    WriteInt8L(TRANSPARENCY_INDEX); // transparent color index
-    WriteInt8L(0); // block terminator, always 0
-    }
-
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::WriteImageDescriptorL(const TVideoFrame& aFrame)
-    {
-    WriteInt8L(0x2c); // GIF image descriptor
-    WriteInt16L(aFrame.iXPos);
-    WriteInt16L(aFrame.iYPos);
-    WriteInt16L(aFrame.iWidth);
-    WriteInt16L(aFrame.iHeight);
-    WriteInt8L(0); // packed flags, none specified in this case
-    }
-    
-// ---------------------------------------------------------------------------
-
-CFbsBitmap* CGifAnimator::GetBitmapLC(TVideoFrame& aFrame, const TSize& aDimensions)
-    {
-    CFbsBitmap* bitmap = new(ELeave) CFbsBitmap;
-    CleanupStack::PushL(bitmap);
-    
-    // read the bitmap from the temporary file
-    RFile bitmapFile;
-    User::LeaveIfError( bitmapFile.Open(iFs, aFrame.iFileStorePath, EFileRead) );
-    RFileReadStream readStream(bitmapFile);
-    bitmap->InternalizeL(readStream);
-    readStream.Close();
-    bitmapFile.Close();
-
-    // delete the temporary file since it's not needed anymore
-    iFs.Delete(aFrame.iFileStorePath);
-    
-    // resize the bitmap to match the video dimensions if it is a full screen one
-    if (aFrame.iFillsWholeScreen && (aFrame.iWidth != aDimensions.iWidth || aFrame.iHeight != aDimensions.iHeight))
-        {
-        if (bitmap->Resize(aDimensions) == KErrNone)
-            {
-            // also update dimensions of this frame to match the dimensions of the video            
-            aFrame.iWidth = aDimensions.iWidth;
-            aFrame.iHeight = aDimensions.iHeight;
-            }
-        }
-    
-    return bitmap;
-    }
-    
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::WriteRasterDataL(CFbsBitmap* aBitmap)
-    {
-    // reset the encoder
-    if (iImageEncoder)
-        {
-	    delete iImageEncoder;
-        iImageEncoder = NULL;
-        }
-    
-    // make sure the buffer for conversion is empty    
-    if (iGIFImageData)
-        {
-	    delete iGIFImageData;
-        iGIFImageData = NULL;
-        }        
-
-    
-    TRequestStatus Stat = KRequestPending;
-    
-    // init & convert the bitmap to GIF format
-    iImageEncoder = CImageEncoder::DataNewL(iGIFImageData, CImageEncoder::EOptionAlwaysThread, KImageTypeGIFUid);
-    iImageEncoder->Convert( &Stat, *aBitmap );
-    User::WaitForRequest(Stat);
-   
-   
-    // check any erros in converting 
-    User::LeaveIfError( Stat.Int() );
-    
-    // check if we have valid data
-    if (iGIFImageData == NULL || iGIFImageData->Des().Length()<793)
-        User::Leave(KErrNoMemory);
-    
-    // in GIF files generated by Symbian, the raster data always starts at offset 791,
-    // initial code size in GIF encoding should be 8 since we have a 8bpp image,
-    // also check that the second last byte is the terminator 0,
-    // if this check fails in newer releases of S60, proper parsing of GIF format is probably needed
-    TUint8* imagePtr = &iGIFImageData->Des()[0];
-    if (imagePtr[791] != 8 || imagePtr[iGIFImageData->Des().Length()-2] != 0)
-        User::Leave(KErrNotSupported);
-    
-    // write the raster data block to the file
-    TUint writeLength = iGIFImageData->Des().Length() - 1 - 791;
-    imagePtr+=791;
-    TPtr8 writePtr(imagePtr, writeLength, writeLength);
-    User::LeaveIfError( iOutFile.Write(writePtr) );
-    }
-
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::WriteFooterL()
-    {
-    WriteInt8L(0x3b); // GIF trailer
-    }
-    
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::FinishL()
-    {
-    iOutFile.Close();
-    iFs.Close();
-    }
-
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::WriteInt8L(TInt aValue)
-    {
-    HBufC8* buf = HBufC8::NewMaxLC(1);
-
-    TUint8* ptr = &buf->Des()[0];
-    ptr[0] = TUint8(aValue);
-    
-    User::LeaveIfError( iOutFile.Write(buf->Des()) );
-    
-    CleanupStack::PopAndDestroy(); // buf
-    }
-
-// ---------------------------------------------------------------------------
-
-void CGifAnimator::WriteInt16L(TInt aValue)
-    {
-    HBufC8* buf = HBufC8::NewMaxLC(2);
-
-    TUint8* ptr = &buf->Des()[0];
-    ptr[0] = TUint8(aValue);
-    ptr[1] = TUint8(aValue>>8);
-        
-    User::LeaveIfError( iOutFile.Write(buf->Des()) );
-    
-    CleanupStack::PopAndDestroy(); // buf
-    }
-
-// ---------------------------------------------------------------------------
-
--- a/screengrabber/src/main.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QtGui/QMessageBox>
-
-#include <hbmainwindow.h>
-#include <hbview.h>
-#include <hbmessagebox.h>
-#include <coecntrl.h>
-
-#include "mainview.h"
-#include "application.h"
-#include "enginewrapper.h"
-#include "settingsview.h"
-
-
-
-int main(int argc, char *argv[])
-{
-    
-    SGApplication app(argc, argv);
-	
-    EngineWrapper engineWrapper;
-	app.SetEngineWrapper(&engineWrapper);
-    if (!engineWrapper.init()) {
-      return EXIT_FAILURE;
-    }
-
-	
-	
-    HbMainWindow mainWindow;
-    
-    //Create main view
-    MainView* view = new MainView(mainWindow, engineWrapper);
-    //initialize main view
-    view->init(app);
-
-	
-    SettingsView* settingsView = new SettingsView(*view, mainWindow, engineWrapper);
-	
-	view->setSettingsView(settingsView);
-    
-	// Add Views to main window and reveal it.
-    mainWindow.addView(view);
-    mainWindow.addView(settingsView);
-
-    
-    mainWindow.show();
-     
-    int result = app.exec();
-   
-    return result;
-}
-
--- a/screengrabber/src/mainview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +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 <hbview.h>
-#include <hbmainwindow.h>
-#include <hbapplication.h>
-#include <hblabel.h>
-#include <hbmenu.h>
-#include <hbaction.h>
-#include <hbtextedit.h>
-#include <hbmessagebox.h>
-#include <qgraphicslinearlayout.h>
-#include "enginewrapper.h"
-#include "settingsview.h"
-#include "mainview.h"
-#include "notifications.h"
-#include "hbtoolbar.h"
-
-// ---------------------------------------------------------------------------
-
-MainView::MainView(HbMainWindow &mainWindow, EngineWrapper &engineWrapper):
-    mMainWindow(mainWindow),
-    mSettingsView(0),
-    mEngineWrapper(engineWrapper)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-MainView::~MainView()
-{
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::init(HbApplication &app)
-{
-    this->setTitle("Screen Grabber");
-    createMenu(app);
-    createInfoText();
-    createToolbar();
-
-}
-
-void MainView::createMenu(HbApplication& app)
-{
-    
-    HbMenu* menu = this->menu();
-   
-    if (menu != NULL) {
-    
-        actionSendToBg = menu->addAction("Send to background");
-        connect(actionSendToBg, SIGNAL( triggered() ), this, SLOT( sendToBackground() ) );
-        
-        actionSettings = menu->addAction("Settings");
-        connect(actionSettings, SIGNAL( triggered() ), this, SLOT( showSettings() ) );
-    
-        actionAbout = menu->addAction("About");
-        connect(actionAbout, SIGNAL( triggered() ), this, SLOT( showAboutPopup() ) );
-    
-        actionExit = menu->addAction("Exit");
-        connect(actionExit, SIGNAL(triggered()), this, SLOT( my_quit() ) );
-
-		HbAction *mDefaultNavigationAction = new HbAction(Hb::QuitNaviAction, this);
-		connect(mDefaultNavigationAction,SIGNAL(triggered()), this, SLOT(my_quit()));
-		setNavigationAction(mDefaultNavigationAction);
-        
-    	//setNavigationAction(actionExit);
-    }
-}
-
-
-void MainView::quitYesNoQuestionClosed(HbAction* action)
-    {
-    HbMessageBox *dlg = static_cast<HbMessageBox*>(sender());
-    if(action == dlg->primaryAction())
-        {
-        qApp->quit(); 
-        }
-    }
-
-void MainView::my_quit()
-    {
-	HbMessageBox::question("Do you really want to exit the Screen Grabber application?", 
-	    this, //receiver
-	    SLOT(quitYesNoQuestionClosed(HbAction *)), //member
-	    tr("Yes"), //primaryButtonText
-	    tr("No"), //secondaryButtonText
-	    new HbLabel("Exit Screen grabber confirm", this)
-        );
-	}
-
-// ---------------------------------------------------------------------------
-
-void MainView::createInfoText()
-{
-    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical, this);
-    if (layout != NULL) {
-        HbTextEdit* edit = new HbTextEdit(this);
-        if(edit != NULL) {
-            edit->setPlainText("Please use the settings screen to define the "
-                               "capture mode and any other related settings "
-                               "such as capture hotkey and saving format. "
-                               "Using the PNG format for screen shots is "
-                               "recommended, since it is compressed but "
-                               "lossless. The captures can be managed with "
-                               "the Media Gallery application.\n\nYou may "
-                               "start taking screenshots or capturing video "
-                               "now. Please press the Applications key to go back "
-                               "to the Application menu or send this application "
-                               "to the background via the Options menu. To be "
-                               "able to take screenshots or capture video, this "
-                               "application needs to stay running in the "
-                               "background.");
-            edit->setReadOnly(true);
-            //TODO edit->setCursorHidden(true);
-            //TODO edit->setAttribute(Qt::WA_InputMethodEnabled, false);
-            layout->addItem(edit);
-            layout->setContentsMargins(5, 5, 5, 5);
-            this->setLayout(layout);
-        }
-        
-    }
-    
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::showSettings()
-{
-    mEngineWrapper.EnableRcpOfFoc(ETrue);
-	mEngineWrapper.LoadSettings();	
-	mSettingsView->loadSettings();
-	mMainWindow.setCurrentView(mSettingsView);
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::createToolbar()
-{
-    HbToolBar *toolbar = new HbToolBar(this); // main view takes the ownership
-    toolbar->addAction(actionSettings);
-    toolbar->addAction(actionSendToBg);
-    setToolBar(toolbar);
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::showAboutPopup()
-{
-    Notifications::about();
-}
-
-// ---------------------------------------------------------------------------
-
-void MainView::sendToBackground()
-    {
-    mEngineWrapper.sendUIToBackground();
-    }
-
-
--- a/screengrabber/src/notifications.cpp	Mon Oct 04 10:09:02 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: 
-*
-*/
-
-#include <hbdevicemessagebox.h>
-#include <hblabel.h>
-#include <hbdeviceprogressdialog.h>
-
-#include "notifications.h"
-
-
-
-// ---------------------------------------------------------------------------
-
-void Notifications::imageCaptured()
-{
-    HbDeviceMessageBox::information("Screen shot saved to Media Gallery");
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::about()
-{
-    HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
-    messageBox->setText("Version 5.0.0 - March 10th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.");
-    HbLabel *header = new HbLabel("About Screen Grabber", messageBox);
-    messageBox->setHeadingWidget(header);
-    messageBox->setAttribute(Qt::WA_DeleteOnClose);
-    messageBox->setTimeout(HbPopup::NoTimeout);
-    messageBox->open();
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::error(const QString& errorMessage)
-{
-    HbDeviceMessageBox::warning(errorMessage);
-
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::sequantialImagesCaptured(int amount){
-    // Code below launches a global note
-    QString text;
-    text.setNum(amount, 10);
-    text.append(" screen shots saved to Media Gallery");
-    
-    HbDeviceMessageBox::information(text);
- 
-}
-
-// ---------------------------------------------------------------------------
-
-void Notifications::videoCaptured()
-{
-    HbDeviceMessageBox::information("Video saved to Media Gallery");
-
-}
-
-// ---------------------------------------------------------------------------
-
-HbDeviceProgressDialog* Notifications::showProgressBar(int max)
-{
-    HbDeviceProgressDialog *note = new HbDeviceProgressDialog(HbProgressDialog::ProgressDialog);
-    note->setText("Saving...");
-    note->setMaximum(max);
-    note->show();
-    return note;
-}
-
-// ---------------------------------------------------------------------------
--- a/screengrabber/src/settingsview.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +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 <hbdataform.h>
-#include <hbdataformmodelitem.h>
-#include <hbdataformmodel.h>
-#include <hbdataformviewitem.h>
-#include <hbaction.h>
-#include <hbmenu.h>
-#include <hbtoolbar.h>
-#include <hbabstractviewitem.h>
-#include <hbaction.h>
-
-
-#include "settingsview.h"
-#include "enginewrapper.h"
-#include "sgengine.h"
-#include "hbslider.h"
-#include "notifications.h"
-
-
-
-// ---------------------------------------------------------------------------
-
-SettingsView::SettingsView(HbView &mainView, HbMainWindow &mainWindow, EngineWrapper &engineWrapper): 
-    mEngineWrapper(engineWrapper), 
-    mMainWindow(mainWindow), 
-    mMainView(mainView)
-{
-    // Set title and add this view to main window
-    setTitle("Settings");
-    
-    HbAction *actionSaveSettings = menu()->addAction(QString("Save & close"));
-    HbAction *actionCancel = menu()->addAction("Cancel & close");
-    
-    toolBar()->addAction(actionSaveSettings);
-    toolBar()->addAction(actionCancel);
-  
-    
-    //create setting form
-    mSettingForm = new HbDataForm();
-    
-    //create a model class
-    mModel = new HbDataFormModel(this);
-    
-    // DataFormItem for mode selection
-    mModeItem = mModel->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Capture mode"), 0);
-    mModeItem->setContentWidgetData(QString("items"), CAPTUREMODES);
-    
-    // Create setting model
-     createSingleCaptureComponents(mModel, 0);
-     createSequentialCaptureComponents(mModel, 0);
-     createVideoCaptureComponents(mModel, 0);
- 
-    // Set created model model to form
-    mSettingForm->setModel(mModel);
-    setWidget(mSettingForm);//takes ownership
-    
-    // Get view item of mode selection item
-    HbDataFormViewItem *viewItemVideoPage = static_cast<HbDataFormViewItem*>(mSettingForm->itemByIndex(mModel->indexFromItem(mModeItem)));
-
-    loadSettings();
-    
-    // Connect signals from item modifications and close with this form's slots
-    connect(actionSaveSettings, SIGNAL(triggered()), this, SLOT(saveAndClose()));
-    connect(actionCancel, SIGNAL(triggered()), this, SLOT(close()));
-	
-	HbAction *mDefaultNavigationAction = new HbAction(Hb::QuitNaviAction, this);
-	connect(mDefaultNavigationAction,SIGNAL(triggered()), this, SLOT(saveAndClose()));
-	setNavigationAction(mDefaultNavigationAction);
-	
-
-
-}
-
-
-// ---------------------------------------------------------------------------
-
-SettingsView::~SettingsView()
-{
-
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::loadSettings()
-{
-
-    // get settings from engine;
-    mSettings = mEngineWrapper.getGrabSettings();
-    
-    //Capture mode
-    mModeItem->setContentWidgetData("selected", mSettings.mCaptureMode);
-    
-    // Still image 
-    mImageHotKeyItem->setContentWidgetData("selected", mSettings.mSingleCaptureHotkey);
-    mImageFormatItem->setContentWidgetData("selected", mSettings.mSingleCaptureImageFormat);
-    mImageMemoryInUseItem->setContentWidgetData("selected", mSettings.mSingleCaptureMemoryInUseMultiDrive);
-    mImageFileNameItem->setContentWidgetData("text", mSettings.mSingleCaptureFileName);
-       
-    // Seguantial image components
-    mSequantialHotKeyItem->setContentWidgetData("selected", mSettings.mSequantialCaptureHotkey);
-    mSequantialFormatItem->setContentWidgetData("selected", mSettings.mSequantialCaptureImageFormat);
-    mSequantialDelayItem->setContentWidgetData("text", mSettings.mSequantialCaptureDelay);
-    mSequantialMemoryInUseItem->setContentWidgetData("selected", mSettings.mSequantialCaptureMemoryInUseMultiDrive);
-    mSequantialFileNameItem->setContentWidgetData("text", mSettings.mSequantialCaptureFileName);
-    
-    // Video capture components
-    mVideoHotKeyItem->setContentWidgetData("selected", mSettings.mVideoCaptureHotkey);
-    mVideoFormatItem->setContentWidgetData("selected", mSettings.mVideoCaptureVideoFormat);
-    mVideoMemoryInUseItem->setContentWidgetData("selected", mSettings.mVideoCaptureMemoryInUseMultiDrive);
-    mVideoFileNameItem->setContentWidgetData("text", mSettings.mVideoCaptureFileName);
-    
-	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createSingleCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-    
-    // Create Group for single image components
-    mGroupImageCapture = model->appendDataFormGroup(QString("Single image settings"), parent);
-
-    // DataFormItem for hotkey selection
-    mImageHotKeyItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Capture hotkey"), mGroupImageCapture);
-    mImageHotKeyItem->setContentWidgetData(QString("items"), KEYS);
-
-    // DataFormItem for image format selection
-    mImageFormatItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Image format"), mGroupImageCapture);
-    mImageFormatItem->setContentWidgetData(QString("items"), IMAGEFORMATS);
-    
-    // DataFormItem for memory in use selection
-    mImageMemoryInUseItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Memory in use"), mGroupImageCapture);
-    mImageMemoryInUseItem->setContentWidgetData(QString("items"), MEMORYMODES);
-    
-    // DataFormItem for file name
-    mImageFileNameItem = model->appendDataFormItem(
-            HbDataFormModelItem::TextItem, QString("File name"), mGroupImageCapture);
-    mImageFileNameItem->setContentWidgetData(QString("text"), QString("Shot"));
-    
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createSequentialCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-    
-    
-    // Create Group for sequential image components
-    mGroupSeguantialCapture = model->appendDataFormGroup(QString("Sequential image settings"), parent);
-    
-    // DataFormItem for hotkey selection
-    mSequantialHotKeyItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Capture hotkey"), mGroupSeguantialCapture);
-    mSequantialHotKeyItem->setContentWidgetData(QString("items"), KEYS);
-    
-    // DataFormItem for image format selection
-    mSequantialFormatItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Image format"), mGroupSeguantialCapture);
-    mSequantialFormatItem->setContentWidgetData(QString("items"), IMAGEFORMATS);
-    
-    // DataFormItem for delay between images selection
-    mSequantialDelayItem = model->appendDataFormItem(
-            HbDataFormModelItem::TextItem, QString("Delay between two images(ms)"), mGroupSeguantialCapture);
-    mSequantialDelayItem->setContentWidgetData(QString("text"), QString("Shot"));
-    
-    // DataFormItem for memory selection
-    mSequantialMemoryInUseItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Memory in use"), mGroupSeguantialCapture);
-    mSequantialMemoryInUseItem->setContentWidgetData(QString("items"), MEMORYMODES);
-    
-    // DataFormItem for file name
-    mSequantialFileNameItem = model->appendDataFormItem(
-            HbDataFormModelItem::TextItem, QString("File name"), mGroupSeguantialCapture);
-    mSequantialFileNameItem->setContentWidgetData(QString("text"), QString("Shot"));
-    
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::createVideoCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent)
-{
-
-    // Create Group for video capturing components
-    mGroupVideoCapture = model->appendDataFormGroup(QString("Video settings"), parent);
-    
-    // DataFormItem for hotkey selection
-    mVideoHotKeyItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Start/Stop hotkey"), mGroupVideoCapture);
-    mVideoHotKeyItem->setContentWidgetData(QString("items"), KEYS);
-    
-    // DataFormItem for video format selection
-    mVideoFormatItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Video format"), mGroupVideoCapture);
-    mVideoFormatItem->setContentWidgetData(QString("items"), VIDEOFORMATS);
-    
-    // DataFormItem for memory selection
-    mVideoMemoryInUseItem = model->appendDataFormItem(
-            HbDataFormModelItem::RadioButtonListItem, QString("Memory in use"), mGroupVideoCapture);
-    mVideoMemoryInUseItem->setContentWidgetData(QString("items"), MEMORYMODES);
-    
-    // DataFormItem for file name
-    mVideoFileNameItem = model->appendDataFormItem(
-            HbDataFormModelItem::TextItem, QString("File name"), mGroupVideoCapture);
-    mVideoFileNameItem->setContentWidgetData(QString("text"), QString("Video"));
-    
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::saveAndClose()
-{
-
-    readFormItems();
-    if (!mEngineWrapper.saveSettings(mSettings)) {
-        Notifications::error("Unable to save settings");
-    }    
-    
-    mEngineWrapper.EnableRcpOfFoc(EFalse);
-    mMainWindow.setCurrentView(&mMainView);
-	
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::readFormItems()
-{
-    
-    //TODO this does not work correctly with WK38 ( Text box items )
-
-    mSettings.mCaptureMode = mModeItem->contentWidgetData("selected").toInt();
-
-    mSettings.mSingleCaptureImageFormat = mImageFormatItem->contentWidgetData("selected").toInt();
-    mSettings.mSingleCaptureHotkey = mImageHotKeyItem->contentWidgetData("selected").toInt();
-    mSettings.mSingleCaptureMemoryInUseMultiDrive = mImageMemoryInUseItem->contentWidgetData("selected").toInt(); 
-    mSettings.mSingleCaptureFileName = mImageFileNameItem->contentWidgetData("text").toString();
-    
-    mSettings.mSequantialCaptureImageFormat = mSequantialFormatItem->contentWidgetData("selected").toInt();
-    mSettings.mSequantialCaptureHotkey = mSequantialHotKeyItem ->contentWidgetData("selected").toInt();
-    mSettings.mSequantialCaptureMemoryInUseMultiDrive = mSequantialMemoryInUseItem ->contentWidgetData("selected").toInt();
-    mSettings.mSequantialCaptureFileName = mSequantialFileNameItem->contentWidgetData("text").toString();
-    mSettings.mSequantialCaptureDelay = mSequantialDelayItem->contentWidgetData("text").toInt();
-    
-
-    mSettings.mVideoCaptureVideoFormat = mVideoFormatItem->contentWidgetData("selected").toInt();
-    mSettings.mVideoCaptureHotkey = mVideoHotKeyItem ->contentWidgetData("selected").toInt();
-    mSettings.mVideoCaptureMemoryInUseMultiDrive = mVideoMemoryInUseItem ->contentWidgetData("selected").toInt();
-    mSettings.mVideoCaptureFileName = mVideoFileNameItem ->contentWidgetData("text").toString();
-	
-   
-}
-
-// ---------------------------------------------------------------------------
-
-void SettingsView::close()
-{
-    mEngineWrapper.EnableRcpOfFoc(EFalse);
-    mMainWindow.setCurrentView(&mMainView);
-}
--- a/screengrabber/src/sgengine.cpp	Mon Oct 04 10:09:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1483 +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 <s32file.h> 
-#include <bautils.h>
-#include <pathinfo.h>
-#include <apparc.h> 
-#include <imageconversion.h>
-#include <textresolver.h>
-#include <apgtask.h> 
-
-#include <hblabel.h>
-#include <hbmessagebox.h>
-
-#include "mainview.h"
-#include "sgengine.h"
-#include "enginewrapper.h"
-#include "gifanimator.h"
-
-
-#define SC_PRINTS
-
-    #ifdef SC_PRINTS
-     #define SC_DEBUG(a) RDebug::Print(a)
-     #define SC_DEBUG2(a,b) RDebug::Print(a,b)
-    #else
-     #define SC_DEBUG(a) 
-     #define SC_DEBUG2(a,b)
-    #endif
-
-
-
-
-_LIT(KDefaultImageFileName, "Shot");
-_LIT(KDefaultVideoFileName, "Video");
-
-#define HIGH_QUALITY_JPEG 97
-#define LOW_QUALITY_JPEG 60
-#define DEFAULT_SEQ_CAPTURE_DELAY_MS 5000   // 5.000 secs
-#define VIDEO_CAPTURE_DELAY 250             // 0.25 secs
-#define VIDEO_CAPTURE_MINIMUM_DELAY 200     // 0.20 secs
-const TInt KSettingsDrive = EDriveC;
-_LIT(KSettingsFileName, "screengrabber_settings.ini");
-_LIT(KScreenShotsSubDirectory, "Screen Shots\\");
-_LIT(KSGTemporaryDirectory, "\\system\\temp\\screengrabber\\");
-
-
-#define KEY_CAPTURE_PRIORITY 100            // do not change, this is for window server
-
-// ---------------------------------------------------------------------------
-
-SGEngine::SGEngine() : CActive(EPriorityStandard)
-    {
-    // No implementation required
-    }
-
-// ---------------------------------------------------------------------------
-
-SGEngine::~SGEngine()
-    {
- 
-    TRAP_IGNORE( CleanTemporaryFilesL() );
-
-
-    if (iFrameImageData)
-        delete iFrameImageData;
-
-    if (iPreviouslyCapturedBitmap)
-        delete iPreviouslyCapturedBitmap;
-
-    if (iImageEncoder)
-        delete iImageEncoder;
-     
-    delete iVideoFrameArray;
-
-    Cancel();
-    iTimer.Close();
-
-    iFileSession.Close(); 
-    
-    }
-
-// ---------------------------------------------------------------------------
-
-SGEngine* SGEngine::NewLC(EngineWrapper *aEngineWrapper)
-    {
-    SGEngine* self = new (ELeave) SGEngine();
-    CleanupStack::PushL(self);
-    self->ConstructL(aEngineWrapper);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-SGEngine* SGEngine::NewL(EngineWrapper *aEngineWrapper)
-    {
-    SGEngine* self = SGEngine::NewLC(aEngineWrapper);
-    CleanupStack::Pop(); // self;
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::ConstructL(EngineWrapper *aEngineWrapper)
-    {
-
-    iEngineWrapper = aEngineWrapper;
-   
-    iHashKeyCapturingActivated = EFalse; // Check this
-   
-    User::LeaveIfError(iTimer.CreateLocal());
-
-    iVideoFrameArray = new(ELeave) CVideoFrameArray(10000);
-
-    iPreviouslyCapturedBitmap = new(ELeave) CFbsBitmap;
-
-    iCapturingInProgress = EFalse;
-    iStopCapturing = EFalse;
-    iNumberOfTakenShots = 0;
-    iCurrentFrameNumber = 0;
-    iHashKeyDown = EFalse;
-	
-
-	CActiveScheduler::Add(this);
-	User::LeaveIfError(iFileSession.Connect());  
-	
-	// create window group.
-    iRootWin = CEikonEnv::Static()->RootWin();
-	iRootWin.EnableReceiptOfFocus(EFalse);
-    
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::RunL(){
-
-
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- RunL begin"));
-    
-    switch (iState) 
-        {
-        // encoding of the image is now finished
-        case EEncodingImage: 
-            {
-            if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
-                {
-                // single shot done
-                CapturingFinishedL( iStatus.Int() );
-                }
-
-            else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
-                {
-                // increase the counter    
-                iNumberOfTakenShots++;
-                
-                // check if we can take more shots or just finish
-                if (!iStopCapturing && iStatus.Int()==KErrNone)
-                    {
-        
-                    // some delay before the next shot can be taken    
-                    iState = ESequenceDelay;
-                    
-                    // some checking that the value of delay is valid
-                    TInt delay(iGrabSettings.iSequantialCaptureDelay); //ms
-                    if (delay<0 && delay > 999999)
-                        delay = DEFAULT_SEQ_CAPTURE_DELAY_MS;
-                      
-                    iTimer.After(iStatus, delay*1000);
-                    SetActive();  
-                    }
-                else
-                    {
-                    // finished
-                    CapturingFinishedL( iStatus.Int() );
-                    }                       
-               }
-            else
-                User::Panic(_L("Wrong mode"), 32);            
-
-            break;
-            }
-
-        // delay finished, ready to take the next shot
-        case ESequenceDelay: 
-            {
-            TakeScreenShotAndSaveL();
-
-            break;
-            }
-            
-        // asked to cancel capturing    
-        case ECancelCapturing:
-            {
-            // finished
-            CapturingFinishedL( iStatus.Int() );
-
-            break;
-            }
-            
-        case ENextVideoFrame:
-            {
-            // increase the counter
-            iCurrentFrameNumber++;
-            
-            // check if we can take more frames or just finish
-            if (!iStopCapturing && iStatus.Int()==KErrNone)
-                {
-                // take next frame
-                CaptureFrameForVideoL();
-                }
-            else
-                {
-                // finished, save video
-                SaveVideoL( iStatus.Int() );
-                }               
-            }
-            break;
-
-        case ECancelVideoCapturing:
-            {
-            // finished, save video
-            SaveVideoL( iStatus.Int() );                
-            }
-            break;
-                                
-
-        default:
-            {
-            break;
-            }
-        }
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- RunL end"));
-    
-
-}
-
-
-void SGEngine::EnableRcpOfFoc(TBool aState)
-	{
-	iRootWin.EnableReceiptOfFocus(aState);
-	}
-
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::DoCancel(){
-    iTimer.Cancel();
-}
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue)
-    {
-    if (aDicFS->IsPresentL(aUid))
-        {
-        RDictionaryReadStream in;
-        in.OpenLC(*aDicFS, aUid);
-        aValue = in.ReadInt16L();
-        CleanupStack::PopAndDestroy(); // in        
-        }
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue)
-    {
-    if (aDicFS->IsPresentL(aUid))
-        {
-        RDictionaryReadStream in;
-        in.OpenLC(*aDicFS, aUid);
-        TInt bufLength = in.ReadInt16L();   // get length of descriptor
-        in.ReadL(aValue, bufLength);        // get the descriptor itself
-        CleanupStack::PopAndDestroy(); // in
-        }
-    }
-// ----------------------------------------------------------------------------
-
-void SGEngine::LoadSettingsL()
-    {
-	 
-    // set defaults
-    iGrabSettings.iCaptureMode = ECaptureModeSingleCapture;
-    
-    iGrabSettings.iSingleCaptureHotkey = EHotkeySendKey;
-    iGrabSettings.iSingleCaptureImageFormat = EImageFormatPNG;
-    iGrabSettings.iSingleCaptureMemoryInUseMultiDrive = EPhoneMemory;
-    iGrabSettings.iSingleCaptureFileName.Copy( KDefaultImageFileName );
-
-    iGrabSettings.iSequantialCaptureHotkey = EHotkeySendKey;
-    iGrabSettings.iSequantialCaptureImageFormat = EImageFormatPNG;
-    iGrabSettings.iSequantialCaptureDelay = DEFAULT_SEQ_CAPTURE_DELAY_MS;
-    iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive = EPhoneMemory;
-    iGrabSettings.iSequantialCaptureFileName.Copy( KDefaultImageFileName );
-
-    iGrabSettings.iVideoCaptureHotkey = EHotkeySendKey;
-    iGrabSettings.iVideoCaptureVideoFormat = EVideoFormatAnimatedGIF;
-    iGrabSettings.iVideoCaptureMemoryInUseMultiDrive = EPhoneMemory;    
-    iGrabSettings.iVideoCaptureFileName.Copy( KDefaultVideoFileName );
-       
-        
-    // make sure that the private path of this app in c-drive exists
-    
-	iFileSession.CreatePrivatePath( KSettingsDrive ); // c:\\private\\101fb751\\
-    
-    // handle settings always in the private directory 
-    
-	if (iFileSession.SetSessionToPrivate( KSettingsDrive ) == KErrNone)
-        {
-        // open or create a dictionary file store
-        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iFileSession, KSettingsFileName, KUidScreenGrabber);
-
-        LoadDFSValueL(settingsStore, KSGSettingCaptureMode,                             iGrabSettings.iCaptureMode);
-        
-        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureHotkey,                     iGrabSettings.iSingleCaptureHotkey);
-        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureImageFormat,                iGrabSettings.iSingleCaptureImageFormat);
-        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureMemoryInUseMultiDrive,      iGrabSettings.iSingleCaptureMemoryInUseMultiDrive);
-        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureFileName,                   iGrabSettings.iSingleCaptureFileName);
-        
-        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureHotkey,                 iGrabSettings.iSequantialCaptureHotkey);
-        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureImageFormat,            iGrabSettings.iSequantialCaptureImageFormat);
-        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureDelay,                  iGrabSettings.iSequantialCaptureDelay);
-        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureMemoryInUseMultiDrive,  iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive);
-        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureFileName,               iGrabSettings.iSequantialCaptureFileName);
-
-        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureHotkey,                      iGrabSettings.iVideoCaptureHotkey);
-        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureVideoFormat,                 iGrabSettings.iVideoCaptureVideoFormat);
-        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureMemoryInUseMultiDrive,       iGrabSettings.iVideoCaptureMemoryInUseMultiDrive);
-        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureFileName,                    iGrabSettings.iVideoCaptureFileName);
-
-        CleanupStack::PopAndDestroy(); // settingsStore         
-        }
-//chesk if all settings are in range - for safety reason, not to set some controls out of range - it causes the crash
-	if (!(iGrabSettings.iCaptureMode >= ECaptureModeSingleCapture && iGrabSettings.iCaptureMode <= ECaptureModeVideoCapture))
-	    { //give it default value
-        iGrabSettings.iCaptureMode = ECaptureModeSingleCapture;
-	    }
-	if (!(iGrabSettings.iSingleCaptureHotkey >= EHotkeySendKey && iGrabSettings.iSingleCaptureHotkey <= EHotkeyCameraKey1))
-	    {
-        iGrabSettings.iSingleCaptureHotkey = EHotkeySendKey;
-	    }
-	if (!(iGrabSettings.iSingleCaptureImageFormat >= EImageFormatPNG && iGrabSettings.iSingleCaptureImageFormat <= EImageFormatGIF))
-	    {
-        iGrabSettings.iSingleCaptureImageFormat = EImageFormatPNG;
-	    }
-	if (!(iGrabSettings.iSingleCaptureMemoryInUseMultiDrive >= EPhoneMemory && iGrabSettings.iSingleCaptureMemoryInUseMultiDrive <= EMemoryCard))
-	    {
-        iGrabSettings.iSingleCaptureMemoryInUseMultiDrive = EPhoneMemory;
-	    }
-	
-    if (!(iGrabSettings.iSequantialCaptureHotkey >= EHotkeySendKey && iGrabSettings.iSequantialCaptureHotkey <= EHotkeyCameraKey1))
-        {
-        iGrabSettings.iSequantialCaptureHotkey = EHotkeySendKey;
-        }
-    if (!(iGrabSettings.iSequantialCaptureImageFormat >= EImageFormatPNG && iGrabSettings.iSequantialCaptureImageFormat <= EImageFormatGIF))
-        {
-        iGrabSettings.iSequantialCaptureImageFormat = EImageFormatPNG;
-        }
-    if (!(iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive >= EPhoneMemory && iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive <= EMemoryCard))
-        {
-        iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive = EPhoneMemory;
-        }
-
-    if (!(iGrabSettings.iVideoCaptureHotkey >= EHotkeySendKey && iGrabSettings.iVideoCaptureHotkey <= EHotkeyCameraKey1))
-        {
-        iGrabSettings.iVideoCaptureHotkey = EHotkeySendKey;
-        }
-    if (iGrabSettings.iVideoCaptureVideoFormat != EVideoFormatAnimatedGIF)
-        {
-        iGrabSettings.iVideoCaptureVideoFormat = EVideoFormatAnimatedGIF;
-        }
-    if (!(iGrabSettings.iVideoCaptureMemoryInUseMultiDrive >= EPhoneMemory && iGrabSettings.iVideoCaptureMemoryInUseMultiDrive <= EMemoryCard))
-        {
-        iGrabSettings.iVideoCaptureMemoryInUseMultiDrive = EPhoneMemory;
-        }
-	
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue)
-    {
-    RDictionaryWriteStream out;
-    out.AssignLC(*aDicFS, aUid);
-    out.WriteInt16L(aValue);
-    out.CommitL();  
-    CleanupStack::PopAndDestroy(1);// out
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue)
-    {
-    RDictionaryWriteStream out;
-    out.AssignLC(*aDicFS, aUid);
-    out.WriteInt16L(aValue.Length());       // write length of the descriptor
-    out.WriteL(aValue, aValue.Length());    // write the descriptor itself
-    out.CommitL();  
-    CleanupStack::PopAndDestroy(1);// out
-    }
-    
-// ---------------------------------------------------------------------------
-void SGEngine::SaveSettingsL(TGrabSettings aGrabSettings)
-    {
-
-	
-    // set the new settings
-    iGrabSettings = aGrabSettings;
-
-    // handle settings always in c:\\private\\101fb751\\
-    if (iFileSession.SetSessionToPrivate( KSettingsDrive ) == KErrNone)
-        {
-        // delete existing store to make sure that it is clean and not eg corrupted
-        if (BaflUtils::FileExists(iFileSession, KSettingsFileName))
-            {
-            iFileSession.Delete(KSettingsFileName);
-            }
-        
-        // create a dictionary file store
-        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iFileSession, KSettingsFileName, KUidScreenGrabber);
-
-        SaveDFSValueL(settingsStore, KSGSettingCaptureMode,                             iGrabSettings.iCaptureMode);
-        
-        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureHotkey,                     iGrabSettings.iSingleCaptureHotkey);
-        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureImageFormat,                iGrabSettings.iSingleCaptureImageFormat);
-        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureMemoryInUseMultiDrive,      iGrabSettings.iSingleCaptureMemoryInUseMultiDrive);
-        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureFileName,                   iGrabSettings.iSingleCaptureFileName);
-        
-        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureHotkey,                 iGrabSettings.iSequantialCaptureHotkey);
-        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureImageFormat,            iGrabSettings.iSequantialCaptureImageFormat);
-        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureDelay,                  iGrabSettings.iSequantialCaptureDelay);
-        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureMemoryInUseMultiDrive,  iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive);
-        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureFileName,               iGrabSettings.iSequantialCaptureFileName);
-
-        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureHotkey,                      iGrabSettings.iVideoCaptureHotkey);
-        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureVideoFormat,                 iGrabSettings.iVideoCaptureVideoFormat);
-        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureMemoryInUseMultiDrive,       iGrabSettings.iVideoCaptureMemoryInUseMultiDrive);
-        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureFileName,                    iGrabSettings.iVideoCaptureFileName);
-        
-        settingsStore->CommitL();
-        CleanupStack::PopAndDestroy(); // settingsStore             
-        }
-		
-    }
-        
-// ---------------------------------------------------------------------------
-
-void SGEngine::ActivateCaptureKeysL(TBool aChangeKey)
-    {
-	
-    // if changing the capture key, capturing needs to be cancelled first
-    if (aChangeKey)
-        {
-        CancelCapturing();
-        }
-
-    // get hotkey of the capture
-    TInt captureHotkey(0);
-    if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
-        captureHotkey = iGrabSettings.iSingleCaptureHotkey;
-    else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
-        captureHotkey = iGrabSettings.iSequantialCaptureHotkey;
-    else if (iGrabSettings.iCaptureMode == ECaptureModeVideoCapture)
-        captureHotkey = iGrabSettings.iVideoCaptureHotkey;
-    else
-        User::Panic(_L("Wrong mode"), 40);
-    
-    
-
-    // start capturing based on user selected key
-    switch (captureHotkey)
-        {
-        case EHotkeySendKey:
-            {
-            iCapturedKey    = iRootWin.CaptureKey(EStdKeyYes, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyYes, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            break;
-            }
-        case EHotkeyPowerKey:
-            {
-            iCapturedKey    = iRootWin.CaptureKey(EStdKeyDevice2, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyDevice2, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            break;
-            }
-        case EHotkeySideKey:
-            {
-            iCapturedKey    = iRootWin.CaptureKey(EStdKeyDevice6, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyDevice6, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            break;            
-            }
-        case EHotkeyCameraKey1:
-            {
-            iCapturedKey    = iRootWin.CaptureKey(EStdKeyDevice7, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyDevice7, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
-            break;            
-            }
-        default:
-            {
-            User::Panic(_L("Key not supported"), 100);
-            break;
-            }
-        }
-		
-    }
-
-// ---------------------------------------------------------------------------
-
-
-void SGEngine::CancelCapturing()
-    {
-	
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CancelCapturing start"));
-    // cancel all captures
-    iRootWin.CancelCaptureKey(iCapturedKey);
-    iRootWin.CancelCaptureKeyUpAndDowns(iCapturedKeyUnD);
-    
-    if (iHashKeyCapturingActivated)
-        {
-        iRootWin.CancelCaptureKey(iCapturedKeyHash);
-        iRootWin.CancelCaptureKeyUpAndDowns(iCapturedKeyHashUnD);
-        
-        iHashKeyCapturingActivated = EFalse;
-        }
-    
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CancelCapturing end"));
-	
-    }
-
-// ---------------------------------------------------------------------------
-
-bool SGEngine::TakeScreenShotAndSaveL()
-    {
-	
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- TakeSsAndSave start"));
-    if ( IsActive() )
-        {
-        SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- TakeSsAndSave already active, ignored"));
-        return false;
-        }
-    
-    // take a screen shot
-    CWsScreenDevice* screenDevice = new( ELeave ) CWsScreenDevice(CEikonEnv::Static()->WsSession() );
-    CleanupStack::PushL( screenDevice );
-	
-    User::LeaveIfError( screenDevice->Construct( CEikonEnv::Static()->WsSession().GetFocusScreen() ) );
-
-	
-    User::LeaveIfError( iPreviouslyCapturedBitmap->Create(screenDevice->SizeInPixels(), screenDevice->DisplayMode()) );
-    User::LeaveIfError( screenDevice->CopyScreenToBitmap(iPreviouslyCapturedBitmap) );
-    CleanupStack::PopAndDestroy(); // screenDevice
-
-
-    // get memory in use & image format of the screen capture
-    TDriveNumber memoryInUse(EDriveC);
-    TInt intMemInUse(0);
-    TInt imageFormat(0);
-    TFileName fileName;
-    
-    if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
-        {        
-//        memoryInUse = iGrabSettings.iSingleCaptureMemoryInUseMultiDrive;
-        intMemInUse = iGrabSettings.iSingleCaptureMemoryInUseMultiDrive;
-        
-        imageFormat = iGrabSettings.iSingleCaptureImageFormat;
-        fileName = iGrabSettings.iSingleCaptureFileName;
-        }
-    else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
-        {          
-//        memoryInUse = iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive;
-        intMemInUse = iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive;
-        
-        imageFormat = iGrabSettings.iSequantialCaptureImageFormat;
-        fileName = iGrabSettings.iSequantialCaptureFileName;
-        }
-    else
-        User::Panic(_L("Wrong mode"), 30);  
-
-
-    // init the path for saving the file
-	
-	iSaveFileName.Copy( PathInfo::PhoneMemoryRootPath() );
-	
-//    if (memoryInUse != EDriveC)//something different as PhoneMemory (memory card or mass memory)
-    if (intMemInUse != 0)//something different as PhoneMemory (memory card or mass memory)
-    	{
-		memoryInUse = EDriveY;	    
-		if (PathInfo::GetRootPath(iSaveFileName, memoryInUse) != KErrNone || !DriveOK(memoryInUse))
-			{
-			//we need to find first available memory card in EDriveE - EDriveY range
-			for (TInt i = EDriveY; i>=EDriveE; i--)
-				{
-				if ( DriveOK((TDriveNumber)(i)))
-					{
-					if (IsDriveMMC((TDriveNumber)(i)))
-						{
-						PathInfo::GetRootPath(iSaveFileName, (TDriveNumber)(i));
-						break;
-						}    
-					}
-				}
-			}
-    	}
-
-    iSaveFileName.Append( PathInfo::ImagesPath() );
-    iSaveFileName.Append( KScreenShotsSubDirectory );
-    
-    
-    // a quick check that filename is valid
-    if (fileName.Length() > 0 && fileName.Length() <= 255) 
-        iSaveFileName.Append( fileName );
-    else
-        iSaveFileName.Append( KDefaultImageFileName );
-
-    iSaveFileName.Append( _L(".") );
-
-
-    // reset the encoder
-    if (iImageEncoder)
-        {
-        delete iImageEncoder;
-        iImageEncoder = NULL;
-        }
-        
-    
-    switch (imageFormat)
-        {
-        case EImageFormatPNG:
-            {
-            // set filename
-            iSaveFileName.Append(_L("png"));
-            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
-
-            // init & convert
-            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypePNGUid);
-			
-            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
-            }
-            break;
-        
-        case EImageFormatJPGHQ:
-        case EImageFormatJPGLQ:
-            {
-            // reset frameimagedata
-            if (iFrameImageData)
-                {
-                delete iFrameImageData;
-                iFrameImageData = NULL;
-                }
-            
-            // set filename
-            iSaveFileName.Append(_L("jpg"));
-            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
-
-            // init 
-            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeJPGUid);
-
-            // JPEG properties
-            TJpegImageData* imageData = new(ELeave) TJpegImageData;
-            imageData->iSampleScheme = TJpegImageData::EColor444;
-            imageData->iQualityFactor = (imageFormat==EImageFormatJPGHQ) ? HIGH_QUALITY_JPEG : LOW_QUALITY_JPEG;
-            iFrameImageData = CFrameImageData::NewL();
-            User::LeaveIfError(iFrameImageData->AppendImageData(imageData));  //ownership of imageData is transferred
-
-            // convert
-            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap, iFrameImageData );
-            }
-            break;
-        
-        case EImageFormatBMP:
-            {
-            // set filename
-            iSaveFileName.Append(_L("bmp"));
-            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
-
-            // init & convert
-            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeBMPUid);
-            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
-            }
-            break;
-
-        case EImageFormatGIF:
-            {
-            // set filename
-            iSaveFileName.Append(_L("gif"));
-            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
-
-            // init & convert
-            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeGIFUid);
-            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
-            }
-            break;
-            
-        case EImageFormatMBM:
-            {
-            // set filename
-            iSaveFileName.Append(_L("mbm"));
-            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
-
-            // init & convert
-            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeMBMUid);
-            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
-            }
-            break;
-            
-        default:
-            {
-            User::Panic(_L("Invalid Img Type"), 20);
-            }
-        }
-
-    // set the state of the active object
-    iState = EEncodingImage;
-
-    // indicate an outstanding request
-    SetActive();
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- TakeSsAndSave end"));
-	return true;
-    }
-    
-// ---------------------------------------------------------------------------
-
-
-TBool SGEngine::DriveOK(TDriveNumber aNumber)
-    {
-	
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- Driveok start"));
-    TBool isOK(EFalse);
-
-    TVolumeInfo vInfo;
-
-    // check if we can access the drive
-    if (iFileSession.Volume(vInfo, aNumber) == KErrNone)
-        isOK = ETrue;
-
-    // returns ETrue if memory card working properly
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- DriveOK end"));
-    return isOK;
-	
-    }
-// ---------------------------------------------------------------------------
-
-
-TBool SGEngine::IsDriveMMC(TDriveNumber aDrive)
-    {
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- IsDriveMMC start"));
-    TBool isOK(EFalse);
-
-    TDriveInfo ii;   
-    if (iFileSession.Drive(ii, aDrive)==KErrNone) 
-        {      
-            if (ii.iType!=EMediaNotPresent &&
-                ii.iType!=EMediaUnknown &&           
-                ii.iType!=EMediaCdRom &&         
-                ii.iType!=EMediaRom) 
-                {           // memory card          
-                    isOK=ETrue;      
-                }   
-        }    
-                
-    
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- IsDriveMMC end"));
-    return isOK;
-    }
-
-
-void SGEngine::CapturingFinishedL(TInt aErr)
-    {
-	
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CapturingFinished start"));
-    // display a global query to show the results
-    
-    if (aErr == KErrNone)
-        {
-        switch (iGrabSettings.iCaptureMode)
-            {
-            case ECaptureModeSingleCapture:
-                {
-                iEngineWrapper->ShowImageCapturedNote();
-                }
-                break;
-            
-            case ECaptureModeSequantialCapture:
-                {
-                iEngineWrapper->ShowSequantialImagesCapturedNote(iNumberOfTakenShots);
-                }
-                break;            
-    
-            case ECaptureModeVideoCapture:
-                {
-                iEngineWrapper->ShowVideoCapturedNote();
-                }
-                break;             
-    
-            default:
-                User::Panic(_L("Inv.capt.mode"), 51);
-                break;
-            }            
-       
-        }
-    else
-        {
-        
-        // Get error message with CTextResolver
-        CTextResolver* textResolver = CTextResolver::NewLC();
-        iEngineWrapper->ShowErrorMessage(textResolver->ResolveErrorString(aErr));
-
-        CleanupStack::PopAndDestroy();  //textResolver    
-        
-        }
-
-    // capturing can now be restarted
-    iState = EIdle;
-    iCapturingInProgress = EFalse;
-    iStopCapturing = EFalse;
-    
-    // reset values
-    iNumberOfTakenShots = 0;
-    iCurrentFrameNumber = 0;
-    iVideoFrameArray->Reset();
-    
-    
-    iState = EQueryDelay;
-    iTimer.After(iStatus, 2000000);
-    SetActive(); 
-    
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- capturingfinished end"));
-	
-    }
-
-
-#if defined(HB_QT_S60_EVENT_FILTER)
-    TBool SGEngine::HandleCaptureCommandsL(const TWsEvent* aEvent)
-	{
-#else
-    TBool SGEngine::HandleCaptureCommandsL(const QSymbianEvent *event)
-	{
-    if (event->type() != QSymbianEvent::WindowServerEvent) {
-        return ETrue; //continueEventLoop
-    }
-    const TWsEvent *aEvent = event->windowServerEvent();
-#endif
-	
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- HandleCaptureCommand start"));
-	
-	
-    TBool continueEventLoop(ETrue);
-    
-    // get hotkey of the capture
-    TInt captureHotkey(0);
-    if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
-        captureHotkey = iGrabSettings.iSingleCaptureHotkey;
-    else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
-        captureHotkey = iGrabSettings.iSequantialCaptureHotkey;
-    else if (iGrabSettings.iCaptureMode == ECaptureModeVideoCapture)
-        captureHotkey = iGrabSettings.iVideoCaptureHotkey;
-    else
-        User::Panic(_L("Wrong mode"), 41);
-    
-    // ignore any errors
-    if (aEvent->Type()==EEventErrorMessage)
-        {
-        // error
-        }
-    
-            
-    // handle captured keys, we are interested here only of the keydown events
-    else
-        
-        if (
-              ( captureHotkey == EHotkeySendKey &&
-                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyYes )
-            ||
-              ( captureHotkey == EHotkeyPowerKey &&
-                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyDevice2 )
-            ||
-              ( captureHotkey == EHotkeySideKey &&
-                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyDevice6 )
-            ||
-              ( captureHotkey == EHotkeyCameraKey1 &&
-                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyDevice7 )
-            )
-        {
-        
-        // check if already capturing images in sequence
-        if ( iCapturingInProgress && !iStopCapturing && iNumberOfTakenShots!=0 && iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture )
-            {
-            // asking to stop capturing
-            iStopCapturing = ETrue; 
-            
-            // cancel the active object, this will cancel any timer delays and ICL stuff
-            Cancel();
-            
-            // set status
-            iState = ECancelCapturing; 
-            
-            // jump smoothly to RunL()
-            iTimer.After(iStatus, 50);
-            SetActive(); 
-
-            // do not continue the event loop in HandleWsEventL for these events
-            continueEventLoop = EFalse;
-            }
-
-        // check if already capturing video
-        else if ( iCapturingInProgress && !iStopCapturing && iGrabSettings.iCaptureMode == ECaptureModeVideoCapture )
-            {
-            // asking to stop capturing
-            iStopCapturing = ETrue;
-            
-            // cancel the active object, this will cancel any timer delays and ICL stuff
-            Cancel();
-
-            // set status
-            iState = ECancelVideoCapturing;
-            
-            // jump smoothly to RunL()
-            iTimer.After(iStatus, 50);
-            SetActive(); 
-
-            // do not continue the event loop in HandleWsEventL for these events
-            continueEventLoop = EFalse;
-            }        
-        else if (!iCapturingInProgress && (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture || iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture ))
-            {
-            
-            // take a screen shot and save it
-           if( TakeScreenShotAndSaveL())
-               {
-               // not capturing anything, so start doing that
-               iCapturingInProgress = ETrue;    
-               // do not continue the event loop in HandleWsEventL for these events
-               continueEventLoop = EFalse;
-               }
-            }
-        
-        else if (!iCapturingInProgress && iGrabSettings.iCaptureMode == ECaptureModeVideoCapture )
-            {
-            // not capturing anything, so start doing that
-            iCapturingInProgress = ETrue;
-            
-            // clean temporary files
-            TRAP_IGNORE( CleanTemporaryFilesL() );
-            
-            // get initial dimensions for the video
-            CWsScreenDevice* screenDevice = new(ELeave) CWsScreenDevice ( CEikonEnv::Static()->WsSession() );
-            CleanupStack::PushL(screenDevice);
-			
-            User::LeaveIfError( screenDevice->Construct( CEikonEnv::Static()->WsSession().GetFocusScreen() ) );
-			
-            iVideoDimensions = screenDevice->SizeInPixels();
-            iPreviousFrameScreenDimension = screenDevice->SizeInPixels();
-            CleanupStack::PopAndDestroy(); // screenDevice
-
-            // capture the first frame
-            CaptureFrameForVideoL();              
-
-            // do not continue the event loop in HandleWsEventL for these events
-            continueEventLoop = EFalse;
-            }
-
-        }
-
-    // catch other event types as well so that we can ignore them
-    else if (
-              ( captureHotkey == EHotkeySendKey &&
-                aEvent->Key()->iScanCode==EStdKeyYes )
-            ||
-              ( captureHotkey == EHotkeyPowerKey &&
-                aEvent->Key()->iScanCode==EStdKeyDevice2 )
-            ||
-              ( captureHotkey == EHotkeySideKey &&
-                aEvent->Key()->iScanCode==EStdKeyDevice6 )
-            ||
-              ( captureHotkey == EHotkeyCameraKey1 &&
-                aEvent->Key()->iScanCode==EStdKeyDevice7 )
-           )
-        {
-        // do not continue the event loop in HandleWsEventL for these events
-        continueEventLoop = EFalse;
-        }
-
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- HandleCapturcommand end"));
-
-    
-    return continueEventLoop;
-    
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::CleanTemporaryFilesL()
-    {
-	
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CleanTempFiles start"));
-    
-    // delete temporary files from C and D drives    
-    CFileMan* fileMan = CFileMan::NewL(iFileSession);
-
-    TFileName delFilesPath;
-        
-    for (TInt i=0; i<1; i++)
-        {
-        delFilesPath.Copy(KNullDesC);
-        delFilesPath.Append('C'+i);
-        delFilesPath.Append(_L(":"));
-        delFilesPath.Append(KSGTemporaryDirectory);
-        delFilesPath.Append(_L("*.$$$"));
-        
-        fileMan->Delete(delFilesPath);
-        }
-
-    delete fileMan;    
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CleanTempfile end"));
-	
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::ActivateModelL()
-    {
-    // clean temporary files
-    TRAP_IGNORE( CleanTemporaryFilesL() );
-            
-    // load settings
-    TRAP_IGNORE( LoadSettingsL() );
-
-    // start capturing
-    ActivateCaptureKeysL();
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::DeActivateModelL()
-    {
-	
-    CancelCapturing();
-
-    // for a faster exit, send the application to background
-    TApaTask selfTask(CEikonEnv::Static()->WsSession());
-    selfTask.SetWgId(iRootWin.Identifier());
-    selfTask.SendToBackground();
-	
-	
-    }
-    
-// ---------------------------------------------------------------------------
-
-
-void SGEngine::CaptureFrameForVideoL()
-    {
-    
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CaptureFrameforvide start"));
-    // record time
-    TTime timeNow;
-    timeNow.HomeTime();
-    
-    // take a screen shot   
-    CFbsBitmap* currentCapturedBitmap = new(ELeave) CFbsBitmap;
-    CleanupStack::PushL(currentCapturedBitmap);
-
-    CWsScreenDevice* screenDevice = new(ELeave) CWsScreenDevice( CEikonEnv::Static()->WsSession() );
-    CleanupStack::PushL( screenDevice );
-    User::LeaveIfError( screenDevice->Construct( CEikonEnv::Static()->WsSession().GetFocusScreen() ) );
-    
-    TSize currentScreenSize = screenDevice->SizeInPixels();
-
-    User::LeaveIfError( currentCapturedBitmap->Create(currentScreenSize, EColor256) );
-    User::LeaveIfError( screenDevice->CopyScreenToBitmap(currentCapturedBitmap) );
-    CleanupStack::PopAndDestroy(); // screenDevice
-
-    // grow video's dimensions if the size has changed
-    if (currentScreenSize.iWidth > iVideoDimensions.iWidth)
-        {
-        iVideoDimensions.iWidth = currentScreenSize.iWidth;
-        }
-    if (currentScreenSize.iHeight > iVideoDimensions.iHeight)
-        {
-        iVideoDimensions.iHeight = currentScreenSize.iHeight;
-        }
-
-    TInt64 currentDelay(0);
- 
-
-    // create a new frame
-    TVideoFrame frame;
-    frame.iDelay = 500; // use default delay 5.00 secs
-    
-    // get info of the RAM drive
-    TDriveNumber ramDrive = EDriveD;
-    TVolumeInfo ramDriveInfo;
-    iFileSession.Volume(ramDriveInfo, ramDrive);
-    
-    // init the directory for saving the file, preferably use ram drive if there is enough disk space, otherwise use always C drive
-    TFileName tempDirectory;
-    TFileName sessionPath;
-    
-    if (ramDriveInfo.iFree > (iVideoDimensions.iWidth*iVideoDimensions.iHeight+50000))
-        sessionPath.Copy( _L("D:") );
-    else
-        sessionPath.Copy( _L("C:") );
-    
-    sessionPath.Append(KSGTemporaryDirectory);
-    tempDirectory.Copy(KSGTemporaryDirectory);
-    
-    iFileSession.MkDirAll(sessionPath);
-    iFileSession.SetSessionPath(sessionPath);
-
-    // create a temp file, path to the bitmap is saved automatically to frame.iFileStorePath
-    RFile file;
-    User::LeaveIfError( file.Temp(iFileSession, tempDirectory, frame.iFileStorePath, EFileWrite) );
-    RFileWriteStream writeStream(file);
-    
-    TBool ignoreFrame(EFalse);
-    
-    // check if is this the first frame
-    if (iCurrentFrameNumber == 0)
-        {
-        // first frame is always the full one
-        frame.iWidth = currentScreenSize.iWidth;    
-        frame.iHeight = currentScreenSize.iHeight;  
-        frame.iXPos = 0;
-        frame.iYPos = 0;
-        frame.iEnableTransparency = EFalse;
-        frame.iFillsWholeScreen = ETrue;
-        
-        currentCapturedBitmap->ExternalizeL(writeStream);  
-
-        }
-    
-    else
-        {
-        // next frame is a difference between the previous one
-        currentDelay = timeNow.MicroSecondsFrom(iPreviousFrameTaken).Int64();
-        
-        // get reference to previos frame
-        TVideoFrame& prevFrame = iVideoFrameArray->At(iVideoFrameArray->Count()-1);
-        
-        
-        // check if video dimensions have changed
-        if (currentScreenSize.iWidth != iPreviousFrameScreenDimension.iWidth
-            || currentScreenSize.iHeight != iPreviousFrameScreenDimension.iHeight)
-            {
-            // dimensions have changed -> save a full bitmap
-            frame.iWidth = currentScreenSize.iWidth;    
-            frame.iHeight = currentScreenSize.iHeight;  
-            frame.iXPos = 0;
-            frame.iYPos = 0;
-            frame.iEnableTransparency = EFalse;
-            frame.iFillsWholeScreen = ETrue;
-            
-            currentCapturedBitmap->ExternalizeL(writeStream);            
-
-            // update the previous frame to contain the new delay value
-            prevFrame.iDelay = TUint( (double) currentDelay / 10000 );
-            }
-
-        else
-            {
-            // compare the bitmaps
-            HBufC8* curImgScanLineBuf = HBufC8::NewLC(currentScreenSize.iWidth*3);
-            TPtr8 curImgScanLinePtr = curImgScanLineBuf->Des();
-            HBufC8* prevImgScanLineBuf = HBufC8::NewLC(currentScreenSize.iWidth*3);
-            TPtr8 prevImgScanLinePtr = prevImgScanLineBuf->Des();
-            
-            TPoint pt(0,0);
-            TBool differenceFound(EFalse);
-            TPoint leftTopDifferencePoint(0,0);
-            TPoint rightBottomDifferencePoint(currentScreenSize.iWidth,currentScreenSize.iHeight);
-            
-            // scan the image from top to bottom
-            for (TInt i=0; i<currentScreenSize.iHeight; i++)
-                {
-                pt.iY = i;
-                
-                currentCapturedBitmap->GetScanLine(curImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
-                iPreviouslyCapturedBitmap->GetScanLine(prevImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
-                
-                if (curImgScanLinePtr != prevImgScanLinePtr)
-                    {
-                    differenceFound = ETrue;
-                    
-                    // get the y-coordinate
-                    leftTopDifferencePoint.iY = i;
-
-                    break;    
-                    }
-                }
-                
-            if (differenceFound)
-                {
-                // now we know that there is some difference between those two captured frames,
-                // get the bottom value by scaning from bottom to top
-                for (TInt i=currentScreenSize.iHeight-1; i>=0; i--)
-                    {
-                    pt.iY = i;
-                    
-                    currentCapturedBitmap->GetScanLine(curImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
-                    iPreviouslyCapturedBitmap->GetScanLine(prevImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
-                    
-                    if (curImgScanLinePtr != prevImgScanLinePtr)
-                        {
-                        // get the y-coordinate
-                        rightBottomDifferencePoint.iY = i+1;
-
-                        break;    
-                        }
-                    }
-                    
-                // check that the height of the cropped image will be at least 1
-                if (rightBottomDifferencePoint.iY <= leftTopDifferencePoint.iY)
-                    rightBottomDifferencePoint.iY = leftTopDifferencePoint.iY+1;  
-                
-                      
-                // get also the x-coordinates by scanning vertical scan lines
-                HBufC8* curImgVerticalScanLineBuf = HBufC8::NewLC(currentScreenSize.iHeight*3);
-                TPtr8 curImgVerticalScanLinePtr = curImgScanLineBuf->Des();
-                HBufC8* prevImgVerticalScanLineBuf = HBufC8::NewLC(currentScreenSize.iHeight*3);
-                TPtr8 prevImgVerticalScanLinePtr = prevImgScanLineBuf->Des();
-                        
-                // first scan by from left to right
-                for (TInt i=0; i<currentScreenSize.iWidth; i++)
-                    {
-                    currentCapturedBitmap->GetVerticalScanLine(curImgVerticalScanLinePtr, i, EColor256);
-                    iPreviouslyCapturedBitmap->GetVerticalScanLine(prevImgVerticalScanLinePtr, i, EColor256);
-                    
-                    if (curImgVerticalScanLinePtr != prevImgVerticalScanLinePtr)
-                        {
-                        leftTopDifferencePoint.iX = i;
-                        break;
-                        }
-                    }
-
-                // finally scan from right to left
-                for (TInt i=currentScreenSize.iWidth-1; i>=0; i--)
-                    {
-                    currentCapturedBitmap->GetVerticalScanLine(curImgVerticalScanLinePtr, i, EColor256);
-                    iPreviouslyCapturedBitmap->GetVerticalScanLine(prevImgVerticalScanLinePtr, i, EColor256);
-                    
-                    if (curImgVerticalScanLinePtr != prevImgVerticalScanLinePtr)
-                        {
-                        rightBottomDifferencePoint.iX = i+1;
-                        break;
-                        }
-                    }
-                    
-                CleanupStack::PopAndDestroy(2); //curImgVerticalScanLineBuf,prevImgVerticalScanLineBuf               
-
-                
-                // check that the width of the cropped image will be at least 1
-                if (rightBottomDifferencePoint.iX <= leftTopDifferencePoint.iX)
-                    rightBottomDifferencePoint.iX = leftTopDifferencePoint.iX+1;
-                   
-                
-                // record dimensions and position of the image           
-                frame.iWidth = rightBottomDifferencePoint.iX - leftTopDifferencePoint.iX;    
-                frame.iHeight = rightBottomDifferencePoint.iY - leftTopDifferencePoint.iY;  
-                frame.iXPos = leftTopDifferencePoint.iX;
-                frame.iYPos = leftTopDifferencePoint.iY;
-                frame.iEnableTransparency = ETrue;
-                frame.iFillsWholeScreen = EFalse;
-            
-            
-                // take a copy of the current frame
-                CFbsBitmap* workingBitmap = new(ELeave) CFbsBitmap;
-                CleanupStack::PushL(workingBitmap);
-                User::LeaveIfError( workingBitmap->Create(currentScreenSize, EColor256) );
-
-                HBufC8* tempScanLineBuf = HBufC8::NewLC(currentScreenSize.iWidth*3);
-                TPtr8 tempScanLinePtr = tempScanLineBuf->Des();
-                
-                for (TInt i=0; i<currentScreenSize.iHeight; i++)
-                    {
-                    pt.iY = i;
-                    currentCapturedBitmap->GetScanLine(tempScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
-                    workingBitmap->SetScanLine(tempScanLinePtr, i);
-                    }
-                    
-                CleanupStack::PopAndDestroy(); //tempScanLineBuf
-                
-                
-                // mark the non-changed areas with transparency color
-                TUint8* curPtr = NULL;
-                TUint8* prevPtr = NULL;
-                for (TInt i=frame.iYPos; i<frame.iYPos+frame.iHeight; i++)
-                    {
-                    pt.iY = i;
-                    
-                    workingBitmap->GetScanLine(curImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
-                    iPreviouslyCapturedBitmap->GetScanLine(prevImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
-                    
-                    // check single pixels in the scanline
-                    for (TInt j=frame.iXPos; j<frame.iXPos+frame.iWidth; j++)
-                        {
-                        curPtr = &curImgScanLinePtr[j];
-                        prevPtr = &prevImgScanLinePtr[j];
-                        
-                        // check that our transparency index isn't already in use
-                        if (curPtr[0] == TRANSPARENCY_INDEX)
-                            curPtr[0] = TRANSPARENCY_ALTERNATIVE_INDEX;
-                        
-                        // replace with transparency index if there is no change compared to the previous frame
-                        if (curPtr[0] == prevPtr[0])
-                            curPtr[0] = TRANSPARENCY_INDEX;
-                        }
-                        
-                    // set new scanline    
-                    workingBitmap->SetScanLine(curImgScanLinePtr, i);
-                    }
-
-
-                // externalize the bitmap
-                TRect changedRect(leftTopDifferencePoint, rightBottomDifferencePoint);
-                workingBitmap->ExternalizeRectangleL(writeStream, changedRect);
-                
-                CleanupStack::PopAndDestroy(); //workingBitmap
- 
-                // update the previous frame to contain the new delay value
-                prevFrame.iDelay = TUint( (double) currentDelay / 10000 );
-                }
-
-            else
-                {
-                // frames are identical, we can just ignore this one
-                ignoreFrame = ETrue;     
-                }
-            
-            CleanupStack::PopAndDestroy(2); //curImgScanLineBuf,prevImgScanLineBuf
-
-            } // if (videoDimensionsHaveChanged)
-
-        } //if (iCurrentFrameNumber == 0)
-            
-    // close the stream
-    writeStream.CommitL();
-    writeStream.Close();
-    file.Close();
-    
-
-    if (ignoreFrame)
-        {
-        // delete the temp file since we don't need that
-            iFileSession.Delete(frame.iFileStorePath);
-        }
-    else
-        {
-        // remember for the next frame when this frame was taken
-        iPreviousFrameTaken = timeNow;
-
-        // take a copy of currentCapturedBitmap to iPreviouslyCapturedBitmap
-        User::LeaveIfError( iPreviouslyCapturedBitmap->Create(iVideoDimensions, EColor256) );
-
-        TPoint pt(0,0);
-        HBufC8* tempScanLineBuf = HBufC8::NewMaxLC(iVideoDimensions.iWidth);
-        TPtr8 tempScanLinePtr = tempScanLineBuf->Des();
-        
-        for (TInt i=0; i<iVideoDimensions.iHeight; i++)
-            {
-            pt.iY = i;
-            currentCapturedBitmap->GetScanLine(tempScanLinePtr, pt, iVideoDimensions.iWidth, EColor256);
-            iPreviouslyCapturedBitmap->SetScanLine(tempScanLinePtr, i);
-            }
-            
-        CleanupStack::PopAndDestroy(); //tempScanLineBuf
-        
-        // append frame information to the array
-        iVideoFrameArray->AppendL(frame);
-        
-        // remember screen size
-        iPreviousFrameScreenDimension = currentScreenSize;
-        }    
-
-    
-    CleanupStack::PopAndDestroy(); //currentCapturedBitmap
-    
-
-    // set the state of the active object
-    iState = ENextVideoFrame;
-    
-    // check time spent on the work above (probably this is not so important)
-    TTime timeNow2;
-    timeNow2.HomeTime();
-    TInt64 handlingDelay = timeNow2.MicroSecondsFrom(timeNow).Int64();
-    
-    // calculate delay till next frame
-    TUint idealDelay = VIDEO_CAPTURE_DELAY*1000;
-    TInt usedDelay; 
-    if (currentDelay > idealDelay)
-        usedDelay = idealDelay - (currentDelay - idealDelay) - handlingDelay;
-    else
-        usedDelay = idealDelay - handlingDelay;
-    
-    // check that the delay is atleast minimum delay anyway
-    if (usedDelay < VIDEO_CAPTURE_MINIMUM_DELAY*1000)
-        usedDelay = VIDEO_CAPTURE_MINIMUM_DELAY*1000;
-    
-    iTimer.After(iStatus, usedDelay);
-
-    // indicate an outstanding request
-    SetActive();
-    
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- Captureframeforvideo end"));
-	
-    }
-
-// ---------------------------------------------------------------------------
-
-void SGEngine::SaveVideoL(TInt aErr)
-    {
-
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- SaveVideo start"));
-    
-    if (aErr)
-        CapturingFinishedL(aErr);   
-   
-    else if (iGrabSettings.iVideoCaptureVideoFormat == EVideoFormatAnimatedGIF)
-        {
-        TInt err(KErrNone);
-
-        
-			iSaveFileName.Copy( PathInfo::PhoneMemoryRootPath() );
-            if (iGrabSettings.iVideoCaptureMemoryInUseMultiDrive != 0)//something different as PhoneMemory (memory card or mass memory)
-            	{
-        		if (PathInfo::GetRootPath(iSaveFileName,EDriveY) != KErrNone || !DriveOK(EDriveY))
-        			{
-        			//we need to find first available memory card in EDriveE - EDriveY range
-        			for (TInt i = EDriveY; i>=EDriveE; i--)
-        				{
-        				if ( DriveOK((TDriveNumber)(i)))
-        					{
-        					if (IsDriveMMC((TDriveNumber)(i)))
-        						{
-        						PathInfo::GetRootPath(iSaveFileName, (TDriveNumber)(i));
-        						break;
-        						}    
-        					}
-        				}
-        			}
-            	}
-
-        
-        iSaveFileName.Append( PathInfo::ImagesPath() );     // animated gif is actually an image, not a video
-        iSaveFileName.Append( KScreenShotsSubDirectory );
-        
-        // a quick check that filename is valid
-        if (iGrabSettings.iVideoCaptureFileName.Length() > 0 && iGrabSettings.iVideoCaptureFileName.Length() <= 255) 
-            iSaveFileName.Append( iGrabSettings.iVideoCaptureFileName );
-        else
-            iSaveFileName.Append( KDefaultVideoFileName );
-
-        iSaveFileName.Append( _L(".gif") );
-
-        CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
-
-        // create and save the gif animation
-        err = CGifAnimator::CreateGifAnimation(iSaveFileName, iVideoDimensions, iVideoFrameArray, *iEngineWrapper);
-        
-        // remove the saved file in case of errors since it's likely corrupted
-        if (err != KErrNone)
-            iFileSession.Delete(iSaveFileName);
-        
-        CapturingFinishedL(err);   
-        }
-        
-    else
-        CapturingFinishedL(KErrNotSupported);
-    
-    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- SaveVideo end"));
-    }
-// ---------------------------------------------------------------------------
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/creator.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,226 @@
+TEMPLATE = app
+TARGET = Creator
+
+DEPENDPATH += .
+DEPENDPATH += src engine/src
+INCLUDEPATH += inc engine/inc
+
+load(hb.prf)
+symbian:CONFIG -= symbian_i18n
+
+HEADERS += \
+	inc/mainview.h \
+	inc/notifications.h
+
+SOURCES += main.cpp \
+	src/mainview.cpp \
+	src/notifications.cpp
+
+symbian: {
+        INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+	HEADERS += engine/inc/creator.hrh \
+			engine/inc/creator_calendar.h \
+			engine/inc/creator_calendarbase.h \
+			engine/inc/creator_calendarelement.h \
+			engine/inc/creator_cmdscriptrun.h \
+			engine/inc/creator_contactelement.h \
+			engine/inc/creator_contactsetcache.h \
+			engine/inc/creator_factory.h \
+			engine/inc/creator_file.h \
+			engine/inc/creator_fileelement.h \
+			engine/inc/creator_landmark.h \
+			engine/inc/creator_landmarkelement.h \
+			engine/inc/creator_log.h \
+			engine/inc/creator_logelement.h \
+			engine/inc/creator_mailbox.h \
+			engine/inc/creator_mailboxelement.h \
+			engine/inc/creator_message.h \
+			engine/inc/creator_messageelement.h \
+			engine/inc/creator_modulebase.h \
+			engine/inc/creator_note.h \
+			engine/inc/creator_notepadwrapper.h \
+			engine/inc/creator_phonebook.h \
+			engine/inc/creator_phonebookwrapper.h \
+			engine/inc/creator_phonebookapi.h \
+			engine/inc/creator_phonebookbase.h \
+			engine/inc/creator_randomdatafield.h \
+			engine/inc/creator_randomdataparser.h \
+			engine/inc/creator_scriptelement.h \
+			engine/inc/creator_scriptelementfactory.h \
+			engine/inc/creator_scriptentry.h \
+			engine/inc/creator_scriptparser.h \
+			engine/inc/creator_std.h \
+			engine/inc/creator_traces.h \
+			engine/inc/creator_wepsecuritysettings.h \
+			engine/inc/randomdata.txt \
+			inc/engine.h \
+			inc/enginewrapper.h
+
+	SOURCES += engine/src/creator_calendar.cpp \
+			engine/src/creator_calendarelement.cpp \
+			engine/src/creator_cmdscriptrun.cpp \
+			engine/src/creator_contactelement.cpp \
+			engine/src/creator_contactsetcache.cpp \
+			engine/src/creator_factory.cpp \
+			engine/src/creator_file.cpp \
+			engine/src/creator_fileelement.cpp \
+			engine/src/creator_landmark.cpp \
+			engine/src/creator_landmarkelement.cpp \
+			engine/src/creator_log.cpp \
+			engine/src/creator_logelement.cpp \
+			engine/src/creator_mailbox.cpp \
+			engine/src/creator_mailboxelement.cpp \
+			engine/src/creator_message.cpp \
+			engine/src/creator_messageelement.cpp \
+			engine/src/creator_note.cpp \
+			engine/src/creator_notepadwrapper.cpp \
+			engine/src/creator_phonebook.cpp \
+			engine/src/creator_phonebookwrapper.cpp \
+			engine/src/creator_phonebookapi.cpp \
+			engine/src/creator_phonebookbase.cpp \
+			engine/src/creator_randomdataparser.cpp \
+			engine/src/creator_scriptelement.cpp \
+			engine/src/creator_scriptelementfactory.cpp \
+			engine/src/creator_scriptentry.cpp \
+			engine/src/creator_scriptparser.cpp \
+			src/engine.cpp \
+			src/enginewrapper.cpp
+
+	LIBS += -lestor \
+			-lws32 \
+			-lPlatformEnv \
+			-limageconversion \
+			-leikcore \
+			-leuser \
+			-lapparc \
+			-lcone \ 
+			-lcntmodel \
+			-lmsgs \
+			-llogwrap \
+			-llogcli \
+			-lefsrv \
+			-lgsmu \
+			-limcm \
+			-lbafl \ 
+			-leikcoctl \ 
+			-leikctl \
+			-lcommdb \
+			-letext \ 
+			-lcommonengine \ 
+			-lcommonui \ 
+			-lplatformenv \ 
+			-lapgrfx \
+			-lapmime \
+			-lobexmtmutil \
+			-lsmcm \
+			-laknskins \
+			-laknskinsrv \ 
+			-lflogger \
+			-letel \
+			-letelmm \
+			-lxmlframework \
+			-lcharconv \ 
+			-lsenutils \
+			-lcalinterimapi \
+			-leposlandmarks \
+			-llbs \
+			-lecom \
+			-lcaf \
+			-lcafutils \ 
+			-ldrmrights \
+			-ledbms \
+			-lfbscli \
+			-lbitmaptransforms \
+			-lcmmanager \
+			-lcmmanagerdatabase \
+			-lnoteseditor \
+			-lxqservice \
+		    -lQtContacts \
+			-lagendainterface 
+
+	creatorDataBlock = \
+			"SOURCEPATH ." \
+			"START RESOURCE data/datacreator.rss" \
+			"HEADER" \
+			"TARGETPATH /resource/apps" \
+			"END"
+
+	MMP_RULES += creatorDataBlock
+	MMP_RULES -= PAGED
+  MMP_RULES *= UNPAGEDDATA
+  MMP_RULES += SMPSAFE
+
+    BLD_INF_RULES.prj_exports += "./rom/creator.iby CORE_IBY_EXPORT_PATH(tools,creator.iby)
+	BLD_INF_RULES.prj_exports += \
+				"./files/backup_registration.xml    Z:/private/20011383/backup_registration.xml" \
+				"./files/3GPP-70kB.dat              Z:/private/20011383/3GPP-70kB.3gpp" \
+				"./files/AAC-100kB.dat              Z:/private/20011383/AAC-100kB.aac" \
+				"./files/AMR-20kB.dat               Z:/private/20011383/AMR-20kB.amr" \
+				"./files/BMP-25kB.dat               Z:/private/20011383/BMP-25kB.bmp" \
+				"./files/Deck-1kB.dat               Z:/private/20011383/Deck-1kB.saveddeck" \
+				"./files/DOC-20kB.dat               Z:/private/20011383/DOC-20kB.doc" \
+				"./files/GIF-2kB.dat                Z:/private/20011383/GIF-2kB.gif" \
+				"./files/HTML-20kB.dat              Z:/private/20011383/HTML-20kB.html" \
+				"./files/JAD-1kB.dat                Z:/private/20011383/JAD-1kB.jad" \
+				"./files/JAR-10kB.dat               Z:/private/20011383/JAR-10kB.jar" \
+				"./files/JP2-65kB.dat               Z:/private/20011383/JP2-65kB.jp2" \
+				"./files/JPEG-200kB.dat             Z:/private/20011383/JPEG-200kB.jpg" \
+				"./files/JPEG-25kB.dat              Z:/private/20011383/JPEG-25kB.jpg" \
+				"./files/JPEG-500kB.dat             Z:/private/20011383/JPEG-500kB.jpg" \
+				"./files/MIDI-10kB.dat              Z:/private/20011383/MIDI-10kB.mid" \
+				"./files/MP3-250kB.dat              Z:/private/20011383/MP3-250kB.mp3" \
+				"./files/MP4-200kB.dat              Z:/private/20011383/MP4-200kB.mp4" \
+				"./files/MXMF-40kB.dat              Z:/private/20011383/MXMF-40kB.mxmf" \
+				"./files/PNG-15kB.dat               Z:/private/20011383/PNG-15kB.png" \
+				"./files/PPT-40kB.dat               Z:/private/20011383/PPT-40kB.ppt" \
+				"./files/RAM-1kB.dat                Z:/private/20011383/RAM-1kB.ram" \
+				"./files/RM-95kB.dat                Z:/private/20011383/RM-95kB.rm" \
+				"./files/RNG-1kB.dat                Z:/private/20011383/RNG-1kB.rng" \
+				"./files/SVG-15kB.dat               Z:/private/20011383/SVG-15kB.svg" \
+				"./files/SWF-15kB.dat               Z:/private/20011383/SWF-15kB.swf" \
+				"./files/TIF-25kB.dat               Z:/private/20011383/TIF-25kB.tif" \
+				"./files/TXT-10kB.dat               Z:/private/20011383/TXT-10kB.txt" \
+				"./files/TXT-70kB.dat               Z:/private/20011383/TXT-70kB.txt" \
+				"./files/VCF-1kB.dat                Z:/private/20011383/VCF-1kB.vcf" \
+				"./files/VCS-1kB.dat                Z:/private/20011383/VCS-1kB.vcs" \
+				"./files/WAV-20kB.dat               Z:/private/20011383/WAV-20kB.wav" \
+				"./files/XLS-15kB.dat               Z:/private/20011383/XLS-15kB.xls" \
+				"./files/SISX-10kB.dat              Z:/private/20011383/SISX-10kB.sisx" \
+				"./files/WMA-50kB.dat               Z:/private/20011383/WMA-50kB.wma" \
+				"./files/WMV-200kB.dat              Z:/private/20011383/WMV-200kB.wmv" \
+				"./scripts/creator.xsd                   +/tools/s60rndtools/creator/creator.xsd" \
+				"./scripts/browserEx.creatorxml          +/tools/s60rndtools/creator/browserEx.creatorxml" \
+				"./scripts/calendarEx.creatorxml         +/tools/s60rndtools/creator/calendarEx.creatorxml" \
+				"./scripts/connectionmethodEx.creatorxml +/tools/s60rndtools/creator/connectionmethodEx.creatorxml" \
+				"./scripts/contactEx.creatorxml          +/tools/s60rndtools/creator/contactEx.creatorxml" \
+				"./scripts/filesEx.creatorxml            +/tools/s60rndtools/creator/filesEx.creatorxml" \
+				"./scripts/landmarkEx.creatorxml         +/tools/s60rndtools/creator/landmarkEx.creatorxml" \
+				"./scripts/logEx.creatorxml              +/tools/s60rndtools/creator/logEx.creatorxml" \
+				"./scripts/mailboxEx.creatorxml          +/tools/s60rndtools/creator/mailboxEx.creatorxml" \
+				"./scripts/messagesEx.creatorxml         +/tools/s60rndtools/creator/messagesEx.creatorxml" \
+				"./scripts/notepadEx.creatorxml          +/tools/s60rndtools/creator/notepadEx.creatorxml" 
+    
+    creator_buildstubsis_extension = \
+        "$${LITERAL_HASH}ifdef MARM" \
+        "    START EXTENSION app-services/buildstubsis" \
+        "    OPTION SRCDIR sis" \
+        "    OPTION SISNAME creator_stub" \
+        "    END" \
+        "$${LITERAL_HASH}endif" 
+        
+    BLD_INF_RULES.prj_extensions += creator_buildstubsis_extension
+    
+	RSS_RULES += "group_name = \"RnD Tools\"";
+	TARGET.CAPABILITY = CAP_APPLICATION AllFiles
+
+	TARGET.UID2 = 0x100039CE
+	TARGET.UID3 = 0x20011383
+	TARGET.SID = 0x20011383
+	TARGET.VID = 0x101FB657 // Nokia
+	TARGET.EPOCHEAPSIZE = 0x20000 0x1000000  // Min 128Kb, Max 16Mb
+
+	ICON = icons/Creator_application_icon_svgt.svg 
+
+} else {
+	error("Only Symbian supported!")
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/data/datacreator.rss	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,665 @@
+NAME ORBT
+
+#include <appinfo.rh>
+#include <eikon.rh>
+#include <eikon.rsg>
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE ARRAY r_data_firstnames
+    {
+    items=
+        {
+        LBUF { txt="John"; },
+        LBUF { txt="Francis"; },
+        LBUF { txt="Andrew"; },
+        LBUF { txt="Lawrence"; },
+        LBUF { txt="Gregory"; },
+        LBUF { txt="Fulke"; },
+        LBUF { txt="Thomas"; },
+        LBUF { txt="Nicholas"; },
+        LBUF { txt="Hakle"; },
+        LBUF { txt="Roger"; },
+        LBUF { txt="Nathaniel"; },
+        LBUF { txt="Luke"; },
+        LBUF { txt="William"; },
+        LBUF { txt="Ralph"; },
+        LBUF { txt="Leonar"; },
+        LBUF { txt="Daniel"; },
+        LBUF { txt="Aban"; },
+        LBUF { txt="Mathias"; },
+        LBUF { txt="Robert"; },
+        LBUF { txt="Christopher"; },
+        LBUF { txt="Martin"; },
+        LBUF { txt="Michael"; },
+        LBUF { txt="Barnaby"; },
+        LBUF { txt="Tobias"; },
+        LBUF { txt="Richard"; },
+        LBUF { txt="Anthony"; },
+        LBUF { txt="Simon"; },
+        LBUF { txt="Samuel"; },
+        LBUF { txt="Geoffrey"; },
+        LBUF { txt="Isaac"; },
+        LBUF { txt="Henry"; },
+        LBUF { txt="Matthew"; },
+        LBUF { txt="Peter"; },
+        LBUF { txt="Allen"; },
+        LBUF { txt="Reynold"; },
+        LBUF { txt="Jerome"; },
+        LBUF { txt="Elizabeth"; },
+        LBUF { txt="Catherine"; },
+        LBUF { txt="Frances"; },
+        LBUF { txt="Cecily"; },
+        LBUF { txt="Millicent"; },
+        LBUF { txt="Audrey"; },
+        LBUF { txt="Joan"; },
+        LBUF { txt="Elinor"; },
+        LBUF { txt="Joyce"; },
+        LBUF { txt="Frideswide"; },
+        LBUF { txt="Rose"; },
+        LBUF { txt="Helen"; },
+        LBUF { txt="Margaret"; },
+        LBUF { txt="Isabel"; },
+        LBUF { txt="Bridget"; },
+        LBUF { txt="Grace"; },
+        LBUF { txt="Thomasin"; },
+        LBUF { txt="Janet"; },
+        LBUF { txt="Agnes"; },
+        LBUF { txt="Dorothy"; },
+        LBUF { txt="Christian"; },
+        LBUF { txt="Amy"; },
+        LBUF { txt="Fortune"; },
+        LBUF { txt="Sybil"; },
+        LBUF { txt="Alice"; },
+        LBUF { txt="Margery"; },
+        LBUF { txt="Edith"; },
+        LBUF { txt="Barbara"; },
+        LBUF { txt="Gillian"; },
+        LBUF { txt="Ursula"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_surnames
+    {
+    items=
+        {
+        LBUF { txt="Lux"; },
+        LBUF { txt="Mandot"; },
+        LBUF { txt="Mansfield"; },
+        LBUF { txt="Mayberry"; },
+        LBUF { txt="McCarrel"; },
+        LBUF { txt="McDaniel"; },
+        LBUF { txt="Mefford"; },
+        LBUF { txt="Metcalf"; },
+        LBUF { txt="Metchell"; },
+        LBUF { txt="Moller"; },
+        LBUF { txt="Margan"; },
+        LBUF { txt="Keaney"; },
+        LBUF { txt="Kenyon"; },
+        LBUF { txt="Kesler"; },
+        LBUF { txt="Kinman"; },
+        LBUF { txt="Kreinert"; },
+        LBUF { txt="Kummerlin"; },
+        LBUF { txt="Lamgley"; },
+        LBUF { txt="Leas"; },
+        LBUF { txt="Leighton"; },
+        LBUF { txt="Lillie"; },
+        LBUF { txt="Hilms"; },
+        LBUF { txt="Holt"; },
+        LBUF { txt="Hosier"; },
+        LBUF { txt="Howard"; },
+        LBUF { txt="Hypes"; },
+        LBUF { txt="Jacmor"; },
+        LBUF { txt="Behnson"; },
+        LBUF { txt="Kammer"; },
+        LBUF { txt="Patts"; },
+        LBUF { txt="West"; },
+        LBUF { txt="Wilbar"; },
+        LBUF { txt="Witsan"; },
+        LBUF { txt="Gillams"; },
+        LBUF { txt="Good"; },
+        LBUF { txt="Wreght"; },
+        LBUF { txt="Worthley"; },
+        LBUF { txt="Adams"; },
+        LBUF { txt="Allen"; },
+        LBUF { txt="Ansley"; },
+        LBUF { txt="Ayries"; },
+        LBUF { txt="Bartlett"; },
+        LBUF { txt="Barton"; },
+        LBUF { txt="Payne"; },
+        LBUF { txt="Pintard"; },
+        LBUF { txt="Prence"; },
+        LBUF { txt="Richards"; },
+        LBUF { txt="Dillman"; },
+        LBUF { txt="Dory"; },
+        LBUF { txt="Edgards"; },
+        LBUF { txt="Engell"; },
+        LBUF { txt="Farprington"; },
+        LBUF { txt="Fisher"; },
+        LBUF { txt="Foed"; },
+        LBUF { txt="Burges"; },
+        LBUF { txt="Childwall"; },
+        LBUF { txt="Smith"; },
+        LBUF { txt="Sipon"; },
+        LBUF { txt="Simmons"; },
+        LBUF { txt="Stewert"; },
+        LBUF { txt="Stiles"; },
+        LBUF { txt="Stratton"; },
+        LBUF { txt="Dennis"; },
+        LBUF { txt="Talmot"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_companies
+    {
+    items=
+        {
+        LBUF { txt="CDP"; },
+        LBUF { txt="Exbox"; },
+        LBUF { txt="Munro"; },
+        LBUF { txt="Majaka"; },
+        LBUF { txt="Bitzumi"; },
+        LBUF { txt="Melroy"; },
+        LBUF { txt="Matal"; },
+        LBUF { txt="Japponi"; },
+        LBUF { txt="Siwaka"; },
+        LBUF { txt="Keiku"; },
+        LBUF { txt="Naamate"; },
+        LBUF { txt="Remonti"; },
+        LBUF { txt="Melleva"; },
+        LBUF { txt="WEX"; },
+        LBUF { txt="Chataz"; },
+        LBUF { txt="Ponly"; },
+        LBUF { txt="Alriva"; },
+        LBUF { txt="Giate"; },
+        LBUF { txt="Kesso"; },
+        LBUF { txt="Nyssa"; },
+        LBUF { txt="Peger"; },
+        LBUF { txt="Metrio"; },
+        LBUF { txt="Mitchitatchi"; },
+        LBUF { txt="Neppari"; },
+        LBUF { txt="Amcuila"; },
+        LBUF { txt="Muipitsu"; },
+        LBUF { txt="Redex"; },
+        LBUF { txt="Maariz"; },
+        LBUF { txt="Swerck"; },
+        LBUF { txt="Makiac"; },
+        LBUF { txt="Dumpia"; },
+        LBUF { txt="Worldmom"; },
+        LBUF { txt="Renfaul"; },
+        LBUF { txt="Kmartissori"; },
+        LBUF { txt="Findo"; },
+        LBUF { txt="Samsanc"; },
+        LBUF { txt="Dellervo"; },
+        LBUF { txt="Manrel"; },
+        LBUF { txt="WSMRL"; },
+        LBUF { txt="Eripox"; },
+        LBUF { txt="Abiturien"; },
+        LBUF { txt="Vesus"; },
+        LBUF { txt="MI4"; },
+        LBUF { txt="Overhiba"; },
+        LBUF { txt="Tridune"; },
+        LBUF { txt="Kyomcera"; },
+        LBUF { txt="Praston"; },
+        LBUF { txt="Gapmis"; },
+        LBUF { txt="WPPDCD"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_addresses
+    {
+    items=
+        {
+        LBUF { txt="Barnes Street"; },
+        LBUF { txt="Barnes Place"; },
+        LBUF { txt="Eastman Street"; },
+        LBUF { txt="West Park"; },
+        LBUF { txt="South Park"; },
+        LBUF { txt="Park Avenue"; },
+        LBUF { txt="Richards Court"; },
+        LBUF { txt="Pukershire Avenue"; },
+        LBUF { txt="Ellis Avenue"; },
+        LBUF { txt="East Mountain"; },
+        LBUF { txt="Chestnut Hill"; },
+        LBUF { txt="Plains Road"; },
+        LBUF { txt="Fremont Street"; },
+        LBUF { txt="Heritage Court"; },
+        LBUF { txt="Highland Avenue Extension"; },
+        LBUF { txt="Maple Heights"; },
+        LBUF { txt="McKenzie Avenue"; },
+        LBUF { txt="McKenzie Lane"; },
+        LBUF { txt="West Terrace Street"; },
+        LBUF { txt="Windsor Avenue"; },
+        LBUF { txt="Windsor Road"; },
+        LBUF { txt="Mechanic Street Extension"; },
+        LBUF { txt="Granite Place"; },
+        LBUF { txt="Meadow Street"; },
+        LBUF { txt="Sugar River"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_cities
+    {
+    items=
+        {
+        LBUF { txt="Kuopio"; },       
+        LBUF { txt="Los Angeles"; },        
+        LBUF { txt="Lappeenranta"; },
+        LBUF { txt="London"; },        
+        LBUF { txt="Bangkok"; },
+        LBUF { txt="St. Michel"; },                
+        LBUF { txt="St. Petersburg"; },        
+        LBUF { txt="Tokyo"; },
+        LBUF { txt="Helsinki"; },
+        LBUF { txt="Trondheim"; },        
+        LBUF { txt="Nairobi"; },
+        LBUF { txt="Havana"; }        
+        };
+    }
+
+RESOURCE ARRAY r_data_countries
+    {
+    items=
+        {
+        LBUF { txt="Finland"; },
+        LBUF { txt="Cuba"; },
+        LBUF { txt="United States of America"; },
+        LBUF { txt="Thailand"; },
+        LBUF { txt="Sweden"; },
+        LBUF { txt="Russia"; },
+        LBUF { txt="Japan"; },
+        LBUF { txt="Norway"; },
+        LBUF { txt="Kenya"; }                
+        };
+    }
+
+RESOURCE ARRAY r_data_postcodes
+    {
+    items=
+        {
+        LBUF { txt="00310"; },
+        LBUF { txt="FI-70100"; },
+        LBUF { txt="99002"; },
+        LBUF { txt="11233"; }            
+        };
+    }
+
+RESOURCE ARRAY r_data_states
+    {
+    items=
+        {
+        LBUF { txt="California state"; }, 
+        LBUF { txt="Alaska state"; },
+        LBUF { txt="Florida state"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_poboxes
+    {
+    items=
+        {
+        LBUF { txt="P.O BOX 5532"; },
+        LBUF { txt="P.O BOX 701"; },
+        LBUF { txt="99"; },
+        LBUF { txt="1133"; },
+        LBUF { txt="P.O. BOX 113322"; },
+        LBUF { txt="112"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_prefixes
+    {
+    items=
+        {
+        LBUF { txt="Ms."; },
+        LBUF { txt="Mrs."; }, 
+        LBUF { txt="Mr."; },
+        LBUF { txt="Dr."; }
+        
+        };
+    }
+
+RESOURCE ARRAY r_data_suffixes
+    {
+    items=
+        {
+        LBUF { txt="Jr."; },
+        LBUF { txt="Sr."; }        
+        };
+    }
+
+RESOURCE ARRAY r_data_jobtitles
+    {
+    items=
+        {
+        LBUF { txt="Doctor"; },
+        LBUF { txt="SW Engineer"; },
+        LBUF { txt="Administrative Assistant"; },
+        LBUF { txt="Bookkeeper"; },
+        LBUF { txt="Credit Controller"; },
+        LBUF { txt="Data Entry Operator"; },
+        LBUF { txt="Payroll Officer"; },
+        LBUF { txt="Receptionist"; },
+        LBUF { txt="Trainee"; },
+        LBUF { txt="Accounts Clerk"; },
+        LBUF { txt="Administrator"; },
+        LBUF { txt="Taxation Assistant"; },
+        LBUF { txt="Financial Director"; },
+        LBUF { txt="Bank Manager"; },
+        LBUF { txt="Mobile Lending"; },
+        LBUF { txt="Overseas Transactions"; },
+        LBUF { txt="Restructuring"; },
+        LBUF { txt="Business Analyst"; },
+        LBUF { txt="Call Centre Manager"; },
+        LBUF { txt="Administration"; },
+        LBUF { txt="Manager"; },
+        LBUF { txt="Student"; },
+        LBUF { txt="Mail Sorter"; },
+        LBUF { txt="Mayor"; },
+        LBUF { txt="Account Servicing"; },
+        LBUF { txt="Management"; },
+        LBUF { txt="Media Consultant"; },
+        LBUF { txt="Newsagent"; },
+        LBUF { txt="Librarian"; },
+        LBUF { txt="Creative Director"; },
+        LBUF { txt="Announcer"; },
+        LBUF { txt="Copywriter"; },
+        LBUF { txt="Presenter"; },
+        LBUF { txt="Promotions Manager"; },
+        LBUF { txt="Advertising Sales Representative"; },
+        LBUF { txt="Editor"; },
+        LBUF { txt="Marketing, Sales & Publicity"; },
+        LBUF { txt="Publisher"; },
+        LBUF { txt="Gallery Assistant"; },
+        LBUF { txt="Photographer"; },
+        LBUF { txt="Storyboard Artist"; },
+        LBUF { txt="Events Manager"; },
+        LBUF { txt="Cameraman"; },
+        LBUF { txt="Technician"; },
+        LBUF { txt="Producer"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_phonenumbers
+    {
+    items=
+        {
+        LBUF { txt="0307834387"; },
+        LBUF { txt="0230328732"; },
+        LBUF { txt="0430365562"; },
+        LBUF { txt="0530328732"; },
+        LBUF { txt="0433032865"; },
+        LBUF { txt="0542306532"; },
+        LBUF { txt="0342303777"; },
+        LBUF { txt="0250235603"; },
+        LBUF { txt="0492303652"; },
+        LBUF { txt="0542303286"; },
+        LBUF { txt="0543656546"; },
+        LBUF { txt="0545545454"; },
+        LBUF { txt="0543444454"; },
+        LBUF { txt="0776463255"; },
+        LBUF { txt="0432443343"; },
+        LBUF { txt="0243334344"; },
+        LBUF { txt="0544543443"; },
+        LBUF { txt="0231343243"; },
+        LBUF { txt="0213443434"; },
+        LBUF { txt="0143234476"; },
+        LBUF { txt="0785434444"; },
+        LBUF { txt="0454445345"; },
+        LBUF { txt="0342443433"; },
+        LBUF { txt="0432434454"; },
+        LBUF { txt="0455454454"; },
+        LBUF { txt="0656565655"; },
+        LBUF { txt="0343434443"; },
+        LBUF { txt="0565645455"; },
+        LBUF { txt="0343243243"; },
+        LBUF { txt="0565466565"; },
+        LBUF { txt="0465565655"; },
+        LBUF { txt="0435445454"; },
+        LBUF { txt="+35854553456"; },
+        LBUF { txt="+35878453486"; },
+        LBUF { txt="+35876653456"; },
+        LBUF { txt="+35834435486"; },
+        LBUF { txt="+35876766466"; },
+        LBUF { txt="+4465665456"; },
+        LBUF { txt="+4432434334"; },
+        LBUF { txt="+4488776776"; },
+        LBUF { txt="+4465655656"; },
+        LBUF { txt="+4443433434"; },
+        LBUF { txt="+4465656565"; },
+        LBUF { txt="+4454454354"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_groupnames
+    {
+    items=
+        {
+        LBUF { txt="Nice guys"; },
+        LBUF { txt="Repairs"; },
+        LBUF { txt="Office works"; },
+        LBUF { txt="The buddies"; },
+        LBUF { txt="Football team"; },
+        LBUF { txt="Gold club"; },
+        LBUF { txt="Silver club"; },
+        LBUF { txt="Bronze club"; },
+        LBUF { txt="Best buddies"; },
+        LBUF { txt="Rockers"; },
+        LBUF { txt="Science group"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_meetingreasons
+    {
+    items=
+        {
+        LBUF { txt="Security issues"; },
+        LBUF { txt="Team meeting"; },
+        LBUF { txt="Discussion about"; },
+        LBUF { txt="Work plans"; },
+        LBUF { txt="Meeting with the professor"; },
+        LBUF { txt="Meeting with the boss"; },
+        LBUF { txt="Work issues"; },
+        LBUF { txt="New workers"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_meetingplaces
+    {
+    items=
+        {
+        LBUF { txt="Room"; },
+        LBUF { txt="Home"; },
+        LBUF { txt="Auditorium"; },
+        LBUF { txt="Company"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_landmark_names
+    {
+    items=
+        {
+        LBUF { txt="Good place to fish";},
+        LBUF { txt="Uncle over board";},
+        LBUF { txt="Best food ever!";},
+        LBUF { txt="Nice beach";},
+        LBUF { txt="Good hamburgers";},
+        LBUF { txt="Nice view";},
+        LBUF { txt="John's home";},
+        LBUF { txt="Carage";},
+        LBUF { txt="Gas station";},
+        LBUF { txt="Food store";},
+        LBUF { txt="Car wash";},
+        LBUF { txt="Summer cottage";},
+        LBUF { txt="My home";},
+        LBUF { txt="Bank";},
+        LBUF { txt="Hospital";},
+        LBUF { txt="Ice hall";},
+        LBUF { txt="Work place";}
+        };
+    }
+
+RESOURCE ARRAY r_data_landmark_descriptions
+    {
+    items=
+        {
+        LBUF { txt="The salmons were really big here!";},        
+        LBUF { txt="Delicious strawberries sold here. Must visit again sometime!";},
+        LBUF { txt="Place looks really nice.";},
+        LBUF { txt="This is my favorite place";},
+        LBUF { txt="Words are not enough to describe this landmark";},        
+        LBUF { txt="What a shocking place to visit! Remember to bring camera next time :-)";}
+        };
+    }
+
+RESOURCE ARRAY r_data_memos
+    {
+    items=
+        {
+        LBUF { txt="No work today!"; },
+        LBUF { txt="Movies tonight"; },
+        LBUF { txt="Ship new binaries"; },
+        LBUF { txt="New works"; },
+        LBUF { txt="Exam"; },
+        LBUF { txt="Community service"; },
+        LBUF { txt="Volunteer work"; },
+        LBUF { txt="Don't forget the dinner at the restaurant"; },
+        LBUF { txt="Go the bank"; },
+        LBUF { txt="Go to the store"; },
+        LBUF { txt="Buy goods"; },
+        LBUF { txt="Buy food"; },
+        LBUF { txt="Buy new pair of socks"; },
+        LBUF { txt="Buy vegetables"; },
+        LBUF { txt="Buy fruits"; },
+        LBUF { txt="Umbrella"; },
+        LBUF { txt="New shoes"; },
+        LBUF { txt="New suit"; },
+        LBUF { txt="Buy flowers"; },
+        LBUF { txt="School day"; }
+        };
+    }
+RESOURCE ARRAY r_data_anniversaries
+    {
+    items=
+        {
+        LBUF { txt="birthday"; },
+        LBUF { txt="anniversary"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_todos
+    {
+    items=
+        {
+        LBUF { txt="Watch for gum on my shoe"; },
+        LBUF { txt="Watch my step in the hall"; },
+        LBUF { txt="Always think big"; },
+        LBUF { txt="Don't ever think small"; },
+        LBUF { txt="Keep pedaling my bike"; },
+        LBUF { txt="Watch for bees in my pop"; },
+        LBUF { txt="Keep moving forward"; },
+        LBUF { txt="Don't ever stop"; },
+        LBUF { txt="Keep my sled underneath me"; },
+        LBUF { txt="Keep my stick on the ice"; },
+        LBUF { txt="Don't swim in a whirlpool"; },
+        LBUF { txt="Don't look for a fight"; },
+        LBUF { txt="Don't spit in the wind"; },
+        LBUF { txt="Just do what is right"; },
+        LBUF { txt="Go out in the world"; },
+        LBUF { txt="Enjoy a warm rain"; },
+        LBUF { txt="Don't worship TV"; },
+        LBUF { txt="Keep my oars in the water"; },
+        LBUF { txt="Point my boat right downstream"; },
+        LBUF { txt="Face head on my problems"; },
+        LBUF { txt="Change underwear daily"; },
+        LBUF { txt="Believe myself first"; },
+        LBUF { txt="Go out and have fun"; },
+        LBUF { txt="Turn the cards one by one"; },
+        LBUF { txt="Get out and do something"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_reminders
+    {
+    items=
+        {
+        LBUF { txt="Remeber to fix car"; },
+        LBUF { txt="Remeber to eat vegetables"; },
+        LBUF { txt="Remeber to go shopping"; },
+        LBUF { txt="Remeber to buy boxes for moving"; },
+        LBUF { txt="Remeber to fix bike"; },
+        LBUF { txt="Remeber to buy christmast presents"; },
+        LBUF { txt="Remeber to send flowers to grandmother"; },
+        LBUF { txt="Remeber to talk with son"; },
+        LBUF { txt="Remeber to cut hedge"; },
+        LBUF { txt="Remeber to bumper potatoes"; },
+        LBUF { txt="Remeber to harvest corn field"; },
+        LBUF { txt="Remeber to sleep enaugh"; },
+        LBUF { txt="Remeber to wash teeths ewery morning"; },
+        LBUF { txt="Remeber to get sleep early"; },
+        LBUF { txt="Remeber to give some wather to flowers"; },
+        LBUF { txt="Remeber to wax snowboard"; },
+        LBUF { txt="Remeber to wax skiis"; },
+        LBUF { txt="Remeber to wax cross country skiis"; },
+        LBUF { txt="Remeber to call mother"; },
+        LBUF { txt="Remeber to call father"; },
+        LBUF { txt="Remeber to call brother"; },
+        LBUF { txt="Remeber to call sister"; },
+        LBUF { txt="Remeber to call daughter"; },
+        LBUF { txt="Remeber to call son"; },
+        LBUF { txt="Remeber to rent villa"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_messagesubjects
+    {
+    items=
+        {
+        LBUF { txt="Whaaasssaaap!!??"; },
+        LBUF { txt="Hello"; },
+        LBUF { txt="How are you doing?"; },
+        LBUF { txt="You will win the battle, GUARANTEED!"; },
+        LBUF { txt="Why pay more for something if you don't have to?"; },
+        LBUF { txt="You can afford health care now"; },
+        LBUF { txt="Re: *Buddy* *Lists*!!~ (it's soooo cool)!!~"; },
+        LBUF { txt="Weedmon say: call, we be open 7 days, mon"; },
+        LBUF { txt="Want her to look better?"; },
+        LBUF { txt="Good Morning andyw, how are you?"; },
+        LBUF { txt="Happy Assumption"; },
+        LBUF { txt="There is NO Risk involved"; },
+        LBUF { txt="Free Bottle Offer!"; },
+        LBUF { txt="Introduction on MDSL"; },
+        LBUF { txt="Theres Help out there for you"; },
+        LBUF { txt="hello there - check this out"; },
+        LBUF { txt="Darling"; },
+        LBUF { txt="It doesn't have to be that way"; },
+        LBUF { txt="Webmaster, Free health insurance quotes!"; },
+        LBUF { txt="Join us at the OSGi 2003 World Congress"; },
+        LBUF { txt="Put your subject line here"; },
+        LBUF { txt="You are not protected"; },
+        LBUF { txt="Please try again"; },
+        LBUF { txt="you didn't reply my email ? why ? ???"; },
+        LBUF { txt="A very funny game"; },
+        LBUF { txt="Meeting notice"; },
+        LBUF { txt="Opportunities"; }
+        };
+    }
+
+RESOURCE ARRAY r_data_messagetexts
+    {
+    items=
+        {
+        LBUF { txt="The contents of these pages are copyrighted. Any rights not expressly granted herein are reserved. The use of this site is permitted to private use."; },
+        LBUF { txt="Reproduction, transfer, distribution or storage of part or all of the contents in any form without the prior written permission is prohibited."; },
+        LBUF { txt="We consents to you browsing the pages on your computer or printing copies of extracts from these pages for your personal use only."; },
+        LBUF { txt="If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information."; },
+        LBUF { txt="The use of press releases and other documents classified as public is permitted in public communications if the source for the information has been stated."; },
+        LBUF { txt="For your easy accessibility we may include links to sites on the Internet that are owned or operated by third parties."; },
+        LBUF { txt="You also agree that we have no control over the content of that site and cannot assume any responsibility for material by such third-party sites."; },
+        LBUF { txt="In addition, a link to a such site does not imply that we endorses the site or the products or services referenced in such third party site."; },
+        LBUF { txt="In order to respond to your questions or manage interactive customer programs, it may be necessary to ask for personal information."; },
+        LBUF { txt="We may use this information to respond to your requests, or to contact you via mail, e-mail or phone to inform you of new products."; },
+        LBUF { txt="If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information."; }
+        };
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator.hrh	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,180 @@
+/*
+* 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 __CREATOR_HRH__
+#define __CREATOR_HRH__
+
+
+enum TCreatorIds
+    {
+
+    // Phonebook entries shuld be the first, bacause some other entries references them
+    ECmdCreatePhoneBookEntries = 1,
+    ECmdCreatePhoneBookEntryContacts,
+    ECmdCreatePhoneBookEntryGroups,
+    ECmdCreatePhoneBookEntrySubscribedContacts,
+    
+    ECmdCreateFromFile,
+
+    ECmdCreateCalendarEntries,
+    ECmdCreateCalendarEntryAppointments,
+    ECmdCreateCalendarEntryEvents,
+    ECmdCreateCalendarEntryAnniversaries,
+    ECmdCreateCalendarEntryToDos,
+    ECmdCreateCalendarEntryReminders,
+
+    ECmdCreateBrowserEntries,
+    ECmdCreateBrowserBookmarkEntries,
+    ECmdCreateBrowserBookmarkFolderEntries,
+    ECmdCreateBrowserSavedPageEntries,
+    ECmdCreateBrowserSavedPageFolderEntries,
+
+    ECmdCreateFileEntries,
+    ECmdCreateFileEntryEmptyFolder,
+
+    ECmdCreateFileEntry3GPP_70kB,
+    ECmdCreateFileEntryAAC_100kB,
+    ECmdCreateFileEntryAMR_20kB,
+    ECmdCreateFileEntryBMP_25kB,
+    ECmdCreateFileEntryDeck_1kB,
+    ECmdCreateFileEntryDOC_20kB,
+    ECmdCreateFileEntryGIF_2kB,
+    ECmdCreateFileEntryHTML_20kB,
+    ECmdCreateFileEntryJAD_1kB,
+    ECmdCreateFileEntryJAR_10kB,
+    ECmdCreateFileEntryJP2_65kB,
+    ECmdCreateFileEntryJPEG_200kB,
+    ECmdCreateFileEntryJPEG_25kB,
+    ECmdCreateFileEntryJPEG_500kB,
+    ECmdCreateFileEntryMIDI_10kB,
+    ECmdCreateFileEntryMP3_250kB,
+    ECmdCreateFileEntryMP4_200kB,
+    ECmdCreateFileEntryMXMF_40kB,
+    ECmdCreateFileEntryPNG_15kB,
+    ECmdCreateFileEntryPPT_40kB,
+    ECmdCreateFileEntryRAM_1kB,
+    ECmdCreateFileEntryRM_95kB,
+    ECmdCreateFileEntryRNG_1kB,
+    ECmdCreateFileEntrySVG_15kB,
+    ECmdCreateFileEntrySWF_15kB,
+    ECmdCreateFileEntryTIF_25kB,
+    ECmdCreateFileEntryTXT_10kB,
+    ECmdCreateFileEntryTXT_70kB,
+    ECmdCreateFileEntryVCF_1kB,
+    ECmdCreateFileEntryVCS_1kB,
+    ECmdCreateFileEntryWAV_20kB,
+    ECmdCreateFileEntryXLS_15kB,
+    ECmdCreateFileEntrySISX_10kB,
+    ECmdCreateFileEntryWMA_50kB,
+    ECmdCreateFileEntryWMV_200kB,
+
+    ECmdCreateLogEntries,
+    ECmdCreateLogEntryMissedCalls,
+    ECmdCreateLogEntryReceivedCalls,
+    ECmdCreateLogEntryDialledNumbers,
+
+    ECmdCreateMessagingEntries,
+    ECmdCreateMessagingEntryCBSTopics,
+    ECmdCreateMessagingEntryDocumentsFolders,
+    ECmdCreateMessagingEntrySMSMessageCenters,
+    ECmdCreateMessagingEntryMailboxes,
+    ECmdCreateMessagingEntryMessages,
+    ECmdCreateMessagingEntryMessagesViaScript,
+    ECmdCreateMessagingEntryTemplates,
+
+    ECmdCreateRandomEntrySMSInbox,
+    ECmdCreateRandomEntrySMSDrafts,
+    ECmdCreateRandomEntrySMSOutbox,
+    ECmdCreateRandomEntrySMSSent,
+    ECmdCreateRandomEntryMMSInbox,
+    ECmdCreateRandomEntryMMSDrafts,
+    ECmdCreateRandomEntryMMSOutbox,
+    ECmdCreateRandomEntryMMSSent,
+    ECmdCreateRandomEntryAMSInbox,
+    ECmdCreateRandomEntryAMSDrafts,
+    ECmdCreateRandomEntryAMSOutbox,
+    ECmdCreateRandomEntryAMSSent,
+    ECmdCreateRandomEntryEmailInbox,
+    ECmdCreateRandomEntryEmailDrafts,
+    ECmdCreateRandomEntryEmailOutbox,
+    ECmdCreateRandomEntryEmailSent,
+    ECmdCreateRandomEntryBIOInbox,
+    ECmdCreateRandomEntryBIODrafts,
+    ECmdCreateRandomEntryBIOOutbox,
+    ECmdCreateRandomEntryBIOSent,
+    ECmdCreateRandomEntryIRInbox,
+    ECmdCreateRandomEntryIRDrafts,
+    ECmdCreateRandomEntryIROutbox,
+    ECmdCreateRandomEntryIRSent,
+    ECmdCreateRandomEntryBTInbox,
+    ECmdCreateRandomEntryBTDrafts,
+    ECmdCreateRandomEntryBTOutbox,
+    ECmdCreateRandomEntryBTSent,
+
+    ECmdCreateMiscEntries,
+    ECmdCreateMiscEntryAccessPoints,
+    ECmdCreateMiscEntryAppMenuFolders,
+    ECmdCreateMiscEntryIMPSServers,
+    ECmdCreateMiscEntryNotes,
+    ECmdCreateMiscEntrySyncSettings,
+    ECmdCreateMiscEntryLandmarks,
+
+    ECmdDeleteEntries,
+    ECmdDeleteAllEntries,
+    ECmdDeleteAllCreatorEntries,
+    ECmdDeleteContacts,
+    ECmdDeleteCreatorContacts,
+    ECmdDeleteContactGroups,
+    ECmdDeleteCreatorContactGroups,
+    ECmdDeleteCalendarEntries,
+    ECmdDeleteCreatorCalendarEntries,
+    ECmdDeleteBrowserBookmarks,
+    ECmdDeleteCreatorBrowserBookmarks,
+    ECmdDeleteBrowserBookmarkFolders,
+    ECmdDeleteCreatorBrowserBookmarkFolders,
+    ECmdDeleteBrowserSavedPages,
+    ECmdDeleteCreatorBrowserSavedPages,
+    ECmdDeleteBrowserSavedPageFolders,
+    ECmdDeleteCreatorBrowserSavedPageFolders,
+    ECmdDeleteCreatorFiles,
+    ECmdDeleteLogs,
+    ECmdDeleteCreatorLogs,
+    ECmdDeleteMessages,
+    ECmdDeleteCreatorMessages,
+    ECmdDeleteMailboxes,
+    ECmdDeleteCreatorMailboxes,
+    ECmdDeleteIAPs,
+    ECmdDeleteCreatorIAPs,
+    ECmdDeleteIMPSs,
+    ECmdDeleteCreatorIMPSs,
+    ECmdDeleteNotes,
+    // ECmdDeleteCreatorNotes, not supported
+    ECmdDeleteLandmarks,
+    ECmdDeleteCreatorLandmarks,
+
+    ECmdAboutCreator,
+
+    ECmdSelectRandomDataFile,
+
+    EProgressNote
+
+    };
+
+#endif // __CREATOR_HRH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator.pan	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* 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 __CREATOR_PAN__
+#define __CREATOR_PAN__
+
+
+/** Creator application panic codes */
+enum TCreatorPanics 
+    {
+    ECreatorBasicUi = 1
+    // add further panics here
+    };
+
+#endif // __CREATOR_PAN__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_accesspoint.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* 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 __CREATORACCESSPOINTS_H__
+#define __CREATORACCESSPOINTS_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+#include "creator_connectionmethodbase.h"
+
+#include <e32base.h>
+#include <commdb.h>
+//#include <ApSelect.h>
+//#include <ApDataHandler.h>
+//#include <ApAccessPointItem.h>
+//#include <ApUtils.h>
+//#include <ApEngineConsts.h>
+#include <msvapi.h>
+#include <mtclreg.h>
+#include <mmsclient.h>
+
+
+class CCreatorEngine;
+class CAccessPointsParameters;
+
+
+
+class CCreatorAccessPoints : public CCreatorConnectionSettingsBase, public MMsvSessionObserver
+    {
+public: 
+    static CCreatorAccessPoints* NewL(CCreatorEngine* aEngine);
+    static CCreatorAccessPoints* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorAccessPoints();
+
+private:
+    CCreatorAccessPoints();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
+
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    
+    TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters);    
+    TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse );
+    
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+private:
+    CCommsDatabase* iCommsDb;
+    CApDataHandler* iApDataHandler;
+    CApUtils* iApUtils;
+    CAccessPointsParameters* iParameters;
+    RArray<TUint32> iEntryIds; // TUint32 CApDataHandler::CreateFromDataL
+
+public:
+    };
+
+
+class CAccessPointsParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    HBufC*          iConnectionName; // connection name
+    TApBearerType   iBearerType; // bearer type
+    HBufC*          iWapStartPage; // WAP start page
+    TUint32         iWapWspOption; // connection type
+    HBufC*          iGprsAcessPointName; // access point name
+    HBufC*          iIspLoginName; // username
+    TBool           iSecureAuthentication; // password authentication
+    HBufC*          iIspLoginPass; // password
+    TBool           iPromptPassword; // prompt password
+    HBufC*          iWapGatewayAddress; // WAP gateway address
+    HBufC*          iIspIPAddr; // phone IP
+    HBufC*          iIspIPNameServer1;  // primary name server
+    HBufC*          iIspIPNameServer2;  // secondary name server
+    HBufC*          iIspDefaultTelNumber; // datacall number
+    TUint32         iIspBearerCallTypeIsdn; // datacall type
+    TUint32         iIspBearerSpeed;  // max connection speed
+    HBufC*          iProxyServerAddress;  // proxy address
+    TUint32         iProxyPortNumber; // proxy number
+    
+    void SetRandomCMNameL(CCreatorEngine& aEngine);
+    void SetRandomLoginNameL(CCreatorEngine& aEngine);
+    void SetRandomLoginPassL(CCreatorEngine& aEngine);
+    void SetRandomSecureAuthenticationL(CCreatorEngine& aEngine);
+    void SetRandomPromptPasswordL(CCreatorEngine& aEngine);
+    void SetRandomProxyAddressL(CCreatorEngine& aEngine);
+    void SetRandomProxyPortL(CCreatorEngine& aEngine);
+    void SetRandomStartPageL(CCreatorEngine& aEngine);
+    void SetRandomIPAddressL(CCreatorEngine& aEngine);
+    void SetRandomIP4NameServer1L(CCreatorEngine& aEngine);
+    void SetRandomIP4NameServer2L(CCreatorEngine& aEngine);
+    void SetRandomTelephoneNumberL(CCreatorEngine& aEngine);
+    void SetRandomBearerTypeIsdnL(CCreatorEngine& aEngine);
+    void SetRandomBearerSpeedL(CCreatorEngine& aEngine);
+    void SetRandomWapWspOptionL(CCreatorEngine& aEngine);
+    void SetRandomGatewayAddressL(CCreatorEngine& aEngine);
+    
+
+public:
+    CAccessPointsParameters();
+    ~CAccessPointsParameters();
+    };
+
+
+
+#endif // __CREATORACCESSPOINTS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_browser.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+
+#ifndef __CREATORBROWSER_H__
+#define __CREATORBROWSER_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+
+#include <e32base.h>
+//#include <FavouritesItem.h>
+//#include <FavouritesDb.h>
+//#include <FavouritesFile.h>
+
+
+
+class CCreatorEngine;
+class CBrowserParameters;
+
+
+class CCreatorBrowser : public CCreatorModuleBase
+    {
+public: 
+    static CCreatorBrowser* NewL(CCreatorEngine* aEngine);
+    static CCreatorBrowser* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorBrowser();
+
+private:
+    CCreatorBrowser();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+
+    TInt CreateBookmarkEntryL(CBrowserParameters *aParameters);    
+    TInt CreateBookmarkFolderEntryL(CBrowserParameters *aParameters);
+    TInt CreateSavedDeckEntryL(CBrowserParameters *aParameters); 
+    TInt CreateSavedDeckFolderEntryL(CBrowserParameters *aParameters);
+    
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+    
+    void DeleteAllBookmarksL();
+    void DeleteAllBookmarksCreatedByCreatorL();
+    void DeleteAllBookmarkFoldersL();
+    void DeleteAllBookmarkFoldersCreatedByCreatorL();
+    void DeleteAllSavedPagesL();
+    void DeleteAllSavedPagesCreatedByCreatorL();
+    void DeleteAllSavedPageFoldersL();
+    void DeleteAllSavedPageFoldersCreatedByCreatorL();
+
+private:
+    void DeleteAllItemsL( const TDesC& aDbName, CFavouritesItem::TType aTypeFilter, TBool aOnlyCreatedWithCreator, RArray<TInt>& aEntryIds, const TUid aDictUid );
+    
+
+
+private:
+    CBrowserParameters* iParameters;
+    RArray<TInt> iBmEntryIds;
+    RArray<TInt> iBmFEntryIds;
+    RArray<TInt> iSpEntryIds;
+    RArray<TInt> iSpFEntryIds;
+public:
+    };
+
+
+class CBrowserParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    HBufC*              iBookmarkName;
+    HBufC*              iBookmarkAddress;
+    TFavouritesWapAp    iBookmarkAccessPoint;
+    HBufC*              iBookmarkUsername;
+    HBufC*              iBookmarkPassword;    
+
+    HBufC*              iBookmarkFolderName;
+    
+    HBufC*              iSavedDeckLinkName;
+    HBufC*              iSavedDeckLocalAddress;
+            
+    HBufC*              iSavedDeckFolderName;
+
+public:
+    CBrowserParameters();
+    ~CBrowserParameters();
+    };
+
+
+
+#endif // __CREATORBROWSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_browserelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* 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 CREATORBROWSERELEMENT_H_
+#define CREATORBROWSERELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+namespace creatorbrowser
+{
+_LIT(KBookmark, "bookmark");
+_LIT(KBookmarkFolder, "bookmarkfolder");
+_LIT(KSavedPage, "savedpage");
+_LIT(KSavedPageFolder, "savedpagefolder");
+
+_LIT(KName, "name");
+_LIT(KPath, "path");
+_LIT(KUsername, "username");
+_LIT(KPassword, "password");
+_LIT(KUrl, "url");
+}
+
+class CCreatorBrowserElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorBrowserElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    
+protected:
+    CCreatorBrowserElement(CCreatorEngine* aEngine);    
+    TInt GetBrowserCommandL() const;
+};
+#endif /*CREATORBROWSERELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_calendar.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,209 @@
+/*
+* 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 __CREATORCALENDARINTERIM_H__
+#define __CREATORCALENDARINTERIM_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+#include "creator_calendarbase.h"
+
+#include <e32base.h>
+#include <e32std.h>
+
+//#include <calenlauncher.h> 
+#include <calentry.h>
+#include <calentryview.h>
+#include <caltime.h>
+#include <calsession.h>
+#include <calprogresscallback.h>
+#include <calcategory.h>
+#include <caluser.h>
+#include <calrrule.h>
+
+
+class CCreatorEngine;
+class CCalenderInterimParameters;
+class CAsyncWaiter;
+
+class CCreatorInterimCalendar : public CCreatorCalendarBase, public MCalProgressCallBack
+    {
+enum TCreatorCalendarStatus{
+    ECreatorCalendarDelete = 0,
+    ECreatorCalendarStart, 
+    ECreatorCalendarGetWeeklyEntries,
+    ECreatorCalendarGetAttendies,
+    ECreatorCalendarGetStartDate,
+    ECreatorCalendarGetEndDate, 
+    ECreatorCalendarAddDefaultAlarm
+};
+
+public: 
+    static CCreatorInterimCalendar* NewL(CCreatorEngine* aEngine);
+    static CCreatorInterimCalendar* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorInterimCalendar();
+
+private:
+    CCreatorInterimCalendar();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+    void AddRepeatingRuleL(const TCalTime& aStartTime, CCalEntry& aCalEntry, CCalenderInterimParameters* parameters=0);
+    void SetRandomAlarmL(CCalEntry& aCalEntry);
+    void SetAlarmL(CCalEntry& aCalEntry, CCalenderInterimParameters* params);
+    void AddAttendeesL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters=0);
+    void SetPhoneOwnerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy );
+    void SetOrganizerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy);
+    void SetOrganizerL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters );
+    
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
+    
+    TInt CreateAppointmentEntryL(CCreatorModuleBaseParameters *aParameters);    
+    TInt CreateEventEntryL(CCreatorModuleBaseParameters *aParameters);
+    TInt CreateAnniversaryEntryL(CCreatorModuleBaseParameters *aParameters); 
+    TInt CreateTodoEntryL(CCreatorModuleBaseParameters *aParameters);
+    TInt CreateReminderEntryL(CCreatorModuleBaseParameters *aParameters);
+    
+    void GenerateRandomId(TDes8& aText);
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+private:
+
+    CCalenderInterimParameters* iParameters;
+    TTime   iRandomModeStartTime;
+    TTime   iRandomModeEndTime;
+    TInt    iNumberRepeatingEntries;
+    TInt    iNumberOfAttendees;
+    CCalEntryView* 		iCalEntryView;
+    CCalSession* 		iCalSession;
+    TBool iSetAlarm;
+    CDesCArrayFlat* iSoundFileArray;
+    CAsyncWaiter* iWaiter;
+    HBufC* iTmpCN;
+    HBufC* iTmpEmail;
+    RArray<TUint32> iEntryIds; // TCalLocalUid ( == TUint32 ) CCalEntry::LocalUidL
+
+public:
+
+    //Observer implementation for MCalProgressCallBack
+	void Progress(TInt aPercentageCompleted);
+	
+	void Completed(TInt aError);
+	
+	TBool NotifyProgress();
+
+    };
+
+class CCreatorCalenderAttendee : public CBase
+{
+public:
+    virtual ~CCreatorCalenderAttendee();
+    static CCreatorCalenderAttendee* NewL();
+    void SetCommonNameL(const TDesC& aName);
+    void SetEmailAddressL(const TDesC& aEmail);
+    void SetRole(CCalAttendee::TCalRole aRole);
+    void SetStatus(CCalAttendee::TCalStatus);
+    
+    const TDesC& CommonName() const;
+    const TDesC& EmailAddress() const;
+    CCalAttendee::TCalRole Role() const;
+    CCalAttendee::TCalStatus Status() const;
+    
+private:
+    CCreatorCalenderAttendee();
+    TPtrC  iDummy;
+    HBufC* iCommonName;
+    HBufC* iEmailAddress;
+    CCalAttendee::TCalRole iRole;
+    CCalAttendee::TCalStatus iStatus;
+};
+
+class CCalenderInterimParameters : public CCreatorModuleBaseParameters
+    {
+public:
+
+	void ParseL(CCommandParser* parser, TParseParams aCase);
+	TBool IsAllowedEntryStatus(CCalEntry::TType aType, CCalEntry::TStatus aStatus);
+
+	TCalRRule::TType iRecurrentFrequency;
+	TInt iRecurrentInterval;
+	TTime iRecurrentStartTime;
+	TTime iRecurrentEndTime;
+	TInt iRepeatingCount; // This is used when running a script...
+	TTime iAlarmTime; // NullTTime means no alarm
+	TBool iUseRandomAlarmTime; // ETrue if random alarm should be set. Overwrites the iAlarmTime.
+	
+	RPointerArray<CCreatorCalenderAttendee> iAttendees;
+	RArray<TLinkIdParam> iAttendeeLinkIds; // For attendees. Stores the linked contact ids.
+	HBufC* iOrganizerName;
+	HBufC* iOrganizerEmail;
+		 
+	HBufC*  iDescription;
+	HBufC*  iSummary;
+	HBufC*  iLocation;
+	TTime   iStartTime;
+	TTime   iEndTime;
+	TInt    iNumberRepeatingEntries; // This is used when user input is used...
+	TInt    iNumberOfAttendees; // Number of randomly generated attendees
+	TInt    iNumberOfExistingAttendees; // Number of attendees selected from existing contacts.
+	
+	//An appointment, which has a start time and end time.
+    TTime   iAppointmentStartTime;
+    TTime   iAppointmentEndTime;
+    HBufC*  iAppointmentLocation;
+    HBufC*  iAppointmentReason;
+
+    //An event, which has a start time and end time.
+    
+    TTime   iEventStartTime;
+    TTime   iEventEndTime;
+    HBufC*  iEventReason;
+
+    //A reminder, which has a start time only.
+    TTime   iReminderStartTime;
+    HBufC*  iReminderReason;
+    
+    //An anniversary, which has a start time and end time.
+    TTime   iAnniversaryStartTime;
+    TTime   iAnniversaryEndTime;
+    HBufC*  iAnniversaryReason;
+
+    //A to-do, which can have a start time and end time (the end time is the due date), or can be undated.
+    TTime   iTodoStartTime;//optional
+    TTime   iTodoDueTime;//also end time (optional)
+    HBufC*  iTodoTask;
+    TInt    iTodoPriority;
+
+    TTime   iRandomModeStartTime;
+    TTime   iRandomModeEndTime;
+    
+    CCalEntry::TStatus iStatus;
+    
+public:
+	CCalenderInterimParameters();
+    ~CCalenderInterimParameters();   
+    
+    };
+
+
+
+#endif // __CREATORCALENDARINTERIM_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_calendarbase.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef CCREATORCALENDARBASE_
+#define CCREATORCALENDARBASE_
+
+#include "creator_modulebase.h"
+
+class CCreatorModuleBaseParameters;
+
+class CCreatorCalendarBase : public CCreatorModuleBase{
+public:
+
+
+    //An appointment, which has a start time and end time. EAppt.
+    virtual TInt CreateAppointmentEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
+    //An event, which has a start time and end time. EEvent.
+    virtual TInt CreateEventEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
+    //An anniversary, which has a start time and end time. EAnniv.
+    virtual TInt CreateAnniversaryEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
+    //A to-do, which can have a start time and end time (the end time is the due date), or can be undated. ETodo.
+    virtual TInt CreateTodoEntryL(CCreatorModuleBaseParameters *aParameters) = 0;     
+    //A reminder, which has a start time only. EReminder.
+    virtual TInt CreateReminderEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
+
+};
+
+#endif /*CCREATORCALENDARBASE_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_calendarelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* 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 CREATORCALENDARELEMENT_H_
+#define CREATORCALENDARELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+class CCalenderInterimParameters;
+
+// Calendar elements:
+namespace creatorcalendar
+{
+    _LIT(KCalendar, "calendar");
+
+    // Calendar entry types:
+    _LIT(KType, "type");
+    _LIT(KCalTypeAppointment, "appointment");
+    _LIT(KCalTypeEvent, "event");
+    _LIT(KCalTypeReminder, "reminder");
+    _LIT(KCalTypeAnniversary, "anniversary");
+    _LIT(KCalTypeTodo, "todo");
+
+    // Calendar entry field elements:
+    _LIT(KSummary, "summary");
+    _LIT(KDescription, "description");
+    _LIT(KLocation, "location");
+    _LIT(KStarttime, "starttime");
+    _LIT(KEndtime, "endtime");
+    _LIT(KRecurrentFreq, "recurrentfrequency");
+    _LIT(KRecurrentInterval, "recurrentinterval");
+    _LIT(KRecurrentFrom, "recurrentfrom");
+    _LIT(KRecurrentTo, "recurrentto");
+    _LIT(KRepeatingCount, "repeatingcount");
+    _LIT(KAlarmtime, "alarmtime");
+    _LIT(KSynchronization, "synchronization");
+    _LIT(KOrganizername, "organizername");
+    _LIT(KOrganizeremail, "organizeremail");
+    _LIT(KAttendees, "attendees");
+    _LIT(KAttendee, "attendee");
+    _LIT(KCommonname, "commonname");
+    _LIT(KEmail, "email");
+    _LIT(KRole, "role");
+    _LIT(KStatus, "status");
+    _LIT(KPriority, "priority");
+
+    // Recurrency frequency values:
+    _LIT(KNotRepeated, "not-repeated");
+    _LIT(KWeekly, "weekly");
+    _LIT(KDaily, "daily");
+    _LIT(KMonthly, "monthly");
+    _LIT(KYearly, "yearly");
+
+    // Attendee role values:
+    _LIT(KRoleRequired, "required");
+    _LIT(KRoleOptional, "optional");
+    _LIT(KRoleNonPart, "non-participant");
+    _LIT(KRoleChair, "chair");
+    
+    // Calendar entry status values:
+    _LIT(KCalStatusTentative, "tentative");
+    _LIT(KCalStatusConfirmed, "confirmed");
+    _LIT(KCalStatusCancelled, "cancelled");
+    _LIT(KCalStatusNeedsAction, "todoneedsaction");
+    _LIT(KCalStatusCompleted, "todocompleted");
+    _LIT(KCalStatusInProcess, "todoinprocess");
+
+    // Attendee status values:
+    _LIT(KStatusNeedsAction, "needsaction");
+    _LIT(KStatusAccepted, "accepted");
+    _LIT(KStatusTentative, "tentative");
+    _LIT(KStatusConfirmed, "confirmed");
+    _LIT(KStatusDeclined, "declined");
+    _LIT(KStatusCompleted, "completed");
+    _LIT(KStatusDelegated, "delegated");
+    _LIT(KStatusInProcess, "inprocess");
+    
+    // Priority values:
+    _LIT(KPriorityHigh, "high");
+    _LIT(KPriorityMedium, "medium");
+    _LIT(KPriorityLow, "low");
+}
+
+class CCreatorCalendarElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorCalendarElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+protected:
+    CCreatorCalendarElement(CCreatorEngine* aEngine);
+    
+    enum TEntryType {
+        EAppointment,
+        EEvent,
+        EReminder,
+        EAnniversary,
+        ETodo
+    };
+    
+    void FillEntryParamsL(TEntryType aType, const RPointerArray<CCreatorScriptElement>& fields, CCalenderInterimParameters* parameters); 
+};
+
+#endif /*CREATORCALENDARELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_cmdscriptrun.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* 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 __CREATORCMDSCRIPTRUN_H__
+#define __CREATORCMDSCRIPTRUN_H__
+
+#include "engine.h"
+
+class CCreatorCmdScriptRun : public CBase, public MBeating
+    {
+public:
+
+    static CCreatorCmdScriptRun* NewL(CCreatorEngine* aEngine);
+	static CCreatorCmdScriptRun* NewLC(CCreatorEngine* aEngine);
+	~CCreatorCmdScriptRun();
+
+    // callback from engine when the commands from the script file have been executed
+    void RunScriptDone();
+
+    // from MBeating
+    void Beat();
+    void Synchronize();
+	
+private:
+    CCreatorCmdScriptRun();
+    void ConstructL(CCreatorEngine* aEngine);
+	void TickL();
+	
+private:
+    CCreatorEngine* iEngine;
+	HBufC* iCommandLineScriptName;
+	HBufC* iCommandLineRandomDataFileName;
+	CHeartbeat* iTimer;
+	enum TTimerMode
+		{
+		ETimerModeNone,
+		ETimerModeStartScript,
+		ETimerModeExitAppUi
+		};
+	TTimerMode iMode;
+	TInt iTickCount;
+    };
+	
+#endif // __CREATORCMDSCRIPTRUN_H__	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_connectionmethod.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,155 @@
+/*
+* 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 __CREATORCONNECTIONSETTINGS_H__
+#define __CREATORCONNECTIONSETTINGS_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+#include "creator_connectionmethodbase.h"
+
+#include <e32base.h>
+#include <commdb.h>
+#include <msvapi.h>
+#include <mtclreg.h>
+#include <mmsclient.h>
+
+#include <cmconnectionmethoddef.h>
+#include <cmmanagerext.h>
+#include <cmpluginwlandef.h>
+using namespace CMManager;
+
+#include <etelpckt.h>//ETel Packet API needed for enums
+
+class CCreatorEngine;
+class CConnectionSettingsParameters;
+
+class CCreatorConnectionSettings : public CCreatorConnectionSettingsBase, public MMsvSessionObserver
+    {
+public: 
+    static CCreatorConnectionSettings* NewL(CCreatorEngine* aEngine);
+    static CCreatorConnectionSettings* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorConnectionSettings();
+
+private:
+    CCreatorConnectionSettings();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
+        
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    
+    TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters);    
+    TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse );
+    
+    //Setting default connection method, if not set
+    void SetDefaultCML(RCmConnectionMethodExt conMethod);
+    //Set random parameters
+    void SetRandomParametersL(CConnectionSettingsParameters& parameters);
+    void SetRandomBearerTypeL(CConnectionSettingsParameters& parameters);
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+private:
+    void DeleteAllDestinationsL( TBool aOnlyCreatedWithCreator );
+private:
+    CCommsDatabase* iCommsDb;
+    
+    RCmManagerExt iCmManagerExt;
+
+    CConnectionSettingsParameters* iParameters;
+    
+    RArray<TUint32> iEntryIds; // TUint32 RCmDestinationExt::Id()
+
+public:
+    };
+
+   
+class CConnectionSettingsParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    HBufC*          iConnectionName; // connection name
+    TUint           iBearerType; // bearer type
+    HBufC*          iStartPage; // start page
+    TWapWSPOption   iWapWspOption; // Indicating whether connection-oriented  or connectionless API should be used.
+    
+    RPacketContext::TProtocolType iProtocolType; //Type of protocol EPdpTypeIPv4 or EPdpTypeIPv4
+    
+    HBufC*          iLoginName; // username
+    TBool           iSecureAuthentication; // password authentication
+    HBufC*          iLoginPass; // password
+    TBool           iPromptPassword; // prompt password
+    HBufC*          iGatewayAddress; // gateway address
+    HBufC*          iSubnetMask;  // subnet mask
+    HBufC*          iIPAddr; // phone IP
+    HBufC*          iIP4NameServer1;  // primary name server
+    HBufC*          iIP4NameServer2;  // secondary name server
+    HBufC*          iDefaultTelNumber; // datacall number
+    TUint32         iBearerCallTypeIsdn; // datacall type
+    TUint32         iBearerSpeed;  // max connection speed
+    TBool           iUseProxy; //Use proxy or not
+    HBufC*          iProxyServerAddress;  // proxy address
+    TUint32         iProxyPortNumber; // proxy number
+    HBufC*          iWLANName;//WLAN network name
+    HBufC*          iWlanIpAddr;//IP address of EPOC.
+    TWlanSecMode    iWLanSecMode;//WLAN security modes
+    TWlanNetMode    iWlanNetMode;//WLAN connection mode. Ad-hoc or infrastructure.
+
+    HBufC*          iIP6NameServer1;  // primary name server for IP v6
+    HBufC*          iIP6NameServer2;  // secondary name server for IP v6
+    TBool           iDisableTextAuth; // Disable plaintext authentication 
+    
+    CCreatorEngine* iEngine;
+    
+public:
+    CConnectionSettingsParameters();
+    ~CConnectionSettingsParameters();   
+    
+    void SetRandomCMNameL(CCreatorEngine& aEngine);
+    void SetRandomWLANNameL(CCreatorEngine& aEngine);
+    void SetRandomWLANNetModeL(CCreatorEngine& aEngine);
+    void SetRandomWLANSecurityModeL(CCreatorEngine& aEngine);
+    void SetRandomLoginNameL(CCreatorEngine& aEngine);
+    void SetRandomLoginPassL(CCreatorEngine& aEngine);
+    void SetRandomSecureAuthenticationL(CCreatorEngine& aEngine);
+    void SetRandomPromptPasswordL(CCreatorEngine& aEngine);
+    void SetRandomUseProxyL(CCreatorEngine& aEngine);
+    void SetRandomProxyAddressL(CCreatorEngine& aEngine);
+    void SetRandomProxyPortL(CCreatorEngine& aEngine);
+    void SetRandomStartPageL(CCreatorEngine& aEngine);
+    void SetRandomIPAddressL(CCreatorEngine& aEngine);
+    void SetRandomIP4NameServer1L(CCreatorEngine& aEngine);
+    void SetRandomIP4NameServer2L(CCreatorEngine& aEngine);
+    void SetRandomProtocolTypeL(CCreatorEngine& aEngine);
+    void SetRandomTelephoneNumberL(CCreatorEngine& aEngine);
+    void SetRandomBearerTypeIsdnL(CCreatorEngine& aEngine);
+    void SetRandomBearerSpeedL(CCreatorEngine& aEngine);
+    void SetRandomWapWspOptionL(CCreatorEngine& aEngine);
+    void SetRandomSubnetMaskL(CCreatorEngine& aEngine);
+    void SetRandomGatewayAddressL(CCreatorEngine& aEngine);
+    void SetRandomWlanIpAddrL(CCreatorEngine& aEngine);
+    void SetRandomIPv6NameServer1L(CCreatorEngine& aEngine);
+    void SetRandomIPv6NameServer2L(CCreatorEngine& aEngine);
+    void SetRandomDisableTextAuthL(CCreatorEngine& aEngine);
+    };
+
+
+
+#endif // __CREATORCONNECTIONSETTINGS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_connectionmethodbase.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* 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 __CCREATORCONNECTIONSETTINGSBASE_H_
+#define __CCREATORCONNECTIONSETTINGSBASE_H_
+
+#include "creator_modulebase.h"
+
+class CCreatorModuleBaseParameters;
+
+const TUint KRandomBearerType = 0xEEEEEEEE;
+
+class CCreatorConnectionSettingsBase : public CCreatorModuleBase
+    {
+public:
+    
+    virtual ~CCreatorConnectionSettingsBase(){};
+
+    virtual TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters) = 0;    
+    virtual TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse ) = 0;
+    virtual void DeleteAllConnectionMethodsL(){};
+    };
+
+#endif /*__CCREATORCONNECTIONSETTINGSBASE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_connectionmethodelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* 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 CREATORCONNECTIONMETHODELEMENT_H_
+#define CREATORCONNECTIONMETHODELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+namespace creatorconnectionmethod
+{
+    _LIT(KCm, "connectionmethod");
+    _LIT(Kconnectionname, "connectionname");
+    _LIT(Kbearertype, "bearertype");
+    _LIT(Kstartpage, "startpage");
+    _LIT(Kwapwspoption, "wapwspoption");
+    _LIT(Kprotocoltype, "protocoltype");
+    _LIT(Kloginname, "loginname");
+    _LIT(Ksecureauthentication, "secureauthentication");
+    _LIT(Kloginpass, "loginpass");
+    _LIT(Kpromptpassword, "promptpassword");
+    _LIT(Kgatewayaddress, "gatewayaddress");
+    _LIT(Ksubnetmask, "subnetmask");
+    _LIT(Kdeviceipaddr, "deviceipaddr");
+    _LIT(Kip4nameserver1, "ip4nameserver1");
+    _LIT(Kip4nameserver2, "ip4nameserver2");
+    _LIT(Kdatacalltelnumber, "datacalltelnumber");
+    _LIT(Kdatacalltypeisdn, "datacalltypeisdn");
+    _LIT(Kdatacalllinespeed, "datacalllinespeed");
+    _LIT(Kuseproxy, "useproxy");
+    _LIT(Kproxyserveraddress, "proxyserveraddress");
+    _LIT(Kproxyportnumber, "proxyportnumber");
+    _LIT(Kip6nameserver1, "ip6nameserver1");
+    _LIT(Kip6nameserver2, "ip6nameserver2");
+    _LIT(Kdisabletextauth, "disabletextauth");
+    _LIT(Kwlanname, "wlanname");
+    _LIT(Kwlanipaddr, "wlanipaddr");
+    _LIT(Kwlansecmode, "wlansecmode");
+    _LIT(Kwlannetmode, "wlannetmode");
+    
+    // Bearer type:
+    _LIT(Kwlan, "wlan");
+    _LIT(Kgprs, "gprs");
+    _LIT(Kdatacall, "datacall");
+    _LIT(Khsgsm, "hsgsm");
+    _LIT(Kembedded, "embedded");
+    _LIT(Kvpn, "vpn");
+    _LIT(Klan, "lan");
+    
+    // Data call type isdn:
+    _LIT(Kanalogue, "analogue");
+    _LIT(Kisdnv110, "isdnv110");
+    _LIT(Kisdnv120, "isdnv120");
+    
+    // Line speed:
+    _LIT(Kautomatic, "automatic");
+    // WAP wps options:
+    _LIT(Kconnectionless, "connectionless"); // ECmWapWspOptionConnectionless
+    _LIT(Kconnectionoriented, "connectionoriented"); // ECmWapWspOptionConnectionOriented
+    
+    // Protocol
+    _LIT(Kipv4, "ipv4");
+    _LIT(Kipv6, "ipv6");
+
+    // WLAN security mode:
+    _LIT(Kopen, "open");
+    _LIT(Kwep, "wep");
+    _LIT(Ke802_1x, "e802_1x");
+    _LIT(Kwpa, "wpa");
+    _LIT(Kwpa2, "wpa2");
+}
+
+class CCreatorConnectionMethodElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorConnectionMethodElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    
+protected:
+    CCreatorConnectionMethodElement(CCreatorEngine* aEngine);
+};
+
+#endif /*CREATORCONNECTIONMETHODELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_contactelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,187 @@
+/*
+* 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 CREATORCONTACTELEMENT_H_
+#define CREATORCONTACTELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+namespace creatorcontact
+{ 
+    _LIT(KContact, "contact");
+    _LIT(KContactSet, "contact-set");
+    _LIT(KContactGroup, "contactgroup");
+    _LIT(KMembers, "members");
+    _LIT(KName, "name");
+    
+    // Contact field elements:
+    _LIT(KFirstname, "firstname");
+    _LIT(KLastname, "lastname");
+    _LIT(KFirstnameReading, "firstnamereading");
+    _LIT(KLastnameReading, "lastnamereading");
+    _LIT(KPrefix, "prefix");
+    _LIT(KSuffix, "suffix");
+    _LIT(KSecondname, "secondname");
+    _LIT(KLandphoneHome, "landphonehome");
+    
+    _LIT(KMobilephoneHome, "mobilephonehome");
+    _LIT(KVideonumberHome, "videonumberhome");
+    _LIT(KFaxnumberHome, "faxnumberhome");
+    _LIT(KVoipHome, "voiphome");
+    _LIT(KEmailHome, "emailhome");
+    _LIT(KUrlHome, "urlhome");
+    _LIT(KAddrlabelHome, "addrlabelhome");
+    _LIT(KAddrpoHome, "addrpohome");
+    
+    _LIT(KAddrextHome, "addrexthome");
+    _LIT(KAddrstreetHome, "addrstreethome");
+    _LIT(KAddrlocalHome, "addrlocalhome");
+    _LIT(KAddrregionHome, "addrregionhome");
+    _LIT(KAddrpostcodeHome, "addrpostcodehome");
+    _LIT(KAddrcountryHome, "addrcountryhome");
+    _LIT(KJobtitle, "jobtitle");
+    _LIT(KCompanyname, "company");
+    
+    _LIT(KLandphoneWork, "landphonework");
+    _LIT(KMobilephoneWork, "mobilephonework");
+    _LIT(KVideonumberWork, "videonumberwork");
+    _LIT(KFaxnumberWork, "faxnumberwork");
+    _LIT(KVoipWork, "voipwork");
+    _LIT(KEmailWork, "emailwork");
+    _LIT(KUrlWork, "urlwork");
+    _LIT(KAddrlabelWork, "addrlabelwork");
+    
+    _LIT(KAddrpoWork, "addrpowork");
+    _LIT(KAddrextWork, "addrextwork");
+    _LIT(KAddrstreetWork, "addrstreetwork");
+    _LIT(KAddrlocalWork, "addrlocalwork");
+    _LIT(KAddrregionWork, "addrregionwork");
+    _LIT(KAddrpostcodeWork, "addrpostcodework");
+    _LIT(KAddrcountryWork, "addrcountrywork");
+    _LIT(KLandphoneGen, "landphonegen");
+    
+    _LIT(KMobilephoneGen, "mobilephonegen");
+    _LIT(KVideonumberGen, "videonumbergen");
+    _LIT(KFaxnumberGen, "faxnumbergen");
+    _LIT(KVoipGen, "voipgen");
+    _LIT(KPoc, "poc");
+    _LIT(KSwis, "swis");
+    _LIT(KSip, "sip");
+    _LIT(KEmailGen, "emailgen");
+    
+    _LIT(KUrlGen, "urlgen");
+    _LIT(KAddrlabelGen, "addrlabelgen");
+    _LIT(KAddrpoGen, "addrpogen");
+    _LIT(KAddrextGen, "addrextgen");
+    _LIT(KAddrstreetGen, "addrstreetgen");
+    _LIT(KAddrlocalGen, "addrlocalgen");
+    _LIT(KAddrregionGen, "addrregiongen");
+    _LIT(KAddrpostcodeGen, "addrpostcodegen");
+    
+    _LIT(KAddrcountryGen, "addrcountrygen");
+    _LIT(KPagerNumber, "pagernumber");
+    _LIT(KDtmfString, "dtmfstring");
+    _LIT(KWvAddress, "wvaddress");
+    _LIT(KDate, "date");
+    _LIT(KNote, "note");
+    _LIT(KThumbnailPath, "thumbnailpath");
+    _LIT(KThumbnailId, "thumbnailid");
+    _LIT(KRingTone, "ringtonepath");
+    _LIT(KRingToneId, "ringtoneid");
+    
+    _LIT(KCallerobjImg, "callerobjimg");
+    _LIT(KCallerobjText, "callerobjtext");
+    _LIT(KMiddlename, "middlename");
+    _LIT(KDepartment, "department");
+    _LIT(KAsstname, "asstname");
+    _LIT(KSpouse, "spouse");
+    _LIT(KChildren, "children");
+    _LIT(KAsstphone, "asstphone");
+    
+    _LIT(KCarphone, "caphone");
+    _LIT(KAnniversary, "anniversary");
+    _LIT(KSyncclass, "synchronization");
+    _LIT(KLocPrivacy, "locprivacy");
+    _LIT(KGenlabel, "genlabel");
+}
+/**
+ * Contact elements
+ */
+
+/**
+ * Base class for contact elements
+ */
+class CCreatorContactElementBase : public CCreatorScriptElement
+{
+public:
+    static CCreatorContactElementBase* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+protected:
+    CCreatorContactElementBase(CCreatorEngine* aEngine);
+};
+
+/**
+ * Contact element
+ */
+class CCreatorContactElement : public CCreatorContactElementBase
+{
+public:
+    static CCreatorContactElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+protected:
+    CCreatorContactElement(CCreatorEngine* aEngine);
+};
+
+/**
+ * Contact-set element
+ */
+class CCreatorContactSetElement : public CCreatorContactElementBase
+{
+public:
+    static CCreatorContactSetElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    virtual void AddToCacheL();
+protected:
+    CCreatorContactSetElement(CCreatorEngine* aEngine);
+};
+
+/**
+ * Contact group element
+ */
+class CCreatorContactGroupElement : public CCreatorContactElementBase
+{
+public:
+    static CCreatorContactGroupElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+protected:
+    CCreatorContactGroupElement(CCreatorEngine* aEngine);
+};
+
+/**
+ * Contact field element
+ */
+class CCreatorContactFieldElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorContactFieldElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+protected:
+    CCreatorContactFieldElement(CCreatorEngine* aEngine);
+};
+
+#endif /*CREATORCONTACTELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_contactsetcache.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* 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 CREATORCONTACTSETCACHE_H_
+#define CREATORCONTACTSETCACHE_H_
+
+#include <e32base.h>
+
+// Forward declarations
+class CContactLinkCacheImp;
+
+class CCreatorContactSet : public CBase
+{
+public:
+    static CCreatorContactSet* NewL(TInt aLinkId, TInt aNumOfExistingContacts);
+    virtual ~CCreatorContactSet();
+    void AppendL(TUint32);
+    TInt NumberOfExistingContacts() const;
+    RArray<TUint32> ContactLinks();
+    const RArray<TUint32> ContactLinks() const;
+
+    TInt LinkId() const;
+
+private:
+    CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts);    
+    //void ConstructL();
+    TInt iLinkId;
+    TInt iNumOfExistingContacts;
+    RArray<TUint32> iContactLinks;
+};
+
+class MContactLinkCache
+{
+public:
+    virtual void AppendL(CCreatorContactSet* aContactSet) = 0;
+    virtual RArray<TUint32> ContactLinks(TInt aLinkId) = 0;
+    virtual const RArray<TUint32> ContactLinks(TInt aLinkId) const = 0;    
+    virtual RPointerArray<CCreatorContactSet>& ContactSets() = 0;
+    virtual const RPointerArray<CCreatorContactSet>& ContactSets() const = 0;
+    virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const = 0;
+    virtual CCreatorContactSet& ContactSet(TInt aLinkId) = 0;
+};
+
+class ContactLinkCache
+{
+public:
+    static void InitializeL();
+    static void DestroyL();
+    
+    static MContactLinkCache* Instance();
+    
+private:
+    ContactLinkCache(){};
+    static CContactLinkCacheImp* iImp;
+};
+
+#endif /*CREATORCONTACTSETCACHE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_factory.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef TCREATORFACTORY_H_
+#define TCREATORFACTORY_H_
+
+#include "creator_modulebase.h"
+
+class CCreatorEngine;
+class CCreatorPhonebookBase;
+//class CCreatorConnectionSettingsBase;
+
+
+class TCreatorFactory{
+
+public: 
+	static CCreatorPhonebookBase* CreatePhoneBookL(CCreatorEngine* aEngine);
+	static CCreatorModuleBaseParameters* CreatePhoneBookParametersL();
+
+//    static CCreatorConnectionSettingsBase* CreateConnectionSettingsL(CCreatorEngine* aEngine);
+//    static CCreatorModuleBaseParameters* CreateConnectionSettingsParametersL();
+	
+
+};
+
+#endif /*TCREATORFACTORY_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_file.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+
+#ifndef __CREATORFiles_H__
+#define __CREATORFiles_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+
+#include <caf/cafplatform.h>
+using namespace ContentAccess;
+#include <DRMRights.h>
+
+#include <e32base.h>
+#include <bautils.h>
+#include <pathinfo.h>
+#include <apgcli.h> // RApaLsSession
+
+class CCreatorEngine;
+class CFilesParameters;
+class CDRMPermission;
+class CDRMConstraint;
+
+class CCreatorFiles : public CCreatorModuleBase
+    {
+enum TCreatorFilesState{
+    ECreatorFilesDelete,
+    ECreatorFilesStart,
+    ECreatorFilesGetDirectory,
+    ECreatorFilesAskDRMData,
+    ECreatorFilesAskDRM_CD_Counts,
+    ECreatorFilesAskDRM_CD_Minutes
+};
+public: 
+    static CCreatorFiles* NewL(CCreatorEngine* aEngine);
+    static CCreatorFiles* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorFiles();
+
+private:
+    CCreatorFiles();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
+    TInt CreateFileEntryL(CFilesParameters *aParameters, TInt aCommand);    
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+private:
+    
+    void EncryptFileL( const TDesC& aFileName, const TDesC& aOutFileName, CFilesParameters *aParameters );
+    void SetPermissionsL( CMetaDataArray* aMetaData, const TDesC& aOutFileName, CFilesParameters *aParameters );
+    void SetMimeTypeL( const TDesC& aFileName, TDes8& aMime, CFilesParameters *aParameters );
+    TBool AskDRMDataFromUserL();
+    void StorePathsForDeleteL( CDesCArray& aPaths );
+    void GenerateFileNameL( TFileName& aRootName );
+    
+private:
+    CFilesParameters* iParameters;
+    CFilesParameters* iUserParameters;
+    TFileName iDirectoryQueriedFromUser;
+    RFs& iFs;
+    RApaLsSession iApaLs;
+    CDesCArray* iFilePaths;
+    TInt iFileId;
+
+public:
+    };
+
+
+class CFilesParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    HBufC*          iFullFilePath;
+    TInt            iFileCommand;
+    CDRMPermission* iPermission;
+    TBool           iEncrypt;
+    
+public:
+    CFilesParameters();
+    CFilesParameters( CFilesParameters& aCopy );
+    ~CFilesParameters();
+    };
+
+
+
+#endif // __CREATORFiles_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_fileelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* 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 CREATORFILEELEMENT_H_
+#define CREATORFILEELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+namespace creatorfile
+{
+    _LIT(KFile, "file");
+    _LIT(KType, "type");
+    _LIT(KDirectory, "directory");
+    _LIT(KDefaultDir, "c:\\data");
+    _LIT(KEncryption, "encryption");
+    _LIT(KDRMRight, "right");
+    _LIT(KDRMFL, "DRM-FL");
+    _LIT(KDRMCD, "DRM-CD");
+    _LIT(KDRMPlayRight, "play");
+    _LIT(KDRMDisplayRight, "display");
+    _LIT(KDRMPrintRight, "print");
+    _LIT(KDRMExecuteRight, "execute");
+    _LIT(KDRMCount, "count");
+    _LIT(KDRMInterval, "interval");
+    _LIT(KDRMStartTime, "starttime");
+    _LIT(KDRMEndTime, "endtime");
+    _LIT(KDRMAccumulated, "accumulated");
+}
+
+class CDRMConstraint;
+class CFilesParameters;
+
+class CCreatorFileElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorFileElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    
+protected:
+    CCreatorFileElement(CCreatorEngine* aEngine);
+    TInt GetFileCommandL( const TDesC& aFileIdStr, TBool aRandom ) const;
+private:
+    void ParseDRMElementsL( CCreatorScriptElement* aField, CFilesParameters* aParam );
+    void ParseDRMConstraintsL( CCreatorScriptElement* aRight, CDRMConstraint* aConstraint );
+    TTimeIntervalSeconds ParseTimeInterval( TDesC& aTimeString );
+private: // Data
+    TInt64 iTimeZone;
+};
+
+#endif // CREATORFILEELEMENT_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_landmark.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef LANDMARKS_H_
+#define LANDMARKS_H_
+
+#include "engine.h"
+#include "creator_modulebase.h"
+
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+class CLandmarkParameters;
+class CPosLandmarkDatabase;
+class CPosLmOperation;
+
+static const TInt KLandmarkFieldLength = 256;
+
+class CCreatorLandmarks : public CCreatorModuleBase
+    {
+public: 
+    static CCreatorLandmarks* NewL(CCreatorEngine* aEngine);
+    static CCreatorLandmarks* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorLandmarks();
+
+private:
+    CCreatorLandmarks();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase    
+    TPosLmItemId GetCategoryIdL( TPosLmGlobalCategory aGlobalCategoryID );
+
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    
+    TInt CreateLandmarkEntryL(CLandmarkParameters *aParameters);
+    static TPosLmGlobalCategory GetCategoryIdL(const TDesC& aCategoryStr);
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+private:
+    CPosLandmarkDatabase* iLandmarkDb;    
+    CLandmarkParameters* iParameters;
+    CPosLmOperation* iLmOperation;
+    RArray<TPosLmItemId> iEntryIds; // TPosLmItemId (==TUint32) CPosLandmark::LandmarkId()
+public:
+    };
+
+
+class CLandmarkParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    HBufC*              iName;
+    RArray<TUint>       iCategories;
+    HBufC*              iStreet;
+    HBufC*              iCity;    
+    HBufC*              iState;
+    HBufC*              iCountry;
+    HBufC*              iPostCode;    
+    HBufC*              iDescription;
+    HBufC*              iPhonenumber;
+    HBufC*              iUrl;
+    TReal64             iLatitude;
+    TReal64             iLongitude;
+    TReal32             iPositionAccuracy;
+    TReal32             iAltitude;
+    TReal32             iAltitudeAccuracy;
+    
+    void SetRandomNameL(CCreatorEngine& aEngine);
+    void SetRandomUrlL(CCreatorEngine& aEngine);
+    void AddRandomCategoryL(CCreatorEngine& aEngine);
+    void SetRandomStreetL(CCreatorEngine& aEngine);
+    void SetRandomCityL(CCreatorEngine& aEngine);
+    void SetRandomStateL(CCreatorEngine& aEngine);
+    void SetRandomCountryL(CCreatorEngine& aEngine);
+    void SetRandomPostCodeL(CCreatorEngine& aEngine);
+    void SetRandomLatitudeL(CCreatorEngine& aEngine);
+    void SetRandomLongitudeL(CCreatorEngine& aEngine);
+    void SetRandomPositionAccuracyL(CCreatorEngine& aEngine);
+    void SetRandomAltitudeL(CCreatorEngine& aEngine);
+    void SetRandomAltitudeAccuracyL(CCreatorEngine& aEngine);
+    void SetRandomDescriptionL(CCreatorEngine& aEngine);
+    void SetRandomPhoneNumberL(CCreatorEngine& aEngine);
+    
+private:
+    
+public:
+    CLandmarkParameters();
+    ~CLandmarkParameters();
+    };
+#endif /*LANDMARKS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_landmarkelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef CREATORLANDMARKELEMENT_H_
+#define CREATORLANDMARKELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+namespace creatorlandmark
+{
+    _LIT(KLandmark, "landmark");
+    _LIT(KName, "name");
+    _LIT(KCategory, "category");
+    _LIT(KDescription, "description");
+    _LIT(KStreet, "street");
+    _LIT(KPostalcode, "postalcode");
+    _LIT(KCity, "city");
+    _LIT(KState, "state");
+    _LIT(KCountry, "country");
+    _LIT(KPhonenumber, "phonenbr");
+    _LIT(KUrl, "url");
+    _LIT(KLatitude, "latitude");
+    _LIT(KLongitude, "longitude");
+    _LIT(KPositionaccuracy, "positionaccuracy");
+    _LIT(KAltitude, "altitude");
+    _LIT(KAltitudeaccuracy, "altitudeaccuracy");
+}
+
+class CCreatorLandmarkElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorLandmarkElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    
+protected:
+    CCreatorLandmarkElement(CCreatorEngine* aEngine);
+};
+
+#endif /*CREATORLANDMARKELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_log.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* 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 __CREATORLOGS_H__
+#define __CREATORLOGS_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+
+
+#include <e32base.h>
+//#include <logwrap.h>
+#include <logwraplimits.h>
+#include <logcli.h>
+//#include <logeng.h>
+#include <logengdurations.h>
+
+
+
+class CCreatorEngine;
+class CLogsParameters;
+
+
+class CCreatorLogs : public CActive, public MCreatorModuleBase, public MUIObserver
+    {
+enum TCreatorLogsStatus{
+    ECreatorLogsDelete = 0,
+    ECreatorLogsStart
+};
+
+public: 
+    static CCreatorLogs* NewL(CCreatorEngine* aEngine);
+    static CCreatorLogs* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorLogs();
+
+private:
+    CCreatorLogs();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+    void RunL();  // from CActive
+	void DoCancel();  // from CActive
+
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData);    
+    
+    TInt CreateMissedCallEntryL(CLogsParameters *aParameters);    
+    TInt CreateReceivedCallEntryL(CLogsParameters *aParameters);
+    TInt CreateDialledNumberEntryL(CLogsParameters *aParameters);
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+private:
+    CCreatorEngine* iEngine;
+    TInt iCommand;
+    TInt iEntriesToBeCreated;
+    TInt iDummy;
+
+    CLogClient* iLogClient;
+    CLogEvent* iLogEvent;
+    CActiveSchedulerWait iLogWriteWait;
+
+    CLogsParameters* iParameters;
+    RArray<TInt> iEntryIds; // TLogId ( == TInt32) CLogEvent::Id()
+
+public:
+    };
+
+
+class CLogsParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    /*HBufC*              iMissedCallPhoneNumber;
+    TTime               iMissedCallEventTime;
+	
+    HBufC*              iReceivedCallPhoneNumber;
+    TTime               iReceivedCallEventTime;
+    TLogDuration        iReceivedCallDuration;
+
+    HBufC*              iDialledNumberPhoneNumber;
+    TTime               iDialledNumberEventTime;
+    TLogDuration        iDialledNumberDuration;*/
+    HBufC*              iPhoneNumber;
+    TTime               iEventTime;
+    TLogDuration        iDuration;
+
+public:
+    CLogsParameters();
+    ~CLogsParameters();
+    };
+
+
+
+#endif // __CREATORLOGS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_logelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef CREATORLOGELEMENT_H_
+#define CREATORLOGELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+namespace creatorlog
+{
+    _LIT(KLog, "log");
+    _LIT(KDirection, "direction");
+    _LIT(KDuration, "duration");
+    _LIT(KPhonenumber, "phonenumber");
+    _LIT(KDatetime, "datetime");
+    _LIT(KMissed, "missed");
+    _LIT(KIn, "in");
+    _LIT(KOut, "out");
+}
+
+class CCreatorLogElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorLogElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    
+protected:
+    CCreatorLogElement(CCreatorEngine* aEngine);
+    TInt GetLogCommandL( const TDesC& aFileIdStr, TBool aRandom ) const;
+};
+
+#endif /*CREATORLOGELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_mailbox.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,190 @@
+/*
+* 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 __CREATORMAILBOXES_H__
+#define __CREATORMAILBOXES_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+
+
+#include <e32base.h>
+#include <SenduiMtmUids.h>
+#include <smtpset.h>
+#include <imapset.h>
+#include <pop3set.h>
+#include <mtmuibas.h>
+#include <iapprefs.h>
+#include <cemailaccounts.h>
+
+class CCreatorEngine;
+class CMailboxesParameters;
+
+const TInt KDefaultSmtpPort = 25;
+
+enum TMailboxType
+    {
+    EMailboxPOP3,
+    EMailboxIMAP4
+    };
+
+class CCreatorMailboxes : public CCreatorModuleBase, public MMsvSessionObserver
+    {
+public: 
+    static CCreatorMailboxes* NewL(CCreatorEngine* aEngine);
+    static CCreatorMailboxes* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorMailboxes();
+
+private:
+    CCreatorMailboxes();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
+    void StoreIMEIToEntryL(const TMsvId aMailboxId);
+    void GetIMEIFromThePhoneL();
+    
+    void PopulateSmtpSettingsL( 
+            CEmailAccounts& aEmailAccount, 
+            CImSmtpSettings& aSmtpSettings, 
+            CImIAPPreferences& aIApSettings, 
+            const CMailboxesParameters& aParameters );
+    
+    void PopulateImapSettingsL( 
+            CEmailAccounts& aEmailAccount, 
+            CImImap4Settings& aImapSettings, 
+            CImIAPPreferences& aIApSettings, 
+            const CMailboxesParameters& aParameters );
+    
+    void PopulatePopSettingsL( 
+            CEmailAccounts& aEmailAccount, 
+            CImPop3Settings& aPopSettings, 
+            CImIAPPreferences& aIApSettings, 
+            const CMailboxesParameters& aParameters );
+
+
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    
+    TInt CreateMailboxEntryL(CMailboxesParameters *aParameters);
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+
+private:
+    CMailboxesParameters* iParameters;
+    TBuf<50> iIMEI;
+    RArray<TInt> iEntryIds;
+
+public:
+    };
+
+
+class CMailboxesParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+//    HBufC*          iMailboxName;
+//    HBufC*          iAccessPoint;
+//    HBufC*          iMyMailAddress;
+//    HBufC*          iOutgoingMailServer;
+//    TBool           iSendMessageImmediately;
+//    TBool           iSendCopyToSelf;
+//    TBool           iIncludeSignature;
+//    HBufC*          iUserName;
+//    HBufC*          iPassword;
+//    HBufC*          iIncomingMailServer;
+//    TMailboxType    iMailboxType;  // IMAP4 or POP3
+//    TBool           iSecurityOn; // SecureSockets
+//    TBool           iSSLWrapper; // SSL Wrapper
+//    TBool           iAPOPSecureLogin; // POP3 only
+//    TBool           iRetrieveAttachment; // IMAP4 only
+//    TInt32          iRetrieveHeaders;  // IMAP4 only
+
+    enum TGetEmailOption
+    {
+    EUndef = 0,
+    EGetHeaders,
+    EGetBodyText,
+    EGetBodyTextAndAttachments,
+    EGetAttachments,
+    EGetBodyAlternativeText,
+    EGetEmailOptionLast
+    };
+
+    HBufC*  iMailboxName;    
+    HBufC*  iIncomingLoginName;
+    HBufC*  iIncomingPassword;
+    HBufC*  iIncomingServerName;
+    HBufC*  iIncomingConnectionMethod;
+    HBufC*  iIncomingFolderPath;
+    HBufC*  iPathSeparator;
+    HBufC*  iOutgoingLoginName;
+    HBufC*  iOutgoingPassword;
+    HBufC*  iOutgoingServerName;
+    HBufC*  iOutgoingConnectionMethod;
+    HBufC*  iOwnEmailAddress;
+    HBufC*  iOwnEmailAlias;
+    HBufC*  iReceiptAddress;
+    HBufC*  iReplyToAddress;
+    
+    TInt    iIncomingPort;
+    TInt    iAttachmentSizeLimit;
+    TInt    iBodyTextSizeLimit;
+    TInt    iAttachmentFetchSize;
+    TInt    iImapIdleTimeout;
+    TInt    iMaxEmailSize;
+    TInt    iSyncRate;
+    TInt    iInboxSyncLimit; // -1 = All
+    TInt    iMailboxSyncLimit; // -1 = All
+    TInt    iOutgoingPort;
+    TInt    iToCCIncludeLimit;
+    
+    TBool   iIncomingSSLWrapper;
+    TBool   iIncomingSecureSockets;
+    TBool   iAcknowledgeReceipts;
+    TBool   iAutoSendOnConnect;
+    TBool   iDeleteEmailsAtDisconnect;
+    TBool   iImapIdleCommand;
+    TBool   iMarkSeenInSync;
+    TBool   iEnableExpungeMode;
+    TBool   iUseApop;
+    TBool   iDisconnectedUserMode;
+    TBool   iOutgoingSSLWrapper;
+    TBool   iOutgoingSecureSockets;
+    TBool   iIncludeSignature;
+    TBool   iAddVCard;
+    TBool   iRequestReceipts;
+    TBool   iSmtpAuth;
+    
+    TGetEmailOption iGetEmailOptions;   
+    TFolderSubscribeType iSubscribeType;    
+    TFolderSyncType iSyncType;  
+    TImSMTPSendCopyToSelf iSendCopyToSelf;
+    TImSMTPSendMessageOption iSendOption;    
+    TMailboxType iMailboxType;  // IMAP4 or POP3
+    
+public:
+    CMailboxesParameters();
+    ~CMailboxesParameters();
+    };
+
+
+
+#endif // __CREATORMAILBOXES_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_mailboxelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* 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 CREATORMAILBOXELEMENT_H_
+#define CREATORMAILBOXELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+class CMailboxesParameters;
+
+namespace creatormailbox
+{
+    _LIT(Kmailbox, "mailbox");
+    _LIT(Kname, "name");
+    _LIT(Kincomingport, "incomingport");
+    _LIT(Kincomingsslwrapper, "incomingsslwrapper");
+    _LIT(Kincomingsecuresockets, "incomingsecuresockets");
+    _LIT(Kincomingloginname, "incomingloginname");
+    _LIT(Kincomingpassword, "incomingpassword");
+    _LIT(Kincomingservername, "incomingservername");
+    _LIT(Kincomingconnectionmethod, "incomingconnectionmethod");
+    _LIT(Kacknowledgereceipts, "acknowledgereceipts");
+    _LIT(Kattachmentsizelimit, "attachmentsizelimit");
+    _LIT(Kautosendonconnect, "autosendonconnect");
+    _LIT(Kbodytextsizelimit, "bodytextsizelimit");
+    _LIT(Kdeletemailsatdisconnect, "deletemailsatdisconnect");
+    _LIT(Kattachmentfetchsize, "attachmentfetchsize");
+    _LIT(Kincomingfolderpath, "incomingfolderpath");
+    _LIT(Kpathseparator, "pathseparator");
+    _LIT(Kgetemailoptions, "getemailoptions");
+    _LIT(Kimapidlecommand, "imapidlecommand");
+    _LIT(Kimapidletimeout, "imapidletimeout");
+    _LIT(Kmaxemailsize, "maxemailsize");
+    _LIT(Ksubscribetype, "subscribetype");
+    _LIT(Ksyncrate, "syncrate");
+    _LIT(Kfoldersynctype, "foldersynctype");
+    _LIT(Kmarkseeninsync, "markseeninsync");
+    _LIT(Kenableexpungemode, "enableexpungemode");
+    _LIT(Kuseapopsecurelogin, "useapopsecurelogin");
+    _LIT(Kinboxsynclimit, "inboxsynclimit");
+    _LIT(Kmailboxsynclimit, "mailboxsynclimit");
+    _LIT(Kdisconnectedusermode, "disconnectedusermode");
+    _LIT(Koutgoingport, "outgoingport");
+    _LIT(Koutgoingsslwrapper, "outgoingsslwrapper");
+    _LIT(Koutgoingsecuresockets, "outgoingsecuresockets");
+    _LIT(Koutgoingloginname, "outgoingloginname");
+    _LIT(Koutgoingpassword, "outgoingpassword");
+    _LIT(Koutgoingservername, "outgoingservername");
+    _LIT(Koutgoingconnectionmethod, "outgoingconnectionmethod");
+    _LIT(Kincludesignature, "includesignature");
+    _LIT(Kaddvcard, "addvcard");
+    _LIT(Kownemail, "ownemail");
+    _LIT(Kemailalias, "emailalias");
+    _LIT(Kreceiptaddress, "receiptaddress");
+    _LIT(Kreplytoaddress, "replytoaddress");
+    _LIT(Krequestreceipts, "requestreceipts");
+    _LIT(Ksmtpauth, "smtpauth");
+    _LIT(Kcopytoself, "copytoself");
+    _LIT(Ksendoption, "sendoption");
+    _LIT(Ktoccincludelimit, "toccincludelimit");
+    
+    
+    // Get email options:
+    _LIT(Kgetheaders, "getheaders");
+    _LIT(Kgetbodytext, "getbodytext");
+    _LIT(Kgetbodytextandattachments, "getbodytextandattachments");
+    _LIT(Kgetattachments, "getattachments");
+    _LIT(Kgetbodyalternativetext, "getbodyalternativetext");
+    
+    // Subscribe types:
+    _LIT(Kupdateneither, "updateneither");
+    _LIT(Kupdatelocal, "updatelocal");
+    _LIT(Kupdateremote, "updateremote");
+    _LIT(Kupdateboth, "updateboth");
+    
+    // Folder sync. types:
+    _LIT(Kusecombination, "usecombination");
+    _LIT(Kuselocal, "uselocal");
+    _LIT(Kuseremote, "useremote");
+    
+    // Send copy to self option:
+    _LIT(Kno, "no");
+    _LIT(Kto, "to");
+    _LIT(Kcc, "cc");
+    _LIT(Kbcc, "bcc");
+    
+    // Send option:
+    _LIT(Kimmediately, "immediately");
+    _LIT(Konnextconnection, "onnextconnection");
+    _LIT(Konrequest, "onrequest");
+    
+    // Mailbox types:
+    _LIT(KMailboxType, "type");
+    _LIT(Kpop3, "pop3");
+    _LIT(Kimap4, "imap4");
+    _LIT(Ksyncml, "syncml");
+}
+
+class CCreatorMailboxElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorMailboxElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    
+protected:
+    CCreatorMailboxElement(CCreatorEngine* aEngine);
+    TBool SetTextParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
+    TBool SetBooleanParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
+    TBool SetIntegerParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
+    TBool SetEnumParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* aParams, TBool aSetRandom );
+    
+    TBool GetBooleanValueL(const TDesC& aElemContent, TBool aSetRandom);
+};
+
+#endif /*CREATORMAILBOXELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_message.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,197 @@
+/*
+* 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 __CREATORMESSAGES_H__
+#define __CREATORMESSAGES_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+
+#include <e32base.h>
+#include <e32std.h>
+#include <msvapi.h>
+#include <mtclbase.h>
+#include <mtclreg.h>
+#include <smut.h>
+#include <smuthdr.h>
+#include <smsclnt.h>
+#include <miutset.h>
+#include <mmsclient.h>
+#include <ircmtm.h>
+#include <irmsgtypeuid.h>
+#include <btmsgtypeuid.h>
+#include <bif.h>
+#include <biouids.h>
+#include <miuthdr.h>
+
+#include <cmsvmimeheaders.h>
+#include <smtcmtm.h>
+#include <ircmtm.h>
+#include <btcmtm.h>
+#include <mmsvattachmentmanager.h>
+
+
+class CCreatorEngine;
+class CMessagesParameters;
+class CAsyncWaiter; 
+
+enum TMessageType
+    {
+    ESMS = 0,
+    EMMS,
+    EAMS,
+    EEmail,
+    ESmartMessage,
+    EIrMessage,
+    EBTMessage
+    };
+
+enum TFolderType
+    {
+    EInbox = 0,
+    EDrafts,
+    EOutbox,
+    ESent,
+    EMailbox
+    };
+    
+class CRecipientInfo : public CBase
+{
+public:
+    CRecipientInfo();
+    virtual ~CRecipientInfo();
+    
+    void SetPhoneNumber(HBufC* aPhone);
+    void SetEmailAddress(HBufC* aEmail);
+    const HBufC* PhoneNumber() const;
+    const HBufC* EmailAddress() const;
+    
+private:
+    HBufC* iPhoneNumber;
+    HBufC* iEmailAddress;
+};
+
+class CCreatorMessages : public CCreatorModuleBase, public MMsvSessionObserver
+    {
+enum TCreatorMessagesStatus{
+    ECreatorMessagesDelete = 0,
+    ECreatorMessagesStart, 
+    ECreatorMessagesMessageType,
+    ECreatorMessagesFolderType,
+    ECreatorMessagesMessageStatus, 
+    ECreatorMessagesCharsInBody,
+    ECreatorMessagesAttachment,
+};
+
+public: 
+    static CCreatorMessages* NewL(CCreatorEngine* aEngine);
+    static CCreatorMessages* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorMessages();
+
+private:
+    CCreatorMessages();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+    TInt CreateSMSEntryL(const CMessagesParameters& parameters);
+    TInt CreateMMSEntryL(const CMessagesParameters& parameters);
+    TInt CreateAMSEntryL(const CMessagesParameters& parameters);
+    TInt CreateEmailEntryL(const CMessagesParameters& parameters);
+    TInt CreateSmartMessageEntryL(const CMessagesParameters& parameters);
+    TInt CreateObexEntryL(TUid aMtm, const CMessagesParameters& parameters);
+    void HandleAttachementsL(const CMessagesParameters& parameters, CMsvStore* store, TInt err );
+    void HandleAttachementL(CMsvStore* store, TInt err, TFileName& sourceFileName );
+
+    CMsvEntrySelection* DoGetListOfAccountsL(CMsvSession& aSession, TUid aMtm, TBool aAlwaysListHidden);
+    TMsvId DefaultServiceForMTML(CMsvSession& aSession, TUid aMtm, TBool aFindFirstServiceIfNoDefault);
+
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
+    
+    void AddRecipientsL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
+    void GetLinkedAddressesL(   RPointerArray<HBufC>& aAddressArray, 
+                                const RArray<TLinkIdParam>& aLinkIds, 
+                                TBool aUseEmailAddress,
+                                TInt aNumOfExistingAddresses );
+    
+    void GetAllRecipientsL(RPointerArray<HBufC>& aRecipientArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
+    void SetSenderToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress);
+    void SetRecipientToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress);
+    void AddSenderToMtmAddresseeL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
+    void AddMtmSenderL(CMmsClientMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress );
+    void GetSendersL(RPointerArray<HBufC>& aSenderArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress, TInt aMaxNum );
+    void DeleteAllMessagesL( TBool aOnlyCreatedWithCreator );
+    void DeleteAllFromFolderL( const TMsvId aContext, CMsvSession* aSession, CSmsClientMtm* aClientMtm, TBool aOnlyCreatedWithCreator = EFalse );
+    
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
+    
+    TInt CreateMessageEntryL(CMessagesParameters *aParameters, TBool aTakeUserGivenParameters=EFalse);    
+    TInt CreateRandomMessageEntryL(TInt aCommand);
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+private:
+    CMessagesParameters*    iParameters;
+    TMessageType            iMessageType;
+    TFolderType             iFolderType;
+    TInt                    iDefinedMessageLength;
+    CArrayFixFlat<TInt>*    iAttachments; 
+    //RPointerArray<HBufC>    iAttachmentPaths;
+    TBool                   iCreateAsUnread;
+    TMsvId                  iUserSelectedMailbox;
+    HBufC*                  iTmpPhoneNumber;
+    HBufC*                  iTmpEmail;
+    RArray<TInt>            iEntryIds; // TMsvId ( == TInt32 ) TMsvEntry::Id()
+    CAsyncWaiter* iWaiter;
+    RPointerArray<HBufC>    iSenderArray;
+    RPointerArray<HBufC>    iRecipientArray;
+public:
+    };
+
+
+class CMessagesParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    TMessageType            iMessageType;
+    TFolderType             iFolderType;
+    HBufC*                  iSenderAddress;    
+    HBufC*                  iRecipientAddress;
+    RPointerArray<HBufC>    iRecipientAddressArray;
+    HBufC*                  iMessageSubject;
+    HBufC*                  iMessageBodyText;
+    CArrayFixFlat<TInt>*    iAttachments; 
+    RPointerArray<HBufC>    iAttachmentPaths;
+    TInt                    iDefinedMessageLength;
+    TUid                    iBIOMessageType;
+    TBool                   iCreateAsUnread;
+    RArray<TLinkIdParam>    iRecipientLinkIds;
+    RArray<TLinkIdParam>    iSenderLinkIds;
+    TInt                    iNumberOfExistingRecipients;
+    TInt                    iNumberOfExistingSenders;
+
+public:
+    CMessagesParameters();
+    ~CMessagesParameters();
+    };
+
+
+
+#endif // __CREATORMESSAGES_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_messageelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* 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 CREATORMESSAGEELEMENT_H_
+#define CREATORMESSAGEELEMENT_H_
+
+#include "creator_scriptelement.h"
+#include "creator_message.h"
+
+namespace creatormsg
+{
+    _LIT(KMessage, "message");
+    _LIT(KType, "type");
+    _LIT(KTo, "to");
+    _LIT(KFrom, "from");
+    _LIT(KFolder, "folder");
+    _LIT(KSubject, "subject");
+    _LIT(KText, "text");
+    _LIT(KAttachmentPath, "attachmentpath");
+    _LIT(KAttachmentId, "attachmentid");
+    _LIT(KStatus, "status");
+    _LIT(KSms, "sms");
+    _LIT(KMms, "mms");
+    _LIT(KAms, "ams");
+    _LIT(KEmail, "email");
+    _LIT(KSmart, "smart");
+    _LIT(KBt, "bt");
+    _LIT(KIr, "ir");
+    _LIT(KSent, "sent");
+    _LIT(KInbox, "inbox");
+    _LIT(KDraft, "draft");
+    _LIT(KOutbox, "outbox");
+    _LIT(KMailbox, "mailbox");
+    _LIT(KRead, "read");
+    _LIT(KNew, "new");
+}
+
+/*
+ * Builds message parameters from the parsed script and adds a command to the engine 
+ */
+class CCreatorMessageElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorMessageElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+protected:    
+    CCreatorMessageElement(CCreatorEngine* aEngine);
+    /*
+     * Creates message address. The address type is based on the message type.
+     * @return Phone number string for SMS, MMS, AMS and Smart messages. Email address for other types.
+     * @param msgType Message type.
+     */
+    HBufC* CreateMessageAddressLC(const TDesC& msgType);
+    /*
+     * Sets message type to parameters
+     * @param aParameters Message parameters
+     * @param aMsgTypeStr Message type string
+     */
+    void SetMessageTypeL(CMessagesParameters& aParameters, const TDesC& aMsgTypeStr ) const;
+    /*
+     * Gets length of the random data
+     * @return Length of the random data
+     * @param aRandomLenStr String defining the random length (from the script)
+     * @param aMsgType Message type string
+     */
+    TInt GetRandomBodyLengthL(const TDesC& aRandomLenStr, const TDesC& aMsgType ) const;
+    /*
+     * Gets maximum length of the body text
+     * @return Maximum length of the body text
+     * @param aMsgType Message type string
+     */
+    TInt GetMaxBodyLength( const TDesC& aMsgType ) const;
+
+};
+    
+
+#endif /*CREATORMESSAGEELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_modulebase.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,188 @@
+/*
+* 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 __CREATOR_MODULEBASE_H__
+#define __CREATOR_MODULEBASE_H__
+
+#include <e32base.h>
+
+#include "engine.h"
+#include "creator_traces.h"
+
+// Dictionary uids for each Creator module.
+// Dictionaries are for storing item identifiers created by Creator.
+// Item identifiers are for enabling deletion of only items created by Creator. 
+const TUid KUidDictionaryUidContacts         = { 0x00 };
+const TUid KUidDictionaryUidContactGroups    = { 0x01 };
+const TUid KUidDictionaryUidCalendar         = { 0x02 };
+const TUid KUidDictionaryUidBrowserBookmarks = { 0x03 };
+const TUid KUidDictionaryUidFiles            = { 0x04 };
+const TUid KUidDictionaryUidLogs             = { 0x05 };
+const TUid KUidDictionaryUidMessages         = { 0x06 };
+const TUid KUidDictionaryUidMailbox          = { 0x07 };
+const TUid KUidDictionaryUidIAP              = { 0x08 };
+const TUid KUidDictionaryUidIMPS             = { 0x09 };
+const TUid KUidDictionaryUidNotes            = { 0x0A };
+const TUid KUidDictionaryUidLandmarks        = { 0x0B };
+const TUid KUidDictionaryUidBrowserSavedPg   = { 0x0C };
+const TUid KUidDictionaryUidBrowserBookmarkF = { 0x0D };
+const TUid KUidDictionaryUidBrowserSavedPgF  = { 0x0E };
+
+class CCreatorEngine;
+class MCreatorModuleBaseParameters;
+class CCommandParser;
+
+_LIT(KSavingText, "Saving");
+_LIT(KDeletingText, "Deleting");
+
+class MCreatorModuleBase
+    {
+public:
+
+private:
+    // constructs the module, add "iEngine = aEngine" and other construction stuff to the body
+    virtual void ConstructL( CCreatorEngine* aEngine ) = 0;
+
+public:
+    // this one is called when user select some features directly from menu, not running a script
+    // should call CreateRandomData() function
+    // returns ETrue when success, EFalse when user has cancelled
+    virtual TBool AskDataFromUserL( TInt aCommand ) = 0;
+    virtual void DeleteAllL() = 0;
+    virtual void DeleteAllCreatedByCreatorL() = 0;
+    };
+
+
+class CCreatorModuleBase : public CBase, public MCreatorModuleBase, public MUIObserver
+    {
+
+public:
+    enum TCreatorModuleStatus
+        {
+        ECreatorModuleDelete = 0, 
+        ECreatorModuleStart
+        };
+    
+    CCreatorModuleBase()
+        {
+        iEntriesToBeCreated = 1; 
+        }
+    
+    virtual TBool AskDataFromUserL(TInt aCommand)
+        {
+        iCommand = aCommand;
+        return EFalse;// will finish user interaction and engine will shutdown modules
+        }
+    
+    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
+        {
+        LOGSTRING("Creator: CCreatorModuleBase::QueryDialogClosedL");
+        
+        if( aPositiveAction == EFalse )
+            {
+            iEngine->ShutDownEnginesL();
+            return;
+            }
+        const TDesC* showText = &KSavingText;
+        TBool finished(EFalse);
+        TBool retval(ETrue);
+        switch(aUserData)
+            {
+            case ECreatorModuleDelete:
+                showText = &KDeletingText;
+                iEntriesToBeCreated = 1;
+                finished = ETrue;
+                break;
+            case ECreatorModuleStart:
+                finished = ETrue;
+                break;
+            default:
+                //some error
+                retval = EFalse;
+                break;
+            }
+        if( retval == EFalse )
+            {
+            iEngine->ShutDownEnginesL();
+            }
+        else if( finished )
+            {
+            // add this command to command array
+            iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
+            // started exucuting commands
+            iEngine->ExecuteFirstCommandL( *showText );
+            }
+        }
+
+protected:
+    // constructs the module, add "iEngine = aEngine" and other construction stuff to the body
+    virtual void ConstructL(CCreatorEngine* aEngine)
+        {
+        iEngine = aEngine;
+        };
+    
+protected:
+    CCreatorEngine* iEngine;
+    TInt iCommand;
+    TInt iEntriesToBeCreated;
+    TInt iDummy;
+    };
+
+class MCreatorModuleBaseParameters
+    {
+    // a base class for the parameters, no default implementation
+    
+    public:
+    	enum TParseParams
+    	{
+    	EParamNone = 0,
+    	ECalendarMeeting,
+    	ECalendarMemo,
+    	ECalendarAnniv,
+    	ECalendarTodo
+    	};
+    
+public:
+	virtual void ParseL(CCommandParser* /*aParser*/, TParseParams /*aCase = 0*/) = 0;
+
+	
+    };
+    
+// Following struct represents the parameters that links for example contact groups
+// to contac-sets.
+typedef struct 
+    {
+    TInt iLinkId; // ID
+    TInt iLinkAmount; // Amount of elements in linked set 
+    } TLinkIdParam;
+
+        
+class CCreatorModuleBaseParameters : public CBase, public MCreatorModuleBaseParameters
+        {
+        public:
+        virtual void ParseL(CCommandParser* /*aParser*/, TParseParams /*aCase = 0*/){};
+        virtual TInt ScriptLinkId() const {return -1;};
+        virtual void SetScriptLinkId(TInt) {};
+        // a base class for the parameters, no default implementation
+        };
+        
+
+
+
+#endif  // __CREATOR_MODULEBASE_H__
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_note.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* 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 __CREATORNOTEPAD_H__
+#define __CREATORNOTEPAD_H__
+
+#include "engine.h"
+#include "creator_modulebase.h"
+#include "creator_notepadwrapper.h"
+
+#include <e32base.h>
+
+static const TInt KNotepadFieldLength = 1024;
+
+class CCreatorEngine;
+class CNotepadParameters;
+class CCreatorNotepadWrapper;
+
+
+class CCreatorNotepad : public CCreatorModuleBase
+    {
+public: 
+    static CCreatorNotepad* NewL(CCreatorEngine* aEngine);
+    static CCreatorNotepad* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorNotepad();
+
+private:
+    CCreatorNotepad();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+public:
+    TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    
+    TInt CreateNoteEntryL(CNotepadParameters *aParameters);
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+
+private:
+    CCreatorNotepadWrapper* iNotepadWrapper;
+
+    CNotepadParameters* iParameters;
+    RFs& iFs;
+
+public:
+    };
+
+
+class CNotepadParameters : public CCreatorModuleBaseParameters
+    {
+public: 
+    HBufC*              iNoteText;
+
+public:
+    CNotepadParameters();
+    ~CNotepadParameters();
+    };
+
+
+
+#endif // __CREATORNOTEPAD_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_noteelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* 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 CREATORNOTEELEMENT_H_
+#define CREATORNOTEELEMENT_H_
+
+#include "creator_scriptelement.h"
+
+namespace creatornote
+{
+    _LIT(KNote, "note");
+    _LIT(KText, "text");
+}
+
+class CCreatorNoteElement : public CCreatorScriptElement
+{
+public:
+    static CCreatorNoteElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+    void ExecuteCommandL();
+    
+protected:
+    CCreatorNoteElement(CCreatorEngine* aEngine);
+};
+
+#endif /*CREATORNOTEELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_notepadwrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __CREATORNOTEPADWRAPPER_H__
+#define __CREATORNOTEPADWRAPPER_H__
+
+//#include "engine.h"
+//#include "creator_modulebase.h"
+
+
+#include <e32base.h>
+#include <QPluginLoader>
+#include <NotesEditorInterface>
+#include <AgendaUtil>
+#include <AgendaEntry>
+
+
+class CCreatorNotepadWrapper : public CBase
+	{
+	public:
+		static CCreatorNotepadWrapper* NewL();
+		static CCreatorNotepadWrapper* NewLC();
+		~CCreatorNotepadWrapper();
+		
+	private:
+		CCreatorNotepadWrapper();
+		void ConstructL();
+		
+	public:
+		TInt CreateNoteL( const TDesC& aText );
+		void DeleteAllL();
+		
+	private:
+		AgendaUtil *iAgendaUtil;
+		NotesEditorInterface *iNotepadApi;	//QT Notes api
+		QPluginLoader* iNotesEditorPluginLoader; // for loading QT Notes api
+	};
+
+#endif // __CREATORNOTEPADWRAPPER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_phonebook.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,142 @@
+/*
+* 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 __CREATORPHONEBOOK_H__
+#define __CREATORPHONEBOOK_H__
+
+#include "creator_phonebookbase.h"
+#include "creator_randomdatafield.h"
+#include "creator_phonebookwrapper.h"
+
+
+
+class CCreatorEngine;
+class CCreatorModuleBaseParameters;
+
+class CContactDatabase;	
+class CPhonebookParameters;	
+class CCreatorPhonebookWrapper;
+
+class CCreatorPhonebook : public CCreatorPhonebookBase 
+    {
+public: 
+    static CCreatorPhonebook* NewL(CCreatorEngine* aEngine);
+    static CCreatorPhonebook* NewLC(CCreatorEngine* aEngine);
+    ~CCreatorPhonebook();
+
+private:
+    CCreatorPhonebook();
+    void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
+
+public:  
+    TInt CreateContactEntryL(CCreatorModuleBaseParameters *aParameters);    
+    TInt CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters);
+    TInt CreateSubscribedContactEntryL(CCreatorModuleBaseParameters *aParameters); 
+
+    
+    void DeleteAllL();
+    void DeleteAllCreatedByCreatorL();
+    void DeleteAllGroupsL();
+    void DeleteAllGroupsCreatedByCreatorL();
+    
+    void TestPrintOut(CPhonebookParameters* aParam);
+    inline CCreatorPhonebookWrapper* GetPhonebookWrapper(){ return iPhonebookWrapper; };
+private:
+    
+    void InitializeContactParamsL();
+    TBool IsContactGroupL( TUint32& aLink );
+    void StoreLinksForDeleteL( RArray<TUint32>& aLinks, TUid aStoreUid );
+    void DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid );
+    void DeleteItemsCreatedWithCreatorL( TUid aStoreUid );
+    void DoDeleteItemsCreatedWithCreatorL( TUid aStoreUid, CDictionaryFileStore* aStore );
+    TBool HasOtherThanGroupsL();
+    
+
+private:
+	CCreatorPhonebookWrapper* iPhonebookWrapper;
+    TInt iOpCounter;
+    
+    CPhonebookParameters* iParameters;
+    
+    static TInt iUrlFields[];
+    static TInt iEmailFields[];
+    
+    RArray<TUint32> iContactLinkArray;
+    RArray<TUint32>  iContactsToDelete;	
+    RArray<TUint32>  iContactGroupsToDelete;	
+    
+    RArray<TUint32> iPreviousDeleteLinks;
+    
+private:
+	//new variables
+	/// Ref: the target of the copy
+  
+    
+    /// Own: Contact database for this store
+    CContactDatabase* iContactDb;    
+    //Contacts found in contacts db.
+    
+    };
+
+/**
+ * phonebook parameters
+ */
+    
+
+class CPhonebookParameters : public CCreatorModuleBaseParameters
+    {
+public:
+	void ParseL(CCommandParser* parser, TParseParams /*aCase = 0*/);
+	
+	TInt CPhonebookParameters::ScriptLinkId() const;
+	void CPhonebookParameters::SetScriptLinkId(TInt aLinkId);
+
+	TCreatorContactFields iContactFields;
+
+    HBufC*  iGroupName; 	
+    TInt iContactsInGroup;
+    TInt iNumberOfPhoneNumberFields;
+    TInt iNumberOfURLFields;
+    TInt iNumberOfEmailAddressFields;
+    TInt iContactSetPtr;
+    RArray<TLinkIdParam> iLinkIds; // For contactgroup. Stores the linked contact ids.
+    
+    
+public:
+    CPhonebookParameters();
+    ~CPhonebookParameters();
+    
+private:
+    TInt iLinkId; // For contact. Stores the contact id
+    };
+
+
+class CCreatorContactField : public CBase				//, public MCreatorRandomDataField
+    {
+public:    
+    static CCreatorContactField* NewL();
+    void AddFieldToParamL( CCreatorEngine* aEngine, CPhonebookParameters* aParam, TInt aType, TInt aRand = KErrNotFound );
+    void AddFieldToParamL( CPhonebookParameters* aParam, TInt aType, TPtrC aContent );
+    ~CCreatorContactField();
+private:
+    CCreatorContactField();
+    void ConstructL();
+    };
+
+#endif // __CREATORPHONEBOOK_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_phonebookapi.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef CREATOR_PHONEBOOKAPI_H_
+#define CREATOR_PHONEBOOKAPI_H_
+
+#include <QString>
+#include <qglobal.h>
+#include <QTime>
+#include <qtcontacts.h>
+QTM_USE_NAMESPACE
+
+
+class CCreatorPhonebookAPI
+    {
+public:
+    CCreatorPhonebookAPI ();
+    ~CCreatorPhonebookAPI ();
+
+    quint32 saveContact( const QList<QContactDetail>& list );
+    quint32 createGroup( const QString& groupName );
+    int numberOfContacts();
+    int addContactToGroup( QContactLocalId group, QContactLocalId contact );
+    int addToGroup(QContactLocalId group, int amount);
+    bool deleteAllContacts();
+    bool deleteAllContacts( const QString& type );
+    bool deleteContacts( const QList<QContactLocalId>& list );
+    QContact contact( const QContactLocalId& contactId );
+
+    QString phoneNumber( const QContactLocalId& contactId );
+    bool contactDetails( const QContactLocalId& contactId, QString& name, QString& phoneNumber, QString& email );
+    
+private:
+    bool IsContactGroupL( const QContact& contact );
+    
+private:
+    QContactManager* mContactMngr;
+
+    };
+
+#endif /* CREATOR_PHONEBOOKAPI_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_phonebookbase.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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 __CCREATORPHONEBOOKBASE_H_
+#define __CCREATORPHONEBOOKBASE_H_
+
+#include "creator_modulebase.h"
+
+static const TInt KPhonebookFieldLength = 128;
+static const TInt KCreateRandomAmountOfGroups = 1;
+
+class CCreatorModuleBaseParameters;
+
+class CCreatorPhonebookBase : public CCreatorModuleBase
+{
+enum TCreatorPhonebookStatus{
+    ECreatorPhonebookDelete = 0,
+    ECreatorPhonebookStart,
+    ECreatorPhonebookGetContactFields,
+    ECreatorPhonebookGetPhoneNumbersCount,
+    ECreatorPhonebookGetUrlsCount,
+    ECreatorPhonebookGetEmailsCount,
+    ECreatorPhonebookContactsAllFields,
+    ECreatorPhonebookGetGroupFields,
+    ECreatorPhonebookGetContactsInGroup
+};
+
+public:
+
+    virtual TInt CreateContactEntryL(CCreatorModuleBaseParameters *aParameters) = 0;    
+    virtual TInt CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
+    virtual TInt CreateSubscribedContactEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
+    virtual TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
+    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
+
+//    virtual TBool IsActive() = 0;
+//    virtual void CancelOperation() = 0;
+    virtual void DeleteAllGroupsL() = 0;
+    virtual void DeleteAllGroupsCreatedByCreatorL() = 0;
+    
+protected:
+
+    virtual void SetDefaultParameters();    
+    TInt iNumberOfPhoneNumberFields;
+    TInt iNumberOfURLFields;
+    TInt iNumberOfEmailAddressFields;
+    TInt iContactsInGroup;    
+    TBool iDefaultFieldsSelected;
+    TBool iAddAllFields;
+};
+
+
+#endif /*__CCREATORPHONEBOOKBASE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_phonebookwrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,200 @@
+/*
+* 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 __CREATORPHONEBOOKWRAPPER_H__
+#define __CREATORPHONEBOOKWRAPPER_H__
+
+#include "creator_phonebookbase.h"
+#include "creator_randomdatafield.h"
+
+#include <map>
+
+#include "creator_phonebookapi.h"
+
+class CCreatorEngine;
+class CCreatorModuleBaseParameters;
+
+class CContactDatabase;	
+//class CPhonebookWrapperParameters;	
+class CPhonebookParameters;
+
+typedef typename std::map<const TInt, HBufC*> TCreatorContactFields;
+typedef typename std::pair<const TInt, HBufC*> TCreatorContactField;
+
+class CCreatorPhonebookWrapper : public CBase 
+    {
+public:
+	enum ContactDetailType{
+	ELastName,					//0
+	ELastNameReading,			//1
+	EFirstName,
+	EFirstNameReading,
+	EPrefix,
+	ESuffix,					//5
+	ESecondName,
+	ELandPhoneHome,
+	EMobilePhoneHome,
+	EVideoNumberHome,
+	EFaxNumberHome,				//10
+	EVoipHome,
+	EEmailHome,
+	EUrlHome,
+	EAddrLabelHome,
+	EAddrPoHome,				//15
+	EAddrExtHome,
+	EAddrStreetHome,
+	EAddrLocalHome,
+	EAddrRegionHome,
+	EAddrPostCodeHome,			//20
+	EAddrCountryHome,
+	EJobTitle,
+	ECompanyName,
+	ELandPhoneWork,
+	EMobilePhoneWork,			//25
+	EVideoNumberWork,
+	EFaxNumberWork,
+	EVoipWork,
+	EEmailWork,
+	EUrlWork,					//30
+	EAddrLabelWork,
+	EAddrPoWork,
+	EAddrExtWork,
+	EAddrStreetWork,
+	EAddrLocalWork,				//35
+	EAddrRegionWork,
+	EAddrPostCodeWork,
+	EAddrCountryWork,
+	ELandPhoneGen,
+	EMobilePhoneGen,			//40
+	EVideoNumberGen,
+	EFaxNumberGen,
+	EVoipGen,
+	EPoc,
+	ESwis,						//45
+	ESip,
+	EEmailGen,
+	EUrlGen,
+	EAddrLabelGen,
+	EAddrPoGen,					//50
+	EAddrExtGen,
+	EAddrStreetGen,
+	EAddrLocalGen,
+	EAddrRegionGen,
+	EAddrPostCodeGen,			//55
+	EAddrCountryGen,
+	EPagerNumber,
+	EDtmfString,
+	EWVAddress,
+	EDate,						//60
+	ENote,
+	EThumbnailPic,
+	ERingTone,
+	ECallerObjImg,
+	ECallerObjText,				//65
+	EMiddleName,
+	EDepartment,
+	EAsstName,
+	ESpouse,
+	EChildren,					//70
+	EAsstPhone,
+	ECarPhone,
+	EAnniversary,
+	ESyncClass,
+	ELocPrivacy,				//75
+	EGenLabel,
+	ETopContact,
+	EIMPP,
+	};
+
+	
+public: 
+    static CCreatorPhonebookWrapper* NewL();
+    static CCreatorPhonebookWrapper* NewLC();
+    ~CCreatorPhonebookWrapper();
+
+private:
+    CCreatorPhonebookWrapper();
+    void ConstructL();
+
+public:  
+    TUint32 CreateContactEntryL(const TCreatorContactFields& Map);    
+    TUint32 CreateGroupEntryL( HBufC* aGroupName );
+    TInt CreateSubscribedContactEntryL(); 
+
+    /**
+     * NumberOfContacts() will return all contacts from Contact API
+     */
+    TInt NumberOfContacts();
+    
+    TInt AddContactToGroup( TUint32 aGroupId, TUint32 aContact );
+    TInt AddToGroup( TUint32 aGroupId, TInt aAmount );
+    
+    
+    void DeleteAllL();
+    void DeleteAllGroupsL();
+    void DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid );
+    
+    HBufC* GetPhoneNumberL( TUint32 aContactId );
+    TBool GetContactDetailsL( TUint32 aContactId, TDes& aName, TDes& aPhoneNumber, TDes& aEmail );
+    
+private:
+    QList<QContactDetail> CreateContactDetailsFromParameters( const TCreatorContactFields& Map );
+    QContactDetail CreateContactDetail( QList<QContactDetail>& aContactDetailList,QString aDetail, QString aFieldContext, QString aFieldString, QString aData );
+    void AddFieldToList( QList<QContactDetail>& aDetailList, QContactDetail aDetail);
+    
+    TBool IsContactGroupL( TUint32& aLink );
+    
+    void DeleteItemsCreatedWithCreatorL( TUid aStoreUid );
+    void DoDeleteItemsCreatedWithCreatorL( TUid aStoreUid, CDictionaryFileStore* aStore );
+    TBool HasOtherThanGroupsL();
+    
+
+private:
+	
+    TInt iOpCounter;
+    
+    static QString iPhoneNumberFields[];
+    static TInt iUrlFields[];
+    static TInt iEmailFields[];
+    
+    RArray<TUint32> iContactLinkArray;
+    RArray<TUint32>  iContactsToDelete;	
+    RArray<TUint32>  iContactGroupsToDelete;	
+    
+    RArray<TUint32> iPreviousDeleteLinks;
+    //RPointerArray<MVPbkContactLinkArray> iPreviousDeleteLinks;  //modify
+    
+private:
+	//new variables
+	/// Ref: the target of the copy
+	QContact* iStore;       
+    
+    /// Own: Contact database for this store
+    CContactDatabase* iContactDb;    
+    
+    //Contacts found in contacts db.
+    QList<QContactId>* iContactResults;
+    // Contact groups that are found in the store. These are used in filtering
+    // the groups from the find results.
+    QList<QContactId>* iContactGroupsInStore;
+    
+    CCreatorPhonebookAPI* iPhonebookAPI;
+    };
+
+#endif // __CREATORPHONEBOOKWRAPPER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_randomdatafield.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef CREATORDATAFIELD_H_
+#define CREATORDATAFIELD_H_
+
+#include <e32base.h>
+
+class MCreatorRandomDataField
+{
+public:
+    enum TRandomLengthType
+    {
+    ERandomLengthUndefined,
+    ERandomLengthDefault, // Default length (use data from engine)
+    ERandomLengthMax,     // Maximum length
+    ERandomLengthExplicit // Explicitly defined length
+    };
+    
+    /**
+     * Set field content to random.     
+     * @param aRandomLenType Random length type
+     * @param aExplicitRandomLen Random length when ERandomLengthExplicit is used. Ignored otherwise.
+     */
+    virtual void SetRandomParametersL( TRandomLengthType aRandomLenType, TInt aRandomLen ) = 0;
+};
+
+#endif /*CREATORDATAFIELD_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_randomdataparser.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* 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 CREATORRANDOMDATAPARSER_H_
+#define CREATORRANDOMDATAPARSER_H_
+
+#include <e32base.h>
+#include <badesca.h>
+#include <xml/contenthandler.h>
+#include <xml/parser.h>
+
+//using namespace Xml;
+
+class CCreatorRandomDataParser : public CBase, public Xml::MContentHandler
+	{
+
+public:
+    enum TRandomDataType
+    	{
+    	EFirstName,
+    	ESurname,
+    	ECompany,
+    	EAddress,
+    	EJobTitle,
+    	EPhoneNumber,
+    	EGroupName,
+    	EMeetingReason,
+    	EMeetingPlace,
+    	EMemoText,
+    	EAnniversaryReason,
+    	EToDoText,
+    	EReminderText,
+    	EMessageSubject,
+    	EMessageText,
+    	ECity,
+    	ECountry,
+    	EPostcode,
+    	EState,
+    	EPobox,
+    	EPrefix,
+    	ESuffix,
+    	ELandmarkName,
+    	ELandmarkDescription
+    	};
+
+public:
+
+    virtual ~CCreatorRandomDataParser();
+    static CCreatorRandomDataParser* NewL();
+    static CCreatorRandomDataParser* NewLC();    
+    CDesCArrayFlat* ParseL(const TDesC& aFileName, const TRandomDataType aDataType);
+    
+    TInt GetError() const;
+    
+private:
+
+    CCreatorRandomDataParser();
+    void ConstructL();
+    
+    /**
+     * Converts 8 bit descriptor to 16 bit descriptor
+     * @param aDes 8 bit descriptor to be converted
+     * @return Pointer to the new 16 bit descriptor     
+     */
+    HBufC* Convert8BitTo16BitLC(const TDesC8& aInput);
+    void GetTextFileMode(RFile& aFile, TInt& aFileSize);
+
+    
+public:
+    // From MContentHandler:    
+    void OnStartDocumentL(const Xml::RDocumentParameters &aDocParam, TInt aErrorCode);
+    void OnEndDocumentL(TInt aErrorCode);
+    void OnStartElementL(const Xml::RTagInfo& aElement, 
+                         const Xml::RAttributeArray& aAttributes, 
+                         TInt aErrorCode);
+    void OnEndElementL(const Xml::RTagInfo& aElement, TInt aErrorCode);
+    void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
+    void OnStartPrefixMappingL(const RString& aPrefix, 
+                               const RString& aUri, 
+                               TInt aErrorCode);
+    void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+    void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+    void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
+    void OnProcessingInstructionL(const TDesC8& aTarget, 
+                                  const TDesC8& aData, 
+                                  TInt aErrorCode);
+    void OnError(TInt aErrorCode);
+    TAny* GetExtendedInterface(const TInt32 aUid);
+    
+private:
+	TRandomDataType iDataType;
+	CDesCArray* iElementNameArray;
+	HBufC* iContentData;
+	TBool iInsideRootElement;
+	TBool iContentParsingActive;
+
+	CDesCArrayFlat* iResultArray;
+	
+    enum TFileFormat
+        {
+        EFormatANSIASCII,
+        EFormatUTF8,
+        EFormatUTF16LE,
+        EFormatUTF16BE
+        };
+    
+    // XML parser
+    Xml::CParser* iParser;
+    
+    TFileFormat iScriptTextFormat;
+    TInt iLastError;
+};
+
+#endif /*CREATORRANDOMDATAPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_scriptelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,350 @@
+/*
+* 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 CREATORSCRIPTELEMENT_H_
+#define CREATORSCRIPTELEMENT_H_
+
+#include "creator_randomdatafield.h"
+#include "creator_modulebase.h"
+#include "engine.h"
+#include <e32base.h>
+
+class CCreatorScriptElement;
+class CCreatorEngine;
+
+_LIT(KEmpty, "");
+_LIT(KContextSep, "::");
+
+// Common attributes:
+_LIT(KAmount, "amount");
+_LIT(KRandomLength, "randomlength");
+_LIT(KId, "id");
+_LIT(KMaxAmount, "maxamount");
+
+// Common element names:
+_LIT(KScript, "creatorscript");
+_LIT(KFields, "fields");
+_LIT(KContactSetRef, "contact-set-reference");
+_LIT(KExistingContacts, "numberofexistingcontacts");
+
+// Common attribute values:
+_LIT(KMax, "max");
+_LIT(KDefault, "default");
+_LIT(KIncrease, "incvalueforeachcopy");
+
+class CCreatorScriptElementCache : public CBase
+{
+public:
+    static CCreatorScriptElementCache* CCreatorScriptElementCache::NewL();
+    virtual ~CCreatorScriptElementCache();    
+        
+    void RemoveElements();    
+    void AddElementL(CCreatorScriptElement* aElement);
+private:
+    CCreatorScriptElementCache();
+    void ConstructL();
+    RPointerArray<CCreatorScriptElement> iElementCache;
+
+};
+
+
+class CCreatorScriptAttribute : public CBase
+{
+public:
+    static CCreatorScriptAttribute* NewL(const TDesC& aName, const TDesC& aValue);
+    static CCreatorScriptAttribute* NewLC(const TDesC& aName, const TDesC& aValue);
+    virtual ~CCreatorScriptAttribute();    
+    
+    TPtrC Name() const;
+    void SetNameL(const TDesC& aName);      
+    TPtrC Value() const;
+    void SetValueL(const TDesC& aValue);
+    
+protected:
+
+    CCreatorScriptAttribute();
+    virtual void ConstructL(const TDesC& aName, const TDesC& aValue);
+    
+private:
+    HBufC* iName;
+    HBufC* iValue;    
+};
+
+/**
+ * Base class for all elements
+ */
+class CCreatorScriptElement : public CBase
+{
+public:
+
+    static CCreatorScriptElement* CCreatorScriptElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+
+    /**
+     * Destructor
+     */
+    virtual ~CCreatorScriptElement();
+    
+    /**
+     * Returns the array of sub-elements.
+     * @return Reference to the sub-element array.
+     */
+    virtual RPointerArray<CCreatorScriptElement> const& SubElements() const;
+    virtual RPointerArray<CCreatorScriptElement>& SubElements();
+    
+    /**
+     * Returns a sub-element.
+     * @param aIndex Sub-element array index.
+     * @return Pointer to a sub-element
+     */ 
+    virtual CCreatorScriptElement* SubElement(TInt aIndex);
+    
+    /**
+     * Finds a sub-element by a name.
+     * @param aName Name of the sub-element
+     * @return Pointer to the first matching sub-element. NULL if not found.
+     */
+    virtual CCreatorScriptElement* FindSubElement(const TDesC& aName);
+    
+    /**
+     * Removes all sub-elements.
+     */
+    virtual void RemoveSubElements();
+    
+    /**
+     * Removes a sub-element
+     * @param aIndex Index of the element to be removed
+     */
+    virtual void RemoveSubElementL(TInt aIndex);
+    
+    /**
+     * Adds an element to the sub-element list. 
+     * Leaves with error KErrNotSupported, if sub-element is illegal.
+     * Leaves with error KErrArgument, if the index in out of bounds.
+     * @param aElem Pointer to the element to be added. Takes ownership of the pointer.
+     * @param aIndex Sub-element array index where to add the element. -1 means that
+     * the element is added to the end of the array.
+     */
+    virtual void AddSubElementL(CCreatorScriptElement* aElem, TInt aIndex = -1);
+  
+    /**
+     * Returns the array of attributes.
+     * @return Reference to the attribute array.
+     */
+    virtual RPointerArray<CCreatorScriptAttribute> const& Attributes() const;
+        
+    /**
+     * Returns an attribute.
+     * @param aIndex Attribute array index.
+     * @return Pointer to a attribute
+     */ 
+    virtual CCreatorScriptAttribute* Attribute(TInt aIndex);
+    
+    /**
+     * Removes all attributes.
+     */
+    virtual void RemoveAttributes();
+    
+    /**
+     * Removes an attribute
+     * @param aIndex Index of the attribute to be removed
+     */
+    virtual void RemoveAttributeL(TInt aIndex);
+    
+    /**
+     * Adds an attribute to the attribute list. 
+     * Leaves with error KErrNotSupported, if attribute is illegal.
+     * @param aAttribute Pointer to the element to be added. Takes ownership of the pointer.
+     * @param aIndex Attribute array index where to add the attribute. -1 means that
+     * the attribute is added to the end of the array.
+     */
+    virtual void AddAttributeL(CCreatorScriptAttribute* aAttribute, TInt aIndex = -1);
+    
+    /**
+     * Finds attribute with the given name. First match is returned.
+     */
+    virtual const CCreatorScriptAttribute* FindAttributeByName(const TDesC& aName) const;
+    virtual CCreatorScriptAttribute* FindAttributeByName(const TDesC& aName);
+
+    /**
+     * Returns element name
+     * @return Element name
+     */
+    virtual TPtrC Name() const;
+    
+    /**
+     * Sets the element name.
+     * @param aName Element name
+     */
+    virtual void SetNameL(const TDesC& aName);
+    
+    /**
+     * Returns element content
+     * @return Element content
+     */
+    virtual TPtrC Content() const;
+    
+    /**
+     * Set the content of the element.
+     * @param aContenct Element content
+     */
+    virtual void SetContentL(const TDesC& aContent);
+    virtual void AppendContentL(const TDesC& aContent);
+    
+    /**
+     * Returns element context
+     * @return Element context
+     */
+    virtual TPtrC Context() const;
+        
+    /**
+     * Set the context of the element.
+     * @param aContenct Element context
+     */
+    virtual void SetContextL(const TDesC& aContext);
+    
+    /**
+     * Tells whether the element should be cached for future use.
+     * @return ETrue if the element should be cached for future use, EFalse otherwise.
+     */
+    virtual TBool IsCacheNeeded();
+    virtual void AddToCacheL(CCreatorScriptElementCache& aCache);
+    virtual void AddToCacheL();
+    virtual TBool IsCommandElement() const;
+    virtual void ExecuteCommandL();
+    //virtual void SaveCommandResultsL();
+    //virtual void DiscardCommandResultsL();
+    virtual TBool IsRoot() const;
+    virtual RPointerArray<CCreatorModuleBaseParameters>& CommandParameters();
+    virtual const RPointerArray<CCreatorModuleBaseParameters>& CommandParameters() const;
+    
+protected:
+
+    /**
+     * Constructors. 
+     */    
+    CCreatorScriptElement(CCreatorEngine* aEngine = 0);
+    
+    /**
+     * @param aName Name of the element.
+     */
+    virtual void ConstructL(const TDesC& aName, const TDesC& aContext = KNullDesC);
+    
+    /**
+     * Tells whethet the sub-element is allowed or not.
+     * @param aElem Sub-element to be tested.
+     * @return Boolean value telling whether the sub-element is allowed 
+     * to be added or not.
+     */
+    virtual TBool IsSubElementSupported(const CCreatorScriptElement& aElem) const;
+    
+    virtual MCreatorRandomDataField::TRandomLengthType ResolveRandomDataTypeL(const CCreatorScriptAttribute& aAttr, TInt& aRandomLen ) const;
+    
+    virtual TBool ConvertStrToBooleanL(const TDesC& aStr) const;
+    virtual TInt ConvertStrToIntL(const TDesC& aStr) const;
+    virtual TUint ConvertStrToUintL(const TDesC& aStr) const;
+    virtual void ConvertStrToReal64L(const TDesC& aStr, TReal64& aVal) const;
+    virtual void ConvertStrToReal32L(const TDesC& aStr, TReal32& aVal) const;
+    
+    virtual void AppendContactSetReferenceL(const CCreatorScriptElement& aContactSetRefElem, RArray<TLinkIdParam>& aLinkArray ) const;    
+    
+    virtual void SetContentToTextParamL(HBufC*& aPtr, const TDesC& aContent );
+    
+    virtual TTime ConvertToDateTimeL(const TDesC& aDtStr) const;
+    
+    virtual TInt CompareIgnoreCase(const TDesC& aStr1, const TDesC& aStr2 ) const;
+    
+    /**
+     * Increases phonenumber by aDelta.
+     * 
+     * Special cases, that are handled:
+     * +9          -> +9, +10, +11...
+     * +3584098#99 -> +3584098#99, +3584098#100, +3584098#101...
+     * #           -> #0, #1, #2...
+     * 123#        -> 123#0, 123#1, 123#2...
+     * 099         -> 099, 100, 101...
+     * 
+     * @param aOriginal original phonenumber
+     * @param aDelta number to be added to original number. Must be >= 0.
+     * @param aIncreased on return contains the increased number.
+     *        The buffer must be allocated by the caller.
+     */
+    void IncreasePhoneNumL( const TDesC& aOriginal, TInt aDelta, HBufC* aIncreased ) const;
+    
+protected:
+    
+    // Sub-element array
+    RPointerArray<CCreatorScriptElement> iSubElements;
+    // Attribute array
+    RPointerArray<CCreatorScriptAttribute> iAttributes;
+    // Element name (e.g. "contact")
+    HBufC* iName;
+    // Element content
+    HBufC* iContent;
+    // Context
+    HBufC* iContext;
+    
+    TBool iIsCommandElement;
+    TBool iIsRoot;
+    CCreatorEngine* iEngine;
+    RPointerArray<CCreatorModuleBaseParameters> iParameters;
+};
+
+/**
+ * Script element
+ */
+class CCreatorScriptRoot : public CCreatorScriptElement
+{
+public:
+    static CCreatorScriptRoot* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+protected:
+    CCreatorScriptRoot(CCreatorEngine* aEngine);
+};
+
+/**
+ * Calendar elements
+ */
+
+/**
+ * Base class for calendar elements
+ */
+class CCreatorCalendarElementBase : public CCreatorScriptElement
+{
+public:
+    static CCreatorCalendarElementBase* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+protected:
+    CCreatorCalendarElementBase(CCreatorEngine* aEngine);
+};
+
+/**
+ * Message elements
+ */
+
+/**
+ * Base class for message elements
+ */
+class CCreatorMessageElementBase : public CCreatorScriptElement
+{
+public:
+    static CCreatorMessageElementBase* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC);
+protected:
+    CCreatorMessageElementBase(CCreatorEngine* aEngine);
+};
+
+#endif /*CREATORSCRIPTELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_scriptelementfactory.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* 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 CREATORSCRIPTELEMENTFACTORY_H_
+#define CREATORSCRIPTELEMENTFACTORY_H_
+
+#include "creator_scriptelement.h"
+
+/**
+ * Creates script element instance based on the element name and context.
+ */
+class TCreatorScriptElementFactory
+{
+public:
+    static CCreatorScriptElement* CreateElementL(CCreatorEngine* aEngine, const TDesC& aElementName, const TDesC& aContext = KNullDesC);
+};
+
+#endif /*CREATORSCRIPTELEMENTFACTORY_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_scriptentry.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* 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 __FILEUTILS_H__
+#define __FILEUTILS_H__
+
+
+#include <e32base.h>
+#include <f32file.h>
+#include <badesca.h>
+#include <AknGlobalNote.h>
+#include <AknIconArray.h> 
+#include <aknmemorycardui.mbg>
+#include <msvapi.h>
+
+
+class CCreatorEngine;
+
+class CreatorFileUtils
+{
+public:
+    static TInt FindFiles(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
+    static TInt FindFilesRecursiveL(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
+};
+
+class CCommandParser : public CBase, public MMsvSessionObserver, MUIObserver
+    {
+enum TCommandParserStatus{
+    EGetingScript,
+    EGetingRandomDataFile
+};
+
+public:
+    static CCommandParser* NewL(CCreatorEngine* aEngine);
+    static CCommandParser* NewLC(CCreatorEngine* aEngine);
+    ~CCommandParser();
+    
+    void StrParserL(HBufC*& aDestinationBuf, TUint aToken);
+    void StrParserL(HBufC8*& aDestinationBuf, TUint aToken);
+
+private:
+    CCommandParser();
+    void ConstructL(CCreatorEngine* aEngine);
+
+    TInt FindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath);
+    TInt FindFiles(const TDesC& aFileName, const TDesC& aPath);
+    TInt ReadLineFromFileL(RFile& aInputFile);    
+    //void ParseCommandFromDescriptorL();
+
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
+
+public:
+    /**
+     * Called when some dialog in UI is closed
+     *
+     * @since S60 10.1
+     * @param aPositiveAction ETrue if "Ok", "Yes" or other "positive" button was pressed
+     * @param aUserData number that was passed to UI before dialog was opened
+     * @return None.
+     */
+    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData);
+    
+public:
+    void OpenScriptL();
+    TBool OpenScriptL(MCommandParserObserver* aObserver);
+    TBool GetRandomDataFilenameL(MCommandParserObserver* aObserver);
+
+private:
+    CCreatorEngine* iEngine;
+    CDesCArrayFlat* iSearchArray;
+    TInt iSelectedItem;
+    
+    TInt iParserPosition;
+    TInt iParserOldPosition;
+
+    HBufC8* iReadBuf;
+
+    MCommandParserObserver* iObserver;
+    };
+
+
+
+#endif // __FILEUTILS_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_scriptparser.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef CREATORSCRIPTPARSER_H_
+#define CREATORSCRIPTPARSER_H_
+
+#include <e32base.h>
+#include <xml/contenthandler.h>
+#include <xml/parser.h>
+
+using namespace Xml;
+
+class CCreatorScriptElement;
+class CCreatorEngine;
+class CCreatorScriptElementCache;
+
+class TCreatorScriptElementInfo
+{
+public:
+    enum TElementStatus
+    {
+    EStatusUndefined,   // undefined
+    EStatusParsing,     // currently being parsed
+    EStatusParsed       // parsed
+    };
+    TCreatorScriptElementInfo()
+        {
+        iStatus = EStatusUndefined;
+        iElement = 0;
+        }
+    TCreatorScriptElementInfo(TElementStatus aStatus, CCreatorScriptElement* aElement)
+        {
+        iStatus = aStatus;
+        iElement = aElement;
+        };
+    
+    TElementStatus iStatus;    
+    CCreatorScriptElement* iElement;
+};
+
+class CCreatorScriptParser : public CBase, public MContentHandler
+{
+public:
+
+    virtual ~CCreatorScriptParser();
+    static CCreatorScriptParser* NewL(CCreatorEngine* aEngine);
+    static CCreatorScriptParser* NewLC(CCreatorEngine* aEngine);    
+    void ParseL(const TDesC& aFileName);
+    void ParseL(RFile& aFile);
+    
+    TInt GetError() const;
+    
+private:
+
+    CCreatorScriptParser();
+    void ConstructL(CCreatorEngine* aEngine);
+    
+    /**
+     * Converts 8 bit descriptor to 16 bit descriptor
+     * @param aDes 8 bit descriptor to be converted
+     * @return Pointer to the new 16 bit descriptor     
+     */
+    HBufC* Convert8BitTo16BitLC(const TDesC8& aInput);
+    const TCreatorScriptElementInfo& LastElementInfo() const;
+    void GetTextFileMode(RFile& aFile, TInt& aFileSize);
+
+    
+public:
+    // From MContentHandler:    
+    void OnStartDocumentL(const RDocumentParameters &aDocParam, TInt aErrorCode);
+    void OnEndDocumentL(TInt aErrorCode);
+    void OnStartElementL(   const RTagInfo& aElement, 
+                            const RAttributeArray& aAttributes, 
+                            TInt aErrorCode);
+    void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
+    void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
+    void OnStartPrefixMappingL( const RString& aPrefix, 
+                                const RString& aUri, 
+                                TInt aErrorCode);
+    void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+    void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+    void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
+    void OnProcessingInstructionL(  const TDesC8& aTarget, 
+                                    const TDesC8& aData, 
+                                    TInt aErrorCode);
+    void OnError(TInt aErrorCode);
+    TAny* GetExtendedInterface(const TInt32 aUid);
+    
+private:
+
+    enum TFileFormat
+        {
+        EFormatANSIASCII,
+        EFormatUTF8,
+        EFormatUTF16LE,
+        EFormatUTF16BE
+        };
+    // XML parser
+    CParser* iParser;
+    
+    /**
+     * Element stack holding the elements that are currently being parsed.
+     */
+    RArray<TCreatorScriptElementInfo> iElementStack;
+    
+    /**
+     * Cache object containig the elements that are referred in future and thus should
+     * not be deleted after parsing.
+     */
+    CCreatorScriptElementCache* iElementCache;
+    
+    /**
+     * Pointer to the engine
+     */
+    CCreatorEngine* iEngine;
+    
+    TCreatorScriptElementInfo iDefaultElement;
+    
+    TFileFormat iScriptTextFormat;
+    TInt iLastError;
+};
+
+#endif /*CREATORSCRIPTPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_std.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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 __CREATOR_STD_H__
+#define __CREATOR_STD_H__
+
+#include <e32base.h>
+
+class TCommand;
+typedef CArrayFixSeg<TCommand> CCommandArray;
+
+
+#endif // __CREATOR_STD_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_traces.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* 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 __CREATOR_TRACES_H__
+#define __CREATOR_TRACES_H__
+
+#include <e32def.h>
+
+
+// ---------------------------------------------------------------------------
+// You change these logging method values below! Recompile the application to take changes effect.
+
+    // logging methods
+    // 0 = No logging
+    // 1 = Flogger
+    // 2 = RDebug
+    // 3 = Flogger and RDebug
+    
+    #ifndef _DEBUG
+        
+        // Logging method for UREL builds:
+        #define CREATOR_LOGGING_METHOD  3
+
+    #else
+
+        // Logging method for UDEB builds:
+        #define CREATOR_LOGGING_METHOD  3
+
+    #endif    
+    
+
+
+// ---------------------------------------------------------------------------
+// Do not make any changes to lines below...
+
+    #if CREATOR_LOGGING_METHOD == 1 || CREATOR_LOGGING_METHOD == 3
+
+        #include <flogger.h>
+        _LIT(KLogFolder,"Creator");
+        _LIT(KLogFile,"Creator_Trace.txt");
+
+    #endif
+
+    #if CREATOR_LOGGING_METHOD == 2 || CREATOR_LOGGING_METHOD == 3
+
+        #include <e32debug.h>
+
+    #endif
+
+
+    #if CREATOR_LOGGING_METHOD == 0
+    
+        #define LOGTEXT(AAA)
+        #define LOGSTRING(AAA)
+        #define LOGSTRING2(AAA,BBB)
+        #define LOGSTRING3(AAA,BBB,CCC)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD)
+    
+    
+    #elif CREATOR_LOGGING_METHOD == 1
+    
+        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+   
+    #elif CREATOR_LOGGING_METHOD == 2
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
+    
+    #elif CREATOR_LOGGING_METHOD == 3
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+
+    #endif
+
+// ---------------------------------------------------------------------------
+
+#endif // __LAUNCHER_TRACES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/creator_wepsecuritysettings.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,143 @@
+/*
+* 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 CREATORWEPSECURITYSETTINGS_H_
+#define CREATORWEPSECURITYSETTINGS_H_
+
+//
+// Methods copied from WEPSecuritySettingsImpl.h 
+// (Part of  : WEP Security Settings UI)
+// @see \s60\mw\networking\networkingutilities\WEPSecuritySettingsUI\inc\WEPSecuritySettingsImpl.h
+//
+
+
+// INCLUDES
+
+//#include "engine.h"
+
+#include <e32base.h>
+#include <metadatabase.h>
+using namespace CommsDat;
+
+// FORWARD DECLARATIONS
+
+class CCommsDatabase;
+
+// Index of first key
+const TInt KFirstKey = 0;
+
+// Index of second key
+const TInt KSecondKey = 1;
+
+// Index of third key
+const TInt KThirdKey = 2;
+
+// Index of fourth key
+const TInt KFourthKey = 3;
+
+const TInt KMaxNumberofKeys = 4;
+
+// Number of characters for a 232 bits key
+const TUint KKeyDataLength232Bits = 58;
+
+// The maximum length of key data
+const TUint KMaxLengthOfKeyData = KKeyDataLength232Bits;
+
+
+
+
+class CCreatorWEPSecuritySettings : public CBase
+    {
+public: 
+    static CCreatorWEPSecuritySettings* NewL();
+    static CCreatorWEPSecuritySettings* NewLC();
+    ~CCreatorWEPSecuritySettings();
+
+private:
+    CCreatorWEPSecuritySettings();
+    void ConstructL();
+
+
+public:
+/**
+* Save to database.
+* @param aIapId Wlan Service Table Id of the IAP to be saved
+* @param aCommsDb Comms database.
+*/
+void SaveL( TUint32 aIapId, CCommsDatabase& aCommsDb ) const;
+
+public:
+// Enumeration of the possible keys in use
+enum TWEPKeyInUse
+    {
+    EKeyNumber1,            // Key number 1
+    EKeyNumber2,            // Key number 2
+    EKeyNumber3,            // Key number 3
+    EKeyNumber4             // Key number 4
+    };
+
+
+// Enumeration of the possible authentication types
+enum TWEPAuthentication
+    {
+    EAuthOpen,              // Open authentication
+    EAuthShared             // Shared authentication
+    };
+
+
+// Possible lengths of the keys
+enum TWEPKeyLength
+    {
+    E40Bits,                // 40 bits
+    E104Bits,               // 104 bits
+    E232Bits                // 232 bits
+    };
+
+
+// Possible formats of the keys
+enum TWEPKeyFormat
+    {
+    EAscii,                 // Ascii format
+    EHexadecimal            // Hex format
+    };
+    
+    
+
+private:
+
+// Index of the key currently in use (EKeyNumber1, EKeyNumber2, 
+// EKeyNumber3, EKeyNumber4
+CCreatorWEPSecuritySettings::TWEPKeyInUse iKeyInUse;
+
+// Type of authentication (EAuthOpen, EAuthShared)
+CCreatorWEPSecuritySettings::TWEPAuthentication iAuthentication;
+
+// Length of the key (E40Bits, E104Bits, E232Bits)
+CCreatorWEPSecuritySettings::TWEPKeyLength iKeyLength[KMaxNumberofKeys];
+
+// Format of the key (EAscii, EHexadecimal)
+CCreatorWEPSecuritySettings::TWEPKeyFormat iKeyFormat[KMaxNumberofKeys];
+
+
+    };
+
+
+
+#endif /*CREATORWEPSECURITYSETTINGS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/inc/randomdata.txt	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,589 @@
+// ---------------------------------------------------------
+
+struct r_data_firstnames
+        {
+        "John";
+        "Francis";
+        "Andrew";
+        "Lawrence";
+        "Gregory";
+        "Fulke";
+        "Thomas";
+        "Nicholas";
+        "Hakle";
+        "Roger";
+        "Nathaniel";
+        "Luke";
+        "William";
+        "Ralph";
+        "Leonar";
+        "Daniel";
+        "Aban";
+        "Mathias";
+        "Robert";
+        "Christopher";
+        "Martin";
+        "Michael";
+        "Barnaby";
+        "Tobias";
+        "Richard";
+        "Anthony";
+        "Simon";
+        "Samuel";
+        "Geoffrey";
+        "Isaac";
+        "Henry";
+        "Matthew";
+        "Peter";
+        "Allen";
+        "Reynold";
+        "Jerome";
+        "Elizabeth";
+        "Catherine";
+        "Frances";
+        "Cecily";
+        "Millicent";
+        "Audrey";
+        "Joan";
+        "Elinor";
+        "Joyce";
+        "Frideswide";
+        "Rose";
+        "Helen";
+        "Margaret";
+        "Isabel";
+        "Bridget";
+        "Grace";
+        "Thomasin";
+        "Janet";
+        "Agnes";
+        "Dorothy";
+        "Christian";
+        "Amy";
+        "Fortune";
+        "Sybil";
+        "Alice";
+        "Margery";
+        "Edith";
+        "Barbara";
+        "Gillian";
+        "Ursula";
+        };
+
+struct r_data_surnames
+        {
+        "Lux";
+        "Mandot";
+        "Mansfield";
+        "Mayberry";
+        "McCarrel";
+        "McDaniel";
+        "Mefford";
+        "Metcalf";
+        "Metchell";
+        "Moller";
+        "Margan";
+        "Keaney";
+        "Kenyon";
+        "Kesler";
+        "Kinman";
+        "Kreinert";
+        "Kummerlin";
+        "Lamgley";
+        "Leas";
+        "Leighton";
+        "Lillie";
+        "Hilms";
+        "Holt";
+        "Hosier";
+        "Howard";
+        "Hypes";
+        "Jacmor";
+        "Behnson";
+        "Kammer";
+        "Patts";
+        "West";
+        "Wilbar";
+        "Witsan";
+        "Gillams";
+        "Good";
+        "Wreght";
+        "Worthley";
+        "Adams";
+        "Allen";
+        "Ansley";
+        "Ayries";
+        "Bartlett";
+        "Barton";
+        "Payne";
+        "Pintard";
+        "Prence";
+        "Richards";
+        "Dillman";
+        "Dory";
+        "Edgards";
+        "Engell";
+        "Farprington";
+        "Fisher";
+        "Foed";
+        "Burges";
+        "Childwall";
+        "Smith";
+        "Sipon";
+        "Simmons";
+        "Stewert";
+        "Stiles";
+        "Stratton";
+        "Dennis";
+        "Talmot";
+        };
+    }
+
+struct r_data_companies
+        {
+        "CDP";
+        "Exbox";
+        "Munro";
+        "Majaka";
+        "Bitzumi";
+        "Melroy";
+        "Matal";
+        "Japponi";
+        "Siwaka";
+        "Keiku";
+        "Naamate";
+        "Remonti";
+        "Melleva";
+        "WEX";
+        "Chataz";
+        "Ponly";
+        "Alriva";
+        "Giate";
+        "Kesso";
+        "Nyssa";
+        "Peger";
+        "Metrio";
+        "Mitchitatchi";
+        "Neppari";
+        "Amcuila";
+        "Muipitsu";
+        "Redex";
+        "Maariz";
+        "Swerck";
+        "Makiac";
+        "Dumpia";
+        "Worldmom";
+        "Renfaul";
+        "Kmartissori";
+        "Findo";
+        "Samsanc";
+        "Dellervo";
+        "Manrel";
+        "WSMRL";
+        "Eripox";
+        "Abiturien";
+        "Vesus";
+        "MI4";
+        "Overhiba";
+        "Tridune";
+        "Kyomcera";
+        "Praston";
+        "Gapmis";
+        "WPPDCD";
+        };
+
+struct r_data_addresses
+        {
+        "Barnes Street";
+        "Barnes Place";
+        "Eastman Street";
+        "West Park";
+        "South Park";
+        "Park Avenue";
+        "Richards Court";
+        "Pukershire Avenue";
+        "Ellis Avenue";
+        "East Mountain";
+        "Chestnut Hill";
+        "Plains Road";
+        "Fremont Street";
+        "Heritage Court";
+        "Highland Avenue Extension";
+        "Maple Heights";
+        "McKenzie Avenue";
+        "McKenzie Lane";
+        "West Terrace Street";
+        "Windsor Avenue";
+        "Windsor Road";
+        "Mechanic Street Extension";
+        "Granite Place";
+        "Meadow Street";
+        "Sugar River";
+        };
+
+struct r_data_cities
+        {
+        "Kuopio";       
+        "Los Angeles";        
+        "Lappeenranta";
+        "London";        
+        "Bangkok";
+        "St. Michel";                
+        "St. Petersburg";        
+        "Tokyo";
+        "Helsinki";
+        "Trondheim";        
+        "Nairobi";
+        "Havana";        
+        };
+
+struct r_data_countries
+        {
+        "Finland";
+        "Cuba";
+        "United States of America";
+        "Thailand";
+        "Sweden";
+        "Russia";
+        "Japan";
+        "Norway";
+        "Kenya";                
+        };
+
+struct r_data_postcodes
+        {
+        "00310";
+        "FI-70100";
+        "99002";
+        "11233";            
+        };
+
+struct r_data_states
+        {
+        "California state"; 
+        "Alaska state";
+        "Florida state";
+        };
+
+struct r_data_poboxes
+        {
+        "P.O BOX 5532";
+        "P.O BOX 701";
+        "99";
+        "1133";
+        "P.O. BOX 113322";
+        "112";
+        };
+
+struct r_data_prefixes
+        {
+        "Ms.";
+        "Mrs."; 
+        "Mr.";
+        "Dr.";
+        };
+
+struct r_data_suffixes
+        {
+        "Jr.";
+        "Sr.";        
+        };
+
+struct r_data_jobtitles
+        {
+        "Doctor";
+        "SW Engineer";
+        "Administrative Assistant";
+        "Bookkeeper";
+        "Credit Controller";
+        "Data Entry Operator";
+        "Payroll Officer";
+        "Receptionist";
+        "Trainee";
+        "Accounts Clerk";
+        "Administrator";
+        "Taxation Assistant";
+        "Financial Director";
+        "Bank Manager";
+        "Mobile Lending";
+        "Overseas Transactions";
+        "Restructuring";
+        "Business Analyst";
+        "Call Centre Manager";
+        "Administration";
+        "Manager";
+        "Student";
+        "Mail Sorter";
+        "Mayor";
+        "Account Servicing";
+        "Management";
+        "Media Consultant";
+        "Newsagent";
+        "Librarian";
+        "Creative Director";
+        "Announcer";
+        "Copywriter";
+        "Presenter";
+        "Promotions Manager";
+        "Advertising Sales Representative";
+        "Editor";
+        "Marketing, Sales & Publicity";
+        "Publisher";
+        "Gallery Assistant";
+        "Photographer";
+        "Storyboard Artist";
+        "Events Manager";
+        "Cameraman";
+        "Technician";
+        "Producer";
+        };
+ 
+struct r_data_phonenumbers
+        {
+        "0307834387";
+        "0230328732";
+        "0430365562";
+        "0530328732";
+        "0433032865";
+        "0542306532";
+        "0342303777";
+        "0250235603";
+        "0492303652";
+        "0542303286";
+        "0543656546";
+        "0545545454";
+        "0543444454";
+        "0776463255";
+        "0432443343";
+        "0243334344";
+        "0544543443";
+        "0231343243";
+        "0213443434";
+        "0143234476";
+        "0785434444";
+        "0454445345";
+        "0342443433";
+        "0432434454";
+        "0455454454";
+        "0656565655";
+        "0343434443";
+        "0565645455";
+        "0343243243";
+        "0565466565";
+        "0465565655";
+        "0435445454";
+        "+35854553456";
+        "+35878453486";
+        "+35876653456";
+        "+35834435486";
+        "+35876766466";
+        "+4465665456";
+        "+4432434334";
+        "+4488776776";
+        "+4465655656";
+        "+4443433434";
+        "+4465656565";
+        "+4454454354";
+        };
+
+struct r_data_groupnames
+        {
+        "Nice guys";
+        "Repairs";
+        "Office works";
+        "The buddies";
+        "Football team";
+        "Gold club";
+        "Silver club";
+        "Bronze club";
+        "Best buddies";
+        "Rockers";
+        "Science group";
+        };
+
+struct r_data_meetingreasons
+        {
+        "Security issues";
+        "Team meeting";
+        "Discussion about";
+        "Work plans";
+        "Meeting with the professor";
+        "Meeting with the boss";
+        "Work issues";
+        "New workers";
+        };
+
+struct r_data_meetingplaces
+        {
+        "Room";
+        "Home";
+        "Auditorium";
+        "Company";
+        };
+
+struct r_data_landmark_names
+        {
+        "Good place to fish";},
+        "Uncle over board";},
+        "Best food ever!";},
+        "Nice beach";},
+        "Good hamburgers";},
+        "Nice view";},
+        "John's home";},
+        "Carage";},
+        "Gas station";},
+        "Food store";},
+        "Car wash";},
+        "Summer cottage";},
+        "My home";},
+        "Bank";},
+        "Hospital";},
+        "Ice hall";},
+        "Work place";}
+        };
+
+struct r_data_landmark_descriptions
+        {
+        "The salmons were really big here!";},        
+        "Delicious strawberries sold here. Must visit again sometime!";},
+        "Place looks really nice.";},
+        "This is my favorite place";},
+        "Words are not enough to describe this landmark";},        
+        "What a shocking place to visit! Remember to bring camera next time :-)";}
+        };
+
+struct r_data_memos
+        {
+        "No work today!";
+        "Movies tonight";
+        "Ship new binaries";
+        "New works";
+        "Exam";
+        "Community service";
+        "Volunteer work";
+        "Don't forget the dinner at the restaurant";
+        "Go the bank";
+        "Go to the store";
+        "Buy goods";
+        "Buy food";
+        "Buy new pair of socks";
+        "Buy vegetables";
+        "Buy fruits";
+        "Umbrella";
+        "New shoes";
+        "New suit";
+        "Buy flowers";
+        "School day";
+        };
+
+struct r_data_anniversaries
+        {
+        "birthday";
+        "anniversary";
+        };
+
+struct r_data_todos
+        {
+        "Watch for gum on my shoe";
+        "Watch my step in the hall";
+        "Always think big";
+        "Don't ever think small";
+        "Keep pedaling my bike";
+        "Watch for bees in my pop";
+        "Keep moving forward";
+        "Don't ever stop";
+        "Keep my sled underneath me";
+        "Keep my stick on the ice";
+        "Don't swim in a whirlpool";
+        "Don't look for a fight";
+        "Don't spit in the wind";
+        "Just do what is right";
+        "Go out in the world";
+        "Enjoy a warm rain";
+        "Don't worship TV";
+        "Keep my oars in the water";
+        "Point my boat right downstream";
+        "Face head on my problems";
+        "Change underwear daily";
+        "Believe myself first";
+        "Go out and have fun";
+        "Turn the cards one by one";
+        "Get out and do something";
+        };
+
+struct r_data_reminders
+        {
+        "Remeber to fix car";
+        "Remeber to eat vegetables";
+        "Remeber to go shopping";
+        "Remeber to buy boxes for moving";
+        "Remeber to fix bike";
+        "Remeber to buy christmast presents";
+        "Remeber to send flowers to grandmother";
+        "Remeber to talk with son";
+        "Remeber to cut hedge";
+        "Remeber to bumper potatoes";
+        "Remeber to harvest corn field";
+        "Remeber to sleep enaugh";
+        "Remeber to wash teeths ewery morning";
+        "Remeber to get sleep early";
+        "Remeber to give some wather to flowers";
+        "Remeber to wax snowboard";
+        "Remeber to wax skiis";
+        "Remeber to wax cross country skiis";
+        "Remeber to call mother";
+        "Remeber to call father";
+        "Remeber to call brother";
+        "Remeber to call sister";
+        "Remeber to call daughter";
+        "Remeber to call son";
+        "Remeber to rent villa";
+        };
+
+struct r_data_messagesubjects
+        {
+        "Whaaasssaaap!!??";
+        "Hello";
+        "How are you doing?";
+        "You will win the battle, GUARANTEED!";
+        "Why pay more for something if you don't have to?";
+        "You can afford health care now";
+        "Re: *Buddy* *Lists*!!~ (it's soooo cool)!!~";
+        "Weedmon say: call, we be open 7 days, mon";
+        "Want her to look better?";
+        "Good Morning andyw, how are you?";
+        "Happy Assumption";
+        "There is NO Risk involved";
+        "Free Bottle Offer!";
+        "Introduction on MDSL";
+        "Theres Help out there for you";
+        "hello there - check this out";
+        "Darling";
+        "It doesn't have to be that way";
+        "Webmaster, Free health insurance quotes!";
+        "Join us at the OSGi 2003 World Congress";
+        "Put your subject line here";
+        "You are not protected";
+        "Please try again";
+        "you didn't reply my email ? why ? ???";
+        "A very funny game";
+        "Meeting notice";
+        "Opportunities";
+        };
+
+struct r_data_messagetexts
+        {
+        "The contents of these pages are copyrighted. Any rights not expressly granted herein are reserved. The use of this site is permitted to private use.";
+        "Reproduction, transfer, distribution or storage of part or all of the contents in any form without the prior written permission is prohibited.";
+        "We consents to you browsing the pages on your computer or printing copies of extracts from these pages for your personal use only.";
+        "If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information.";
+        "The use of press releases and other documents classified as public is permitted in public communications if the source for the information has been stated.";
+        "For your easy accessibility we may include links to sites on the Internet that are owned or operated by third parties.";
+        "You also agree that we have no control over the content of that site and cannot assume any responsibility for material by such third-party sites.";
+        "In addition, a link to a such site does not imply that we endorses the site or the products or services referenced in such third party site.";
+        "In order to respond to your questions or manage interactive customer programs, it may be necessary to ask for personal information.";
+        "We may use this information to respond to your requests, or to contact you via mail, e-mail or phone to inform you of new products.";
+        "If you place an order for a product, request a service or submit content to this site, we may need to contact you for additional information.";
+        };
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_accesspoint.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,473 @@
+/*
+* 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 "creator_accesspoint.h" 
+#include "creator_traces.h"
+#include <ApListItemList.h>
+#include <ApListItem.h> 
+#include "enginewrapper.h"
+
+static const TInt KAccessPointsFieldLength = 128;
+
+_LIT(KCreatorAccessPointsPrefixName, "CR_");
+_LIT(KZeroIP, "0.0.0.0");
+
+//----------------------------------------------------------------------------
+
+CAccessPointsParameters::CAccessPointsParameters()
+    {
+    LOGSTRING("Creator: CAccessPointsParameters::CAccessPointsParameters");
+
+    iConnectionName = HBufC::New(KAccessPointsFieldLength);
+    iWapStartPage = HBufC::New(KAccessPointsFieldLength);
+    iGprsAcessPointName = HBufC::New(KAccessPointsFieldLength);
+    iIspLoginName = HBufC::New(KAccessPointsFieldLength);
+    iIspLoginPass = HBufC::New(KAccessPointsFieldLength);
+    iWapGatewayAddress = HBufC::New(KAccessPointsFieldLength);
+    iIspIPAddr = HBufC::New(KAccessPointsFieldLength);
+    iIspIPNameServer1 = HBufC::New(KAccessPointsFieldLength);
+    iIspIPNameServer2 = HBufC::New(KAccessPointsFieldLength);
+    iIspDefaultTelNumber = HBufC::New(KAccessPointsFieldLength);
+    iProxyServerAddress = HBufC::New(KAccessPointsFieldLength);
+    }
+
+CAccessPointsParameters::~CAccessPointsParameters()
+    {
+    LOGSTRING("Creator: CAccessPointsParameters::~CAccessPointsParameters");
+
+    delete iProxyServerAddress;
+    delete iIspDefaultTelNumber;
+    delete iIspIPNameServer2;
+    delete iIspIPNameServer1;
+    delete iIspIPAddr;
+    delete iWapGatewayAddress;
+    delete iIspLoginPass;
+    delete iIspLoginName;
+    delete iGprsAcessPointName;
+    delete iWapStartPage;
+    delete iConnectionName;
+    }
+
+void CAccessPointsParameters::SetRandomCMNameL(CCreatorEngine& aEngine)
+	{
+	TInt num = aEngine.RandomNumber(1, 3);
+	TBuf<10> apType;
+
+	if (num==1)
+		apType = _L("mms");
+	else if (num==2)
+		apType = _L("wap");
+	else
+		apType = _L("internet");
+
+	TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);
+
+	iConnectionName->Des() = KCreatorAccessPointsPrefixName;
+	iConnectionName->Des().Append( company );
+	iConnectionName->Des().Append(_L(" "));
+	iConnectionName->Des().Append(apType);
+	}
+
+void CAccessPointsParameters::SetRandomLoginNameL(CCreatorEngine& aEngine)
+	{
+	iIspLoginName->Des() = aEngine.RandomString(CCreatorEngine::EFirstName);
+	iIspLoginName->Des().LowerCase();
+	}
+
+void CAccessPointsParameters::SetRandomLoginPassL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomSecureAuthenticationL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomPromptPasswordL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomProxyAddressL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomProxyPortL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomStartPageL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomIPAddressL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomIP4NameServer1L(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomIP4NameServer2L(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomTelephoneNumberL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomBearerTypeIsdnL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomBearerSpeedL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomWapWspOptionL(CCreatorEngine& /*aEngine*/)
+	{}
+
+void CAccessPointsParameters::SetRandomGatewayAddressL(CCreatorEngine& /*aEngine*/)
+	{}
+
+//----------------------------------------------------------------------------
+
+CCreatorAccessPoints* CCreatorAccessPoints::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorAccessPoints* self = CCreatorAccessPoints::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorAccessPoints* CCreatorAccessPoints::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorAccessPoints* self = new (ELeave) CCreatorAccessPoints;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorAccessPoints::CCreatorAccessPoints()
+    {
+    }
+
+void CCreatorAccessPoints::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorAccessPoints::ConstructL");
+
+    iEngine = aEngine;
+
+    iCommsDb = CCommsDatabase::NewL();;
+    iApDataHandler = CApDataHandler::NewLC(*iCommsDb);
+    CleanupStack::Pop();
+    iApUtils = CApUtils::NewLC(*iCommsDb);
+    CleanupStack::Pop();
+    }
+
+CCreatorAccessPoints::~CCreatorAccessPoints()
+    {
+    LOGSTRING("Creator: CCreatorAccessPoints::~CCreatorAccessPoints");
+
+    if ( iEngine && iEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidIAP ) );
+        }
+    iEntryIds.Reset();
+    iEntryIds.Close();
+    
+    delete iApUtils;
+    delete iApDataHandler;
+    delete iCommsDb;
+
+    if (iParameters)
+        delete iParameters;
+    }
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorAccessPoints::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorAccessPoints::AskDataFromUserL");
+    
+    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
+    
+    if( aCommand == ECmdDeleteIAPs )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Access Points?"), this, ECreatorModuleDelete );
+        }
+    else if( aCommand == ECmdDeleteCreatorIAPs )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Access Points created with Creator?"), this, ECreatorModuleDelete );
+        }
+
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
+    }
+
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorAccessPoints::CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorAccessPoints::CreateAccessPointEntryL");
+
+    CAccessPointsParameters* parameters = (CAccessPointsParameters*) aParameters;
+    
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    
+            
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        TBuf<160> company = iEngine->RandomString(CCreatorEngine::ECompany);
+        TInt num = iEngine->RandomNumber(1, 3);
+        TBuf<10> apType;
+        
+        if (num==1)
+            apType = _L("mms");
+        else if (num==2)
+            apType = _L("wap");
+        else
+            apType = _L("internet");
+        
+        iParameters = new(ELeave) CAccessPointsParameters;
+        parameters = iParameters;
+
+        parameters->SetRandomCMNameL(*iEngine);
+
+        // in random mode just create GPRS access points
+        parameters->iBearerType = EApBearerTypeGPRS;
+
+        parameters->SetRandomLoginNameL(*iEngine);
+
+        iParameters->iIspLoginPass->Des() = iEngine->RandomString(CCreatorEngine::ESurname);
+        iParameters->iIspLoginPass->Des().LowerCase();
+
+        iParameters->iSecureAuthentication = EFalse;
+        iParameters->iPromptPassword = EFalse;
+
+        iParameters->iProxyServerAddress->Des() = _L("127.0.0.1");
+        iParameters->iProxyPortNumber = 80;
+
+        iParameters->iWapStartPage->Des() = _L("http://");
+        iParameters->iWapStartPage->Des().Append(apType);
+        iParameters->iWapStartPage->Des().Append(_L("."));
+        iParameters->iWapStartPage->Des().Append(company);
+        iParameters->iWapStartPage->Des().Append(_L(".com"));
+        iParameters->iWapStartPage->Des().LowerCase();
+
+        iParameters->iIspIPAddr->Des() = KZeroIP;
+        iParameters->iIspIPNameServer1->Des() = KZeroIP;
+        iParameters->iIspIPNameServer1->Des() = KZeroIP;
+        iParameters->iGprsAcessPointName->Des() = apType;
+        iParameters->iIspDefaultTelNumber->Des() = iEngine->RandomString(CCreatorEngine::EPhoneNumber);
+        iParameters->iIspBearerCallTypeIsdn = ECallTypeISDNv110;
+        iParameters->iIspBearerSpeed = KSpeed14400;
+
+        iParameters->iWapWspOption = EWapWspOptionConnectionOriented;
+        iParameters->iWapGatewayAddress->Des() = KZeroIP;
+        }
+    else
+        {
+        // otherwise replace the parameters object
+        iParameters = parameters;
+        }
+
+    TInt err = KErrNone;
+
+    // access point item
+    CApAccessPointItem* apItem = CApAccessPointItem::NewLC();
+
+    // set the bearer type, if it fails try to set a default type
+    TRAPD(bearerErr, apItem->SetBearerTypeL(iParameters->iBearerType));
+    if (bearerErr != KErrNone)
+        {
+        iParameters->iBearerType = EApBearerTypeGPRS;
+        TRAPD(bearerErr2, apItem->SetBearerTypeL(iParameters->iBearerType));
+        bearerErr2=bearerErr2;
+        }
+
+    if (iParameters->iBearerType == EApBearerTypeGPRS) // GPRS
+        {
+        err = apItem->WriteLongTextL(EApGprsAccessPointName, iParameters->iGprsAcessPointName->Des());
+        }
+    else  // CSD or HCSD
+        {
+        err = apItem->WriteTextL(EApIspDefaultTelNumber, iParameters->iIspDefaultTelNumber->Des());
+        err = apItem->WriteUint(EApIspBearerCallTypeIsdn, iParameters->iIspBearerCallTypeIsdn);
+        err = apItem->WriteUint(EApIspBearerSpeed, iParameters->iIspBearerSpeed);
+        }
+
+    err = apItem->WriteTextL(EApIspLoginName, iParameters->iIspLoginName->Des());
+    err = apItem->WriteTextL(EApIspIfAuthName, iParameters->iIspLoginName->Des());
+    err = apItem->WriteTextL(EApIspLoginPass, iParameters->iIspLoginPass->Des());
+    err = apItem->WriteTextL(EApIspIfAuthPass, iParameters->iIspLoginPass->Des());
+    err = apItem->WriteTextL(EApGprsIfAuthPassword, iParameters->iIspLoginPass->Des());
+    err = apItem->WriteBool(EApIspDisablePlainTextAuth, iParameters->iSecureAuthentication);
+    err = apItem->WriteBool(EApIspPromptForLogin, iParameters->iPromptPassword);
+    err = apItem->WriteTextL(EApWapGatewayAddress, iParameters->iWapGatewayAddress->Des());
+    err = apItem->WriteLongTextL(EApProxyServerAddress, iParameters->iProxyServerAddress->Des());
+    err = apItem->WriteUint(EApProxyPortNumber, iParameters->iProxyPortNumber);
+    err = apItem->WriteLongTextL(EApWapStartPage, iParameters->iWapStartPage->Des());
+    err = apItem->WriteUint(EApWapWspOption, iParameters->iWapWspOption);
+    err = apItem->WriteTextL(EApGprsIPNameServer1, iParameters->iIspIPNameServer1->Des());
+    err = apItem->WriteTextL(EApGprsIPNameServer2, iParameters->iIspIPNameServer2->Des());
+    err = apItem->WriteTextL(EApIspIPAddr, iParameters->iIspIPAddr->Des());
+
+
+    TUint32 uid = iApDataHandler->CreateFromDataL(*apItem);  // save the access point, returns the uid of the AP
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    iEntryIds.AppendL( uid );
+        
+    TBuf<256> name = iParameters->iConnectionName->Des();
+    iApUtils->SetNameL(name, uid); // sets the AP name
+
+
+    // if no defaults set, set the created AP as a default
+
+    // MMS access point
+    if (iParameters->iWapStartPage->Des().FindF(_L("mms")) >=0  ||  iParameters->iConnectionName->Des().FindF(_L("mms")) >=0 )
+        {
+        //User::Panic(_L("Not done yet..."), 123);
+        }
+
+
+    // WAP access point
+    else if (iParameters->iConnectionName->Des().FindF(_L("wap")) >=0  ||  iParameters->iGprsAcessPointName->Des().FindF(_L("wap")) >= 0)
+        {
+        TUint32 defID = 0;
+        TRAP( err, defID = iApDataHandler->DefaultL(ETrue) );  // ETrue==WAP
+
+        if (defID <= 1)
+            TRAP( err, iApDataHandler->SetAsDefaultL(uid, EIspTypeWAPOnly) );
+
+        }
+
+    // Internet access point
+    else if (iParameters->iConnectionName->Des().FindF(_L("internet")) >=0  ||  iParameters->iGprsAcessPointName->Des().FindF(_L("internet")) >= 0)
+        {
+        TUint32 defID = 0;
+        TRAP( err, defID = iApDataHandler->DefaultL(EFalse) );  // EFalse==IAP
+
+        if (defID <= 1)
+            TRAP( err, iApDataHandler->SetAsDefaultL(uid, EIspTypeInternetOnly) );  //  <--  POSSIBLY NOT CORRECT, NEEDS MORE TESTING
+        }
+
+
+
+    CleanupStack::PopAndDestroy(); //apItem
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TUint32 CCreatorAccessPoints::AccessPointNameToIdL(const TDesC& aAPName, TBool /*aAnyIfNotFound*/ )
+    {
+    LOGSTRING("Creator: CCreatorEngine::AccessPointNameToIdL");
+
+    TBuf<256> apName = aAPName.Left(256);
+    apName.Trim();
+
+    TUint32 APId = iEngine->GetDefaultIAPL();
+
+    // return default IAP if requested
+    if (apName.CompareF(_L("DEFAULT-IAP")) == 0 || apName.CompareF(_L("DEFAULT")) == 0)
+        {
+        return APId;
+        }
+
+    CCommsDatabase* db = CCommsDatabase::NewL(EDatabaseTypeIAP);
+    CleanupStack::PushL(db);
+    CApUtils* apUtils = CApUtils::NewLC(*db);
+    CApSelect* apSelect = CApSelect::NewLC(*db, KEApIspTypeAll, EApBearerTypeAll, KEApSortNameAscending);
+
+
+    // loop through all access points and try to find a matching name
+    if (apSelect->MoveToFirst())
+        {
+        do
+            {
+            TBuf<256> apName2;
+            apUtils->NameL(apSelect->Uid(), apName2);
+            apName2.Trim();
+
+            if (apName2.CompareF( apName ) == 0)
+                {
+                // match found, get uid and break the loop
+                TRAPD( err, APId = apUtils->IapIdFromWapIdL(apSelect->Uid()) );
+                err=err;
+                break;
+                }
+            }
+        while (apSelect->MoveNext());
+        }
+
+    CleanupStack::PopAndDestroy(3);  //apSelect, apUtils, db
+
+    return APId;
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorAccessPoints::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
+    {
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorAccessPoints::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::DeleteAllL");
+    
+    CApSelect* selector = CApSelect::NewLC( *iCommsDb, 
+                                            KEApIspTypeAll,
+                                            EApBearerTypeAllBearers,
+                                            KEApSortUidAscending );
+    
+    CApListItemList* list = new (ELeave) CApListItemList();
+    CleanupStack::PushL( list );
+    TInt count = selector->AllListItemDataL( *list );
+    for ( TInt i = 0; i < count; i++ )
+        {
+        TRAP_IGNORE( iApDataHandler->RemoveAPL( (*list)[i]->Uid() ) );
+        }
+
+    CleanupStack::PopAndDestroy( list );
+    CleanupStack::PopAndDestroy( selector );
+
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Logs related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidIAP );
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorAccessPoints::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::DeleteAllCreatedByCreatorL");
+    iEntryIds.Reset();
+    
+    // fetch ids of entries created by Creator
+    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidIAP );
+    
+    // delete entries
+    for ( TInt i = 0; i < iEntryIds.Count(); i++ )
+        {
+        TRAP_IGNORE( iApDataHandler->RemoveAPL( iEntryIds[i] ) );
+        }
+    
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Logs related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidIAP );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_browser.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,595 @@
+/*
+* 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 <FavouritesWapAp.h> 
+
+#include "engine.h"
+#include "enginewrapper.h"
+#include "creator_browser.h" 
+#include "creator_traces.h"
+
+
+static const TInt KBrowserFieldLength = 128;
+
+_LIT(KCreatorBrowserPrefixName, "CR_");
+_LIT(KCreatorBrowserPrefixFolderName, "CR_FLDR_");
+
+//----------------------------------------------------------------------------
+
+CBrowserParameters::CBrowserParameters()
+    {
+    LOGSTRING("Creator: CBrowserParameters::CBrowserParameters");
+
+    iBookmarkName = HBufC::New(KBrowserFieldLength);
+    iBookmarkAddress = HBufC::New(KBrowserFieldLength);
+    iBookmarkUsername = HBufC::New(KBrowserFieldLength);
+    iBookmarkPassword = HBufC::New(KBrowserFieldLength);    
+    iBookmarkFolderName = HBufC::New(KBrowserFieldLength);
+    iSavedDeckLinkName = HBufC::New(KBrowserFieldLength);
+    iSavedDeckLocalAddress = HBufC::New(KBrowserFieldLength);
+    iSavedDeckFolderName = HBufC::New(KBrowserFieldLength);
+    }
+
+CBrowserParameters::~CBrowserParameters()
+    {
+    LOGSTRING("Creator: CBrowserParameters::~CBrowserParameters");
+
+    delete iSavedDeckFolderName;
+    delete iSavedDeckLocalAddress;
+    delete iSavedDeckLinkName;
+    delete iBookmarkFolderName;
+    delete iBookmarkPassword;    
+    delete iBookmarkUsername;
+    delete iBookmarkAddress;
+    delete iBookmarkName;
+
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorBrowser* CCreatorBrowser::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorBrowser* self = CCreatorBrowser::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorBrowser* CCreatorBrowser::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorBrowser* self = new (ELeave) CCreatorBrowser;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorBrowser::CCreatorBrowser()
+    {
+    }
+
+void CCreatorBrowser::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorBrowser::ConstructL");
+
+    iEngine = aEngine;
+    }
+
+CCreatorBrowser::~CCreatorBrowser()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::~CCreatorBrowser");
+    if ( iEngine && iBmEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iBmEntryIds, KUidDictionaryUidBrowserBookmarks ) );
+        }
+    iBmEntryIds.Reset();
+    iBmEntryIds.Close();
+
+    if ( iEngine && iBmFEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iBmFEntryIds, KUidDictionaryUidBrowserBookmarkF ) );
+        }
+    iBmFEntryIds.Reset();
+    iBmFEntryIds.Close();
+
+    if ( iEngine && iSpEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iSpEntryIds, KUidDictionaryUidBrowserSavedPg ) );
+        }
+    iSpEntryIds.Reset();
+    iSpEntryIds.Close();
+
+    if ( iEngine && iSpFEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iSpFEntryIds, KUidDictionaryUidBrowserSavedPgF ) );
+        }
+    iSpFEntryIds.Reset();
+    iSpFEntryIds.Close();
+
+    delete iParameters;
+    }
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorBrowser::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorBrowser::AskDataFromUserL");
+
+    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
+    
+    TBool result( EFalse );
+    switch ( aCommand )
+        {
+        case ECmdDeleteBrowserBookmarks:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmarks?"), this, ECreatorModuleDelete );
+            break;
+            }
+        case ECmdDeleteCreatorBrowserBookmarks:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmarks created with Creator?"), this, ECreatorModuleDelete );
+            break;
+            }
+        case ECmdDeleteBrowserBookmarkFolders:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmark folders?"), this, ECreatorModuleDelete );
+            break;
+            }
+        case ECmdDeleteCreatorBrowserBookmarkFolders:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser bookmark folders created with Creator?"), this, ECreatorModuleDelete );
+            break;
+            }
+        case ECmdDeleteBrowserSavedPages:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages?"), this, ECreatorModuleDelete );
+            break;
+            }
+        case ECmdDeleteCreatorBrowserSavedPages:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages created with Creator?"), this, ECreatorModuleDelete );
+            break;
+            }
+        case ECmdDeleteBrowserSavedPageFolders:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages folders?"), this, ECreatorModuleDelete );
+            break;
+            }
+        case ECmdDeleteCreatorBrowserSavedPageFolders:
+            {
+            result = iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Browser saved pages folders created with Creator?"), this, ECreatorModuleDelete );
+            break;
+            }
+        default:
+            {
+            result = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
+            break;
+            }
+        }
+    return result;
+    }
+
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorBrowser::CreateBookmarkEntryL(CBrowserParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorBrowser::CreateBookmarkEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    CBrowserParameters* parameters = aParameters;
+        
+    // random data needed if no predefined data available
+    if( !parameters )
+        {
+        iParameters = new(ELeave) CBrowserParameters;
+        parameters = iParameters; 
+
+        TFileName userAndPassword = iEngine->RandomString(CCreatorEngine::EFirstName);
+        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
+        TFileName url = name;
+        url.Insert(0, _L("http://www."));
+        url.Append(_L(".com/"));
+        name.Insert(0, KCreatorBrowserPrefixName);
+
+        parameters->iBookmarkName->Des() = name;
+        parameters->iBookmarkAddress->Des() = url;
+        parameters->iBookmarkUsername->Des() = userAndPassword;
+        parameters->iBookmarkPassword->Des() = userAndPassword;
+        }
+   
+    TInt err = KErrNone;
+
+    RFavouritesSession session;
+    User::LeaveIfError( session.Connect() );
+    CleanupClosePushL<RFavouritesSession>(session);
+    RFavouritesDb db;
+    User::LeaveIfError( db.Open(session, KBrowserBookmarks) );
+    CleanupClosePushL<RFavouritesDb>(db);
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    item->SetType( CFavouritesItem::EItem );
+    item->SetParentFolder( KFavouritesRootUid ) ;
+    item->SetNameL( parameters->iBookmarkName->Des() );
+    item->SetUrlL( parameters->iBookmarkAddress->Des() );
+    item->SetUserNameL( parameters->iBookmarkUsername->Des() );
+    item->SetPasswordL( parameters->iBookmarkPassword->Des() );
+    err = db.Add(*item, /*aAutoRename=*/ETrue);
+    if (err)
+        db.Commit();
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iBmEntryIds.AppendL( item->Uid() );
+    
+    CleanupStack::PopAndDestroy(3); //db, session, item
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorBrowser::CreateBookmarkFolderEntryL(CBrowserParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorBrowser::CreateBookmarkFolderEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    CBrowserParameters* parameters = aParameters;
+    
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CBrowserParameters;
+        parameters = iParameters;
+
+        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
+        name.Insert(0, KCreatorBrowserPrefixFolderName);
+
+        parameters->iBookmarkFolderName->Des() = name;
+        }
+    
+    TInt err = KErrNone;
+
+    RFavouritesSession session;
+    User::LeaveIfError( session.Connect() );
+    CleanupClosePushL<RFavouritesSession>(session);
+    RFavouritesDb db;
+    User::LeaveIfError( db.Open(session, KBrowserBookmarks) );
+    CleanupClosePushL<RFavouritesDb>(db);
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    item->SetType( CFavouritesItem::EFolder );
+    item->SetParentFolder( KFavouritesRootUid ) ;
+    item->SetNameL( parameters->iBookmarkFolderName->Des() );
+    
+    err = db.Add(*item, /*aAutoRename=*/ETrue);
+    if (err)
+        db.Commit();
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iBmFEntryIds.AppendL( item->Uid() );
+    
+    CleanupStack::PopAndDestroy(3); //db, session, item
+            
+
+    return err;
+    
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorBrowser::CreateSavedDeckEntryL(CBrowserParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorBrowser::CreateSavedDeckEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    CBrowserParameters* parameters = aParameters;
+    
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CBrowserParameters;
+        parameters = iParameters;
+
+        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
+        name.Insert(0, KCreatorBrowserPrefixName);
+
+        parameters->iSavedDeckLinkName->Des() = name;
+        parameters->iSavedDeckLocalAddress->Des() = iEngine->TestDataPathL(CCreatorEngine::ESavedDeck_1kB);
+        }
+   
+    TInt err = KErrNone;
+
+    // check the deck address is correct
+    if ( parameters->iSavedDeckLocalAddress->Des().Length() == 0 ||
+    		!BaflUtils::FileExists( CEikonEnv::Static()->FsSession(), parameters->iSavedDeckLocalAddress->Des() ))
+        {
+        // not found, use a default deck instead
+        delete parameters->iSavedDeckLocalAddress;
+        parameters->iSavedDeckLocalAddress = 0;
+        TPtrC tmp = iEngine->TestDataPathL(CCreatorEngine::ESavedDeck_1kB);
+        parameters->iSavedDeckLocalAddress = HBufC::NewL(tmp.Length());
+        parameters->iSavedDeckLocalAddress->Des() = tmp;
+        }
+
+
+    RFavouritesSession session;
+    User::LeaveIfError( session.Connect() );
+    CleanupClosePushL<RFavouritesSession>(session);
+    RFavouritesDb db;
+    User::LeaveIfError( db.Open(session, KBrowserSavedPages) );
+    CleanupClosePushL<RFavouritesDb>(db);
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    item->SetType( CFavouritesItem::EItem );
+    item->SetParentFolder( KFavouritesRootUid ) ;
+    item->SetNameL( parameters->iSavedDeckLinkName->Des() );
+    item->SetUrlL( _L(" ") );
+
+    TFavouritesWapAp favouritesAp;
+    favouritesAp.SetDefault();
+    item->SetWapAp( favouritesAp );
+
+    
+    err = db.Add(*item, /*aAutoRename=*/ETrue);
+    if (err)
+        db.Commit();
+    
+    // read the source deck to buffer
+    RFile sourceFile;
+    User::LeaveIfError( sourceFile.Open(CEikonEnv::Static()->FsSession(), parameters->iSavedDeckLocalAddress->Des(), EFileRead) );
+    CleanupClosePushL<RFile>(sourceFile);
+    TInt sourceFileSize(0);
+    err = sourceFile.Size(sourceFileSize);
+    HBufC8* sourceBuf = HBufC8::NewLC(sourceFileSize);
+    TPtr8 sourcePtr = sourceBuf->Des();
+    sourceFile.Read(sourcePtr);
+    
+    // write the deck
+    RFavouritesFile destinationFile;
+    User::LeaveIfError( destinationFile.Replace(db, item->Uid() ));
+    CleanupClosePushL<RFavouritesFile>(destinationFile);
+    err = destinationFile.Write(sourceBuf->Des());
+
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iSpEntryIds.AppendL( item->Uid() );
+
+ 
+    CleanupStack::PopAndDestroy(6); //db, session, item, sourceFile, destinationFile, sourceBuf    
+    
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorBrowser::CreateSavedDeckFolderEntryL(CBrowserParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorBrowser::CreateSavedDeckFolderEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+            
+    CBrowserParameters* parameters = aParameters;
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CBrowserParameters;
+        parameters = iParameters;
+        
+        TFileName name = iEngine->RandomString(CCreatorEngine::ECompany);
+        name.Insert(0, KCreatorBrowserPrefixFolderName);
+
+        parameters->iSavedDeckFolderName->Des() = name;
+        }
+   
+    TInt err = KErrNone;
+
+    RFavouritesSession session;
+    User::LeaveIfError( session.Connect() );
+    CleanupClosePushL<RFavouritesSession>(session);
+    RFavouritesDb db;
+    User::LeaveIfError( db.Open(session, KBrowserSavedPages) );
+    CleanupClosePushL<RFavouritesDb>(db);
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    item->SetType( CFavouritesItem::EFolder );
+    item->SetParentFolder( KFavouritesRootUid ) ;
+    item->SetNameL( parameters->iSavedDeckFolderName->Des() );
+    
+    err = db.Add(*item, /*aAutoRename=*/ETrue);
+    if (err)
+        db.Commit();
+
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iSpFEntryIds.AppendL( item->Uid() );
+
+    CleanupStack::PopAndDestroy(3); //db, session, item
+                
+    return err;
+    
+    }
+
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllL");
+    User::Leave( KErrNotSupported );
+    // will not be supported, see separate implementations below
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllCreatedByCreatorL");
+    User::Leave( KErrNotSupported );
+    // will not be supported, see separate implementations below
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllBookmarksL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarksL");
+    DeleteAllItemsL( KBrowserBookmarks,
+                     CFavouritesItem::EItem,
+                     EFalse,
+                     iBmEntryIds, // ignored, because deleting all
+                     KUidDictionaryUidBrowserBookmarks );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllBookmarksCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarksCreatedByCreatorL");
+    DeleteAllItemsL( KBrowserBookmarks,
+                     CFavouritesItem::EItem,
+                     ETrue,
+                     iBmEntryIds,
+                     KUidDictionaryUidBrowserBookmarks );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllBookmarkFoldersL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarkFoldersL");
+    DeleteAllItemsL( KBrowserBookmarks,
+                     CFavouritesItem::EFolder,
+                     EFalse,
+                     iBmFEntryIds, // ignored, because deleting all
+                     KUidDictionaryUidBrowserBookmarkF );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllBookmarkFoldersCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllBookmarkFoldersCreatedByCreatorL");
+    DeleteAllItemsL( KBrowserBookmarks,
+                     CFavouritesItem::EFolder,
+                     ETrue,
+                     iBmFEntryIds,
+                     KUidDictionaryUidBrowserBookmarkF );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllSavedPagesL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPagesL");
+    DeleteAllItemsL( KBrowserSavedPages,
+                     CFavouritesItem::EItem,
+                     EFalse,
+                     iSpEntryIds, // ignored, because deleting all
+                     KUidDictionaryUidBrowserSavedPg );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllSavedPagesCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPagesCreatedByCreatorL");
+    DeleteAllItemsL( KBrowserSavedPages,
+                     CFavouritesItem::EItem,
+                     ETrue,
+                     iSpEntryIds,
+                     KUidDictionaryUidBrowserSavedPg );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllSavedPageFoldersL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPageFoldersL");
+    DeleteAllItemsL( KBrowserSavedPages,
+                     CFavouritesItem::EFolder,
+                     EFalse,
+                     iSpFEntryIds, // ignored, because deleting all
+                     KUidDictionaryUidBrowserSavedPgF );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllSavedPageFoldersCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteAllSavedPageFolderssCreatedByCreatorL");
+    DeleteAllItemsL( KBrowserSavedPages,
+                     CFavouritesItem::EFolder,
+                     ETrue,
+                     iSpFEntryIds,
+                     KUidDictionaryUidBrowserSavedPgF );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorBrowser::DeleteAllItemsL( const TDesC& aDbName, 
+                                       CFavouritesItem::TType aTypeFilter,
+                                       TBool aOnlyCreatedWithCreator,
+                                       RArray<TInt>& aEntryIds,
+                                       const TUid aDictUid )
+    {
+    LOGSTRING("Creator: CCreatorBrowser::DeleteItemL");
+    RFavouritesSession session;
+    User::LeaveIfError( session.Connect() );
+    CleanupClosePushL( session );
+    RFavouritesDb db;
+    User::LeaveIfError( db.Open( session, aDbName ) );
+    CleanupClosePushL( db );
+       
+    if ( aOnlyCreatedWithCreator )
+        {
+        // read uids from Creator internal store
+        aEntryIds.Reset();
+        iEngine->ReadEntryIdsFromStoreL( aEntryIds, aDictUid );
+        
+        // delete entries from db
+        for ( TInt i = 0; i < aEntryIds.Count(); i++ )
+            {
+            db.Delete( aEntryIds[i] );
+            }
+        }
+    else
+        {
+        CArrayFixFlat<TInt>* uids = new (ELeave) CArrayFixFlat<TInt>(64);
+        CleanupStack::PushL( uids );
+        
+        // read uids from browser db
+        User::LeaveIfError( db.GetUids( *uids, KFavouritesRootUid, aTypeFilter ) );
+
+        // delete entries from db
+        for ( TInt i = 0; i < uids->Count(); i++ )
+            {
+            db.Delete( uids->At(i) );
+            }
+        
+        // db.Commit() seems to panic with EFavouritesNoTransaction
+        // deletion is successful even without commit, so not calling it
+        CleanupStack::PopAndDestroy( uids );
+        }
+       
+    // entries deleted, remove the Browser related registry
+    aEntryIds.Reset();
+    iEngine->RemoveStoreL( aDictUid );
+
+    CleanupStack::PopAndDestroy( &db );
+    CleanupStack::PopAndDestroy( &session );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_browserelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,216 @@
+/*
+* 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 "creator_browserelement.h"
+#include "creator_traces.h"
+#include "creator_browser.h"
+
+using namespace creatorbrowser;
+
+/*
+ * 
+ */
+CCreatorBrowserElement* CCreatorBrowserElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorBrowserElement* self = new (ELeave) CCreatorBrowserElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorBrowserElement::CCreatorBrowserElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
+
+
+/*
+ * 
+ */
+void CCreatorBrowserElement::ExecuteCommandL()
+    {
+    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
+    TInt entryAmount = 1;
+    TBool addAll = EFalse;
+    if( amountAttr )
+        {
+        entryAmount = ConvertStrToIntL(amountAttr->Value());
+        }
+    // Get 'fields' element 
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    if( fieldsElement )
+        {
+        // Get sub-elements
+        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();
+        // Create browser entries, the amount of entries is defined by entryAmount:
+        for( TInt cI = 0; cI < entryAmount; ++cI )
+            {
+            CBrowserParameters* param = 0;
+            
+            if( fields.Count() > 0 )
+            	param = new (ELeave) CBrowserParameters;
+            else
+            	{
+            	// No fields defined --> Add all fields with random values:
+            	addAll = ETrue;
+            	break;
+            	}
+            
+            CleanupStack::PushL(param);
+            
+            for( TInt i = 0; i < fields.Count(); ++i )
+                {
+                CCreatorScriptElement* field = fields[i];
+                TPtrC elemName = field->Name();                
+                TPtrC elemContent = field->Content();
+                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
+                if( elemName == KName )
+                    {
+                    if( randomAttr || elemContent.Length() == 0)
+                        {
+                        elemContent.Set(iEngine->RandomString(CCreatorEngine::ECompany));
+                        }
+                    if( iName->Des() == KBookmark )
+                        {
+                        SetContentToTextParamL(param->iBookmarkName, elemContent);                        
+                        }
+                    else if( iName->Des() == KBookmarkFolder )
+                        {
+                        SetContentToTextParamL(param->iBookmarkFolderName, elemContent);
+                        }
+                    else if( iName->Des() == KSavedPage )
+                        {
+                        SetContentToTextParamL(param->iSavedDeckLinkName, elemContent);
+                        }
+                    else if( iName->Des() == KSavedPageFolder )
+                        {
+                        SetContentToTextParamL(param->iSavedDeckFolderName, elemContent);
+                        }
+                    }
+                
+                else if( elemName == KPath )
+                    {                    
+                    if( randomAttr || elemContent.Length() == 0)
+                        {
+                        SetContentToTextParamL(param->iSavedDeckLocalAddress, iEngine->TestDataPathL(CCreatorEngine::ESavedDeck_1kB));
+                        }
+                    else
+                        {
+                        SetContentToTextParamL(param->iSavedDeckLocalAddress, elemContent);
+                        }
+                    }
+                else if( elemName == KUsername )
+                    {
+                    if( randomAttr || elemContent.Length() == 0)
+                        {
+                        // Set username and password to same string
+                        if( param->iBookmarkPassword && param->iBookmarkPassword->Length() > 0 )
+                            {
+                            SetContentToTextParamL(param->iBookmarkUsername, param->iBookmarkPassword->Des());
+                            }
+                        else
+                            {
+                            SetContentToTextParamL(param->iBookmarkUsername, iEngine->RandomString(CCreatorEngine::EFirstName));
+                            }
+                        }
+                    else
+                        {
+                        SetContentToTextParamL(param->iBookmarkUsername, elemContent);
+                        }
+                    }
+                else if( elemName == KPassword )
+                    {
+                    if( randomAttr || elemContent.Length() == 0)
+                        {
+                        // Set username and password to same string
+                        if( param->iBookmarkUsername && param->iBookmarkUsername->Length() > 0 )
+                            {
+                            SetContentToTextParamL(param->iBookmarkPassword, param->iBookmarkUsername->Des());
+                            }
+                        else
+                            {
+                            SetContentToTextParamL(param->iBookmarkPassword, iEngine->RandomString(CCreatorEngine::EFirstName));                                                    
+                            }
+                        }
+                    else
+                        {
+                        SetContentToTextParamL(param->iBookmarkPassword, elemContent);
+                        }
+                    }
+                else if( elemName == KUrl )
+                    {
+                    if( randomAttr || elemContent.Length() == 0)
+                        {
+                        TDesC* tmpUrl = iEngine->CreateHTTPUrlLC();
+                        if( tmpUrl )
+                            {
+                            SetContentToTextParamL(param->iBookmarkAddress, *tmpUrl );
+                            }
+                        CleanupStack::PopAndDestroy(); // tmpUrl                        
+                        }
+                    else
+                        {
+                        SetContentToTextParamL(param->iBookmarkAddress, elemContent);
+                        }
+                    }
+                }
+            iEngine->AppendToCommandArrayL(GetBrowserCommandL(), param);
+            CleanupStack::Pop(); // param
+            }
+        }
+    else
+    	{
+    	addAll = ETrue;
+    	}
+    
+    if( addAll )
+    	{
+    	iEngine->AppendToCommandArrayL(GetBrowserCommandL(), 0, entryAmount);
+    	}
+    }
+
+TInt CCreatorBrowserElement::GetBrowserCommandL() const
+    {
+    if( iName->Des() == KBookmark )
+        {
+        return ECmdCreateBrowserBookmarkEntries;
+        }
+    else if( iName->Des() == KBookmarkFolder )
+        {
+        return ECmdCreateBrowserBookmarkFolderEntries;
+        }
+    else if( iName->Des() == KSavedPage )
+        {
+        return ECmdCreateBrowserSavedPageEntries;
+        }
+    else if( iName->Des() == KSavedPageFolder )
+        {
+        return ECmdCreateBrowserSavedPageFolderEntries;
+        }
+    
+    LOGSTRING("CCreatorFileElement::GetBrowserCommandL: Unknown browser entry");
+    User::Leave(KErrGeneral);
+    return 0; // Not reached, but disables compiler warning...
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_calendar.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1373 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+
+#include "creator_calendar.h" 
+#include "creator_traces.h"
+#include "creator_scriptentry.h"
+#include <e32base.h>
+#include <e32math.h>
+#include <calrrule.h> 
+#include <calalarm.h>
+#include "creator_contactsetcache.h"
+#include "creator_phonebook.h"
+
+static const TInt KCalendarFieldLength = 128;
+
+
+CCreatorCalenderAttendee::CCreatorCalenderAttendee() 
+    {}
+
+CCreatorCalenderAttendee::~CCreatorCalenderAttendee()
+    {
+    delete iCommonName;
+    delete iEmailAddress;
+    }
+
+CCreatorCalenderAttendee* CCreatorCalenderAttendee::NewL()
+    {
+    CCreatorCalenderAttendee* self = new (ELeave) CCreatorCalenderAttendee;
+    return self;
+    }
+
+void CCreatorCalenderAttendee::SetCommonNameL(const TDesC& aName)
+    {
+    delete iCommonName;
+    iCommonName = 0;
+    iCommonName = HBufC::NewL(aName.Length());
+    iCommonName->Des().Copy(aName);
+    }
+
+void CCreatorCalenderAttendee::SetEmailAddressL(const TDesC& aEmail)
+    {
+    delete iEmailAddress;
+    iEmailAddress = 0;
+    iEmailAddress = HBufC::NewL(aEmail.Length());
+    iEmailAddress->Des().Copy(aEmail);
+    }
+
+void CCreatorCalenderAttendee::SetRole(CCalAttendee::TCalRole aRole)
+    {
+    iRole = aRole;
+    }
+
+void CCreatorCalenderAttendee::SetStatus(CCalAttendee::TCalStatus aStatus)
+    {
+    iStatus = aStatus;
+    }
+
+const TDesC& CCreatorCalenderAttendee::CommonName() const
+    {
+    if( iCommonName == 0 )
+    	return iDummy;
+    return *iCommonName;
+    }
+
+const TDesC& CCreatorCalenderAttendee::EmailAddress() const
+    {
+    if( iEmailAddress == 0 )
+    	return iDummy;
+    
+    return *iEmailAddress;
+    }
+
+CCalAttendee::TCalRole CCreatorCalenderAttendee::Role() const
+    {
+    return iRole;
+    }
+
+CCalAttendee::TCalStatus CCreatorCalenderAttendee::Status() const
+    {
+    return iStatus;
+    }
+
+TBool CCalenderInterimParameters::IsAllowedEntryStatus(CCalEntry::TType aType, CCalEntry::TStatus aStatus)
+    {
+    if( aType == CCalEntry::ETodo )
+        {
+        return  aStatus == CCalEntry::ECancelled ||
+                aStatus == CCalEntry::ETodoNeedsAction ||
+                aStatus == CCalEntry::ETodoCompleted ||
+                aStatus == CCalEntry::ETodoInProcess;
+        }
+    
+    return  aStatus == CCalEntry::ETentative ||
+            aStatus == CCalEntry::EConfirmed ||
+            aStatus == CCalEntry::ECancelled;
+    }
+
+//----------------------------------------------------------------------------
+
+CCalenderInterimParameters::CCalenderInterimParameters ( )
+    {
+    LOGSTRING("Creator: CCalenderInterimParameters::CCalenderInterimParameters");
+
+    iAppointmentLocation = HBufC::New (KCalendarFieldLength );
+    iAppointmentReason = HBufC::New (KCalendarFieldLength );
+    iEventReason = HBufC::New (KCalendarFieldLength );
+    iAnniversaryReason = HBufC::New (KCalendarFieldLength );
+    iTodoTask = HBufC::New (KCalendarFieldLength );
+    iReminderReason = HBufC::New (KCalendarFieldLength );
+    iDescription = HBufC::New (KCalendarFieldLength );
+    iSummary = HBufC::New (KCalendarFieldLength );
+    iLocation = HBufC::New (KCalendarFieldLength );
+    iOrganizerName = HBufC::New (KCalendarFieldLength );
+    iOrganizerEmail = HBufC::New (KCalendarFieldLength );
+
+    // set defaults, start date today and end date = today + 1 month
+    iRandomModeStartTime.HomeTime ( );
+    iRandomModeEndTime = iRandomModeStartTime;
+    iRandomModeEndTime += TTimeIntervalMonths (1 );
+    iAlarmTime = Time::NullTTime();
+    iUseRandomAlarmTime = EFalse;
+    iStatus = CCalEntry::ENullStatus;
+    }
+
+CCalenderInterimParameters::~CCalenderInterimParameters ( )
+    {
+    LOGSTRING("Creator: CCalenderInterimParameters::~CCalenderInterimParameters");
+
+    delete iTodoTask;
+    delete iAnniversaryReason;
+    delete iEventReason;
+    delete iAppointmentReason;
+    delete iAppointmentLocation;
+    delete iReminderReason;
+    delete iDescription;
+    delete iSummary;
+    delete iLocation;
+    delete iOrganizerName;
+    delete iOrganizerEmail;
+    iAttendees.ResetAndDestroy();
+    iAttendees.Close();
+    iAttendeeLinkIds.Reset();
+    iAttendeeLinkIds.Close();
+    }
+
+void CCalenderInterimParameters::ParseL (CCommandParser* parser,
+        TParseParams aCase )
+    {
+    LOGSTRING("Creator: CCalenderInterimParameters::ParseL");
+
+    HBufC* tempBuf= NULL;
+
+    switch (aCase )
+        {
+
+        case MCreatorModuleBaseParameters::ECalendarTodo:
+            {
+
+            parser->StrParserL (tempBuf, '|' );
+
+            CleanupStack::PushL (tempBuf );
+
+            this->iTodoDueTime = TTime (tempBuf->Des ( ) );
+
+            parser->StrParserL (this->iTodoTask, '|' );
+
+            parser->StrParserL (tempBuf, ';' );
+            this->iTodoPriority = 2;
+            if (tempBuf->Compare (_L("LOW") ) == 0 )
+                this->iTodoPriority = 3;
+            else
+                if (tempBuf->Compare (_L("HIGH") ) == 0 )
+                    this->iTodoPriority = 1;
+
+            CleanupStack::PopAndDestroy (tempBuf );
+
+            }
+            break;
+
+        case MCreatorModuleBaseParameters::ECalendarMemo:
+            {
+
+            parser->StrParserL (tempBuf, '|' );
+
+            this->iStartTime = TTime (tempBuf->Des ( ) );
+
+            parser->StrParserL (tempBuf, '|' );
+            this->iEndTime = TTime (tempBuf->Des ( ) );
+
+            parser->StrParserL (this->iDescription, ';' );
+
+            CleanupStack::PopAndDestroy (tempBuf );
+            }
+            break;
+
+        case MCreatorModuleBaseParameters::ECalendarMeeting:
+            {
+
+            parser->StrParserL (tempBuf, '|' );
+
+            CleanupStack::PushL (tempBuf );
+
+            this->iStartTime = TTime (tempBuf->Des ( ) );
+
+            parser->StrParserL (tempBuf, '|' );
+            this->iEndTime = TTime (tempBuf->Des ( ) );
+
+            parser->StrParserL (this->iLocation, '|' );
+            parser->StrParserL (this->iDescription, ';' );
+
+            CleanupStack::PopAndDestroy (tempBuf );
+            }
+            break;
+
+        case MCreatorModuleBaseParameters::ECalendarAnniv:
+            {
+
+            parser->StrParserL (tempBuf, '|' );
+
+            CleanupStack::PushL (tempBuf );
+
+            this->iStartTime = TTime (tempBuf->Des ( ) );
+
+            parser->StrParserL (this->iDescription, ';' );
+
+            CleanupStack::PopAndDestroy (tempBuf );
+
+            }
+            break;
+        default:
+            {
+            //implement 
+            }
+            break;
+        }
+    }
+//----------------------------------------------------------------------------
+
+CCreatorInterimCalendar* CCreatorInterimCalendar::NewL (CCreatorEngine* aEngine )
+    {
+    CCreatorInterimCalendar* self = CCreatorInterimCalendar::NewLC (aEngine );
+    CleanupStack::Pop (self );
+    return self;
+    }
+
+CCreatorInterimCalendar* CCreatorInterimCalendar::NewLC (CCreatorEngine* aEngine )
+    {
+    CCreatorInterimCalendar* self = new (ELeave) CCreatorInterimCalendar;
+    CleanupStack::PushL (self );
+    self->ConstructL (aEngine );
+    return self;
+    }
+
+CCreatorInterimCalendar::CCreatorInterimCalendar ( )
+    {
+    }
+
+void CCreatorInterimCalendar::ConstructL (CCreatorEngine* aEngine )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::ConstructL");
+
+    iEngine = aEngine;
+
+    // set defaults, start date today and end date = today + 1 month
+    iRandomModeStartTime.HomeTime ( );
+    iRandomModeEndTime = iRandomModeStartTime;
+    iRandomModeEndTime += TTimeIntervalMonths (1 );
+
+    iCalSession = CCalSession::NewL ( );
+    // Create and open a calendar file
+    const TDesC& fileName = iCalSession->DefaultFileNameL ( );//default filename is: "C:Calendar"
+    TRAPD(err, iCalSession->CreateCalFileL(fileName))
+    ;
+    // ignore KErrAlreadyExists leave code
+    if (err != KErrAlreadyExists )
+        {
+        User::LeaveIfError (err );
+        }
+    // Open the calendar file
+    iCalSession->OpenL (fileName );
+    iCalEntryView = CCalEntryView::NewL (*iCalSession, *this );
+    iNumberRepeatingEntries = 0;
+    iNumberOfAttendees = 0; //iEngine->RandomNumber(2, 15);
+    iSetAlarm = EFalse;
+    iWaiter = CAsyncWaiter::NewL();
+    }
+
+CCreatorInterimCalendar::~CCreatorInterimCalendar ( )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::~CCreatorInterimCalendar");
+
+    if ( iEngine && iEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidCalendar ) );
+        }
+        
+    iEntryIds.Reset();
+    iEntryIds.Close();
+        
+    if (iParameters )
+        {
+        delete iParameters;
+        }
+
+    if (iCalEntryView )
+        {
+        delete iCalEntryView;
+        }
+
+    if (iCalSession )
+        {
+        delete iCalSession;
+        }
+    delete iSoundFileArray;
+    delete iWaiter;
+    delete iTmpCN;
+    delete iTmpEmail;
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorInterimCalendar::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::QueryDialogClosedL");
+    
+    if( aPositiveAction == EFalse && aUserData != ECreatorCalendarAddDefaultAlarm )
+        {
+        iEngine->ShutDownEnginesL();
+        return;
+        }
+    
+    const TDesC* showText = &KSavingText;
+    TBool finished(EFalse);
+    TBool retval(ETrue);
+    switch(aUserData)
+        {
+        case ECreatorCalendarDelete:
+            iEntriesToBeCreated = 1;
+            showText = &KDeletingText;
+            finished = ETrue;
+            break;
+        case ECreatorCalendarStart:
+            if( iCommand == ECmdCreateCalendarEntryEvents || iCommand == ECmdCreateCalendarEntryAppointments )
+                {
+                _LIT(KRepeatingNum, "How many repeating (weekly) entries");
+                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberRepeatingEntries, KRepeatingNum, ETrue, this, ECreatorCalendarGetWeeklyEntries);
+                }
+            else
+                {
+                _LIT(KStartPeriodDate, "Start date of creation period");// \n dd/mm/yyyy
+                retval = iEngine->GetEngineWrapper()->TimeQueryDialog(&iRandomModeStartTime, KStartPeriodDate, this, ECreatorCalendarGetStartDate); // ask start date
+                }
+            break;
+        case ECreatorCalendarGetWeeklyEntries:
+            _LIT(KAttendeesNum, "How many attendees to create");
+            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfAttendees, KAttendeesNum, ETrue, this, ECreatorCalendarGetAttendies);
+            break;
+        case ECreatorCalendarGetAttendies:
+            {
+            // ask start date
+            _LIT(KStartPeriodDate, "Start date of creation period");
+            retval = iEngine->GetEngineWrapper()->TimeQueryDialog(&iRandomModeStartTime, KStartPeriodDate, this, ECreatorCalendarGetStartDate ); 
+            }
+            break;
+        case ECreatorCalendarGetStartDate:
+            {
+            _LIT(KEndPeriodDate, "End date of creation period\n dd/mm/yyyy");
+            iEngine->GetEngineWrapper()->TimeQueryDialog (&iRandomModeEndTime, KEndPeriodDate, this, ECreatorCalendarGetEndDate ); // ask end date
+            }
+            break;
+        case ECreatorCalendarGetEndDate:
+           if (iRandomModeStartTime > iRandomModeEndTime ) // check end date is ok
+                {
+                iEngine->GetEngineWrapper()->ShowNote(_L("End date must be after start date") );
+                retval = EFalse;
+                }
+            else 
+                {
+                retval = iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Add default alarm?"), this, ECreatorCalendarAddDefaultAlarm);
+                }
+           break;
+        case ECreatorCalendarAddDefaultAlarm:
+            iSetAlarm = aPositiveAction;
+            finished = ETrue;
+            break;
+        default:
+            //some error
+            retval = EFalse;
+            break;
+        }
+    if( retval == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        }
+    else if( finished )
+        {
+        // add this command to command array
+        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
+        // started exucuting commands
+        iEngine->ExecuteFirstCommandL( *showText );
+        }
+    }
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorInterimCalendar::AskDataFromUserL( TInt aCommand )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::AskDataFromUserL");
+    
+    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
+    
+    if( aCommand == ECmdDeleteCalendarEntries )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all calendar entries?"), this, ECreatorCalendarDelete );
+        }
+    if( aCommand == ECmdDeleteCreatorCalendarEntries )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all calendar entries created with Creator?"), this, ECreatorCalendarDelete ); 
+        }
+
+    // display queries
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorCalendarStart ); // ask number of entries to create
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorInterimCalendar::CreateAppointmentEntryL (
+        CCreatorModuleBaseParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::CreateAppointmentEntryL");
+        
+    delete iParameters;
+    iParameters = 0;
+    
+    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;   
+    
+    if( !parameters )
+        {
+        iParameters = new(ELeave) CCalenderInterimParameters;
+        parameters = iParameters;  
+        parameters->iRandomModeStartTime = iRandomModeStartTime;
+        parameters->iRandomModeEndTime = iRandomModeEndTime;    
+    
+        // difference between start and end times
+        TTimeIntervalMinutes differenceInMinutes;
+        parameters->iRandomModeEndTime.MinutesFrom (
+                parameters->iRandomModeStartTime, differenceInMinutes );
+
+        // start time (= something between the period start and end date)        
+        parameters->iStartTime = parameters->iRandomModeStartTime;
+        parameters->iStartTime
+                += TTimeIntervalMinutes (iEngine->RandomNumber (differenceInMinutes.Int ( ) ) );   
+        // set end time (= start time + some random time)    
+        parameters->iEndTime = parameters->iStartTime;    
+        parameters->iEndTime
+                += TTimeIntervalMinutes (iEngine->RandomNumber (5, 500 ) );
+        
+
+        // strings        
+        parameters->iLocation->Des ( )
+                = iEngine->RandomString (CCreatorEngine::EMeetingPlace );
+        parameters->iDescription->Des ( )
+                = iEngine->RandomString (CCreatorEngine::EMeetingReason );
+        
+        parameters->iSummary->Des()
+                        = parameters->iDescription->Des();
+        
+        parameters->iNumberRepeatingEntries = iNumberRepeatingEntries;
+        parameters->iNumberOfAttendees = iNumberOfAttendees;
+        }
+
+    TInt err = KErrNone;
+    HBufC8* guid = HBufC8::NewLC (255 );
+    TPtr8 uidP=guid->Des ( );
+    GenerateRandomId (uidP );
+    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EAppt, guid,
+            CCalEntry::EMethodAdd, 0 );
+    CleanupStack::PushL (entry );
+
+    //Using same text as description and summary	
+    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
+    entry->SetSummaryL (parameters->iSummary->Des ( ) );
+    entry->SetLocationL (parameters->iLocation->Des ( ) );
+
+    TCalTime startTime;
+    TCalTime endTime;
+    // Set the start and end times using time values local to the current system time zone
+    TInt month = (TInt) parameters->iStartTime.DateTime().Month();
+    TInt date = parameters->iStartTime.DateTime().Day();
+    startTime.SetTimeLocalL (parameters->iStartTime );
+    endTime.SetTimeLocalL (parameters->iEndTime );
+    entry->SetStartAndEndTimeL (startTime, endTime );       
+    
+    if( parameters->IsAllowedEntryStatus(CCalEntry::EAppt, parameters->iStatus))
+        {
+        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateAppointmentEntryL setting entry status: %d", parameters->iStatus);
+        entry->SetStatusL(parameters->iStatus);
+        }
+    
+    // Repeating times:
+    AddRepeatingRuleL(startTime, *entry, parameters);
+    SetOrganizerL(*entry, parameters);
+    
+    // Alarm:    
+    if( iSetAlarm || parameters->iUseRandomAlarmTime )
+        {        
+        SetRandomAlarmL(*entry);
+        }
+    else
+        {
+        SetAlarmL(*entry, parameters);
+        }
+        
+    // Add attendees:
+    AddAttendeesL(*entry, parameters);
+    
+    RPointerArray<CCalEntry> array;
+    CleanupClosePushL (array );
+    array.AppendL (entry );
+    
+    TInt success(0);
+    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
+    iCalEntryView->StoreL (array, success );
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    iEntryIds.AppendL( entry->LocalUidL() );
+    
+    //One item should be added at time
+    if (success != 1 )
+        {
+        err = 1;
+        }
+
+    CleanupStack::PopAndDestroy (&array );
+    CleanupStack::PopAndDestroy (entry );
+    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
+
+    return err;
+    }
+
+void CCreatorInterimCalendar::SetOrganizerL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters )
+    {    
+    HBufC* orgName = 0;
+    HBufC* orgEmail = 0;
+    _LIT(KSpace, " ");
+    
+    //
+    // Common name
+    //
+    if( parameters == 0 || 
+        parameters->iOrganizerName == 0 || 
+        parameters->iOrganizerName->Length() == 0 )
+        {     
+        // Random:
+        TPtrC firstname  = iEngine->RandomString(CCreatorEngine::EFirstName);
+        TPtrC lastname = iEngine->RandomString(CCreatorEngine::ESurname);
+        orgName = HBufC::NewL(firstname.Length() + lastname.Length() + 1 );
+        CleanupStack::PushL(orgName);
+        orgName->Des().Copy(firstname);
+        orgName->Des().Append(KSpace);
+        orgName->Des().Append(lastname);        
+        }
+    else
+        {
+        orgName = HBufC::NewL(parameters->iOrganizerName->Length());
+        CleanupStack::PushL(orgName);
+        orgName->Des().Copy(parameters->iOrganizerName->Des());
+        }
+    
+    //
+    // Email
+    //
+    if( parameters == 0 ||
+        parameters->iOrganizerEmail == 0 || 
+        parameters->iOrganizerEmail->Length() == 0 )
+        {        
+        // Random:
+        TDesC* tmp = iEngine->CreateEmailAddressLC();
+        orgEmail = HBufC::NewL(tmp->Length());
+        orgEmail->Des().Copy(*tmp);
+        CleanupStack::PopAndDestroy(); // tmp
+        CleanupStack::PushL(orgEmail);
+        }
+    else
+        {
+        orgEmail = HBufC::NewL(parameters->iOrganizerEmail->Length());
+        CleanupStack::PushL(orgEmail);
+        orgEmail->Des().Copy(parameters->iOrganizerEmail->Des());
+        }
+    
+    SetOrganizerL(aCalEntry, orgName->Des(), orgEmail->Des(), orgEmail->Des());
+    CleanupStack::PopAndDestroy(); // orgName
+    CleanupStack::PopAndDestroy(); // orgEmail
+    }
+
+void CCreatorInterimCalendar::AddRepeatingRuleL(const TCalTime& aStartTime, CCalEntry& aCalEntry, CCalenderInterimParameters* parameters )
+    {
+    RArray<TDay> days;
+    CleanupClosePushL(days);
+    
+    // Recurrence rule. Weekly event.
+    if( parameters->iNumberRepeatingEntries > 0 )
+        {
+        TCalRRule calRepeat(TCalRRule::EWeekly);   
+        calRepeat.SetDtStart(aStartTime);
+        calRepeat.SetCount(parameters->iNumberRepeatingEntries);        
+        calRepeat.SetInterval(1);
+        //days.AppendL((TDay) iEngine->RandomNumber((TInt)EMonday, (TInt) ESunday));
+        TDay tempDay(aStartTime.TimeLocalL().DayNoInWeek());
+        days.AppendL(tempDay);
+        calRepeat.SetByDay(days);        
+        aCalEntry.SetRRuleL(calRepeat);
+        }
+    else if(parameters->iRecurrentFrequency > TCalRRule::EInvalid)
+        {
+        TCalTime calTime;        
+        // Recurrent frequency
+        TCalRRule calRepeat(parameters->iRecurrentFrequency);
+        // Recurrent start        
+        calRepeat.SetDtStart(aStartTime);
+        if( parameters->iRecurrentFrequency == TCalRRule::EWeekly )
+        	{
+        	TDay tempDay(aStartTime.TimeLocalL().DayNoInWeek());
+        	days.AppendL(tempDay);        
+        	calRepeat.SetByDay(days);  
+        	}
+        else if( parameters->iRecurrentFrequency == TCalRRule::EMonthly )
+        	{
+        	RArray< TInt > daysInMonth;
+        	CleanupClosePushL(daysInMonth);
+        	daysInMonth.AppendL(aStartTime.TimeLocalL().DayNoInMonth());
+        	calRepeat.SetByMonthDay(daysInMonth);
+        	CleanupStack::PopAndDestroy(&daysInMonth);
+        	}
+        else if( parameters->iRecurrentFrequency == TCalRRule::EYearly)
+        	{
+        	RArray< TMonth > monthsInYear;
+        	CleanupClosePushL(monthsInYear);
+        	monthsInYear.AppendL(aStartTime.TimeLocalL().DateTime().Month());
+        	calRepeat.SetByMonth(monthsInYear);
+        	CleanupStack::PopAndDestroy(&monthsInYear);
+        	}
+        
+        // Recurrent interval
+        if( parameters->iRecurrentInterval > 0 )
+        	calRepeat.SetInterval(parameters->iRecurrentInterval);
+                
+        // Recurrent end. End can be given as a number of repeating entries or as an end date.
+        // End date must be later than the start date, otherwise CCalEntry::SetRRuleL() panics.
+        if( parameters->iRepeatingCount > 0 )
+            {
+            calRepeat.SetCount(parameters->iRepeatingCount);
+            aCalEntry.SetRRuleL(calRepeat);            
+            }
+        else
+            {
+            TCalTime endTime;
+            endTime.SetTimeLocalL(parameters->iRecurrentEndTime);
+            if( endTime.TimeLocalL() > aStartTime.TimeLocalL())
+            	{
+            	calRepeat.SetUntil(endTime);
+            	aCalEntry.SetRRuleL(calRepeat);
+            	}
+            }           
+        }
+    CleanupStack::PopAndDestroy(&days);
+    }
+
+void CCreatorInterimCalendar::SetAlarmL(CCalEntry& aCalEntry, CCalenderInterimParameters* params)
+    {
+    if( params->iAlarmTime != Time::NullTTime() )
+        {
+        CCalAlarm* alarm = CCalAlarm::NewL();
+        CleanupStack::PushL(alarm);
+        //if( params->iAlarmTime <= params->iStartTime )
+        //	{
+        	TTimeIntervalMinutes diff;
+        	TInt err = params->iStartTime.MinutesFrom(params->iAlarmTime, diff);
+        	if( err == KErrNone)
+        		{
+        		alarm->SetTimeOffset(diff);
+        		TRAP(err, aCalEntry.SetAlarmL(alarm));
+        		if( err != KErrNone && err !=  KErrNotSupported )
+        			{
+        			User::Leave(err);
+        			}        		
+        		}
+        //	}
+        CleanupStack::PopAndDestroy(alarm);
+        }
+    }
+
+void CCreatorInterimCalendar::SetRandomAlarmL(CCalEntry& aCalEntry)
+    {
+    CCalAlarm* alarm = CCalAlarm::NewL();
+    CleanupStack::PushL(alarm);
+    alarm->SetTimeOffset(TTimeIntervalMinutes(iEngine->RandomNumber(0, 60)));
+    
+    TRAPD(err, aCalEntry.SetAlarmL(alarm));
+    if( err != KErrNone && err !=  KErrNotSupported )
+    	{
+    	User::Leave(err);
+    	}
+    CleanupStack::PopAndDestroy(alarm);
+    }
+
+void CCreatorInterimCalendar::SetPhoneOwnerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy )
+    {
+    CCalUser* phOwner = CCalUser::NewL(aEmail, aSentBy);
+    CleanupStack::PushL(phOwner);
+    TRAPD(err, aCalEntry.SetPhoneOwnerL(phOwner));            
+    CleanupStack::Pop(phOwner);
+    if( err == KErrNone )
+        {
+        phOwner->SetCommonNameL(aCN);
+        }
+    else
+        {
+        delete phOwner;
+        }
+    }
+
+void CCreatorInterimCalendar::SetOrganizerL(CCalEntry& aCalEntry, const TDesC& aCN, const TDesC& aEmail, const TDesC& aSentBy)
+    {
+    CCalUser* organizer = CCalUser::NewL(aEmail, aSentBy);
+    CleanupStack::PushL(organizer);
+    TRAPD(err, aCalEntry.SetOrganizerL(organizer));
+    CleanupStack::Pop(organizer);
+    if( err == KErrNone )
+        {
+        organizer->SetCommonNameL(aCN);
+        }
+    else
+        {
+        delete organizer;
+        }
+    }
+
+void CCreatorInterimCalendar::AddAttendeesL(CCalEntry& aCalEntry, CCalenderInterimParameters* parameters )
+    {
+    if( !parameters )
+        return;
+            
+    // Random attendees:
+    TInt numOfAttendees = parameters->iNumberOfAttendees;
+    for( TInt i = 0; i < numOfAttendees; ++i )
+        {
+        TPtrC firstname  = iEngine->RandomString(CCreatorEngine::EFirstName);
+        TPtrC lastname   = iEngine->RandomString(CCreatorEngine::ESurname);
+        TPtrC company    = iEngine->RandomString(CCreatorEngine::ECompany);
+        _LIT(KCountry, "com");        
+        TDesC* emailAddr = iEngine->CreateEmailAddressLC(firstname, lastname, company, KCountry);        
+        CCalAttendee* attendee = CCalAttendee::NewL(*emailAddr);        
+        CleanupStack::PushL(attendee);
+        aCalEntry.AddAttendeeL(attendee);
+        CleanupStack::Pop(attendee);
+        attendee->SetCommonNameL(firstname);
+                
+        // Set phone owner:
+        if( i == 1 )
+            {             
+            SetPhoneOwnerL(aCalEntry, firstname, *emailAddr, *emailAddr); 
+            attendee->SetRoleL(CCalAttendee::EReqParticipant); 
+            }
+        // Set organizer:
+        else if ( i == 0 )
+            {            
+            // Organizer is the chairman of the meeting:
+            SetOrganizerL(aCalEntry, firstname, *emailAddr, *emailAddr);
+            attendee->SetRoleL(CCalAttendee::EChair);
+            }
+        else if( i % 3 == 0 )
+            {
+            // every third attendee is optional:
+            attendee->SetRoleL(CCalAttendee::EOptParticipant);
+            }
+        else
+            {
+            // Others are required attendees:
+            attendee->SetRoleL(CCalAttendee::EReqParticipant);            
+            }
+        
+        TInt attStatus = iEngine->RandomNumber(0,5);
+        attendee->SetStatusL((CCalAttendee::TCalStatus) attStatus);
+        
+        CleanupStack::PopAndDestroy(emailAddr);
+        }
+    
+    // Explicit attendees:
+    for( TInt i = 0; i < parameters->iAttendees.Count(); ++i )
+        {
+        CCreatorCalenderAttendee* attendeeInfo = parameters->iAttendees[i];
+        if( attendeeInfo && attendeeInfo->EmailAddress().Length() > 0)
+        	{
+        	CCalAttendee* attendee = CCalAttendee::NewL(attendeeInfo->EmailAddress());
+        	CleanupStack::PushL(attendee);
+        	if( attendeeInfo->CommonName().Length() > 0 )
+        		attendee->SetCommonNameL(attendeeInfo->CommonName());
+        	attendee->SetRoleL(attendeeInfo->Role());
+        	attendee->SetStatusL(attendeeInfo->Status());
+        	attendee->SetResponseRequested(ETrue);
+        	aCalEntry.AddAttendeeL(attendee);
+        	CleanupStack::Pop(); // attendee
+        	}
+        }
+    // linked attendees:
+     for( TInt i = 0; i < parameters->iAttendeeLinkIds.Count(); ++i )
+        {
+        CCreatorPhonebook* phonebook = dynamic_cast<CCreatorPhonebook*>(iEngine->GetPhonebook());
+        User::LeaveIfNull( phonebook );
+        CCreatorPhonebookWrapper* phonebookWrapper = phonebook->GetPhonebookWrapper();
+        
+        TLinkIdParam attendeeLinkId = parameters->iAttendeeLinkIds[i];
+        const CCreatorContactSet& set = ContactLinkCache::Instance()->ContactSet(attendeeLinkId.iLinkId);
+        const RArray<TUint32> links = set.ContactLinks();
+        TInt numberOfExplicitLinks = links.Count(); // Number of defined contacts in contact-set
+        for( TInt j = 0; j < numberOfExplicitLinks; ++j )
+            {
+            TBuf<128> email;
+            TBuf<128> name;
+            TBuf<128> phoneNumber;
+            phonebookWrapper->GetContactDetailsL( links[j], name, phoneNumber, email );
+            CCalAttendee* attendee = CCalAttendee::NewL( email );
+            CleanupStack::PushL(attendee);
+            if( name.Length() > 0 )
+                attendee->SetCommonNameL( name );
+            attendee->SetResponseRequested(ETrue);
+            aCalEntry.AddAttendeeL(attendee);
+            CleanupStack::Pop(); // attendee
+            }
+        }
+    }
+//----------------------------------------------------------------------------
+
+TInt CCreatorInterimCalendar::CreateEventEntryL (
+        CCreatorModuleBaseParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::CreateEventEntryL");
+
+    delete iParameters;
+    iParameters = 0;
+        
+    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;       
+    
+    // random data needed if no predefined data available
+    if (!parameters )
+        {
+        iParameters = new(ELeave) CCalenderInterimParameters;
+
+        iParameters->iRandomModeStartTime = iRandomModeStartTime;
+        iParameters->iRandomModeEndTime = iRandomModeEndTime;
+        iParameters->iNumberRepeatingEntries = iNumberRepeatingEntries;
+        iParameters->iNumberOfAttendees = iNumberOfAttendees;
+        
+        // difference between start and end times
+        TTimeIntervalMinutes differenceInMinutes;
+        iParameters->iRandomModeEndTime.MinutesFrom (
+                iParameters->iRandomModeStartTime, differenceInMinutes );
+
+        // start time (= something between the period start and end date)
+        iParameters->iStartTime = iParameters->iRandomModeStartTime;
+        iParameters->iStartTime
+                += TTimeIntervalMinutes (iEngine->RandomNumber (differenceInMinutes.Int ( ) ) );
+
+        // set end time (= start time + some random time)
+        iParameters->iEndTime = iParameters->iStartTime;
+        iParameters->iEndTime
+                += TTimeIntervalMinutes (iEngine->RandomNumber (5, 500 ) );        
+
+        // strings
+        iParameters->iDescription->Des()
+                = iEngine->RandomString (CCreatorEngine::EMemoText );
+        
+        iParameters->iSummary->Des() = iParameters->iDescription->Des();
+        
+        // Random event status:
+        iParameters->iStatus = 
+            (CCalEntry::TStatus) iEngine->RandomNumber(0, (TInt) CCalEntry::ECancelled);
+        
+        parameters = iParameters;
+        }
+
+    TInt err = KErrNone;
+    HBufC8* guid = HBufC8::NewLC (255 );
+    TPtr8 uidP=guid->Des ( );
+    GenerateRandomId (uidP );
+    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EEvent, guid,
+            CCalEntry::EMethodAdd, 0 );
+    CleanupStack::PushL (entry );
+    // iEntryUids->AppendL( *guid->Alloc() );
+    
+    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
+    entry->SetSummaryL (parameters->iSummary->Des ( ) );
+
+    TCalTime startTime;
+    TCalTime endTime;
+    // Set the start and end times using time values local to the current system time zone
+    startTime.SetTimeLocalL (parameters->iStartTime );
+    endTime.SetTimeLocalL (parameters->iEndTime );
+    entry->SetStartAndEndTimeL (startTime, endTime );
+
+    // Repeating times:
+    AddRepeatingRuleL(startTime, *entry, parameters);
+    
+    if( iSetAlarm || parameters->iUseRandomAlarmTime )
+        {        
+        SetRandomAlarmL(*entry);
+        }
+    else
+        {
+        SetAlarmL(*entry, parameters);
+        }
+    
+    // Add attendees:
+    AddAttendeesL(*entry, parameters);    
+    
+    if( parameters->IsAllowedEntryStatus(CCalEntry::EEvent, parameters->iStatus))
+        {
+        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateEventEntryL setting entry status: %d", parameters->iStatus);
+        entry->SetStatusL(parameters->iStatus);
+        }
+        
+    RPointerArray<CCalEntry> array;
+    CleanupClosePushL (array );
+    array.AppendL (entry );
+
+    TInt success(0);
+    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
+    iCalEntryView->StoreL (array, success );
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    iEntryIds.AppendL( entry->LocalUidL() );
+    
+    //One item should be added at time
+    if (success != 1 )
+        {
+        err = 1;
+        }
+
+    CleanupStack::PopAndDestroy (&array );
+    CleanupStack::PopAndDestroy (entry );
+    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
+    return err;
+
+    }
+
+//----------------------------------------------------------------------------
+
+
+TInt CCreatorInterimCalendar::CreateReminderEntryL (
+        CCreatorModuleBaseParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::CreateReminderEntryL");
+
+    delete iParameters;
+    iParameters = NULL;
+    
+    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;
+
+    // random data needed if no predefined data available
+    if (!parameters )
+        {
+        iParameters = new(ELeave) CCalenderInterimParameters;
+
+        iParameters->iRandomModeStartTime = iRandomModeStartTime;
+        iParameters->iRandomModeEndTime = iRandomModeEndTime;
+
+        // difference between start and end times
+        TTimeIntervalDays
+                differenceInDays = iParameters->iRandomModeEndTime.DaysFrom (iParameters->iRandomModeStartTime );
+
+        // due time (= something between the period start and end date)
+        iParameters->iStartTime = iParameters->iRandomModeStartTime;
+        iParameters->iStartTime
+                += TTimeIntervalDays (iEngine->RandomNumber (differenceInDays.Int ( ) ) );
+
+        // strings
+        iParameters->iDescription->Des()
+                = iEngine->RandomString (CCreatorEngine::EReminderText );
+        
+        iParameters->iSummary->Des() = iParameters->iDescription->Des();
+
+        parameters = iParameters;
+        }
+
+    TInt err = KErrNone;
+
+    HBufC8* guid = HBufC8::NewLC (255 );
+    TPtr8 uidP=guid->Des ( );
+    GenerateRandomId (uidP );
+
+    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EReminder, guid,
+            CCalEntry::EMethodAdd, 0 );
+    CleanupStack::PushL (entry );
+
+    //Using same text as description and summary    
+    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
+    entry->SetSummaryL (parameters->iSummary->Des ( ) );
+
+    TCalTime startTime;
+    TCalTime endTime;
+    // Set the start and end times using time values local to the current system time zone
+    startTime.SetTimeLocalL (parameters->iStartTime );
+    TTime nullTime = Time::NullTTime ( );
+    endTime.SetTimeLocalL (nullTime );
+    entry->SetStartAndEndTimeL (startTime, endTime );
+        
+    if( parameters->IsAllowedEntryStatus(CCalEntry::EReminder, parameters->iStatus))
+        {
+        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateReminderEntryL setting entry status: %d", parameters->iStatus);
+        entry->SetStatusL(parameters->iStatus);
+        }
+    
+    if( iSetAlarm || parameters->iUseRandomAlarmTime )
+        {        
+        SetRandomAlarmL(*entry);
+        }
+    else
+        {
+        SetAlarmL(*entry, parameters);
+        }
+
+    RPointerArray<CCalEntry> array;
+    CleanupClosePushL (array );
+    array.AppendL (entry );
+
+    TInt success(0);
+    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
+    iCalEntryView->StoreL (array, success );
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    iEntryIds.AppendL( entry->LocalUidL() );
+    
+    //One item should be added at time
+    if (success != 1 )
+        {
+        err = 1;
+        }
+
+    CleanupStack::PopAndDestroy (&array );
+    CleanupStack::PopAndDestroy (entry );
+    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorInterimCalendar::CreateAnniversaryEntryL (
+        CCreatorModuleBaseParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::CreateAnniversaryEntryL");
+
+    delete iParameters;
+    iParameters = NULL;
+    
+    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;
+
+    // random data needed if no predefined data available
+    if (!parameters )
+        {
+        iParameters = new(ELeave) CCalenderInterimParameters;
+
+        iParameters->iRandomModeStartTime = iRandomModeStartTime;
+        iParameters->iRandomModeEndTime = iRandomModeEndTime;
+
+        // difference between start and end times
+        TTimeIntervalDays differenceInDays = iParameters->iRandomModeEndTime.DaysFrom(iParameters->iRandomModeStartTime);  
+
+        // start time (= something between the period start and end date)
+        iParameters->iStartTime = iParameters->iRandomModeStartTime;
+        iParameters->iStartTime += TTimeIntervalDays( iEngine->RandomNumber(differenceInDays.Int()) );        
+        
+        // strings
+        iParameters->iDescription->Des().Copy (iEngine->RandomString (CCreatorEngine::EFirstName ) );
+        iParameters->iDescription->Des().Append ( _L("'s ") );
+        iParameters->iDescription->Des().Append (iEngine->RandomString (CCreatorEngine::EAnniversaryReason ) );
+        iParameters->iSummary->Des() = iParameters->iDescription->Des();
+        parameters = iParameters;
+        }
+ 
+    TInt err = KErrNone;
+
+    HBufC8* guid = HBufC8::NewLC (255 );
+    TPtr8 uidP=guid->Des ( );
+    GenerateRandomId (uidP );
+
+    CCalEntry* entry = CCalEntry::NewL (CCalEntry::EAnniv, guid,
+            CCalEntry::EMethodNone, 0 );
+    CleanupStack::PushL (entry );
+
+    //Using same text as description and summary	
+    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
+    entry->SetSummaryL (parameters->iSummary->Des ( ) );
+
+    TCalTime startTime;
+    TCalTime endTime;
+    TTime nullTime = Time::NullTTime ( );
+    endTime.SetTimeLocalL (nullTime );
+    
+    // Set the start time using time value local to the current system time zone
+    startTime.SetTimeLocalL (parameters->iStartTime );
+
+    entry->SetStartAndEndTimeL (startTime, endTime );
+
+    if( iSetAlarm || parameters->iUseRandomAlarmTime )
+        {        
+        SetRandomAlarmL(*entry);
+        }
+    else
+        {
+        SetAlarmL(*entry, parameters);
+        }
+    
+    //set repeating rule
+    TCalRRule yearlyRptRule(TCalRRule::EYearly);
+    yearlyRptRule.SetDtStart (startTime );
+    //Set repeating until forever, not setting it to stop
+    //yearlyRptRule.SetUntil(endTime);
+    entry->SetRRuleL (yearlyRptRule );
+
+    RPointerArray<CCalEntry> array;
+    CleanupClosePushL (array );
+    array.AppendL (entry );
+
+    TInt success(0);
+    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
+    iCalEntryView->StoreL (array, success );
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    iEntryIds.AppendL( entry->LocalUidL() );
+    
+    //One item should be added at time
+    if (success != 1 )
+        {
+        err = 1;
+        }
+
+    CleanupStack::PopAndDestroy (&array );
+    CleanupStack::PopAndDestroy (entry );
+    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorInterimCalendar::CreateTodoEntryL (
+        CCreatorModuleBaseParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::CreateTodoEntryL");
+
+    delete iParameters;
+    iParameters = NULL;
+    
+    CCalenderInterimParameters* parameters = (CCalenderInterimParameters*)aParameters;
+
+    // random data needed if no predefined data available
+    if (!parameters )
+        {
+        iParameters = new(ELeave) CCalenderInterimParameters;
+
+        iParameters->iRandomModeStartTime = iRandomModeStartTime;
+        iParameters->iRandomModeEndTime = iRandomModeEndTime;
+
+        // difference between start and end times
+        TTimeIntervalDays
+                differenceInDays = iParameters->iRandomModeEndTime.DaysFrom (iParameters->iRandomModeStartTime );
+
+        // due time (= something between the period start and end date)
+        iParameters->iTodoDueTime = iParameters->iRandomModeStartTime;
+        iParameters->iTodoDueTime
+                += TTimeIntervalDays (iEngine->RandomNumber (differenceInDays.Int ( ) ) );
+
+        // strings
+        iParameters->iDescription->Des ( )
+                = iEngine->RandomString (CCreatorEngine::EToDoText );
+        
+        iParameters->iSummary->Des() = iParameters->iDescription->Des();
+
+        //priority
+        iParameters->iTodoPriority = iEngine->RandomNumber (1, 3 );
+        iParameters->iStatus = (CCalEntry::TStatus) iEngine->RandomNumber((TInt) CCalEntry::ETodoNeedsAction, (TInt) CCalEntry::ETodoInProcess);
+        parameters = iParameters;
+        
+        }
+
+    TInt err = KErrNone;
+
+    HBufC8* guid = HBufC8::NewLC (255 );
+    TPtr8 uidP=guid->Des ( );
+    GenerateRandomId (uidP );
+
+    CCalEntry* entry = CCalEntry::NewL (CCalEntry::ETodo, guid,
+            CCalEntry::EMethodAdd, 0 );
+    CleanupStack::PushL (entry );
+
+    //Using same text as description and summary	
+    entry->SetDescriptionL (parameters->iDescription->Des ( ) );
+    entry->SetSummaryL (parameters->iSummary->Des ( ) );
+
+    entry->SetPriorityL (parameters->iTodoPriority );
+    
+    if( parameters->IsAllowedEntryStatus(CCalEntry::ETodo, parameters->iStatus))
+        {
+        LOGSTRING2("Creator: CCreatorInterimCalendar::CreateTodoEntryL setting entry status: %d", parameters->iStatus);
+        entry->SetStatusL(parameters->iStatus);
+        }
+
+    TCalTime startTime;
+    TCalTime endTime;
+    // Set the start and end times using time values local to the current system time zone
+    startTime.SetTimeLocalL (parameters->iTodoDueTime );
+    endTime.SetTimeLocalL (parameters->iTodoDueTime );
+    entry->SetStartAndEndTimeL (startTime, endTime );
+
+    if( iSetAlarm || parameters->iUseRandomAlarmTime )
+        {        
+        SetRandomAlarmL(*entry);
+        }
+    else
+        {
+        SetAlarmL(*entry, parameters);
+        }
+    
+    RPointerArray<CCalEntry> array;
+    CleanupClosePushL (array );
+    array.AppendL (entry );
+
+    TInt success(0);
+    //If StoreL() leaves, 'success' contains the number of entries that were stored before it failed
+    iCalEntryView->StoreL (array, success );
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    iEntryIds.AppendL( entry->LocalUidL() );
+    
+    //One item should be added at time
+    if (success != 1 )
+        {
+        err = 1;
+        }
+
+    CleanupStack::PopAndDestroy (&array );
+    CleanupStack::PopAndDestroy (entry );
+    CleanupStack::Pop (guid );//guid has been destroyed by entry, which has ownership to guid
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorInterimCalendar::Progress (TInt /*aPercentageCompleted*/)
+    {
+    //Not really needed but observer need to be implement
+    }
+
+void CCreatorInterimCalendar::Completed (TInt aError )
+    {
+    //Not really needed but observer need to be implement
+    LOGSTRING2("Creator: CCreatorInterimCalendar::Completed err=%d", aError);
+    }
+
+TBool CCreatorInterimCalendar::NotifyProgress ( )
+    {
+    //Not really needed but observer need to be implement
+    return NULL;
+    }
+
+//----------------------------------------------------------------------------
+
+
+void CCreatorInterimCalendar::GenerateRandomId (TDes8& aText )
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::GenerateRandomId");
+
+    aText.Zero ( );
+
+    TTime now;
+    now.UniversalTime ( );
+    TInt64 time = now.Int64 ( );
+
+    // The number of characters in the guid should be
+    // more than 8 (to ensure the guids are not too small)
+    // less than 255 (this is the maximum length of a guid)
+    // less than MaxLength of the descriptor passed in		
+    TInt numChar(0);
+    do
+        {
+        numChar = Math::Rand (time ) % (aText.MaxLength ( ) - 1);
+        }
+    while (numChar > 255|| numChar < 8 );
+
+    for (TInt i(0); i < numChar ; ++i )
+        {
+        TInt character = Math::Rand (time )%6;
+        character = Math::Rand (time ) % 26+ ((character == 2) ? 'A' : 'a');
+        aText.Append (character );
+        }
+
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorInterimCalendar::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::DeleteAllL");
+    TCalTime zeroTime;
+    zeroTime.SetTimeUtcL( TCalTime::MinTime() );
+    RArray<TUint32> allIds;
+    CleanupClosePushL( allIds );
+    iCalEntryView->GetIdsModifiedSinceDateL( zeroTime, allIds );
+    if ( allIds.Count() )
+        {
+        TInt successCount( KErrNotFound );
+        iCalEntryView->DeleteL( allIds, successCount );
+        if ( successCount != allIds.Count() )
+            {
+            User::Leave( KErrGeneral );
+            }        
+        }
+    CleanupStack::PopAndDestroy( &allIds );
+
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Calendar related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidCalendar );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorInterimCalendar::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorInterimCalendar::DeleteAllCreatedByCreatorL");
+    iEntryIds.Reset();
+    
+    // fetch ids of entries created by Creator
+    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidCalendar );
+    
+    // delete entries
+    TInt successCount(0); // ignore
+    TRAP_IGNORE( iCalEntryView->DeleteL( iEntryIds, successCount ) );
+
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Calendar related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidCalendar );
+    }
+
+//----------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_calendarelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,596 @@
+/*
+* 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 "creator_calendarelement.h"
+#include "creator_traces.h"
+#include "creator_calendar.h"
+
+using namespace creatorcalendar;
+
+CCreatorCalendarElement* CCreatorCalendarElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorCalendarElement* self = new (ELeave) CCreatorCalendarElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CCreatorCalendarElement::FillEntryParamsL(TEntryType aType, const RPointerArray<CCreatorScriptElement>& fields, CCalenderInterimParameters* parameters)
+    {
+    if( parameters == 0 )
+        return;
+    
+    TBool startResolved = EFalse;    
+    TBool endResolved = EFalse;
+    
+    for( TInt i = 0; i < fields.Count(); ++i )
+        {
+        TPtrC elemName = fields[i]->Name();
+        TPtrC elemContent = fields[i]->Content();
+        const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
+        
+        if( elemName == KSummary || elemName == KDescription )
+            {           
+            if( randomAttr || elemContent.Length() == 0 )
+                {      
+                TPtrC reason;
+                if( aType == EAppointment )
+                    {
+                    reason.Set(iEngine->RandomString (CCreatorEngine::EMeetingReason ));                    
+                    }
+                else if( aType == EEvent )
+                    {
+                    reason.Set(iEngine->RandomString(CCreatorEngine::EMemoText));                    
+                    }
+                else if( aType == EReminder )
+                    {
+                    reason.Set(iEngine->RandomString(CCreatorEngine::EReminderText));                    
+                    }
+                else if( aType == EAnniversary )
+                    {                   
+                    reason.Set(iEngine->RandomString(CCreatorEngine::EAnniversaryReason));                    
+                    }
+                else if( aType == ETodo )
+                    {
+                    reason.Set(iEngine->RandomString(CCreatorEngine::EToDoText));                    
+                    }
+                
+                if( elemName == KDescription )
+                    {
+                    delete parameters->iDescription;
+                    parameters->iDescription = 0;
+                    parameters->iDescription = HBufC::NewL(reason.Length());
+                    parameters->iDescription->Des().Copy(reason);
+                    }
+                else if(elemName == KSummary)
+                    {
+                    delete parameters->iSummary;
+                    parameters->iSummary = 0;
+                    parameters->iSummary = HBufC::NewL(reason.Length());
+                    parameters->iSummary->Des().Copy(reason);
+                    }
+                }
+            else if( elemName == KDescription )                
+                {                
+                delete parameters->iDescription;
+                parameters->iDescription = 0;
+                parameters->iDescription = HBufC::NewL(elemContent.Length());
+                parameters->iDescription->Des().Copy(elemContent);
+                }
+            else if( elemName == KSummary)
+                {
+                delete parameters->iSummary;
+                parameters->iSummary = 0;
+                parameters->iSummary = HBufC::NewL(elemContent.Length());
+                parameters->iSummary->Des().Copy(elemContent);
+                }
+            }
+        else if( elemName == KLocation )
+            {
+            delete parameters->iLocation;
+            parameters->iLocation = 0;
+            
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                TPtrC reason = iEngine->RandomString (CCreatorEngine::EMeetingPlace );
+                parameters->iLocation = HBufC::NewL(reason.Length());
+                parameters->iLocation->Des().Copy(reason);
+                }
+            else
+                {
+                parameters->iLocation = HBufC::NewL(elemContent.Length());
+                parameters->iLocation->Des().Copy(elemContent);
+                }
+            }
+        else if( elemName == KStarttime )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {                
+                // Random start time used. If end time is already resolved, let's use that one for the basis. 
+                if( endResolved )
+                    {                    
+                    parameters->iStartTime = iEngine->RandomTime(parameters->iEndTime, CCreatorEngine::EDatePast);                    
+                    }
+                else
+                    {
+                    // Past or future:
+                    CCreatorEngine::TRandomDateType pastOrfuture = 
+                    (CCreatorEngine::TRandomDateType) iEngine->RandomNumber((TInt) CCreatorEngine::EDatePast,
+                                                                            (TInt) CCreatorEngine::EDateFuture);
+                    
+                    parameters->iStartTime = 
+                        iEngine->RandomTime(iEngine->RandomDate(pastOrfuture), pastOrfuture);  
+                    }
+                }
+            else
+                {
+                parameters->iStartTime = ConvertToDateTimeL(elemContent);                
+                }            
+            startResolved = ETrue;
+            }
+        else if( elemName == KEndtime )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                // Random end time used. If start time is already resolved, let's use that one.                
+                if( startResolved )
+                    {                    
+                    parameters->iEndTime = iEngine->RandomTime(parameters->iStartTime, CCreatorEngine::EDateFuture);                    
+                    }
+                else
+                    {
+                    // Past or future:
+                    CCreatorEngine::TRandomDateType pastOrfuture = 
+                    (CCreatorEngine::TRandomDateType) iEngine->RandomNumber((TInt) CCreatorEngine::EDatePast,
+                            (TInt) CCreatorEngine::EDateFuture);
+                    
+                    parameters->iEndTime = 
+                    iEngine->RandomTime(iEngine->RandomDate(pastOrfuture), pastOrfuture);  
+                    }                          
+                }
+            else
+                {
+                parameters->iEndTime = ConvertToDateTimeL(elemContent);
+                }
+            if( aType == ETodo )
+                {
+                parameters->iTodoDueTime = parameters->iEndTime;
+                }
+            endResolved = ETrue;
+            }
+        else if( elemName == KRecurrentFreq )
+            {
+            TInt randomFreq = 0;
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                randomFreq = iEngine->RandomNumber(1, 4);
+                }
+            if(randomFreq == 1 || CompareIgnoreCase(elemContent, KDaily) == 0 )
+                parameters->iRecurrentFrequency = TCalRRule::EDaily;
+            else if( randomFreq == 2 || CompareIgnoreCase(elemContent, KWeekly) == 0 )
+                parameters->iRecurrentFrequency = TCalRRule::EWeekly;
+            else if( randomFreq == 3 || CompareIgnoreCase(elemContent, KMonthly) == 0 )
+                parameters->iRecurrentFrequency = TCalRRule::EMonthly;
+            else if( randomFreq == 4 || CompareIgnoreCase(elemContent, KYearly) == 0 )
+                parameters->iRecurrentFrequency = TCalRRule::EYearly;
+            else
+                parameters->iRecurrentFrequency = TCalRRule::EInvalid;            
+            }
+        else if( elemName == KRecurrentInterval )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                parameters->iRecurrentInterval = iEngine->RandomNumber(1,7);
+                }
+            else
+                {
+                parameters->iRecurrentInterval = ConvertStrToIntL(elemContent);
+                }
+            }
+        else if( elemName == KRecurrentFrom )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                if( startResolved )
+                    {
+                    // Let's use the start time if it's resolved.
+                    parameters->iRecurrentStartTime = parameters->iStartTime;
+                    }
+                else
+                    {
+                    parameters->iRecurrentStartTime = iEngine->RandomDate(CCreatorEngine::EDateFuture);
+                    }
+                }
+            else
+                {
+                parameters->iRecurrentStartTime = ConvertToDateTimeL(elemContent);
+                }           
+            }
+        else if( elemName == KRecurrentTo )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                parameters->iRepeatingCount = iEngine->RandomNumber(1, 6);
+                //parameters->iRecurrentEndTime = iEngine->RandomDate(CCreatorEngine::EDateFuture);                
+                }
+            else
+                {
+                parameters->iRecurrentEndTime = ConvertToDateTimeL(elemContent);
+                }           
+            }
+        else if( elemName == KRepeatingCount )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                parameters->iRepeatingCount = iEngine->RandomNumber(1, 52);
+                }
+            else
+                {
+                parameters->iRepeatingCount = ConvertStrToIntL(elemContent);
+                }
+            }
+        else if( elemName == KAlarmtime )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {                
+                parameters->iUseRandomAlarmTime = ETrue;
+                }
+            else
+                {
+                parameters->iAlarmTime = ConvertToDateTimeL(elemContent);
+                }
+            }
+        else if( elemName == KOrganizername )
+            {
+            delete parameters->iOrganizerName;
+            parameters->iOrganizerName = 0;
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                TPtrC name = iEngine->RandomString (CCreatorEngine::EFirstName );
+                parameters->iOrganizerName = HBufC::NewL(name.Length());
+                parameters->iOrganizerName->Des().Copy(name);
+                }
+            else
+                {            
+                parameters->iOrganizerName = HBufC::NewL(elemContent.Length());
+                parameters->iOrganizerName->Des().Copy(elemContent);
+                }
+            }
+        else if( elemName == KOrganizeremail )
+            {
+            delete parameters->iOrganizerEmail;
+            parameters->iOrganizerEmail = 0;
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                TDesC* email = iEngine->CreateEmailAddressLC();
+                parameters->iOrganizerEmail = (HBufC*) email;
+                CleanupStack::Pop(); // email
+                }
+            else
+                {
+                parameters->iOrganizerEmail = HBufC::NewL(elemContent.Length());
+                parameters->iOrganizerEmail->Des().Copy(elemContent);
+                }
+            }
+        else if( elemName == KStatus )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                if( aType == ETodo )
+                	{
+                	parameters->iStatus = (CCalEntry::TStatus) iEngine->RandomNumber(CCalEntry::ETodoNeedsAction, CCalEntry::ETodoInProcess);
+                	}
+                else
+                	{
+                	parameters->iStatus = (CCalEntry::TStatus) iEngine->RandomNumber(CCalEntry::ETentative, CCalEntry::ECancelled);
+                	}
+                }
+            else if( CompareIgnoreCase(elemContent, KCalStatusTentative) == 0 )
+                {
+                parameters->iStatus = CCalEntry::ETentative;
+                }
+            else if( CompareIgnoreCase(elemContent, KCalStatusConfirmed) == 0 )
+                {
+                parameters->iStatus = CCalEntry::EConfirmed;
+                }
+            else if( CompareIgnoreCase(elemContent, KCalStatusCancelled) == 0 )
+                {
+                parameters->iStatus = CCalEntry::ECancelled;
+                }
+            else if( CompareIgnoreCase(elemContent, KCalStatusNeedsAction) == 0 )
+                {
+                parameters->iStatus = CCalEntry::ETodoNeedsAction;
+                }
+            else if( CompareIgnoreCase(elemContent, KCalStatusCompleted) == 0 )
+                {
+                parameters->iStatus = CCalEntry::ETodoCompleted;
+                }
+            else if( CompareIgnoreCase(elemContent, KCalStatusInProcess) == 0 )
+                {
+                parameters->iStatus = CCalEntry::ETodoInProcess;
+                }
+            else
+                {
+                parameters->iStatus = CCalEntry::ENullStatus;
+                }
+            }
+        else if( elemName == KPriority )
+            {
+            if( randomAttr || elemContent.Length() == 0 )
+                {
+                parameters->iTodoPriority = iEngine->RandomNumber(1,3);
+                }            
+            else if( CompareIgnoreCase(elemContent, KPriorityHigh) == 0)
+                {
+                parameters->iTodoPriority = 1;
+                }
+            else if( CompareIgnoreCase(elemContent, KPriorityMedium) == 0)
+                {
+                parameters->iTodoPriority = 2;
+                }
+            else if( CompareIgnoreCase(elemContent, KPriorityLow) == 0 )
+                {
+                parameters->iTodoPriority = 3;
+                }
+            else
+                {
+                parameters->iTodoPriority = ConvertStrToIntL(elemContent);
+                }
+            }
+        else if( elemName == KAttendees )
+            {            
+            const RPointerArray<CCreatorScriptElement>& attendeesSubElems = fields[i]->SubElements();
+            for( TInt j = 0; j < attendeesSubElems.Count(); ++j )
+                {
+                TPtrC eName = attendeesSubElems[j]->Name();
+                TPtrC eContent = attendeesSubElems[j]->Content();
+                if( eName == KContactSetRef )
+                    {
+                    AppendContactSetReferenceL(*attendeesSubElems[j], parameters->iAttendeeLinkIds);
+                    }
+                else if( eName == KAttendee )
+                    {
+                    CCreatorCalenderAttendee* calAtt = CCreatorCalenderAttendee::NewL();
+                    CleanupStack::PushL(calAtt);
+                    const RPointerArray<CCreatorScriptElement>& attendeeFields = attendeesSubElems[j]->SubElements();
+                    // Make sure that at least email is given:
+                    if(attendeeFields.Count() == 0 )
+                    	{
+                    	CCreatorScriptElement* emailField =  CCreatorScriptElement::NewL(iEngine, KEmail );
+                    	CleanupStack::PushL(emailField);
+                    	fields[i]->SubElements().AppendL(emailField);
+                    	CleanupStack::Pop(); // emailField	
+                    	}
+                    for( TInt k = 0; k < attendeeFields.Count(); ++k )
+                        {
+                        const CCreatorScriptAttribute* randomAttr = attendeeFields[k]->FindAttributeByName(KRandomLength);
+                        TPtrC attElemName = attendeeFields[k]->Name();
+                        TPtrC attElemCont = attendeeFields[k]->Content();
+                        if( attElemName == KCommonname )
+                            {
+                            if( randomAttr || attElemCont.Length() == 0)
+                                {
+                                // Random data:
+                                calAtt->SetCommonNameL(iEngine->RandomString(CCreatorEngine::EFirstName));
+                                }
+                            else
+                                {
+                                calAtt->SetCommonNameL(attElemCont);
+                                }
+                            }
+                        else if( attElemName == KEmail )
+                            {
+                            if( randomAttr || attElemCont.Length() == 0)
+                                {
+                                // Random data:
+                                TDesC* email = iEngine->CreateEmailAddressLC();
+                                calAtt->SetEmailAddressL(*email);
+                                CleanupStack::PopAndDestroy(); // email
+                                }
+                            else
+                                {                                
+                                calAtt->SetEmailAddressL(attElemCont);
+                                }
+                            }
+                        else if( attElemName == KRole )
+                            {
+                            if( randomAttr || attElemCont.Length() == 0)
+                                {
+                                // Random role:
+                                CCalAttendee::TCalRole randomRole = 
+                                    (CCalAttendee::TCalRole) iEngine->RandomNumber(
+                                            (TInt) CCalAttendee::EReqParticipant, 
+                                            (TInt) CCalAttendee::EChair);
+                                calAtt->SetRole(randomRole);
+                                }                                
+                            else if( CompareIgnoreCase(attElemCont, KRoleRequired) == 0 )
+                                {
+                                calAtt->SetRole(CCalAttendee::EReqParticipant);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KRoleOptional) == 0 )
+                                {
+                                calAtt->SetRole(CCalAttendee::EOptParticipant);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KRoleNonPart) == 0 )
+                                {
+                                calAtt->SetRole(CCalAttendee::ENonParticipant);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KRoleChair) == 0 )
+                                {
+                                calAtt->SetRole(CCalAttendee::EChair);
+                                }
+                            }
+                        else if( attElemName == KStatus )
+                            {
+                            if( randomAttr || attElemCont.Length() == 0)
+                                {
+                                // Random role:
+                                CCalAttendee::TCalStatus randomStatus = 
+                                (CCalAttendee::TCalStatus) iEngine->RandomNumber(
+                                        (TInt) CCalAttendee::ENeedsAction, 
+                                        (TInt) CCalAttendee::EInProcess);
+                                calAtt->SetStatus(randomStatus);
+                                }                                
+                            else if( CompareIgnoreCase(attElemCont, KStatusNeedsAction) == 0 )
+                                {
+                                calAtt->SetStatus(CCalAttendee::ENeedsAction);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KStatusAccepted) == 0 )
+                                {
+                                calAtt->SetStatus(CCalAttendee::EAccepted);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KStatusTentative) == 0 )
+                                {
+                                calAtt->SetStatus(CCalAttendee::ETentative);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KStatusConfirmed) == 0 )
+                                {
+                                calAtt->SetStatus(CCalAttendee::EConfirmed);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KStatusDeclined) == 0 )
+                                {
+                                calAtt->SetStatus(CCalAttendee::EDeclined);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KStatusCompleted) == 0 )
+                                {
+                                calAtt->SetStatus(CCalAttendee::ECompleted);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KStatusDelegated) == 0 )
+                                {                                
+                                calAtt->SetStatus(CCalAttendee::EDelegated);
+                                }
+                            else if( CompareIgnoreCase(attElemCont, KStatusInProcess) == 0 )
+                                {                                
+                                calAtt->SetStatus(CCalAttendee::EInProcess);
+                                }
+                            }
+                        }
+                    parameters->iAttendees.AppendL(calAtt);
+                    CleanupStack::Pop(); // calAtt
+                    }
+                }
+            }
+        }    
+    }
+
+void CCreatorCalendarElement::ExecuteCommandL()
+	{
+	LOGSTRING("Creator: CCreatorCalendarElement::ExecuteCommandL");
+	// Amount of calendar entries:
+	const CCreatorScriptAttribute* calEntryAmountAttr = this->FindAttributeByName(KAmount);
+	const CCreatorScriptAttribute* calEntryTypeAttr = this->FindAttributeByName(KType);    
+	TInt entryAmount = 1;    
+	if( calEntryAmountAttr )
+		{
+		entryAmount = ConvertStrToIntL(calEntryAmountAttr->Value());
+		}
+	if( calEntryTypeAttr == 0 )
+		{
+		LOGSTRING("ERROR in CCreatorCalendarElement::ExecuteCommandL: Type attribute is missing.");
+		User::Leave(KErrGeneral); // type is required attribute
+		}
+
+	// Find fields element:
+	CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+	
+	for( TInt cI = 0; cI < entryAmount; ++cI )
+		{
+		CCalenderInterimParameters* param = new (ELeave) CCalenderInterimParameters;
+		CleanupStack::PushL(param);
+		if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeAppointment) == 0 )
+			{
+			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+				{
+				FillEntryParamsL(EAppointment, fieldsElement->SubElements(), param);
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAppointments, param);
+				}
+			else
+				{
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAppointments, 0, entryAmount);
+				CleanupStack::PopAndDestroy(param);
+				break; // We can step out from the for-loop, because the amount is given to engine.
+				}
+			}		
+		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeEvent ) == 0 )
+			{
+			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+				{
+				FillEntryParamsL(EEvent, fieldsElement->SubElements(), param);
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryEvents, param);
+				}
+			else
+				{
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryEvents, 0, entryAmount);
+				CleanupStack::PopAndDestroy(param);
+				break;  // We can step out from the for-loop, because the amount is given to engine.
+				}
+			}
+		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeReminder ) == 0 )
+			{
+			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+				{
+				FillEntryParamsL(EReminder, fieldsElement->SubElements(), param);
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryReminders, param);
+				}
+			else
+				{
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryReminders, 0, entryAmount);
+				CleanupStack::PopAndDestroy(param);
+				break;  // We can step out from the for-loop, because the amount is given to engine.
+				}
+			}
+		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeAnniversary ) == 0 )
+			{
+			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+				{
+				FillEntryParamsL(EAnniversary, fieldsElement->SubElements(), param);
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAnniversaries, param);
+				}
+			else
+				{
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryAnniversaries, 0, entryAmount);
+				CleanupStack::PopAndDestroy(param);
+				break;  // We can step out from the for-loop, because the amount is given to engine.
+				}
+			}
+		else if( CompareIgnoreCase(calEntryTypeAttr->Value(), KCalTypeTodo ) == 0 )
+			{
+			if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+				{
+				FillEntryParamsL(ETodo, fieldsElement->SubElements(), param);
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryToDos, param);
+				}
+			else
+				{
+				iEngine->AppendToCommandArrayL(ECmdCreateCalendarEntryToDos, 0, entryAmount);
+				CleanupStack::PopAndDestroy(param);
+				break;  // We can step out from the for-loop, because the amount is given to engine.
+				}
+			}
+		CleanupStack::Pop(); // param
+		}
+	}
+
+CCreatorCalendarElement::CCreatorCalendarElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_cmdscriptrun.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,172 @@
+/*
+* 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 <eikenv.h>
+#include <coeaui.h>  
+#include <pathinfo.h> 
+#include "creator_cmdscriptrun.h"
+#include "engine.h"
+#include "enginewrapper.h"
+#include "creator.pan"
+
+
+// delay before script running and application exiting in seconds
+// when script is run from command line
+const TInt KCommandLineDelay = 3;
+
+//----------------------------------------------------------------------------
+
+CCreatorCmdScriptRun* CCreatorCmdScriptRun::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorCmdScriptRun* self = CCreatorCmdScriptRun::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorCmdScriptRun* CCreatorCmdScriptRun::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorCmdScriptRun* self = new (ELeave) CCreatorCmdScriptRun;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+
+// ConstructL 
+void CCreatorCmdScriptRun::ConstructL(CCreatorEngine* aEngine)
+    {
+    iEngine = aEngine;
+ 
+	iMode = ETimerModeNone;
+	iTickCount = 0;
+    iTimer = CHeartbeat::NewL(0);
+    
+    // parse script name and random data file name from command line
+    iCommandLineScriptName = HBufC::NewL(User::CommandLineLength());
+    iCommandLineRandomDataFileName = HBufC::NewL(User::CommandLineLength());
+    HBufC* commandLine = HBufC::NewLC(User::CommandLineLength());
+    TPtr16 ptr = commandLine->Des();
+    User::CommandLine(ptr);
+    commandLine->Des().Trim();
+    
+    TInt pos = commandLine->Des().Find(_L(" "));
+    if (pos != KErrNotFound)
+    	{
+    	iCommandLineScriptName->Des().Copy(commandLine->Des().Left(pos));
+    	iCommandLineRandomDataFileName->Des().Copy(commandLine->Des().Mid(pos));
+    	iCommandLineRandomDataFileName->Des().Trim();
+    	}
+    else
+    	{
+    	iCommandLineScriptName->Des().Copy(commandLine->Des());
+    	iCommandLineRandomDataFileName->Des().Copy(KNullDesC);
+    	}
+
+    CleanupStack::PopAndDestroy(commandLine);
+    
+    if (iCommandLineScriptName->Des().Length() > 0)
+    	{
+    	iMode = ETimerModeStartScript;
+    	iTimer->Start(ETwelveOClock, this);
+    	}
+    }
+
+
+ CCreatorCmdScriptRun::CCreatorCmdScriptRun()                              
+    {
+    // add any construction that cannot leave here
+    }
+
+
+ CCreatorCmdScriptRun::~CCreatorCmdScriptRun()
+    {
+    delete iCommandLineRandomDataFileName;
+    delete iCommandLineScriptName;
+    
+    if (iTimer)
+    	{
+    	iTimer->Cancel();
+        delete iTimer;
+        iTimer = NULL;
+    	}
+    }
+
+void  CCreatorCmdScriptRun::RunScriptDone()
+	{
+	if (iMode == ETimerModeStartScript)
+		{
+		iMode = ETimerModeExitAppUi;
+		iTimer->Start(ETwelveOClock, this);
+		}
+	}
+
+void  CCreatorCmdScriptRun::Beat()
+	{
+	TRAP_IGNORE( TickL() );
+	}
+
+void  CCreatorCmdScriptRun::Synchronize()
+	{
+    TRAP_IGNORE( TickL() );
+	}
+
+void  CCreatorCmdScriptRun::TickL()
+	{
+	iTickCount++;
+	if (iTickCount > KCommandLineDelay)
+		{
+		iTimer->Cancel();
+		iTickCount = 0;
+		if (iMode == ETimerModeStartScript)
+			{
+        	iEngine->GetRandomDataFromFileL(*iCommandLineRandomDataFileName);
+			TInt status = iEngine->RunScriptL(*iCommandLineScriptName);
+			if (status != KErrNone)
+				{
+				TBuf<128> noteMsg;
+				if (status == KErrNotFound)
+					{
+					_LIT(KMessage1, "Error in opening script file.");
+					noteMsg.Copy(KMessage1);
+					}
+				else if (status == KErrCorrupt)
+					{
+					_LIT(KMessage2, "Error in parsing script file.");
+					noteMsg.Copy(KMessage2);
+					}
+				else if (status == KErrCompletion)
+					{
+					_LIT(KMessage3, "Script file does not contain any elements.");
+					noteMsg.Copy(KMessage3);
+					}
+				else
+					{
+					_LIT(KMessage4, "Unknown error in opening script file.");
+					noteMsg.Copy(KMessage4);
+					}
+				iEngine->GetEngineWrapper()->ShowNote(noteMsg);
+				RunScriptDone();
+				}
+			}
+		else if (iMode == ETimerModeExitAppUi)
+	    	{
+	    	iMode = ETimerModeNone;
+	    	iEngine->GetEngineWrapper()->CloseCreatorApp();
+	    	}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_connectionmethod.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,954 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+#include "creator_connectionmethod.h" 
+#include "creator_traces.h"
+
+
+
+using namespace CMManager;
+//#define KUidLanBearerType  0x1020737A
+#include <cmpluginpacketdatadef.h>  
+#include <cmplugincsddef.h> 
+#include <cmpluginhscsddef.h> 
+#include <cmmanagerext.h>
+#include <cmdestinationext.h> 
+#include <cmpluginembdestinationdef.h>
+#include <cmpluginvpndef.h>
+#include <cmpluginlandef.h> 
+#include <cmdefconnvalues.h>
+#include <cmconnectionmethoddef.h>
+
+
+#include <wlanmgmtinterface.h>
+#include <wlanmgmtclient.h>
+#include <wlanmgmtclient.inl> 
+#include <wlanmgmtcommon.h> 
+#include <wlanscaninfo.h> 
+#include <wlanscaninfo.inl> 
+#include <wlanscaninfointerface.h>
+
+//#include <WEPSecuritySettingsUI.h>//For WEP setting
+//#include <dbcreatorcommon.h>
+
+static const TInt KConnectionSettingssFieldLength = 128;
+
+_LIT(KCreatorConnectionSettingssPrefixName, "CR_");
+
+//----------------------------------------------------------------------------
+
+CConnectionSettingsParameters::CConnectionSettingsParameters()
+    {
+    LOGSTRING("Creator: CConnectionSettingsParameters::CConnectionSettingsParameters");
+        
+    iConnectionName = HBufC::New(KConnectionSettingssFieldLength);
+    iStartPage = HBufC::New(KConnectionSettingssFieldLength);
+    iLoginName = HBufC::New(KConnectionSettingssFieldLength);
+    iLoginPass = HBufC::New(KConnectionSettingssFieldLength);
+    iIPAddr = HBufC::New(KConnectionSettingssFieldLength);
+    iIP4NameServer1 = HBufC::New(KConnectionSettingssFieldLength);
+    iIP4NameServer2 = HBufC::New(KConnectionSettingssFieldLength);
+    iDefaultTelNumber = HBufC::New(KConnectionSettingssFieldLength);
+    iProxyServerAddress = HBufC::New(KConnectionSettingssFieldLength);
+    iSubnetMask = HBufC::New(KConnectionSettingssFieldLength); 
+    iGatewayAddress = HBufC::New(KConnectionSettingssFieldLength);
+    iWLANName = HBufC::New(KConnectionSettingssFieldLength);
+    iWlanIpAddr = HBufC::New(KConnectionSettingssFieldLength);
+    iIP6NameServer1 = HBufC::New(KConnectionSettingssFieldLength);
+    iIP6NameServer2 = HBufC::New(KConnectionSettingssFieldLength);
+    }
+
+CConnectionSettingsParameters::~CConnectionSettingsParameters()
+    {
+    LOGSTRING("Creator: CConnectionSettingssParameters::~CConnectionSettingssParameters");
+
+    delete iProxyServerAddress;
+    delete iDefaultTelNumber;
+    delete iIP4NameServer2;
+    delete iIP4NameServer1;
+    delete iIPAddr;    
+    delete iLoginPass;
+    delete iLoginName;
+    delete iStartPage;
+    delete iConnectionName;
+    delete iSubnetMask;  
+    delete iGatewayAddress;
+    delete iWLANName;
+    delete iWlanIpAddr;
+    delete iIP6NameServer1;
+    delete iIP6NameServer2;    
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorConnectionSettings* CCreatorConnectionSettings::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorConnectionSettings* self = CCreatorConnectionSettings::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorConnectionSettings* CCreatorConnectionSettings::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorConnectionSettings* self = new (ELeave) CCreatorConnectionSettings;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorConnectionSettings::CCreatorConnectionSettings()
+    {
+    }
+
+void CCreatorConnectionSettings::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::ConstructL");
+
+    iEngine = aEngine;
+    
+    iCmManagerExt.CreateTablesAndOpenL();
+    }
+
+CCreatorConnectionSettings::~CCreatorConnectionSettings()
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::~CCreatorConnectionSettings");
+
+    if ( iEngine && iEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidIAP ) );
+        }
+    iEntryIds.Reset();
+    iEntryIds.Close();
+    
+    if (iParameters)
+        {
+        delete iParameters;
+        }
+    
+    iCmManagerExt.Close();
+    }
+    
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorConnectionSettings::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::AskDataFromUserL");
+    
+    CCreatorModuleBase::AskDataFromUserL( aCommand );
+    
+    if( aCommand == ECmdDeleteIAPs )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Connection Methods?"), this, ECreatorModuleDelete );
+        }
+    else if( aCommand == ECmdDeleteCreatorIAPs )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all Connection Methods created with Creator?"), this, ECreatorModuleDelete );
+        }
+    else
+        {
+        return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
+        }
+    }
+
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorConnectionSettings::CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::CreateConnectionSettingsEntryL");
+
+    CConnectionSettingsParameters* parameters = (CConnectionSettingsParameters*) aParameters;
+    
+    // clear any existing parameter definations 
+    delete iParameters;
+    iParameters = NULL;
+            
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new (ELeave) CConnectionSettingsParameters();
+        parameters = iParameters;
+        SetRandomParametersL(*parameters);
+        }
+    
+    if( parameters->iBearerType == KRandomBearerType )
+    	{
+    	SetRandomBearerTypeL(*parameters);
+    	}
+    
+    TInt err = KErrNone;
+
+    // create unique name for each network destination
+    RCmDestinationExt dest;
+    TInt destinationError = KErrNone;
+    TInt count = 0;
+	TBuf<KConnectionSettingssFieldLength> name;
+	name.Copy(parameters->iConnectionName->Des());
+    do
+    	{
+    	TRAP(destinationError, dest = iCmManagerExt.CreateDestinationL(name));
+    	if (destinationError == KErrAlreadyExists)
+    		{
+    		name.Copy(parameters->iConnectionName->Des());
+    		count++;
+    		name.AppendFormat(_L(" (%d)"), count);
+    		}
+    	else if (destinationError != KErrNone)
+    		{
+    		User::Leave(destinationError);
+    		}
+    	}
+    while (destinationError == KErrAlreadyExists);
+    parameters->iConnectionName->Des().Copy(name);        
+
+    CleanupClosePushL(dest);
+    dest.UpdateL();
+    
+    RCmConnectionMethodExt conMethod = dest.CreateConnectionMethodL( parameters->iBearerType);//KUidPacketDataBearerType
+    CleanupClosePushL( conMethod );
+    
+    if(parameters->iBearerType == KUidWlanBearerType)
+        {
+        //IP net mask of interface
+        conMethod.SetStringAttributeL( EWlanIpNetMask, parameters->iSubnetMask->Des()  );
+
+        //IP address of EPOC.
+        conMethod.SetStringAttributeL( EWlanIpAddr, parameters->iWlanIpAddr->Des()  );
+        //
+        //following gateway ID:s is not workin, 
+        //logically ID would be EWlanIpGateway because EWlanIpNetMask
+        //is going to net mask, which is just before gateway in ui
+        //--->
+        conMethod.SetStringAttributeL( EWlanIpGateway, parameters->iGatewayAddress->Des()  );
+        //conMethod.SetStringAttributeL( EApIspIPGateway, parameters->iGatewayAddress->Des()  );
+        conMethod.SetStringAttributeL( ECmWapIPGatewayAddress, parameters->iGatewayAddress->Des()  );
+        conMethod.SetStringAttributeL( ECmIPGateway, parameters->iGatewayAddress->Des()  );
+        //<---
+        
+        //IP Address of primary and secondary name server (IP v4).
+        conMethod.SetStringAttributeL( EWlanIpNameServer1, parameters->iIP4NameServer1->Des()  );
+        conMethod.SetStringAttributeL( EWlanIpNameServer2, parameters->iIP4NameServer2->Des()  );
+        //The SSID of this WLAN connection.
+        conMethod.SetStringAttributeL( EWlanSSID, parameters->iWLANName->Des()  );
+
+        //IP6 address of primary and secondary name servers
+        conMethod.SetStringAttributeL( EWlanIp6NameServer1, parameters->iIP6NameServer1->Des()  );
+        conMethod.SetStringAttributeL( EWlanIp6NameServer2, parameters->iIP6NameServer2->Des()  );        
+
+        //
+        //Setting secure mode settings
+        //
+        
+        //Network status (default: EWlanSecModeOpen) // EWlanAuthenticationMode use instead?
+        conMethod.SetIntAttributeL( EWlanSecurityMode, parameters->iWLanSecMode );
+        //WLAN Network mode  
+        conMethod.SetIntAttributeL( EWlanConnectionMode, parameters->iWlanNetMode );
+        
+        
+        if(parameters->iWLanSecMode == EWlanSecModeOpen)
+            {}//Nothing to set when mode is open
+        else if(parameters->iWLanSecMode == EWlanSecModeWep)
+            {
+            //See WEPSecuritySettingsUI.h
+            
+            
+            ///CWEPSecuritySettings
+           // conMethod.SetIntAttributeL( EWlanSecurityMode, parameters->iWLanSecMode );
+            }
+        else if(parameters->iWLanSecMode == EWlanSecMode802_1x)
+            {
+            }
+        else if(parameters->iWLanSecMode == EWlanSecModeWpa)
+            {
+            }
+        else if(parameters->iWLanSecMode == EWlanSecModeWpa2)
+            {
+            }            
+        
+        //WLAN security setting 
+        //conMethod.SetStringAttributeL( EWlanAuthenticationMode, parameters->iIP6NameServer2->Des()  );
+        //Utilise this method
+        //conMethod.SetStringAttributeL( EWlanSecurityMode, parameters->iWLanSecMode  );
+        }
+    //Not known special attributes for packet data 
+    else if(parameters->iBearerType == KUidPacketDataBearerType)
+        {
+
+        //Access point name.
+        conMethod.SetStringAttributeL( EPacketDataAPName, parameters->iConnectionName->Des() );//crash
+        
+        //Authentication user name
+        conMethod.SetStringAttributeL( EPacketDataIFAuthName, parameters->iLoginName->Des()  );
+        ///TProtocolType a;
+        //EPdpTypeIPv4 or EPdpTypeIPv6
+        conMethod.SetIntAttributeL( EPacketDataPDPType, parameters->iProtocolType  );
+                
+        //IP6 address of primary and secondary name servers
+        conMethod.SetStringAttributeL( EPacketDataIPIP6NameServer1, parameters->iIP6NameServer1->Des()  );
+        conMethod.SetStringAttributeL( EPacketDataIPIP6NameServer2, parameters->iIP6NameServer2->Des()  );                
+        //IP address of primary name server
+        conMethod.SetStringAttributeL( EPacketDataIPNameServer1, parameters->iIP4NameServer1->Des()  );
+        //IP address of secondary name server
+        conMethod.SetStringAttributeL( EPacketDataIPNameServer2, parameters->iIP4NameServer2->Des()  );
+        
+        //Also existing but UI not showing them: EPacketDataHeaderCompression, EPacketDataDisablePlainTextAuth
+        //EPacketDataIFAuthPass, EDialIFAuthPass, EPacketDataIFPromptForAuth, EPacketDataIPAddr
+        }
+    else if(parameters->iBearerType == KUidCSDBearerType || parameters->iBearerType == KUidHSCSDBearerType)
+        {
+        //Authentication user name
+        conMethod.SetStringAttributeL( EDialIFAuthName, parameters->iLoginName->Des()  );
+        //Dial-up number
+        conMethod.SetStringAttributeL( EDialDefaultTelNum, parameters->iDefaultTelNumber->Des() );
+        //Call type
+        conMethod.SetIntAttributeL( EDialCallType , parameters->iBearerCallTypeIsdn );
+        //Maximum speed
+        conMethod.SetIntAttributeL( EDialMaxConnSpeed, parameters->iBearerSpeed );
+        //Prompt user for username and password? (Only for dial out)
+        conMethod.SetBoolAttributeL( EDialPromptForLogin, parameters->iPromptPassword );
+        //IP6 address of primary and secondary name servers
+        conMethod.SetStringAttributeL( EDialIP6NameServer1, parameters->iIP6NameServer1->Des()  );
+        conMethod.SetStringAttributeL( EDialIP6NameServer2, parameters->iIP6NameServer2->Des()  );         
+        //Disable plaintext authentication
+        conMethod.SetBoolAttributeL( EDialDisablePlainTextAuth, parameters->iDisableTextAuth );       
+        //IP address of primary name server
+        conMethod.SetStringAttributeL( EDialIPNameServer1, parameters->iIP4NameServer1->Des()  );
+        //IP address of secondary name server
+        conMethod.SetStringAttributeL( EDialIPNameServer2, parameters->iIP4NameServer2->Des()  );
+
+        //Also existing  EDialEnableIPHeaderComp; EDialIFPromptForAuth;EDialIPAddress parameters
+        
+        }
+    else if(parameters->iBearerType == KUidLanBearerType)
+        {
+
+        conMethod.SetStringAttributeL( ELanIpNetMask, parameters->iSubnetMask->Des() );
+        conMethod.SetStringAttributeL( ELanIpGateway, parameters->iGatewayAddress->Des());
+        conMethod.SetStringAttributeL( ELanIpAddr, parameters->iIPAddr->Des() );
+        conMethod.SetStringAttributeL( ELanIpNameServer1, parameters->iIP4NameServer1->Des() );
+        conMethod.SetStringAttributeL( ELanIpNameServer2, parameters->iIP4NameServer2->Des() );
+        conMethod.SetStringAttributeL( ELanIp6NameServer1,parameters->iIP6NameServer1->Des() );
+        conMethod.SetStringAttributeL( ELanIp6NameServer2,parameters->iIP6NameServer2->Des() );
+        
+        }
+    else //KUidEmbeddedDestination and KPluginVPNBearerTypeUid
+        {
+        //NOTE: NOT Tested, because no supporting Emulator for them
+        
+        //Authentication user name
+        conMethod.SetStringAttributeL( ECmIFAuthName, parameters->iLoginName->Des()  );
+        //IP6 address of primary and secondary name servers
+        conMethod.SetStringAttributeL( ECmIP6NameServer1, parameters->iIP6NameServer1->Des()  );
+        conMethod.SetStringAttributeL( ECmIP6NameServer2, parameters->iIP6NameServer2->Des()  );        
+        //Disable plaintext authentication
+        conMethod.SetBoolAttributeL( ECmDisablePlainTextAuth, parameters->iDisableTextAuth );
+        //Prompt user for authentication
+        conMethod.SetBoolAttributeL( ECmIFPromptForAuth, parameters->iPromptPassword );
+        //Authentication password
+        conMethod.SetStringAttributeL( ECmIFAuthPass, parameters->iLoginPass->Des()  );
+        }
+    
+    //
+    //Adding common attributes, all not neccessary used with all bearer types, but should not cause any problems eather
+    //
+
+    //CM Name (Connection Method, formelly known as Access Point)         
+    conMethod.SetStringAttributeL( ECmName, parameters->iConnectionName->Des() );        
+    // Start page of CM
+    conMethod.SetStringAttributeL( ECmStartPage, parameters->iStartPage->Des() );
+    // Enable Proxy   
+    conMethod.SetBoolAttributeL( ECmProxyUsageEnabled, parameters->iUseProxy );
+    // Server Name
+    conMethod.SetStringAttributeL( ECmProxyServerName, parameters->iProxyServerAddress->Des() );
+    // Port Number
+    conMethod.SetIntAttributeL( ECmProxyPortNumber, parameters->iProxyPortNumber );
+    //Proxy login name
+    conMethod.SetStringAttributeL( ECmWapIPProxyLoginName, parameters->iLoginName->Des() );
+    //Proxy login password
+    conMethod.SetStringAttributeL( ECmWapIPProxyLoginPass, parameters->iLoginPass->Des() );
+    //IP address of gateway
+    conMethod.SetStringAttributeL( ECmIPGateway, parameters->iGatewayAddress->Des() );
+    //connection-oriented or connectionless API should be used
+    //ECmWapIPWSPOption option TWapWSPOption: ECmWapWspOptionConnectionless or ECmWapWspOptionConnectionOriented    
+    conMethod.SetIntAttributeL( ECmWapIPWSPOption, parameters->iWapWspOption );   
+    //NOT WORKING????? Attempt secure WTLS connection to the gateway
+    conMethod.SetBoolAttributeL( ECmWapIPSecurity, parameters->iSecureAuthentication );
+      
+    //
+    //Adding advanced settings (Network type, Phone IP addr, DNS addr, proxy srv name, proxy port nbr
+    //
+    
+    //IP address of interface
+    conMethod.SetStringAttributeL( ECmIPAddress, parameters->iIPAddr->Des() );    
+    //IP address of primary name server
+    conMethod.SetStringAttributeL( ECmIPNameServer1, parameters->iIP4NameServer1->Des()  );
+    //IP address of secondary name server
+    conMethod.SetStringAttributeL( ECmIPNameServer2, parameters->iIP4NameServer2->Des()  );
+      
+    
+    conMethod.UpdateL();
+
+    //If no defaults set, set the created CM as a default
+    SetDefaultCML( conMethod );
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iEntryIds.AppendL( dest.Id() );
+    
+    conMethod.Close();
+    CleanupStack::Pop(  );//conMethod
+    
+    dest.UpdateL();
+    dest.Close();
+    CleanupStack::Pop(); // dest
+        
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+void CConnectionSettingsParameters::SetRandomCMNameL(CCreatorEngine& aEngine)
+    {
+    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomCMNameL");
+
+    TInt num = aEngine.RandomNumber(1, 3);
+    TBuf<10> apType;
+
+    if (num==1)
+        {
+        apType = _L("mms");
+        }            
+    else if (num==2)
+        {
+        apType = _L("wap");
+        }
+    else
+        {
+        apType = _L("internet");
+        }
+    TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);
+    iConnectionName->Des() = KCreatorConnectionSettingssPrefixName;
+    iConnectionName->Des().Append( company );
+    iConnectionName->Des().Append(_L(" "));
+    iConnectionName->Des().Append(apType);
+    }
+
+void CConnectionSettingsParameters::SetRandomWLANNameL(CCreatorEngine& aEngine)
+    {
+    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomWLANNameL");
+
+    TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);
+    iWLANName->Des() = KCreatorConnectionSettingssPrefixName;
+    iWLANName->Des().Append( company );
+    iWLANName->Des().Append( _L(" WLAN") );
+    }
+
+void CConnectionSettingsParameters::SetRandomWLANNetModeL(CCreatorEngine& aEngine)
+    {
+    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomWLANNetModeL");
+
+    TInt wlanNetModeRand = aEngine.RandomNumber(1, 2);
+    if(wlanNetModeRand == 1)
+        {
+        iWlanNetMode = EAdhoc;//Ad-Hoc mode
+        }
+    else
+        {
+        iWlanNetMode = CMManager::EInfra;//Infrastructure mode
+        } 
+    }
+
+void CConnectionSettingsParameters::SetRandomWLANSecurityModeL(CCreatorEngine& aEngine)
+    {
+    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomWLANSecurityModeL");
+
+    TInt wlanSecModeRand = aEngine.RandomNumber(1, 5);
+    if(wlanSecModeRand == 1)
+        {
+        iWLanSecMode = EWlanSecModeOpen;///< Open security mode
+        }
+    else if(wlanSecModeRand == 2)
+        {
+        iWLanSecMode = EWlanSecModeWep;///< WEP security mode
+        //See WEPSecuritySettingsUI.h
+                
+        ///CWEPSecuritySettings
+                
+        //WEP key in us
+        
+        //Authentication type
+                
+        //WEP Key settings (key len, key format, key data)        
+        }
+    else if(wlanSecModeRand == 3)
+        {
+        iWLanSecMode = EWlanSecMode802_1x; ///< 802.1x security mode
+        }
+    else if(wlanSecModeRand == 4)
+        {
+        iWLanSecMode = EWlanSecModeWpa;///< WPA security mode
+        }
+    else if(wlanSecModeRand == 5)
+        {
+        iWLanSecMode = EWlanSecModeWpa2;///< WPA@ security mode
+        }
+    }
+
+void CConnectionSettingsParameters::SetRandomLoginNameL(CCreatorEngine& aEngine)
+    {
+    iLoginName->Des() = aEngine.RandomString(CCreatorEngine::EFirstName);
+    iLoginName->Des().LowerCase();
+    }
+
+void CConnectionSettingsParameters::SetRandomLoginPassL(CCreatorEngine& aEngine)
+    {
+    iLoginPass->Des() = aEngine.RandomString(CCreatorEngine::ESurname);
+    iLoginPass->Des().LowerCase();
+    }
+
+void CConnectionSettingsParameters::SetRandomSecureAuthenticationL(CCreatorEngine& /*aEngine*/)
+    {
+    iSecureAuthentication = EFalse;
+    }
+
+void CConnectionSettingsParameters::SetRandomPromptPasswordL(CCreatorEngine& /*aEngine*/)
+    {
+    iPromptPassword = ETrue;
+    }
+
+void CConnectionSettingsParameters::SetRandomUseProxyL(CCreatorEngine& /*aEngine*/)
+    {
+    iUseProxy = ETrue;
+    }
+
+void CConnectionSettingsParameters::SetRandomProxyAddressL(CCreatorEngine& /*aEngine*/)
+    {
+    iProxyServerAddress->Des() = _L("127.0.0.1");
+    }
+
+void CConnectionSettingsParameters::SetRandomProxyPortL(CCreatorEngine& /*aEngine*/)
+    {
+    iProxyPortNumber = 80;
+    }
+
+void CConnectionSettingsParameters::SetRandomStartPageL(CCreatorEngine& aEngine)
+    {
+    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomStartPageL");
+
+    TInt num = aEngine.RandomNumber(1, 3);
+    TBuf<10> apType;
+
+    if (num==1)
+        {
+        apType = _L("mms");
+        }            
+    else if (num==2)
+        {
+        apType = _L("wap");
+        }
+    else
+        {
+        apType = _L("internet");
+        }
+    TBuf<160> company = aEngine.RandomString(CCreatorEngine::ECompany);    
+    iStartPage->Des() = _L("http://");
+    iStartPage->Des().Append(apType);
+    iStartPage->Des().Append(_L("."));
+    iStartPage->Des().Append(company);
+    iStartPage->Des().Append(_L(".com"));
+    iStartPage->Des().LowerCase();
+    }
+
+void CConnectionSettingsParameters::SetRandomIPAddressL(CCreatorEngine& /*aEngine*/)
+    {
+    iIPAddr->Des() = _L("10.10.10.10");
+    }
+
+void CConnectionSettingsParameters::SetRandomIP4NameServer1L(CCreatorEngine& /*aEngine*/)
+    {
+    iIP4NameServer1->Des() = _L("10.1.1.1");
+    }
+void CConnectionSettingsParameters::SetRandomIP4NameServer2L(CCreatorEngine& /*aEngine*/)
+    {
+    iIP4NameServer2->Des() = _L("10.2.2.2");
+    }
+
+void CConnectionSettingsParameters::SetRandomProtocolTypeL(CCreatorEngine& aEngine)
+    {
+    LOGSTRING("Creator: CConnectionSettingsParameters::SetRandomProtocolTypeL");
+
+    TInt protocolTypeRand = aEngine.RandomNumber(1, 2);
+    if(protocolTypeRand == 1)
+        {
+        iProtocolType = RPacketContext::EPdpTypeIPv4;
+        }
+    else
+        {
+        iProtocolType = RPacketContext::EPdpTypeIPv6;
+        }
+    }
+
+void CConnectionSettingsParameters::SetRandomTelephoneNumberL(CCreatorEngine& aEngine)
+    {
+    iDefaultTelNumber->Des() = aEngine.RandomString(CCreatorEngine::EPhoneNumber);
+    }
+
+void CConnectionSettingsParameters::SetRandomBearerTypeIsdnL(CCreatorEngine& /*aEngine*/)
+    {
+    iBearerCallTypeIsdn = ECmCallTypeISDNv110;
+    }
+
+void CConnectionSettingsParameters::SetRandomBearerSpeedL(CCreatorEngine& /*aEngine*/)
+    {
+    iBearerSpeed = ECmSpeed14400;
+    }
+
+void CConnectionSettingsParameters::SetRandomWapWspOptionL(CCreatorEngine& /*aEngine*/)
+    {
+    iWapWspOption = ECmWapWspOptionConnectionless;
+    }
+
+void CConnectionSettingsParameters::SetRandomSubnetMaskL(CCreatorEngine& /*aEngine*/)
+    {
+    iSubnetMask->Des() = _L("255.255.255.0");
+    }
+
+void CConnectionSettingsParameters::SetRandomGatewayAddressL(CCreatorEngine& /*aEngine*/)
+    {
+    iGatewayAddress->Des() = _L("10.0.0.1");
+    }
+
+void CConnectionSettingsParameters::SetRandomWlanIpAddrL(CCreatorEngine& /*aEngine*/)
+    {
+    iWlanIpAddr->Des() = _L("10.0.0.99");
+    }
+
+void CConnectionSettingsParameters::SetRandomIPv6NameServer1L(CCreatorEngine& /*aEngine*/)
+    {
+    iIP6NameServer1->Des() = _L("2007:abcd:1000:2000:3000:4000:5000:6001");
+    }
+
+void CConnectionSettingsParameters::SetRandomIPv6NameServer2L(CCreatorEngine& /*aEngine*/)
+    {
+    iIP6NameServer2->Des() = _L("2007:abcd:1000:2000:3000:4000:5000:6002");
+    }
+
+void CConnectionSettingsParameters::SetRandomDisableTextAuthL(CCreatorEngine& /*aEngine*/)
+    {
+    iDisableTextAuth = EFalse;
+    }
+
+void CCreatorConnectionSettings::SetRandomBearerTypeL(CConnectionSettingsParameters& parameters)
+	{
+    LOGSTRING("Creator: CCreatorConnectionSettings::SetRandomBearerTypeL");
+
+	RArray<TUint32> supportedBearers = RArray<TUint32>( 10 );
+	iCmManagerExt.SupportedBearersL(supportedBearers);
+	CleanupClosePushL( supportedBearers );
+	    
+	//In random mode, skipping KUidLanBearerType
+	//Because of Emulator migh show it as supported, when it's really not
+	//and that causes weird situation in UI when there is an item, but it can't be opened
+	TInt lanID = supportedBearers.Find(KUidLanBearerType);
+	if( lanID != KErrNotFound )
+		{
+		supportedBearers.Remove(lanID);
+		}
+	
+	// in emulator remove WLAN
+	#ifdef __WINSCW__	
+	TInt wlanID = supportedBearers.Find(KUidWlanBearerType);
+	if( wlanID != KErrNotFound )
+		{
+		supportedBearers.Remove(wlanID);
+		}
+	#endif	
+				
+	/*
+	    for(TInt i = 0; i<supportedCount; i++)
+	        {
+	        TUint bearer = supportedBearers[i];
+	        if(bearer == KUidLanBearerType)
+	            {
+	            supportedBearers.Remove(i);
+	            }
+	        }
+	    */
+	    
+	//Select random bearer type. 
+	//Also possible to use SupportedBearersL() -method to find supported methods
+	//but using that will cause problems when setting attributes.
+	TInt supportedCount = supportedBearers.Count();    
+	TInt bearerTypeID = iEngine->RandomNumber(0, supportedCount-1);
+	    
+	TUint bearerType = supportedBearers[bearerTypeID];
+	    
+	//Bearer types KUidEmbeddedDestination and KPluginVPNBearerTypeUid is not supported
+	if(bearerType == KUidWlanBearerType)//Wireless LAN
+		{            
+		parameters.iBearerType = KUidWlanBearerType;
+		}
+	else if(bearerType == KUidPacketDataBearerType)//Packet data (GPRS)
+		{
+		parameters.iBearerType = KUidPacketDataBearerType;
+		}
+	else if(bearerType == KUidCSDBearerType)//Data Call
+		{
+		parameters.iBearerType = KUidCSDBearerType;
+		}
+	else if(bearerType == KUidHSCSDBearerType) //High speed GSM
+		{
+		parameters.iBearerType = KUidHSCSDBearerType;
+		}
+	else if(bearerType == KUidEmbeddedDestination)
+		{
+		parameters.iBearerType = KUidEmbeddedDestination;
+		}
+	else// if(bearerType == KPluginVPNBearerTypeUid)
+		{
+		parameters.iBearerType = KPluginVPNBearerTypeUid;
+		}
+	/* In random mode skipping LAN type
+	    else// if(bearerType == KUidLanBearerType)
+	        {
+	        iBearerType = KUidLanBearerType;
+	        }*/
+	    
+	CleanupStack::PopAndDestroy(); // supportedBearers
+	}
+
+void CCreatorConnectionSettings::SetRandomParametersL(CConnectionSettingsParameters& parameters)
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::SetRandomParametersL");
+        
+    // Connection method name:
+    parameters.SetRandomCMNameL(*iEngine);
+    
+    SetRandomBearerTypeL(parameters);
+ 
+    if(parameters.iBearerType == KUidWlanBearerType)//Wireless LAN
+        {           
+        // WLAN name:
+        parameters.SetRandomWLANNameL(*iEngine);
+        
+        //WLAN network mode        
+        parameters.SetRandomWLANNetModeL(*iEngine);     
+        
+        //WLAN security mode:
+        parameters.SetRandomWLANSecurityModeL(*iEngine);
+        }
+    
+    // Login name:
+    parameters.SetRandomLoginNameL(*iEngine);
+
+    // Login password:
+    parameters.SetRandomLoginPassL(*iEngine);
+
+    // Secure authentication:
+    parameters.SetRandomSecureAuthenticationL(*iEngine);
+    
+    // Prompt password:
+    parameters.SetRandomPromptPasswordL(*iEngine);    
+
+    // Use proxy:
+    parameters.SetRandomUseProxyL(*iEngine);    
+    
+    // Proxy address
+    parameters.SetRandomProxyAddressL(*iEngine);    
+    
+    // Proxy port number:
+    parameters.SetRandomProxyPortL(*iEngine);    
+
+    // Start page:
+    parameters.SetRandomStartPageL(*iEngine);
+       
+    // IP address:
+    parameters.SetRandomIPAddressL(*iEngine);    
+    
+    // IPv4 name servers:
+    parameters.SetRandomIP4NameServer1L(*iEngine);
+    parameters.SetRandomIP4NameServer2L(*iEngine);
+      
+    // Protocol type:
+    parameters.SetRandomProtocolTypeL(*iEngine);
+    
+    // Default telephone number:
+    parameters.SetRandomTelephoneNumberL(*iEngine);
+         
+    // Bearer isdn
+    parameters.SetRandomBearerTypeIsdnL(*iEngine);
+
+    // Bearer speed:
+    parameters.SetRandomBearerSpeedL(*iEngine);    
+
+    // WAP wsp option:
+    parameters.SetRandomWapWspOptionL(*iEngine);
+
+    // Subnet mask:
+    parameters.SetRandomSubnetMaskL(*iEngine);
+    
+    // Gateway address:
+    parameters.SetRandomGatewayAddressL(*iEngine);
+    
+    // WLAN ip address:
+    parameters.SetRandomWlanIpAddrL(*iEngine);
+
+    // IPv6 name servers:
+    parameters.SetRandomIPv6NameServer1L(*iEngine);
+    parameters.SetRandomIPv6NameServer2L(*iEngine);
+    
+    // Disable text authorization:
+    parameters.SetRandomDisableTextAuthL(*iEngine);    
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorConnectionSettings::SetDefaultCML(RCmConnectionMethodExt conMethod)
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::SetDefaultCM");
+
+    TCmDefConnValue defConnValue;
+        
+    //Returns the default connection method/SNAP.
+    TRAPD( err, iCmManagerExt.ReadDefConnL( defConnValue ) );
+    if( err ==  KErrNotSupported )
+        {
+        return; //If Default Connection NOT supported, just returning 
+        }
+    else if ( err != KErrNone )
+        {
+        User::Leave( err ); //If something else happend
+        }
+    else if ( defConnValue.iId == 0 ) // default not set
+        {       
+        TCmDefConnValue newDefaultCM;        
+        HBufC* cmName = conMethod.GetStringAttributeL( ECmName );        
+        CleanupStack::PushL( cmName );
+        newDefaultCM.iId = AccessPointNameToIdL( cmName->Des() );
+        newDefaultCM.iType = ECmDefConnDestination;
+        //Stores the default connection method/SNAP.
+        iCmManagerExt.WriteDefConnL( newDefaultCM );
+        CleanupStack::PopAndDestroy( cmName );        
+       }
+    }
+
+//----------------------------------------------------------------------------
+
+TUint32 CCreatorConnectionSettings::AccessPointNameToIdL(const TDesC& aAPName,
+                                                         TBool aAnyIfNotFound )
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::AccessPointNameToIdL");
+
+    //RCmDestination destination
+    
+    RArray<TUint32> destIdArray = RArray<TUint32>( 10 );
+    
+    iCmManagerExt.AllDestinationsL( destIdArray );
+    
+    CleanupClosePushL( destIdArray );
+    TUint32 id = 0 ;
+    TBool found = EFalse;
+    
+    for( TInt i = 0; i < destIdArray.Count(); i++ )
+        {
+        RCmDestinationExt dest = iCmManagerExt.DestinationL( destIdArray[i] );           
+        CleanupClosePushL( dest );        
+
+        HBufC* destName = dest.NameLC();
+        
+        if (destName->CompareF(aAPName) == 0){        
+         id = dest.Id();
+         found = ETrue;
+        }
+        if ( !found && id == 0 && aAnyIfNotFound )
+            {
+            id = dest.Id();
+            }
+        CleanupStack::PopAndDestroy( 2 ); // destName , dest
+        if(found)
+            {
+            break;
+            }
+        }
+
+    CleanupStack::PopAndDestroy(); // destIdArray   
+    return id;
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorConnectionSettings::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::HandleSessionEventL");
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorConnectionSettings::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::DeleteAllL");
+    DeleteAllDestinationsL( EFalse );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorConnectionSettings::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::DeleteAllCreatedByCreatorL");
+    iEntryIds.Reset();
+    
+    // fetch ids of entries created by Creator
+    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidIAP );
+    
+    // delete entries
+    DeleteAllDestinationsL( ETrue );
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorConnectionSettings::DeleteAllDestinationsL( TBool aOnlyCreatedWithCreator )
+    {
+    LOGSTRING("Creator: CCreatorConnectionSettings::DeleteAllDestinationsL");
+    RArray<TUint32> destIdArray(5);
+    CleanupClosePushL( destIdArray );
+    iCmManagerExt.AllDestinationsL( destIdArray );    
+    
+    for( TInt i = 0; i < destIdArray.Count(); i++ )
+        {
+        TRAP_IGNORE
+            (
+            RCmDestinationExt dest = iCmManagerExt.DestinationL( destIdArray[i] );           
+            CleanupClosePushL( dest );
+            
+            if ( !aOnlyCreatedWithCreator || iEntryIds.Find( destIdArray[i]) != KErrNotFound )
+                {
+                dest.DeleteLD();
+                }
+            CleanupStack::PopAndDestroy(); // dest
+            );
+        }
+   
+    CleanupStack::PopAndDestroy(); // destIdArray 
+    
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the IMPS related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidIAP );
+    }
+//----------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_connectionmethodelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,333 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+#include "creator_connectionmethodelement.h"
+#include "creator_traces.h"
+//#include "creator_accesspoint.h"
+
+
+using namespace creatorconnectionmethod;
+
+// connection name needs extra space for possible renaming
+const TInt KExtraSpace = 10;
+
+/*
+ * 
+ */
+CCreatorConnectionMethodElement* CCreatorConnectionMethodElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorConnectionMethodElement* self = new (ELeave) CCreatorConnectionMethodElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorConnectionMethodElement::CCreatorConnectionMethodElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
+
+void CCreatorConnectionMethodElement::ExecuteCommandL()
+	{
+	const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
+	TInt cmAmount = 1;    
+	if( amountAttr )
+		{
+		cmAmount = ConvertStrToIntL(amountAttr->Value());
+		}
+	// Get 'fields' element 
+	CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+	if( fieldsElement )
+		{
+		// Get sub-elements
+		const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
+		// Create connection method entries, the amount of entries is defined by cmAmount:
+		for( TInt cI = 0; cI < cmAmount; ++cI )
+			{            
+			CAccessPointsParameters* param = new (ELeave) CAccessPointsParameters;
+			CleanupStack::PushL(param);
+
+			for( TInt i = 0; i < fields.Count(); ++i )
+				{
+				CCreatorScriptElement* field = fields[i];
+				TPtrC elemName = field->Name();
+				TPtrC elemContent = field->Content();
+				const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
+				TBool useRandom = EFalse;
+				if( randomAttr || elemContent.Length() == 0 )
+					{
+					useRandom = ETrue;
+					}
+
+				if( elemName == Kconnectionname )
+					{
+					if( useRandom )
+						{
+						param->SetRandomCMNameL(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iConnectionName, elemContent);
+                        // reserve extra space for possible renaming
+                        TInt newLen = param->iConnectionName->Length() + KExtraSpace;
+                        param->iConnectionName = param->iConnectionName->ReAllocL(newLen);
+
+                        SetContentToTextParamL(param->iGprsAcessPointName, elemContent);
+						}
+					}
+				else if( elemName == Kstartpage )
+					{
+					if( useRandom )
+						{
+						param->SetRandomStartPageL(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iWapStartPage, elemContent);
+						}
+					}
+				else if( elemName == Kwapwspoption )
+					{
+					if( useRandom )
+						{
+						param->SetRandomWapWspOptionL(*iEngine);
+						}
+					else
+						{
+						if( CompareIgnoreCase(elemContent, Kconnectionless) == 0 )
+							{
+							param->iWapWspOption = EWapWspOptionConnectionless;
+							}
+						else if( CompareIgnoreCase(elemContent, Kconnectionoriented) == 0 )
+							{
+							param->iWapWspOption = EWapWspOptionConnectionOriented;
+							}
+						}
+					}
+				else if( elemName == Kloginname )
+					{
+					if( useRandom )
+						{
+						param->SetRandomLoginNameL(*iEngine);                		
+						}
+					else
+						{
+						SetContentToTextParamL(param->iIspLoginName, elemContent);
+						}
+					}
+				else if( elemName == Ksecureauthentication )
+					{
+					if( useRandom )
+						{
+						param->SetRandomSecureAuthenticationL(*iEngine);
+						}
+					else
+						{
+						param->iSecureAuthentication = ConvertStrToBooleanL(elemContent);
+						}
+					}
+				else if( elemName == Kloginpass )
+					{
+					if( useRandom )
+						{
+						param->SetRandomLoginPassL(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iIspLoginPass, elemContent);
+						}
+					}
+				else if( elemName == Kpromptpassword )
+					{
+					if( useRandom )
+						{
+						param->SetRandomPromptPasswordL(*iEngine);
+						}
+					else
+						{
+						param->iPromptPassword = ConvertStrToBooleanL(elemContent);
+						}
+					}
+				else if( elemName == Kgatewayaddress )
+					{
+					if( useRandom )
+						{
+						param->SetRandomGatewayAddressL(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iWapGatewayAddress, elemContent);
+						}
+					}
+				else if( elemName == Kdeviceipaddr )
+					{
+					if( useRandom )
+						{
+						param->SetRandomIPAddressL(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iIspIPAddr, elemContent);
+						}
+					}
+				else if( elemName == Kip4nameserver1 )
+					{
+					if( useRandom )
+						{
+						param->SetRandomIP4NameServer1L(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iIspIPNameServer1, elemContent);
+						}
+					}
+				else if( elemName == Kip4nameserver2 )
+					{
+					if( useRandom )
+						{
+						param->SetRandomIP4NameServer2L(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iIspIPNameServer2, elemContent);
+						}
+					}
+				else if( elemName == Kdatacalltelnumber )
+					{
+					if( useRandom )
+						{
+						param->SetRandomTelephoneNumberL(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iIspDefaultTelNumber, elemContent);
+						}
+					}
+				else if( elemName == Kdatacalltypeisdn )
+					{
+					if( useRandom )
+						{
+						param->SetRandomBearerTypeIsdnL(*iEngine);
+						}
+					else
+						{
+						if( CompareIgnoreCase(elemContent, Kanalogue) == 0 )
+							param->iIspBearerCallTypeIsdn = ECallTypeAnalogue;
+						else if( CompareIgnoreCase( elemContent, Kisdnv110) == 0 )
+							param->iIspBearerCallTypeIsdn = ECallTypeISDNv110;
+						else if( CompareIgnoreCase( elemContent, Kisdnv120) == 0 )
+							param->iIspBearerCallTypeIsdn = ECallTypeISDNv120;
+						}
+					}
+				else if( elemName == Kbearertype )
+					{
+					if( useRandom )
+						{
+						param->iBearerType = EApBearerTypeGPRS;
+						}
+					else
+						{
+						if( CompareIgnoreCase(elemContent, Kwlan) == 0 )
+							{
+							param->iBearerType = EApBearerTypeWLAN;
+							}
+						else if( CompareIgnoreCase(elemContent, Kgprs) == 0 )
+							{
+							param->iBearerType = EApBearerTypeGPRS;
+							}
+						else if( CompareIgnoreCase(elemContent, Kdatacall) == 0 )
+							{
+							param->iBearerType = EApBearerTypeCSD;
+							}
+						else if( CompareIgnoreCase(elemContent, Khsgsm) == 0 )
+							{
+							param->iBearerType = EApBearerTypeHSCSD;
+							}
+						else if( CompareIgnoreCase(elemContent, Klan) == 0 )
+							{
+							param->iBearerType = EApBearerTypeLAN;
+							}
+						}
+					}
+				else if( elemName == Kdatacalllinespeed )
+					{
+					if( useRandom )
+						{
+						param->SetRandomBearerSpeedL(*iEngine);
+						}
+					else
+						{
+						if( CompareIgnoreCase(elemContent, Kautomatic) == 0 )
+							{                			 
+							param->iIspBearerSpeed = KSpeedAutobaud;
+							}
+						else
+							{
+							TUint lineSpeed = ConvertStrToUintL(elemContent);
+							if( lineSpeed == 9600 )
+								param->iIspBearerSpeed = KSpeed9600;
+							else if( lineSpeed == 14400 )
+								param->iIspBearerSpeed = KSpeed14400;
+							else if( lineSpeed == 19200 )
+								param->iIspBearerSpeed = KSpeed19200;
+							else if( lineSpeed == 28800 )
+								param->iIspBearerSpeed = KSpeed28800;
+							else if( lineSpeed == 38400 )
+								param->iIspBearerSpeed = KSpeed38400;
+							else if( lineSpeed == 43200 )
+								param->iIspBearerSpeed = KSpeed43200;
+							else if( lineSpeed == 56000 )
+								param->iIspBearerSpeed = KSpeed56000;
+							}                			
+						}
+					}
+				else if( elemName == Kproxyserveraddress )
+					{
+					if( useRandom )
+						{
+						param->SetRandomProxyAddressL(*iEngine);
+						}
+					else
+						{
+						SetContentToTextParamL(param->iProxyServerAddress, elemContent);                		
+						}
+					}
+				else if( elemName == Kproxyportnumber )
+					{
+					if( useRandom )
+						{
+						param->SetRandomProxyPortL(*iEngine);
+						}
+					else
+						{
+						param->iProxyPortNumber = ConvertStrToUintL(elemContent);                		
+						}
+					}
+				}
+			iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryAccessPoints, param);
+			CleanupStack::Pop(); // param
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_contactelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,401 @@
+/*
+* 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 "creator_contactelement.h"
+#include "creator_traces.h"
+#include "creator_phonebook.h"
+#include "creator_factory.h"
+#include "creator_contactsetcache.h"
+#include <xml/documentparameters.h>
+#include <qtcontacts.h>
+
+using namespace Xml;
+using namespace creatorcontact;
+
+/**
+ * Contact field element mappings:
+ */
+enum TContactFieldDataType
+    {
+    EDataTypeText,
+    EDataTypeBinary,
+    EDataTypeDateTime    
+    };
+    
+class FieldMapping
+{
+public:
+    TPtrC iElementName;
+    TInt  iFieldCode;
+    TContactFieldDataType iDataType;
+};
+FieldMapping fieldMappingTbl[] = {
+       {TPtrC(KFirstname), CCreatorPhonebookWrapper::EFirstName, EDataTypeText},
+       {TPtrC(KLastname), CCreatorPhonebookWrapper::ELastName, EDataTypeText},
+       {TPtrC(KFirstnameReading), CCreatorPhonebookWrapper::EFirstNameReading, EDataTypeText},
+       {TPtrC(KLastnameReading), CCreatorPhonebookWrapper::ELastNameReading, EDataTypeText},
+       {TPtrC(KPrefix), CCreatorPhonebookWrapper::EPrefix, EDataTypeText},
+       {TPtrC(KSuffix), CCreatorPhonebookWrapper::ESuffix, EDataTypeText},
+       {TPtrC(KSecondname), CCreatorPhonebookWrapper::ESecondName, EDataTypeText},
+       {TPtrC(KLandphoneHome), CCreatorPhonebookWrapper::ELandPhoneHome, EDataTypeText},
+       
+       {TPtrC(KMobilephoneHome), CCreatorPhonebookWrapper::EMobilePhoneHome, EDataTypeText},
+       {TPtrC(KVideonumberHome), CCreatorPhonebookWrapper::EVideoNumberHome, EDataTypeText},
+       {TPtrC(KFaxnumberHome), CCreatorPhonebookWrapper::EFaxNumberHome, EDataTypeText},
+       {TPtrC(KVoipHome), CCreatorPhonebookWrapper::EVoipHome, EDataTypeText},
+       {TPtrC(KEmailHome), CCreatorPhonebookWrapper::EEmailHome, EDataTypeText},
+       {TPtrC(KUrlHome), CCreatorPhonebookWrapper::EUrlHome, EDataTypeText},
+       {TPtrC(KAddrlabelHome), CCreatorPhonebookWrapper::EAddrLabelHome, EDataTypeText},
+       {TPtrC(KAddrpoHome), CCreatorPhonebookWrapper::EAddrPoHome, EDataTypeText},
+       
+       {TPtrC(KAddrextHome), CCreatorPhonebookWrapper::EAddrExtHome, EDataTypeText},
+       {TPtrC(KAddrstreetHome), CCreatorPhonebookWrapper::EAddrStreetHome, EDataTypeText},
+       {TPtrC(KAddrlocalHome), CCreatorPhonebookWrapper::EAddrLocalHome, EDataTypeText},
+       {TPtrC(KAddrregionHome), CCreatorPhonebookWrapper::EAddrRegionHome, EDataTypeText},
+       {TPtrC(KAddrpostcodeHome), CCreatorPhonebookWrapper::EAddrPostCodeHome, EDataTypeText},
+       {TPtrC(KAddrcountryHome), CCreatorPhonebookWrapper::EAddrCountryHome, EDataTypeText},
+       {TPtrC(KJobtitle), CCreatorPhonebookWrapper::EJobTitle, EDataTypeText},
+       {TPtrC(KCompanyname), CCreatorPhonebookWrapper::ECompanyName, EDataTypeText},
+       
+       {TPtrC(KLandphoneWork), CCreatorPhonebookWrapper::ELandPhoneWork, EDataTypeText},
+       {TPtrC(KMobilephoneWork), CCreatorPhonebookWrapper::EMobilePhoneWork, EDataTypeText},
+       {TPtrC(KVideonumberWork), CCreatorPhonebookWrapper::EVideoNumberWork, EDataTypeText},
+       {TPtrC(KFaxnumberWork), CCreatorPhonebookWrapper::EFaxNumberWork, EDataTypeText},
+       {TPtrC(KVoipWork), CCreatorPhonebookWrapper::EVoipWork, EDataTypeText},
+       {TPtrC(KEmailWork), CCreatorPhonebookWrapper::EEmailWork, EDataTypeText},
+       {TPtrC(KUrlWork), CCreatorPhonebookWrapper::EUrlWork, EDataTypeText},
+       {TPtrC(KAddrlabelWork), CCreatorPhonebookWrapper::EAddrLabelWork, EDataTypeText},
+       
+       {TPtrC(KAddrpoWork), CCreatorPhonebookWrapper::EAddrPoWork, EDataTypeText},
+       {TPtrC(KAddrextWork), CCreatorPhonebookWrapper::EAddrExtWork, EDataTypeText},
+       {TPtrC(KAddrstreetWork), CCreatorPhonebookWrapper::EAddrStreetWork, EDataTypeText},
+       {TPtrC(KAddrlocalWork), CCreatorPhonebookWrapper::EAddrLocalWork, EDataTypeText},
+       {TPtrC(KAddrregionWork), CCreatorPhonebookWrapper::EAddrRegionWork, EDataTypeText},
+       {TPtrC(KAddrpostcodeWork), CCreatorPhonebookWrapper::EAddrPostCodeWork, EDataTypeText},
+       {TPtrC(KAddrcountryWork), CCreatorPhonebookWrapper::EAddrCountryWork, EDataTypeText},
+       {TPtrC(KLandphoneGen), CCreatorPhonebookWrapper::ELandPhoneGen, EDataTypeText},
+       
+       {TPtrC(KMobilephoneGen), CCreatorPhonebookWrapper::EMobilePhoneGen, EDataTypeText},
+       {TPtrC(KVideonumberGen), CCreatorPhonebookWrapper::EVideoNumberGen, EDataTypeText},
+       {TPtrC(KFaxnumberGen), CCreatorPhonebookWrapper::EFaxNumberGen, EDataTypeText},
+       {TPtrC(KVoipGen), CCreatorPhonebookWrapper::EVoipGen, EDataTypeText},
+       {TPtrC(KPoc), CCreatorPhonebookWrapper::EPoc, EDataTypeText},
+       {TPtrC(KSwis), CCreatorPhonebookWrapper::ESwis, EDataTypeText},
+       {TPtrC(KSip), CCreatorPhonebookWrapper::ESip, EDataTypeText},
+       {TPtrC(KEmailGen), CCreatorPhonebookWrapper::EEmailGen, EDataTypeText},
+       
+       {TPtrC(KUrlGen), CCreatorPhonebookWrapper::EUrlGen, EDataTypeText},
+       {TPtrC(KAddrlabelGen), CCreatorPhonebookWrapper::EAddrLabelGen, EDataTypeText},
+       {TPtrC(KAddrpoGen), CCreatorPhonebookWrapper::EAddrPoGen, EDataTypeText},
+       {TPtrC(KAddrextGen), CCreatorPhonebookWrapper::EAddrExtGen, EDataTypeText},
+       {TPtrC(KAddrstreetGen), CCreatorPhonebookWrapper::EAddrStreetGen, EDataTypeText},
+       {TPtrC(KAddrlocalGen), CCreatorPhonebookWrapper::EAddrLocalGen, EDataTypeText},
+       {TPtrC(KAddrregionGen), CCreatorPhonebookWrapper::EAddrRegionGen, EDataTypeText},
+       {TPtrC(KAddrpostcodeGen), CCreatorPhonebookWrapper::EAddrPostCodeGen, EDataTypeText},
+       
+       {TPtrC(KAddrcountryGen), CCreatorPhonebookWrapper::EAddrCountryGen, EDataTypeText},
+       {TPtrC(KPagerNumber), CCreatorPhonebookWrapper::EPagerNumber, EDataTypeText},
+       {TPtrC(KDtmfString), CCreatorPhonebookWrapper::EDtmfString, EDataTypeText},
+       {TPtrC(KWvAddress), CCreatorPhonebookWrapper::EWVAddress, EDataTypeText},
+       {TPtrC(KDate), CCreatorPhonebookWrapper::EDate, EDataTypeDateTime},
+       {TPtrC(KNote), CCreatorPhonebookWrapper::ENote, EDataTypeText},
+       {TPtrC(KThumbnailPath), CCreatorPhonebookWrapper::EThumbnailPic, EDataTypeText},
+       {TPtrC(KThumbnailId), CCreatorPhonebookWrapper::EThumbnailPic, EDataTypeText},
+       {TPtrC(KRingTone), CCreatorPhonebookWrapper::ERingTone, EDataTypeText},
+       {TPtrC(KRingToneId), CCreatorPhonebookWrapper::ERingTone, EDataTypeText},
+       
+       {TPtrC(KCallerobjImg), CCreatorPhonebookWrapper::ECallerObjImg, EDataTypeText},
+       {TPtrC(KCallerobjText), CCreatorPhonebookWrapper::ECallerObjText, EDataTypeText},
+       {TPtrC(KMiddlename), CCreatorPhonebookWrapper::EMiddleName, EDataTypeText},
+       {TPtrC(KDepartment), CCreatorPhonebookWrapper::EDepartment, EDataTypeText},
+       {TPtrC(KAsstname), CCreatorPhonebookWrapper::EAsstName, EDataTypeText},
+       {TPtrC(KSpouse), CCreatorPhonebookWrapper::ESpouse, EDataTypeText},
+       {TPtrC(KChildren), CCreatorPhonebookWrapper::EChildren, EDataTypeText},
+       {TPtrC(KAsstphone), CCreatorPhonebookWrapper::EAsstPhone, EDataTypeText},
+       
+       {TPtrC(KCarphone), CCreatorPhonebookWrapper::ECarPhone, EDataTypeText},
+       {TPtrC(KAnniversary), CCreatorPhonebookWrapper::EAnniversary, EDataTypeDateTime},
+       {TPtrC(KSyncclass), CCreatorPhonebookWrapper::ESyncClass, EDataTypeText},
+       {TPtrC(KLocPrivacy), CCreatorPhonebookWrapper::ELocPrivacy, EDataTypeText},
+       {TPtrC(KGenlabel), CCreatorPhonebookWrapper::EGenLabel, EDataTypeText}
+};
+
+//*********************************************************************************
+
+CCreatorContactElementBase* CCreatorContactElementBase::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    LOGSTRING("Creator: CCreatorContactElementBase::NewL");
+    CCreatorContactElementBase* self = new (ELeave) CCreatorContactElementBase(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorContactElementBase::CCreatorContactElementBase(CCreatorEngine* aEngine) : CCreatorScriptElement(aEngine)
+    { }
+
+CCreatorContactElement* CCreatorContactElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    LOGSTRING("Creator: CCreatorContactElement::NewL");
+    CCreatorContactElement* self = new (ELeave) CCreatorContactElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorContactElement::CCreatorContactElement(CCreatorEngine* aEngine) 
+: 
+CCreatorContactElementBase(aEngine)
+    { 
+    iIsCommandElement = ETrue;
+    }
+
+
+void CCreatorContactElement::ExecuteCommandL()
+    {    
+    LOGSTRING("Creator: CCreatorContactElement::ExecuteCommandL");
+    // Find out how many contacts should we create:
+    const CCreatorScriptAttribute* contactAmountAttr = this->FindAttributeByName(KAmount);    
+    TInt contactAmount = 1;    
+    if( contactAmountAttr )
+        {
+        contactAmount = ConvertStrToIntL(contactAmountAttr->Value());
+        }
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    TInt fieldMappingTblSize = sizeof(fieldMappingTbl)/sizeof(FieldMapping);
+    for( TInt cI = 0; cI < contactAmount; ++cI )
+        {
+        CPhonebookParameters* param = (CPhonebookParameters*) TCreatorFactory::CreatePhoneBookParametersL();
+        CleanupStack::PushL(param);
+        // Loop all the field elements
+        if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+            {
+            
+            const RPointerArray<CCreatorScriptElement>& fieldList = fieldsElement->SubElements();
+            
+            if( fieldList.Count() == 0 )
+                {
+                
+                }
+            for( TInt i = 0; i < fieldList.Count(); ++i )
+                {
+                TPtrC fieldName = fieldList[i]->Name();
+                //const CCreatorScriptAttribute* amountAttr = fieldList[i]->FindAttributeByName(KAmount);
+                //const CCreatorScriptAttribute* rndLenAttr = fieldList[i]->FindAttributeByName(KRandomLength);
+                //const CCreatorScriptAttribute* increaseAttr = fieldList[i]->FindAttributeByName(KIncrease);
+                //TBool increase( EFalse );
+                //if ( increaseAttr )
+                //    {
+                //    increase = ConvertStrToBooleanL( increaseAttr->Value() );
+                //    }
+                for( TInt j = 0; j < fieldMappingTblSize; ++j )
+                    {
+                    const FieldMapping& mapping = fieldMappingTbl[j];
+                    if( fieldName == mapping.iElementName )
+                        {
+                        TPtrC content = fieldList[i]->Content();
+                                                                        
+//                        MCreatorRandomDataField::TRandomLengthType randomLenType = MCreatorRandomDataField::ERandomLengthUndefined;
+                    
+                        if( content == TPtrC(KEmpty) || content == TPtrC(KNullDesC) )
+                            {
+							CCreatorContactField* field = CCreatorContactField::NewL();
+                        	CleanupStack::PushL(field);
+                        	field->AddFieldToParamL( iEngine,param, mapping.iFieldCode, KErrNotFound );
+                          	CleanupStack::Pop(field);
+                            }
+                        else
+                        	{
+							CCreatorContactField* field = CCreatorContactField::NewL();
+                            CleanupStack::PushL(field);
+                            field->AddFieldToParamL( param, mapping.iFieldCode, content );
+                            CleanupStack::Pop(field);
+                        	}
+                        
+
+                        break;
+                        
+                        }
+                    }
+
+                }
+            } 
+        else
+            {
+            // No fields specified, so add all fields with random content:
+            for( TInt i = 0; i < fieldMappingTblSize; ++i )
+                {
+                if( fieldMappingTbl[i].iElementName == KThumbnailId || 
+                    fieldMappingTbl[i].iElementName == KRingToneId )
+                    {
+                    // Skip thumbnail and ringtone IDs, since they are duplicates with thumbnailpath and ringtonepath
+                    continue;
+                    }
+                CCreatorContactField* field = CCreatorContactField::NewL();
+                CleanupStack::PushL(field);
+                field->AddFieldToParamL( iEngine,param, fieldMappingTbl[i].iFieldCode, KErrNotFound );
+                CleanupStack::Pop(field);
+                }
+                
+            }
+        iEngine->AppendToCommandArrayL(ECmdCreatePhoneBookEntryContacts, param);
+        iParameters.AppendL(param); // Save the pointer to the parametes. 
+        CleanupStack::Pop(param);
+        }
+    }
+
+
+/*
+void CCreatorContactElement::ExecuteCommandL()
+    {}
+*/
+CCreatorContactSetElement* CCreatorContactSetElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    LOGSTRING("Creator: CCreatorContactSetElement::NewL");
+    CCreatorContactSetElement* self = new (ELeave) CCreatorContactSetElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorContactSetElement::CCreatorContactSetElement(CCreatorEngine* aEngine) 
+: 
+CCreatorContactElementBase(aEngine)
+    { }
+
+void CCreatorContactSetElement::ExecuteCommandL()
+    { }
+
+void CCreatorContactSetElement::AddToCacheL()
+    {    
+    LOGSTRING("Creator: CCreatorContactSetElement::AddToCacheL");
+    const CCreatorScriptAttribute* linkIdAttr = this->FindAttributeByName(KId);
+    const CCreatorScriptAttribute* existingElemsAttr = this->FindAttributeByName(KExistingContacts);
+    TInt numOfExistingContacts = 0;
+    if( existingElemsAttr )
+        {
+        numOfExistingContacts = ConvertStrToIntL(existingElemsAttr->Value());
+        }
+    if( linkIdAttr )
+        {
+        TInt linkId = ConvertStrToIntL(linkIdAttr->Value());
+        if( linkId > 0 )
+            {    
+            CCreatorContactSet* newSet = CCreatorContactSet::NewL(linkId, numOfExistingContacts);
+            CleanupStack::PushL(newSet);
+            ContactLinkCache::Instance()->AppendL(newSet);
+            CleanupStack::Pop(newSet);
+                 
+            // Mark sub-elements (i.e. contacts) to this contact-set:
+            for( TInt i = 0; i < iSubElements.Count(); ++i )
+                {
+                for( TInt j = 0; j < iSubElements[i]->CommandParameters().Count(); ++j)
+                    {
+                    CCreatorModuleBaseParameters* params = iSubElements[i]->CommandParameters()[j];
+                    if( params )
+                        {
+                        params->SetScriptLinkId(linkId);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+CCreatorContactGroupElement* CCreatorContactGroupElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    LOGSTRING("Creator: CCreatorContactGroupElement::NewL");
+    CCreatorContactGroupElement* self = new (ELeave) CCreatorContactGroupElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorContactGroupElement::CCreatorContactGroupElement(CCreatorEngine* aEngine)
+: 
+CCreatorContactElementBase(aEngine)
+    { 
+    iIsCommandElement = ETrue;
+    }
+
+
+void CCreatorContactGroupElement::ExecuteCommandL()
+    {
+    LOGSTRING("Creator: CCreatorContactGroupElement::ExecuteCommandL");
+    // Get attributes (amount and name)
+    const CCreatorScriptAttribute* groupAmountAttr = this->FindAttributeByName(KAmount);        
+    const CCreatorScriptAttribute* groupNameAttr = this->FindAttributeByName(KName);
+    // How many groups to create:
+    TInt groupAmount = 1;        
+    if( groupAmountAttr )
+        {
+        groupAmount = ConvertStrToIntL(groupAmountAttr->Value());
+        }
+    
+    for( TInt i = 0; i < groupAmount; ++i )
+        {        
+        CCreatorScriptElement* membersElement = FindSubElement(KMembers);
+        
+        if( membersElement )
+            {    
+            CPhonebookParameters* param = (CPhonebookParameters*) TCreatorFactory::CreatePhoneBookParametersL();            
+            CleanupStack::PushL(param);
+            
+            // Links to contact-sets:
+            const RPointerArray<CCreatorScriptElement>& linkList = membersElement->SubElements();
+            if( linkList.Count() > 0 )
+                {
+                for( TInt i = 0; i < linkList.Count(); ++i )
+                    {
+                    AppendContactSetReferenceL(*linkList[i], param->iLinkIds);
+                    }                
+                }
+            
+            if( groupNameAttr )
+                {
+				param->iGroupName->Des().Copy( groupNameAttr->Value() );
+                }
+            else
+            	{
+                param->iGroupName->Des().Copy( iEngine->RandomString(CCreatorEngine::EGroupName) );
+                }                
+            iEngine->AppendToCommandArrayL(ECmdCreatePhoneBookEntryGroups, param);
+            CleanupStack::Pop(param);
+            }
+        }
+    }
+
+/*
+void CCreatorContactGroupElement::ExecuteCommandL()
+    {}
+*/
+CCreatorContactFieldElement* CCreatorContactFieldElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    LOGSTRING("Creator: CCreatorContactFieldElement::NewL");
+    CCreatorContactFieldElement* self = new (ELeave) CCreatorContactFieldElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+
+CCreatorContactFieldElement::CCreatorContactFieldElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_contactsetcache.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,218 @@
+/*
+* 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 "creator_contactsetcache.h"
+
+
+CContactLinkCacheImp* ContactLinkCache::iImp = 0;
+
+CCreatorContactSet* CCreatorContactSet::NewL(TInt aLinkId, TInt aNumOfExistingContacts)
+    {
+    return new (ELeave) CCreatorContactSet(aLinkId, aNumOfExistingContacts);    
+    }
+
+TInt CCreatorContactSet::LinkId() const
+    {
+    return iLinkId;
+    }
+
+void CCreatorContactSet::AppendL(TUint32 aContactLink)
+    {
+    iContactLinks.AppendL(aContactLink);
+    }
+
+RArray<TUint32> CCreatorContactSet::ContactLinks()
+    {
+    return iContactLinks;
+    }
+
+const RArray<TUint32> CCreatorContactSet::ContactLinks() const
+    {
+    return iContactLinks;
+    }
+
+
+TInt CCreatorContactSet::NumberOfExistingContacts() const
+    {
+    return iNumOfExistingContacts;
+    }
+
+CCreatorContactSet::~CCreatorContactSet()
+    {
+    iContactLinks.Reset();
+    iContactLinks.Close();
+    }
+
+
+CCreatorContactSet::CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts)
+    {
+    iLinkId = aLinkId;
+    iNumOfExistingContacts = aNumOfExistingContacts;
+    }
+
+class CContactLinkCacheImp : public CBase, public MContactLinkCache
+{
+public:
+    static CContactLinkCacheImp* NewL();
+    virtual ~CContactLinkCacheImp();
+    virtual void AppendL(CCreatorContactSet* aContactSet); 
+
+    virtual RArray<TUint32> ContactLinks(TInt aLinkId);
+    virtual const RArray<TUint32> ContactLinks(TInt aLinkId) const;
+
+    virtual RPointerArray<CCreatorContactSet>& ContactSets();
+    virtual const RPointerArray<CCreatorContactSet>& ContactSets() const;
+    virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const;
+    virtual CCreatorContactSet& ContactSet(TInt aLinkId);
+    
+private:
+    void ConstructL();
+    CContactLinkCacheImp();
+    
+    RArray<TUint32> iEmptyLinks;
+
+    RPointerArray<CCreatorContactSet> iContactSets;
+    CCreatorContactSet* iDummyContactSet;
+};
+
+CContactLinkCacheImp* CContactLinkCacheImp::NewL()
+    {
+    CContactLinkCacheImp* self = new (ELeave) CContactLinkCacheImp();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+void CContactLinkCacheImp::ConstructL()
+    {
+    if( iDummyContactSet == 0 )
+        iDummyContactSet = CCreatorContactSet::NewL(-1, 0);    
+    }
+
+CContactLinkCacheImp::CContactLinkCacheImp()
+: iDummyContactSet(0)
+    {}
+
+CContactLinkCacheImp::~CContactLinkCacheImp()
+    {
+    iEmptyLinks.Reset();// just in case...
+    iEmptyLinks.Close();
+
+    iContactSets.ResetAndDestroy();
+    iContactSets.Close();
+    delete iDummyContactSet;
+    }
+void CContactLinkCacheImp::AppendL(CCreatorContactSet* aContactSet)
+    {
+    iContactSets.AppendL(aContactSet);
+    }
+RArray<TUint32> CContactLinkCacheImp::ContactLinks(TInt aLinkId)
+    {
+    for( TInt i = 0; i < iContactSets.Count(); ++i )
+        {
+        if( iContactSets[i]->LinkId() == aLinkId )
+            {
+            return iContactSets[i]->ContactLinks();
+            }
+        }
+    return iEmptyLinks;
+    }
+
+const RArray<TUint32> CContactLinkCacheImp::ContactLinks(TInt aLinkId) const
+    {
+    for( TInt i = 0; i < iContactSets.Count(); ++i )
+        {
+        if( iContactSets[i]->LinkId() == aLinkId )
+            {
+            return iContactSets[i]->ContactLinks();
+            }
+        }
+    return iEmptyLinks;
+    }
+
+
+const CCreatorContactSet& CContactLinkCacheImp::ContactSet(TInt aLinkId) const
+    {
+    for( TInt i = 0; i < iContactSets.Count(); ++i )
+        {
+        if( iContactSets[i]->LinkId() == aLinkId )
+            {
+            return *iContactSets[i];
+            }
+        }
+        
+    return *iDummyContactSet;
+    }
+
+CCreatorContactSet& CContactLinkCacheImp::ContactSet(TInt aLinkId)
+    {
+    for( TInt i = 0; i < iContactSets.Count(); ++i )
+        {
+        if( iContactSets[i]->LinkId() == aLinkId )
+            {
+            return *iContactSets[i];
+            }
+        }
+        
+    return *iDummyContactSet;
+    }
+
+RPointerArray<CCreatorContactSet>& CContactLinkCacheImp::ContactSets()
+    {
+    return iContactSets;
+    }
+
+const RPointerArray<CCreatorContactSet>& CContactLinkCacheImp::ContactSets() const
+    {
+    return iContactSets;
+    }
+
+
+void ContactLinkCache::InitializeL()
+    {
+    if( iImp == 0 )
+        {
+        iImp = CContactLinkCacheImp::NewL();
+        }
+    }
+
+void ContactLinkCache::DestroyL()
+    {
+    delete iImp;
+    iImp = 0;
+    }
+
+MContactLinkCache* ContactLinkCache::Instance()
+    {
+    return iImp;
+    }
+
+
+    /*{
+public:
+    static void ;
+    static void DestructLD();
+    
+    static MContactLinkCache* Instance();
+    
+private:
+    CContactLinkImp* iImp;
+};*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_factory.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* 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 "engine.h"
+#include "creator_factory.h"
+
+//#include "creator_accesspoint.h"
+#include "creator_phonebook.h"
+
+CCreatorPhonebookBase* TCreatorFactory::CreatePhoneBookL(CCreatorEngine* aEngine)
+{
+    return CCreatorPhonebook::NewL(aEngine);    
+}
+
+CCreatorModuleBaseParameters* TCreatorFactory::CreatePhoneBookParametersL()
+	{
+	return new(ELeave) CPhonebookParameters;
+	}
+/*
+CCreatorConnectionSettingsBase* TCreatorFactory::CreateConnectionSettingsL(CCreatorEngine* aEngine)
+{
+    return CCreatorAccessPoints::NewL(aEngine); 
+}
+
+CCreatorModuleBaseParameters* TCreatorFactory::CreateConnectionSettingsParametersL()
+    {
+    return new(ELeave) CAccessPointsParameters;
+    }
+*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_file.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,829 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+#include "creator_file.h" 
+#include "creator_traces.h"
+
+using namespace ContentAccess;
+
+static const TInt KFilesFieldLength = 256;
+
+//_LIT(KCreatorFilesPrefixName, "CR_");
+//_LIT(KCreatorFilesPrefixFolderName, "CR_FLDR_");
+
+//----------------------------------------------------------------------------
+
+CFilesParameters::CFilesParameters()
+    {
+    LOGSTRING("Creator: CFilesParameters::CFilesParameters");
+    iFullFilePath = HBufC::New(KFilesFieldLength);
+    }
+
+CFilesParameters::CFilesParameters( CFilesParameters& aCopy )
+    {
+    LOGSTRING("Creator: CFilesParameters::CFilesParameters");
+    iFullFilePath = HBufC::New(KFilesFieldLength);
+    iFullFilePath->Des().Copy( *aCopy.iFullFilePath );
+    iFileCommand = aCopy.iFileCommand;
+    iEncrypt = aCopy.iEncrypt;
+    if ( aCopy.iPermission )
+        {
+        TRAP_IGNORE(    
+            iPermission = CDRMPermission::NewL();
+            iPermission->DuplicateL( *aCopy.iPermission );
+            );
+        }
+    }
+
+CFilesParameters::~CFilesParameters()
+    {
+    LOGSTRING("Creator: CFilesParameters::~CFilesParameters");
+    delete iFullFilePath;
+    delete iPermission;
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorFiles* CCreatorFiles::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorFiles* self = CCreatorFiles::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorFiles* CCreatorFiles::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorFiles* self = new (ELeave) CCreatorFiles;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorFiles::CCreatorFiles() :
+    iFs ( CEikonEnv::Static()->FsSession() )
+    {
+    }
+
+void CCreatorFiles::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorFiles::ConstructL");
+
+    iEngine = aEngine;
+
+    User::LeaveIfError( iApaLs.Connect() );
+    
+    iFilePaths = new (ELeave) CDesCArrayFlat( 4 );
+    
+    // Restore file id 
+    CDictionaryFileStore* store = iEngine->FileStoreLC();
+    User::LeaveIfNull( store );
+    if ( store->IsPresentL( KUidDictionaryUidFiles ) )
+        {
+        RDictionaryReadStream in;
+        in.OpenLC( *store, KUidDictionaryUidFiles );
+        TRAPD( err, iFileId = in.ReadInt32L() );
+        if ( err )
+            {
+            iFileId = 1;
+            }
+        CleanupStack::PopAndDestroy(); // in
+        }
+    else
+        {
+        iFileId = 1;
+        }
+    CleanupStack::PopAndDestroy( store );
+    }
+
+CCreatorFiles::~CCreatorFiles()
+    {
+    LOGSTRING("Creator: CCreatorFiles::~CCreatorFiles");
+    
+    // this is done only once per file operation:
+    if ( iFilePaths && iFilePaths->Count() )
+        {
+        TRAP_IGNORE( StorePathsForDeleteL( *iFilePaths ) );
+        }
+    delete iFilePaths;
+    delete iParameters;
+    delete iUserParameters;
+    iApaLs.Close();
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorFiles::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
+    {
+    LOGSTRING("Creator: CCreatorFiles::QueryDialogClosedL");
+    
+    if( aPositiveAction == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        return;
+        }
+    
+    const TDesC* showText = &KSavingText;
+    TBool finished(EFalse);
+    TBool retval(ETrue);
+    switch(aUserData)
+        {
+        case ECreatorFilesDelete:
+            showText = &KDeletingText;
+            iEntriesToBeCreated = 1;
+            finished = ETrue;
+            break;
+        case ECreatorFilesStart:
+            {
+            // set a default directory  (eg. c:\Nokia\Images\)
+            iEngine->SetDefaultPathForFileCommandL(iCommand, iDirectoryQueriedFromUser);
+            TBuf<50> promptText;
+            if (iCommand == ECmdCreateFileEntryEmptyFolder)
+                promptText.Copy( _L("Specify the folder path and name") );
+            else
+                promptText.Copy( _L("Specify the directory") );
+            
+            // show directory query dialog
+            retval = iEngine->GetEngineWrapper()->DirectoryQueryDialog(promptText, iDirectoryQueriedFromUser, this, ECreatorFilesGetDirectory );
+            }
+            break;
+        case ECreatorFilesGetDirectory:
+            // check that the root folder is correct
+            if ( iDirectoryQueriedFromUser.Length() < 3  ||  BaflUtils::CheckFolder( iFs, iDirectoryQueriedFromUser.Left(3) ) != KErrNone )
+                {
+                iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Invalid path"));
+                retval = EFalse;
+                }        
+            else
+                {
+                // check the directory contains a trailing backlash
+                if ( iDirectoryQueriedFromUser.Right(1) != _L("\\") )
+                    {
+                    iDirectoryQueriedFromUser.Append(_L("\\"));
+                    }
+                // copy the directory name to a class member
+                if ( iCommand == ECmdCreateFileEntryEmptyFolder )
+                    {
+                    finished = ETrue;
+                    }
+                else
+                    {
+                    retval = AskDRMDataFromUserL();
+                    }
+                }
+            break;
+        case ECreatorFilesAskDRMData:
+            if ( iDummy > 0 )
+                {
+                iUserParameters->iEncrypt = ETrue;
+                }
+            if ( iDummy == 2 )
+                {
+                iUserParameters->iPermission = CDRMPermission::NewL();
+                CDRMPermission* perm = iUserParameters->iPermission; 
+                perm->iTopLevel->iActiveConstraints = EConstraintNone;
+                perm->iPlay->iActiveConstraints = EConstraintNone;
+                perm->iDisplay->iActiveConstraints = EConstraintNone;
+                perm->iPrint->iActiveConstraints = EConstraintNone;
+                perm->iExecute->iActiveConstraints = EConstraintNone;
+                perm->iUniqueID = 0;
+                // DRM Combined Delivery
+                iDummy = 0;
+                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog( &iDummy, _L("How many counts(0=unlimited)?"), ETrue, this, ECreatorFilesAskDRM_CD_Counts );
+                }
+            else
+                {
+                finished = ETrue;
+                }
+            break;
+        case ECreatorFilesAskDRM_CD_Counts:
+            if ( iDummy > 0 )
+                {
+                TInt count = iDummy;
+                CDRMPermission* perm = iUserParameters->iPermission;
+                // apply constraints to all permission types
+                // applied type will be selected by setting iAvailableRights
+                // when determining the file type
+                perm->iDisplay->iActiveConstraints |= EConstraintCounter;
+                perm->iDisplay->iCounter = count;
+                perm->iDisplay->iOriginalCounter = count;
+    
+                perm->iPlay->iActiveConstraints |= EConstraintCounter;
+                perm->iPlay->iCounter = count;
+                perm->iPlay->iOriginalCounter = count;
+    
+                perm->iPrint->iActiveConstraints |= EConstraintCounter;
+                perm->iPrint->iCounter = count;
+                perm->iPrint->iOriginalCounter = count;
+                
+                perm->iExecute->iActiveConstraints |= EConstraintCounter;
+                perm->iExecute->iCounter = count;
+                perm->iExecute->iOriginalCounter = count;
+                }
+            iDummy = 0;
+            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog( &iDummy, _L("How many minutes until expire(0=unlimited)?"), ETrue, 
+                this, ECreatorFilesAskDRM_CD_Minutes
+                );
+            break;
+        case ECreatorFilesAskDRM_CD_Minutes:
+            if ( iDummy > 0 )
+                {
+                TInt minutes = iDummy;
+                CDRMPermission* perm = iUserParameters->iPermission;            
+                // apply constraints to all permission types
+                // applied type will be selected by setting iAvailableRights
+                // when determining the file type            
+                perm->iDisplay->iActiveConstraints |= EConstraintInterval;
+                perm->iDisplay->iInterval = TTimeIntervalSeconds( 60 * minutes );
+                perm->iDisplay->iIntervalStart = Time::NullTTime();
+                
+                perm->iPlay->iActiveConstraints |= EConstraintInterval;
+                perm->iPlay->iInterval = TTimeIntervalSeconds( 60 * minutes );
+                perm->iPlay->iIntervalStart = Time::NullTTime();
+    
+                perm->iPrint->iActiveConstraints |= EConstraintInterval;
+                perm->iPrint->iInterval = TTimeIntervalSeconds( 60 * minutes );
+                perm->iPrint->iIntervalStart = Time::NullTTime();
+    
+                perm->iExecute->iActiveConstraints |= EConstraintInterval;
+                perm->iExecute->iInterval = TTimeIntervalSeconds( 60 * minutes );
+                perm->iExecute->iIntervalStart = Time::NullTTime();
+                }
+            finished = ETrue;
+            break;
+        default:
+            //some error
+            retval = EFalse;
+            break;
+        }
+    if( retval == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        }
+    else if( finished )
+        {
+        // add this command to command array
+        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
+        // started exucuting commands
+        iEngine->ExecuteFirstCommandL( *showText );
+        }
+    }
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorFiles::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorFiles::AskDataFromUserL");
+    
+    CCreatorModuleBase::AskDataFromUserL( aCommand );
+    
+    if ( aCommand == ECmdDeleteCreatorFiles )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all files created with Creator?"), this, ECreatorFilesDelete );
+        }
+    
+    delete iUserParameters;
+    iUserParameters = NULL;
+    iUserParameters = new(ELeave) CFilesParameters();
+    
+    iDirectoryQueriedFromUser.Copy( KNullDesC );
+
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorFilesStart );
+    }
+
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorFiles::CreateFileEntryL(CFilesParameters *aParameters, TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorFiles::CreateFileEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    TFileName directoryToBeCreated;
+            
+    CFilesParameters* parameters = aParameters;
+    
+    if (!parameters)
+        {
+        if ( iUserParameters )
+            {
+            iParameters = new (ELeave) CFilesParameters( *iUserParameters );
+            // iUserParameters = NULL;
+            }
+        else
+            {
+            // random data needed if no predefined data available
+            iParameters = new (ELeave) CFilesParameters;            
+            }
+        parameters = iParameters;
+        }
+
+    TInt err = KErrNone;
+
+    // if we just create directories
+    if ( aCommand == ECmdCreateFileEntryEmptyFolder)
+        {
+        // strip the last backslash from the path
+        if( iDirectoryQueriedFromUser.Length() > 0)
+        	directoryToBeCreated = iDirectoryQueriedFromUser;
+        else if( parameters->iFullFilePath && parameters->iFullFilePath->Des().Length() > 0 )
+        	directoryToBeCreated = parameters->iFullFilePath->Des();
+        else 
+        	return err;
+        
+        _LIT(KSlash, "\\");
+        if( directoryToBeCreated.Right(1) == KSlash )
+        	directoryToBeCreated.SetLength ( directoryToBeCreated.Length() - 1 ); 
+            
+        // generate a unique file name
+        err = CApaApplication::GenerateFileName( iFs, directoryToBeCreated);
+        if (err != KErrNone)
+            return err;
+
+        // now append the backslah back
+        directoryToBeCreated.Append( _L("\\") );
+        
+        // now create the new directory
+        err = iFs.MkDirAll( directoryToBeCreated );
+        
+        // Add directoryToBeCreated to store
+        iFilePaths->AppendL( directoryToBeCreated );
+
+        LOGSTRING3("Creator: CCreatorFiles::CreateFileEntryL creating empty directory %S returns err", &directoryToBeCreated, err);
+        }
+
+    else  // files
+        {
+        LOGSTRING2("Creator: CCreatorFiles::CreateFileEntryL file id is %d", aCommand);
+
+        // get source
+        TFileName fullSourcePath;
+        switch (aCommand)
+            {
+	        case ECmdCreateFileEntryJPEG_25kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJPEG_25kB );  break; }
+	        case ECmdCreateFileEntryJPEG_200kB:     { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJPEG_200kB );  break; }
+	        case ECmdCreateFileEntryJPEG_500kB:     { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJPEG_500kB );  break; }
+	        case ECmdCreateFileEntryPNG_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EPNG_15kB );  break; }
+	        case ECmdCreateFileEntryGIF_2kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EGIF_2kB );  break; }
+	        case ECmdCreateFileEntryRNG_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ERNG_1kB );  break; }
+	        case ECmdCreateFileEntryMIDI_10kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMIDI_10kB );  break; }
+	        case ECmdCreateFileEntryWAV_20kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWAVE_20kB );  break; }
+	        case ECmdCreateFileEntryAMR_20kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EAMR_20kB );  break; }
+	        case ECmdCreateFileEntryXLS_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EExcel_15kB );  break; }
+	        case ECmdCreateFileEntryDOC_20kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWord_20kB );  break; }
+	        case ECmdCreateFileEntryPPT_40kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EPowerPoint_40kB );  break; }
+	        case ECmdCreateFileEntryTXT_10kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EText_10kB );  break; }
+	        case ECmdCreateFileEntryTXT_70kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EText_70kB );  break; }
+	        case ECmdCreateFileEntry3GPP_70kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::E3GPP_70kB );  break; }
+	        case ECmdCreateFileEntryMP3_250kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMP3_250kB );  break; }
+	        case ECmdCreateFileEntryAAC_100kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EAAC_100kB );  break; }
+	        case ECmdCreateFileEntryRM_95kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ERM_95kB );  break; }
+	        case ECmdCreateFileEntryBMP_25kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EBMP_25kB );  break; }
+	        case ECmdCreateFileEntryDeck_1kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESavedDeck_1kB );  break; }
+	        case ECmdCreateFileEntryHTML_20kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EHTML_20kB );  break; }
+	        case ECmdCreateFileEntryJAD_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJAD_1kB );  break; }
+	        case ECmdCreateFileEntryJAR_10kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJAR_10kB );  break; }
+	        case ECmdCreateFileEntryJP2_65kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EJP2_65kB );  break; }
+	        case ECmdCreateFileEntryMP4_200kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMP4_200kB );  break; }
+	        case ECmdCreateFileEntryMXMF_40kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EMXMF_40kB );  break; }
+	        case ECmdCreateFileEntryRAM_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ERAM_1kB );  break; }
+	        case ECmdCreateFileEntrySVG_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESVG_15kB );  break; }
+	        case ECmdCreateFileEntrySWF_15kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESWF_15kB );  break; }
+	        case ECmdCreateFileEntryTIF_25kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ETIF_25kB );  break; }
+	        case ECmdCreateFileEntryVCF_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EVCF_1kB );  break; }
+	        case ECmdCreateFileEntryVCS_1kB:        { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EVCS_1kB );  break; }
+	        case ECmdCreateFileEntrySISX_10kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::ESISX_10kB );  break; }
+	        case ECmdCreateFileEntryWMA_50kB:       { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWMA_50kB );  break; }
+	        case ECmdCreateFileEntryWMV_200kB:      { fullSourcePath = iEngine->TestDataPathL( CCreatorEngine::EWMV_200kB );  break; }
+	        case ECmdCreateFileEntryEmptyFolder:    { User::Panic(_L("EmptyFolder"), 801); break; }
+	        default:                                { return KErrPathNotFound; }
+            }
+
+
+        // define the full target path
+        TFileName fullTargetPath;
+
+        if ( parameters->iFullFilePath && parameters->iFullFilePath->Des().Length() > 3 )
+            {
+            _LIT(KSlash, "\\");
+            // check the path is ok
+            fullTargetPath = parameters->iFullFilePath->Des();
+            
+            if(fullTargetPath.Right(1) == KSlash)
+                {
+                // Remove '\' from the end, because the filename check does not work with it:
+                fullTargetPath.SetLength ( fullTargetPath.Length() - 1 );
+                }
+            
+            if (!iFs.IsValidName( fullTargetPath ))
+		        User::Leave(KErrBadName);
+
+            // target path = directory + the file name from source path
+            TParse parser;
+            parser.Set(fullSourcePath, NULL, NULL);
+            
+            // Add '\' to the end:
+            fullTargetPath.Append(KSlash);            
+            // Add filename:
+            fullTargetPath.Append( parser.NameAndExt() );
+
+            LOGSTRING2("Creator: CCreatorFiles::CreateFileEntryL iFullFilePath used, fullTargetPath: %S", &fullTargetPath);
+            }
+    
+        else if ( iDirectoryQueriedFromUser.Length() > 0 )
+            {
+            // target path = directory + the file name from source path
+            TParse parser;
+            parser.Set(fullSourcePath, NULL, NULL);
+
+            fullTargetPath = iDirectoryQueriedFromUser;
+            fullTargetPath.Append( parser.NameAndExt() );
+
+            LOGSTRING2("Creator: CCreatorFiles::CreateFileEntryL iDirectoryQueriedFromUser used, fullTargetPath: %S", &fullTargetPath);
+            }
+
+        else
+            {   
+            LOGSTRING("Creator: CCreatorFiles::CreateFileEntryL leaving with KErrPathNotFound");
+            User::Leave(KErrPathNotFound);
+            }
+    
+        TBool encrypt = parameters->iEncrypt; 
+        if ( encrypt ) fullTargetPath.Append( KOma2DcfExtension );
+        // check the target path has a unique filename ie we won't overwrite existing files
+        // also generates any missing directories
+        if ( BaflUtils::FileExists( iFs, fullTargetPath ) )
+            {
+            GenerateFileNameL( fullTargetPath );
+            }
+        User::LeaveIfError(CApaApplication::GenerateFileName( iFs, fullTargetPath ) );
+        
+        if ( encrypt )
+            {
+            EncryptFileL( fullSourcePath, fullTargetPath, parameters );
+            }
+        else
+            {
+            // copy the file (synchronous function)
+            err = BaflUtils::CopyFile(iFs, fullSourcePath, fullTargetPath);
+            LOGSTRING4("Creator: CCreatorFiles::CreateFileEntryL copy %S to %S, err=%d", &fullSourcePath, &fullTargetPath, err);            
+            }
+        
+        if (err != KErrNone)
+            User::Leave(err);  // leave because copying failed
+
+        // Add fullTargetPath to store
+        iFilePaths->AppendL( fullTargetPath );
+        
+		// make sure that the file won't have a read only attribute
+		TEntry fileEntry;
+		iFs.Entry(fullTargetPath, fileEntry);
+		iFs.SetEntry(fullTargetPath, fileEntry.iModified, NULL, KEntryAttReadOnly);
+
+        // clear variables
+		parameters->iFullFilePath->Des().Copy ( KNullDesC );
+        }
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorFiles::EncryptFileL( const TDesC& aInFileName, const TDesC& aOutFileName, CFilesParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorFiles::EncryptFileL");
+    TBuf8<64> mime;
+    SetMimeTypeL( aInFileName, mime, aParameters );
+    CSupplier* supplier = CSupplier::NewLC();
+
+    CMetaDataArray* metaData = CMetaDataArray::NewLC();
+    
+    // Tell the agent which MIME type to use for the encrypted data
+    metaData->AddL( KOmaImportMimeTypeField, mime );
+
+    if ( aParameters && aParameters->iPermission )
+        {
+        // Combined Delivery file will be created
+        SetPermissionsL( metaData, aOutFileName, aParameters );
+        }
+    
+    supplier->SetOutputDirectoryL( iDirectoryQueriedFromUser );
+    
+    // The KOmaImportContentType is a OMA DRM agent specific MIME type which
+    // indicates that plain content is to be encrypted
+    CImportFile* importFile = supplier->ImportFileL( KOmaImportContentType,
+                                                     *metaData,
+                                                     aOutFileName );
+    CleanupStack::PushL( importFile );
+    
+    // Peek the source file size:
+    TInt fileLen( 0 );
+    RFile file;
+    User::LeaveIfError( file.Open( iFs, aInFileName, EFileRead ) );
+    CleanupClosePushL( file );
+    User::LeaveIfError( file.Size( fileLen ) );
+    CleanupStack::PopAndDestroy( &file );
+    
+    // Read the source file to inmemory buffer
+    RFileReadStream rs;    
+    User::LeaveIfError( rs.Open( iFs,
+                                 aInFileName,
+                                 EFileStream | EFileRead ) ); 
+    CleanupClosePushL( rs );
+    HBufC8* fileBuf = HBufC8::NewLC( fileLen );
+    TPtr8 p = fileBuf->Des();
+    rs.ReadL( p, fileLen );
+    
+    // Start encryption
+    TInt err = importFile->WriteData( p );
+    if ( err == KErrCANewFileHandleRequired )
+        {
+        RFile file;
+        User::LeaveIfError( file.Create( iFs, aOutFileName, EFileWrite ) );
+        CleanupClosePushL( file );
+        User::LeaveIfError( importFile->ContinueWithNewOutputFile( file, aOutFileName ) );
+        CleanupStack::PopAndDestroy( &file );
+        }
+    else
+        {
+        User::LeaveIfError( err );
+        }
+    User::LeaveIfError( importFile->WriteDataComplete() );
+    CleanupStack::PopAndDestroy( fileBuf );
+    CleanupStack::PopAndDestroy( &rs );    
+    CleanupStack::PopAndDestroy( importFile );
+    CleanupStack::PopAndDestroy( metaData );
+    CleanupStack::PopAndDestroy( supplier );
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorFiles::SetPermissionsL( CMetaDataArray* aMetaData, const TDesC& aOutFileName, CFilesParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorFiles::SetPermissionsL");
+    CDRMRights* rights = CDRMRights::NewL();
+    CleanupStack::PushL( rights );
+    
+    HBufC8* cnturi = HBufC8::NewL( KMaxFileName );
+    cnturi->Des().Copy( aOutFileName );
+    
+    CDRMAsset* asset = CDRMAsset::NewLC();
+    asset->iUid = cnturi;
+    // Set the asset to the rights class, it will duplicate the asset
+    rights->SetAssetL( *asset );
+    CleanupStack::PopAndDestroy( asset );
+    
+    rights->SetPermissionL( *aParameters->iPermission );
+    
+    // Construct externalized presentation of the rights object
+    TInt rightsSize = 1024 *100;
+    HBufC8* rightBuf = HBufC8::NewLC( rightsSize ); 
+    TPtr8 bptr = rightBuf->Des();
+    bptr.SetLength( rightsSize );
+    RMemWriteStream iWriteStream;
+    iWriteStream.Open( (TAny*)(rightBuf->Ptr() ), rightsSize );
+    CleanupClosePushL( iWriteStream );
+    iWriteStream << *rights;
+    iWriteStream.CommitL();
+    TPtr8 rp = rightBuf->Des();
+    
+    // Add rights to metadata
+    aMetaData->AddL( KOmaImportRightsField, rp );
+    CleanupStack::PopAndDestroy( &iWriteStream );
+    CleanupStack::PopAndDestroy( rightBuf );
+    CleanupStack::PopAndDestroy( rights );
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorFiles::SetMimeTypeL( const TDesC& aFileName, TDes8& aMime, CFilesParameters *aParameters )
+    {
+    LOGSTRING("Creator: CCreatorFiles::SetMimeTypeL");
+    TUid appUid;
+    TDataType dataType;
+    User::LeaveIfError( iApaLs.AppForDocument( aFileName, appUid, dataType ) );
+    if ( dataType.Des().Length() )
+        {
+        aMime.Copy( dataType.Des() );    
+        }
+    else
+        {
+        // set default mime, because it was not recognized by iApaLs
+        aMime.Copy( _L("text/plain") );
+        }
+
+    // set DRM permissions according the type of the file
+    if ( aParameters->iPermission )
+        {
+        if ( dataType.Des().FindF( _L("image") ) > KErrNotFound )
+            {
+            aParameters->iPermission->iAvailableRights = ERightsDisplay | ERightsPrint;
+            }
+        else if ( dataType.Des().FindF( _L("audio") ) > KErrNotFound ||
+                  dataType.Des().FindF( _L("video") ) > KErrNotFound ||
+                  dataType.Des().FindF( _L("tone") ) > KErrNotFound || // e.g. application/vnd.nokia.ringing-tone
+                  dataType.Des().FindF( _L("realmedia") ) > KErrNotFound )
+            {
+            // media files
+            aParameters->iPermission->iAvailableRights = ERightsPlay;
+            }
+        else if ( dataType.Des().FindF( _L("archive") ) > KErrNotFound ||
+                  dataType.Des().FindF( _L("x-sis") ) > KErrNotFound )
+            {
+            // application/java-archive
+            // x-epoc/x-sisx-app
+            aParameters->iPermission->iAvailableRights = ERightsExecute;
+            }
+        else if ( dataType.Des().FindF( _L("application") ) > KErrNotFound ||
+                  dataType.Des().FindF( _L("text") ) > KErrNotFound )
+            {
+            // application/msexcel
+            // application/msword
+            // text/plain
+            // etc.
+            aParameters->iPermission->iAvailableRights = ERightsDisplay | ERightsPrint;
+            }
+        else
+            {
+            // other filetype
+            aParameters->iPermission->iAvailableRights = ERightsDisplay;
+            }
+        }
+    }
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorFiles::AskDRMDataFromUserL()
+    {
+    LOGSTRING("Creator: CCreatorFiles::AskDRMDataFromUserL");
+    // Encryption -dialog
+    CDesCArrayFlat* items = new(ELeave) CDesCArrayFlat(5);
+    CleanupStack::PushL(items);
+
+    // Add entires to list
+    items->AppendL( _L("None") );
+    items->AppendL( _L("DRM Forward Lock") );
+    items->AppendL( _L("DRM Combined Delivery") );
+
+    
+	// create a popup list
+    iDummy = 0;
+    TBool retval = iEngine->GetEngineWrapper()->PopupListDialog(_L("Encryption"), items, &iDummy, this, ECreatorFilesAskDRMData );
+    CleanupStack::PopAndDestroy( items );
+    return retval;
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorFiles::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorFiles::DeleteAllL");
+    User::Leave( KErrNotSupported ); // will not be supported
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorFiles::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorFiles::DeleteAllCreatedByCreatorL");
+    iFileId = 1;
+    CDictionaryFileStore* store = iEngine->FileStoreLC();
+    User::LeaveIfNull( store );
+        
+    if ( store->IsPresentL( KUidDictionaryUidFiles ) )
+        {
+        RDictionaryReadStream in;
+        in.OpenLC( *store, KUidDictionaryUidFiles );
+        CFileMan* fileMan = CFileMan::NewL( iFs );
+        CleanupStack::PushL( fileMan );
+        TFileName fullPath;
+        // ignore return value, don't update iFileId here:
+        TRAPD( err, in.ReadInt32L() );
+        while ( !err )
+            {
+            TInt len( KErrNotFound );
+            TRAP( err, len = in.ReadInt8L() );  // will leave with KErrEof
+            if ( !err )
+                {
+                TRAP( err, in.ReadL( fullPath, len ) );                    
+                }
+            if ( !err )
+                {
+                TEntry fileEntry;
+                iFs.Entry( fullPath, fileEntry );
+                if ( fileEntry.IsDir() )
+                    {
+                    fileMan->RmDir( fullPath ); // ignore return value
+                    }
+                else
+                    {
+                    iFs.Delete( fullPath ); // ignore return value    
+                    }                    
+                }
+            }
+        CleanupStack::PopAndDestroy( fileMan );
+        CleanupStack::PopAndDestroy( &in );
+        
+        // files deleted, remove the Creator internal file registry
+        store->Remove( KUidDictionaryUidFiles );
+        store->CommitL();
+        }
+    CleanupStack::PopAndDestroy( store );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorFiles::StorePathsForDeleteL( CDesCArray& aPaths )
+    {
+    LOGSTRING("Creator: CCreatorFiles::StorePathsForDeleteL");
+    CDictionaryFileStore* store = iEngine->FileStoreLC();
+    User::LeaveIfNull( store );
+    
+    // backup previous filepaths from store
+    // otherwise they would be overwritten when calling out.WriteL
+    CDesCArray* previousPaths = new (ELeave) CDesCArrayFlat( 4 );
+    CleanupStack::PushL( previousPaths );
+    
+    TFileName fullPath;
+    
+    if ( store->IsPresentL( KUidDictionaryUidFiles ) )
+        {
+        RDictionaryReadStream in;
+        in.OpenLC( *store, KUidDictionaryUidFiles );
+        // ignore return value, don't update iFileId here:
+        TRAPD( err, in.ReadInt32L() );
+        while ( !err ) 
+            {
+            TRAP( err,
+                TInt len = in.ReadInt8L(); // will leave with KErrEof
+                in.ReadL( fullPath, len );
+                previousPaths->AppendL( fullPath );
+                );
+            }
+        CleanupStack::PopAndDestroy(); // in
+        }
+    
+    RDictionaryWriteStream out;       
+    out.AssignLC( *store, KUidDictionaryUidFiles );
+    
+    // write latest file id to store
+    out.WriteInt32L( iFileId );
+    
+    // restore previous paths to store
+    for ( TInt i = 0; i < previousPaths->Count(); i++ )
+        {
+        out.WriteInt8L( (*previousPaths)[i].Length() );
+        out.WriteL( (*previousPaths)[i] );            
+        }
+
+    // write new paths to store
+    for ( TInt i = 0; i < aPaths.Count(); i++ )
+        {
+        out.WriteInt8L( aPaths[i].Length() );
+        out.WriteL( aPaths[i] );            
+        }
+    
+    out.CommitL();
+    CleanupStack::PopAndDestroy(); // out
+    
+    store->CommitL();
+    CleanupStack::PopAndDestroy( previousPaths );
+    CleanupStack::PopAndDestroy( store );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorFiles::GenerateFileNameL( TFileName& aRootName )
+    {
+    LOGSTRING("Creator: CCreatorFiles::GenerateFileNameL");
+    if ( iFileId )
+        {
+        TBuf<16> extension;
+        if ( iFileId < 10 )
+            {
+            extension.Format( _L("(0%d)"), iFileId );     
+            }
+        else
+            {
+            extension.Format( _L("(%d)"), iFileId );
+            }
+        aRootName.Insert( aRootName.Locate( '.' ), extension );
+        }
+    iFileId++;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_fileelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,316 @@
+/*
+* 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 "creator_fileelement.h"
+#include <DrmPermission.h>
+#include <DrmConstraint.h>
+#include "creator_traces.h"
+#include "creator_file.h"
+
+using namespace creatorfile;
+
+// 15 minutes per time zone, 60 seconds per minute
+const TInt KSecondsPerTimeZone = 900;
+const TInt KMinuteInMicroseconds = 60000000;
+const TInt KTimeZoneIncrement = 15;
+
+/*
+ * 
+ */
+CCreatorFileElement* CCreatorFileElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorFileElement* self = new (ELeave) CCreatorFileElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorFileElement::CCreatorFileElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+
+    TTime currUniversal;
+    TTime currLocal;
+    TInt64 result( 0 );
+    currUniversal.UniversalTime();
+    currLocal.HomeTime();
+    result = currLocal.Int64() - currUniversal.Int64();
+    result /= KMinuteInMicroseconds;
+    result /= KTimeZoneIncrement;
+    iTimeZone = I64INT( result );
+    }
+/*
+ * 
+ */
+void CCreatorFileElement::ExecuteCommandL()
+    {
+    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
+    TInt fileAmount = 1;    
+    if( amountAttr )
+        {
+        fileAmount = ConvertStrToIntL(amountAttr->Value());
+        }
+    // Get 'fields' element 
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    if( fieldsElement && fieldsElement->SubElements().Count() > 0)
+        {
+        // Get sub-elements
+        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();
+        // Create files, the amount of files is defined by fileAmount:
+        for( TInt cI = 0; cI < fileAmount; ++cI )
+            {
+            CFilesParameters* param = new (ELeave) CFilesParameters;
+            CleanupStack::PushL( param );
+            
+            for( TInt i = 0; i < fields.Count(); ++i )
+                {
+                CCreatorScriptElement* field = fields[i];
+                TPtrC elemName = field->Name();
+                TPtrC elemContent = field->Content();
+
+                const CCreatorScriptAttribute* randomAttr = field->FindAttributeByName( KRandomLength );
+                
+                if( elemName == KType )
+                    {
+                    param->iFileCommand = GetFileCommandL(elemContent, randomAttr || elemContent.Length() == 0);
+                    }
+                else if( elemName == KDirectory )
+                    {
+                    delete param->iFullFilePath;
+                    param->iFullFilePath = 0;
+                    if( randomAttr == 0 && elemContent.Length() > 0 )
+                    	{
+                    	param->iFullFilePath = elemContent.AllocL();
+                    	}
+                    else
+                        {
+                        TFileName defaultPath;
+                        iEngine->SetDefaultPathForFileCommandL( param->iFileCommand, defaultPath );
+                        param->iFullFilePath = defaultPath.AllocL();
+                        }
+                    }
+                else if ( elemName == KEncryption )
+                    {
+                    ParseDRMElementsL( field, param );
+                    }
+                }
+
+            if ( !param->iFileCommand )
+                {
+                param->iFileCommand = ECmdCreateFileEntryEmptyFolder;
+                }
+            iEngine->AppendToCommandArrayL( param->iFileCommand, param);
+            CleanupStack::Pop( param );
+            }
+        }
+    else
+    	{
+    	_LIT(KDummy, "");
+    	for( TInt cI = 0; cI < fileAmount; ++cI )
+    		{
+    		CFilesParameters* param = new (ELeave) CFilesParameters;
+    		CleanupStack::PushL(param);
+    		delete param->iFullFilePath;
+    		param->iFullFilePath = 0;
+    		TFileName defaultPath;
+    		param->iFileCommand = GetFileCommandL(KDummy, ETrue);
+    		iEngine->SetDefaultPathForFileCommandL(param->iFileCommand, defaultPath);                
+    		param->iFullFilePath = defaultPath.AllocL();
+    		
+    		iEngine->AppendToCommandArrayL(param->iFileCommand, param);
+    		CleanupStack::Pop(param);
+    		}
+    	}
+    }
+
+TInt CCreatorFileElement::GetFileCommandL( const TDesC& aFileIdStr, TBool aRandom ) const
+    {
+    TInt mapCount = sizeof(FileMap) / sizeof(FileMapping);
+    
+    if( aRandom )
+        {
+        return FileMap[iEngine->RandomNumber(0, mapCount-1)].CommandId();
+        }
+    
+    for( TInt i = 0; i < mapCount; ++i )
+        {
+        if( CompareIgnoreCase(FileMap[i].FileName(), aFileIdStr) == 0 )
+            return FileMap[i].CommandId();
+        }
+    LOGSTRING2("CCreatorFileElement::GetFileCommandL: Unknown file id: %S", &aFileIdStr);
+    User::Leave(KErrGeneral);
+    return 0; // Not reached, but disables compiler warning...
+    }
+
+void CCreatorFileElement::ParseDRMElementsL( CCreatorScriptElement* aField, CFilesParameters* aParam )
+    {
+    const CCreatorScriptAttribute* encryptionTypeAttr = aField->FindAttributeByName( KType );
+    if ( encryptionTypeAttr && encryptionTypeAttr->Value().Length() > 0 )
+        {
+        aParam->iEncrypt = ETrue;
+        if ( encryptionTypeAttr->Value() == KDRMCD ) 
+            {
+            delete aParam->iPermission;
+            aParam->iPermission = NULL;
+            // ownership transferred:
+            aParam->iPermission = CDRMPermission::NewL();
+            }
+        else if ( encryptionTypeAttr->Value() != KDRMFL )
+            {
+            // must be either KDRMCD or KDRMFL
+            User::Leave( KErrArgument );
+            }
+        }
+    else
+        {
+        User::Leave( KErrArgument );
+        }
+    
+    const RPointerArray<CCreatorScriptElement>& rights = aField->SubElements();
+    
+    if ( encryptionTypeAttr->Value() == KDRMFL && rights.Count() )
+        {
+        // Right definitions not allowed with DRM Forward Lock
+        // User::Leave( KErrArgument ); // Do not leave here
+        return; // Just omit rights definitions
+        }
+    
+    // parse right elements
+    CDRMPermission* drmPermission = aParam->iPermission;
+    for ( TInt r = 0; r < rights.Count(); r++ )
+        {
+        const CCreatorScriptAttribute* rightAttr = rights[r]->FindAttributeByName( KType );
+        if ( rightAttr->Value() == KDRMPlayRight &&
+             !( drmPermission->iAvailableRights & ERightsPlay ) )
+            {
+            drmPermission->iAvailableRights |= ERightsPlay;
+            ParseDRMConstraintsL( rights[r], drmPermission->iPlay );
+            }
+        else if ( rightAttr->Value() == KDRMDisplayRight  &&
+                !( drmPermission->iAvailableRights & ERightsDisplay ))
+            {
+            drmPermission->iAvailableRights |= ERightsDisplay;
+            ParseDRMConstraintsL( rights[r], drmPermission->iDisplay );
+            }
+        else if ( rightAttr->Value() == KDRMPrintRight  &&
+                !( drmPermission->iAvailableRights & ERightsPrint ) )
+            {
+            drmPermission->iAvailableRights |= ERightsPrint;
+            ParseDRMConstraintsL( rights[r], drmPermission->iPrint );
+            }
+        else if ( rightAttr->Value() == KDRMExecuteRight  &&
+                !( drmPermission->iAvailableRights & ERightsExecute ) )
+            {
+            drmPermission->iAvailableRights |= ERightsExecute;
+            ParseDRMConstraintsL( rights[r], drmPermission->iExecute );
+            }
+        }
+    }
+
+void CCreatorFileElement::ParseDRMConstraintsL( CCreatorScriptElement* aRight, CDRMConstraint* aConstraint )
+    {
+    const RPointerArray<CCreatorScriptElement>& constraints = aRight->SubElements();
+    for ( TInt c = 0; c < constraints.Count(); c++ )
+        {
+        TPtrC elemName = constraints[c]->Name();
+        TPtrC elemContent = constraints[c]->Content();
+        if ( elemName == KDRMCount )
+            {
+            TInt count = ConvertStrToIntL( elemContent );
+            // apply count constraint
+            aConstraint->iActiveConstraints |= EConstraintCounter;
+            aConstraint->iCounter = count;
+            aConstraint->iOriginalCounter = count;
+            }
+        else if ( elemName == KDRMInterval )
+            {
+            // apply interval constraint           
+            aConstraint->iActiveConstraints |= EConstraintInterval;
+            aConstraint->iInterval = ParseTimeInterval( elemContent );
+            aConstraint->iIntervalStart = Time::NullTTime();
+            }
+        else if ( elemName == KDRMStartTime )
+            {
+            // apply start time constraint           
+            aConstraint->iActiveConstraints |= EConstraintStartTime;
+            TTimeIntervalSeconds offset( iTimeZone * KSecondsPerTimeZone );
+            aConstraint->iStartTime = ConvertToDateTimeL( elemContent ) - offset;
+            }
+        else if ( elemName == KDRMEndTime )
+            {
+            // apply end time constraint
+            aConstraint->iActiveConstraints |= EConstraintEndTime;
+            TTimeIntervalSeconds offset( iTimeZone * KSecondsPerTimeZone );
+            aConstraint->iEndTime = ConvertToDateTimeL( elemContent ) - offset;
+            }
+        else if ( elemName == KDRMAccumulated )
+            {
+            // apply accumulated time constraint
+            aConstraint->iActiveConstraints |= EConstraintAccumulated;
+            if ( aConstraint->iEndTime == Time::NullTTime() )
+                {
+                aConstraint->iEndTime = Time::MaxTTime();
+                }
+            if ( aConstraint->iStartTime == Time::NullTTime() )
+                {
+                aConstraint->iStartTime = Time::MinTTime();
+                }
+            aConstraint->iAccumulatedTime = ParseTimeInterval( elemContent );
+            }
+        }
+    }
+
+TTimeIntervalSeconds CCreatorFileElement::ParseTimeInterval( TDesC& aTimeString )
+    {
+    // Iso8601 format (P1Y2M3DT4H5M6S) to TimeIntervalSeconds
+    TLex lex;
+    TInt year = 0;
+    TInt month = 0;
+    TInt day = 0;
+    TInt hour = 0;
+    TInt minute = 0;
+    TInt second = 0;
+
+    if (aTimeString.Length() > 0)
+        {    
+        lex = aTimeString;
+        lex.Inc(); // skip 'P'
+        lex.Val(year);
+        lex.Inc();
+        lex.Val(month);
+        lex.Inc();
+        lex.Val(day);
+        lex.Inc(2);
+        lex.Val(hour);
+        lex.Inc();
+        lex.Val(minute);
+        lex.Inc();
+        lex.Val(second);
+        }
+    TTimeIntervalSeconds result( ( ( ( year * 365 + month * 30 + day ) * 24 + hour )
+                * 60 + minute ) * 60 + second );
+    return result;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_landmark.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,502 @@
+/*
+* 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 <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <lbsposition.h>
+
+#include "engine.h"
+#include "enginewrapper.h"
+#include "creator_landmark.h" 
+#include "creator_traces.h"
+
+_LIT(KAccommodation, "accommodation");
+_LIT(KBusiness, "business");
+_LIT(KCommunication, "communication");
+_LIT(KEducational, "educational");
+_LIT(KEntertainment, "entertainment");
+_LIT(KFoodAndBeverage, "food");
+_LIT(KGeographical, "geographical");
+_LIT(KOutdoor, "outdoor");
+_LIT(KPeople, "people");
+_LIT(KPublic, "public");
+_LIT(KReligious, "religious");
+_LIT(KShopping, "shopping");
+_LIT(KSightseeing, "sightseeing");
+_LIT(KSports, "sports");
+_LIT(KTransport, "transport");
+
+
+/**
+ * Class mapping the strings to global landmark categories
+ */
+class CategoryMapping
+{
+public:
+    CategoryMapping(TUint aId, const TDesC& aCategoryStr)
+    : 
+    iGlobalId(aId),
+    iStr(aCategoryStr)
+    {}
+
+    TPosLmGlobalCategory iGlobalId;
+    const TDesC& iStr;
+};
+
+/**
+ * Global landmark categories
+ */
+CategoryMapping LandmarkCategories[] =    {
+        CategoryMapping(3000, KAccommodation), // Accommodation
+        CategoryMapping(6000, KBusiness), // Business
+        CategoryMapping(9000, KCommunication), // Communication
+        CategoryMapping(12000, KEducational), // Educational institute
+        CategoryMapping(15000, KEntertainment), // Entertainment
+        CategoryMapping(18000, KFoodAndBeverage), // Food & Beverage
+        CategoryMapping(21000, KGeographical), // Geographical area
+        CategoryMapping(24000, KOutdoor), // Outdoor activities        
+        CategoryMapping(27000, KPeople), // People
+        CategoryMapping(30000, KPublic), // Public service
+        CategoryMapping(33000, KReligious), // Religious places
+        CategoryMapping(36000, KShopping), // Shopping
+        CategoryMapping(39000, KSightseeing), // Sightseeing
+        CategoryMapping(42000, KSports), // Sports
+        CategoryMapping(45000, KTransport)  // Transport
+};
+
+/**
+ * Return landmark global id
+ */ 
+TPosLmGlobalCategory CCreatorLandmarks::GetCategoryIdL(const TDesC& aCategoryStr)
+    {
+    TUint numOfCategories = sizeof(LandmarkCategories)/sizeof(CategoryMapping);
+    for( TUint i = 0; i < numOfCategories; ++i )
+        {
+        if( LandmarkCategories[i].iStr == aCategoryStr )
+            return LandmarkCategories[i].iGlobalId;
+        }
+    
+    return 0;
+    }
+
+/**
+ *
+ */ 
+CLandmarkParameters::CLandmarkParameters()
+    {
+    LOGSTRING("Creator: CLandmarkParameters::CLandmarkParameters");
+    }
+
+/**
+ *
+ */
+CLandmarkParameters::~CLandmarkParameters()
+    {
+    LOGSTRING("Creator: CLandmarkParameters::~CLandmarkParameters");
+    delete iName;    
+    delete iStreet;
+    delete iCity;    
+    delete iState;
+    delete iCountry;
+    delete iPostCode;    
+    delete iDescription;
+    delete iPhonenumber;
+    delete iUrl;
+    iCategories.Close();
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomNameL(CCreatorEngine& aEngine)
+    {    
+    TPtrC name(aEngine.RandomString(CCreatorEngine::ELandmarkName));
+    delete iName;
+    iName = 0;
+    iName = HBufC::NewL(name.Length());
+    iName->Des().Copy(name);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomUrlL(CCreatorEngine& aEngine)
+    {
+    _LIT(KUrlPrefix, "http://www.");
+    _LIT(KUrlPostfix, ".com");
+    TPtrC company(aEngine.RandomString(CCreatorEngine::ECompany));
+    delete iUrl;
+    iUrl = 0;
+    iUrl = HBufC::NewL(KUrlPrefix().Length()+company.Length()+KUrlPostfix().Length());
+    iUrl->Des() = KUrlPrefix;
+    iUrl->Des().Append( company );
+    iUrl->Des().Append( KUrlPostfix );
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::AddRandomCategoryL(CCreatorEngine& aEngine)
+    {
+    TUint numOfCategories = sizeof(LandmarkCategories)/sizeof(CategoryMapping);
+    iCategories.AppendL(LandmarkCategories[aEngine.RandomNumber(0, numOfCategories-1)].iGlobalId);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomStreetL(CCreatorEngine& aEngine)
+    {
+    TPtrC street(aEngine.RandomString(CCreatorEngine::EAddress));
+    delete iStreet;
+    iStreet = 0;
+    iStreet = HBufC::NewL(street.Length());
+    iStreet->Des().Copy(street);
+    }
+ 
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomCityL(CCreatorEngine& aEngine)
+    {
+    TPtrC city(aEngine.RandomString(CCreatorEngine::ECity));
+    delete iCity;
+    iCity = 0;
+    iCity = HBufC::NewL(city.Length());
+    iCity->Des().Copy(city);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomStateL(CCreatorEngine& aEngine)
+    {
+    TPtrC state(aEngine.RandomString(CCreatorEngine::EState));
+    delete iState;
+    iState = 0;
+    iState = HBufC::NewL(state.Length());
+    iState->Des().Copy(state);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomCountryL(CCreatorEngine& aEngine)
+    {
+    TPtrC country(aEngine.RandomString(CCreatorEngine::ECountry));
+    delete iCountry;
+    iCountry = 0;
+    iCountry = HBufC::NewL(country.Length());
+    iCountry->Des().Copy(country);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomPostCodeL(CCreatorEngine& aEngine)
+    {
+    TPtrC po(aEngine.RandomString(CCreatorEngine::EPostcode));
+    delete iPostCode;
+    iPostCode = 0;
+    iPostCode = HBufC::NewL(po.Length());
+    iPostCode->Des().Copy(po);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomLatitudeL(CCreatorEngine& aEngine)
+    {
+    iLatitude = aEngine.RandomNumber(-89, 89); // Degrees
+    TReal64 random = aEngine.RandomNumber(0, 9999); // Desimals 
+    iLatitude +=  random / 10000.0;
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomLongitudeL(CCreatorEngine& aEngine)
+    {
+    TInt minDegrees = -179;
+    TInt maxDegrees = 179;
+    TInt minDecimal = 0;
+    TInt maxDecimal = 9999;
+    TReal64 divider = 10000.0;
+    iLongitude = aEngine.RandomNumber(minDegrees, maxDegrees); // Degrees
+    TReal64 random = aEngine.RandomNumber(minDecimal, maxDecimal); 
+    iLongitude += random  / divider;
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomPositionAccuracyL(CCreatorEngine& aEngine)
+    {
+    this->iPositionAccuracy = aEngine.RandomNumber(0,5);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomAltitudeL(CCreatorEngine& aEngine)
+    {
+    this->iAltitude = aEngine.RandomNumber(0,120);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomAltitudeAccuracyL(CCreatorEngine& aEngine)
+    {
+    this->iAltitudeAccuracy = aEngine.RandomNumber(0,5);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomDescriptionL(CCreatorEngine& aEngine)
+    {
+    delete iDescription;
+    iDescription = 0;
+    TPtrC desc(aEngine.RandomString(CCreatorEngine::ELandmarkDescription));
+    iDescription = HBufC::NewL(desc.Length());
+    iDescription->Des().Copy(desc);
+    }
+
+/**
+ *
+ */
+void CLandmarkParameters::SetRandomPhoneNumberL(CCreatorEngine& aEngine)
+    {
+    delete iPhonenumber;
+    iPhonenumber = 0;
+    TPtrC phone(aEngine.RandomString(CCreatorEngine::EPhoneNumber));
+    iPhonenumber = HBufC::NewL(phone.Length());
+    iPhonenumber->Des().Copy(phone);
+    }
+
+/**
+ *
+ */
+CCreatorLandmarks::CCreatorLandmarks()
+    {
+    }
+
+/**
+ *
+ */
+CCreatorLandmarks* CCreatorLandmarks::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorLandmarks* self = CCreatorLandmarks::NewLC(aEngine);
+    CleanupStack::Pop(); // self
+    return self;
+    }
+
+/**
+ *
+ */
+CCreatorLandmarks* CCreatorLandmarks::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorLandmarks* self = new (ELeave) CCreatorLandmarks;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+/**
+ *
+ */
+void CCreatorLandmarks::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorLandmarks::ConstructL");
+    iEngine = aEngine;
+    iLandmarkDb = CPosLandmarkDatabase::OpenL();
+    if( iLandmarkDb->IsInitializingNeeded() )
+        {
+        ExecuteAndDeleteLD(iLandmarkDb->InitializeL());
+        }
+    }
+
+/**
+ *
+ */
+CCreatorLandmarks::~CCreatorLandmarks()
+    {
+    LOGSTRING("Creator: CCreatorLandmarks::~CCreatorLandmarks");
+    if ( iEngine && iEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidLandmarks ) );
+        }
+    iEntryIds.Reset();
+    iEntryIds.Close();
+    
+    delete iLandmarkDb;
+    delete iLmOperation;
+    delete iParameters;
+    }
+
+/**
+ *
+ */
+TBool CCreatorLandmarks::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorLandmarks::AskDataFromUserL");
+    
+    CCreatorModuleBase::AskDataFromUserL( aCommand );
+    
+    if ( aCommand == ECmdDeleteLandmarks )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Landmarks?"), this, ECreatorModuleDelete );
+        }
+    else if ( aCommand ==  ECmdDeleteCreatorLandmarks )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Landmarks created with Creator?"), this, ECreatorModuleDelete );
+        }
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog(&iEntriesToBeCreated, _L("How many landmarks to create?"), EFalse, this, ECreatorModuleStart );    
+    }
+
+/**
+ * Convert global category id to local category id
+ */
+TPosLmItemId CCreatorLandmarks::GetCategoryIdL( TPosLmGlobalCategory aGlobalCategoryID )
+{
+    CPosLmCategoryManager* categoryManager = CPosLmCategoryManager::NewL( *iLandmarkDb );
+    CleanupStack::PushL( categoryManager );
+
+    // Find ID of the given global category in given database
+    TPosLmItemId id = categoryManager->GetGlobalCategoryL( aGlobalCategoryID );
+    CleanupStack::PopAndDestroy(); // categoryManager
+    return id;
+}
+
+/**
+ *
+ */
+TInt CCreatorLandmarks::CreateLandmarkEntryL(CLandmarkParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorLandmarks::CreateLandmarkEntryL");
+    TInt err = KErrNone;
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+        
+    CLandmarkParameters* parameters = aParameters;
+        
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CLandmarkParameters;
+        parameters = iParameters;
+            
+        TBuf<160> company = iEngine->RandomString(CCreatorEngine::ECompany);
+
+        parameters->SetRandomNameL(*iEngine);
+        parameters->SetRandomUrlL(*iEngine);
+        parameters->AddRandomCategoryL(*iEngine);
+        parameters->SetRandomStreetL(*iEngine);
+        parameters->SetRandomCityL(*iEngine);
+        parameters->SetRandomStateL(*iEngine);
+        parameters->SetRandomCountryL(*iEngine);
+        parameters->SetRandomPostCodeL(*iEngine);
+        parameters->SetRandomLatitudeL(*iEngine);
+        parameters->SetRandomLongitudeL(*iEngine);
+        parameters->SetRandomPositionAccuracyL(*iEngine);
+        parameters->SetRandomAltitudeL(*iEngine);
+        parameters->SetRandomAltitudeAccuracyL(*iEngine);
+        parameters->SetRandomDescriptionL(*iEngine);
+        parameters->SetRandomPhoneNumberL(*iEngine);
+        }
+    
+    CPosLandmark* newLandmark = CPosLandmark::NewLC();        
+    TCoordinate crd(parameters->iLatitude, parameters->iLongitude, parameters->iAltitude);
+    TLocality loc(crd, parameters->iPositionAccuracy, parameters->iAltitudeAccuracy);
+    newLandmark->SetPositionL(loc);
+    
+    // Add categories
+    for( TInt i = 0; i < parameters->iCategories.Count(); ++i )
+        {
+        newLandmark->AddCategoryL(GetCategoryIdL(parameters->iCategories[i]));
+        }
+    if( parameters->iName )    
+        newLandmark->SetLandmarkNameL(parameters->iName->Des());    
+    if( parameters->iCountry )
+        newLandmark->SetPositionFieldL(EPositionFieldCountry, parameters->iCountry->Des());
+    if( parameters->iCity )
+        newLandmark->SetPositionFieldL(EPositionFieldCity, parameters->iCity->Des());
+    if( parameters->iPostCode )
+        newLandmark->SetPositionFieldL(EPositionFieldPostalCode, parameters->iPostCode->Des());
+    if( parameters->iState )
+        newLandmark->SetPositionFieldL(EPositionFieldState, parameters->iState->Des());
+    if( parameters->iStreet )
+        newLandmark->SetPositionFieldL(EPositionFieldStreet, parameters->iStreet->Des());
+    if( parameters->iPhonenumber )
+        newLandmark->SetPositionFieldL(EPositionFieldBuildingTelephone, parameters->iPhonenumber->Des());
+    if( parameters->iDescription )
+        newLandmark->SetLandmarkDescriptionL(parameters->iDescription->Des());    
+    if( parameters->iUrl )
+        newLandmark->SetPositionFieldL(EPositionFieldMediaLinksStart, parameters->iUrl->Des());
+    
+    TRAP(err, iLandmarkDb->AddLandmarkL(*newLandmark));
+    
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    iEntryIds.AppendL( newLandmark->LandmarkId() );
+
+    ExecuteAndDeleteLD(iLandmarkDb->CompactL());
+    
+    CleanupStack::PopAndDestroy(newLandmark);
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorLandmarks::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorLandmarks::DeleteAllL");
+    ExecuteAndDeleteLD( iLandmarkDb->RemoveAllLandmarksL() );
+    ExecuteAndDeleteLD( iLandmarkDb->CompactL() );
+
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Landmarks related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidLandmarks );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorLandmarks::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorLandmarks::DeleteAllCreatedByCreatorL");
+    iEntryIds.Reset();
+    
+    // fetch ids of entries created by Creator
+    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidLandmarks );
+    
+    // delete entries
+    TRAP_IGNORE(
+        ExecuteAndDeleteLD( iLandmarkDb->RemoveLandmarksL( iEntryIds ) );
+        ExecuteAndDeleteLD( iLandmarkDb->CompactL() );
+        );
+
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Landmarks related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidLandmarks );
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_landmarkelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,257 @@
+/*
+* 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 "creator_landmarkelement.h"
+#include "creator_traces.h"
+#include "creator_landmark.h"
+
+using namespace creatorlandmark;
+
+/*
+ * 
+ */
+CCreatorLandmarkElement* CCreatorLandmarkElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorLandmarkElement* self = new (ELeave) CCreatorLandmarkElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorLandmarkElement::CCreatorLandmarkElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
+
+void CCreatorLandmarkElement::ExecuteCommandL()
+    {
+    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
+    TInt lmAmount = 1;    
+    if( amountAttr )
+        {
+        lmAmount = ConvertStrToIntL(amountAttr->Value());
+        }
+    // Get 'fields' element 
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+        {
+        // Get sub-elements
+        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
+        // Create note entries, the amount of entries is defined by noteAmount:
+        for( TInt cI = 0; cI < lmAmount; ++cI )
+            {            
+            CLandmarkParameters* param = new (ELeave) CLandmarkParameters;
+            CleanupStack::PushL(param);
+            
+            for( TInt i = 0; i < fields.Count(); ++i )
+                {
+                CCreatorScriptElement* field = fields[i];
+                TPtrC elemName = field->Name();
+                TPtrC elemContent = field->Content();
+                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
+                TBool useRandom = EFalse;
+                if( randomAttr || elemContent.Length() == 0 )
+                    {
+                    useRandom = ETrue;
+                    }
+                
+                if( elemName == KName )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomNameL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iName, elemContent);
+                        }
+                    }
+                else if( elemName == KCategory )
+                    {
+                    if( useRandom )
+                        {
+                        param->AddRandomCategoryL(*iEngine);
+                        }                    
+                    else
+                        {
+                        TPosLmItemId categoryId = CCreatorLandmarks::GetCategoryIdL(elemContent);
+                        if( categoryId > 0 )
+                            {
+                            param->iCategories.AppendL(categoryId);
+                            }
+                        }
+                    }
+                else if( elemName == KDescription )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomDescriptionL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iDescription, elemContent);
+                        }
+                    }
+                else if( elemName == KStreet )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomStreetL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iStreet, elemContent);
+                        }
+                    }
+                else if( elemName == KPostalcode )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomPostCodeL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iPostCode, elemContent);
+                        }
+                    }
+                else if( elemName == KCity )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomCityL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iCity, elemContent);
+                        }
+                    }
+                else if( elemName == KState )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomStateL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iState, elemContent);
+                        }
+                    }
+                else if( elemName == KCountry )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomCountryL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iCountry, elemContent);
+                        }
+                    }
+                else if( elemName == KPhonenumber )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomPhoneNumberL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iPhonenumber, elemContent);
+                        }
+                    }
+                else if( elemName == KUrl )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomUrlL(*iEngine);
+                        }                    
+                    else
+                        {
+                        SetContentToTextParamL(param->iUrl, elemContent);
+                        }
+                    }
+                else if( elemName == KLatitude )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomLatitudeL(*iEngine);
+                        }                    
+                    else
+                        {
+                        ConvertStrToReal64L(elemContent, param->iLatitude);
+                        }
+                    }
+                else if( elemName == KLongitude )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomLongitudeL(*iEngine);
+                        }                    
+                    else
+                        {
+                        ConvertStrToReal64L(elemContent, param->iLongitude);
+                        }
+                    }
+                else if( elemName == KPositionaccuracy )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomPositionAccuracyL(*iEngine);
+                        }                    
+                    else
+                        {
+                        param->iPositionAccuracy = ConvertStrToIntL(elemContent);
+                        }
+                    }
+                else if( elemName == KAltitude )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomAltitudeL(*iEngine);
+                        }                    
+                    else
+                        {
+                        ConvertStrToReal32L(elemContent, param->iAltitude);
+                        }
+                    }
+                else if( elemName == KAltitudeaccuracy )
+                    {
+                    if( useRandom )
+                        {
+                        param->SetRandomAltitudeAccuracyL(*iEngine);
+                        }                    
+                    else
+                        {
+                        param->iAltitudeAccuracy = ConvertStrToIntL(elemContent);
+                        }
+                    }
+                }
+            iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryLandmarks, param);
+            CleanupStack::Pop(); // param
+            }
+        }
+    else
+    	{
+    	iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryLandmarks, 0, lmAmount);
+    	}
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_log.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,486 @@
+/*
+* 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 <cntdef.h>
+
+#include "engine.h"
+#include "enginewrapper.h"
+#include "creator_log.h" 
+#include "creator_traces.h"
+
+static const TInt KLogsFieldLength = 256;
+
+//_LIT(KCreatorLogsPrefixName, "CR_");
+
+//----------------------------------------------------------------------------
+
+CLogsParameters::CLogsParameters()
+    {
+    LOGSTRING("Creator: CLogsParameters::CLogsParameters");
+
+    iPhoneNumber = HBufC::New(KLogsFieldLength);
+    /*iMissedCallPhoneNumber = HBufC::New(KLogsFieldLength);
+    iReceivedCallPhoneNumber = HBufC::New(KLogsFieldLength);
+    iDialledNumberPhoneNumber = HBufC::New(KLogsFieldLength);*/
+    }
+
+CLogsParameters::~CLogsParameters()
+    {
+    LOGSTRING("Creator: CLogsParameters::~CLogsParameters");
+
+    delete iPhoneNumber;
+    /*delete iDialledNumberPhoneNumber;
+    delete iReceivedCallPhoneNumber;
+    delete iMissedCallPhoneNumber;*/
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorLogs* CCreatorLogs::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorLogs* self = CCreatorLogs::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorLogs* CCreatorLogs::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorLogs* self = new (ELeave) CCreatorLogs;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorLogs::CCreatorLogs() : CActive(0)
+    {
+    iEntriesToBeCreated = 1;
+    }
+
+void CCreatorLogs::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorLogs::ConstructL");
+
+    iEngine = aEngine;
+
+    iLogClient = CLogClient::NewL(CEikonEnv::Static()->FsSession());
+    iLogEvent = CLogEvent::NewL();
+
+	CActiveScheduler::Add(this); // needed by CActive
+    }
+
+CCreatorLogs::~CCreatorLogs()
+    {
+    LOGSTRING("Creator: CCreatorLogs::~CCreatorLogs");
+
+    Cancel(); //from CActive
+
+    if ( iEngine && iEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidLogs ) );
+        }
+    iEntryIds.Reset();
+    iEntryIds.Close();
+    
+    delete iLogEvent;
+    delete iLogClient;
+
+    if (iParameters)
+        delete iParameters;
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorLogs::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
+    {
+    LOGSTRING("Creator: CCreatorModuleBase::QueryDialogClosedL");
+    
+    if( aPositiveAction == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        return;
+        }
+    
+    const TDesC* showText = &KSavingText;
+    TBool finished(EFalse);
+    TBool retval(ETrue);
+    switch(aUserData)
+        {
+        case ECreatorLogsDelete:
+            showText = &KDeletingText;
+            iEntriesToBeCreated = 1;
+            finished = ETrue;
+            break;
+        case ECreatorLogsStart:
+            finished = ETrue;
+            break;
+        default:
+            //some error
+            retval = EFalse;
+            break;
+        }
+    if( retval == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        }
+    else if( finished )
+        {
+        // add this command to command array
+        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
+        // started exucuting commands
+        iEngine->ExecuteFirstCommandL( *showText );
+        }
+    }
+    
+//----------------------------------------------------------------------------
+
+TBool CCreatorLogs::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorLogs::AskDataFromUserL");
+    
+    iCommand = aCommand;
+    
+    if ( aCommand == ECmdDeleteLogs )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all log entries?"), this, ECreatorLogsDelete );
+        }
+    else if ( aCommand ==  ECmdDeleteCreatorLogs )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all log entries created with Creator?"), this, ECreatorLogsDelete );
+        }
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorLogsStart );
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorLogs::RunL()
+	{
+    LOGSTRING("Creator: CCreatorLogs::RunL");
+
+    // log writing finished, stop the async waiting
+    iLogWriteWait.AsyncStop();
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorLogs::DoCancel()
+	{
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorLogs::CreateMissedCallEntryL(CLogsParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorLogs::CreateMissedCallEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    CLogsParameters* parameters = aParameters;
+    
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CLogsParameters;
+        parameters = iParameters;
+
+        /*iParameters->iMissedCallPhoneNumber->Des().Zero();
+        iParameters->iMissedCallPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
+
+        iParameters->iMissedCallEventTime.UniversalTime();
+        iParameters->iMissedCallEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );*/
+        parameters->iPhoneNumber->Des().Zero();
+        parameters->iPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
+        
+        parameters->iEventTime.UniversalTime();
+        parameters->iEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
+
+        }
+    
+    // defaults
+    iLogEvent->SetId( KLogNullId );
+    iLogEvent->SetEventType( KNullUid );
+    iLogEvent->SetRemoteParty( KNullDesC );
+    iLogEvent->SetDirection( KNullDesC );
+    iLogEvent->SetTime( Time::NullTTime() );
+    iLogEvent->SetDurationType( KLogNullDurationType );
+    iLogEvent->SetDuration( KLogNullDuration );
+    iLogEvent->SetStatus( KNullDesC );
+    iLogEvent->SetSubject( KNullDesC );
+    iLogEvent->SetNumber( KNullDesC );
+    iLogEvent->SetContact( KNullContactId );
+    iLogEvent->SetLink( KLogNullLink );
+    iLogEvent->SetDescription( KNullDesC );
+    iLogEvent->SetFlags( KLogNullFlags );
+    iLogEvent->SetEventType(KLogCallEventTypeUid);
+    iLogEvent->SetSubject(_L("A"));
+
+    // set direction
+    TLogString missed;
+    iLogClient->GetString(missed, R_LOG_DIR_MISSED);
+    iLogEvent->SetDirection(missed);
+
+    // set duration
+    iLogEvent->SetDurationType( KLogDurationNone );
+    TLogDuration duration = 0;
+    iLogEvent->SetDuration(duration);
+
+    // set the phone number
+    //iLogEvent->SetNumber( iParameters->iMissedCallPhoneNumber->Des() );
+    iLogEvent->SetNumber( parameters->iPhoneNumber->Des() );
+
+    // set event time
+    //iLogEvent->SetTime( iParameters->iMissedCallEventTime );
+    iLogEvent->SetTime( parameters->iEventTime );
+
+    // start writing
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("LogWriter"), 150));
+	iLogClient->AddEvent(*iLogEvent, iStatus);
+	SetActive();
+
+    // wait till adding has finished
+    iLogWriteWait.Start();
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    TRAP_IGNORE( iEntryIds.AppendL( iLogEvent->Id() ) );
+
+    return iStatus.Int();  // should be KErrNone if writing was succesful
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorLogs::CreateReceivedCallEntryL(CLogsParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorLogs::CreateReceivedCallEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    CLogsParameters* parameters = aParameters;
+        
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CLogsParameters;
+        parameters = iParameters;
+
+        /*iParameters->iReceivedCallPhoneNumber->Des().Zero();
+        iParameters->iReceivedCallPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
+
+        iParameters->iReceivedCallEventTime.UniversalTime();
+        iParameters->iReceivedCallEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
+
+        iParameters->iReceivedCallDuration = iEngine->RandomNumber(7200);*/
+        parameters->iPhoneNumber->Des().Zero();
+        parameters->iPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
+        
+        parameters->iEventTime.UniversalTime();
+        parameters->iEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
+        
+        parameters->iDuration = iEngine->RandomNumber(7200);
+        }
+   
+    // defaults
+    iLogEvent->SetId( KLogNullId );
+    iLogEvent->SetEventType( KNullUid );
+    iLogEvent->SetRemoteParty( KNullDesC );
+    iLogEvent->SetDirection( KNullDesC );
+    iLogEvent->SetTime( Time::NullTTime() );
+    iLogEvent->SetDurationType( KLogNullDurationType );
+    iLogEvent->SetDuration( KLogNullDuration );
+    iLogEvent->SetStatus( KNullDesC );
+    iLogEvent->SetSubject( KNullDesC );
+    iLogEvent->SetNumber( KNullDesC );
+    iLogEvent->SetContact( KNullContactId );
+    iLogEvent->SetLink( KLogNullLink );
+    iLogEvent->SetDescription( KNullDesC );
+    iLogEvent->SetFlags( KLogNullFlags );
+    iLogEvent->SetEventType(KLogCallEventTypeUid);
+    iLogEvent->SetSubject(_L("A"));
+
+    // set direction
+    TLogString incoming;
+    iLogClient->GetString(incoming, R_LOG_DIR_IN);
+    iLogEvent->SetDirection(incoming);
+
+    // set duration
+    iLogEvent->SetDurationType( KLogDurationValid );
+    //iLogEvent->SetDuration( iParameters->iReceivedCallDuration );
+    iLogEvent->SetDuration( parameters->iDuration );
+
+    // set the phone number
+    //iLogEvent->SetNumber( iParameters->iReceivedCallPhoneNumber->Des() );
+    iLogEvent->SetNumber( parameters->iPhoneNumber->Des() );
+
+    // set event time
+    //iLogEvent->SetTime( iParameters->iReceivedCallEventTime );
+    iLogEvent->SetTime( parameters->iEventTime );
+
+    // start writing
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("LogWriter"), 151));
+	iLogClient->AddEvent(*iLogEvent, iStatus);
+	SetActive();
+
+    // wait till adding has finished
+    iLogWriteWait.Start();
+
+    // id has been generated, store it for being able to delete
+    // entries created only with Creator
+    TRAP_IGNORE( iEntryIds.AppendL( iLogEvent->Id() ) );
+
+    return iStatus.Int();  // should be KErrNone if writing was succesful
+    }
+
+//----------------------------------------------------------------------------
+
+
+TInt CCreatorLogs::CreateDialledNumberEntryL(CLogsParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorLogs::CreateDialledNumberEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    CLogsParameters* parameters = aParameters; 
+        
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CLogsParameters;
+        parameters = iParameters;
+
+        /*iParameters->iDialledNumberPhoneNumber->Des().Zero();
+        iParameters->iDialledNumberPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
+
+        iParameters->iDialledNumberEventTime.UniversalTime();
+        iParameters->iDialledNumberEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
+
+        iParameters->iDialledNumberDuration = iEngine->RandomNumber(7200);*/
+        parameters->iPhoneNumber->Des().Zero();
+        parameters->iPhoneNumber->Des().AppendNum( iEngine->RandomNumber(1000000, 9999999) );
+
+        parameters->iEventTime.UniversalTime();
+        parameters->iEventTime -= TTimeIntervalMinutes( iEngine->RandomNumber(12000) );
+
+        parameters->iDuration = iEngine->RandomNumber(7200);
+
+        }
+   
+    // defaults
+    iLogEvent->SetId( KLogNullId );
+    iLogEvent->SetEventType( KNullUid );
+    iLogEvent->SetRemoteParty( KNullDesC );
+    iLogEvent->SetDirection( KNullDesC );
+    iLogEvent->SetTime( Time::NullTTime() );
+    iLogEvent->SetDurationType( KLogNullDurationType );
+    iLogEvent->SetDuration( KLogNullDuration );
+    iLogEvent->SetStatus( KNullDesC );
+    iLogEvent->SetSubject( KNullDesC );
+    iLogEvent->SetNumber( KNullDesC );
+    iLogEvent->SetContact( KNullContactId );
+    iLogEvent->SetLink( KLogNullLink );
+    iLogEvent->SetDescription( KNullDesC );
+    iLogEvent->SetFlags( KLogNullFlags );
+    iLogEvent->SetEventType(KLogCallEventTypeUid);
+    iLogEvent->SetSubject(_L("A"));
+
+    // set direction
+    TLogString outgoing;
+    iLogClient->GetString(outgoing, R_LOG_DIR_OUT);
+    iLogEvent->SetDirection(outgoing);
+
+    // set duration
+    iLogEvent->SetDurationType( KLogDurationValid );
+    //iLogEvent->SetDuration( iParameters->iDialledNumberDuration );
+    iLogEvent->SetDuration( parameters->iDuration );
+
+    // set the phone number
+    //iLogEvent->SetNumber( iParameters->iDialledNumberPhoneNumber->Des() );
+    iLogEvent->SetNumber( parameters->iPhoneNumber->Des() );
+
+    // set event time
+    //iLogEvent->SetTime( iParameters->iDialledNumberEventTime );
+    iLogEvent->SetTime( parameters->iEventTime );
+
+    // start writing
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("LogWriter"), 152));
+	iLogClient->AddEvent(*iLogEvent, iStatus);
+	SetActive();
+
+    // wait till adding has finished
+    iLogWriteWait.Start();
+
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    TRAP_IGNORE( iEntryIds.AppendL( iLogEvent->Id() ) );
+    
+    return iStatus.Int();  // should be KErrNone if writing was succesful
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorLogs::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorLogs::DeleteAllL");
+    iLogClient->ClearLog( TTime( Time::MaxTTime() ), iStatus ); 
+    SetActive();
+    
+    // wait till delete has finished
+    iLogWriteWait.Start();
+    User::LeaveIfError( iStatus.Int() );
+
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Logs related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidLogs );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorLogs::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorLogs::DeleteAllCreatedByCreatorL");
+    iEntryIds.Reset();
+    
+    // fetch ids of entries created by Creator
+    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidLogs );
+    
+    // delete entries
+    for ( TInt i = 0; i < iEntryIds.Count(); i++ )
+        {
+        // This could be implemented with while loop
+        // with additional cancel flag. That would enable 
+        // using CancelOp() and cancelling would be bit smoother.
+        // With this for loop implementation all entries will be
+        // deleted whether or not user cancels during logs operation.
+
+        iLogClient->DeleteEvent( iEntryIds[i], iStatus );
+        SetActive();        
+        // wait till delete has finished
+        iLogWriteWait.Start();
+        }
+    
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Logs related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidLogs );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_logelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,171 @@
+/*
+* 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 "creator_logelement.h"
+#include "creator_traces.h"
+#include "creator_log.h"
+
+using namespace creatorlog;
+
+/*
+ * 
+ */
+CCreatorLogElement* CCreatorLogElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorLogElement* self = new (ELeave) CCreatorLogElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorLogElement::CCreatorLogElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
+/*
+ * 
+ */
+void CCreatorLogElement::ExecuteCommandL()
+    {
+    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
+    TInt logAmount = 1;    
+    if( amountAttr )
+        {
+        logAmount = ConvertStrToIntL(amountAttr->Value());
+        }
+    // Get 'fields' element 
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+        {
+        // Get sub-elements
+        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
+        // Create log entries, the amount of entries is defined by logAmount:
+        for( TInt cI = 0; cI < logAmount; ++cI )
+            {
+            TInt direction = -1;
+            CLogsParameters* param = new (ELeave) CLogsParameters;
+            CleanupStack::PushL(param);
+            
+            for( TInt i = 0; i < fields.Count(); ++i )
+                {
+                CCreatorScriptElement* field = fields[i];
+                TPtrC elemName = field->Name();
+                TPtrC elemContent = field->Content();
+                const CCreatorScriptAttribute* randomAttr = field->FindAttributeByName(KRandomLength);
+                const CCreatorScriptAttribute* increaseAttr = field->FindAttributeByName(KIncrease);
+                TBool increase( EFalse );
+                if ( increaseAttr )
+                    {
+                    increase = ConvertStrToBooleanL( increaseAttr->Value() );
+                    }
+                
+                if( elemName == KDirection )
+                    {
+                    direction = GetLogCommandL(elemContent, randomAttr || elemContent.Length() == 0); 
+                    }
+                else if( elemName == KDuration )
+                    {
+                    if( randomAttr || elemContent.Length() == 0 )
+                        {
+                        param->iDuration = iEngine->RandomNumber(7200);
+                        }
+                    else
+                        {
+                        param->iDuration = ConvertStrToIntL(elemContent);
+                        }
+                    }
+                else if( elemName == KPhonenumber )
+                    {
+                    if( randomAttr || elemContent.Length() == 0 )
+                        {
+                        SetContentToTextParamL(param->iPhoneNumber, iEngine->RandomString(CCreatorEngine::EPhoneNumber));
+                        }
+                    else
+                        {
+                        if ( increase )
+                            {
+                            delete param->iPhoneNumber;
+                            param->iPhoneNumber = NULL;
+                            param->iPhoneNumber = HBufC::NewL( elemContent.Length() + 3 );
+                            IncreasePhoneNumL( elemContent, cI, param->iPhoneNumber );
+                            }
+                        else
+                            {
+                            SetContentToTextParamL(param->iPhoneNumber, elemContent);
+                            }
+                        }                    
+                    }
+                else if( elemName == KDatetime )
+                    {
+                    if( randomAttr || elemContent.Length() == 0 )
+                        {
+                        param->iEventTime = iEngine->RandomTime(iEngine->RandomDate(CCreatorEngine::EDatePast), CCreatorEngine::EDatePast); 
+                        }
+                    else
+                        {
+                        param->iEventTime = ConvertToDateTimeL(elemContent);
+                        }
+                    }
+                }
+            
+            if( direction == -1 )
+                {
+                direction = GetLogCommandL(KEmpty, ETrue); 
+                }
+            iEngine->AppendToCommandArrayL(direction, param);
+            CleanupStack::Pop(); // param
+            }
+        }
+    else
+    	{
+    	for(TInt i = 0; i < logAmount; ++i )
+    		{
+    		iEngine->AppendToCommandArrayL(GetLogCommandL(KEmpty, ETrue), 0, 1);
+    		}
+    	}
+    }
+
+TInt CCreatorLogElement::GetLogCommandL( const TDesC& aLogCmdStr, TBool aRandom ) const
+    {      
+    if( aRandom )
+        {
+        TInt commandArray[] = {
+                    ECmdCreateLogEntryMissedCalls,
+                    ECmdCreateLogEntryReceivedCalls,
+                    ECmdCreateLogEntryDialledNumbers
+            };
+        return commandArray[iEngine->RandomNumber(0, 2)];
+        }
+    
+    if( CompareIgnoreCase(aLogCmdStr, KMissed) == 0 )
+        return ECmdCreateLogEntryMissedCalls;
+    else if( CompareIgnoreCase(aLogCmdStr, KIn) == 0 )
+        return ECmdCreateLogEntryReceivedCalls;
+    else if( CompareIgnoreCase(aLogCmdStr, KOut) == 0 )
+        return ECmdCreateLogEntryDialledNumbers;
+    
+    LOGSTRING2("CCreatorLogElement::GetLogCommandL: Unknown log direction: %S", &aLogCmdStr);
+    User::Leave(KErrNotFound);
+    return -1; // Not reached, but disables compiler warning...
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_mailbox.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,797 @@
+/*
+* 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 <etelmm.h>
+#include <msvapi.h>
+
+#include "engine.h"
+#include "enginewrapper.h"
+#include "creator_mailbox.h" 
+#include "creator_traces.h"
+
+static const TInt KMailboxesFieldLength = 160;
+
+_LIT(KCreatorMailboxesPrefixName, "CR_");
+
+_LIT(KDefaultIncomingServer, "mail.example.com");
+_LIT(KDefaultOutgoingServer, "smtp.example.com");
+_LIT(KInternet, "internet");
+
+
+//----------------------------------------------------------------------------
+
+CMailboxesParameters::CMailboxesParameters()
+    {
+    LOGSTRING("Creator: CMailboxesParameters::CMailboxesParameters");
+
+    iIncomingPort = KUndef;
+    iOutgoingPort = KUndef;
+    iMaxEmailSize = KUndef;
+    iSyncRate = KUndef;
+    iAttachmentFetchSize = KUndef;
+    iAttachmentSizeLimit = KUndef;
+    iBodyTextSizeLimit = KUndef;
+    iAttachmentFetchSize = KUndef;
+    iInboxSyncLimit = -1; // -1 = All
+    iMailboxSyncLimit = -1; // -1 = All    
+    iToCCIncludeLimit = KUndef;
+    iImapIdleTimeout = KUndef;
+    
+    /*iMailboxName = HBufC::New(KMailboxesFieldLength);
+    iAccessPoint = HBufC::New(KMailboxesFieldLength);
+    iMyMailAddress = HBufC::New(KMailboxesFieldLength);
+    iOutgoingMailServer = HBufC::New(KMailboxesFieldLength);
+    iUserName = HBufC::New(KMailboxesFieldLength);
+    iPassword = HBufC::New(KMailboxesFieldLength);
+    iIncomingMailServer = HBufC::New(KMailboxesFieldLength);*/
+    }
+
+CMailboxesParameters::~CMailboxesParameters()
+    {
+    LOGSTRING("Creator: CMailboxesParameters::~CMailboxesParameters");
+
+    /*delete iIncomingMailServer;
+    delete iPassword;
+    delete iUserName;
+    delete iOutgoingMailServer;
+    delete iMyMailAddress;
+    delete iAccessPoint;
+    delete iMailboxName;*/
+    
+    delete iMailboxName;
+    delete iIncomingLoginName;
+    delete iIncomingPassword;
+    delete iIncomingServerName;
+    delete iIncomingConnectionMethod;
+    delete iIncomingFolderPath;
+    delete iPathSeparator;
+    delete iOutgoingLoginName;
+    delete iOutgoingPassword;
+    delete iOutgoingServerName;
+    delete iOutgoingConnectionMethod;
+    delete iOwnEmailAddress;
+    delete iOwnEmailAlias;
+    delete iReceiptAddress;
+    delete iReplyToAddress;
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorMailboxes* CCreatorMailboxes::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorMailboxes* self = CCreatorMailboxes::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorMailboxes* CCreatorMailboxes::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorMailboxes* self = new (ELeave) CCreatorMailboxes;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorMailboxes::CCreatorMailboxes()
+    {    
+    }
+
+void CCreatorMailboxes::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::ConstructL");
+
+    iEngine = aEngine;
+    }
+
+CCreatorMailboxes::~CCreatorMailboxes()
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::~CCreatorMailboxes");
+    if ( iEngine && iEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidMailbox ) );
+        }
+    iEntryIds.Reset();
+    iEntryIds.Close();
+    
+    if (iParameters)
+        delete iParameters;
+    }
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorMailboxes::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::AskDataFromUserL");
+    
+    CCreatorModuleBase::AskDataFromUserL( aCommand );//ignore retval
+    
+    if ( aCommand == ECmdDeleteMailboxes )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all mailboxes?"), this, ECreatorModuleDelete );
+        }
+    else if ( aCommand ==  ECmdDeleteCreatorMailboxes )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all mailboxes created with Creator?"), this, ECreatorModuleDelete );
+        }
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorModuleStart );
+    }
+
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMailboxes::CreateMailboxEntryL(CMailboxesParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::CreateMailboxEntryL");
+
+      // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    CMailboxesParameters* parameters = aParameters;
+    
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CMailboxesParameters;
+        parameters = iParameters;
+
+        TPtrC company(iEngine->RandomString(CCreatorEngine::ECompany));
+        TPtrC firstName(iEngine->RandomString(CCreatorEngine::EFirstName));
+        
+        delete parameters->iMailboxName;
+        parameters->iMailboxName = 0;
+        parameters->iMailboxName = HBufC::NewL(KMailboxesFieldLength);
+        parameters->iMailboxName->Des() = KCreatorMailboxesPrefixName;
+        parameters->iMailboxName->Des().Append( company );
+        parameters->iMailboxName->Des().Append(_L(" #"));
+        parameters->iMailboxName->Des().AppendNum(iEngine->RandomNumber(1, 100));
+        
+        delete parameters->iIncomingLoginName;
+        parameters->iIncomingLoginName = 0;
+        parameters->iIncomingLoginName = HBufC::NewL(KMailboxesFieldLength); 
+        delete parameters->iOutgoingLoginName;
+        parameters->iOutgoingLoginName = 0;
+        parameters->iOutgoingLoginName = HBufC::NewL(KMailboxesFieldLength); 
+        parameters->iIncomingLoginName->Des() = iEngine->RandomString(CCreatorEngine::EFirstName);
+        parameters->iIncomingLoginName->Des().LowerCase();
+        parameters->iOutgoingLoginName->Des().Copy(parameters->iIncomingLoginName->Des());
+        
+        delete parameters->iIncomingPassword;
+        parameters->iIncomingPassword = 0;
+        parameters->iIncomingPassword = HBufC::NewL(KMailboxesFieldLength); 
+        delete parameters->iOutgoingPassword;
+        parameters->iOutgoingPassword = 0;
+        parameters->iOutgoingPassword = HBufC::NewL(KMailboxesFieldLength); 
+        parameters->iIncomingPassword->Des() = iEngine->RandomString(CCreatorEngine::ESurname);
+        parameters->iIncomingPassword->Des().LowerCase();
+        parameters->iOutgoingPassword->Des().Copy(parameters->iIncomingPassword->Des());
+        
+        delete parameters->iIncomingServerName;
+        parameters->iIncomingServerName = 0;
+        parameters->iIncomingServerName = HBufC::NewL(KMailboxesFieldLength); 
+        parameters->iIncomingServerName->Des() = _L("incoming.");
+        parameters->iIncomingServerName->Des().Append(company);
+        parameters->iIncomingServerName->Des().Append(_L(".com"));
+        parameters->iIncomingServerName->Des().LowerCase();
+                
+        delete parameters->iIncomingConnectionMethod;
+        parameters->iIncomingConnectionMethod = 0;
+        parameters->iIncomingConnectionMethod = HBufC::NewL(KInternet().Length());
+        parameters->iIncomingConnectionMethod->Des() = KInternet;  // use always this one, if it's not found, default will be used instead
+        
+        delete parameters->iOutgoingServerName;
+        parameters->iOutgoingServerName = 0;
+        parameters->iOutgoingServerName = HBufC::NewL(KMailboxesFieldLength); 
+        parameters->iOutgoingServerName->Des() = _L("smtp.");
+        parameters->iOutgoingServerName->Des().Append(company);
+        parameters->iOutgoingServerName->Des().Append(_L(".com"));
+        parameters->iOutgoingServerName->Des().LowerCase();
+        
+        delete parameters->iOutgoingConnectionMethod;
+        parameters->iOutgoingConnectionMethod = 0;
+        parameters->iOutgoingConnectionMethod = HBufC::NewL(KInternet().Length());
+        parameters->iOutgoingConnectionMethod->Des() = KInternet;  // use always this one, if it's not found, default will be used instead
+
+        delete parameters->iOwnEmailAddress;
+        parameters->iOwnEmailAddress = 0;
+        parameters->iOwnEmailAddress = iEngine->CreateEmailAddressLC();
+        parameters->iOwnEmailAddress->Des().LowerCase();
+        CleanupStack::Pop(); // parameters->iOwnEmailAddress
+        
+        delete parameters->iOwnEmailAlias;
+        parameters->iOwnEmailAlias = 0;
+        parameters->iOwnEmailAlias = HBufC::NewL(firstName.Length());        
+        parameters->iOwnEmailAlias->Des().Copy(firstName);       
+
+        delete parameters->iReceiptAddress;
+        parameters->iReceiptAddress = 0;
+        parameters->iReceiptAddress = iEngine->CreateEmailAddressLC();
+        parameters->iReceiptAddress->Des().LowerCase();
+        CleanupStack::Pop(); // parameters->iReceiptAddress
+        
+        delete parameters->iReplyToAddress;
+        parameters->iReplyToAddress = 0;
+        parameters->iReplyToAddress = iEngine->CreateEmailAddressLC();
+        parameters->iReplyToAddress->Des().LowerCase();
+        CleanupStack::Pop(); // parameters->iReplyToAddress
+        
+        parameters->iIncomingSSLWrapper = iEngine->RandomNumber(0, 1);
+        parameters->iIncomingSecureSockets = iEngine->RandomNumber(0, 1);        
+        parameters->iAcknowledgeReceipts = iEngine->RandomNumber(0, 1);
+        parameters->iAutoSendOnConnect = iEngine->RandomNumber(0, 1);
+        parameters->iDeleteEmailsAtDisconnect = iEngine->RandomNumber(0, 1);
+        parameters->iImapIdleCommand = iEngine->RandomNumber(0, 1);
+        parameters->iMarkSeenInSync = iEngine->RandomNumber(0, 1);
+        parameters->iEnableExpungeMode = iEngine->RandomNumber(0, 1);
+        parameters->iUseApop = iEngine->RandomNumber(0, 1);
+        parameters->iDisconnectedUserMode = iEngine->RandomNumber(0, 1);                
+        parameters->iOutgoingSSLWrapper = iEngine->RandomNumber(0, 1);
+        parameters->iOutgoingSecureSockets = iEngine->RandomNumber(0, 1);
+        parameters->iIncludeSignature = EFalse;
+        parameters->iAddVCard = EFalse;
+        parameters->iRequestReceipts = iEngine->RandomNumber(0, 1);
+        parameters->iSmtpAuth = iEngine->RandomNumber(0, 1);
+        
+        parameters->iIncomingPort = iEngine->RandomNumber(25, 500);
+        parameters->iAttachmentSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
+        parameters->iBodyTextSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
+        parameters->iAttachmentFetchSize = iEngine->RandomNumber(1, 40960);
+        parameters->iImapIdleTimeout = iEngine->RandomNumber(10, 2000);
+        parameters->iMaxEmailSize = iEngine->RandomNumber(1024, KMaxTInt);
+        parameters->iSyncRate = iEngine->RandomNumber(10, 500);        
+        parameters->iInboxSyncLimit = iEngine->RandomNumber(-1, 256);
+        parameters->iMailboxSyncLimit = iEngine->RandomNumber(-1, 256);
+        parameters->iOutgoingPort = KDefaultSmtpPort;
+        parameters->iToCCIncludeLimit = iEngine->RandomNumber(0, 30);                      
+        
+        parameters->iGetEmailOptions = (CMailboxesParameters::TGetEmailOption) iEngine->RandomNumber(CMailboxesParameters::EUndef, CMailboxesParameters::EGetEmailOptionLast-1);
+        parameters->iSubscribeType = (TFolderSubscribeType) iEngine->RandomNumber(EUpdateNeither, EUpdateBoth);
+        parameters->iSyncType = (TFolderSyncType) iEngine->RandomNumber(EUseCombination, EUseRemote);
+        parameters->iSendCopyToSelf = (TImSMTPSendCopyToSelf) iEngine->RandomNumber(ESendNoCopy, ESendCopyAsBccRecipient);
+        parameters->iSendOption = (TImSMTPSendMessageOption) iEngine->RandomNumber(ESendMessageImmediately, ESendMessageOnRequest);
+        parameters->iMailboxType = (TMailboxType) iEngine->RandomNumber(EMailboxPOP3, EMailboxIMAP4);
+        }
+   
+    TInt err = KErrNone;
+    
+    // make sure we have some IMEI stored
+    if (iIMEI.Length() == 0)
+        {
+        TRAP(err, GetIMEIFromThePhoneL());
+        }
+
+    // init 
+    CImImap4Settings* imap4Set = new(ELeave) CImImap4Settings;
+    CleanupStack::PushL(imap4Set);
+    CImPop3Settings* pop3Set = new(ELeave) CImPop3Settings;
+    CleanupStack::PushL(pop3Set);
+    CImSmtpSettings* smtpSet = new(ELeave) CImSmtpSettings;
+    CleanupStack::PushL(smtpSet);
+    CImIAPPreferences* outgoingIAPSet = CImIAPPreferences::NewLC();
+    CImIAPPreferences* incomingIAPSet = CImIAPPreferences::NewLC();
+    CEmailAccounts* account = CEmailAccounts::NewLC();
+  
+    // Get SMTP settings:
+    PopulateSmtpSettingsL(*account, *smtpSet, *outgoingIAPSet, *parameters);
+  
+    // appending mailbox type to array to be able to use
+    // correct type when deleting mailboxes
+    iEntryIds.AppendL( parameters->iMailboxType );
+    
+    if (parameters->iMailboxType == EMailboxIMAP4)
+        {
+        // Get IMAP settings:
+        PopulateImapSettingsL(*account, *imap4Set, *incomingIAPSet, *parameters);
+        TImapAccount imapAccountId = account->CreateImapAccountL(parameters->iMailboxName->Des(), *imap4Set, *incomingIAPSet, EFalse);
+        TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(imapAccountId, *smtpSet, *outgoingIAPSet, EFalse);
+        account->SetDefaultSmtpAccountL(smtpAccountId);
+
+        iEntryIds.AppendL( imapAccountId.iImapAccountId );
+        iEntryIds.AppendL( imapAccountId.iImapService );
+        iEntryIds.AppendL( imapAccountId.iSmtpService );      
+        iEntryIds.AppendL( smtpAccountId.iSmtpAccountId );
+        iEntryIds.AppendL( smtpAccountId.iSmtpService );
+        iEntryIds.AppendL( smtpAccountId.iRelatedService );
+        
+        StoreIMEIToEntryL( imapAccountId.iImapService );
+        StoreIMEIToEntryL( smtpAccountId.iSmtpService );
+        }
+    else
+        {
+        // Get POP settings:
+        PopulatePopSettingsL(*account, *pop3Set, *incomingIAPSet, *parameters);
+        TPopAccount popAccountId = account->CreatePopAccountL(parameters->iMailboxName->Des(), *pop3Set, *incomingIAPSet, EFalse);
+        TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(popAccountId, *smtpSet, *outgoingIAPSet, EFalse);     
+        account->SetDefaultSmtpAccountL(smtpAccountId);
+        
+        iEntryIds.AppendL( popAccountId.iPopAccountId );
+        iEntryIds.AppendL( popAccountId.iPopService );
+        iEntryIds.AppendL( popAccountId.iSmtpService );
+        iEntryIds.AppendL( smtpAccountId.iSmtpAccountId );
+        iEntryIds.AppendL( smtpAccountId.iSmtpService );
+        iEntryIds.AppendL( smtpAccountId.iRelatedService );
+
+        StoreIMEIToEntryL( popAccountId.iPopService );
+        StoreIMEIToEntryL( smtpAccountId.iSmtpService );
+        }  
+    CleanupStack::PopAndDestroy(6); //imap4Set, pop3Set, smtpSet, outgoingIAPSet, incomingIAPSet, account 
+        
+    return err;
+    }
+
+void CCreatorMailboxes::PopulateImapSettingsL( 
+            CEmailAccounts& aEmailAccount, 
+            CImImap4Settings& aImapSettings, 
+            CImIAPPreferences& aIApSettings, 
+            const CMailboxesParameters& aParameters )
+    {
+    // Get default settings first:
+    aEmailAccount.PopulateDefaultImapSettingsL(aImapSettings, aIApSettings);
+    
+    TImIAPChoice iapChoice;
+    iapChoice.iIAP = 0;
+    if( aParameters.iIncomingConnectionMethod == 0 || 
+        aParameters.iIncomingConnectionMethod->Des().Length() == 0 )
+        {
+        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( KInternet ));
+        }
+    else
+        {
+        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( aParameters.iIncomingConnectionMethod->Des()));
+        }
+    iapChoice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
+    aIApSettings.AddIAPL(iapChoice);
+    
+    TBuf8<256> buf8;
+    if( aParameters.iIncomingLoginName && aParameters.iIncomingLoginName->Length() > 0 )                
+        buf8.Copy(aParameters.iIncomingLoginName->Des());
+    else
+        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
+    aImapSettings.SetLoginNameL(buf8);  //8
+    
+    if( aParameters.iIncomingPassword && aParameters.iIncomingPassword->Length() > 0 )
+        buf8.Copy(aParameters.iIncomingPassword->Des());    
+    else
+        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
+    aImapSettings.SetPasswordL(buf8);  //8
+    
+    if( aParameters.iIncomingFolderPath && aParameters.iIncomingFolderPath->Length() > 0 )
+        {
+        buf8.Copy(aParameters.iIncomingFolderPath->Des());
+        aImapSettings.SetFolderPathL(buf8);
+        }
+    
+    if( aParameters.iPathSeparator && aParameters.iPathSeparator->Length() > 0 )
+        aImapSettings.SetPathSeparator(aParameters.iIncomingFolderPath->Des()[0]);
+    
+    aImapSettings.SetDisconnectedUserMode(aParameters.iDisconnectedUserMode);
+    aImapSettings.SetSynchronise(aParameters.iSyncType);
+    aImapSettings.SetSubscribe(aParameters.iSubscribeType);
+    aImapSettings.SetAutoSendOnConnect(aParameters.iAutoSendOnConnect);
+    
+    if(aParameters.iMaxEmailSize != KUndef )
+        aImapSettings.SetMaxEmailSize(aParameters.iMaxEmailSize);
+    
+    aImapSettings.SetDeleteEmailsWhenDisconnecting(aParameters.iDeleteEmailsAtDisconnect);
+    aImapSettings.SetAcknowledgeReceipts(aParameters.iAcknowledgeReceipts);
+            
+    if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetBodyText )
+        aImapSettings.SetGetMailOptions(EGetImap4EmailBodyText);
+    else if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetBodyTextAndAttachments )
+        aImapSettings.SetGetMailOptions(EGetImap4EmailBodyTextAndAttachments);
+    else if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetAttachments )
+        aImapSettings.SetGetMailOptions(EGetImap4EmailAttachments);
+    else if(aParameters.iGetEmailOptions == CMailboxesParameters::EGetBodyAlternativeText )
+        aImapSettings.SetGetMailOptions(EGetImap4EmailBodyAlternativeText);
+    else
+        aImapSettings.SetGetMailOptions(EGetImap4EmailHeaders); // Default
+    
+    if( aParameters.iInboxSyncLimit != KUndef )
+        aImapSettings.SetInboxSynchronisationLimit(aParameters.iInboxSyncLimit);
+    
+    if( aParameters.iMailboxSyncLimit != KUndef )
+        aImapSettings.SetMailboxSynchronisationLimit(aParameters.iMailboxSyncLimit);
+    
+    aImapSettings.SetUpdatingSeenFlags(aParameters.iMarkSeenInSync);
+    
+    if( aParameters.iSyncRate != KUndef )
+        aImapSettings.SetSyncRateL(aParameters.iSyncRate);
+    
+    if( aParameters.iAttachmentFetchSize != KUndef )
+        aImapSettings.SetFetchSizeL(aParameters.iAttachmentFetchSize);
+    
+    aImapSettings.SetImapIdle(aParameters.iImapIdleCommand);
+    if( aParameters.iImapIdleTimeout != KUndef )
+        aImapSettings.SetImapIdleTimeoutL(aParameters.iImapIdleTimeout);
+    
+    if( aParameters.iBodyTextSizeLimit != KUndef )
+        aImapSettings.SetBodyTextSizeLimitL(aParameters.iBodyTextSizeLimit);
+    
+    if( aParameters.iAttachmentSizeLimit != KUndef )
+        aImapSettings.SetAttachmentSizeLimitL(aParameters.iAttachmentSizeLimit);
+    
+#if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
+    aImapSettings.SetUseExpunge(aParameters.iEnableExpungeMode);
+#endif
+    
+    if(aParameters.iIncomingServerName && aParameters.iIncomingServerName->Length() > 0 )
+        aImapSettings.SetServerAddressL(aParameters.iIncomingServerName->Des());
+    else
+        aImapSettings.SetServerAddressL(KDefaultIncomingServer);
+        
+    if( aParameters.iIncomingPort != KUndef )
+        aImapSettings.SetPort(aParameters.iIncomingPort);                 
+      
+    aImapSettings.SetSecureSockets(aParameters.iIncomingSecureSockets);
+    aImapSettings.SetSSLWrapper(aParameters.iIncomingSSLWrapper);
+    }
+
+void CCreatorMailboxes::PopulatePopSettingsL( 
+            CEmailAccounts& aEmailAccount, 
+            CImPop3Settings& aPopSettings, 
+            CImIAPPreferences& aIApSettings, 
+            const CMailboxesParameters& aParameters )
+    {
+    aEmailAccount.PopulateDefaultPopSettingsL(aPopSettings, aIApSettings);
+    
+    TImIAPChoice iapChoice;
+    iapChoice.iIAP = 0;
+    if( aParameters.iIncomingConnectionMethod == 0 || 
+        aParameters.iIncomingConnectionMethod->Des().Length() == 0 )
+        {
+        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( KInternet ));
+        }
+    else
+        {
+        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( aParameters.iIncomingConnectionMethod->Des() ));
+        }
+    iapChoice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
+    aIApSettings.AddIAPL(iapChoice);
+    
+    TBuf8<256> buf8;
+    if( aParameters.iIncomingLoginName && aParameters.iIncomingLoginName->Length() > 0 )                
+        buf8.Copy(aParameters.iIncomingLoginName->Des());
+    else
+        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
+    aPopSettings.SetLoginNameL(buf8);  //8
+        
+    if( aParameters.iIncomingPassword && aParameters.iIncomingPassword->Length() > 0 )
+        buf8.Copy(aParameters.iIncomingPassword->Des());    
+    else
+        buf8.Copy(iEngine->RandomString(CCreatorEngine::EFirstName));
+    aPopSettings.SetPasswordL(buf8);  //8
+    
+    aPopSettings.SetAutoSendOnConnect( aParameters.iAutoSendOnConnect );
+    aPopSettings.SetApop( aParameters.iUseApop );
+    aPopSettings.SetDisconnectedUserMode( aParameters.iDisconnectedUserMode );
+    aPopSettings.SetDeleteEmailsWhenDisconnecting( aParameters.iDeleteEmailsAtDisconnect );
+    aPopSettings.SetAcknowledgeReceipts( aParameters.iAcknowledgeReceipts );
+    
+    if( aParameters.iMaxEmailSize != KUndef )
+        aPopSettings.SetMaxEmailSize(aParameters.iMaxEmailSize);
+    
+    if(aParameters.iGetEmailOptions != CMailboxesParameters::EGetHeaders && 
+            aParameters.iGetEmailOptions != CMailboxesParameters::EUndef )
+        {
+        aPopSettings.SetGetMailOptions(EGetPop3EmailMessages);
+        aPopSettings.SetPopulationLimitL( -1 ); // -1 = body and attachment
+        }
+    else
+        {
+        aPopSettings.SetGetMailOptions(EGetPop3EmailHeaders); // Default
+        aPopSettings.SetPopulationLimitL( -2 ); // -2 = headers only
+        }
+    
+    if( aParameters.iInboxSyncLimit != KUndef )
+        {
+        aPopSettings.SetInboxSynchronisationLimit(aParameters.iInboxSyncLimit);
+        }
+    
+    if(aParameters.iIncomingServerName && aParameters.iIncomingServerName->Length() > 0 )
+        aPopSettings.SetServerAddressL(aParameters.iIncomingServerName->Des());
+    else
+        aPopSettings.SetServerAddressL(KDefaultIncomingServer);
+            
+    if( aParameters.iIncomingPort != KUndef )
+        aPopSettings.SetPort(aParameters.iIncomingPort);                 
+          
+    aPopSettings.SetSecureSockets(aParameters.iIncomingSecureSockets);
+    aPopSettings.SetSSLWrapper(aParameters.iIncomingSSLWrapper);    
+    }
+
+void CCreatorMailboxes::PopulateSmtpSettingsL( 
+        CEmailAccounts& aEmailAccount, 
+        CImSmtpSettings& aSmtpSettings, 
+        CImIAPPreferences& aIApSettings, 
+        const CMailboxesParameters& aParameters )
+    {    
+    // Get default settings first: 
+    aEmailAccount.PopulateDefaultSmtpSettingsL(aSmtpSettings, aIApSettings);
+    TImIAPChoice iapChoice;
+    iapChoice.iIAP = 0;
+    if( aParameters.iOutgoingConnectionMethod == 0 || 
+        aParameters.iOutgoingConnectionMethod->Des().Length() == 0 )
+        {
+        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( KInternet ));
+        }
+    else
+        {
+        TRAP_IGNORE( iapChoice.iIAP = iEngine->AccessPointNameToIdL( aParameters.iOutgoingConnectionMethod->Des() ));
+        }
+    iapChoice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
+    aIApSettings.AddIAPL(iapChoice);
+    
+    // set SMTP preferences
+    if( aParameters.iOwnEmailAlias && aParameters.iOwnEmailAlias->Length() > 0 )
+        aSmtpSettings.SetEmailAliasL(aParameters.iOwnEmailAlias->Des());
+    
+    if( aParameters.iOwnEmailAddress && aParameters.iOwnEmailAddress->Length() > 0 )    
+        aSmtpSettings.SetEmailAddressL(aParameters.iOwnEmailAddress->Des());
+    
+    if( aParameters.iReplyToAddress && aParameters.iReplyToAddress->Length() > 0 )
+        aSmtpSettings.SetReplyToAddressL(aParameters.iReplyToAddress->Des());
+    
+    if( aParameters.iReceiptAddress && aParameters.iReceiptAddress->Length() > 0 )
+        aSmtpSettings.SetReceiptAddressL(aParameters.iReceiptAddress->Des());    
+    
+    aSmtpSettings.SetBodyEncoding(EMsgOutboxMIME);
+    aSmtpSettings.SetAddVCardToEmail(aParameters.iAddVCard);
+    aSmtpSettings.SetAddSignatureToEmail(aParameters.iIncludeSignature);
+    aSmtpSettings.SetRequestReceipts(aParameters.iRequestReceipts);
+    aSmtpSettings.SetSendCopyToSelf(aParameters.iSendCopyToSelf);    
+    aSmtpSettings.SetSendMessageOption(aParameters.iSendOption);        
+            
+    TBuf8<256> buf8;
+    if( aParameters.iOutgoingLoginName && aParameters.iOutgoingLoginName->Length() > 0 )
+        {
+        buf8.Copy(aParameters.iOutgoingLoginName->Des());
+        aSmtpSettings.SetLoginNameL(buf8);  //8
+        }
+    
+    if( aParameters.iOutgoingPassword && aParameters.iOutgoingPassword->Length() > 0)
+        {
+        buf8.Copy(aParameters.iOutgoingPassword->Des());
+        aSmtpSettings.SetPasswordL(buf8);  //8
+        }
+    
+    aSmtpSettings.SetSMTPAuth(aParameters.iSmtpAuth);
+    if( aParameters.iToCCIncludeLimit != KUndef )
+         aSmtpSettings.SetToCcIncludeLimitL(aParameters.iToCCIncludeLimit);
+    
+    if( aParameters.iOutgoingServerName && aParameters.iOutgoingServerName->Length() > 0 )
+        aSmtpSettings.SetServerAddressL(aParameters.iOutgoingServerName->Des());
+    else
+        aSmtpSettings.SetServerAddressL(KDefaultOutgoingServer);
+    
+    if( aParameters.iOutgoingPort != KUndef )
+        aSmtpSettings.SetPort(aParameters.iOutgoingPort);
+                
+    aSmtpSettings.SetSecureSockets(aParameters.iOutgoingSecureSockets);
+    aSmtpSettings.SetSSLWrapper(aParameters.iOutgoingSSLWrapper);
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorMailboxes::StoreIMEIToEntryL(const TMsvId aMailboxId)
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::StoreIMEIToEntryL");
+
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    
+    CMsvEntry* centry = session->GetEntryL(aMailboxId);
+    CleanupStack::PushL(centry);
+
+    TMsvEntry tentry = centry->Entry();
+    tentry.iDescription.Set(iIMEI);
+    centry->ChangeL(tentry);
+
+    CleanupStack::PopAndDestroy(2); // centry, session
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorMailboxes::GetIMEIFromThePhoneL()
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::GetIMEIFromThePhoneL");
+
+#ifndef __WINS__
+
+    RTelServer telServer;
+    User::LeaveIfError( telServer.Connect() );
+    CleanupClosePushL(telServer);
+
+    TInt numPhones = 0;
+    User::LeaveIfError( telServer.EnumeratePhones( numPhones ) );
+    if ( numPhones < 1 )
+        {
+        User::Leave( KErrNotFound );
+        }
+    RTelServer::TPhoneInfo info;
+    User::LeaveIfError( telServer.GetPhoneInfo( 0, info ) );
+    RMobilePhone mobilePhone;
+    User::LeaveIfError( mobilePhone.Open( telServer, info.iName ) );
+    CleanupClosePushL( mobilePhone );
+
+    //mobilePhone.Initialise();
+    TUint32 identityCaps;
+    User::LeaveIfError( mobilePhone.GetIdentityCaps( identityCaps ) );
+
+    if ( identityCaps & RMobilePhone::KCapsGetSerialNumber )
+        {
+        TRequestStatus status;
+        RMobilePhone::TMobilePhoneIdentityV1 mobilePhoneIdentity;
+
+        mobilePhone.GetPhoneId( status, mobilePhoneIdentity );
+
+        User::WaitForRequest( status );
+        User::LeaveIfError( status.Int() );
+
+        iIMEI.Copy( mobilePhoneIdentity.iSerialNumber );
+        }
+    else
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    CleanupStack::PopAndDestroy( &mobilePhone );
+    CleanupStack::PopAndDestroy( &telServer );
+
+#else
+
+    // use fixed IMEI for emulator
+    _LIT( KIMAEmulatorImei, "123456789012345" );
+    iIMEI.Copy( KIMAEmulatorImei );
+
+#endif // __WINS__
+
+    }
+    
+//----------------------------------------------------------------------------
+
+void CCreatorMailboxes::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
+    {
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMailboxes::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::DeleteAllL");
+    
+    CEmailAccounts* accountMgr = CEmailAccounts::NewLC();
+    
+    // Delete pop accounts
+    RArray<TPopAccount> popAccountsToDelete;
+    CleanupClosePushL( popAccountsToDelete );
+    accountMgr->GetPopAccountsL( popAccountsToDelete );
+    for ( TInt i = 0; i < popAccountsToDelete.Count(); i++ )
+        {
+        accountMgr->DeletePopAccountL( popAccountsToDelete[i] );
+        }
+    CleanupStack::PopAndDestroy( &popAccountsToDelete );
+    
+    // Delete imap accounts
+    RArray<TImapAccount> imapAccountsToDelete;
+    CleanupClosePushL( imapAccountsToDelete );
+    accountMgr->GetImapAccountsL( imapAccountsToDelete );
+    for ( TInt i = 0; i < imapAccountsToDelete.Count(); i++ )
+        {
+        accountMgr->DeleteImapAccountL( imapAccountsToDelete[i] );
+        }
+    CleanupStack::PopAndDestroy( &imapAccountsToDelete );
+    
+    // Delete smtp accounts
+    RArray<TSmtpAccount> smtpAccountsToDelete;
+    CleanupClosePushL( smtpAccountsToDelete );
+    accountMgr->GetSmtpAccountsL( smtpAccountsToDelete );
+    for ( TInt i = 0; i < smtpAccountsToDelete.Count(); i++ )
+        {
+        accountMgr->DeleteSmtpAccountL( smtpAccountsToDelete[i] );
+        }
+    CleanupStack::PopAndDestroy( &smtpAccountsToDelete );
+
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Mailbox related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidMailbox );
+    
+    CleanupStack::PopAndDestroy( accountMgr ); 
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMailboxes::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorMailboxes::DeleteAllCreatedByCreatorL");
+    
+    iEntryIds.Reset();
+    CEmailAccounts* accountMgr = CEmailAccounts::NewLC();
+    
+    // fetch ids of entries created by Creator
+    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidMailbox );
+    
+    TInt i(0);
+    while ( i < iEntryIds.Count() && iEntryIds.Count() > 6 ) 
+        {
+        // there should be at least 7 items in the array:
+        // one for mailbox type
+        // 3 for imap OR pop ids
+        // 3 for smtp ids
+
+        // delete entries
+        
+        TInt type = iEntryIds[i++]; // TMailboxType
+        if ( type == EMailboxPOP3 )
+            {
+            TPopAccount popAccount;
+            popAccount.iPopAccountId = iEntryIds[i++];
+            popAccount.iPopService = iEntryIds[i++];            
+            popAccount.iSmtpService = iEntryIds[i++];
+            TRAP_IGNORE( accountMgr->DeletePopAccountL( popAccount ) );            
+            }
+        else if ( type == EMailboxIMAP4 )
+            {
+            TImapAccount imapAccount;
+            imapAccount.iImapAccountId = iEntryIds[i++];
+            imapAccount.iImapService = iEntryIds[i++];
+            imapAccount.iImapService = iEntryIds[i++];
+            TRAP_IGNORE( accountMgr->DeleteImapAccountL( imapAccount ) );
+            }
+        else 
+            {
+            // ignore unknown mailbox types
+            i +=3;
+            }
+        
+        // There should be one smtp service for each pop and imap service
+        TSmtpAccount smtpAccount;
+        smtpAccount.iSmtpAccountId = iEntryIds[i++];
+        smtpAccount.iSmtpService = iEntryIds[i++];
+        smtpAccount.iRelatedService = iEntryIds[i++];
+        TRAP_IGNORE( accountMgr->DeleteSmtpAccountL( smtpAccount ) );
+        }
+
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the mailbox related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidMailbox );
+
+    CleanupStack::PopAndDestroy( accountMgr ); 
+    }
+//----------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_mailboxelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,496 @@
+/*
+* 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 "creator_mailboxelement.h"
+#include "creator_traces.h"
+#include "creator_mailbox.h"
+
+using namespace creatormailbox;
+
+/*
+ * 
+ */
+CCreatorMailboxElement* CCreatorMailboxElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorMailboxElement* self = new (ELeave) CCreatorMailboxElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorMailboxElement::CCreatorMailboxElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
+
+TBool CCreatorMailboxElement::SetIntegerParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
+    {    
+    _LIT( KAll, "all");
+    
+    if( aElemName == Kincomingport )
+        {
+        if( aSetRandom )
+            param->iIncomingPort = iEngine->RandomNumber(25, 500);
+        else        
+            param->iIncomingPort = ConvertStrToIntL(aElemContent);
+        }
+    else if( aElemName == Kattachmentsizelimit )
+        {
+        if( aSetRandom )
+            param->iAttachmentSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
+        else
+            param->iAttachmentSizeLimit = ConvertStrToIntL(aElemContent);
+        }        
+    else if( aElemName == Kbodytextsizelimit )
+        {
+        if( aSetRandom )
+            param->iBodyTextSizeLimit = iEngine->RandomNumber(1, KMaxTInt);
+        else
+            param->iBodyTextSizeLimit = ConvertStrToIntL(aElemContent);
+        }     
+    else if( aElemName == Kattachmentfetchsize )
+        {
+        if( aSetRandom )
+            param->iAttachmentFetchSize = iEngine->RandomNumber(1, 40960);
+        else            
+            param->iAttachmentFetchSize = ConvertStrToIntL(aElemContent);
+        }
+    else if( aElemName == Kimapidletimeout )
+        {
+        if( aSetRandom )
+            param->iImapIdleTimeout = iEngine->RandomNumber(10, 2000);
+        else
+            param->iImapIdleTimeout = ConvertStrToIntL(aElemContent);
+        }
+    else if( aElemName == Kmaxemailsize )
+        {
+        if( aSetRandom )
+            param->iMaxEmailSize =  iEngine->RandomNumber(1024, KMaxTInt);
+        else
+            param->iMaxEmailSize = ConvertStrToIntL(aElemContent);
+        }
+    else if( aElemName == Ksyncrate )
+        {
+        if( aSetRandom )
+            param->iSyncRate = iEngine->RandomNumber(10, 500);
+        else
+            param->iSyncRate = ConvertStrToIntL(aElemContent);
+        }
+    else if( aElemName == Kinboxsynclimit )
+        {
+        if( aSetRandom )
+            param->iInboxSyncLimit = iEngine->RandomNumber(-1, 256);
+        else if( CompareIgnoreCase(aElemContent, KAll) == 0 )
+            param->iInboxSyncLimit = -1;
+        else
+            param->iInboxSyncLimit = ConvertStrToIntL(aElemContent);
+        }
+    else if( aElemName == Kmailboxsynclimit )
+        {
+        if( aSetRandom )
+            param->iMailboxSyncLimit = iEngine->RandomNumber(-1, 256);
+        else if( CompareIgnoreCase(aElemContent, KAll) == 0 )
+            param->iMailboxSyncLimit = -1;
+        else
+            param->iMailboxSyncLimit = ConvertStrToIntL(aElemContent);
+        }        
+    else if( aElemName == Koutgoingport )
+        {
+        if( aSetRandom )
+            param->iOutgoingPort = KDefaultSmtpPort;
+        else
+            param->iOutgoingPort = ConvertStrToIntL(aElemContent);
+        }
+    else if( aElemName == Ktoccincludelimit )
+        {
+        if( aSetRandom )
+            param->iToCCIncludeLimit = iEngine->RandomNumber(0, 30);
+        else
+            param->iToCCIncludeLimit = ConvertStrToIntL(aElemContent);
+        }
+    else
+        return EFalse;
+    
+    return ETrue;
+    }
+
+TBool CCreatorMailboxElement::GetBooleanValueL(const TDesC& aElemContent, TBool aSetRandom)
+    {
+    if( aSetRandom )
+        return iEngine->RandomNumber(0,1) == 1;
+    
+    return ConvertStrToBooleanL(aElemContent);
+    }
+
+TBool CCreatorMailboxElement::SetBooleanParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
+    {  
+    TBool val = GetBooleanValueL(aElemContent, aSetRandom);
+    if( aElemName == Kincomingsslwrapper )
+        param->iIncomingSSLWrapper = val;
+    else if( aElemName == Kincomingsecuresockets )
+        param->iIncomingSecureSockets = val;
+    else if( aElemName == Kacknowledgereceipts )
+        param->iAcknowledgeReceipts = val;
+    else if( aElemName == Kautosendonconnect )
+        param->iAutoSendOnConnect = val;
+    else if( aElemName == Kdeletemailsatdisconnect )
+        param->iDeleteEmailsAtDisconnect = val;
+    else if( aElemName == Kimapidlecommand )
+        param->iImapIdleCommand = val;
+    else if( aElemName == Kmarkseeninsync )
+        param->iMarkSeenInSync = val;
+    else if( aElemName == Kenableexpungemode )
+        param->iEnableExpungeMode = val;
+    else if( aElemName == Kuseapopsecurelogin )
+        param->iUseApop = val;
+    else if( aElemName == Kdisconnectedusermode )
+        param->iDisconnectedUserMode = val;
+    else if( aElemName == Koutgoingsslwrapper )
+        param->iOutgoingSSLWrapper = val;
+    else if( aElemName == Koutgoingsecuresockets )
+        param->iOutgoingSecureSockets = val;
+    else if( aElemName == Kincludesignature )
+        param->iIncludeSignature = val;
+    else if( aElemName == Kaddvcard )
+        param->iAddVCard = val;
+    else if( aElemName == Krequestreceipts )
+        param->iRequestReceipts = val;
+    else if( aElemName == Ksmtpauth )
+        param->iSmtpAuth = val;
+    else
+        return EFalse;
+
+    return ETrue;
+    }
+
+TBool CCreatorMailboxElement::SetTextParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
+    {   
+    _LIT(KIncomingSrvPrefix, "mail.");
+    _LIT(KOutgoingSrvPrefix, "smtp.");
+    _LIT(KSrvPostfix, ".com");
+    _LIT(KDefaultConnMethod, "internet");
+    
+    if( aElemName == Kname )
+        {
+        if( aSetRandom )
+            {
+            TPtrC company(iEngine->RandomString(CCreatorEngine::ECompany));
+            SetContentToTextParamL(param->iMailboxName, company);
+            }
+        else
+            SetContentToTextParamL(param->iMailboxName, aElemContent);
+        }
+    else if( aElemName == Kincomingloginname )
+        {
+        if( aSetRandom )
+            {
+            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
+            SetContentToTextParamL(param->iIncomingLoginName, random);
+            param->iIncomingLoginName->Des().LowerCase();
+            }
+        else
+            SetContentToTextParamL(param->iIncomingLoginName, aElemContent);
+        }
+    else if( aElemName == Kincomingpassword )
+        {
+        if( aSetRandom )
+            {
+            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
+            SetContentToTextParamL(param->iIncomingPassword, random);
+            param->iIncomingPassword->Des().LowerCase();
+            }
+        else
+            SetContentToTextParamL(param->iIncomingPassword, aElemContent);
+        }
+    else if( aElemName == Kincomingservername )
+        {
+        if( aSetRandom )
+            {
+            TPtrC random(iEngine->RandomString(CCreatorEngine::ECompany));
+            HBufC* srvName = HBufC::NewLC(KIncomingSrvPrefix().Length()+random.Length()+KSrvPostfix().Length());
+            srvName->Des().Copy(KIncomingSrvPrefix);
+            srvName->Des().Append(random);
+            srvName->Des().Append(KSrvPostfix);
+            SetContentToTextParamL(param->iIncomingServerName, srvName->Des());
+            CleanupStack::PopAndDestroy(); // srvName
+            }
+        else
+            SetContentToTextParamL(param->iIncomingServerName, aElemContent);
+        }
+    else if( aElemName == Kincomingconnectionmethod )
+        {
+        if( aSetRandom )                        
+            SetContentToTextParamL(param->iIncomingConnectionMethod, KDefaultConnMethod);            
+        else
+            SetContentToTextParamL(param->iIncomingConnectionMethod, aElemContent);
+        }
+    else if( aElemName == Kincomingfolderpath )
+        SetContentToTextParamL(param->iIncomingFolderPath, aElemContent);
+    else if( aElemName == Kpathseparator )
+        SetContentToTextParamL(param->iPathSeparator, aElemContent);
+    else if( aElemName == Koutgoingloginname )
+        {
+        if( aSetRandom )
+            {
+            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
+            SetContentToTextParamL(param->iOutgoingLoginName, random);
+            param->iOutgoingLoginName->Des().LowerCase();
+            }
+        else
+            SetContentToTextParamL(param->iOutgoingLoginName, aElemContent);
+        }
+    else if( aElemName == Koutgoingpassword )
+        {
+        if( aSetRandom )
+            {
+            TPtrC random(iEngine->RandomString(CCreatorEngine::EFirstName));
+            SetContentToTextParamL(param->iOutgoingPassword, random);
+            param->iOutgoingPassword->Des().LowerCase();
+            }
+        else
+            SetContentToTextParamL(param->iOutgoingPassword, aElemContent);
+        }
+    else if( aElemName == Koutgoingservername )
+        {
+        if( aSetRandom )
+            {
+            TPtrC random(iEngine->RandomString(CCreatorEngine::ECompany));
+            HBufC* srvName = HBufC::NewLC(KOutgoingSrvPrefix().Length()+random.Length()+KSrvPostfix().Length());
+            srvName->Des().Copy(KOutgoingSrvPrefix);
+            srvName->Des().Append(random);
+            srvName->Des().Append(KSrvPostfix);
+            SetContentToTextParamL(param->iOutgoingServerName, srvName->Des());
+            CleanupStack::PopAndDestroy(); // srvName
+            }
+        else
+            SetContentToTextParamL(param->iOutgoingServerName, aElemContent);
+        }
+    else if( aElemName == Koutgoingconnectionmethod )
+        {
+        if( aSetRandom )            
+            SetContentToTextParamL(param->iOutgoingConnectionMethod, KDefaultConnMethod);            
+        else
+            SetContentToTextParamL(param->iOutgoingConnectionMethod, aElemContent);
+        }
+    else if( aElemName == Kownemail )
+        {
+        if( aSetRandom )
+            {
+            TDesC* email = iEngine->CreateEmailAddressLC();
+            SetContentToTextParamL(param->iOwnEmailAddress, *email);
+            CleanupStack::PopAndDestroy(); // email
+            }
+        else
+            SetContentToTextParamL(param->iOwnEmailAddress, aElemContent);
+        }
+    else if( aElemName == Kemailalias )
+        {
+        if( aSetRandom )
+            {
+            _LIT(KSpace, " ");
+            TPtrC firstName(iEngine->RandomString(CCreatorEngine::EFirstName));
+            TPtrC lastName(iEngine->RandomString(CCreatorEngine::ESurname));
+            HBufC* alias = HBufC::NewLC(firstName.Length() + lastName.Length() + KSpace().Length());
+            alias->Des().Copy(firstName);
+            alias->Des().Append(KSpace);
+            alias->Des().Append(lastName);
+            SetContentToTextParamL(param->iOwnEmailAlias, alias->Des());
+            CleanupStack::PopAndDestroy(); // alias
+            }
+        else        
+            SetContentToTextParamL(param->iOwnEmailAlias, aElemContent);
+        }
+    else if( aElemName == Kreceiptaddress )
+        {
+        if( aSetRandom )
+            {
+            TDesC* email = iEngine->CreateEmailAddressLC();
+            SetContentToTextParamL(param->iReceiptAddress, *email);
+            CleanupStack::PopAndDestroy(); // email
+            }
+        else
+            SetContentToTextParamL(param->iReceiptAddress, aElemContent);
+        }
+    else if( aElemName == Kreplytoaddress )
+        {
+        if( aSetRandom )
+            {
+            TDesC* email = iEngine->CreateEmailAddressLC();
+            SetContentToTextParamL(param->iReceiptAddress, *email);
+            CleanupStack::PopAndDestroy(); // email
+            }
+        else
+            SetContentToTextParamL(param->iReplyToAddress, aElemContent);
+        }
+    else
+        return EFalse;
+    
+    return ETrue;
+    }
+
+TBool CCreatorMailboxElement::SetEnumParamL(const TDesC& aElemName, const TDesC& aElemContent, CMailboxesParameters* param, TBool aSetRandom )
+    {
+    // Get email options:
+    if( aElemName == Kgetemailoptions )
+        {
+        if( aSetRandom )
+            param->iGetEmailOptions = (CMailboxesParameters::TGetEmailOption) iEngine->RandomNumber(
+                                                    CMailboxesParameters::EGetHeaders, 
+                                                    CMailboxesParameters::EGetEmailOptionLast-1);
+        else if( CompareIgnoreCase(aElemContent, Kgetheaders ) == 0 )
+            param->iGetEmailOptions = CMailboxesParameters::EGetHeaders;
+        else if( CompareIgnoreCase(aElemContent, Kgetbodytext) == 0 )
+            param->iGetEmailOptions = CMailboxesParameters::EGetBodyText;
+        else if( CompareIgnoreCase(aElemContent, Kgetbodytextandattachments) == 0 )
+            param->iGetEmailOptions = CMailboxesParameters::EGetBodyTextAndAttachments;
+        else if( CompareIgnoreCase(aElemContent, Kgetattachments) == 0 )
+            param->iGetEmailOptions = CMailboxesParameters::EGetAttachments;
+        else if( CompareIgnoreCase(aElemContent, Kgetbodyalternativetext) == 0 )
+            param->iGetEmailOptions = CMailboxesParameters::EGetBodyAlternativeText;
+        else 
+            param->iGetEmailOptions = CMailboxesParameters::EUndef;
+        }
+    
+    // Subscribe type:
+    else if( aElemName == Ksubscribetype )
+        {
+        if( aSetRandom )
+            param->iSubscribeType = (TFolderSubscribeType) iEngine->RandomNumber( EUpdateNeither, EUpdateBoth );
+        else if( CompareIgnoreCase( aElemContent, Kupdatelocal) == 0 )
+            param->iSubscribeType = EUpdateLocal;            
+        else if( CompareIgnoreCase( aElemContent, Kupdateremote) == 0 )
+            param->iSubscribeType = EUpdateRemote;
+        else if( CompareIgnoreCase( aElemContent, Kupdateboth) == 0 )
+            param->iSubscribeType = EUpdateBoth;
+        else
+            param->iSubscribeType = EUpdateNeither;
+        }
+    
+    // Folder synchronization type:
+    else if( aElemName == Kfoldersynctype)
+        {
+        if( aSetRandom )
+            param->iSyncType = (TFolderSyncType) iEngine->RandomNumber(EUseCombination, EUseRemote);
+        else if( CompareIgnoreCase( aElemContent, Kuselocal) == 0 )
+            param->iSyncType = EUseLocal;
+        else if( CompareIgnoreCase( aElemContent, Kuseremote) == 0 )
+            param->iSyncType = EUseRemote;
+        else
+            param->iSyncType = EUseCombination;
+        }
+     
+    // Send copy to self option:
+    else if( aElemName == Kcopytoself )
+        {
+        if( aSetRandom )
+            param->iSendCopyToSelf = (TImSMTPSendCopyToSelf) iEngine->RandomNumber(ESendNoCopy, ESendCopyAsBccRecipient);
+        else if( CompareIgnoreCase( aElemContent, Kto) == 0 )
+            param->iSendCopyToSelf = ESendCopyAsToRecipient;
+        else if( CompareIgnoreCase( aElemContent, Kcc) == 0 )
+            param->iSendCopyToSelf = ESendCopyAsCcRecipient;
+        else if( CompareIgnoreCase( aElemContent, Kbcc) == 0 )
+            param->iSendCopyToSelf = ESendCopyAsBccRecipient;
+        else
+            param->iSendCopyToSelf = ESendNoCopy;
+        }
+    
+    // Send option:
+    else if( aElemName == Ksendoption )
+        {
+        if( aSetRandom )
+            param->iSendOption = (TImSMTPSendMessageOption) iEngine->RandomNumber(ESendMessageImmediately, ESendMessageOnRequest);
+        else if( CompareIgnoreCase( aElemContent, Konnextconnection) == 0 )
+            param->iSendOption = ESendMessageOnNextConnection;
+        else if( CompareIgnoreCase( aElemContent, Konrequest) == 0 )
+            param->iSendOption = ESendMessageOnRequest;
+        else
+            param->iSendOption = ESendMessageImmediately;
+        }
+    else
+        {
+        return EFalse;
+        }
+    return ETrue;
+    }
+
+void CCreatorMailboxElement::ExecuteCommandL()
+    {
+    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
+    const CCreatorScriptAttribute* typeAttr = FindAttributeByName(KMailboxType);
+    TInt amount = 1;    
+    if( amountAttr )
+        {
+        amount = ConvertStrToIntL(amountAttr->Value());
+        }
+    
+    TMailboxType mailboxType = EMailboxPOP3;
+    
+    if( typeAttr && CompareIgnoreCase(typeAttr->Value(), Kimap4) == 0 )
+        {
+        mailboxType = EMailboxIMAP4;
+        }
+    
+    // Get 'fields' element 
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    if( fieldsElement && fieldsElement->SubElements().Count() > 0)
+        {
+        // Get sub-elements
+        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
+        // Create mailbox entries, the amount of entries is defined by amount:
+        for( TInt cI = 0; cI < amount; ++cI )
+            {            
+            CMailboxesParameters* param = new (ELeave) CMailboxesParameters;
+            CleanupStack::PushL(param);
+            
+            param->iMailboxType = mailboxType;
+            
+            for( TInt i = 0; i < fields.Count(); ++i )
+                {
+                CCreatorScriptElement* field = fields[i];
+                TPtrC elemName = field->Name();
+                TPtrC elemContent = field->Content();
+                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
+                TBool useRandom = EFalse;
+                if( randomAttr || elemContent.Length() == 0 )
+                    {
+                    useRandom = ETrue;
+                    }
+                
+                if( SetTextParamL(elemName, elemContent, param, useRandom ) == EFalse &&
+                    SetBooleanParamL(elemName, elemContent, param, useRandom ) == EFalse &&
+                    SetIntegerParamL(elemName, elemContent, param, useRandom ) == EFalse &&
+                    SetEnumParamL(elemName, elemContent, param, useRandom ) )
+                    {
+                    LOGSTRING2("CCreatorMailboxElement::ExecuteCommandL: Unknown mailbox field: %S", &elemName);
+                    }
+                }
+            iEngine->AppendToCommandArrayL(ECmdCreateMessagingEntryMailboxes, param);
+            CleanupStack::Pop(); // param
+            }
+        }
+    else
+    	{
+    	iEngine->AppendToCommandArrayL(ECmdCreateMessagingEntryMailboxes, 0, amount);
+    	}
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_message.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1825 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+
+#include "creator_message.h" 
+#include "creator_traces.h"
+#include "creator_contactsetcache.h"
+#include "creator_phonebook.h"
+#include <apgcli.h>
+#include <MuiuServiceUtilities.h>
+#include <utf.h>
+
+#include <mmf/common/mmfcontrollerpluginresolver.h> // for CleanupResetAndDestroyPushL
+
+//static const TInt KMessagesFieldLength = 1024;
+
+//_LIT(KCreatorMessagesPrefixName, "CR_");
+//_LIT(KCreatorMessagesPrefixFolderName, "CR_FLDR_");
+
+
+const TUid KUidBIOBusinessCardMsg =  {0x10005531}; 
+_LIT(KEmpty, "");
+
+//----------------------------------------------------------------------------
+
+CMessagesParameters::CMessagesParameters()
+    {
+    LOGSTRING("Creator: CMessagesParameters::CMessagesParameters");
+
+    iSenderAddress = HBufC::New(128);
+    iRecipientAddress = HBufC::New(128);
+    iMessageSubject = HBufC::New(128);
+    iMessageBodyText = HBufC::New(10240);
+    TRAP_IGNORE(iAttachments = new(ELeave) CArrayFixFlat<TInt>(64));
+    iCreateAsUnread = ETrue;
+    }
+
+CMessagesParameters::~CMessagesParameters()
+    {
+    LOGSTRING("Creator: CMessagesParameters::~CMessagesParameters");
+
+
+    delete iMessageBodyText;
+    delete iMessageSubject;
+    delete iRecipientAddress;
+    delete iSenderAddress;
+    delete iAttachments;
+    iAttachmentPaths.ResetAndDestroy();
+    iAttachmentPaths.Close(); 
+    iRecipientAddressArray.ResetAndDestroy();
+    iRecipientAddressArray.Close();
+    iRecipientLinkIds.Close();
+    iSenderLinkIds.Close();
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorMessages* CCreatorMessages::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorMessages* self = CCreatorMessages::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorMessages* CCreatorMessages::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorMessages* self = new (ELeave) CCreatorMessages;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorMessages::CCreatorMessages()
+    {
+    }
+
+void CCreatorMessages::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorMessages::ConstructL");
+    iEngine = aEngine;
+    
+    TRAP_IGNORE(iAttachments = new(ELeave) CArrayFixFlat<TInt>(64));
+    iWaiter = CAsyncWaiter::NewL();
+    }
+
+CCreatorMessages::~CCreatorMessages()
+    {
+    LOGSTRING("Creator: CCreatorMessages::~CCreatorMessages");
+
+    if ( iEngine && iEntryIds.Count() )
+        {
+        TRAP_IGNORE( iEngine->WriteEntryIdsToStoreL( iEntryIds, KUidDictionaryUidMessages ) );
+        }
+    iEntryIds.Reset();
+    iEntryIds.Close();
+    
+    delete iParameters;
+    delete iWaiter;
+    delete iTmpPhoneNumber;
+    delete iTmpEmail;
+    delete iAttachments;
+
+    iRecipientArray.ResetAndDestroy();
+    iRecipientArray.Close();
+    iSenderArray.ResetAndDestroy();
+    iSenderArray.Close();
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorMessages::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
+    {
+    LOGSTRING("Creator: CCreatorMessages::QueryDialogClosedL");  
+    
+    if( aPositiveAction == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        return;
+        }
+    
+    const TDesC* showText = &KSavingText;
+    TBool finished(EFalse);
+    TBool retval(ETrue);
+    switch(aUserData)
+        {
+        case ECreatorMessagesDelete:
+            showText = &KDeletingText;
+            iEntriesToBeCreated = 1;
+            finished = ETrue;
+            break;
+        case ECreatorMessagesStart:
+            // message type query
+            retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Message type"), R_MESSAGE_TYPE_QUERY, (TInt*) &iMessageType, this, ECreatorMessagesMessageType);
+            break;
+        case ECreatorMessagesMessageType:
+            retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Folder type"), R_FOLDER_TYPE_QUERY, (TInt*) &iFolderType, this, ECreatorMessagesFolderType);
+            break;
+        case ECreatorMessagesFolderType:
+            // query create as unread
+            retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Message status"), R_UNREAD_QUERY, (TInt*)&iCreateAsUnread, this, ECreatorMessagesMessageStatus);
+            break;
+        case ECreatorMessagesMessageStatus:
+            if( iMessageType == ESMS || iMessageType == EMMS || iMessageType == EEmail )
+                {
+                iDefinedMessageLength = 100;
+                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iDefinedMessageLength, _L("Amount of characters in message body?"), ETrue, 
+                    this, ECreatorMessagesCharsInBody
+                    );
+                break;
+                }
+            else
+                {
+                iDefinedMessageLength = 0;
+                // goto query attachments ... :-) DO NOT break;
+                }
+        case ECreatorMessagesCharsInBody:
+            // query attachments
+            iAttachments->Reset();
+            if( iMessageType == EMMS || iMessageType == EEmail)
+                {
+                retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Choose attachment:"), R_ATTACHMENT_MULTI_SELECTION_QUERY, 
+                    iAttachments, this, ECreatorMessagesAttachment
+                    );
+                }
+            else if( iMessageType == EAMS )
+                {
+                iAttachments->AppendL( TInt(0) );
+                retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Choose attachment:"), R_AMS_ATTACHMENT_SINGLE_SELECTION_QUERY, 
+                    &iAttachments->At(0), this, ECreatorMessagesAttachment
+                    );
+                }
+            else if( iMessageType == EIrMessage || iMessageType == EBTMessage )
+                {
+                iAttachments->AppendL( TInt(0) );
+                retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Choose attachment:"), R_ATTACHMENT_SINGLE_SELECTION_QUERY,
+                    &iAttachments->At(0), this, ECreatorMessagesAttachment
+                    );
+                }
+            else
+                {
+                finished = ETrue;
+                }
+            break;
+        case ECreatorMessagesAttachment:
+            finished = ETrue;
+            if(iMessageType== EMMS || iMessageType == EEmail)
+                {
+                // "none" is selected
+                if (iAttachments->At(0) == 0)
+                    {
+                    iAttachments->Reset();
+                    }
+                else  // otherwise fix indexes
+                    {
+                    for (TInt i=0; i<iAttachments->Count(); i++)
+                        iAttachments->At(i)--;  // decrease value by one 
+
+                    }
+                }
+            break;
+        default:
+            //some error
+            retval = EFalse;
+            break;
+        }
+    if( retval == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        }
+    else if( finished )
+        {
+        // add this command to command array
+        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
+        // started exucuting commands
+        iEngine->ExecuteFirstCommandL( *showText );
+        }
+    }
+//----------------------------------------------------------------------------
+
+TBool CCreatorMessages::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorMessages::AskDataFromUserL");
+
+    CCreatorModuleBase::AskDataFromUserL(aCommand);
+    
+    if ( aCommand == ECmdDeleteMessages )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all messages?"), this, ECreatorMessagesDelete );
+        }
+    else if ( aCommand ==  ECmdDeleteCreatorMessages )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all messages created with Creator?"), this, ECreatorMessagesDelete  );
+        }
+
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorMessagesStart );
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateRandomMessageEntryL(TInt aCommand)
+    {
+    LOGSTRING2("Creator: CCreatorMessages::CreateRandomMessageEntryL - Command: %d", aCommand);
+
+    TInt err = KErrNone;
+    
+    iDefinedMessageLength = iEngine->RandomNumber(100, 300);
+
+
+    switch (aCommand)
+        {
+	    case ECmdCreateRandomEntrySMSInbox:     { iMessageType=ESMS; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntrySMSDrafts:    { iMessageType=ESMS; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntrySMSOutbox:    { iMessageType=ESMS; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntrySMSSent:      { iMessageType=ESMS; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
+	    
+        case ECmdCreateRandomEntryMMSInbox:     { iMessageType=EMMS; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryMMSDrafts:    { iMessageType=EMMS; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryMMSOutbox:    { iMessageType=EMMS; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}    
+	    case ECmdCreateRandomEntryMMSSent:      { iMessageType=EMMS; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
+	    
+        case ECmdCreateRandomEntryEmailInbox:   { iMessageType=EEmail; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryEmailDrafts:  { iMessageType=EEmail; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryEmailOutbox:  { iMessageType=EEmail; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryEmailSent:    { iMessageType=EEmail; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
+	    
+        case ECmdCreateRandomEntryBIOInbox:     { iMessageType=ESmartMessage; iFolderType=EInbox; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryBIODrafts:    { iMessageType=ESmartMessage; iFolderType=EDrafts; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryBIOOutbox:    { iMessageType=ESmartMessage; iFolderType=EOutbox; err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryBIOSent:      { iMessageType=ESmartMessage; iFolderType=ESent; err=CreateMessageEntryL(NULL); break;}
+	    
+        case ECmdCreateRandomEntryIRInbox:      { iMessageType=EIrMessage; iFolderType=EInbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryIRDrafts:     { iMessageType=EIrMessage; iFolderType=EDrafts; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryIROutbox:     { iMessageType=EIrMessage; iFolderType=EOutbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryIRSent:       { iMessageType=EIrMessage; iFolderType=ESent; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+	    
+        case ECmdCreateRandomEntryBTInbox:      { iMessageType=EBTMessage; iFolderType=EInbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryBTDrafts:     { iMessageType=EBTMessage; iFolderType=EDrafts; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryBTOutbox:     { iMessageType=EBTMessage; iFolderType=EOutbox; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryBTSent:       { iMessageType=EBTMessage; iFolderType=ESent; iAttachments->Reset(); iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) ); err=CreateMessageEntryL(NULL); break;}
+        
+	    case ECmdCreateRandomEntryAMSInbox:     { iMessageType=EAMS; iFolderType=EInbox; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryAMSDrafts:     { iMessageType=EAMS; iFolderType=EDrafts; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryAMSOutbox:     { iMessageType=EAMS; iFolderType=EOutbox; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
+	    case ECmdCreateRandomEntryAMSSent:     { iMessageType=EAMS; iFolderType=ESent; iAttachments->Reset(); iAttachments->AppendL( CCreatorEngine::EMP3_250kB); err=CreateMessageEntryL(NULL); break;}
+
+	    default: { User::Panic(_L("MessageCommand"), 901);  break;}
+        }
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateMessageEntryL(CMessagesParameters *aParameters, TBool /*aTakeUserGivenParameters*/)
+    {
+    LOGSTRING("Creator: CCreatorMessages::CreateMessageEntryL");
+    
+    delete iParameters;
+    iParameters = 0;   
+    
+    CMessagesParameters* parameters = aParameters;
+           
+    // random data needed if no predefined data available
+    if (!parameters)
+        {
+        iParameters = new(ELeave) CMessagesParameters;
+        parameters = iParameters;
+        // check if values from ui needed
+        //if (aTakeUserGivenParameters)
+        //    {            
+            parameters->iMessageType = iMessageType;
+            parameters->iFolderType = iFolderType;
+            parameters->iDefinedMessageLength = iDefinedMessageLength;
+            parameters->iCreateAsUnread = iCreateAsUnread;
+
+            for (TInt i=0; i<iAttachments->Count(); i++)
+                parameters->iAttachments->AppendL(iAttachments->At(i)); 
+        //    }
+        //else
+        //    {
+            // message length
+        //    parameters->iDefinedMessageLength = iEngine->RandomNumber(100, 300);
+        //    }    
+
+        if (parameters->iMessageType == EEmail)
+            {
+            parameters->iSenderAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
+            parameters->iSenderAddress->Des().Append( _L("@") );
+            parameters->iSenderAddress->Des().Append( iEngine->RandomString(CCreatorEngine::ECompany) );
+            parameters->iSenderAddress->Des().Append( _L(".com") );
+
+            parameters->iRecipientAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
+            parameters->iRecipientAddress->Des().Append( _L("@") );
+            parameters->iRecipientAddress->Des().Append( iEngine->RandomString(CCreatorEngine::ECompany) );
+            parameters->iRecipientAddress->Des().Append( _L(".net") );
+            }
+        else if (parameters->iMessageType == EIrMessage || parameters->iMessageType == EBTMessage)
+            {
+            parameters->iSenderAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
+            parameters->iRecipientAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EFirstName) );
+            }
+        else
+            {
+            parameters->iSenderAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EPhoneNumber) );
+            parameters->iRecipientAddress->Des().Copy( iEngine->RandomString(CCreatorEngine::EPhoneNumber) );
+            }
+
+        // subject
+        parameters->iMessageSubject->Des() = iEngine->RandomString(CCreatorEngine::EMessageSubject);
+
+        // message body
+        parameters->iMessageBodyText->Des().Copy(_L(""));
+        TPtrC randText = iEngine->RandomString(CCreatorEngine::EMessageText);
+        for (TInt i=0; i<parameters->iDefinedMessageLength / randText.Length() +1; i++)
+            {
+            parameters->iMessageBodyText->Des().Append( randText );
+            parameters->iMessageBodyText->Des().Append( _L(" ") );
+            }
+        parameters->iMessageBodyText->Des() = parameters->iMessageBodyText->Des().Left(parameters->iDefinedMessageLength);
+
+        // BIO message type (from bitsids.h)  // TO-DO: add support for all BIO message types...
+        parameters->iBIOMessageType = KUidBIOBusinessCardMsg;
+        }
+    
+    
+
+    TInt err = KErrNone;
+
+    switch (parameters->iMessageType)
+        {
+        case ESMS:          { err = CreateSMSEntryL(*parameters);  break; }
+        case EMMS:          { err = CreateMMSEntryL(*parameters);  break; }
+        case EAMS:          { err = CreateAMSEntryL(*parameters);  break; }
+        case EEmail:        { err = CreateEmailEntryL(*parameters);  break; }
+        case ESmartMessage: { err = CreateSmartMessageEntryL(*parameters);  break; }
+        case EIrMessage:    { err = CreateObexEntryL( TUid::Uid(KUidMsgTypeIrTInt32), *parameters );  break; }    
+        case EBTMessage:    { err = CreateObexEntryL( TUid::Uid(KUidMsgTypeBtTInt32), *parameters );  break; }
+        default:            { User::Panic(_L("MsgType"), 851);  break;}
+
+        }
+
+    iSenderArray.ResetAndDestroy();
+    iRecipientArray.ResetAndDestroy();
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateSMSEntryL(const CMessagesParameters& parameters)
+    {
+    LOGSTRING("Creator: CCreatorMessages::CreateSMSEntryL");
+
+    TInt err = KErrNone;
+
+               
+    // init
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
+    CleanupStack::PushL(registry);
+
+    // get the client mtm and return if it isn't supported in the system        
+    CSmsClientMtm* clientMtm = NULL;
+    TRAP(err, clientMtm = static_cast<CSmsClientMtm*>(registry->NewMtmL(KUidMsgTypeSMS)));
+    if (err || !clientMtm)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("SMS: Message type module not found"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        }  
+    CleanupStack::PushL(clientMtm);   
+
+    // create a new object to access an existing entry
+    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
+    CleanupStack::PushL(msvEntry);
+  
+    // get default service
+    TMsvId defaultServiceId = 0;
+    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
+    if (err)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("SMS: Define a SMS centre first"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        } 
+    
+    // set folder type
+    switch (parameters.iFolderType)
+        {
+        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
+        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
+        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
+        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
+        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
+        }
+        
+    // mtm takes ownership of entry context	
+    CleanupStack::Pop(msvEntry);
+    clientMtm->SetCurrentEntryL(msvEntry);    
+    
+    // create a new message
+    clientMtm->CreateMessageL(defaultServiceId);
+
+    // set the from field to sms header
+    // !!! This will cause CRASH
+    /*if (parameters.iFolderType == EInbox)
+        {
+        CSmsHeader* smsHeader = &clientMtm->SmsHeader();
+        delete smsHeader; // <-- This will cause CRASH
+        smsHeader = NULL;
+        smsHeader = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, clientMtm->Body());        
+        if( parameters.iSenderAddress )
+            {
+            smsHeader->SetFromAddressL( parameters.iSenderAddress->Des() );
+            }
+        else
+            {
+            smsHeader->SetFromAddressL(KEmpty);
+            }
+        }       */
+
+    // set body
+    clientMtm->Body().Reset();
+    clientMtm->Body().InsertL(0, parameters.iMessageBodyText->Des());        
+
+    // get the entry of the message
+    TMsvEntry messageEntry = clientMtm->Entry().Entry();
+
+    // set the details field
+    if (parameters.iFolderType == EInbox)
+        {
+        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
+        }
+    else
+        {
+        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
+        // Add all recipients to clientMtm
+        // iRecipientArray is up-to-date so don't call AddRecipientsL here 
+        for( TInt i = 0; i < iRecipientArray.Count(); i++ )
+            {
+            clientMtm->AddAddresseeL( iRecipientArray[i]->Des() );
+            }
+        }
+
+    // set the sending state for outbox message
+    // to avoid SMSMtmUI:15 panic in messages application
+    if (parameters.iFolderType == EOutbox )
+        {
+        messageEntry.SetSendingState( KMsvSendStateWaiting );
+        }
+
+    // set the description field same as the first part of the message body
+    messageEntry.iDescription.Set( parameters.iMessageBodyText->Des().Left(KSmsDescriptionLength) );
+
+    // save the changes done above
+    clientMtm->Entry().ChangeL(messageEntry);
+
+    // save the message     
+    clientMtm->SaveMessageL();
+    	
+	// final fine tuning
+    messageEntry.SetAttachment(EFalse);
+    messageEntry.iDate.HomeTime();
+    messageEntry.SetVisible(ETrue);
+    messageEntry.SetInPreparation(EFalse);
+   
+    if (parameters.iCreateAsUnread)
+        {
+        messageEntry.SetUnread(ETrue);
+        messageEntry.SetNew(ETrue);
+        }
+    else
+        {
+        messageEntry.SetUnread(EFalse);
+        messageEntry.SetNew(EFalse);
+        }
+    
+    messageEntry.SetComplete(ETrue);
+    messageEntry.iServiceId = defaultServiceId;
+    messageEntry.iRelatedId = 0;
+    clientMtm->Entry().ChangeL(messageEntry);
+
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iEntryIds.AppendL( messageEntry.Id() );
+    
+    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm
+        
+    return err;
+
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateMMSEntryL(const CMessagesParameters& parameters)
+    {
+    LOGSTRING("Creator: CCreatorMessages::CreateMMSEntryL");
+
+    TInt err = KErrNone;
+        
+    // init
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
+    CleanupStack::PushL(registry);
+
+    // get the client mtm and return if it isn't supported in the system        
+    CMmsClientMtm* clientMtm = NULL;
+    TRAP(err, clientMtm = static_cast<CMmsClientMtm*>(registry->NewMtmL(KUidMsgTypeMultimedia)));
+    if (err || !clientMtm)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Message type module not found"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        }  
+    CleanupStack::PushL(clientMtm);   
+
+    // create a new object to access an existing entry
+    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
+    CleanupStack::PushL(msvEntry);
+  
+    // get default service
+    TMsvId defaultServiceId = 0;
+    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
+    if (err)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Define MMS settings first"));
+        CleanupStack::PopAndDestroy(4);
+        User::Leave(KErrNotFound);
+        } 
+    
+    // set folder type
+    switch (parameters.iFolderType)
+        {
+        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
+        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
+        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
+        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
+        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
+        }
+        
+    // mtm takes ownership of entry context	
+    CleanupStack::Pop(msvEntry);
+    clientMtm->SetCurrentEntryL(msvEntry);    
+    
+    // create a new message
+    clientMtm->CreateMessageL(defaultServiceId);
+
+    // set subject
+    clientMtm->SetSubjectL( parameters.iMessageSubject->Des() );
+            
+    // set some mms defaults
+    clientMtm->SetMessageClass(EMmsClassPersonal);
+    clientMtm->SetExpiryInterval(86400);
+    clientMtm->SetDeliveryTimeInterval(3600);
+    clientMtm->SetMessagePriority(EMmsPriorityLow);
+    clientMtm->SetSenderVisibility(EMmsMaximumSenderVisibility);
+    clientMtm->SetDeliveryReport(EMmsDeliveryReportYes);
+    clientMtm->SetReadReply(EMmsReadReplyYes);        
+    
+    // set the sender / addressee field
+    if (parameters.iFolderType == EInbox)
+        {        
+        AddMtmSenderL(*clientMtm, parameters, EFalse);                
+        }
+    
+    // Add all recipients to clientMtm
+    AddRecipientsL( *clientMtm, parameters, EFalse );  
+        
+    // get an access to the message store
+    CMsvStore* store = msvEntry->EditStoreL();
+    CleanupStack::PushL(store);                  
+   
+
+    // set body as an attachment
+    CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL();
+    CleanupStack::PushL(mimeHeaders);
+    mimeHeaders->SetContentTypeL( _L8("text") );
+    mimeHeaders->SetContentSubTypeL( _L8("plain") );
+    mimeHeaders->SetMimeCharset( KMmsUtf8 );
+    mimeHeaders->SetSuggestedFilenameL( _L("body.txt") );
+    
+    MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
+    CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
+    CleanupStack::PushL(attachmentInfo);
+    attachmentInfo->SetAttachmentNameL( _L("body.txt") );
+    attachmentInfo->SetMimeTypeL( _L8("text/plain") );
+    mimeHeaders->StoreL( *attachmentInfo );
+    
+    RFile textFile;
+
+    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+    attachMan.CreateAttachmentL(_L("body.txt"), textFile, attachmentInfo, waiter->iStatus );
+    CleanupStack::Pop(); // waiter
+    CleanupStack::Pop(); // attachmentInfo
+    CleanupStack::PushL(waiter);
+    waiter->StartAndWait();
+    CleanupStack::PopAndDestroy(waiter);        
+   
+    HBufC8* tempBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L( parameters.iMessageBodyText->Des() );
+    CleanupStack::PushL(tempBuf);
+    textFile.Write( tempBuf->Des() );        
+    textFile.Close();
+    CleanupStack::PopAndDestroy(); //tempBuf
+    
+    CleanupStack::PopAndDestroy(); //mimeHeaders
+
+    
+    // get the entry of the message
+    TMsvEntry messageEntry = clientMtm->Entry().Entry();        
+    
+    // set the details field
+    if (parameters.iFolderType == EInbox)
+        {
+        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
+        }
+    else
+        {
+        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
+        }    
+
+    // set the description field same as the message subject
+    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
+
+    // save the changes done above
+    clientMtm->Entry().ChangeL(messageEntry);        
+    
+
+      // save the attachments
+    HandleAttachementsL(parameters, store, err );
+//    for (TInt i=0; i<parameters.iAttachments->Count(); i++)
+//        {
+//        TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(i) );
+//
+//        TParse parser;
+//        parser.Set(sourceFileName, NULL, NULL);
+//        TFileName shortFileName = parser.NameAndExt();
+//
+//        // get the mime type
+//        RApaLsSession ls;
+//        User::LeaveIfError(ls.Connect());
+//        CleanupClosePushL<RApaLsSession>(ls);
+//        TUid appUid;
+//        TDataType dataType;
+//        ls.AppForDocument(sourceFileName, appUid, dataType);
+//        CleanupStack::PopAndDestroy(); //ls
+//        TPtrC8 mimeType = dataType.Des8();
+//        
+//        // attachment settings
+//        MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
+//        CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
+//        attachmentInfo->SetAttachmentNameL( shortFileName );        
+//        attachmentInfo->SetMimeTypeL( mimeType );        
+//
+//        // save
+//        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+//        
+//        TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
+//        if (err == KErrNone)
+//            waiter->StartAndWait();
+//        else
+//            LOGSTRING2("Creator: CCreatorMessages::CreateMMSEntryL failed to attach %S", &sourceFileName);
+//
+//        CleanupStack::PopAndDestroy(waiter);  
+//        }
+
+    // save the changes made to the message store
+    store->CommitL();
+    CleanupStack::PopAndDestroy(store);   
+           
+    
+    // save the message      
+    clientMtm->SaveMessageL();
+    	
+	// final fine tuning
+	messageEntry.SetAttachment(ETrue);
+    messageEntry.iDate.HomeTime();
+    messageEntry.SetVisible(ETrue);
+    messageEntry.SetInPreparation(EFalse);
+    if (parameters.iCreateAsUnread)
+        {
+        messageEntry.SetUnread(ETrue);
+        messageEntry.SetNew(ETrue);
+        }
+    else
+        {
+        messageEntry.SetUnread(EFalse);
+        messageEntry.SetNew(EFalse);
+        }
+    messageEntry.SetComplete(ETrue);
+    messageEntry.iServiceId = defaultServiceId;
+    messageEntry.iRelatedId = 0;
+    
+    if (parameters.iFolderType == EDrafts) 
+        messageEntry.SetReadOnly(EFalse);
+    else
+        messageEntry.SetReadOnly(ETrue);
+
+	messageEntry.iMtmData1 = KMmsMessageMRetrieveConf | KMmsMessageMobileTerminated;
+	
+    clientMtm->Entry().ChangeL(messageEntry);
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iEntryIds.AppendL( messageEntry.Id() );
+    
+    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm        
+        
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::HandleAttachementsL(const CMessagesParameters& parameters, CMsvStore* store, TInt err )
+    {
+    // save the attachments (added with id's)
+  for (TInt i=0; i<parameters.iAttachments->Count(); i++)
+      {
+      TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(i) );
+      HandleAttachementL(store, err, sourceFileName );
+
+      }    
+  //Adding attachmentpaths
+  for (TInt i=0; i<parameters.iAttachmentPaths.Count(); i++)
+      {
+      HBufC* point = parameters.iAttachmentPaths[i];
+      TFileName sourceFileName(point->Des());      
+      HandleAttachementL(store, err, sourceFileName );
+      }
+    }
+//----------------------------------------------------------------------------
+
+void CCreatorMessages::HandleAttachementL(CMsvStore* store, TInt err, TFileName& sourceFileName )
+    {
+    TParse parser;
+    parser.Set(sourceFileName, NULL, NULL);
+    TFileName shortFileName = parser.NameAndExt();
+
+    // get the mime type
+    RApaLsSession ls;
+    User::LeaveIfError(ls.Connect());
+    CleanupClosePushL<RApaLsSession>(ls);
+    TUid appUid;
+    TDataType dataType;
+    ls.AppForDocument(sourceFileName, appUid, dataType);
+    CleanupStack::PopAndDestroy(); //ls
+    TPtrC8 mimeType = dataType.Des8();
+    
+    // attachment settings
+    MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
+    CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
+    CleanupStack::PushL(attachmentInfo);
+    attachmentInfo->SetAttachmentNameL( shortFileName );        
+    attachmentInfo->SetMimeTypeL( mimeType );
+    
+    if ( mimeType == _L8("text/plain") )
+        {
+        // CMsvMimeHeaders needs to be stored in case of text file 
+        CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL();
+        CleanupStack::PushL(mimeHeaders);
+        mimeHeaders->SetContentTypeL( _L8("text") );
+        mimeHeaders->SetContentSubTypeL( _L8("plain") );
+        mimeHeaders->SetMimeCharset( KMmsUtf8 );
+        mimeHeaders->StoreL( *attachmentInfo );
+        CleanupStack::PopAndDestroy( mimeHeaders );
+        }
+
+    // save
+    
+    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+    TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
+    if (err == KErrNone)
+    	{
+        waiter->StartAndWait();
+        CleanupStack::PopAndDestroy(waiter);
+        CleanupStack::Pop(); // attachmentInfo, the ownership is transferred
+    	}
+    else
+    	{
+    	CleanupStack::PopAndDestroy(waiter);
+    	CleanupStack::PopAndDestroy(); // attachmentInfo, ownership is not transferred (leave occurs)
+        LOGSTRING2("Creator: CCreatorMessages::HandleAttachementsL failed to attach %S", &sourceFileName);
+    	}
+    }
+      //----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateAMSEntryL(const CMessagesParameters& parameters)
+    {
+    LOGSTRING("Creator: CCreatorMessages::CreateAMSEntryL");
+
+    TInt err = KErrNone;
+
+        
+    // init
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
+    CleanupStack::PushL(registry);
+
+    // get the client mtm and return if it isn't supported in the system        
+    CMmsClientMtm* clientMtm = NULL;
+    TRAP(err, clientMtm = static_cast<CMmsClientMtm*>(registry->NewMtmL(KUidMsgTypeMultimedia)));
+    if (err || !clientMtm)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Message type module not found"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        }  
+    CleanupStack::PushL(clientMtm);   
+
+    // create a new object to access an existing entry
+    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
+    CleanupStack::PushL(msvEntry);
+  
+    // get default service
+    TMsvId defaultServiceId = 0;
+    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
+    if (err)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("MMS: Define MMS settings first"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        } 
+    
+    // set folder type
+    switch (parameters.iFolderType)
+        {
+        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
+        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
+        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
+        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
+        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
+        }
+        
+    // mtm takes ownership of entry context	
+    CleanupStack::Pop(msvEntry);
+    clientMtm->SetCurrentEntryL(msvEntry);    
+    
+    // create a new message
+    clientMtm->CreateMessageL(defaultServiceId);
+
+    // set subject
+    clientMtm->SetSubjectL(parameters.iMessageSubject->Des() );
+            
+    // set some mms defaults
+    clientMtm->SetMessageClass(EMmsClassPersonal);
+    clientMtm->SetExpiryInterval(86400);
+    clientMtm->SetDeliveryTimeInterval(3600);
+    clientMtm->SetMessagePriority(EMmsPriorityLow);
+    clientMtm->SetSenderVisibility(EMmsMaximumSenderVisibility);
+    clientMtm->SetDeliveryReport(EMmsDeliveryReportYes);
+    clientMtm->SetReadReply(EMmsReadReplyYes);        
+    
+    // set the sender / addressee field
+    if (parameters.iFolderType == EInbox)
+        {
+        AddMtmSenderL(*clientMtm, parameters, EFalse);                
+        }
+
+    // Add all recipients to clientMtm
+    AddRecipientsL( *clientMtm, parameters, EFalse );
+    
+        
+    // get an access to the message store
+    CMsvStore* store = msvEntry->EditStoreL();
+    CleanupStack::PushL(store);                  
+   
+    // get the entry of the message
+    TMsvEntry messageEntry = clientMtm->Entry().Entry();        
+    
+    // set the details field
+    if (parameters.iFolderType == EInbox)
+        {
+        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
+        }  
+    else
+        {
+        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
+        }
+
+    // set the description field same as the message subject
+    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
+    messageEntry.iBioType = KUidMsgSubTypeMmsAudioMsg.iUid;
+    
+    // save the changes done above
+    clientMtm->Entry().ChangeL(messageEntry);        
+    
+
+    TFileName sourceFileName = iEngine->TestDataPathL( CCreatorEngine::EAMR_20kB );
+    TParse parser;
+    parser.Set(sourceFileName, NULL, NULL);
+    TFileName shortFileName = parser.NameAndExt();
+
+    // get the mime type
+    RApaLsSession ls;
+    User::LeaveIfError(ls.Connect());
+    CleanupClosePushL<RApaLsSession>(ls);
+    TUid appUid;
+    TDataType dataType;
+    ls.AppForDocument(sourceFileName, appUid, dataType);
+    CleanupStack::PopAndDestroy(); //ls
+    TPtrC8 mimeType = dataType.Des8();
+        
+    // attachment settings
+    MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
+    CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
+    attachmentInfo->SetAttachmentNameL( shortFileName );        
+    attachmentInfo->SetMimeTypeL( mimeType );        
+
+    // save
+    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+      
+    TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
+    if (err == KErrNone)
+        waiter->StartAndWait();
+    else
+        LOGSTRING2("Creator: CCreatorMessages::CreateAMSEntryL failed to attach %S", &sourceFileName);
+
+    CleanupStack::PopAndDestroy(waiter);  
+
+    // save the changes made to the message store
+    store->CommitL();
+    CleanupStack::PopAndDestroy(store);   
+           
+    
+    // save the message      
+    clientMtm->SaveMessageL();
+    	
+	// final fine tuning
+	messageEntry.SetAttachment(ETrue);
+    messageEntry.iDate.HomeTime();
+    messageEntry.SetVisible(ETrue);
+    messageEntry.SetInPreparation(EFalse);
+    if (parameters.iCreateAsUnread)
+        {
+        messageEntry.SetUnread(ETrue);
+        messageEntry.SetNew(ETrue);
+        }
+    else
+        {
+        messageEntry.SetUnread(EFalse);
+        messageEntry.SetNew(EFalse);
+        }
+    messageEntry.SetComplete(ETrue);
+    messageEntry.iServiceId = defaultServiceId;
+    messageEntry.iRelatedId = 0;
+    
+    if (parameters.iFolderType == EDrafts) 
+        messageEntry.SetReadOnly(EFalse);
+    else
+        messageEntry.SetReadOnly(ETrue);
+
+	messageEntry.iMtmData1 = KMmsMessageMRetrieveConf | KMmsMessageMobileTerminated;
+	
+    clientMtm->Entry().ChangeL(messageEntry);
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iEntryIds.AppendL( messageEntry.Id() );
+    
+    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm        
+        
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateEmailEntryL(const CMessagesParameters& parameters)
+    {
+    LOGSTRING("Creator: CCreatorMessages::CreateEmailEntryL");
+
+    TInt err = KErrNone;
+
+    // init
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
+    CleanupStack::PushL(registry);
+    
+    // get the client mtm and return if it isn't supported in the system        
+    CSmtpClientMtm* clientMtm = NULL;
+    TRAP(err, clientMtm = static_cast<CSmtpClientMtm*>(registry->NewMtmL(KUidMsgTypeSMTP)));
+    
+    if (err || !clientMtm)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Email: Message type module not found"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        }  
+    CleanupStack::PushL(clientMtm);   
+
+    // create a new object to access an existing entry
+    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
+    CleanupStack::PushL(msvEntry);
+  
+    // get default service
+    TMsvId defaultServiceId(0);
+    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
+    if (err)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Email: Define a mailbox first"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        } 
+                
+    // set folder type
+    switch (parameters.iFolderType)
+        {
+        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
+        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
+        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
+        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
+        case EMailbox:  { msvEntry->SetEntryL(iUserSelectedMailbox);          break; }
+        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
+        }
+        
+    // mtm takes ownership of entry context	
+    CleanupStack::Pop(msvEntry);
+    clientMtm->SetCurrentEntryL(msvEntry); 
+
+    // create a new message
+    clientMtm->CreateMessageL(defaultServiceId);
+
+    // set subject
+    clientMtm->SetSubjectL( parameters.iMessageSubject->Des() );
+    
+    // set body
+    clientMtm->Body().Reset();
+    clientMtm->Body().InsertL(0, parameters.iMessageBodyText->Des()); 
+
+    // get the entry of the message
+    TMsvEntry messageEntry = clientMtm->Entry().Entry();
+    
+    // set the address fields
+    if (parameters.iFolderType == EInbox)
+        {
+        AddSenderToMtmAddresseeL(*clientMtm, parameters, ETrue );
+        SetSenderToEntryDetailsL(messageEntry, parameters, ETrue);
+        messageEntry.iMtm = KUidMsgTypeIMAP4;  // or any other than KUidMsgTypeSMTP to display 'from' field instead of 'to' field 
+        }
+    else
+        {
+        // Add all recipients to clientMtm
+        AddRecipientsL( *clientMtm, parameters, ETrue );
+        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);        
+        }
+
+    // set the description field same as the message subject
+    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
+
+    // save the changes done above
+    clientMtm->Entry().ChangeL(messageEntry);
+    
+    // get an access to the message store
+    CMsvStore* store = msvEntry->EditStoreL();
+    CleanupStack::PushL(store); 
+    
+    // save the attachments
+    HandleAttachementsL(parameters, store, err);
+//    for (TInt i=0; i<parameters.iAttachments->Count(); i++)
+//        {
+//        TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(i) );
+//
+//        TParse parser;
+//        parser.Set(sourceFileName, NULL, NULL);
+//        TFileName shortFileName = parser.NameAndExt();
+//
+//        // get the mime type
+//        RApaLsSession ls;
+//        User::LeaveIfError(ls.Connect());
+//        CleanupClosePushL<RApaLsSession>(ls);
+//        TUid appUid;
+//        TDataType dataType;
+//        ls.AppForDocument(sourceFileName, appUid, dataType);
+//        CleanupStack::PopAndDestroy(); //ls
+//        TPtrC8 mimeType = dataType.Des8();
+//        
+//        // attachment settings
+//        MMsvAttachmentManager& attachMan = store->AttachmentManagerL();
+//        CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred
+//        attachmentInfo->SetAttachmentNameL( shortFileName );        
+//        attachmentInfo->SetMimeTypeL( mimeType );        
+//
+//        // save
+//        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+//
+//        TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus ));
+//        if (err == KErrNone)
+//            waiter->StartAndWait();
+//        else
+//            LOGSTRING2("Creator: CCreatorMessages::CreateEmailEntryL failed to attach %S", &sourceFileName);
+//
+//        CleanupStack::PopAndDestroy(waiter);  
+//        }
+
+    // save the changes made to the message store
+    store->CommitL();
+    CleanupStack::PopAndDestroy(store); 
+            
+    // save the message      
+    clientMtm->SaveMessageL();
+    	
+	// final fine tuning
+	TMsvEmailEntry temailEntry = static_cast<TMsvEmailEntry>(messageEntry);
+    temailEntry.SetMessageFolderType(EFolderTypeUnknown);
+    temailEntry.SetDisconnectedOperation(ENoDisconnectedOperations);
+    temailEntry.SetEncrypted(EFalse);
+    temailEntry.SetSigned(EFalse);
+    temailEntry.SetVCard(EFalse);
+    temailEntry.SetVCalendar(EFalse);
+    temailEntry.SetReceipt(EFalse);
+    temailEntry.SetMHTMLEmail(EFalse);
+    temailEntry.SetBodyTextComplete(ETrue);
+    
+	if (parameters.iAttachments->Count() > 0)
+        temailEntry.SetAttachment(ETrue);
+    else
+        temailEntry.SetAttachment(EFalse);
+	
+    temailEntry.iDate.HomeTime();
+    temailEntry.SetVisible(ETrue);
+    temailEntry.SetInPreparation(EFalse);
+    if (parameters.iCreateAsUnread)
+        {
+        temailEntry.SetUnread(ETrue);
+        temailEntry.SetNew(ETrue);
+        }
+    else
+        {
+        temailEntry.SetUnread(EFalse);
+        temailEntry.SetNew(EFalse);
+        }
+    temailEntry.SetComplete(ETrue);
+    temailEntry.iServiceId = defaultServiceId;
+    temailEntry.iRelatedId = 0;
+    
+    clientMtm->Entry().ChangeL(temailEntry);
+
+    // reset email headers
+    CImHeader* header = CImHeader::NewLC();
+    CMsvStore* msvStore = msvEntry->EditStoreL();
+    CleanupStack::PushL(msvStore);
+    header->RestoreL(*msvStore);
+    header->SetSubjectL( parameters.iMessageSubject->Des() );
+    if( iSenderArray.Count() == 0 )
+        {
+        GetSendersL(iSenderArray, parameters, ETrue, KUndef );
+        }
+    
+    if( iSenderArray.Count() > 0 )
+        {
+        TInt rndNum = iEngine->RandomNumber( iSenderArray.Count() );
+        header->SetFromL(iSenderArray[rndNum]->Des());
+        }
+    else
+        {
+        header->SetFromL( parameters.iSenderAddress->Des() );
+        }
+    if( parameters.iRecipientAddress->Length() > 0 )
+        {
+        header->SetReceiptAddressL( parameters.iRecipientAddress->Des() );
+        }
+    else if( parameters.iRecipientAddressArray.Count() > 0 )
+        {
+        header->SetReceiptAddressL( parameters.iRecipientAddressArray[0]->Des());
+        }
+    
+    header->StoreL( *msvStore );
+    msvStore->CommitL();
+    CleanupStack::PopAndDestroy(2); // msvStore, header
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iEntryIds.AppendL( messageEntry.Id() );
+    
+    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm 
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateSmartMessageEntryL(const CMessagesParameters& parameters)
+    {
+    LOGSTRING("Creator: CCreatorMessages::CreateSmartMessageEntryL");
+
+    TInt err = KErrNone;
+
+    // init
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
+    CleanupStack::PushL(registry);
+
+    // get the client mtm and return if it isn't supported in the system        
+    CSmsClientMtm* clientMtm = NULL;
+    TRAP(err, clientMtm = static_cast<CSmsClientMtm*>(registry->NewMtmL(KUidMsgTypeSMS)));
+    if (err || !clientMtm)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("BIO: Message type module not found"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        }  
+    CleanupStack::PushL(clientMtm);   
+
+    // create a new object to access an existing entry
+    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
+    CleanupStack::PushL(msvEntry);
+  
+    // get default service
+    TMsvId defaultServiceId = 0;
+    TRAP(err, defaultServiceId = clientMtm->DefaultServiceL());
+    if (err)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("SMS: Define a SMS centre first"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        } 
+    
+    // set folder type
+    switch (parameters.iFolderType)
+        {
+        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
+        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
+        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
+        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
+        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
+        }
+        
+    // mtm takes ownership of entry context	
+    CleanupStack::Pop(msvEntry);
+    clientMtm->SetCurrentEntryL(msvEntry);    
+    
+    // create a new message
+    clientMtm->CreateMessageL(defaultServiceId);
+
+     // set the from field to sms header
+    if (parameters.iFolderType == EInbox)
+        {
+        CSmsHeader* smsHeader = &clientMtm->SmsHeader();
+        delete smsHeader;
+        smsHeader = NULL;
+        smsHeader = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, clientMtm->Body());
+        if( parameters.iSenderAddress )
+            {
+            smsHeader->SetFromAddressL( parameters.iSenderAddress->Des() );
+            }
+        else
+            {
+            smsHeader->SetFromAddressL(KEmpty);
+            }
+        }       
+
+    // set body, the BIO message itself
+    clientMtm->Body().Reset();
+    clientMtm->Body().InsertL(0, _L("Business Card\nTester Mike\nThe Company Ltd.\nSoftware Engineer\ntel +358 66 1234567\n")); 
+
+    // get the entry of the message
+    TMsvEntry messageEntry = clientMtm->Entry().Entry();
+
+    // TO-DO: Add support for all BIO messages, currently just insert a business card message ... :
+    // set the message type
+    // parameters.iBIOMessageType ...
+    clientMtm->BioTypeChangedL(KUidBIOBusinessCardMsg);
+    messageEntry.iBioType = KUidBIOBusinessCardMsg.iUid;
+
+    // set the details field
+    if (parameters.iFolderType == EInbox)
+        {
+        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);        
+        }        
+    else
+        {
+        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
+        }
+
+    // set the subject line
+    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
+
+    // set correct MTM type
+    messageEntry.iMtm= KUidBIOMessageTypeMtm;
+
+    // save the changes done above
+    clientMtm->Entry().ChangeL(messageEntry);
+
+    // save the message     
+    clientMtm->SaveMessageL();
+    	
+	// final fine tuning
+    messageEntry.SetAttachment(EFalse);
+    messageEntry.iDate.HomeTime();
+    messageEntry.SetVisible(ETrue);
+    messageEntry.SetInPreparation(EFalse);
+    if (parameters.iCreateAsUnread)
+        {
+        messageEntry.SetUnread(ETrue);
+        messageEntry.SetNew(ETrue);
+        }
+    else
+        {
+        messageEntry.SetUnread(EFalse);
+        messageEntry.SetNew(EFalse);
+        }
+    messageEntry.SetComplete(ETrue);
+    messageEntry.iServiceId = defaultServiceId;
+    messageEntry.iRelatedId = 0;
+    clientMtm->Entry().ChangeL(messageEntry);
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iEntryIds.AppendL( messageEntry.Id() );
+    
+    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm
+        
+    
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorMessages::CreateObexEntryL(TUid aMtm, const CMessagesParameters& parameters)
+    {
+    LOGSTRING("Creator: CCreatorMessages::CreateObexEntryL");
+
+    TInt err = KErrNone;
+
+    // init
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
+    CleanupStack::PushL(registry);
+
+    // get the client mtm and return if it isn't supported in the system        
+    CObexClientMtm* clientMtm = NULL;
+    TRAP(err, clientMtm = static_cast<CObexClientMtm*>(registry->NewMtmL(aMtm)));
+    if (err || !clientMtm)
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage(_L("Obex: Message type module not found"));
+        CleanupStack::PopAndDestroy(2);
+        User::Leave(KErrNotFound);
+        }  
+    CleanupStack::PushL(clientMtm);   
+
+    // create a new object to access an existing entry
+    CMsvEntry* msvEntry = CMsvEntry::NewL(*session, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
+    CleanupStack::PushL(msvEntry);
+  
+    // define default service
+    TMsvId defaultServiceId = 0;
+    
+    // set folder type
+    switch (parameters.iFolderType)
+        {
+        case EInbox:    { msvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);   break; }
+        case EDrafts:   { msvEntry->SetEntryL(KMsvDraftEntryId);              break; }
+        case EOutbox:   { msvEntry->SetEntryL(KMsvGlobalOutBoxIndexEntryId);  break; }
+        case ESent:     { msvEntry->SetEntryL(KMsvSentEntryId);               break; }
+        default:        { User::Panic(_L("Folder Type"), 871);                break; } 
+        }
+        
+    // mtm takes ownership of entry context	
+    CleanupStack::Pop(msvEntry);
+    clientMtm->SetCurrentEntryL(msvEntry);    
+    
+    // create a new message
+    clientMtm->CreateMessageL(defaultServiceId);
+
+    // get the entry of the message
+    TMsvEntry messageEntry = clientMtm->Entry().Entry();
+
+    // set subject
+    clientMtm->SetSubjectL( parameters.iMessageSubject->Des() );
+    messageEntry.iDescription.Set( parameters.iMessageSubject->Des().Left(KSmsDescriptionLength) );
+
+    // set body, must be empty for obex messages
+    clientMtm->Body().Reset();
+
+    // set the details field and
+    if (parameters.iFolderType == EInbox)
+        {
+        SetSenderToEntryDetailsL(messageEntry, parameters, EFalse);
+        }        
+    else
+        {
+        SetRecipientToEntryDetailsL(messageEntry, parameters, EFalse);
+        }
+    
+    // set mtm
+    messageEntry.iMtm = aMtm;
+    messageEntry.iType = KUidMsvMessageEntry;
+    messageEntry.iServiceId = KMsvUnknownServiceIndexEntryId;
+
+    // save the changes done above
+    clientMtm->Entry().ChangeL(messageEntry);
+
+    // save the message      
+    clientMtm->SaveMessageL();
+    	
+	// final fine tuning
+    messageEntry.iDate.HomeTime();
+    messageEntry.SetVisible(ETrue);
+    messageEntry.SetInPreparation(EFalse);
+    if (parameters.iCreateAsUnread)
+        {
+        messageEntry.SetUnread(ETrue);
+        messageEntry.SetNew(ETrue);
+        }
+    else
+        {
+        messageEntry.SetUnread(EFalse);
+        messageEntry.SetNew(EFalse);
+        }
+    messageEntry.SetComplete(ETrue);
+    clientMtm->Entry().ChangeL(messageEntry);
+    
+    // save the attachment
+    if (parameters.iAttachments->Count() >= 1)
+        {
+        // create a new entry for the attachment
+        TMsvEntry attachTEntry;
+        attachTEntry.iType      = KUidMsvAttachmentEntry;
+        attachTEntry.iServiceId = KMsvUnknownServiceIndexEntryId;   
+        attachTEntry.iMtm       = KUidMsgTypeBt; //save as bt message
+        
+        msvEntry->CreateL(attachTEntry);
+        
+        CMsvEntry* attachEntry = session->GetEntryL(attachTEntry.Id());
+        clientMtm->SetCurrentEntryL(attachEntry);
+                
+        // get source file
+        TFileName sourceFileName = iEngine->TestDataPathL( (CCreatorEngine::TTestDataPath) parameters.iAttachments->At(0) );
+
+        // get the mime type
+        RApaLsSession ls;
+        User::LeaveIfError(ls.Connect());
+        CleanupClosePushL<RApaLsSession>(ls);
+        TUid appUid;
+        TDataType mimeType;
+        ls.AppForDocument(sourceFileName, appUid, mimeType);
+        CleanupStack::PopAndDestroy(); //ls
+        
+        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+
+        // add an attachment to the current message entry
+        TRAP(err, clientMtm->AddAttachmentL( sourceFileName, mimeType.Des8(), 0, waiter->iStatus ));
+        if (err == KErrNone)
+            waiter->StartAndWait();
+        else
+            LOGSTRING2("Creator: CCreatorMessages::CreateObexEntryL failed to attach %S", &sourceFileName);
+        
+        CleanupStack::PopAndDestroy(waiter);
+        }
+    
+    // id has been generated, store it for being able to delete
+    // only entries created with Creator
+    iEntryIds.AppendL( messageEntry.Id() );
+    
+    CleanupStack::PopAndDestroy(3); //session, registry, clientMtm 
+
+
+    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+void CCreatorMessages::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
+    {
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::SetSenderToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress)
+    {        
+    // Only one sender allowed:
+    if( iSenderArray.Count() == 0 )
+        {
+        GetSendersL(iSenderArray, aParameters, aUseEmailAddress, KUndef );
+        }
+    if( iSenderArray.Count() > 0 )
+        {        
+        TInt rnd = iEngine->RandomNumber( iSenderArray.Count() );
+        aMsgEntry.iDetails.Set( iSenderArray[rnd]->Des() );        
+        }
+    else
+        {
+        aMsgEntry.iDetails.Set(KEmpty);
+        }        
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::SetRecipientToEntryDetailsL(TMsvEntry& aMsgEntry, const CMessagesParameters& aParameters, TBool aUseEmailAddress)
+    {        
+    // Only one sender allowed:
+    GetAllRecipientsL(iRecipientArray, aParameters, aUseEmailAddress);
+    if( iRecipientArray.Count() > 0 )
+        {
+        const TDesC& temp = iRecipientArray[0]->Des();
+        aMsgEntry.iDetails.Set( temp );
+        }
+    else
+        {
+        aMsgEntry.iDetails.Set(KEmpty);
+        }        
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::AddSenderToMtmAddresseeL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
+    {    
+    // Only one sender allowed:
+    if( iSenderArray.Count() == 0 )
+        {
+        GetSendersL(iSenderArray, aParameters, aUseEmailAddress, 1 );
+        }
+    
+    for( TInt i = 0; i < iSenderArray.Count(); ++i )
+        {
+        aMtm.AddAddresseeL( iSenderArray[i]->Des() );        
+        }    
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::AddMtmSenderL(CMmsClientMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
+    {    
+    // Only one sender allowed:
+    if( iSenderArray.Count() == 0 )
+        {
+        GetSendersL(iSenderArray, aParameters, aUseEmailAddress, 1 );
+        }
+    
+    if( iSenderArray.Count() > 0 )
+        {
+        aMtm.SetSenderL( iSenderArray[0]->Des() );        
+        }    
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::GetSendersL(RPointerArray<HBufC>& aSenderArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress, TInt aMaxNum )
+    {
+    TInt counter = 0;
+    
+    if( counter < aMaxNum || aMaxNum == KUndef )
+        {
+        if( aParameters.iSenderAddress && aParameters.iSenderAddress->Length() > 0 )
+            {
+            HBufC* temp = HBufC::NewL(aParameters.iSenderAddress->Length());
+            CleanupStack::PushL(temp);
+            temp->Des().Copy(aParameters.iSenderAddress->Des());
+            aSenderArray.AppendL( temp );
+            CleanupStack::Pop(); // temp
+            ++counter;
+            }
+        }
+            
+    if( counter < aMaxNum || aMaxNum == KUndef )
+        {
+        RPointerArray<HBufC> tempArray;
+        CleanupResetAndDestroyPushL( tempArray );
+        GetLinkedAddressesL(tempArray, aParameters.iSenderLinkIds, aUseEmailAddress, aParameters.iNumberOfExistingSenders);
+        for( TInt i = 0; i < tempArray.Count() && (counter < aMaxNum || aMaxNum == KUndef); ++i )
+            {
+            HBufC* temp = tempArray[i]->AllocLC();
+            aSenderArray.AppendL(temp);
+            CleanupStack::Pop(); // temp
+            ++counter;
+            }
+        CleanupStack::PopAndDestroy(); // tempArray
+        }    
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::AddRecipientsL(CBaseMtm& aMtm, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
+    {
+    GetAllRecipientsL(iRecipientArray, aParameters, aUseEmailAddress);
+    for( TInt i = 0; i < iRecipientArray.Count(); ++i )
+        {
+        aMtm.AddAddresseeL( iRecipientArray[i]->Des() );        
+        }    
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::GetAllRecipientsL(RPointerArray<HBufC>& aRecipientArray, const CMessagesParameters& aParameters, TBool aUseEmailAddress )
+    {
+    
+    // If iRecipientAddress is given, add it to the array:
+    if( aParameters.iRecipientAddress && aParameters.iRecipientAddress->Length() > 0 )
+        {
+        HBufC* temp = HBufC::NewL(aParameters.iRecipientAddress->Length());
+        CleanupStack::PushL(temp);
+        temp->Des().Copy(aParameters.iRecipientAddress->Des());
+        aRecipientArray.AppendL( temp );
+        CleanupStack::Pop(); // temp
+        }
+    
+    // Add all recipients listed in iRecipientAddressArray:
+    for( TInt i = 0; i < aParameters.iRecipientAddressArray.Count(); ++i )
+        {
+        HBufC* temp = HBufC::NewL(aParameters.iRecipientAddressArray[i]->Length());
+        CleanupStack::PushL(temp);
+        temp->Des().Copy(aParameters.iRecipientAddressArray[i]->Des());
+        aRecipientArray.AppendL( temp );
+        CleanupStack::Pop(); // temp        
+        }
+    
+    // Get all linked addresses. 
+    GetLinkedAddressesL(aRecipientArray, aParameters.iRecipientLinkIds, aUseEmailAddress, aParameters.iNumberOfExistingRecipients);
+    }
+
+/*
+ * Get all linked addresses. This method gets addresses that are linked with contact-set id and 
+ * existing addresses from the contact database, if required.
+ */
+void CCreatorMessages::GetLinkedAddressesL(
+        RPointerArray<HBufC>& aAddressArray, 
+        const RArray<TLinkIdParam>& aLinkIds, 
+        TBool aUseEmailAddress,
+        TInt /*aNumOfExistingAddresses*/ )
+    {
+    CCreatorPhonebook* phonebook = dynamic_cast<CCreatorPhonebook*>(iEngine->GetPhonebook());
+    User::LeaveIfNull( phonebook );
+    CCreatorPhonebookWrapper* phonebookWrapper = phonebook->GetPhonebookWrapper();
+    
+    for( TInt i = 0; i < aLinkIds.Count(); ++i )
+        {
+        const CCreatorContactSet& set = ContactLinkCache::Instance()->ContactSet(aLinkIds[i].iLinkId);
+        const RArray<TUint32> links = set.ContactLinks();//ContactLinkCache::Instance()->ContactSets();//set.ContactLinks();
+        TInt numberOfExplicitLinks = links.Count(); // Number of defined contacts in contact-set
+        for( TInt j = 0; j < numberOfExplicitLinks; ++j )
+            {
+            TBuf<128> name;
+            TBuf<128> email;
+            TBuf<128> phoneNumber;
+            phonebookWrapper->GetContactDetailsL( links[j], name, phoneNumber, email );
+            HBufC* address = ( aUseEmailAddress ? email.AllocLC() : phoneNumber.AllocLC() );
+            aAddressArray.AppendL( address );
+            CleanupStack::Pop( address );
+            }
+        }
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorMessages::DeleteAllL");
+    DeleteAllMessagesL( EFalse );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::DeleteAllMessagesL( TBool aOnlyCreatedWithCreator )
+    {
+    LOGSTRING("Creator: CCreatorMessages::DeleteAllMessagesL");
+    TInt err( KErrNone );
+    
+    // init
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL( session );
+    CClientMtmRegistry* registry = CClientMtmRegistry::NewL(*session);
+    CleanupStack::PushL( registry );
+
+    // get the client mtm and return if it isn't supported in the system        
+    CSmsClientMtm* clientMtm( NULL );
+    TRAP( err, clientMtm = static_cast<CSmsClientMtm*>( registry->NewMtmL( KUidMsgTypeSMS ) ) );
+    if ( err || !clientMtm )
+        {
+        iEngine->GetEngineWrapper()->ShowErrorMessage( _L( "SMS: Message type module not found" ) );
+        CleanupStack::PopAndDestroy( 2 );
+        User::Leave( KErrNotFound );
+        }
+    CleanupStack::PushL( clientMtm );
+    
+    TRAP_IGNORE( DeleteAllFromFolderL( KMsvGlobalInBoxIndexEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
+    TRAP_IGNORE( DeleteAllFromFolderL( KMsvDraftEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
+    TRAP_IGNORE( DeleteAllFromFolderL( KMsvGlobalOutBoxIndexEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
+    TRAP_IGNORE( DeleteAllFromFolderL( KMsvSentEntryId, session, clientMtm, aOnlyCreatedWithCreator ) );
+    
+    // reset must be done here, because iEntryIds is stored in destructor
+    iEntryIds.Reset();
+    
+    // all entries deleted, remove the Messages related registry
+    iEngine->RemoveStoreL( KUidDictionaryUidMessages );
+
+    CleanupStack::PopAndDestroy( clientMtm );
+    CleanupStack::PopAndDestroy( registry );
+    CleanupStack::PopAndDestroy( session );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::DeleteAllFromFolderL( const TMsvId aContext, 
+                                             CMsvSession* aSession,
+                                             CSmsClientMtm* aClientMtm,
+                                             TBool aOnlyCreatedWithCreator )
+    {
+    LOGSTRING("Creator: CCreatorMessages::DeleteAllFromFolderL");
+    
+    TMsvSelectionOrdering sort;
+    sort.SetShowInvisibleEntries( ETrue );
+
+    CMsvEntry* inboxContext = CMsvEntry::NewL( *aSession, aContext, sort );
+    CleanupStack::PushL( inboxContext );
+
+    CMsvEntrySelection* entries = inboxContext->ChildrenL();
+    CleanupStack::PushL( entries );
+
+    TInt msgCount = entries->Count();
+    for ( TInt i = 0; i < entries->Count(); i++)
+        {
+        TMsvId entryID = entries->At(i);
+        aClientMtm->SwitchCurrentEntryL( entryID );
+
+        if ( !aOnlyCreatedWithCreator || iEntryIds.Find( entryID ) != KErrNotFound )
+            {
+            CMsvEntry* entry = aSession->GetEntryL( (*entries)[i] );
+            CleanupStack::PushL( entry );
+
+            entry->DeleteL( entries->At(i) );
+            CleanupStack::PopAndDestroy( entry );            
+            }
+        }
+    
+    CleanupStack::PopAndDestroy( entries );
+    CleanupStack::PopAndDestroy( inboxContext );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorMessages::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorMessages::DeleteAllCreatedByCreatorL");
+    
+    iEntryIds.Reset();
+    
+    // fetch ids of entries created by Creator
+    iEngine->ReadEntryIdsFromStoreL( iEntryIds, KUidDictionaryUidMessages );
+    
+    // delete them
+    DeleteAllMessagesL( ETrue );
+    }
+
+CRecipientInfo::CRecipientInfo() 
+    {
+    
+    }
+
+CRecipientInfo::~CRecipientInfo()
+    {
+    delete iPhoneNumber;
+    delete iEmailAddress;
+    }
+
+void CRecipientInfo::SetPhoneNumber(HBufC* aPhone)
+    {
+    delete iPhoneNumber;    
+    iPhoneNumber = aPhone;    
+    }
+
+void CRecipientInfo::SetEmailAddress(HBufC* aEmail)
+    {
+    delete iEmailAddress;    
+    iEmailAddress = aEmail;    
+    }
+
+const HBufC* CRecipientInfo::PhoneNumber() const
+    {
+    return iPhoneNumber;
+    }
+
+const HBufC* CRecipientInfo::EmailAddress() const
+    {
+    return iEmailAddress;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_messageelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,475 @@
+/*
+* 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 "creator_messageelement.h"
+#include "creator_traces.h"
+#include "creator_message.h"
+
+using namespace creatormsg;
+
+/*
+ * 
+ */
+CCreatorMessageElement* CCreatorMessageElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorMessageElement* self = new (ELeave) CCreatorMessageElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorMessageElement::CCreatorMessageElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
+/*
+ * Sets message type
+ */
+void CCreatorMessageElement::SetMessageTypeL(CMessagesParameters& aParameters, const TDesC& aMsgTypeStr ) const
+    {
+    if( CompareIgnoreCase(aMsgTypeStr, KSms) == 0 )
+        {
+        aParameters.iMessageType = ESMS;
+        }
+    else if( CompareIgnoreCase(aMsgTypeStr, KMms) == 0 )
+        {
+        aParameters.iMessageType = EMMS;
+        }
+    else if( CompareIgnoreCase(aMsgTypeStr, KAms) == 0 )
+        {
+        aParameters.iMessageType = EAMS;
+        }
+    else if( CompareIgnoreCase(aMsgTypeStr, KEmail) == 0 )
+        {
+        aParameters.iMessageType = EEmail;
+        }
+    else if( CompareIgnoreCase(aMsgTypeStr, KSmart) == 0 )
+        {
+        aParameters.iMessageType = ESmartMessage;
+        }
+    else if( CompareIgnoreCase(aMsgTypeStr, KIr) == 0 )
+        {
+        aParameters.iMessageType = EIrMessage;
+        }
+    else if( CompareIgnoreCase(aMsgTypeStr, KBt) == 0 )
+        {
+        aParameters.iMessageType = EBTMessage;
+        }
+    else
+        {
+        LOGSTRING2("ERROR in CCreatorMessageElement::SetMessageTypeL: Unknown message type: %S", &aMsgTypeStr);
+        User::Leave(KErrGeneral);
+        }
+    }
+/*
+ * Returns maximum length of the body text, when randomlength=max is used.
+ */
+TInt CCreatorMessageElement::GetMaxBodyLength( const TDesC& aMsgType ) const
+    {
+    TInt len = 0;
+    if( CompareIgnoreCase(aMsgType, KSms) == 0 )
+        {
+        len = 160;
+        }
+    else if( CompareIgnoreCase(aMsgType, KMms) == 0 )
+        {
+        len = 160;
+        }    
+    else if( CompareIgnoreCase(aMsgType, KEmail) == 0 )
+        {
+        len = 1024;
+        }
+    else
+        {
+        len = KUndef;
+        }
+    return len;
+    }
+/*
+ * Returns random body text length
+ */
+TInt CCreatorMessageElement::GetRandomBodyLengthL(const TDesC& aRandomLenStr, const TDesC& aMsgType ) const
+    {
+    TInt len = 0;
+    if( aRandomLenStr == KMax )
+        {
+        len = GetMaxBodyLength(aMsgType);
+        }
+    else if( aRandomLenStr == KDefault )
+        {
+        len = KUndef;        
+        }
+    else
+        {
+        len = ConvertStrToIntL(aRandomLenStr);
+        }
+    return len;
+    }
+
+/*
+ * Creates random message address (To/From)
+ * Returns phone number for SMS, MMS, AMS and Smart messages.
+ * Email address for others
+ */
+HBufC* CCreatorMessageElement::CreateMessageAddressLC(const TDesC& msgType)
+    {
+    HBufC* toAddr;
+    if( CompareIgnoreCase(msgType, KSms) == 0 || 
+        CompareIgnoreCase(msgType, KMms) == 0 || 
+        CompareIgnoreCase(msgType, KAms) == 0 || 
+        CompareIgnoreCase(msgType, KSmart) == 0)
+        {
+        TPtrC temp = iEngine->RandomString(CCreatorEngine::EPhoneNumber);
+        toAddr = HBufC::NewL(temp.Length());
+        CleanupStack::PushL(toAddr);
+        toAddr->Des().Copy(temp);
+        }
+    else
+        {
+        toAddr = iEngine->CreateEmailAddressLC();
+        }
+    return toAddr;
+    }
+
+/*
+ *
+ */
+void CCreatorMessageElement::ExecuteCommandL()
+    {
+    LOGSTRING("Creator: CCreatorMessageElement::ExecuteCommandL");
+    
+    // Find out the message type:
+    const CCreatorScriptAttribute* msgTypeAttr = this->FindAttributeByName(KType);
+    TPtrC msgType;
+    if( msgTypeAttr )
+        {
+        msgType.Set(msgTypeAttr->Value());
+        }
+    else
+        {
+        LOGSTRING("ERROR in CCreatorMessageElement::ExecuteCommandL: Type attribute is missing.");
+        User::Leave(KErrGeneral); // type is required attribute
+        }
+    
+    // Find out the amount of calendar entries:
+    const CCreatorScriptAttribute* msgAmountAttr = this->FindAttributeByName(KAmount);
+    TInt msgAmount = 1;    
+    if( msgAmountAttr )
+        {
+        msgAmount = ConvertStrToIntL(msgAmountAttr->Value());
+        }    
+    
+    // Get 'fields' element 
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
+        {
+        // Get sub-elements (i.e the message field elements)
+        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();
+        
+        // Create message entries, the amount of entries is defined by msgAmount:
+        for( TInt cI = 0; cI < msgAmount; ++cI )
+            {
+            CMessagesParameters* param = new (ELeave) CMessagesParameters;
+            CleanupStack::PushL(param);
+            
+            // Message type:
+            if( msgTypeAttr )
+                {
+                SetMessageTypeL(*param, msgTypeAttr->Value());
+                }           
+            
+            // Loop all the message field elements:
+            for( TInt i = 0; i < fields.Count(); ++i )
+                {
+                CCreatorScriptElement* field = fields[i];
+                TPtrC elemName = field->Name();
+                TPtrC elemContent = field->Content();
+                const RPointerArray<CCreatorScriptElement>& contactReferences = field->SubElements();
+                const CCreatorScriptAttribute* randomAttr = field->FindAttributeByName(KRandomLength);
+                const CCreatorScriptAttribute* amountAttr = field->FindAttributeByName(KAmount);
+                const CCreatorScriptAttribute* increaseAttr = field->FindAttributeByName(KIncrease);
+                TBool increase( EFalse );
+                if ( increaseAttr )
+                    {
+                    increase = ConvertStrToBooleanL( increaseAttr->Value() );
+                    }
+                TInt fieldAmount = 1;
+                if( amountAttr )
+                    {
+                    fieldAmount = ConvertStrToIntL(amountAttr->Value());
+                    }               
+                
+                if( elemName == KTo )
+                    {
+                    // Recipient ('to'-field)
+                    for( TInt amountIndex = 0; amountIndex < fieldAmount; ++amountIndex )
+                        {
+                        if( (randomAttr || elemContent.Length() == 0 ) && contactReferences.Count() == 0 )
+                            {                        
+                            // Random content
+                            HBufC* toAddr = CreateMessageAddressLC(msgType);
+                            if( toAddr )
+                                {
+                                param->iRecipientAddressArray.AppendL(toAddr);
+                                CleanupStack::Pop(); // toAddr
+                                }
+                            }
+                        else
+                            {                            
+                            if( elemContent.Length() > 0 && contactReferences.Count() == 0)
+                                {
+                                // Explicit recipient given
+                                HBufC* recipient = HBufC::NewL( elemContent.Length() + 3 );
+                                CleanupStack::PushL(recipient);
+                                if ( increase )
+                                    {
+                                    IncreasePhoneNumL( elemContent, cI, recipient );
+                                    }
+                                else
+                                    {
+                                    recipient->Des().Copy(elemContent);
+                                    }
+                                param->iRecipientAddressArray.AppendL(recipient);
+                                CleanupStack::Pop(); // recipient
+                                }
+                            else
+                                {
+                                // Recipients specified with contact-set-references (if any)
+                                for( TInt csI = 0; csI < contactReferences.Count(); ++csI )
+                                    {                            
+                                    CCreatorScriptElement* contactSetRef = contactReferences[csI];
+                                    AppendContactSetReferenceL(*contactSetRef, param->iRecipientLinkIds);                                
+                                    }
+                                }
+                            }
+                        }
+                    }
+                else if( elemName == KFrom )
+                    {
+                    // Sender ('from'-field)
+                    // Amount attribute for sender is ignored, because there can be only one sender                 
+                    delete param->iSenderAddress;
+                    param->iSenderAddress = 0;
+                    if( (randomAttr || elemContent.Length() == 0 ) && contactReferences.Count() == 0 )
+                        {
+                        // Get random address
+                        param->iSenderAddress = CreateMessageAddressLC(msgType);
+                        CleanupStack::Pop(); // param->iSenderAddress
+                        }
+                    else
+                        {                        
+                        if( elemContent.Length() > 0 && contactReferences.Count() == 0)
+                            {
+                            // Explicit sender address given
+                            param->iSenderAddress = HBufC::NewL(elemContent.Length());
+                            if ( increase )
+                                {
+                                IncreasePhoneNumL( elemContent, cI, param->iSenderAddress );
+                                }
+                            else
+                                {
+                                param->iSenderAddress->Des().Copy(elemContent);
+                                }
+                            }
+                        else
+                            {
+                            // Senders specified with contact-set-references (if any)
+                            for( TInt csI = 0; csI < contactReferences.Count(); ++csI )
+                                {                            
+                                CCreatorScriptElement* contactSetRef = contactReferences[csI];
+                                AppendContactSetReferenceL(*contactSetRef, param->iSenderLinkIds);                                
+                                }
+                            }                           
+                        }
+                    }
+                else if( elemName == KFolder )              
+                    {
+                    // Folder type
+                    if( CompareIgnoreCase(elemContent, KSent) == 0 )
+                        {
+                        param->iFolderType = ESent;
+                        }
+                    else if( CompareIgnoreCase(elemContent, KInbox) == 0 )
+                        {
+                        param->iFolderType = EInbox;
+                        }
+                    else if( CompareIgnoreCase(elemContent, KOutbox) == 0 )
+                        {
+                        param->iFolderType = EOutbox;
+                        }
+                    else if( CompareIgnoreCase(elemContent, KDraft) == 0 )
+                        {
+                        param->iFolderType = EDrafts;
+                        }                        
+                    }
+                else if( elemName == KSubject )
+                    {
+                    // Message subject
+                    delete param->iMessageSubject;
+                    param->iMessageSubject = 0;
+                    
+                    if( randomAttr || elemContent.Length() == 0 )
+                        {
+                        // Random data should be used
+                        TPtrC temp = iEngine->RandomString(CCreatorEngine::EMessageSubject);
+                        param->iMessageSubject = HBufC::NewL(temp.Length());
+                        param->iMessageSubject->Des().Copy(temp);
+                        }
+                    else
+                        {                        
+                        param->iMessageSubject = HBufC::NewL(elemContent.Length());
+                        param->iMessageSubject->Des().Copy(elemContent);
+                        }
+                    }
+                else if( elemName == KText )
+                    {
+                    // Body text
+                    delete param->iMessageBodyText;
+                    param->iMessageBodyText = 0;
+                    
+                    if( randomAttr || elemContent.Length() == 0 )
+                        {
+                        // Put random text:
+                        if( randomAttr && randomAttr->Value() != KDefault )
+                            {
+                            // Get the random length
+                            TInt len = GetRandomBodyLengthL(randomAttr->Value(), msgTypeAttr->Value());
+                            if( len != KUndef )
+                                {
+                                param->iMessageBodyText = iEngine->CreateRandomStringLC(len);
+                                CleanupStack::Pop(); // param->iMessageBodyText
+                                }
+                            }
+                        else
+                            {
+                            // Use default random data
+                            TPtrC temp = iEngine->RandomString(CCreatorEngine::EMessageText);
+                            param->iMessageBodyText = HBufC::NewL(temp.Length());
+                            param->iMessageBodyText->Des().Copy(temp);
+                            }
+                        }
+                    else
+                        {
+                        param->iMessageBodyText = HBufC::NewL(elemContent.Length());
+                        param->iMessageBodyText->Des().Copy(elemContent);
+                        }
+                    }
+                else if( elemName == KAttachmentId )
+                    {
+                    // Attachment file id
+                    for( TInt amountIndex = 0; amountIndex < fieldAmount; ++amountIndex )
+                        {                        
+                        if( randomAttr  || elemContent.Length() == 0)
+                            {
+                            //When type is AMS, attachement will be audio
+                            if(param->iMessageType == EAMS)
+                                {
+                                param->iAttachments->AppendL(CCreatorEngine::EMP3_250kB);
+                                }
+                            //Otherwise attachement can be any file
+                            else
+                                {
+                                //EJPEG_25kB is first (0) in the enum and LAST_FILE_ID is last in the enum, so real last item id is one before LAST_FILE_ID
+                                param->iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID-1) );                                
+                                }
+                            }
+                        else
+                            {
+                            //When user has been set attechment by it self, we trust user selection (not validating value, e.g. if message is SMS and there is attachement)
+                            TInt id = iEngine->GetAttachmentIdL(elemContent);
+                            if( id != KUndef )
+                                {
+                                param->iAttachments->AppendL( id );
+                                }
+                            }
+                        }
+                    }
+                // Attachment file path handling 
+                //E.g. C:\data\others\DOC-20kB.doc
+                else if( elemName == KAttachmentPath )
+                    {
+                    // Attachment file id
+                    for( TInt amountIndex = 0; amountIndex < fieldAmount; ++amountIndex )
+                        {
+                        //Path is random, getting one of the files (not even using path attribute, but id with random)
+                        if( randomAttr  || elemContent.Length() == 0)
+                            {
+                            //EJPEG_25kB is first (0) in the enum and LAST_FILE_ID is last in the enum, so real last item id is one before LAST_FILE_ID
+                            param->iAttachments->AppendL( iEngine->RandomNumber(CCreatorEngine::EJPEG_25kB, CCreatorEngine::LAST_FILE_ID -1) );
+                            }
+                        //Otherwise adding attachement path as it is to paths.
+                        else
+                            {
+                            //Adding Attachement file path
+                            HBufC* elemData = elemContent.AllocLC();
+                            param->iAttachmentPaths.AppendL( elemData );     
+                            CleanupStack::Pop(elemData);
+                            }
+                        }
+                    }
+                else if ( elemName == KStatus )
+                    {
+                    if( CompareIgnoreCase( elemContent, KNew ) == 0 )
+                        {
+                        param->iCreateAsUnread = ETrue;
+                        }
+                    else if( CompareIgnoreCase( elemContent, KRead ) == 0 )
+                        {
+                        param->iCreateAsUnread = EFalse;
+                        }
+                    }
+                }
+            iEngine->AppendToCommandArrayL(ECmdCreateMessagingEntryMessagesViaScript, param);
+            CleanupStack::Pop(); // param
+            }
+        }
+    else
+    	{
+    	for( TInt i = 0; i < msgAmount; ++i )
+    		{
+    		TInt randMsg = 0;
+    		if( msgType == KSms )
+    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntrySMSInbox, ECmdCreateRandomEntrySMSSent);
+    		else if( msgType == KMms )
+    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryMMSInbox, ECmdCreateRandomEntryMMSSent);
+    		else if( msgType == KAms )
+    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryAMSInbox, ECmdCreateRandomEntryAMSSent);
+    		else if( msgType == KEmail )
+    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryEmailInbox, ECmdCreateRandomEntryEmailSent);
+    		else if( msgType == KSmart )
+    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryBIOInbox, ECmdCreateRandomEntryBIOSent);
+    		else if( msgType == KBt )
+    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryBTInbox, ECmdCreateRandomEntryBTSent);
+    		else if( msgType == KIr )
+    			randMsg = iEngine->RandomNumber(ECmdCreateRandomEntryIRInbox, ECmdCreateRandomEntryIRSent);
+    			
+    		if( randMsg > 0 )
+    			{
+    			iEngine->AppendToCommandArrayL(randMsg, 0, 1);
+    			}
+    		}
+    	}
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_note.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,146 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+
+#include "creator_note.h" 
+#include "creator_traces.h"
+
+//----------------------------------------------------------------------------
+
+CNotepadParameters::CNotepadParameters()
+    {
+    LOGSTRING("Creator: CNotepadParameters::CNotepadParameters");
+
+    iNoteText = HBufC::New(KNotepadFieldLength);
+    }
+
+CNotepadParameters::~CNotepadParameters()
+    {
+    LOGSTRING("Creator: CNotepadParameters::~CNotepadParameters");
+
+    delete iNoteText;
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorNotepad* CCreatorNotepad::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorNotepad* self = CCreatorNotepad::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorNotepad* CCreatorNotepad::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorNotepad* self = new (ELeave) CCreatorNotepad;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorNotepad::CCreatorNotepad() : iFs ( CEikonEnv::Static()->FsSession() )
+    {
+    }
+
+void CCreatorNotepad::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorNotepad::ConstructL");
+
+    iEngine = aEngine;
+    iNotepadWrapper = CCreatorNotepadWrapper::NewL();
+    }
+
+CCreatorNotepad::~CCreatorNotepad()
+    {
+    LOGSTRING("Creator: CCreatorNotepad::~CCreatorNotepad");
+    
+    if (iParameters)
+        {
+        delete iParameters;
+        iParameters = NULL;
+        }
+    
+    if (iNotepadWrapper)
+    	{
+		delete iNotepadWrapper;
+		iNotepadWrapper = NULL;
+    	}
+    }
+
+//----------------------------------------------------------------------------
+
+TBool CCreatorNotepad::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorNotepad::AskDataFromUserL");
+
+    CCreatorModuleBase::AskDataFromUserL(aCommand);
+        
+    if ( aCommand == ECmdDeleteNotes )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog( _L("Delete all Notes?"), this, ECreatorModuleDelete );
+        }
+    
+    // By Creator not supported because 
+    // note id is not available via Notepad API
+
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse,  this, ECreatorModuleStart );
+    }
+
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorNotepad::CreateNoteEntryL(CNotepadParameters *aParameters)
+    {
+    LOGSTRING("Creator: CCreatorNotepad::CreateNoteEntryL");
+
+    // clear any existing parameter definations
+    delete iParameters;
+    iParameters = NULL;
+    
+    // random data needed if no predefined data available
+    if (!aParameters)
+        {
+        iParameters = new(ELeave) CNotepadParameters;
+        }
+    else
+        {
+        iParameters = aParameters;
+        }
+
+    TPtr noteTextPtr = iParameters->iNoteText->Des();
+    noteTextPtr.Copy( iEngine->RandomString(CCreatorEngine::EMessageText).Left( noteTextPtr.MaxLength() ) );
+    
+    return iNotepadWrapper->CreateNoteL( noteTextPtr );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorNotepad::DeleteAllL()
+    {
+    LOGSTRING("Creator: CCreatorNotepad::DeleteAllL");
+    iNotepadWrapper->DeleteAllL();
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorNotepad::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorNotepad::DeleteAllCreatedByCreatorL");
+    // Not supported because note id is not available via Notepad API
+    User::Leave( KErrNotSupported );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_noteelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#include "creator_noteelement.h"
+#include "creator_traces.h"
+#include "creator_note.h"
+
+using namespace creatornote;
+
+/*
+ * 
+ */
+CCreatorNoteElement* CCreatorNoteElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext )
+    {
+    CCreatorNoteElement* self = new (ELeave) CCreatorNoteElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop(self);
+    return self;
+    }
+/*
+ * 
+ */
+CCreatorNoteElement::CCreatorNoteElement(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    {
+    iIsCommandElement = ETrue;
+    }
+
+void CCreatorNoteElement::ExecuteCommandL()
+    {
+    const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
+    TInt noteAmount = 1;    
+    if( amountAttr )
+        {
+        noteAmount = ConvertStrToIntL(amountAttr->Value());
+        }
+    // Get 'fields' element 
+    CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
+    if( fieldsElement && fieldsElement->SubElements().Count() > 0)
+        {
+        // Get sub-elements
+        const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();        
+        // Create note entries, the amount of entries is defined by noteAmount:
+        for( TInt cI = 0; cI < noteAmount; ++cI )
+            {            
+            CNotepadParameters* param = new (ELeave) CNotepadParameters;
+            CleanupStack::PushL(param);
+            
+            for( TInt i = 0; i < fields.Count(); ++i )
+                {
+                CCreatorScriptElement* field = fields[i];
+                TPtrC elemName = field->Name();
+                TPtrC elemContent = field->Content();
+                const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
+                TBool useMax = EFalse;
+                if( randomAttr && randomAttr->Value() == KMax )
+                    {
+                    useMax = ETrue;
+                    }
+                
+                if( elemName == KText )
+                    {
+                    if( randomAttr || elemContent.Length() == 0 )
+                        {
+                        if( useMax )
+                            {
+                            TDesC* temp = iEngine->CreateRandomStringLC(KNotepadFieldLength);                            
+                            SetContentToTextParamL(param->iNoteText, *temp);
+                            CleanupStack::PopAndDestroy(); // temp
+                            }
+                        else
+                            {
+                            SetContentToTextParamL(param->iNoteText, iEngine->RandomString(CCreatorEngine::EMessageText));
+                            }
+                        }
+                    else
+                        {
+                        SetContentToTextParamL(param->iNoteText, elemContent);
+                        }
+                    }
+                }
+            iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryNotes, param);
+            CleanupStack::Pop(); // param
+            }
+        }
+    else
+    	{
+    	iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryNotes, 0, noteAmount);
+    	}
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_notepadwrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,123 @@
+/*
+* 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 <QDir>
+#include "creator_notepadwrapper.h"
+
+	/**
+	* Constructor
+	*/
+CCreatorNotepadWrapper::CCreatorNotepadWrapper()
+	{
+	}
+	
+	/**
+	* Destructor
+	*/
+CCreatorNotepadWrapper::~CCreatorNotepadWrapper()
+	{
+    
+    iNotepadApi = NULL;
+		
+    if(iNotesEditorPluginLoader)
+        {
+	    iNotesEditorPluginLoader->unload();
+        delete iNotesEditorPluginLoader;
+        iNotesEditorPluginLoader = NULL;
+        }
+        
+    if(iAgendaUtil)
+        {
+        delete iAgendaUtil;
+        iAgendaUtil = NULL;
+        }
+	}
+	
+	/**
+	* Two-Phased constructor
+	*/
+CCreatorNotepadWrapper* CCreatorNotepadWrapper::NewL()
+	{
+	CCreatorNotepadWrapper* self = CCreatorNotepadWrapper::NewLC();
+	CleanupStack::Pop(self);
+    return self;
+	}
+
+	/**
+	* Two-Phased constructor
+	*/
+CCreatorNotepadWrapper* CCreatorNotepadWrapper::NewLC()
+	{
+	CCreatorNotepadWrapper* self = new (ELeave) CCreatorNotepadWrapper;
+	CleanupStack::PushL(self);
+	self->ConstructL();
+    return self;
+	}
+	
+	/**
+	* ConstructL()
+	*/
+
+void CCreatorNotepadWrapper::ConstructL()
+	{
+	iAgendaUtil = new AgendaUtil();
+	
+	//	iNotepadApi = new NotesEditor(iAgendaUtil);
+	
+	// Load notes editor plugin.
+    // Launch the notes editor using notes editor plugin api
+    QDir dir(NOTES_EDITOR_PLUGIN_PATH);
+    QString pluginName = dir.absoluteFilePath(NOTES_EDITOR_PLUGIN_NAME);
+
+    QT_TRYCATCH_LEAVING(
+        // Create NotesEditor plugin loader object.
+        iNotesEditorPluginLoader = new QPluginLoader(pluginName);
+
+        // Load the plugin
+        bool notesPluginLoaded = iNotesEditorPluginLoader->load();
+        QObject *plugin = qobject_cast<QObject*> ( iNotesEditorPluginLoader->instance());
+
+        iNotepadApi = qobject_cast<NotesEditorInterface*>(plugin);
+        );
+
+	}
+
+TInt CCreatorNotepadWrapper::CreateNoteL( const TDesC& aText )
+	{
+	User::LeaveIfNull(iNotepadApi);
+
+    QString textNote = QString::fromUtf16( aText.Ptr(),aText.Length());
+    iNotepadApi->edit(textNote,iAgendaUtil);
+    iNotepadApi->close(NotesEditorInterface::CloseWithSave, iAgendaUtil);
+	
+    return KErrNone;
+    }
+void CCreatorNotepadWrapper::DeleteAllL()
+	{
+	
+	QList<AgendaEntry> ael;
+    AgendaUtil::FilterFlags filter = AgendaUtil::FilterFlags(AgendaUtil::IncludeNotes);
+
+    ael = iAgendaUtil->fetchAllEntries(filter);
+    for(int i=0 ; i<ael.count() ; i++)
+    	{
+        iAgendaUtil->deleteEntry(ael[i].id());
+    	}
+		
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_phonebook.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,770 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+#include "creator_contactsetcache.h"
+
+#include "creator_phonebook.h"
+#include "creator_traces.h"
+
+#include <bautils.h> 
+
+_LIT(KTempPath, "C:\\Data\\Creator\\");
+
+
+typedef struct {
+TInt iFieldCode;
+TInt iRandomType;
+} DetailFieldInfo;
+static const TInt RND_TYPE_UNDEF = -99;
+DetailFieldInfo CreatorPbkMiscTextFields[] = {        
+        {CCreatorPhonebookWrapper::EFirstName, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::EFirstNameReading, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::ELastName, (TInt) CCreatorEngine::ESurname},
+        {CCreatorPhonebookWrapper::ELastNameReading, (TInt) CCreatorEngine::ESurname},
+        {CCreatorPhonebookWrapper::ECompanyName, (TInt) CCreatorEngine::ECompany},
+        {CCreatorPhonebookWrapper::EJobTitle, (TInt) CCreatorEngine::EJobTitle},
+        {CCreatorPhonebookWrapper::EPrefix, (TInt) CCreatorEngine::EPrefix},
+        {CCreatorPhonebookWrapper::ESuffix, (TInt) CCreatorEngine::ESuffix},
+        {CCreatorPhonebookWrapper::ESecondName, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::EAddrLabelGen, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrPoGen, (TInt) CCreatorEngine::EPobox},
+        {CCreatorPhonebookWrapper::EAddrExtGen, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrStreetGen, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrLocalGen, (TInt) CCreatorEngine::ECity},
+        {CCreatorPhonebookWrapper::EAddrRegionGen, (TInt) CCreatorEngine::EState},
+        {CCreatorPhonebookWrapper::EAddrPostCodeGen, (TInt) CCreatorEngine::EPostcode},
+        {CCreatorPhonebookWrapper::EAddrCountryGen, (TInt) CCreatorEngine::ECountry},
+        {CCreatorPhonebookWrapper::EAddrLabelHome, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrPoHome, (TInt) CCreatorEngine::EPobox},
+        {CCreatorPhonebookWrapper::EAddrExtHome, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrStreetHome, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrLocalHome, (TInt) CCreatorEngine::ECity},
+        {CCreatorPhonebookWrapper::EAddrRegionHome, (TInt) CCreatorEngine::EState},
+        {CCreatorPhonebookWrapper::EAddrPostCodeHome, (TInt) CCreatorEngine::EPostcode},
+        {CCreatorPhonebookWrapper::EAddrCountryHome, (TInt) CCreatorEngine::ECountry},
+        {CCreatorPhonebookWrapper::EAddrLabelWork, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrPoWork, (TInt) CCreatorEngine::EPobox},
+        {CCreatorPhonebookWrapper::EAddrExtWork, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrStreetWork, (TInt) CCreatorEngine::EAddress},
+        {CCreatorPhonebookWrapper::EAddrLocalWork, (TInt) CCreatorEngine::ECity},
+        {CCreatorPhonebookWrapper::EAddrRegionWork, (TInt) CCreatorEngine::EState},
+        {CCreatorPhonebookWrapper::EAddrPostCodeWork, (TInt) CCreatorEngine::EPostcode},
+        {CCreatorPhonebookWrapper::EAddrCountryWork, (TInt) CCreatorEngine::ECountry},
+        {CCreatorPhonebookWrapper::EPoc, (TInt) CCreatorEngine::EPhoneNumber},
+        {CCreatorPhonebookWrapper::ESwis, (TInt) CCreatorEngine::EPhoneNumber},
+        {CCreatorPhonebookWrapper::ESip, (TInt) CCreatorEngine::EPhoneNumber},
+        {CCreatorPhonebookWrapper::EDtmfString, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::ENote,(TInt)  CCreatorEngine::EMemoText},
+        {CCreatorPhonebookWrapper::EMiddleName, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::EDepartment, (TInt) CCreatorEngine::ECompany},
+        {CCreatorPhonebookWrapper::EAsstName, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::ESpouse, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::EChildren, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::ESyncClass, RND_TYPE_UNDEF},
+        {CCreatorPhonebookWrapper::ELocPrivacy, RND_TYPE_UNDEF},
+        {CCreatorPhonebookWrapper::EGenLabel, (TInt) CCreatorEngine::EFirstName},
+        {CCreatorPhonebookWrapper::EWVAddress, (TInt) CCreatorEngine::EPhoneNumber},
+        {CCreatorPhonebookWrapper::ERingTone, RND_TYPE_UNDEF},
+        {CCreatorPhonebookWrapper::EThumbnailPic, RND_TYPE_UNDEF},
+        {CCreatorPhonebookWrapper::ECallerObjText, (TInt) CCreatorEngine::EFirstName}
+        };
+                  
+
+TInt CreatorPbkBinaryFields[] = {
+        CCreatorPhonebookWrapper::ECallerObjImg//,
+        //R_VPBK_FIELD_TYPE_THUMBNAILPATH
+        };
+
+TInt CreatorPbkDateTimeFields[] = {
+        CCreatorPhonebookWrapper::EAnniversary
+        };
+
+//----------------------------------------------------------------------------
+TInt CreatorPbkPhoneNumberFields[] =
+    {
+    CCreatorPhonebookWrapper::ELandPhoneGen,
+    CCreatorPhonebookWrapper::ELandPhoneHome,
+    CCreatorPhonebookWrapper::ELandPhoneWork,                        
+    CCreatorPhonebookWrapper::EMobilePhoneGen,
+    CCreatorPhonebookWrapper::EMobilePhoneHome,
+    CCreatorPhonebookWrapper::EMobilePhoneWork,
+    CCreatorPhonebookWrapper::EFaxNumberGen,
+    CCreatorPhonebookWrapper::EFaxNumberHome,
+    CCreatorPhonebookWrapper::EFaxNumberWork,
+    CCreatorPhonebookWrapper::EPagerNumber,           
+    CCreatorPhonebookWrapper::EVideoNumberGen,
+    CCreatorPhonebookWrapper::EVideoNumberHome,
+    CCreatorPhonebookWrapper::EVideoNumberWork,
+    CCreatorPhonebookWrapper::EVoipGen,
+    CCreatorPhonebookWrapper::EVoipHome,
+    CCreatorPhonebookWrapper::EVoipWork,
+    CCreatorPhonebookWrapper::EAsstPhone,
+    CCreatorPhonebookWrapper::ECarPhone
+    };
+
+TInt CreatorPbkUrlFields[] =
+    {
+    CCreatorPhonebookWrapper::EUrlGen,
+    CCreatorPhonebookWrapper::EUrlHome,
+    CCreatorPhonebookWrapper::EUrlWork
+    };
+
+TInt CreatorPbkEmailFields[] =
+    {
+    CCreatorPhonebookWrapper::EEmailGen,
+    CCreatorPhonebookWrapper::EEmailHome,
+    CCreatorPhonebookWrapper::EEmailWork
+    };
+
+CPhonebookParameters::CPhonebookParameters()
+    {
+    LOGSTRING("Creator: CPhonebookParameters::CVirtualPhonebookParameters");
+    iGroupName = HBufC::New(KPhonebookFieldLength);  
+    }
+
+CPhonebookParameters::~CPhonebookParameters()
+    {
+    LOGSTRING("Creator: CPhonebookParameters::~CPhonebookParameters");
+
+    delete iGroupName;   
+    for( TCreatorContactFields::iterator it = iContactFields.begin(); it != iContactFields.end(); ++it)
+        {
+        HBufC* temp =  (*it).second;
+        iContactFields.erase(it);
+        delete temp;
+        }
+    iLinkIds.Reset();
+    iLinkIds.Close();
+    }
+
+void CPhonebookParameters::ParseL(CCommandParser* /*parser*/, TParseParams /*aCase = 0*/)
+	{
+	}
+
+TInt CPhonebookParameters::ScriptLinkId() const
+    {
+    return iLinkId;
+    }
+
+void CPhonebookParameters::SetScriptLinkId(TInt aLinkId)
+    {
+    iLinkId = aLinkId;
+    }
+
+
+//----------------------------------------------------------------------------
+
+CCreatorPhonebook* CCreatorPhonebook::NewL(CCreatorEngine* aEngine)
+    {
+    CCreatorPhonebook* self = CCreatorPhonebook::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorPhonebook* CCreatorPhonebook::NewLC(CCreatorEngine* aEngine)
+    {
+    CCreatorPhonebook* self = new (ELeave) CCreatorPhonebook();
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+
+CCreatorPhonebook::CCreatorPhonebook() 
+    {
+    iAddAllFields = EFalse;
+    }
+
+void CCreatorPhonebook::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::ConstructL");
+	
+	iEngine = aEngine;
+	
+	iPhonebookWrapper = CCreatorPhonebookWrapper::NewL();
+
+	SetDefaultParameters();
+    }
+	
+
+CCreatorPhonebook::~CCreatorPhonebook()
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::~CCreatorPhonebook");
+ 
+    if ( iContactsToDelete.Count() )
+    	{
+        TRAP_IGNORE( StoreLinksForDeleteL( iContactsToDelete, KUidDictionaryUidContacts ) );
+        }
+    if ( iContactGroupsToDelete.Count() )
+    	{
+        TRAP_IGNORE( StoreLinksForDeleteL( iContactGroupsToDelete, KUidDictionaryUidContactGroups ) );
+        }
+    
+	if( iPhonebookWrapper )
+		{
+		delete iPhonebookWrapper;
+		}
+    
+    if (iParameters)
+    	{
+        delete iParameters;
+    	}
+  
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorPhonebook::CreateContactEntryL(CCreatorModuleBaseParameters *aParameters)
+    {
+	TInt err = KErrNone;
+	delete iParameters;
+	    iParameters = 0;
+	CPhonebookParameters* parameters = 0;
+	
+	if( aParameters == 0 )
+	    {
+	    InitializeContactParamsL();
+	    parameters = iParameters;
+	    }
+	else
+	    {
+	    parameters = (CPhonebookParameters*) aParameters;
+	    }
+	    
+	int numberOfFields = parameters->iContactFields.size();
+	// create a new contact item
+	
+	TUint32 contactId = iPhonebookWrapper->CreateContactEntryL( parameters->iContactFields ); //wrapper should return contact id to store
+	iContactsToDelete.AppendL( contactId );
+	
+
+	// If this contact has a link id in script (i.e. belongs to a contact-set), we must cache the contact id:
+	    if( parameters->ScriptLinkId() > 0 )
+	        {                
+	        RPointerArray<CCreatorContactSet>& contactsets = ContactLinkCache::Instance()->ContactSets();
+	        TBool setFound(EFalse);
+	        for(TInt i = 0; i < contactsets.Count(); ++i )
+	            {
+	            if( contactsets[i]->LinkId() == parameters->ScriptLinkId() )
+	                {
+	                if( contactId )
+	                    {
+	                    contactsets[i]->AppendL( contactId );
+	                    iContactLinkArray.AppendL( contactId );
+	                    }
+	                setFound = ETrue;
+	                break;
+	                }
+	            }
+	        if( !setFound )
+	            {
+	            LOGSTRING2("Error: Contact set id %d not found.", parameters->ScriptLinkId());
+	            }
+	        }
+	    
+    return err;
+    }
+
+
+//----------------------------------------------------------------------------
+
+
+
+//----------------------------------------------------------------------------
+
+void CCreatorPhonebook::DeleteAllL()
+    {
+	iPhonebookWrapper->DeleteAllL();
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebook::DeleteAllCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::DeleteAllCreatedByCreatorL");
+    DeleteItemsCreatedWithCreatorL( KUidDictionaryUidContacts );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebook::DeleteAllGroupsL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::DeleteAllGroupsL");
+    iPhonebookWrapper->DeleteAllGroupsL();
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebook::DeleteAllGroupsCreatedByCreatorL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::DeleteAllGroupsCreatedByCreatorL");
+    DeleteItemsCreatedWithCreatorL( KUidDictionaryUidContactGroups );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebook::DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid	)
+    {
+	iPhonebookWrapper->DeleteContactsL( aContactsToDelete, aStoreUid );
+    }
+
+//----------------------------------------------------------------------------
+
+
+void CCreatorPhonebook::DeleteItemsCreatedWithCreatorL( TUid aStoreUid )
+    {
+	CDictionaryFileStore* store = iEngine->FileStoreLC();
+    User::LeaveIfNull( store );
+    
+    RArray<TUint32> contacts; 
+    // backup previous contact links from store
+    // otherwise they would be overwritten when calling out.WriteL
+    TUint32 creatorLink;
+    if ( store->IsPresentL( aStoreUid ) )
+       {
+       RDictionaryReadStream in;
+       in.OpenLC( *store, aStoreUid );
+       TRAP_IGNORE( 
+           do{ 
+               creatorLink = in.ReadUint32L();
+               contacts.AppendL( creatorLink );
+           }while( creatorLink );
+       );
+       
+       CleanupStack::PopAndDestroy(); // in
+       }
+    
+    
+    iPhonebookWrapper->DeleteContactsL( contacts, aStoreUid );
+    
+    store->Remove( aStoreUid );
+    store->CommitL();
+    
+    CleanupStack::PopAndDestroy( store );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebook::DoDeleteItemsCreatedWithCreatorL( TUid /*aStoreUid*/, CDictionaryFileStore* /*aStore*/ )
+    {
+    
+    }
+
+//----------------------------------------------------------------------------
+TBool CCreatorPhonebook::HasOtherThanGroupsL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::HasOtherThanGroupsL");
+    TBool result( EFalse );
+    return result;
+    }
+
+
+//----------------------------------------------------------------------------
+
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebook::StoreLinksForDeleteL( RArray<TUint32>& aLinks, TUid aStoreUid )
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::StoreLinksForDeleteL");
+    CDictionaryFileStore* store = iEngine->FileStoreLC();
+       User::LeaveIfNull( store );
+       
+       // backup previous contact links from store
+       // otherwise they would be overwritten when calling out.WriteL
+       TUint32 previousLink;
+       if ( store->IsPresentL( aStoreUid ) )
+           {
+           RDictionaryReadStream in;
+           in.OpenLC( *store, aStoreUid );
+           bool r = false;
+           TRAP_IGNORE( 
+               do{ //iContactMngr->CreateLinksLC( in )) != NULL ) // will leave with KErrEof
+                   previousLink = in.ReadUint32L();
+                   iPreviousDeleteLinks.AppendL( previousLink );
+                   if(previousLink)
+                	   {
+					   r=true;
+                	   }
+                   else
+                	   {
+					   r=false;
+                	   }
+               }while(r==true); );
+           
+           CleanupStack::PopAndDestroy(); // in
+           }
+
+       RDictionaryWriteStream out;       
+       out.AssignLC( *store, aStoreUid );
+       
+       // restore previous links
+       for ( TInt i = 0; i < iPreviousDeleteLinks.Count(); i++ )
+           {
+           out.WriteUint32L( iPreviousDeleteLinks[i] );
+           }
+       
+       // write new links
+       for(int i=0; i < aLinks.Count(); i++)
+    	   {
+		   out.WriteUint32L( aLinks[i] );
+    	   }
+       out.CommitL();
+       CleanupStack::PopAndDestroy(); // out
+       
+       store->CommitL();
+
+       CleanupStack::PopAndDestroy( store );
+    }
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+void CCreatorPhonebook::InitializeContactParamsL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::InitializeContactParamsL");        
+ 
+    iParameters = new (ELeave) CPhonebookParameters;
+           
+    iParameters->iNumberOfPhoneNumberFields = iNumberOfPhoneNumberFields;
+    iParameters->iNumberOfURLFields = iNumberOfURLFields;
+    iParameters->iNumberOfEmailAddressFields = iNumberOfEmailAddressFields;       
+    
+    TPtrC fname = iEngine->RandomString(CCreatorEngine::EFirstName);
+    TPtrC lname = iEngine->RandomString(CCreatorEngine::ESurname);
+    
+    
+    if( iAddAllFields )
+        {
+		TInt textFieldCount = sizeof(CreatorPbkMiscTextFields) / sizeof(DetailFieldInfo);
+		for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
+			{ 
+			CCreatorContactField* field = CCreatorContactField::NewL();
+			CleanupStack::PushL(field);
+	        field->AddFieldToParamL( iEngine,iParameters, CreatorPbkMiscTextFields[tfIndex].iFieldCode, CreatorPbkMiscTextFields[tfIndex].iRandomType );
+  	        CleanupStack::Pop(field);
+            }
+		
+		// Add binary fields:
+		
+		RFs& fs = CCoeEnv::Static()->FsSession();
+		      
+        TBuf<KMaxFileName> srcPath;
+		iEngine->RandomPictureFileL(srcPath);
+		TBuf<KMaxFileName> destPath(KTempPath);
+		                            
+		if(!BaflUtils::FolderExists( fs, destPath ))
+			{
+		    BaflUtils::EnsurePathExistsL( fs, destPath );
+		    }
+		                
+		TInt err=BaflUtils::CopyFile( fs, srcPath, destPath );
+
+		TParse temp;
+		temp.Set( srcPath,NULL,NULL );
+		destPath.Append(temp.NameAndExt());
+		TPtrC picture;
+		picture.Set(destPath);
+		CCreatorContactField* picturefield = CCreatorContactField::NewL();
+		CleanupStack::PushL(picturefield);
+		picturefield->AddFieldToParamL( iParameters, CCreatorPhonebookWrapper::EThumbnailPic, picture );
+		CleanupStack::Pop(picturefield);
+		// Add date-time fields:
+		TPtrC anniv;
+		TBuf<20> timeString;
+		TTime datetime = iEngine->RandomDate( CCreatorEngine::EDateFuture );
+		_LIT(KDateString,"%D%M%Y%/0%1%/1%2%/2%3%/3");
+		TRAP_IGNORE( datetime.FormatL(timeString, KDateString) );
+		
+		anniv.Set(timeString);
+ 
+		CCreatorContactField* fieldAnniv = CCreatorContactField::NewL();
+		CleanupStack::PushL( fieldAnniv );
+		fieldAnniv->AddFieldToParamL(iParameters,CCreatorPhonebookWrapper::EAnniversary, anniv );
+		CleanupStack::Pop( fieldAnniv );
+    //***************************************************************************
+    
+        }
+    else
+        {
+		CCreatorContactField* field = CCreatorContactField::NewL();
+    	CleanupStack::PushL(field);
+    	field->AddFieldToParamL( iParameters, CCreatorPhonebookWrapper::EFirstName, fname );
+		field->AddFieldToParamL( iParameters, CCreatorPhonebookWrapper::ELastName, lname );
+		CleanupStack::Pop(field);
+        }
+                        
+      // Phone numbers:
+    TInt phoneFieldCount = sizeof(CreatorPbkPhoneNumberFields) / sizeof(TInt);
+    
+    TInt inc=0;
+    for( TInt i=0; i<iNumberOfPhoneNumberFields; i++ )
+    	{
+    
+		if(inc >= phoneFieldCount )
+        	{
+    		inc = 0;
+        	}
+		
+		CCreatorContactField* field = CCreatorContactField::NewL();
+        CleanupStack::PushL(field);
+		field->AddFieldToParamL(iEngine, iParameters, CreatorPbkPhoneNumberFields[inc] );
+		CleanupStack::Pop(field);
+    
+		inc++;
+    	}
+    
+    
+    
+    // URLs:
+    TInt urlFieldCount = sizeof(CreatorPbkUrlFields) / sizeof(TInt);
+    inc = 0;
+    for( TInt i=0; i<iNumberOfURLFields; i++ )
+        {
+    
+		if(inc >= urlFieldCount )
+          	{
+        	inc = 0;
+           	}
+    
+		CCreatorContactField* field = CCreatorContactField::NewL();
+        CleanupStack::PushL(field);
+    	field->AddFieldToParamL(iEngine, iParameters, CreatorPbkUrlFields[inc] );
+    	CleanupStack::Pop(field);
+    	inc++;
+        }
+
+    // EMail addresses:
+    TInt emailFieldCount = sizeof(CreatorPbkEmailFields) / sizeof(TInt);
+    inc = 0;
+    for( int i=0; i<iNumberOfEmailAddressFields; i++ )
+    	{
+		if(inc >= emailFieldCount )
+           	{
+          	inc = 0;
+           	}
+        CCreatorContactField* field = CCreatorContactField::NewL();
+        CleanupStack::PushL(field);
+        field->AddFieldToParamL(iEngine, iParameters, CreatorPbkEmailFields[inc] );
+        CleanupStack::Pop(field);
+        inc++;
+    	}
+    
+    TestPrintOut(iParameters);
+    
+   }
+
+void CCreatorPhonebook::TestPrintOut(CPhonebookParameters* aParam)
+	{
+	LOGSTRING("Creator: CCreatorPhonebook::TestPrintOut");
+	for( TCreatorContactFields::iterator it = aParam->iContactFields.begin(); it != aParam->iContactFields.end(); ++it)
+        {
+        HBufC* temp = (*it).second;
+        if(temp)
+        	{
+			LOGSTRING3("Type: %d Content:%S ", (*it).first, &temp->Des() );
+        	}
+        }
+    }
+
+// Checks if the link is a group or not
+TBool CCreatorPhonebook::IsContactGroupL( TUint32& /*aLink*/ )
+	{
+	//not used right now
+	return EFalse;
+	}
+
+
+TInt CCreatorPhonebook::CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters)
+    {
+	 LOGSTRING("Creator: CCreatorPhonebook::CreateGroupEntryL");
+	 TInt err = KErrNone;
+	 
+	    delete iParameters;
+	    iParameters = 0;
+	    
+	    CPhonebookParameters* parameters = (CPhonebookParameters*) aParameters;
+	    
+	    if( !parameters )
+	       {
+	       iParameters = new (ELeave) CPhonebookParameters;
+	       iParameters->iContactsInGroup = iContactsInGroup;
+	       iParameters->iGroupName->Des().Copy( iEngine->RandomString(CCreatorEngine::EGroupName) );
+	       iParameters->iGroupName->Des().Append( _L(" #") );
+	       iParameters->iGroupName->Des().AppendNum( iEngine->RandomNumber(1000, 9999) );
+	       parameters = iParameters;
+	       }
+	   
+	    // create a new contact group
+	    
+	    TUint32 newGroupId = iPhonebookWrapper->CreateGroupEntryL( parameters->iGroupName );
+	    
+	    // define amounts of contacts to be added to the group
+	    TInt amountOfContactsToBeAdded = 0;
+	    if (parameters->iContactsInGroup == KCreateRandomAmountOfGroups)
+	    	{
+	        amountOfContactsToBeAdded = iEngine->RandomNumber(30);
+	    	}
+	    else 
+	    	{
+	        amountOfContactsToBeAdded = parameters->iContactsInGroup;
+	    	}
+	    
+	    if( parameters->iLinkIds.Count() > 0 )
+	        {
+	        for( TInt i = 0; i < parameters->iLinkIds.Count(); ++i )
+	            {
+	            const CCreatorContactSet& set = ContactLinkCache::Instance()->ContactSet(parameters->iLinkIds[i].iLinkId);
+	          
+	            const RArray<TUint32> links = set.ContactLinks();//ContactLinkCache::Instance()->ContactSets();//set.ContactLinks();
+	            TInt numberOfExplicitLinks = links.Count(); // Number of defined contacts in contact-set
+	            TInt numberOfExistingContacts = set.NumberOfExistingContacts(); // Number of existing contacts in contact-set
+	            TInt maxAmount = numberOfExplicitLinks + numberOfExistingContacts;
+	            
+	            if( parameters->iLinkIds[i].iLinkAmount > 0 )
+	                maxAmount = parameters->iLinkIds[i].iLinkAmount; // Max amount is limited
+	            
+	            TInt addedMembers = 0;
+	            
+	            for( TInt j = 0; j < links.Count() && addedMembers < maxAmount; ++j )
+	                {
+					
+					addedMembers += iPhonebookWrapper->AddContactToGroup(newGroupId,links[j]);
+	           
+	                }
+	            if( addedMembers < maxAmount )
+	            	{
+	            	// Add existing contacts, withing the limits set by maxAmount:
+	            	amountOfContactsToBeAdded += maxAmount - addedMembers;
+	            	}
+	            }
+	        }
+	    if( amountOfContactsToBeAdded > 0 )
+	        {
+			TInt addedContacts = iPhonebookWrapper->AddToGroup(newGroupId, amountOfContactsToBeAdded);
+		
+	        }
+	    
+	    // store the link to contact, so that Creator is able to delete
+	    // it when user requests deletion of contacts that were created with Creator 
+	    iContactGroupsToDelete.AppendL( newGroupId );
+	    
+	    return err;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorPhonebook::CreateSubscribedContactEntryL(CCreatorModuleBaseParameters* /*aParameters*/)
+    {
+    LOGSTRING("Creator: CCreatorPhonebook::CreateSubscribedContactEntryL");
+
+    return KErrNotSupported;
+    }
+
+//----------------------------------------------------------------------------
+
+CCreatorContactField::CCreatorContactField()
+    {
+    }
+CCreatorContactField::~CCreatorContactField()
+    {
+    }
+
+CCreatorContactField* CCreatorContactField::NewL()
+    {
+    CCreatorContactField* self = new (ELeave) CCreatorContactField();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+void CCreatorContactField::ConstructL()
+    {
+    }
+
+
+void CCreatorContactField::AddFieldToParamL( CCreatorEngine* aEngine, CPhonebookParameters* aParam, TInt aType, TInt aRand )
+    {
+    HBufC* content = NULL;
+    if( aRand == KErrNotFound ) 
+        {
+        TInt textFieldCount = sizeof(CreatorPbkPhoneNumberFields)/sizeof(TInt);;
+        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
+            {
+            if( CreatorPbkPhoneNumberFields[tfIndex] == aType )
+                {
+                content = aEngine->RandomString(CCreatorEngine::EPhoneNumber).AllocL();
+                break;
+                }
+            }
+    
+        textFieldCount = sizeof(CreatorPbkUrlFields)/sizeof(TInt);;
+        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
+            {
+            if( CreatorPbkUrlFields[tfIndex] == aType )
+                {
+                content = aEngine->CreateHTTPUrlLC(); 
+                CleanupStack::Pop();
+                break;
+                }
+            }
+        textFieldCount = sizeof(CreatorPbkEmailFields)/sizeof(TInt);;
+        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
+            {
+            if( CreatorPbkEmailFields[tfIndex] == aType )
+                {
+                content = aEngine->CreateEmailAddressLC();
+                CleanupStack::Pop();
+                break;
+                }
+            }
+        
+    
+        //if there is textfield without specified random number
+        textFieldCount = sizeof(CreatorPbkMiscTextFields) / sizeof(DetailFieldInfo);
+        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
+            {
+			if( CreatorPbkMiscTextFields[tfIndex].iFieldCode == aType && CreatorPbkMiscTextFields[tfIndex].iRandomType != RND_TYPE_UNDEF )
+            	{
+				TInt rand =  CreatorPbkMiscTextFields[tfIndex].iRandomType;
+				content = aEngine->RandomString((CCreatorEngine::TRandomStringType) rand).AllocL();
+				break;
+				}
+			}	
+        }
+
+    if( aRand != KErrNotFound && aRand != RND_TYPE_UNDEF ) 
+        {
+        TInt textFieldCount = sizeof(CreatorPbkMiscTextFields) / sizeof(DetailFieldInfo);
+        for( TInt tfIndex = 0; tfIndex < textFieldCount; ++tfIndex )
+            {
+            if( CreatorPbkMiscTextFields[tfIndex].iFieldCode == aType )
+                {
+                content = aEngine->RandomString((CCreatorEngine::TRandomStringType) aRand).AllocL();
+                }
+            }
+        }
+	
+	aParam->iContactFields.insert( TCreatorContactField(aType, content) );
+	}
+
+void CCreatorContactField::AddFieldToParamL( CPhonebookParameters* aParam, TInt aType, TPtrC aContent )
+    {
+    aParam->iContactFields.insert( TCreatorContactField(aType, aContent.AllocL()) );
+    }
+
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_phonebookapi.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,189 @@
+/*
+* 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 "creator_phonebookapi.h"
+
+CCreatorPhonebookAPI::CCreatorPhonebookAPI ()
+    {
+    mContactMngr = new QContactManager("symbian");
+    }
+
+CCreatorPhonebookAPI::~CCreatorPhonebookAPI ()
+    {
+    if( mContactMngr )
+        {
+        delete mContactMngr;
+        mContactMngr = NULL;
+        }
+    }
+
+quint32 CCreatorPhonebookAPI::saveContact( const QList<QContactDetail>& list )
+    {
+    // create a new contact item
+    QContact store;
+    quint32 id;
+    for(int i = 0 ; i < list.count() ; i++ )
+    	{
+		QContactDetail cntdetail = list.at(i);
+		store.saveDetail(&cntdetail);
+    	}
+    /*foreach( QContactDetail cntdetail, list )
+        {
+        store.saveDetail( &cntdetail );
+        }
+    */
+    mContactMngr->saveContact( &store );
+    id = store.localId();
+    return id;
+    }
+
+quint32 CCreatorPhonebookAPI::createGroup( const QString& groupName )
+	{
+	QContact newGroup;
+	newGroup.setType(QContactType::TypeGroup);
+	QContactName newGroupName;
+	newGroupName.setCustomLabel( groupName );
+	newGroup.saveDetail(&newGroupName);
+	mContactMngr->saveContact(&newGroup);
+	return newGroup.localId();
+	}
+
+int CCreatorPhonebookAPI::numberOfContacts()
+	{
+	QList<QContactLocalId> contacts = mContactMngr->contactIds();
+	return contacts.count();
+	
+	}
+
+bool CCreatorPhonebookAPI::IsContactGroupL( const QContact& contact )
+	{
+	 
+	if( contact.type() == QContactType::TypeGroup )
+		{
+		return true;
+		}
+	return false;
+	}
+
+int CCreatorPhonebookAPI::addContactToGroup( QContactLocalId group, QContactLocalId contact )
+	{
+	QContact newGroup = mContactMngr->contact( group );
+	QContact contactLink = mContactMngr->contact( contact );
+	int ret = 0;
+	if( contact && IsContactGroupL( contactLink ) == false )
+	    {
+        QList<QContactRelationship> relationships = contactLink.relationships(QContactRelationship::HasMember);
+        if( !relationships.count() && contactLink.type() == QContactType::TypeContact ) //just for contacts that are not in relationship - not in group yet
+			{
+			QContactRelationship* contactRel = new QContactRelationship();
+			contactRel->setRelationshipType(QContactRelationship::HasMember);
+			contactRel->setFirst(newGroup.id());
+			contactRel->setSecond( contactLink.id() );
+			mContactMngr->saveRelationship( contactRel );
+			delete contactRel;
+			ret++;
+			}         
+		}
+	return ret;
+	}
+int CCreatorPhonebookAPI::addToGroup(QContactLocalId group, int amount)
+	{
+	QList<QContactLocalId> contacts = mContactMngr->contactIds();
+	int ret = 0;		
+	int tmp = 0;
+	int cnt = 0;
+	
+	for( int i=0; cnt < amount && i < contacts.count() ; i++ )
+		{
+		QContact contact = mContactMngr->contact( mContactMngr->contactIds().at(i) );
+		if( contact.type() == QContactType::TypeContact )
+			{
+			tmp = addContactToGroup(group,mContactMngr->contactIds().at(i)); 
+			ret += tmp;
+			if(tmp)
+				{
+				cnt++;
+				tmp = 0;
+				}
+			}
+		}
+	return ret;
+	}
+
+
+bool CCreatorPhonebookAPI::deleteAllContacts()
+    {
+    QList<QContactLocalId> all = mContactMngr->contactIds();
+    return deleteContacts( all );
+    }
+
+bool CCreatorPhonebookAPI::deleteAllContacts( const QString& type )
+    {
+    QList<QContactLocalId> contactsToDelete;
+    QList<QContactLocalId> contacts = mContactMngr->contactIds();
+    foreach(QContactLocalId contactId, contacts)
+        {
+        QContact contact = mContactMngr->contact( contactId );
+        if( contact.type() == type )
+            {
+            contactsToDelete.append( contact.localId() );
+            }
+        }
+    return deleteContacts( contactsToDelete );
+    }
+
+
+bool CCreatorPhonebookAPI::deleteContacts( const QList<QContactLocalId>& list )
+    {
+    QMap<int, QContactManager::Error> errorMap;
+    return mContactMngr->removeContacts( list, &errorMap );
+    }
+
+QContact CCreatorPhonebookAPI::contact( const QContactLocalId& contactId )
+    {
+    return mContactMngr->contact( contactId );
+    }
+
+QString CCreatorPhonebookAPI::phoneNumber( const QContactLocalId& contactId )
+    {
+    QString strNumber;
+    QContact contact = mContactMngr->contact( contactId );
+    if( !contact.isEmpty() )
+        {
+        QContactPhoneNumber phoneNumber = static_cast<QContactPhoneNumber>( contact.detail( QContactPhoneNumber::DefinitionName ) );
+        strNumber = phoneNumber.number();
+        }
+    return strNumber;
+    }
+
+bool CCreatorPhonebookAPI::contactDetails( const QContactLocalId& contactId, QString& name, QString& phoneNumber, QString& email )
+    {
+    bool success(false);
+    QContact contact = mContactMngr->contact( contactId );
+    if( !contact.isEmpty() )
+        {
+        QContactPhoneNumber contactPhoneNumber = static_cast<QContactPhoneNumber>( contact.detail( QContactPhoneNumber::DefinitionName ) );
+        phoneNumber = contactPhoneNumber.number();
+        QContactEmailAddress contactEmailAddress = static_cast<QContactEmailAddress>( contact.detail( QContactEmailAddress::DefinitionName ) );
+        email = contactEmailAddress.emailAddress();
+        QContactDisplayLabel contactDisplayLabel = static_cast<QContactDisplayLabel>( contact.detail( QContactDisplayLabel::DefinitionName ) );
+        name = contactDisplayLabel.label();
+        success = true;
+        }
+    return success;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_phonebookbase.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,154 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+#include "creator_phonebookbase.h"
+#include "creator_traces.h"
+
+void CCreatorPhonebookBase::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
+    {
+    LOGSTRING("Creator: CCreatorPhonebookBase::QueryDialogClosedL");
+    
+    if(aPositiveAction == EFalse && aUserData!=ECreatorPhonebookGetContactFields && aUserData!=ECreatorPhonebookContactsAllFields )
+        {
+        iEngine->ShutDownEnginesL();
+        return;
+        }
+    
+    const TDesC* showText = &KSavingText;
+    TBool finished(EFalse);
+    TBool retval(ETrue);
+    switch(aUserData)
+        {
+        case ECreatorPhonebookDelete:
+            showText = &KDeletingText;
+            finished = ETrue;
+            iEntriesToBeCreated = 1;
+            break;
+        case ECreatorPhonebookStart:
+        	if(iCommand == ECmdCreatePhoneBookEntryContacts )
+        		{
+				retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Fields in contact"), R_CONTACT_CREATION_TYPE_QUERY, 
+        	                &iDummy, this, ECreatorPhonebookGetContactFields );
+        		}
+        	else
+        		{
+				retval = iEngine->GetEngineWrapper()->ListQueryDialog(_L("Number of contacts "), R_GROUP_CREATION_TYPE_QUERY, 
+        	       	                &iDummy, this, ECreatorPhonebookGetGroupFields );
+        		}
+            break;
+        case ECreatorPhonebookGetContactFields:
+            if(iDummy==0)// first item, use default fields
+                    
+                {
+                iDefaultFieldsSelected = ETrue;
+                finished = ETrue;
+                }
+            else
+                {
+                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfPhoneNumberFields, _L("Amount of phone number fields in one contact?"), 
+                    ETrue, this, ECreatorPhonebookGetPhoneNumbersCount 
+                    );
+                }
+            break;
+        case ECreatorPhonebookGetPhoneNumbersCount:
+            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfURLFields, _L("Amount of URL fields in one contact?"), 
+                ETrue, this, ECreatorPhonebookGetUrlsCount 
+                );
+            break;
+        case ECreatorPhonebookGetUrlsCount:
+            retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iNumberOfEmailAddressFields, _L("Amount of email fields in one contact?"), 
+                ETrue, this, ECreatorPhonebookGetEmailsCount
+                );
+            break;
+        case ECreatorPhonebookGetEmailsCount:
+            retval = iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Add all the other fields to contacts?"), this, ECreatorPhonebookContactsAllFields);
+            break;
+        case ECreatorPhonebookContactsAllFields:
+            iAddAllFields = aPositiveAction;
+            // finaly we have all informations from user, start engine
+            finished = ETrue;
+            break;
+        case ECreatorPhonebookGetGroupFields:
+            iContactsInGroup = KCreateRandomAmountOfGroups;
+            if(iDummy==0)// first item, use default fields
+                {
+                finished = ETrue;
+                }
+            else
+                {
+                retval = iEngine->GetEngineWrapper()->EntriesQueryDialog(&iContactsInGroup, _L("Amount of contacts in one group?"), 
+                    ETrue, this, ECreatorPhonebookGetContactsInGroup);
+                }
+            break;
+        case ECreatorPhonebookGetContactsInGroup:
+            // finaly we have all informations from user, start engine
+            finished = ETrue;
+            break;
+        default:
+            //some error
+            retval = EFalse;
+            break;
+        }
+    if( retval == EFalse )
+        {
+        iEngine->ShutDownEnginesL();
+        }
+    else if( finished )
+        {
+        // add this command to command array
+        iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated);
+        // started exucuting commands
+        iEngine->ExecuteFirstCommandL( *showText );
+        }
+    }
+    
+TBool CCreatorPhonebookBase::AskDataFromUserL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorPhonebookBase::AskDataFromUserL");
+    iCommand = aCommand;
+    
+    if( aCommand == ECmdDeleteContacts )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contacts?"), this, ECreatorPhonebookDelete );
+        }
+    if( aCommand == ECmdDeleteCreatorContacts )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contacts created with Creator?"), this, ECreatorPhonebookDelete ); 
+        }
+    if( aCommand == ECmdDeleteContactGroups )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contact groups?"), this, ECreatorPhonebookDelete );
+        }
+    if( aCommand == ECmdDeleteCreatorContactGroups )
+        {
+        return iEngine->GetEngineWrapper()->YesNoQueryDialog(_L("Delete all contact groups created with Creator?"), this, ECreatorPhonebookDelete ); 
+        }    
+    // display queries
+    return iEngine->GetEngineWrapper()->EntriesQueryDialog( &iEntriesToBeCreated, _L("How many entries to create?"), EFalse, this, ECreatorPhonebookStart); // ask number of entries to create
+    }
+
+
+void CCreatorPhonebookBase::SetDefaultParameters()
+    {
+    iNumberOfPhoneNumberFields = 1;
+    iNumberOfURLFields = 0;
+    iNumberOfEmailAddressFields = 0;
+    iContactsInGroup = 50;
+    iDefaultFieldsSelected = EFalse;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_phonebookwrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,661 @@
+/*
+* 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 "engine.h"
+#include "enginewrapper.h"
+#include "creator_contactsetcache.h"
+
+#include "creator_phonebookwrapper.h" 
+#include "creator_traces.h"
+
+#include <bautils.h> 
+
+typedef struct {
+TInt iFieldCode;
+QString iDetail;
+QString iFieldContext;
+QString iFieldString;
+} QDetailFieldInfo;
+//static const TInt RND_TYPE_UNDEF = -99;
+QDetailFieldInfo CreatorPbkTextFields[] = {        
+        { (TInt)CCreatorPhonebookWrapper::EFirstName,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldFirstName).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::ELastName,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldLastName).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::ECompanyName,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldName).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EJobTitle,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldTitle).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EPrefix,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldPrefix).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::ESuffix,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldSuffix).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EMiddleName,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactName::FieldMiddleName).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrStreetHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldStreet).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrLocalHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldLocality).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrRegionHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldRegion).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrPostCodeHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldPostcode).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrCountryHome,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactAddress::FieldCountry).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrStreetGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldStreet).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrLocalGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldLocality).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrRegionGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldRegion).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrPostCodeGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldPostcode).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrCountryGen,(QContactAddress::DefinitionName).operator QString(), "", (QContactAddress::FieldCountry).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrStreetWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldStreet).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrLocalWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldLocality).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrRegionWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldRegion).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrPostCodeWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldPostcode).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAddrCountryWork,(QContactAddress::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactAddress::FieldCountry).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EMobilePhoneWork,(QContactPhoneNumber::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactPhoneNumber::SubTypeMobile).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::ELandPhoneWork,(QContactPhoneNumber::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactPhoneNumber::SubTypeLandline).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::ENote,(QContactNote::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactNote::FieldNote).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EDepartment,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldDepartment).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EAsstName,(QContactOrganization::DefinitionName).operator QString(), (QContactDetail::ContextWork).operator QString(), (QContactOrganization::FieldAssistantName).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::ESpouse,(QContactFamily::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactFamily::FieldSpouse).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EChildren,(QContactFamily::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(), (QContactFamily::FieldChildren).operator QString()},
+        { (TInt)CCreatorPhonebookWrapper::EGenLabel,(QContactName::DefinitionName).operator QString(), (QContactDetail::ContextHome).operator QString(),  (QContactName::FieldCustomLabel).operator QString()}
+        };
+                  
+
+typedef struct{
+TInt iFieldCode;
+QString iFieldContext;
+QString iFieldString;
+}PhoneNumInfo;
+PhoneNumInfo CreatorPhoneNumberFields[] =
+    {
+    { CCreatorPhonebookWrapper::ELandPhoneGen,"", "Landline"},
+    { CCreatorPhonebookWrapper::ELandPhoneHome,"Home", "Landline"},
+    { CCreatorPhonebookWrapper::ELandPhoneWork,"Work", "Landline"},                        
+    { CCreatorPhonebookWrapper::EMobilePhoneGen,"","Mobile"},
+    { CCreatorPhonebookWrapper::EMobilePhoneHome,"Home","Mobile"},
+    { CCreatorPhonebookWrapper::EMobilePhoneWork,"Work", "Mobile"},
+    { CCreatorPhonebookWrapper::EFaxNumberGen, "", "Facsimile"},
+    { CCreatorPhonebookWrapper::EFaxNumberHome, "Home", "Facsimile"},
+    { CCreatorPhonebookWrapper::EFaxNumberWork, "Work", "Facsimile"},
+    { CCreatorPhonebookWrapper::EPagerNumber, "Work", "Pager"},
+    { CCreatorPhonebookWrapper::EVideoNumberGen, "", "Video"},
+    { CCreatorPhonebookWrapper::EVideoNumberHome, "Home", "Video"},
+    { CCreatorPhonebookWrapper::EVideoNumberWork, "Work", "Video"},   //{ "Home", "Voice" },//{ "Work", "Voice" },
+    { CCreatorPhonebookWrapper::EAsstPhone, "Work", "Assistant" },
+    { CCreatorPhonebookWrapper::ECarPhone, "Home",  "Car" }
+    };
+
+
+typedef struct{
+	TInt iFieldCode;
+	QString iFieldContext;
+}EmailInfo;
+EmailInfo CreatorEmailFields[] =
+	{
+    {CCreatorPhonebookWrapper::EEmailGen,""},
+    {CCreatorPhonebookWrapper::EEmailHome,(QContactDetail::ContextHome).operator QString()},
+    {CCreatorPhonebookWrapper::EEmailWork,(QContactDetail::ContextWork).operator QString()}
+    };
+
+typedef struct{
+	TInt iFieldCode;
+	QString iFieldContext;
+}UrlInfo;
+UrlInfo CreatorUrlFields[] =
+    {
+    {CCreatorPhonebookWrapper::EUrlGen,""},
+    {CCreatorPhonebookWrapper::EUrlHome,(QContactDetail::ContextHome).operator QString()},
+    {CCreatorPhonebookWrapper::EUrlWork,(QContactDetail::ContextWork).operator QString()}
+    };
+
+CCreatorPhonebookWrapper* CCreatorPhonebookWrapper::NewL()
+    {
+    CCreatorPhonebookWrapper* self = CCreatorPhonebookWrapper::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorPhonebookWrapper* CCreatorPhonebookWrapper::NewLC()
+    {
+    CCreatorPhonebookWrapper* self = new (ELeave) CCreatorPhonebookWrapper();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+
+CCreatorPhonebookWrapper::CCreatorPhonebookWrapper() 
+    {
+    }
+
+void CCreatorPhonebookWrapper::ConstructL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebookWrapper::ConstructL");
+
+    QT_TRYCATCH_LEAVING( iPhonebookAPI = new CCreatorPhonebookAPI() );
+	
+	}
+	
+
+CCreatorPhonebookWrapper::~CCreatorPhonebookWrapper()
+    {
+    LOGSTRING("Creator: CCreatorPhonebookWrapper::~CCreatorPhonebookWrapper");
+	if( iPhonebookAPI )
+        {
+        delete iPhonebookAPI;
+        iPhonebookAPI = NULL;
+        }
+    }
+
+//----------------------------------------------------------------------------
+
+QList<QContactDetail> CCreatorPhonebookWrapper::CreateContactDetailsFromParameters( const TCreatorContactFields& aFields )
+	{
+	QList<QContactDetail> contDetList;
+	QString content;
+	HBufC* temp;
+	TInt arraySize = sizeof(CreatorPbkTextFields)/sizeof(QDetailFieldInfo);
+	for (TInt i = 0; i < arraySize; i++)
+		{
+	    TCreatorContactFields::const_iterator it = aFields.find(CreatorPbkTextFields[i].iFieldCode);
+		if( it != aFields.end() )
+			{
+		    temp = (*it).second;
+			content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
+			QContactDetail contactDetail =  CreateContactDetail(contDetList, CreatorPbkTextFields[i].iDetail,CreatorPbkTextFields[i].iFieldContext,CreatorPbkTextFields[i].iFieldString, content );
+			AddFieldToList( contDetList, contactDetail );
+			}
+		}
+	arraySize = sizeof(CreatorPhoneNumberFields)/sizeof(PhoneNumInfo);
+		for (TInt i = 0; i < arraySize; i++)
+			{
+			TCreatorContactFields::const_iterator it = aFields.find(CreatorPhoneNumberFields[i].iFieldCode);
+			if( it != aFields.end() )
+				{
+			    temp = (*it).second;
+				content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
+				QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactPhoneNumber::DefinitionName ,CreatorPhoneNumberFields[i].iFieldContext,CreatorPhoneNumberFields[i].iFieldString, content );
+				AddFieldToList( contDetList, contactDetail );
+				}
+			}
+		
+	arraySize = sizeof(CreatorEmailFields)/sizeof(EmailInfo);
+		for (TInt i = 0; i < arraySize; i++)
+			{
+			TCreatorContactFields::const_iterator it = aFields.find(CreatorEmailFields[i].iFieldCode);
+			if( it != aFields.end() )
+				{
+			    temp = (*it).second;
+				content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
+				QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactEmailAddress::DefinitionName ,CreatorEmailFields[i].iFieldContext,"", content );
+				AddFieldToList( contDetList, contactDetail );
+				}
+			}
+		
+	arraySize = sizeof(CreatorUrlFields)/sizeof(UrlInfo);
+			for (TInt i = 0; i < arraySize; i++)
+				{
+				TCreatorContactFields::const_iterator it = aFields.find(CreatorUrlFields[i].iFieldCode);
+				if( it != aFields.end() )
+					{
+				    temp = (*it).second;
+					content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
+					QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactUrl::DefinitionName ,CreatorUrlFields[i].iFieldContext,"", content );
+					AddFieldToList( contDetList, contactDetail );
+					}
+				}	
+	arraySize = sizeof(CreatorUrlFields)/sizeof(UrlInfo);
+			for (TInt i = 0; i < arraySize; i++)
+				{
+				TCreatorContactFields::const_iterator it = aFields.find(CreatorUrlFields[i].iFieldCode);
+				if( it != aFields.end() )
+					{
+					temp = (*it).second;
+					content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
+					QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactUrl::DefinitionName ,CreatorUrlFields[i].iFieldContext,"", content );
+					AddFieldToList( contDetList, contactDetail );
+					}
+				}
+			
+			TCreatorContactFields::const_iterator it = aFields.find(CCreatorPhonebookWrapper::EThumbnailPic);
+			if( it != aFields.end() )
+				{
+				temp = (*it).second;
+				if(temp)
+					{
+					content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
+					QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactAvatar::DefinitionName ,"","", content );
+					AddFieldToList( contDetList, contactDetail );
+					}
+				}
+			it = aFields.find(CCreatorPhonebookWrapper::EAnniversary);
+				if( it != aFields.end() )
+					{
+					temp = (*it).second;
+					if(temp)
+						{
+						content = QString::fromUtf16( temp->Des().Ptr(), temp->Length() );
+						QContactDetail contactDetail =  CreateContactDetail(contDetList, QContactAnniversary::DefinitionName ,"","", content );
+						AddFieldToList( contDetList, contactDetail );
+						}
+					}
+		
+	return contDetList;
+	}
+QContactDetail CCreatorPhonebookWrapper::CreateContactDetail( QList<QContactDetail>& aContactDetailList,QString aDetail, QString aFieldContext, QString aFieldString, QString aData )
+    {
+    QContactDetail contactDetail;
+        
+        if( aDetail == QContactPhoneNumber::DefinitionName)
+            {
+            QContactPhoneNumber phoneNumber;// = contactDetail;
+            if(!aFieldContext.isEmpty())
+            	{
+				phoneNumber.setContexts(aFieldContext);
+            	}
+            phoneNumber.setSubTypes(aFieldString);
+            //QString number = QString::fromUtf16(aData.Ptr(),aData.Length());
+            phoneNumber.setNumber(aData);
+            return phoneNumber;
+            }
+        else if( aDetail == QContactName::DefinitionName )          //--Contact NAME-----------------------------
+            {
+            QContactName contactName;
+            for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
+                {
+                if(aContactDetailList.at(i).definitionName() == QContactName::DefinitionName )
+                    {
+                    contactName = aContactDetailList.at(i);
+                    }
+                }
+            //QString name = QString::fromUtf16(aData.Ptr(),aData.Length());
+            if(aFieldString == QContactName::FieldFirstName)
+                {
+                if(contactName.firstName().isEmpty())
+                    {
+                    contactName.setFirstName( aData );
+                    }
+                }
+            else if(aFieldString == QContactName::FieldLastName)
+                {
+                if(contactName.lastName().isEmpty())
+                    {
+                    contactName.setLastName( aData );
+                    }
+                }
+            else if(aFieldString == QContactName::FieldMiddleName)
+                {
+                if(contactName.middleName().isEmpty())
+                    {
+                    contactName.setMiddleName( aData );
+                    }
+                }
+            else if(aFieldString == QContactName::FieldPrefix)
+                {
+                if(contactName.prefix().isEmpty())
+                    {
+                    contactName.setPrefix( aData );
+                    }
+                }
+            else if(aFieldString == QContactName::FieldSuffix)
+                {
+                if(contactName.suffix().isEmpty())
+                    {
+                    contactName.setSuffix( aData );
+                    }
+                }
+            else        //QContactName::FieldCustomLabel:
+                {
+                if(contactName.customLabel().isEmpty())
+                    {
+                    contactName.setCustomLabel( aData );
+                    }
+                }
+            return contactName;
+            }
+        else if( aDetail == QContactOrganization::DefinitionName )          //--Contact Company-----------------------------
+            {
+            QContactOrganization contactCompany;
+            
+            for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
+                {
+                if(aContactDetailList.at(i).definitionName() == QContactOrganization::DefinitionName )
+                    {
+                    contactCompany = aContactDetailList.at(i);
+                    }
+                }
+            
+            //QString company = QString::fromUtf16(aData.Ptr(),aData.Length());
+            if(aFieldString == QContactOrganization::FieldName)
+                {
+                if(contactCompany.name().isEmpty())
+                    {
+                    contactCompany.setName( aData );
+                    }
+                }
+            if(aFieldString == QContactOrganization::FieldTitle)
+                {
+                if(contactCompany.title().isEmpty())
+                    {
+                    contactCompany.setTitle( aData );
+                    }
+                }
+            if(aFieldString == QContactOrganization::FieldDepartment)
+                {
+                QStringList depList = contactCompany.department();
+                depList.append(aData);
+                contactCompany.setDepartment(depList);
+                }
+            if(aFieldString == QContactOrganization::FieldAssistantName)
+                {
+                if(contactCompany.assistantName().isEmpty())
+                    {
+                    contactCompany.setAssistantName( aData );
+                    }
+                }
+            return contactCompany;
+            }
+        else if( aDetail == QContactAddress::DefinitionName )           //--Contact Address-----------------------------
+                {
+                QContactAddress contactAddress;
+                
+                for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
+                    {
+                    if(aContactDetailList.at(i).definitionName() == QContactAddress::DefinitionName && aContactDetailList.at(i).value(QContactDetail::FieldContext) == aFieldContext )
+                        {
+                        contactAddress = aContactDetailList.at(i);
+                        }
+                    }
+                if( !aFieldContext.isEmpty() )
+                    {
+					contactAddress.setContexts( aFieldContext );
+                    }
+                //QString address = QString::fromUtf16(aData.Ptr(),aData.Length());
+                if(aFieldString == QContactAddress::FieldStreet )
+                    {
+                    if( contactAddress.street().isEmpty() )
+                        {
+                        contactAddress.setStreet( aData );
+                        }
+                    }
+                else if(aFieldString == QContactAddress::FieldLocality )
+                    {
+                    if( contactAddress.locality().isEmpty() )
+                        {
+                        contactAddress.setLocality( aData );
+                        }
+                    }
+                else if(aFieldString == QContactAddress::FieldRegion )
+                    {
+                    if( contactAddress.region().isEmpty() )
+                        {
+                        contactAddress.setRegion( aData );
+                        }
+                    }
+                else if(aFieldString == QContactAddress::FieldPostcode )
+                    {
+                    if( contactAddress.postcode().isEmpty() )
+                        {
+                        contactAddress.setPostcode( aData );
+                        }
+                    }
+                else if(aFieldString == QContactAddress::FieldCountry )
+                    {
+                    if( contactAddress.country().isEmpty() )
+                        {
+                        contactAddress.setCountry( aData );
+                        }
+                    }
+                else 
+                    {
+                    return contactDetail;
+                    }
+                return contactAddress;
+                }
+        else if( aDetail == QContactNote::DefinitionName )          //--Contact Note-----------------------------
+                    {
+                    QContactNote contactNote;
+                    //QString note = QString::fromUtf16(aData.Ptr(),aData.Length());
+                    contactNote.setNote(aData);
+                    return contactNote;
+                    }
+        else if( aDetail == QContactFamily::DefinitionName )            //--Contact Family-----------------------------
+                    {
+                    QContactFamily contactFamily;
+                    
+                    for(int i = 0 ; i < aContactDetailList.count() ; i++ ) //go through all contact details to check if there is already Contact Name to set other details
+                        {
+                        if(aContactDetailList.at(i).definitionName() == QContactFamily::DefinitionName && aContactDetailList.at(i).value(QContactDetail::FieldContext) == aFieldContext )
+                            {
+                            contactFamily = aContactDetailList.at(i);
+                            }
+                        }
+                   
+                    //QString familyData = QString::fromUtf16(aData.Ptr(),aData.Length());
+                    if(aFieldString == QContactFamily::FieldSpouse )
+                        {
+                        if( contactFamily.spouse().isEmpty() )
+                            {
+                            contactFamily.setSpouse( aData );
+                            }
+                        }
+                    if(aFieldString == QContactFamily::FieldChildren )
+                        {
+                            QStringList children = contactFamily.children();
+                            children.append( aData );
+                            contactFamily.setChildren( children );
+                        }
+                    
+                    return contactFamily;
+                    }
+        
+        if( aDetail == QContactAvatar::DefinitionName)                      //--Contact Picture-----------------------------
+                {
+                QContactAvatar contactAvatar;
+                QUrl imageUrl;
+                imageUrl.setUrl(aData);
+                contactAvatar.setImageUrl(imageUrl);
+
+                return contactAvatar;
+                }
+        if( aDetail == QContactAnniversary::DefinitionName) //--Anniversary------------------------------
+                {
+                QContactAnniversary contactAnniversary;
+                aData.replace(QChar('/'), QChar('-'));
+       		    QDate date = QDate::fromString(aData, "dd-MM-yyyy");
+                //TTime datetime = aEngine->RandomDate( CCreatorEngine::EDateFuture );
+                //date.setDate( datetime.DateTime().Year(),(int) (datetime.DateTime().Month()+1), datetime.DateTime().Day() );
+                contactAnniversary.setOriginalDate( date );
+                return contactAnniversary;
+                }
+        if( aDetail == QContactEmailAddress::DefinitionName) //--Email------------------------------------
+            {
+            QContactEmailAddress email;
+            //QString emailAddr = QString::fromUtf16(aData.Ptr(),aData.Length());
+            if( !aFieldContext.isEmpty() )
+            	{
+				email.setContexts( aFieldContext );
+            	}
+            email.setEmailAddress( aData );
+            return email;
+            }
+        if( aDetail == QContactUrl::DefinitionName )    //--Url-------------------------------------------
+            {
+            QContactUrl url;
+            //QString urlStr = QString::fromUtf16(aData.Ptr(),aData.Length());
+            if( !aFieldContext.isEmpty() )
+                {
+				url.setContexts( aFieldContext );
+                }
+            url.setUrl(aData);
+            return url;
+            }
+        if( aDetail == QContactBirthday::DefinitionName )   //--Birthday-----------------------------------
+            {
+            QContactBirthday birthday;
+            QDate date = QDate::fromString(aData);
+            //TTime datetime = aEngine->RandomDate( CCreatorEngine::EDatePast );
+            //date.setDate( datetime.DateTime().Year(),(int) (datetime.DateTime().Month()+1), datetime.DateTime().Day() );
+            birthday.setDate( date );
+            return birthday;
+            }
+                
+        return contactDetail;
+    }
+
+void CCreatorPhonebookWrapper::AddFieldToList( QList<QContactDetail>& aDetailList, QContactDetail aDetail)
+    {
+     bool replace = false;
+     for(int i = 0 ; i< aDetailList.count() ; i++) //go through
+          {
+           if( !aDetail.isEmpty() && aDetail.definitionName() == aDetailList.at(i).definitionName() 
+        		   && aDetail.definitionName() != QContactPhoneNumber::DefinitionName 
+        		   && aDetail.definitionName() != QContactEmailAddress::DefinitionName
+        		   && aDetail.definitionName() != QContactUrl::DefinitionName )
+               {
+               QString context = aDetail.value(QContactDetail::FieldContext);
+               bool isContextEmpty = context.isEmpty();
+               if( isContextEmpty ||  ( aDetail.value(QContactDetail::FieldContext) == aDetailList.at(i).value(QContactDetail::FieldContext)) )
+                   {
+                   //replace
+                   aDetailList.replace(i,aDetail);
+                   replace = true;
+                   }
+               }
+          }
+          if(!replace)
+             {
+             if(!aDetail.isEmpty())
+                {
+                aDetailList.append(aDetail);
+                }
+             }
+      
+    }
+
+TUint32 CCreatorPhonebookWrapper::CreateContactEntryL(const TCreatorContactFields& aFields)
+    {
+	QList<QContactDetail> list = CreateContactDetailsFromParameters( aFields );
+	
+	return iPhonebookAPI->saveContact( list );
+    }
+
+
+//----------------------------------------------------------------------------
+
+
+
+//----------------------------------------------------------------------------
+
+void CCreatorPhonebookWrapper::DeleteAllL()
+    {
+	iPhonebookAPI->deleteAllContacts();
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebookWrapper::DeleteAllGroupsL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebookWrapper::DeleteAllGroupsL");
+    
+    iPhonebookAPI->deleteAllContacts( QContactType::TypeGroup );
+
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorPhonebookWrapper::DeleteContactsL( RArray<TUint32>& aContactsToDelete, TUid aStoreUid )
+    {
+	QList<QContactLocalId> contacts; 
+	for( TInt i = 0; i < aContactsToDelete.Count(); ++i )
+	    {
+	    QContact contact = iPhonebookAPI->contact( QContactLocalId( aContactsToDelete[i] ) );
+	    if( (contact.type() == QContactType::TypeGroup && aStoreUid == KUidDictionaryUidContactGroups ) ||  (contact.type() != QContactType::TypeGroup && aStoreUid != KUidDictionaryUidContactGroups) )
+            {
+            contacts.append( QContactLocalId( aContactsToDelete[i] ) );
+            }
+	    }
+    QMap<int, QContactManager::Error> errorMap;
+	iPhonebookAPI->deleteContacts( contacts );
+    }
+
+//----------------------------------------------------------------------------
+TBool CCreatorPhonebookWrapper::HasOtherThanGroupsL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebookWrapper::HasOtherThanGroupsL");
+    TBool result( EFalse );
+    return result;
+    }
+
+
+TUint32 CCreatorPhonebookWrapper::CreateGroupEntryL( HBufC* aGroupName )
+    {
+	TUint32 id = 0;
+	QString groupName = QString::fromUtf16( aGroupName->Des().Ptr(), aGroupName->Length() );
+	
+	id = iPhonebookAPI->createGroup( groupName );
+	
+	return id; 
+    }
+TInt CCreatorPhonebookWrapper::NumberOfContacts()
+	{
+	//return all stored contacts
+	return iPhonebookAPI->numberOfContacts();
+	}
+
+TInt CCreatorPhonebookWrapper::AddContactToGroup( TUint32 aGroupId, TUint32 aContact )
+	{
+	QContactLocalId group = QContactLocalId(aGroupId);
+	QContactLocalId contact = QContactLocalId(aContact);
+	
+	TInt ret = iPhonebookAPI->addContactToGroup(group, contact);
+
+	return ret;
+	}
+TInt CCreatorPhonebookWrapper::AddToGroup( TUint32 aGroupId, TInt aAmount )
+	{
+	QContactLocalId group = QContactLocalId(aGroupId);
+	TInt ret = iPhonebookAPI->addToGroup( group, (int) aAmount );
+	return ret;
+	}
+
+
+//----------------------------------------------------------------------------
+
+TInt CCreatorPhonebookWrapper::CreateSubscribedContactEntryL()
+    {
+    LOGSTRING("Creator: CCreatorPhonebookWrapper::CreateSubscribedContactEntryL");
+
+    return KErrNotSupported;
+    }
+
+
+HBufC* CCreatorPhonebookWrapper::GetPhoneNumberL( TUint32 aContactId )
+    {
+    QContactLocalId contact = QContactLocalId(aContactId);
+    QString phoneNumber = iPhonebookAPI->phoneNumber(contact);
+    HBufC *buf = HBufC::NewLC( phoneNumber.length() );
+    buf->Des().Copy( phoneNumber.utf16() );
+    CleanupStack::Pop( buf );
+    return buf;
+    }
+
+TBool CCreatorPhonebookWrapper::GetContactDetailsL( TUint32 aContactId, TDes& aName, TDes& aPhoneNumber, TDes& aEmail )
+    {
+    QString name;
+    QString phoneNumber;
+    QString email;
+    
+    QContactLocalId contact = QContactLocalId(aContactId);
+    bool success = iPhonebookAPI->contactDetails( contact, name, phoneNumber, email);
+    if( success )
+        {
+        aName.Copy( name.utf16() );
+        aPhoneNumber.Copy( phoneNumber.utf16() );
+        aEmail.Copy( email.utf16() );
+        }
+    return success ? ETrue : EFalse ;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_randomdataparser.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,325 @@
+/*
+* 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 <f32file.h>
+#include <utf.h>
+#include <xml/documentparameters.h>
+#include "creator_randomdataparser.h"
+#include "creator_traces.h"
+
+// XML element names
+_LIT(KRootElement, "creatordata");
+_LIT(KFirstName, "firstname");
+_LIT(KSurname, "surname");
+_LIT(KCompany, "company");
+_LIT(KAddress, "address");
+_LIT(KJobTitle, "jobtitle");
+_LIT(KPhoneNumber, "phonenumber");
+_LIT(KGroupName, "groupname");
+_LIT(KMeetingReason, "meetingreason");
+_LIT(KMeetingPlace, "meetingplace");
+_LIT(KMemoText, "memo");
+_LIT(KAnniversaryReason, "anniversary");
+_LIT(KToDoText, "todo");
+_LIT(KReminderText, "reminder");
+_LIT(KMessageSubject, "messagesubject");
+_LIT(KMessageText, "messagetext");
+_LIT(KCity, "city");
+_LIT(KCountry, "country");
+_LIT(KPostcode, "postcode");
+_LIT(KState, "state");
+_LIT(KPobox, "pobox");
+_LIT(KPrefix, "prefix");
+_LIT(KSuffix, "suffix");
+_LIT(KLandmarkName, "landmarkname");
+_LIT(KLandmarkDescription, "landmarkdescription");
+
+using namespace Xml;
+
+CCreatorRandomDataParser::CCreatorRandomDataParser() 
+    {        
+    }
+
+void CCreatorRandomDataParser::ConstructL()
+    {
+    LOGSTRING("Creator: CCreatorRandomDataParser::ConstructL");
+	iElementNameArray = new (ELeave) CDesCArrayFlat(32);
+	iElementNameArray->InsertL(EFirstName, KFirstName);
+	iElementNameArray->InsertL(ESurname, KSurname);
+	iElementNameArray->InsertL(ECompany, KCompany);
+	iElementNameArray->InsertL(EAddress, KAddress);
+	iElementNameArray->InsertL(EJobTitle, KJobTitle);
+	iElementNameArray->InsertL(EPhoneNumber, KPhoneNumber);
+	iElementNameArray->InsertL(EGroupName, KGroupName);
+	iElementNameArray->InsertL(EMeetingReason, KMeetingReason);
+	iElementNameArray->InsertL(EMeetingPlace, KMeetingPlace);
+	iElementNameArray->InsertL(EMemoText, KMemoText);
+	iElementNameArray->InsertL(EAnniversaryReason, KAnniversaryReason);
+	iElementNameArray->InsertL(EToDoText, KToDoText);
+	iElementNameArray->InsertL(EReminderText, KReminderText);
+	iElementNameArray->InsertL(EMessageSubject, KMessageSubject);
+	iElementNameArray->InsertL(EMessageText, KMessageText);
+	iElementNameArray->InsertL(ECity, KCity);
+	iElementNameArray->InsertL(ECountry, KCountry);
+	iElementNameArray->InsertL(EPostcode, KPostcode);
+	iElementNameArray->InsertL(EState, KState);
+	iElementNameArray->InsertL(EPobox, KPobox);
+	iElementNameArray->InsertL(EPrefix, KPrefix);
+	iElementNameArray->InsertL(ESuffix, KSuffix);
+	iElementNameArray->InsertL(ELandmarkName, KLandmarkName);
+	iElementNameArray->InsertL(ELandmarkDescription, KLandmarkDescription);
+	iContentData = HBufC::NewL(16);
+    iResultArray = new (ELeave) CDesCArrayFlat(16);
+    }
+
+CCreatorRandomDataParser* CCreatorRandomDataParser::NewL()
+    {
+    LOGSTRING("Creator: CCreatorRandomDataParser::NewL");
+    CCreatorRandomDataParser* self = CCreatorRandomDataParser::NewLC();    
+    CleanupStack::Pop();
+    return self;
+    }
+
+CCreatorRandomDataParser* CCreatorRandomDataParser::NewLC()
+    {
+    LOGSTRING("Creator: CCreatorRandomDataParser::NewLC");
+    CCreatorRandomDataParser* self = new (ELeave) CCreatorRandomDataParser;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+CCreatorRandomDataParser::~CCreatorRandomDataParser()
+    {
+    delete iParser;
+    delete iResultArray;
+    delete iContentData;
+    delete iElementNameArray;
+    }
+
+void CCreatorRandomDataParser::GetTextFileMode(RFile& aFile, TInt& aFileSize) 
+    { 
+    LOGSTRING("Creator: CCreatorRandomDataParser::GetTextFileMode");
+    iScriptTextFormat = EFormatANSIASCII; 
+
+    // if we are working with text files, check the type first   
+    TBuf8<4> BOM; 
+
+    // first check for UTF-16 
+    if (aFileSize >= 2 && aFile.Read(0, BOM, 2) == KErrNone) 
+        { 
+        if (BOM.Length()==2 && BOM[0]==0xFF && BOM[1]==0xFE) 
+            { 
+            iScriptTextFormat = EFormatUTF16LE; 
+            aFileSize -= 2; 
+            return; 
+            } 
+        else if (BOM.Length()==2 && BOM[0]==0xFE && BOM[1]==0xFF) 
+            { 
+            iScriptTextFormat = EFormatUTF16BE; 
+            aFileSize -= 2; 
+            return;                 
+            }       
+        }
+        // then check for UTF-8 
+    if (aFileSize >= 3 && aFile.Read(0, BOM, 3) == KErrNone) 
+        { 
+        if (BOM.Length()==3 && BOM[0]==0xEF && BOM[1]==0xBB && BOM[2]==0xBF) 
+            { 
+            iScriptTextFormat = EFormatUTF8; 
+            aFileSize -= 3; 
+            return; 
+            } 
+        }
+        
+    // none of those, seek back to beginning 
+    TInt pos(0); 
+    aFile.Seek(ESeekStart, pos); 
+    }    
+ 
+
+
+CDesCArrayFlat* CCreatorRandomDataParser::ParseL(const TDesC& aFileName, const TRandomDataType aDataType)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::ParseL: %S", &aFileName);
+    
+    iDataType = aDataType;
+    
+    // Create and start XML-parser
+    if( iParser == 0)
+        {
+        _LIT8(KXmlMimeType, "text/xml");
+        iParser = CParser::NewL(KXmlMimeType, *this);        
+        }
+
+    RFs filesession;
+    CleanupClosePushL(filesession);
+    User::LeaveIfError( filesession.Connect() );
+    
+    iResultArray->Reset();
+    
+    Xml::ParseL(*iParser, filesession, aFileName);
+    
+    CleanupStack::PopAndDestroy(&filesession); // filesession 
+    
+    CDesCArrayFlat* tempArray = new (ELeave) CDesCArrayFlat(8);
+    CleanupStack::PushL(tempArray);
+    for (TInt i = 0; i < iResultArray->MdcaCount(); i++)
+    	{
+    	tempArray->AppendL(iResultArray->MdcaPoint(i));
+    	}
+    CleanupStack::Pop(tempArray);
+    return tempArray;
+    }
+
+void CCreatorRandomDataParser::OnStartDocumentL(const Xml::RDocumentParameters& /*aDocParam*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnStartDocumentL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);    
+    iInsideRootElement = EFalse;
+	iContentParsingActive = EFalse;
+    }
+
+void CCreatorRandomDataParser::OnEndDocumentL(TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnEndDocumentL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+
+void CCreatorRandomDataParser::OnStartPrefixMappingL(const RString& /*aPrefix*/, 
+                                                     const RString& /*aUri*/, 
+                                                     TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnStartPrefixMappingL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+
+void CCreatorRandomDataParser::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnEndPrefixMappingL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+
+void CCreatorRandomDataParser::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnIgnorableWhiteSpaceL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+
+void CCreatorRandomDataParser::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnSkippedEntityL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+
+void CCreatorRandomDataParser::OnProcessingInstructionL(const TDesC8& /*aTarget*/, 
+                                                        const TDesC8& /*aData*/, 
+                                                        TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnProcessingInstructionL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+
+void CCreatorRandomDataParser::OnError(TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnError: %d", aErrorCode);
+    
+    iLastError = aErrorCode;
+    }
+
+TAny* CCreatorRandomDataParser::GetExtendedInterface(const TInt32 aUid)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::GetExtendedInterface (UID: %d)", aUid);
+    return this;
+    }
+
+void CCreatorRandomDataParser::OnStartElementL(const Xml::RTagInfo& aElement,
+                                               const Xml::RAttributeArray& /*aAttributes*/,
+                                               TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnStartElementL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+
+    const TDesC8& elementName8 = aElement.LocalName().DesC();        
+    HBufC* elementName16 = Convert8BitTo16BitLC(elementName8);
+    if (iInsideRootElement || (elementName16->Des() == KRootElement))
+    	{
+    	iInsideRootElement = ETrue;
+    	}
+    if (iInsideRootElement && (elementName16->Des() == iElementNameArray->MdcaPoint(iDataType)))
+    	{
+        iContentParsingActive = ETrue;
+        iContentData->Des().Zero();
+    	}
+    CleanupStack::PopAndDestroy(elementName16);
+    }
+
+void CCreatorRandomDataParser::OnEndElementL(const Xml::RTagInfo& aElement, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnEndElementL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+
+    const TDesC8& elementName8 = aElement.LocalName().DesC();
+    HBufC* elementName16 = Convert8BitTo16BitLC(elementName8);
+    if (!iInsideRootElement || (elementName16->Des() == KRootElement))
+    	{
+    	iInsideRootElement = EFalse;
+    	}
+    CleanupStack::PopAndDestroy(elementName16);
+
+    if (iContentParsingActive)
+		{
+	    if (iContentData->Des().Length() > 0)
+	    	{
+	    	iResultArray->AppendL(*iContentData);
+	    	}
+        iContentParsingActive = EFalse;
+		}
+    }
+
+void CCreatorRandomDataParser::OnContentL(const TDesC8& aBytes, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorRandomDataParser::OnContentL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    
+    if (iContentParsingActive)
+    	{
+        HBufC* data16 = Convert8BitTo16BitLC(aBytes);
+        TInt newLen = iContentData->Des().Length() + data16->Des().Length();
+        iContentData = iContentData->ReAllocL(newLen);
+        iContentData->Des().Append(*data16);
+        CleanupStack::PopAndDestroy(data16);
+    	}
+    }
+
+HBufC16* CCreatorRandomDataParser::Convert8BitTo16BitLC(const TDesC8& aInput) 
+    {     
+    LOGSTRING("Creator: CCreatorRandomDataParser::Convert8BitTo16BitLC");
+    HBufC16* output = NULL;
+    
+    output = CnvUtfConverter::ConvertToUnicodeFromUtf8L(aInput);
+    
+    CleanupStack::PushL(output);
+    return output;          
+    } 
+
+TInt CCreatorRandomDataParser::GetError() const 
+	{
+    return iLastError;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_scriptelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,722 @@
+/*
+* 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 "creator_traces.h"
+#include "creator_scriptelement.h"
+#include <xml/documentparameters.h>
+#include <collate.h>
+#include <etel3rdparty.h> // KMaxTelNumberSize
+
+using namespace Xml;
+
+CCreatorScriptElementCache* CCreatorScriptElementCache::NewL()
+{
+    CCreatorScriptElementCache* self = new (ELeave) CCreatorScriptElementCache;
+    CleanupStack::PushL(self);
+    
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+}
+
+CCreatorScriptElementCache::CCreatorScriptElementCache()
+    {
+    
+    }
+
+void CCreatorScriptElementCache::ConstructL()
+    {
+    
+    }
+ 
+CCreatorScriptElementCache::~CCreatorScriptElementCache()
+    {
+    iElementCache.Reset();
+    iElementCache.Close();
+    }
+    
+void CCreatorScriptElementCache::RemoveElements()
+    {
+    iElementCache.Reset();
+    }
+
+        
+void CCreatorScriptElementCache::AddElementL(CCreatorScriptElement* aElement)
+    {
+    iElementCache.AppendL(aElement);
+    }
+
+/**
+ * 
+ */
+CCreatorScriptAttribute* CCreatorScriptAttribute::NewLC(const TDesC& aName, const TDesC& aValue)
+    {
+    CCreatorScriptAttribute* self = new(ELeave) CCreatorScriptAttribute();
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aValue);
+    return self;
+    }
+
+CCreatorScriptAttribute* CCreatorScriptAttribute::NewL(const TDesC& aName, const TDesC& aValue)
+    {
+    CCreatorScriptAttribute* self = CCreatorScriptAttribute::NewLC(aName, aValue);
+    CleanupStack::Pop(); // self    
+    return self;
+    }
+
+CCreatorScriptAttribute::~CCreatorScriptAttribute()
+    {
+    delete iName;
+    delete iValue;
+    }
+    
+TPtrC CCreatorScriptAttribute::Name() const
+    {
+    return iName->Des();
+    }
+
+void CCreatorScriptAttribute::SetNameL(const TDesC& aName) 
+    {
+    if( iName )
+        {
+        delete iName;
+        iName = 0;
+        }    
+    iName = HBufC::NewL(aName.Length());
+    iName->Des() = aName; 
+    }       
+    
+TPtrC CCreatorScriptAttribute::Value() const
+    {
+    return iValue->Des();
+    }
+
+void CCreatorScriptAttribute::SetValueL(const TDesC& aValue)
+    {
+    if( iValue )
+        {
+        delete iValue;
+        iValue = 0;
+        }
+    iValue = HBufC::NewL(aValue.Length());
+    iValue->Des() = aValue; 
+    }   
+
+CCreatorScriptAttribute::CCreatorScriptAttribute()
+    {    
+    }
+
+void CCreatorScriptAttribute::ConstructL(const TDesC& aName, const TDesC& aValue)
+    {
+    SetNameL(aName);
+    SetValueL(aValue);
+    }
+
+/**
+ * CCreatorScriptElement
+ */
+
+CCreatorScriptElement* CCreatorScriptElement::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    CCreatorScriptElement* self = new (ELeave) CCreatorScriptElement(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+
+CCreatorScriptElement::~CCreatorScriptElement()
+    {
+    LOGSTRING("Creator: CCreatorScriptElement::~CCreatorScriptElement");
+    iSubElements.ResetAndDestroy();
+    iAttributes.ResetAndDestroy();
+    iSubElements.Close();
+    iAttributes.Close();
+    iParameters.Reset();
+    iParameters.Close();
+    delete iName;
+    delete iContent;
+    delete iContext;
+    }
+
+RPointerArray<CCreatorScriptElement> const& CCreatorScriptElement::SubElements() const
+    {
+    return iSubElements;
+    }
+
+RPointerArray<CCreatorScriptElement>& CCreatorScriptElement::SubElements()
+    {
+    return iSubElements;
+    }
+    
+CCreatorScriptElement* CCreatorScriptElement::SubElement(TInt aIndex)
+    {
+    return iSubElements[aIndex];
+    }
+
+CCreatorScriptElement* CCreatorScriptElement::FindSubElement(const TDesC& aName)
+    {
+    for( TInt i = 0; i < iSubElements.Count(); ++i )
+        {
+        if( iSubElements[i]->Name() == aName )
+            {
+            return iSubElements[i];
+            }            
+        }
+    return 0;
+    }
+    
+void CCreatorScriptElement::RemoveSubElements()
+    {
+    iSubElements.ResetAndDestroy();
+    }
+    
+void CCreatorScriptElement::RemoveSubElementL(TInt aIndex)
+    {
+    if( aIndex < iSubElements.Count())
+        {
+        delete iSubElements[aIndex];
+        iSubElements.Remove(aIndex);
+        }
+    else
+        {
+        User::Leave(KErrArgument);
+        }
+    }
+    
+void CCreatorScriptElement::AddSubElementL(CCreatorScriptElement* aElem, TInt aIndex )
+    {
+    if( aIndex == -1 || aIndex == iSubElements.Count() )
+        {
+        iSubElements.AppendL(aElem);
+        }
+    else if( aIndex < iSubElements.Count())
+        {
+        iSubElements.InsertL(aElem, aIndex);
+        }
+    else
+        {
+        User::Leave(KErrArgument);
+        }
+    }
+  
+RPointerArray<CCreatorScriptAttribute> const& CCreatorScriptElement::Attributes() const
+    {
+    return iAttributes;
+    }
+
+        
+ CCreatorScriptAttribute* CCreatorScriptElement::Attribute(TInt aIndex)
+     {
+     return iAttributes[aIndex];
+     }
+    
+void CCreatorScriptElement::RemoveAttributes()
+    {
+    iAttributes.ResetAndDestroy();
+    }
+    
+ 
+void CCreatorScriptElement::RemoveAttributeL(TInt aIndex)
+    {
+    if( aIndex < iAttributes.Count())
+        {
+        delete iAttributes[aIndex];
+        iAttributes.Remove(aIndex);
+        }
+    else
+        {
+        User::Leave(KErrArgument);
+        }
+    }
+ 
+void CCreatorScriptElement::AddAttributeL(CCreatorScriptAttribute* aAttribute, TInt aIndex )
+    {
+    if( aIndex == -1 || aIndex == iAttributes.Count() )
+        {
+        iAttributes.AppendL(aAttribute);
+        }
+    else if( aIndex < iAttributes.Count())
+        {
+        iAttributes.InsertL(aAttribute, aIndex);        
+        }
+    else
+        {
+        User::Leave(KErrArgument);
+        }
+    }
+
+TPtrC CCreatorScriptElement::Name() const
+    {
+    if( iName )
+        return iName->Des();
+    return TPtrC();
+    }
+
+void CCreatorScriptElement::SetNameL(const TDesC& aName)
+    {
+    if( iName )
+        {
+        delete iName;
+        iName = 0;
+        }    
+    iName = HBufC::NewL(aName.Length());
+    iName->Des() = aName; 
+    }
+
+ 
+TPtrC CCreatorScriptElement::Content() const
+    {
+    if (iContent)
+        return iContent->Des();
+    return TPtrC();
+    }
+    
+void CCreatorScriptElement::SetContentL(const TDesC& aContent)
+    {
+    if( iContent )
+        {
+        delete iContent;
+        iContent = 0;
+        }    
+    iContent = HBufC::NewL(aContent.Length());
+    iContent->Des() = aContent;
+    }
+
+void CCreatorScriptElement::AppendContentL(const TDesC& aContent)
+    {
+    if( iContent == 0 )
+        {
+        SetContentL(aContent);
+        return;
+        }
+            
+    iContent = iContent->ReAllocL(iContent->Length() + aContent.Length() );
+    
+    TPtr ptr(iContent->Des());
+    ptr += aContent;
+    }
+
+TPtrC CCreatorScriptElement::Context() const
+    {
+    if( iContext )
+        return iContext->Des();
+    return TPtrC();
+    }
+    
+void CCreatorScriptElement::SetContextL(const TDesC& aContext)
+    {
+    if( iContext )
+        {
+        delete iContext;
+        iContext = 0;
+        }    
+    iContext = HBufC::NewL(aContext.Length());
+    iContext->Des() = aContext;
+    }
+
+const CCreatorScriptAttribute* CCreatorScriptElement::FindAttributeByName(const TDesC& aName) const
+    {
+    for( TInt i = 0; i < iAttributes.Count(); ++i )
+        {
+        CCreatorScriptAttribute* attr = iAttributes[i];
+        if( attr->Name() == aName )
+            {
+            return attr;
+            }
+        }
+    return 0;
+    }
+
+CCreatorScriptAttribute* CCreatorScriptElement::FindAttributeByName(const TDesC& aName)
+    {    
+    for( TInt i = 0; i < iAttributes.Count(); ++i )
+        {
+        CCreatorScriptAttribute* attr = iAttributes[i];
+        if( attr->Name() == aName )
+            {
+            return attr;
+            }
+        }
+    return 0;
+    }
+
+TBool CCreatorScriptElement::IsCacheNeeded()
+    {
+    _LIT(KIDAttrName, "id");
+    const CCreatorScriptAttribute* attr = FindAttributeByName(KIDAttrName);
+    return attr != 0;
+    }
+
+void CCreatorScriptElement::AddToCacheL(CCreatorScriptElementCache& aCache)
+    {
+    aCache.AddElementL(this);
+    }
+
+RPointerArray<CCreatorModuleBaseParameters>& CCreatorScriptElement::CommandParameters()
+    {
+    return iParameters;
+    }
+
+const RPointerArray<CCreatorModuleBaseParameters>& CCreatorScriptElement::CommandParameters() const
+    {
+    return iParameters;
+    }
+
+void CCreatorScriptElement::AddToCacheL()
+    {    
+    }
+
+TBool CCreatorScriptElement::IsCommandElement() const
+    {
+    return iIsCommandElement;
+    }
+
+void CCreatorScriptElement::ExecuteCommandL()
+    {
+    
+    }
+   
+TBool CCreatorScriptElement::IsRoot() const
+    {
+    _LIT(KRootName, "creatorscript");
+    if(iName->Des() == KRootName)
+        return ETrue;
+    return EFalse;
+    }
+
+CCreatorScriptElement::CCreatorScriptElement(CCreatorEngine* aEngine)
+: 
+iIsCommandElement(EFalse),
+iIsRoot(EFalse),
+iEngine(aEngine)
+    {}
+    
+void CCreatorScriptElement::ConstructL(const TDesC& aName, const TDesC& aContext)
+    {
+    SetNameL(aName);
+    SetContextL(aContext);
+    }
+    
+TBool CCreatorScriptElement::IsSubElementSupported(const CCreatorScriptElement& /*aElem*/) const
+    {
+    return ETrue;
+    }
+
+TBool CCreatorScriptElement::ConvertStrToBooleanL(const TDesC& aStr) const
+    {
+    TBool boolVal = EFalse;
+    _LIT(KYes, "yes");
+    _LIT(KTrue, "true");
+    if( CompareIgnoreCase(aStr, KYes) == 0 ||
+        CompareIgnoreCase(aStr, KTrue) == 0 )
+        {
+        boolVal = ETrue;
+        }    
+    return boolVal;
+    }
+
+TInt CCreatorScriptElement::ConvertStrToIntL(const TDesC& aStr) const
+    {
+    TInt intVal = 0;
+    TLex lex(aStr);
+    TInt errorCode=lex.Val(intVal);
+    User::LeaveIfError(errorCode);
+    return intVal;
+    }
+
+TUint CCreatorScriptElement::ConvertStrToUintL(const TDesC& aStr) const
+	{
+	TUint uintVal = 0;
+	TLex lex(aStr);
+	TInt errorCode=lex.Val(uintVal);
+	User::LeaveIfError(errorCode);
+	return uintVal;
+	}
+void CCreatorScriptElement::ConvertStrToReal64L(const TDesC& aStr, TReal64& aVal) const
+    {    
+    TLex lex(aStr);
+    TInt errorCode=lex.Val(aVal);
+    User::LeaveIfError(errorCode);    
+    }
+
+void CCreatorScriptElement::ConvertStrToReal32L(const TDesC& aStr, TReal32& aVal) const
+    {    
+    TLex lex(aStr);
+    TInt errorCode=lex.Val(aVal);
+    User::LeaveIfError(errorCode);    
+    }
+
+MCreatorRandomDataField::TRandomLengthType CCreatorScriptElement::ResolveRandomDataTypeL(const CCreatorScriptAttribute& aAttr, TInt& aRandomLen) const
+    {    
+    TPtrC attrVal = aAttr.Value();
+    if(attrVal == KMax )
+        return MCreatorRandomDataField::ERandomLengthMax;
+    if(attrVal == KDefault)
+        return MCreatorRandomDataField::ERandomLengthDefault;
+    
+    // Let's see if the value is numeric:
+    TInt val = 0;
+    TLex lex(attrVal);
+    TInt errorCode=lex.Val(val);
+    if( errorCode == KErrNone )   
+        {
+        aRandomLen = val;
+        return MCreatorRandomDataField::ERandomLengthExplicit;
+        }
+    return MCreatorRandomDataField::ERandomLengthUndefined;
+    }
+
+void CCreatorScriptElement::AppendContactSetReferenceL(
+        const CCreatorScriptElement& aContactSetRefElem, 
+        RArray<TLinkIdParam>& aLinkArray ) const
+        {
+        const TDesC& eName = aContactSetRefElem.Name();
+        if( eName != KContactSetRef )
+            return;
+        
+        const CCreatorScriptAttribute* linkIdAttr = aContactSetRefElem.FindAttributeByName(KId);
+        if( linkIdAttr )
+            {
+            TInt linkId = ConvertStrToIntL(linkIdAttr->Value());
+            if( linkId > 0 )
+                {
+                TLinkIdParam linkParams;
+                // Add contact-set-reference id to links
+                linkParams.iLinkId = linkId;
+                linkParams.iLinkAmount = KUndef; // undefined
+                // Resolve maxamount:
+                const CCreatorScriptAttribute* maxAmount = aContactSetRefElem.FindAttributeByName(KMaxAmount);
+                if( maxAmount )
+                    {                                
+                    TInt maxAmountVal = ConvertStrToIntL(maxAmount->Value());
+                    if( maxAmountVal > 0 )
+                        {
+                        linkParams.iLinkAmount = maxAmountVal;
+                        }
+                    }
+                aLinkArray.AppendL(linkParams);
+                }
+            }
+        }       
+
+TTime CCreatorScriptElement::ConvertToDateTimeL(const TDesC& aDtStr) const
+    {
+    _LIT(KDateFieldSeparator, "-");
+    _LIT(KTimeFieldSeparator, ":");    
+    _LIT(KDateTimeSeparator, "T");    
+    _LIT(KTimeSuffix, ".");
+    _LIT(KDateSuffix, ":");
+    // Format date-time string:
+    HBufC* formatted = HBufC::NewLC(aDtStr.Length());
+    formatted->Des().Copy(aDtStr);
+    
+    TBool hasTimePart = EFalse; 
+    TBool hasDateTimeSeparator = EFalse;
+    TInt pos = 0;
+    
+    // Date and month numbering starts from 0 in Symbian, so first
+    // we need to decrease the date and month by one. Script format is following:
+    // yyyy-mm-ddThh:mm:ss
+    // Remove also date field separators ('-')
+    while( (pos = formatted->Find(KDateFieldSeparator)) != KErrNotFound )
+        {
+        // decrease month or date by one
+        
+        // First char. Can be zero also:
+        TInt newValue = 0;
+        const TPtrC& char1 = formatted->Des().Mid(pos+1).Left(1);
+        newValue = 10 * ConvertStrToIntL(char1);
+        // Next char:
+        const TPtrC& char2 = formatted->Des().Mid(pos+2).Left(1);
+        newValue += ConvertStrToIntL(char2);
+       
+        if( newValue > 0 )
+            {
+            --newValue;
+            }
+        
+        _LIT(KTemp, "%d");
+        HBufC* formatBuf = KTemp().AllocLC();
+        HBufC* buf = 0;
+        if( newValue < 10 )
+            buf = HBufC::NewLC(1);            
+        else
+            buf = HBufC::NewLC(2);
+                        
+        TPtr temp(buf->Des());
+        temp.Format(*formatBuf, newValue);
+        if( newValue < 10 )
+            {
+            formatted->Des()[pos+1] = TChar('0');
+            formatted->Des()[pos+2] = buf->Des()[0];
+            }
+        else
+            {
+            formatted->Des()[pos+1] = buf->Des()[0];
+            formatted->Des()[pos+2] = buf->Des()[1];
+            }
+        // Finally, delete the '-' separator:
+        formatted->Des().Delete(pos, 1);        
+        CleanupStack::PopAndDestroy(2);
+        }
+    
+    while( (pos = formatted->Find(KTimeFieldSeparator)) != KErrNotFound )
+        {
+        formatted->Des().Delete(pos, 1);
+        hasTimePart = ETrue;
+        }
+    
+    // Replace 'T' with ':':
+    if( (pos = formatted->Find(KDateTimeSeparator)) != KErrNotFound )
+        {
+        formatted->Des().Replace(pos, 1, KDateSuffix);
+        hasDateTimeSeparator = ETrue;
+        }
+    
+    if( hasTimePart )
+        formatted->Des().Append(KTimeSuffix);
+    else if( !hasDateTimeSeparator )
+        formatted->Des().Append(KDateSuffix);
+    
+    
+    TTime ret;
+    ret.Set(*formatted);    
+    CleanupStack::PopAndDestroy(); // formatted
+    return ret;
+    }
+
+TInt CCreatorScriptElement::CompareIgnoreCase(const TDesC& aStr1, const TDesC& aStr2 ) const
+    {
+    // Get default collation method:
+    TCollationMethod defaultCollationMethod = *Mem::CollationMethodByIndex(0); 
+    
+    // Add ignore case flag:
+    defaultCollationMethod.iFlags |= TCollationMethod::EFoldCase;
+    
+    return aStr1.CompareF(aStr2);
+    }
+
+void CCreatorScriptElement::SetContentToTextParamL(HBufC*& aPtr, const TDesC& aContent )
+    {
+    delete aPtr;
+    aPtr = 0;
+    aPtr = HBufC::NewL(aContent.Length());
+    aPtr->Des().Copy(aContent);
+    }
+
+/**
+ * Increases phonenumber by aDelta.
+ */
+void CCreatorScriptElement::IncreasePhoneNumL( const TDesC& aOriginal, TInt aDelta, HBufC* aIncreased ) const
+    {
+    LOGSTRING("Creator: CCreatorMessageElement::IncreasePhoneNumL");
+    __ASSERT_ALWAYS( aDelta >= 0, User::Panic( _L("IncreasePhoneNumL"), KErrArgument ) );
+    
+    // special cases, that are handled:
+    // +9          -> +9, +10, +11...
+    // +3584098#99 -> +3584098#99, +3584098#100, +3584098#101...
+    // #           -> #0, #1, #2...
+    // 123#        -> 123#0, 123#1, 123#2... 
+    // 099         -> 099, 100, 101...
+    
+    // find out if there are any special characters, like # p or *, in the original number
+    TInt startIndex( aOriginal.Length() -1 );
+    while ( startIndex >= 0 && 
+            aOriginal[startIndex] >= '0' &&
+            aOriginal[startIndex] <= '9' )
+        {
+        startIndex--;
+        }
+    startIndex++;
+    
+    // append original head that may contain any non number characters 
+    aIncreased->Des().Append( aOriginal.Left( startIndex ) );
+    
+    TBuf<CTelephony::KMaxTelNumberSize> tailBuf;
+    if ( aOriginal.Length() > startIndex )
+        {
+        tailBuf.Copy( aOriginal.Right( aOriginal.Length() -startIndex ) );
+        }
+    
+    // parse the tail part of the original number
+    TInt64 intVal = 0;
+    if ( aOriginal.Length() > startIndex )
+        {
+        TLex lex( tailBuf );
+        User::LeaveIfError( lex.Val( intVal ) ); // this loses leading zeros
+        }
+    
+    // increase
+    intVal += aDelta;
+    
+    // restore leading zeros to tail, if any
+    TBuf<CTelephony::KMaxTelNumberSize> resultTailNoZeros;
+    resultTailNoZeros.AppendNum( intVal );
+    TInt tailLeadingZerosToRestore = tailBuf.Length() - resultTailNoZeros.Length();
+    for ( TInt i = 0; i < tailLeadingZerosToRestore; i++ )
+        {
+        aIncreased->Des().AppendNum( 0 );
+        }
+
+    // and finally, append the increased value as tail part of the result
+    aIncreased->Des().Append( resultTailNoZeros );    
+    }
+
+CCreatorScriptRoot* CCreatorScriptRoot::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    CCreatorScriptRoot* self = new (ELeave) CCreatorScriptRoot(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorScriptRoot::CCreatorScriptRoot(CCreatorEngine* aEngine)
+:
+CCreatorScriptElement(aEngine)
+    {
+    iIsRoot=ETrue;
+    }
+
+
+CCreatorCalendarElementBase* CCreatorCalendarElementBase::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    CCreatorCalendarElementBase* self = new (ELeave) CCreatorCalendarElementBase(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorCalendarElementBase::CCreatorCalendarElementBase(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    { }
+
+CCreatorMessageElementBase* CCreatorMessageElementBase::NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext)
+    {
+    CCreatorMessageElementBase* self = new (ELeave) CCreatorMessageElementBase(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aContext);
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorMessageElementBase::CCreatorMessageElementBase(CCreatorEngine* aEngine) 
+: 
+CCreatorScriptElement(aEngine)
+    { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_scriptelementfactory.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* 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 "creator_traces.h"
+#include "creator_scriptelementfactory.h"
+#include "creator_contactelement.h"
+#include "creator_calendarelement.h"
+#include "creator_messageelement.h"
+#include "creator_fileelement.h"
+//#include "creator_browserelement.h"
+#include "creator_logelement.h"
+//#include "creator_noteelement.h"
+//#include "creator_impselement.h"
+#include "creator_landmarkelement.h"
+#include "creator_mailboxelement.h"
+//#include "creator_connectionmethodelement.h"
+
+CCreatorScriptElement* TCreatorScriptElementFactory::CreateElementL(CCreatorEngine* aEngine, const TDesC& aElementName, const TDesC& aContext )
+    {   
+    LOGSTRING2("TCreatorScriptElementFactory::CreateElementL: %S", &aElementName);
+    
+    if( aContext.Length() >= KFields().Length() && 
+    	aContext.Right(KFields().Length()) == KFields)
+    	{
+    	// This is a field element under 'fields'.
+    	return CCreatorScriptElement::NewL(aEngine, aElementName, aContext);
+    	}    
+    else if( aElementName == creatorcontact::KContact )
+        {
+        return CCreatorContactElement::NewL(aEngine, aElementName, aContext);  
+        }
+    else if( aElementName == creatorcontact::KContactSet)
+        {
+        return CCreatorContactSetElement::NewL(aEngine, aElementName, aContext);
+        }
+    else if( aElementName == creatorcontact::KContactGroup )
+        {
+        return CCreatorContactGroupElement::NewL(aEngine, aElementName, aContext);
+        }
+    else if( aElementName == KFields)
+        {
+        return CCreatorScriptElement::NewL(aEngine, aElementName, aContext);
+        }
+    else if( aElementName == KScript )
+        {
+        return CCreatorScriptRoot::NewL(aEngine, aElementName, aContext);
+        }
+    else if( aElementName == creatorcalendar::KCalendar )
+        {
+        return CCreatorCalendarElement::NewL(aEngine, aElementName, aContext);
+        }
+    else if( aElementName == creatormsg::KMessage )
+        {
+        return CCreatorMessageElement::NewL(aEngine, aElementName, aContext);
+        }
+    else if( aElementName == creatorfile::KFile )
+        {
+        return CCreatorFileElement::NewL(aEngine, aElementName, aContext);
+        }
+    /*
+    else if( aElementName == creatorbrowser::KBookmark ||
+            aElementName == creatorbrowser::KBookmarkFolder ||
+            aElementName == creatorbrowser::KSavedPage ||
+            aElementName == creatorbrowser::KSavedPageFolder )
+        {
+        return CCreatorBrowserElement::NewL(aEngine, aElementName, aContext);
+        }
+    */
+    else if( aElementName == creatorlog::KLog )
+        {
+        return CCreatorLogElement::NewL(aEngine, aElementName, aContext);
+        }
+/*
+    else if( aElementName == creatornote::KNote )
+        {
+        return CCreatorNoteElement::NewL(aEngine, aElementName, aContext);
+        }
+*/
+/*
+	#ifdef __PRESENCE
+    else if( aElementName == creatorimps::KImpsServer )
+        {
+        return CCreatorImpsServerElement::NewL(aEngine, aElementName, aContext);
+        }
+	#endif // __PRESENCE
+*/
+    else if( aElementName == creatorlandmark::KLandmark )
+        {
+        return CCreatorLandmarkElement::NewL(aEngine, aElementName, aContext);
+        }
+    else if( aElementName == creatormailbox::Kmailbox )
+        {
+        return CCreatorMailboxElement::NewL(aEngine, aElementName, aContext);
+        }
+/*    
+    else if( aElementName == creatorconnectionmethod::KCm )
+    	{
+    	return CCreatorConnectionMethodElement::NewL(aEngine, aElementName, aContext);
+    	}
+*/    	
+    else
+        {
+        return CCreatorScriptElement::NewL(aEngine, aElementName, aContext);
+        }       
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_scriptentry.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,682 @@
+/*
+* 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 <aknlists.h> 
+#include <AknsSkinInstance.h>
+#include <data_caging_path_literals.hrh>
+
+#include "engine.h"
+#include "enginewrapper.h"
+#include "creator_traces.h"
+#include "creator_factory.h"
+#include "creator_scriptentry.h"
+
+
+
+const TInt KReadBufSize = 8192;
+
+// Creator random data file filter
+_LIT(KRandomDataFileFilter, "*.creatordataxml");
+
+// ---------------------------------------------------------------------------
+
+
+CCommandParser* CCommandParser::NewL(CCreatorEngine* aEngine)
+    {
+    CCommandParser* self = CCommandParser::NewLC(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCommandParser* CCommandParser::NewLC(CCreatorEngine* aEngine)
+    {
+    CCommandParser* self = new (ELeave) CCommandParser;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCommandParser::CCommandParser()
+	{
+	}
+
+void CCommandParser::ConstructL(CCreatorEngine* aEngine)
+	{
+    LOGSTRING("Creator: CCommandParser::ConstructL");
+
+    iEngine = aEngine;
+
+    iReadBuf = HBufC8::NewL(KReadBufSize);
+	}
+
+CCommandParser::~CCommandParser()
+	{
+    LOGSTRING("Creator: CCommandParser::~CCommandParser");
+
+    if (iSearchArray){
+        delete iSearchArray;
+        iSearchArray = NULL;
+    }
+
+    if (iReadBuf)
+        delete iReadBuf;
+	}
+
+// ---------------------------------------------------------------------------
+
+void CCommandParser::QueryDialogClosedL(TBool aPositiveAction, TInt aUserData)
+    {
+    User::LeaveIfNull(iSearchArray);
+    
+    if( aUserData == EGetingScript )
+        {
+        if(aPositiveAction)
+            {
+            iObserver->ScriptChosenL( ETrue, iSearchArray->MdcaPoint(iSelectedItem) );
+            }
+        else
+            {
+            iObserver->ScriptChosenL( EFalse );
+            }
+        }
+    else if( aUserData == EGetingRandomDataFile && iSearchArray->Count() )
+        {
+        if(aPositiveAction)
+            {
+            TFileName fileName;
+            if (iSelectedItem == (iSearchArray->Count() - 1))
+                {
+                // "default" (resource file) selected
+                fileName.Copy(KNullDesC);
+                }
+            else
+                {
+                // xml file selected
+                fileName.Copy(iSearchArray->MdcaPoint(iSelectedItem));
+                }
+            iObserver->RandomDataFileChosenL( ETrue, fileName );
+            }
+        else
+            {
+            iObserver->RandomDataFileChosenL( EFalse );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+//#if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
+void CCommandParser::OpenScriptL() {}
+TBool CCommandParser::OpenScriptL(MCommandParserObserver* aObserver)
+    {    
+    LOGSTRING("Creator: CCommandParser::OpenScriptL");
+    
+    User::LeaveIfNull( aObserver );
+    iObserver = aObserver;
+    iSelectedItem = 0;
+    
+    TBool ret = EFalse;
+
+    // init the search array
+    delete iSearchArray;
+    iSearchArray = NULL;
+    iSearchArray = new(ELeave) CDesCArrayFlat(20);
+
+    // wait dialog
+	// TODO
+    //CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
+    //waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
+    //TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Searching"));
+
+
+    // search all the .creator files from the phone
+    TInt err;
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\")));
+
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\system\\apps\\Creator\\")));
+
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\data\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\data\\")));
+    
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\documents\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\documents\\")));
+
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\creator\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\creator\\")));
+    
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\scripts\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\scripts\\")));
+    
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\temp\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\temp\\")));
+    
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\system\\temp\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\system\\temp\\")));
+
+    TRAP(err, FindFiles(_L("*.creatorxml"), _L("\\private\\20011383\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\private\\20011383\\")));
+
+    TRAP(err, FindFilesRecursiveL(_L("*.creatorxml"), _L("\\private\\1000484b\\")));
+
+
+    // remove the wait dialog
+	// TODO
+    //waitDialog->CancelNoteL(dialogId);
+    //CleanupStack::PopAndDestroy(); //waitDialog;
+
+
+    if ( iSearchArray->MdcaCount() > 0)
+        {
+        // create a file name array based on the iSearchArray
+        CDesCArray* fileNameArray = new(ELeave) CDesCArrayFlat(iSearchArray->MdcaCount());
+        CleanupStack::PushL(fileNameArray);
+        
+        for (TInt i=0; i<iSearchArray->MdcaCount(); i++)
+            {
+            
+            TParse filename; // file name parser
+            filename.Set(iSearchArray->MdcaPoint(i), NULL, NULL);
+
+            if ( filename.Drive()[0] == 'e' || filename.Drive()[0] == 'E')  // MMC
+                {
+                TFileName nameMMC;
+                nameMMC.Append(filename.Name());
+                nameMMC.Append(_L("\t0"));        // MMC icon
+                fileNameArray->AppendL(nameMMC);
+                }
+            else
+                {
+                fileNameArray->AppendL(filename.Name());
+                }
+            }
+
+        ret = iEngine->GetEngineWrapper()->PopupListDialog(_L("Select script"), fileNameArray, &iSelectedItem, this, EGetingScript);
+		CleanupStack::PopAndDestroy(fileNameArray);
+        }
+    else  // no scripts found from the search paths
+        {
+        iEngine->GetEngineWrapper()->ShowNote(_L("No scripts found"));
+        delete iSearchArray;
+        iSearchArray = NULL;
+        }
+
+    
+    return ret;
+    }
+/*
+#else
+// ---------------------------------------------------------------------------
+void CCommandParser::OpenScriptL()
+    {
+    LOGSTRING("Creator: CCommandParser::OpenScriptL");
+
+    // init the search array
+    iSearchArray = new(ELeave) CDesCArrayFlat(500);
+
+    // wait dialog
+    CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
+    waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
+    TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Searching"));
+
+
+    // search all the .creator files from the phone
+    TInt err;
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\")));
+
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\system\\apps\\Creator\\")));
+
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\data\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\data\\")));
+    
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\documents\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\documents\\")));
+
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\creator\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\creator\\")));
+    
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\scripts\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\scripts\\")));
+    
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\temp\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\temp\\")));
+    
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\system\\temp\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\system\\temp\\")));
+
+    TRAP(err, FindFiles(_L("*.creator"), _L("\\private\\101FA751\\")));
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\private\\101FA751\\")));
+
+    TRAP(err, FindFilesRecursiveL(_L("*.creator"), _L("\\private\\1000484b\\")));
+
+
+    // remove the wait dialog
+    waitDialog->CancelNoteL(dialogId);
+    CleanupStack::PopAndDestroy(); //waitDialog;
+
+
+    if ( iSearchArray->MdcaCount() > 0)
+        {
+        // create a file name array based on the iSearchArray
+        CDesCArray* fileNameArray = new(ELeave) CDesCArrayFlat(iSearchArray->MdcaCount());
+        CleanupStack::PushL(fileNameArray);
+        
+        for (TInt i=0; i<iSearchArray->MdcaCount(); i++)
+            {
+            
+            TParse filename; // file name parser
+            filename.Set(iSearchArray->MdcaPoint(i), NULL, NULL);
+
+            if ( filename.Drive()[0] == 'e' || filename.Drive()[0] == 'E')  // MMC
+                {
+                TFileName nameMMC;
+                nameMMC.Append(filename.Name());
+                nameMMC.Append(_L("\t0"));        // MMC icon
+                fileNameArray->AppendL(nameMMC);
+                }
+            else
+                {
+                fileNameArray->AppendL(filename.Name());
+                }
+            }
+        CleanupStack::Pop(fileNameArray);
+
+
+        // create a popup list
+        CAknSinglePopupMenuStyleListBox* listBox = new(ELeave) CAknSinglePopupMenuStyleListBox;
+        CleanupStack::PushL(listBox);
+        CAknPopupList* popupList = CAknPopupList::NewL( listBox, R_AVKON_SOFTKEYS_SELECT_CANCEL, AknPopupLayouts::EMenuWindow );
+        CleanupStack::PushL(popupList);
+        popupList->SetTitleL(_L("Select script"));
+        listBox->ConstructL( popupList, EAknListBoxSelectionList|EAknListBoxLoopScrolling );
+        listBox->CreateScrollBarFrameL( ETrue );
+        listBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
+        listBox->Model()->SetItemTextArray( fileNameArray );
+        listBox->Model()->SetOwnershipType( ELbmOwnsItemArray );  // !!!
+        listBox->HandleItemAdditionL();
+
+
+        // define MMC icon 
+        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        _LIT( KFLDMemoryCardUiBitmapFile, "z:aknmemorycardui.mbm" );
+        CAknIconArray* iconArray = new( ELeave ) CAknIconArray( 1 );
+        listBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
+
+        TParse* fp = new(ELeave) TParse();
+        fp->Set(KFLDMemoryCardUiBitmapFile, &KDC_APP_BITMAP_DIR, NULL);
+        TFileName resourceFileName( fp->FullName() );
+        delete fp;
+
+        CGulIcon* icon = AknsUtils::CreateGulIconL( skin, KAknsIIDQgnIndiMmcAdd,
+            resourceFileName,
+            EMbmAknmemorycarduiQgn_indi_mmc_add,
+            EMbmAknmemorycarduiQgn_indi_mmc_add_mask );
+        CleanupStack::PushL( icon );
+        iconArray->AppendL( icon );
+        CleanupStack::Pop( icon );
+
+
+        // execute dialog
+        TBool result = popupList->ExecuteLD();
+        CleanupStack::Pop();  // popupList
+
+        if ( result ) 
+            {
+            // open the file for reading
+            RFile file;
+            User::LeaveIfError(file.Open(CEikonEnv::Static()->FsSession(), iSearchArray->MdcaPoint(listBox->CurrentItemIndex()), EFileRead));
+            while (ReadLineFromFileL(file) == KErrNone)
+                {
+                iReadBuf->Des().Trim();  // delete leading and trailing white space
+
+                if (iReadBuf->Length() < 5)  // command too short, ignoring...
+                    {
+                    //CEikonEnv::Static()->InfoMsg(_L("Corrupted line"));
+                    }
+        
+                // check it's a valid line: first char is A-Z and the line ends to ';'
+                else if (iReadBuf->Des()[0] >= 'A' && iReadBuf->Des()[0] <= 'Z' && iReadBuf->Des()[iReadBuf->Length()-1] == ';')
+                    {
+                    // this line is valid -> parse the command
+                    ParseCommandFromDescriptorL();
+                    }
+                else
+                    {
+                    //CEikonEnv::Static()->InfoMsg(_L("Not a valid line"));
+                    }
+
+                }
+
+            file.Close();
+
+            // show a note if there were no valid commands in the script
+            if (iEngine->CommandArrayCount() == 0)
+                {
+                CAknInformationNote* note = new(ELeave) CAknInformationNote;
+                note->ExecuteLD(_L("No valid commands in this script"));
+                }
+
+            }
+
+        CleanupStack::PopAndDestroy();  //listBox
+        }
+    
+    else  // no scripts found from the search paths
+        {
+        CAknInformationNote* note = new (ELeave) CAknInformationNote;
+        note->ExecuteLD(_L("No scripts found"));
+        }
+
+
+    delete iSearchArray;
+    iSearchArray = NULL;
+
+    }
+#endif
+*/
+
+TBool CCommandParser::GetRandomDataFilenameL(MCommandParserObserver *aObserver)
+    {    
+    LOGSTRING("Creator: CCommandParser::GetRandomDataFilenameL");
+    TBool ret = EFalse;
+
+    User::LeaveIfNull( aObserver );
+    iObserver = aObserver;
+    iSelectedItem = 0;
+
+    // init the search array
+    if (iSearchArray)
+    	{
+    	delete iSearchArray;
+    	iSearchArray = NULL;
+    	}
+    iSearchArray = new(ELeave) CDesCArrayFlat(500);
+
+	/* TODO:
+    // wait dialog
+    CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
+    waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
+    TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Searching"));
+	*/
+
+
+    // search all the creator random data files from the phone
+    TInt err;
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\")));
+
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\system\\apps\\Creator\\")));
+
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\data\\")));
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\data\\")));
+    
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\documents\\")));
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\documents\\")));
+
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\creator\\")));
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\creator\\")));
+    
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\scripts\\")));
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\scripts\\")));
+    
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\temp\\")));
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\temp\\")));
+    
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\system\\temp\\")));
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\system\\temp\\")));
+
+    TRAP(err, FindFiles(KRandomDataFileFilter, _L("\\private\\20011383\\")));
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\private\\20011383\\")));
+
+    TRAP(err, FindFilesRecursiveL(KRandomDataFileFilter, _L("\\private\\1000484b\\")));
+
+
+    // remove the wait dialog
+	// TODO
+    //waitDialog->CancelNoteL(dialogId);
+    //CleanupStack::PopAndDestroy(); //waitDialog;
+
+
+    if (iSearchArray->MdcaCount() > 0)
+        {
+        // create a file name array based on the iSearchArray
+        CDesCArray* fileNameArray = new(ELeave) CDesCArrayFlat(iSearchArray->MdcaCount() + 1);
+        CleanupStack::PushL(fileNameArray);
+
+        for (TInt i=0; i<iSearchArray->MdcaCount(); i++)
+            {
+            
+            TParse filename; // file name parser
+            filename.Set(iSearchArray->MdcaPoint(i), NULL, NULL);
+
+            if ( filename.Drive()[0] == 'e' || filename.Drive()[0] == 'E')  // MMC
+                {
+                TFileName nameMMC;
+                nameMMC.Append(filename.Name());
+                nameMMC.Append(_L("\t0"));        // MMC icon
+                fileNameArray->AppendL(nameMMC);
+                }
+            else
+                {
+                fileNameArray->AppendL(filename.Name());
+                }
+            }
+
+        // add "default" (resource file) to list
+        fileNameArray->AppendL(_L("Default"));
+
+		ret = iEngine->GetEngineWrapper()->PopupListDialog(_L("Select random data file"), fileNameArray, &iSelectedItem, this, EGetingRandomDataFile);
+        CleanupStack::PopAndDestroy(fileNameArray);
+        }
+    else  // no random data files found from the search paths
+        {
+        iEngine->GetEngineWrapper()->ShowNote(_L("No random data files found"));
+        delete iSearchArray;
+        iSearchArray = NULL;
+        }
+
+    return ret;
+    }
+
+TInt CCommandParser::FindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
+    {
+    return CreatorFileUtils::FindFilesRecursiveL(iSearchArray, aFileName, aPath);
+    }
+TInt CreatorFileUtils::FindFilesRecursiveL(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath)
+	{
+    TInt err = KErrNone;
+    CDirScan* scan = CDirScan::NewLC(CEikonEnv::Static()->FsSession());
+    scan->SetScanDataL(aPath, KEntryAttDir, ESortNone);
+    CDir* dirEntries = NULL;
+
+    for(;;)
+        {
+        TRAP(err, scan->NextL(dirEntries));
+        if (!dirEntries  || (err!=KErrNone))
+            break;
+
+        for (TInt i=0; i<dirEntries->Count(); i++) 
+            {
+            TFileName path(scan->FullPath());
+            path.Append((*dirEntries)[i].iName);
+            path.Append(_L("\\"));
+            FindFiles(aFileArray, aFileName, path);
+            }
+        delete(dirEntries);
+        }
+
+    CleanupStack::PopAndDestroy(scan);
+    return err;
+    }
+
+TInt CreatorFileUtils::FindFiles(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath)
+    {
+    TFindFile fileFinder(CEikonEnv::Static()->FsSession());
+    CDir* fileList; 
+    TInt err = fileFinder.FindWildByDir(aFileName, aPath, fileList);
+
+    while (err == KErrNone)
+        {
+        for (TInt i=0; i<fileList->Count(); i++)
+            {
+            TParse fullentry;
+            fullentry.Set((*fileList)[i].iName, &fileFinder.File(), NULL);
+            
+            TRAP(err, aFileArray->AppendL(fullentry.FullName())); 
+            }
+
+        delete fileList;
+        err = fileFinder.FindWild(fileList);
+        }
+    return err;
+    }
+// ---------------------------------------------------------------------------
+
+TInt CCommandParser::FindFiles(const TDesC& aFileName, const TDesC& aPath)
+    {
+    return CreatorFileUtils::FindFiles(iSearchArray, aFileName, aPath);
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CCommandParser::ReadLineFromFileL(RFile& aInputFile)
+    {
+    LOGSTRING("Creator: CCommandParser::ReadLineFromFile");
+
+	_LIT8(KImcvCRLF, "\r\n");
+
+    TInt err = KErrNone;
+
+    //  Read into the buffer
+    HBufC8* tempLine = HBufC8::NewLC(KReadBufSize);
+    TPtr8 buffer = tempLine->Des();
+
+    // clear the targer
+    iReadBuf->Des().Copy(_L(""));
+
+    //  Get the current file position
+    TInt filePos = 0;
+    aInputFile.Seek(ESeekCurrent, filePos);
+
+    //  Read the buffer
+    err = aInputFile.Read(buffer);
+
+    //end of file?
+    TInt s = buffer.Length();
+    if  ( s == 0)
+        err = KErrEof;
+
+    if  (err == KErrNone)
+        {
+        //  Copy to the lfcr and then set the file pointer to the point after that
+        TInt pos = buffer.Find(KImcvCRLF);
+        if      ( pos != -1)
+            {
+            iReadBuf->Des().Justify(buffer, pos, ELeft, ' ');
+            filePos += (pos+2);
+
+            //  Set the file pointer back to after the lfcr
+            aInputFile.Seek(ESeekStart, filePos);
+            }
+        //  Else fill the whole buffer
+        else
+            {
+            iReadBuf->Des().Copy(buffer);
+            }
+        }
+
+    CleanupStack::PopAndDestroy(); // tempLine
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCommandParser::StrParserL(HBufC*& aDestinationBuf, TUint aToken)
+    {
+    // store old position
+	iParserOldPosition = iParserPosition;
+
+    // make sure we are not reading outside of buffer
+    if (iParserPosition >= iReadBuf->Length() - 1)
+        return;
+    
+    // read until asked token
+	do
+	    {
+	    iParserPosition++;
+	    }
+	while (iReadBuf->Des()[iParserPosition] != aToken && iParserPosition < iReadBuf->Des().Length()-1);
+	
+	// calculate length of the destination buffer
+	TInt bufferLength = iParserPosition-iParserOldPosition-1;
+	
+	// reset the destination buffer
+	if (aDestinationBuf)
+	    {
+        delete aDestinationBuf;
+        aDestinationBuf = NULL;
+	    }
+
+    // allocate memory for the destination buffer
+	aDestinationBuf = HBufC::NewL(bufferLength);
+
+	// copy data from the read buffer to the destination buffer
+    aDestinationBuf->Des().Copy(iReadBuf->Des().Mid(iParserOldPosition+1, bufferLength));
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCommandParser::StrParserL(HBufC8*& aDestinationBuf, TUint aToken)
+    {
+    // store old position
+	iParserOldPosition = iParserPosition;
+
+    // make sure we are not reading outside of buffer
+    if (iParserPosition >= iReadBuf->Length() - 1)
+        return;
+    
+    // read until asked token
+	do
+	    {
+	    iParserPosition++;
+	    }
+	while (iReadBuf->Des()[iParserPosition] != aToken && iParserPosition < iReadBuf->Des().Length()-1);
+	
+	// calculate length of the destination buffer
+	TInt bufferLength = iParserPosition-iParserOldPosition-1;
+	
+	// reset the destination buffer
+	if (aDestinationBuf)
+	    {
+        delete aDestinationBuf;
+        aDestinationBuf = NULL;
+	    }
+
+    // allocate memory for the destination buffer
+	aDestinationBuf = HBufC8::NewL(bufferLength);
+
+	// copy data from the read buffer to the destination buffer
+    aDestinationBuf->Des().Copy(iReadBuf->Des().Mid(iParserOldPosition+1, bufferLength));
+    }
+
+//----------------------------------------------------------------------------
+
+void CCommandParser::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) // from MMsvSessionObserver
+    {
+    }
+
+//----------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_scriptparser.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,394 @@
+/*
+* 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 <f32file.h>
+#include <utf.h>
+#include <xml/documentparameters.h>
+#include "creator_scriptparser.h"
+#include "creator_scriptelementfactory.h"
+#include "creator_traces.h"
+
+using namespace Xml;
+
+CCreatorScriptParser::CCreatorScriptParser() 
+: iDefaultElement(TCreatorScriptElementInfo(TCreatorScriptElementInfo::EStatusUndefined, 0))
+    {        
+    }
+void CCreatorScriptParser::ConstructL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorScriptParser::ConstructL");
+    iEngine = aEngine;
+    }
+
+CCreatorScriptParser* CCreatorScriptParser::NewL(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorScriptParser::NewL");
+    CCreatorScriptParser* self = CCreatorScriptParser::NewLC(aEngine);    
+    CleanupStack::Pop();
+    return self;
+    }
+CCreatorScriptParser* CCreatorScriptParser::NewLC(CCreatorEngine* aEngine)
+    {
+    LOGSTRING("Creator: CCreatorScriptParser::NewLC");
+    CCreatorScriptParser* self = new (ELeave) CCreatorScriptParser;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    return self;
+    }
+
+CCreatorScriptParser::~CCreatorScriptParser()
+    {
+    delete iParser;
+    if( iElementStack.Count() > 0 )
+        {
+        delete iElementStack[0].iElement;        
+        }
+    iElementStack.Reset();
+    iElementStack.Close();
+    }
+
+void CCreatorScriptParser::GetTextFileMode(RFile& aFile, TInt& aFileSize) 
+    { 
+    LOGSTRING("Creator: CCreatorScriptParser::GetTextFileMode");
+    iScriptTextFormat = EFormatANSIASCII; 
+
+    // if we are working with text files, check the type first   
+    TBuf8<4> BOM; 
+
+    // first check for UTF-16 
+    if (aFileSize >= 2 && aFile.Read(0, BOM, 2) == KErrNone) 
+        { 
+        if (BOM.Length()==2 && BOM[0]==0xFF && BOM[1]==0xFE) 
+            { 
+            iScriptTextFormat = EFormatUTF16LE; 
+            aFileSize -= 2; 
+            return; 
+            } 
+        else if (BOM.Length()==2 && BOM[0]==0xFE && BOM[1]==0xFF) 
+            { 
+            iScriptTextFormat = EFormatUTF16BE; 
+            aFileSize -= 2; 
+            return;                 
+            }       
+        }
+        // then check for UTF-8 
+    if (aFileSize >= 3 && aFile.Read(0, BOM, 3) == KErrNone) 
+        { 
+        if (BOM.Length()==3 && BOM[0]==0xEF && BOM[1]==0xBB && BOM[2]==0xBF) 
+            { 
+            iScriptTextFormat = EFormatUTF8; 
+            aFileSize -= 3; 
+            return; 
+            } 
+        }
+        
+    // none of those, seek back to beginning 
+    TInt pos(0); 
+    aFile.Seek(ESeekStart, pos); 
+    }    
+ 
+
+
+void CCreatorScriptParser::ParseL(const TDesC& aFileName)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::ParseL: %S", &aFileName);
+    // Create and start XML-parser
+    if( iParser == 0)
+        {
+        _LIT8(KXmlMimeType, "text/xml");
+        iParser = CParser::NewL(KXmlMimeType, *this);        
+        }
+
+    RFs filesession;
+    CleanupClosePushL(filesession);
+    User::LeaveIfError( filesession.Connect() );
+    Xml::ParseL(*iParser, filesession, aFileName);
+    
+    CleanupStack::PopAndDestroy(&filesession); // filesession    
+    }
+
+void CCreatorScriptParser::ParseL(RFile& aFile)
+    {
+    LOGSTRING("Creator: CCreatorScriptParser::ParseL");
+    TInt filesize = 0;
+    aFile.Size(filesize);
+    GetTextFileMode(aFile, filesize);
+    // Create and start XML-parser    
+    if( iParser == 0)
+        {
+        _LIT8(KXmlMimeType, "text/xml");
+        iParser = CParser::NewL(KXmlMimeType, *this);        
+        }
+    Xml::ParseL(*iParser, aFile);
+    }
+
+void CCreatorScriptParser::OnStartDocumentL(const Xml::RDocumentParameters& aDocParam, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnStartDocumentL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);    
+    }
+
+void CCreatorScriptParser::OnEndDocumentL(TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnEndDocumentL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    iEngine->SortCommands();
+    }
+
+void CCreatorScriptParser::OnStartPrefixMappingL(   const RString& /*aPrefix*/, 
+                                                    const RString& /*aUri*/, 
+                                                    TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnStartPrefixMappingL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+
+void CCreatorScriptParser::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnEndPrefixMappingL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+void CCreatorScriptParser::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnIgnorableWhiteSpaceL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+void CCreatorScriptParser::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnSkippedEntityL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+void CCreatorScriptParser::OnProcessingInstructionL(  const TDesC8& /*aTarget*/, 
+                                    const TDesC8& /*aData*/, 
+                                    TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnProcessingInstructionL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    }
+void CCreatorScriptParser::OnError(TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnError: %d", aErrorCode);
+    
+    iLastError = aErrorCode;
+    
+    // Delete all elements from the stack:
+    while(iElementStack.Count() > 0 )
+        {
+        TCreatorScriptElementInfo previousElem = LastElementInfo();    
+        delete previousElem.iElement;
+        previousElem.iElement = 0;
+        iElementStack.Remove(iElementStack.Count()-1);
+        }
+    }
+TAny* CCreatorScriptParser::GetExtendedInterface(const TInt32 aUid)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::GetExtendedInterface (UID: %d)", aUid);
+    return this;
+    }
+
+const TCreatorScriptElementInfo& CCreatorScriptParser::LastElementInfo() const
+{
+    LOGSTRING("Creator: CCreatorScriptParser::LastElementInfo");
+    if(iElementStack.Count() > 0)
+        {
+        return iElementStack[iElementStack.Count()-1];
+        }
+    return iDefaultElement;
+}
+
+/**
+ * Create an element and add attributes to it.
+ */
+void CCreatorScriptParser::OnStartElementL(  const RTagInfo& aElement,
+                                            const RAttributeArray& aAttributes,
+                                            TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnStartElementL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    const TDesC8& elementName8 = aElement.LocalName().DesC();        
+    HBufC* elementName16 = Convert8BitTo16BitLC(elementName8);
+        
+    const TCreatorScriptElementInfo& context = LastElementInfo();
+    
+    CCreatorScriptElement* element = 0;
+    if( context.iElement )
+        {
+        HBufC* fullContext = HBufC::NewL(
+                context.iElement->Context().Length() + 
+                context.iElement->Name().Length() + 
+                2);        
+        CleanupStack::PushL(fullContext);
+        if(context.iElement->Context() != KNullDesC && 
+           context.iElement->Context().Length() > 0 )
+            {
+            fullContext->Des().Copy(context.iElement->Context());
+            _LIT(KContextSeparator, "::");
+            fullContext->Des().Append(TPtrC(KContextSeparator));
+            }
+        const TDesC& parentName = context.iElement->Name();
+        if(parentName.Length() > 0 )
+            {            
+            fullContext->Des().Append(parentName);
+            }
+        element = TCreatorScriptElementFactory::CreateElementL( iEngine,
+                                                                elementName16->Des(), 
+                                                                fullContext->Des());
+        CleanupStack::PopAndDestroy(fullContext); // fullContext        
+        }
+    else
+        {
+        element = TCreatorScriptElementFactory::CreateElementL(iEngine, elementName16->Des());        
+        }
+        
+    CleanupStack::PopAndDestroy(elementName16);
+    CleanupStack::PushL(element);
+    
+    if( element == 0 )
+        {
+        // Add NULL pointer to stack. Otherwise the stack would go out of sync. in ::OnEndElement().
+        TCreatorScriptElementInfo info(TCreatorScriptElementInfo::EStatusParsing, element);
+        iElementStack.AppendL(info);   
+        CleanupStack::Pop(element);
+        return;        
+        }
+        
+    // Add attributes to the element:
+    TInt attrCount = aAttributes.Count();
+    for(TInt i = 0; i < attrCount; ++i)
+        {
+        const RAttribute& attribute = aAttributes[i];
+        const RTagInfo& nameInfo = attribute.Attribute();
+        const TDesC8& attrName8 = nameInfo.LocalName().DesC();
+        const TDesC8& value8 = attribute.Value().DesC();
+        // Convert data to 16 bit:
+        HBufC* attrName16 = Convert8BitTo16BitLC(attrName8);
+        HBufC* value16 = Convert8BitTo16BitLC(value8);
+        CCreatorScriptAttribute* scriptAttr = CCreatorScriptAttribute::NewLC(attrName16->Des(), value16->Des());
+        element->AddAttributeL(scriptAttr);
+        CleanupStack::Pop(scriptAttr);
+        CleanupStack::PopAndDestroy(value16);
+        CleanupStack::PopAndDestroy(attrName16);
+        }
+    
+    // Save element to the stack:
+    TCreatorScriptElementInfo info(TCreatorScriptElementInfo::EStatusParsing, element);
+    iElementStack.AppendL(info);
+    CleanupStack::Pop(element);
+    }
+
+/**
+ * Executes the command if needed. Also caches the element for future use, if needed.
+ */
+void CCreatorScriptParser::OnEndElementL(const RTagInfo& /*aElement*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnEndElementL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+     
+    if( iElementStack.Count() == 0 )
+        {
+        return;
+        }
+    // Get element from the stack:    
+    TCreatorScriptElementInfo elementInfo = LastElementInfo();
+    
+    if( elementInfo.iElement == 0 )
+        {
+        // Remove element from the stack:        
+        iElementStack.Remove(iElementStack.Count()-1);
+        return;
+        }
+        
+    // Execute the command if this is a command element:
+    if( elementInfo.iElement->IsCommandElement() )
+        {
+        elementInfo.iElement->ExecuteCommandL();
+        }
+    
+    // Remove element from the stack:
+    iElementStack.Remove(iElementStack.Count()-1);
+    
+    // Get the previous element from the stack:
+    if( iElementStack.Count() > 0 )
+        {
+        TCreatorScriptElementInfo previousElem = LastElementInfo();
+        
+        if( previousElem.iElement->IsRoot() )
+            {
+            // This element is not a sub-element (except of the root element, of course).        
+            if( elementInfo.iElement->IsCacheNeeded() )
+                {
+                // Add element to the cache, since it will be needed in future.            
+                elementInfo.iElement->AddToCacheL();
+                }
+            //else
+            //    {
+                // Not needed anymore, so element can be deleted:
+                delete elementInfo.iElement;
+                elementInfo.iElement = 0;
+           //     }
+            }
+        else
+            {
+            // There is a parent element (other than root), so we add this element
+            // as a sub-element fot it.
+            previousElem.iElement->AddSubElementL(elementInfo.iElement);
+            }
+        }
+    else
+        {
+        // Delete root element, which will delete recursively all sub-elements:
+        delete elementInfo.iElement;
+        elementInfo.iElement = 0;
+        }
+    }
+
+/**
+ * Add content to element.
+ */
+void CCreatorScriptParser::OnContentL(const TDesC8& aBytes, TInt aErrorCode)
+    {
+    LOGSTRING2("Creator: CCreatorScriptParser::OnContentL (Error code: %d)", aErrorCode);
+    User::LeaveIfError(aErrorCode);
+    if( iElementStack.Count() > 0 )
+        {
+        HBufC* contentData = Convert8BitTo16BitLC(aBytes);
+        TCreatorScriptElementInfo elementInfo = iElementStack[iElementStack.Count()-1];
+        if( elementInfo.iElement )
+            {
+            elementInfo.iElement->AppendContentL(*contentData);
+            }
+        CleanupStack::PopAndDestroy(contentData);
+        }
+    }
+
+HBufC16* CCreatorScriptParser::Convert8BitTo16BitLC(const TDesC8& aInput) 
+    {     
+    LOGSTRING("Creator: CCreatorScriptParser::Convert8BitTo16BitLC");
+    HBufC16* output = NULL;
+    
+    output = CnvUtfConverter::ConvertToUnicodeFromUtf8L(aInput);
+    
+    CleanupStack::PushL(output);
+    return output;          
+    } 
+
+TInt CCreatorScriptParser::GetError() const 
+{
+    return iLastError;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/engine/src/creator_wepsecuritysettings.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,145 @@
+/*
+* 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 "creator_traces.h"
+#include "creator_wepsecuritysettings.h"
+#include <commdb.h>
+//#include <featmgr.h>
+#include <WlanCdbCols.h>
+
+//#include <commsdattypesv1_1.h>
+//#include <cmmanagertablefields.h>
+//#include <wlancontainer.h>
+
+
+
+//----------------------------------------------------------------------------
+
+CCreatorWEPSecuritySettings* CCreatorWEPSecuritySettings::NewL()
+    {
+    CCreatorWEPSecuritySettings* self = CCreatorWEPSecuritySettings::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCreatorWEPSecuritySettings* CCreatorWEPSecuritySettings::NewLC()
+    {
+    CCreatorWEPSecuritySettings* self = new (ELeave) CCreatorWEPSecuritySettings;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+CCreatorWEPSecuritySettings::CCreatorWEPSecuritySettings()
+    {
+    }
+
+void CCreatorWEPSecuritySettings::ConstructL()
+    {
+    LOGSTRING("Creator: CCreatorWEPSecuritySettings::ConstructL");
+    }
+
+CCreatorWEPSecuritySettings::~CCreatorWEPSecuritySettings()
+    {
+    LOGSTRING("Creator: CCreatorWEPSecuritySettings::~CCreatorWEPSecuritySettings");
+
+    
+    }
+
+    
+
+//----------------------------------------------------------------------------
+
+
+
+// ---------------------------------------------------------
+// CWEPSecuritySettingsImpl::SaveL
+// ---------------------------------------------------------
+//
+void CCreatorWEPSecuritySettings::SaveL( TUint32 /*aIapId*/, 
+                                      CCommsDatabase& /*aCommsDb*/ ) const
+    {
+    /*
+    // Data of the key
+    TBuf8<KMaxLengthOfKeyData> iKeyData[KMaxNumberofKeys];    
+    
+    CCommsDbTableView* wLanServiceTable;
+
+    // Caller MUST initiate a transaction, WE WILL NOT.
+
+    wLanServiceTable = aCommsDb.OpenViewMatchingUintLC( 
+                    TPtrC( WLAN_SERVICE ), TPtrC( WLAN_SERVICE_ID ), aIapId );
+    TInt errorCode = wLanServiceTable->GotoFirstRecord();
+
+    if ( errorCode == KErrNone )
+        {
+        wLanServiceTable->UpdateRecord();
+        }
+    else
+        {
+        TUint32 dummyUid( 0 ); //was KUidNone
+        User::LeaveIfError( wLanServiceTable->InsertRecord( dummyUid ) );
+
+        // Save link to LAN service
+        wLanServiceTable->WriteUintL( TPtrC( WLAN_SERVICE_ID ), aIapId );
+        }
+
+    // Save index of key in use
+    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_INDEX ), 
+                                 ( TUint32& ) iKeyInUse );
+
+    // Save index of key in use
+    wLanServiceTable->WriteUintL( TPtrC( NU_WLAN_AUTHENTICATION_MODE ), 
+                                 ( TUint32& ) iAuthentication );
+
+    // Save first WEP key
+    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY1 ), 
+                                  iKeyData[KFirstKey] );
+
+    // Save second WEP key
+    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY2 ), 
+                                  iKeyData[KSecondKey] );
+
+    // Save third WEP key
+    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY3 ), 
+                                  iKeyData[KThirdKey] );
+
+    // Save fourth WEP key
+    wLanServiceTable->WriteTextL( TPtrC( NU_WLAN_WEP_KEY4 ), 
+                                  iKeyData[KFourthKey] );
+
+    // Save the format of the keys
+    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY1_FORMAT ), 
+                                 ( TUint32& ) iKeyFormat[KFirstKey] );
+
+    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY2_FORMAT ), 
+                                 ( TUint32& ) iKeyFormat[KSecondKey] );
+
+    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY3_FORMAT ), 
+                                 ( TUint32& ) iKeyFormat[KThirdKey] );
+
+    wLanServiceTable->WriteUintL( TPtrC( WLAN_WEP_KEY4_FORMAT ), 
+                                 ( TUint32& ) iKeyFormat[KFourthKey] );
+
+    wLanServiceTable->PutRecordChanges();
+
+    CleanupStack::PopAndDestroy( wLanServiceTable );  // wLanServiceTable
+    */
+    }
+
Binary file utilityapps/creator/files/3GPP-70kB.dat has changed
Binary file utilityapps/creator/files/AAC-100kB.dat has changed
Binary file utilityapps/creator/files/AMR-20kB.dat has changed
Binary file utilityapps/creator/files/BMP-25kB.dat has changed
Binary file utilityapps/creator/files/DOC-20kB.dat has changed
Binary file utilityapps/creator/files/Deck-1kB.dat has changed
Binary file utilityapps/creator/files/GIF-2kB.dat has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/HTML-20kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,378 @@
+<html>
+<header>
+<title>My HTML page</title>
+<header>
+<body>
+<H1>My HTML page</H1>
+
+<li>item 1</li>
+<li>item 2</li>
+<li>item 3</li>
+<li>item 4</li>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+
+</p><p>
+
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+<p>
+                      COPYRIGHT LICENSE
+</p><p>
+      NOKIA CORPORATION END-USER SOFTWARE AGREEMENT FOR
+      CARBIDE.C++ AND ASSOCIATED ON-DEVICE APPLICATIONS
+</p><p>
+This Software Agreement ("Agreement") is between You (either an
+individual or an entity), the End User, and Nokia Corporation
+("Nokia"). The Agreement authorizes You to use the Software specified
+in Clause 1 below, which may be stored on a CD-ROM, sent to You by
+electronic mail, or downloaded from Nokia's Web pages or Servers or
+from other sources under the terms and conditions set forth below.
+This is an agreement on end-user rights and not an agreement for sale.
+Nokia continues to own the copy of the Software and the physical media
+contained in the sales package and any other copy that You are
+authorized to make pursuant to this Agreement.
+
+Read this Agreement carefully before installing, downloading, or using
+the Software. By clicking on the "I Accept" button while installing,
+downloading, and/or using the Software, You agree to the terms and
+conditions of this Agreement. If You do not agree to all of the terms
+and conditions of this Agreement, promptly click the "Decline" or
+"I Do Not Accept" button, cancel the installation or downloading, or
+destroy or return the Software and accompanying documentation to
+Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU
+HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+</p>
+
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/JAD-1kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,7 @@
+MIDlet-1: HelloWorld, , helloworld.HelloWorld
+MIDlet-Icon: \HelloWorld.png
+MIDlet-Jar-Size: 6817
+MIDlet-Jar-URL: HelloWorld.jar
+MIDlet-Name: HelloWorld
+MIDlet-Vendor: My Vendor
+MIDlet-Version: 1.0
Binary file utilityapps/creator/files/JAR-10kB.dat has changed
Binary file utilityapps/creator/files/JP2-65kB.dat has changed
Binary file utilityapps/creator/files/JPEG-200kB.dat has changed
Binary file utilityapps/creator/files/JPEG-25kB.dat has changed
Binary file utilityapps/creator/files/JPEG-500kB.dat has changed
Binary file utilityapps/creator/files/MIDI-10kB.dat has changed
Binary file utilityapps/creator/files/MP3-250kB.dat has changed
Binary file utilityapps/creator/files/MP4-200kB.dat has changed
Binary file utilityapps/creator/files/MXMF-40kB.dat has changed
Binary file utilityapps/creator/files/PNG-15kB.dat has changed
Binary file utilityapps/creator/files/PPT-40kB.dat has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/RAM-1kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1 @@
+rtsp://nokia.com
\ No newline at end of file
Binary file utilityapps/creator/files/RM-95kB.dat has changed
Binary file utilityapps/creator/files/RNG-1kB.dat has changed
Binary file utilityapps/creator/files/SISX-10kB.dat has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/SVG-15kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,62 @@
+<?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 88">
+  <defs
+     id="defs6909" />
+  <rect
+     id="rect7683"
+     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.12500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;stroke-dasharray:none"
+     transform="matrix(0.707097,0.707117,-0.707116,0.707097,0.000000,0.000000)"
+     y="-27.734158"
+     x="34.175232"
+     height="55.153564"
+     width="55.155079" />
+  <rect
+     id="rect10008"
+     style="fill:#ffd800;fill-opacity:0.00000000;stroke:#000000;stroke-width:1.4641515;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     transform="matrix(0.707807,0.706406,-0.707368,0.706845,0.000000,0.000000)"
+     y="-24.579279"
+     x="37.081882"
+     height="49.570164"
+     width="49.602535" />
+  <path
+     id="path13048"
+     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.6682692;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 27.031591,57.263037 L 60.609963,57.263037" />
+  <path
+     style="stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0.12965260;stroke:#000000;fill-rule:evenodd;fill-opacity:1.0000000;fill:#000000"
+     d="M 53.055235,56.214138 C 52.624696,55.783599 53.895322,55.268316 54.042996,54.677621 C 54.177132,54.141074 54.531315,54.216369 54.372250,53.580108 C 54.255651,53.113713 53.875841,52.644696 53.603991,52.372845 C 53.309600,52.078454 53.118192,51.620750 52.945484,51.275333 C 52.703517,50.791400 52.280433,50.498349 51.957723,50.068070 C 51.603941,49.596361 51.413359,49.198844 51.189464,48.751055 C 50.899300,48.170724 50.368976,47.381811 49.982201,46.995036 C 49.704954,46.717789 49.601842,45.905065 49.433445,45.568270 C 49.184790,45.070960 49.138813,44.724882 48.774938,44.361006 C 48.320481,43.906550 47.740713,44.517222 47.567675,44.690260 C 47.298191,44.959743 46.811103,45.340001 46.360411,45.678021 C 45.855798,46.056480 45.501514,46.517804 45.262898,46.995036 C 45.012812,47.495209 44.962345,48.087501 44.823894,48.641303 C 44.672748,49.245890 44.626653,49.759521 44.494640,50.287572 C 44.374994,50.766160 44.494640,51.437604 44.494640,51.933840 C 44.494640,52.473242 44.479725,53.091014 44.384889,53.470358 C 44.236156,54.065293 43.580797,53.654026 44.165387,54.238616 C 44.585434,54.658664 44.644693,54.758223 44.933645,55.336128 C 45.224512,55.917862 44.973069,56.284464 44.714142,56.543391 C 44.460419,56.797114 43.654774,56.762894 43.177626,56.762894 C 42.469818,56.762894 41.865291,56.872645 41.202104,56.872645 C 40.653348,56.872645 40.104592,56.872645 39.555835,56.872645 C 39.007079,56.872645 38.458323,56.872645 37.909567,56.872645 C 37.360811,56.872645 36.812055,56.872645 36.263299,56.872645 C 35.361025,56.872645 34.513340,56.762894 33.629270,56.762894 C 33.007346,56.762894 32.385423,56.762894 31.763499,56.762894 C 31.141575,56.762894 30.519651,56.762894 29.897729,56.762894 C 29.316629,56.762894 28.811179,56.765634 28.361211,56.653142 C 28.294677,56.636509 28.361211,54.800636 28.361211,54.677621 C 28.361211,54.122622 28.373835,53.419862 28.470963,53.031353 C 28.595884,52.531668 28.801084,52.149872 28.909968,51.714338 C 29.009519,51.316133 29.389366,50.975043 29.568474,50.616825 C 29.828283,50.097211 29.986001,49.824729 30.117231,49.299811 C 30.235460,48.826894 30.775433,48.531857 30.995240,48.312050 C 31.322699,47.984592 31.766969,47.981929 32.202504,47.873045 C 32.844620,47.712517 33.143720,48.218959 33.300016,48.531553 C 33.507317,48.946154 33.940327,49.281615 34.178026,49.519314 C 34.504402,49.845689 34.655723,50.255205 34.836533,50.616825 C 35.036987,51.017734 35.283331,51.306507 35.385290,51.714338 C 35.510174,52.213877 35.484864,52.661395 35.604792,53.141103 C 35.720800,53.605133 36.020969,53.996287 36.263299,54.238616 C 36.590757,54.566074 37.035027,54.568737 37.470562,54.677621 C 37.877196,54.779280 38.450774,54.787372 39.007079,54.787372 C 39.499561,54.787372 39.726237,54.336816 39.885089,54.019113 C 40.048252,53.692788 39.994840,52.735696 39.994840,52.372845 C 39.994840,51.764083 39.885089,51.340231 39.885089,50.836328 C 39.885089,50.227207 39.994840,49.666649 39.994840,49.080309 C 39.994840,48.594446 40.231693,47.913395 40.324094,47.543792 C 40.463214,46.987311 40.640950,46.471075 40.872850,46.007275 C 41.112138,45.528699 41.332188,45.417852 41.531357,45.019514 C 41.798584,44.485060 41.919124,44.478034 41.641109,43.922001 C 41.427678,43.495140 41.418998,43.033558 41.311854,42.604987 C 41.183697,42.092355 41.189896,41.666058 41.311854,41.178221 C 41.441133,40.661112 41.531357,40.378202 41.531357,39.751456 C 41.531357,39.357313 41.147280,38.983300 40.982601,38.653943 C 40.761616,38.211972 40.577118,38.019774 40.433845,37.446679 C 40.293896,36.886882 40.102128,36.558816 39.994840,36.129665 C 39.884579,35.688622 39.615766,35.371517 39.446084,35.032153 C 39.247021,34.634025 39.226582,34.204135 39.226582,33.605387 C 39.226582,32.945903 39.466503,32.796291 39.665587,32.398124 C 39.865488,31.998320 40.030648,31.703808 40.324094,31.410363 C 40.648346,31.086110 40.792597,30.722357 41.092353,30.422602 C 41.497139,30.017815 40.746419,29.764094 40.324094,29.764094 C 39.766471,29.764094 39.381552,29.512327 39.007079,29.325090 C 38.644368,29.143734 38.429384,28.550821 38.348572,28.227577 C 38.239216,27.790154 37.911825,27.569635 37.470562,27.459319 C 36.870536,27.309312 36.716357,27.816679 36.373050,27.130065 C 36.166333,26.716631 36.263299,26.084628 36.263299,25.593549 C 36.263299,25.032763 36.269922,24.469546 36.373050,24.057031 C 36.480019,23.629153 36.767491,23.268149 36.921806,22.959519 C 37.118553,22.566025 37.706265,22.347787 38.019318,22.191261 C 38.389122,22.006359 39.035295,22.081510 39.555835,22.081510 C 40.104592,22.081510 40.653348,22.081510 41.202104,22.081510 C 41.550777,22.081510 42.048741,22.504828 42.299615,22.630266 C 42.779900,22.870407 43.095825,22.877718 43.397128,23.179022 C 43.856580,23.638474 43.334114,23.790792 43.067875,24.057031 C 42.608660,24.516246 42.293774,24.264849 42.628870,24.935041 C 42.796868,25.271038 43.241637,25.657560 43.506879,25.922802 C 43.829866,26.245788 44.071833,26.471558 44.604392,26.471558 C 45.231133,26.471558 45.468527,26.258992 45.921406,26.032553 C 46.380507,25.803003 46.621967,25.682272 47.018918,25.483797 C 47.432354,25.277079 48.064355,25.374046 48.555436,25.374046 C 48.881562,25.374046 49.547228,25.870950 49.762698,26.032553 C 50.233060,26.385325 50.346134,26.562541 50.860211,26.691060 C 51.323258,26.806822 51.603308,27.096337 52.177225,27.239816 C 52.669260,27.362825 53.085679,27.686432 53.494239,27.788572 C 54.085273,27.936331 54.424563,27.883965 54.921006,28.008075 C 55.515417,28.156678 55.672225,28.522753 55.908767,28.995836 C 56.129829,29.437960 56.491410,29.722118 56.677025,30.093348 C 56.910943,30.561183 56.502923,30.880558 56.238021,31.410363 C 56.056374,31.773656 55.750791,32.117094 55.469761,32.398124 C 55.126451,32.741435 54.982268,33.373113 54.811255,33.715138 C 54.580847,34.175955 54.213651,34.581092 53.933245,35.141904 C 53.665425,35.677541 53.569455,36.088987 53.384489,36.458918 C 53.193251,36.841393 53.274738,37.478767 53.274738,37.995435 C 53.274738,38.355483 53.637246,38.896713 53.713742,39.202699 C 53.826257,39.652756 54.049119,39.995451 54.152747,40.409962 C 54.261646,40.845559 54.246127,41.441991 54.372250,41.946479 C 54.491897,42.425068 54.372250,43.096512 54.372250,43.592748 C 54.372250,44.221105 54.406333,44.648676 54.591752,45.019514 C 54.805887,45.447783 54.950405,45.736818 55.140508,46.117026 C 55.318283,46.472575 55.666926,46.862946 56.018518,47.214537 C 56.421894,47.617914 56.456093,48.089688 56.677025,48.531553 C 56.956851,49.091204 57.024443,49.445891 57.225781,49.848567 C 57.525499,50.448001 57.843039,50.781081 57.994040,51.385084 C 58.121209,51.893759 58.424571,52.009700 58.542796,52.482597 C 58.645326,52.892716 58.958398,53.157244 59.091552,53.689860 C 59.206608,54.150081 59.311055,54.491721 59.311055,55.116625 C 59.311055,55.745296 59.151256,56.154433 58.872050,56.433641 C 58.548620,56.757070 57.979019,56.653142 57.445283,56.653142 C 57.019297,56.653142 56.409259,56.762894 55.908767,56.762894 C 55.327666,56.762894 54.822217,56.760154 54.372250,56.872645 C 53.888809,56.993505 53.322734,56.966958 52.945484,56.872645 C 52.548865,56.773490 53.055235,56.085649 53.055235,55.665381"
+     id="path2140" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.15643996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 38.428125,47.795987 C 38.311148,47.854477 36.965297,46.068306 36.706578,45.809587 C 36.275090,45.378099 35.986619,44.957203 35.647163,44.617746 C 35.160123,44.130704 34.556573,44.434693 34.190469,44.617746 C 33.723208,44.851375 33.274878,45.075540 32.866201,45.279879 C 32.358140,45.533910 32.262581,46.015925 31.939214,46.339294 C 31.632132,46.646376 31.393272,47.331218 31.277080,47.795987 C 31.083157,48.571681 31.468244,48.972877 31.674360,49.385108 C 31.912314,49.861016 32.778380,50.223928 33.131055,50.312097 C 33.776711,50.473511 34.431575,50.444524 35.117456,50.444524 C 35.382879,50.444524 36.028034,49.885811 36.441723,49.782389 C 36.905836,49.666361 37.228511,49.190356 37.633565,48.987829 C 37.959970,48.824626 38.265273,48.203119 38.428125,47.795987 z "
+     id="path2902" />
+  <path
+     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
+     d="M 36.399595,46.098141 C 41.690234,42.288881 41.690234,42.288881 41.690234,42.288881"
+     id="path3662" />
+  <path
+     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 51.177526,33.514353 C 51.643815,33.290634 52.117036,32.810504 52.277706,32.050272 C 52.490950,31.041286 52.186388,30.532180 51.727616,30.260839 C 51.228746,29.965782 50.690078,29.935489 49.939823,29.935489 C 48.958188,29.935489 48.839642,29.898727 48.839642,31.074218 C 48.839642,31.604089 49.483749,32.272697 49.664777,32.700974 C 49.972897,33.429925 50.486789,33.514353 51.177526,33.514353 z "
+     id="path3666" />
+  <path
+     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 43.339938,38.616989 C 43.358543,38.676580 44.048989,37.735278 44.132320,37.601827 C 44.413539,37.151472 44.464358,36.937090 44.370034,36.332872 C 44.312608,35.965007 43.825038,35.713886 43.656891,35.444606 C 43.366077,34.978882 43.133760,34.623676 42.864509,34.048757 C 42.530139,33.334791 42.389080,34.076845 42.389080,34.683233 C 42.389080,35.330477 42.556959,35.728514 42.706032,36.205977 C 42.849733,36.666232 42.864509,37.134957 42.864509,37.855617 C 42.864509,38.303047 43.016630,38.409884 43.339938,38.616989 z "
+     id="path4426" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 43.635359,9.6022099 C 40.526110,12.711459 40.475138,12.762431 40.475138,12.762431 L 46.795580,12.762431 L 43.635359,9.6022099 z "
+     id="path8982" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 43.878453,78.154696 C 40.769204,75.045447 40.718232,74.994475 40.718232,74.994475 L 47.038674,74.994475 L 43.878453,78.154696 z "
+     id="path9742" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 9.4806628,43.878454 C 12.589911,46.987703 12.640883,47.038675 12.640883,47.038675 L 12.640883,40.718232 L 9.4806628,43.878454 z "
+     id="path9744" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 78.033148,43.756906 C 74.923900,46.866155 74.872928,46.917127 74.872928,46.917127 L 74.872928,40.596684 L 78.033148,43.756906 z "
+     id="path9746" />
+</svg>
Binary file utilityapps/creator/files/SWF-15kB.dat has changed
Binary file utilityapps/creator/files/TIF-25kB.dat has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/TXT-10kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,19 @@
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/TXT-70kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,147 @@
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing.Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... TestiTesting... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing..ing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Te. Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... 
+
+
+Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... Testing... ng... .. 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/VCF-1kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,17 @@
+BEGIN:VCARD
+VERSION:2.1
+N:Smith;John
+FN:John Smith
+ORG:Firm
+TITLE:Boss
+NOTE;ENCODING=QUOTED-PRINTABLE:Liirum larum.=0D=0A
+TEL;WORK;VOICE:132456798
+TEL;HOME;VOICE:654654987
+TEL;CELL;VOICE:0400654987654
+TEL;WORK;FAX:2321654987987
+ADR;WORK:;;Firmstreet 1;New City;Sawo;00000;Finland
+LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Firmstreet 1=0D=0ANew City, Sawo 00000=0D=0AFinland
+URL;WORK:http://www.nokia.com
+EMAIL;PREF;INTERNET:John.Smith@firm.com
+REV:20080306T115812Z
+END:VCARD
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/VCS-1kB.dat	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,15 @@
+BEGIN:VCALENDAR
+PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
+VERSION:1.0
+BEGIN:VEVENT
+DTSTART:20080306T060000Z
+DTEND:20080306T070000Z
+LOCATION;ENCODING=QUOTED-PRINTABLE:Meeting room
+UID:040000008200E00074C5B7101A82E00800000000000CEF7E917FC8010000000000000000100
+ 000008AA6A7A7250C0A4E97153769E69DD064
+DESCRIPTION;ENCODING=QUOTED-PRINTABLE:Remember to bring laptop and document=
+ation=0D=0A
+SUMMARY;ENCODING=QUOTED-PRINTABLE:Meeting with BOSS
+PRIORITY:3
+END:VEVENT
+END:VCALENDAR
Binary file utilityapps/creator/files/WAV-20kB.dat has changed
Binary file utilityapps/creator/files/WMA-50kB.dat has changed
Binary file utilityapps/creator/files/WMV-200kB.dat has changed
Binary file utilityapps/creator/files/XLS-15kB.dat has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/files/backup_registration.xml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <passive_backup>
+    <include_directory name="\"/>
+  </passive_backup>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/icons/Creator_application_icon_svgt.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,491 @@
+<?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 version="1.1" baseProfile="tiny" id="Layer_1"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height="200px"
+	 viewBox="0 0 200 200" xml:space="preserve">
+<path fill="#D9D673" d="M149.662,191.924l-5.842-9.574c-8.5-12.908-16.701-23.369-24.371-31.082l-23.984,26.178
+	c0,0-3.492,4.27-7.568,6.158c-0.756,0.354-1.553,0.646-2.357,0.873c-1.117,0.311-2.238,0.467-3.346,0.467
+	c-5.506,0-10.674-5.326-10.674-5.326l-0.018-0.014c0,0-20.341-17.276-32.226-29.713c-11.186-11.705-21.271-24.334-26.289-30.82
+	c-0.426-0.547-4.675-5.867-5.179-6.955c-1.871-4.035-1.291-8.869,1.469-12.346c0.508-0.764,1.131-1.447,1.85-2.031L27.621,84.48
+	l-10.48-19.999l20.726-31.17l10.943,7.355c0.293,0.195,1.332,0.922,2.404,2.146c-0.025-2.727,0.094-5.304,0.354-7.715
+	c0.396-3.637,1.166-7.026,1.912-8.437c1.045-1.935,2.707-3.207,4.691-3.601c0.389-0.081,0.838-0.127,1.275-0.127
+	c0.131,0,26.509,5.264,26.509,5.264c2.414,0.301,4.303,1.444,5.465,3.282c2.305-3.814,3.926-6.227,3.926-6.227
+	c1.361-1.685,3.551-2.544,6.376-2.544c0.36,0,0.713,0.016,1.053,0.045c0.404-2.02,1.004-3.907,1.789-5.637
+	c0.545-1.244,1.215-2.418,1.979-3.464c2.309-3.155,5.605-5.108,9.289-5.502c0.473-0.05,1.258-0.075,2.344-0.075
+	c1.193,0,2.023,0.029,2.537,0.087c2.996,0.335,5.969,1.678,8.598,3.88c1.092,0.896,2.115,1.945,3.027,3.107
+	c5.436,6.911,5.738,17.044,0.734,24.637c-0.883,1.315-1.879,2.511-2.967,3.565c-1.195,1.162-2.521,2.168-3.904,2.975l2.262,4.434
+	c0.246,0.48,0.445,0.994,0.596,1.531c1.543-0.176,3.068-0.332,4.562-0.473c0.828-1.098,1.969-1.895,3.303-2.291l0.021-0.008
+	c0,0,4.945-1.208,6.563-1.364c0.062-0.01,4.056-0.11,4.056-0.11l2.324-9.201c1.113-4.151,4.355-4.957,5.322-5.103
+	c0,0,5.889-0.688,6.018-0.688c3.104,0,5.744,1.699,6.896,4.434c0.283,0.63,3.818,10.878,3.818,10.878l9.049,0.373
+	c0.004,0,0.008,0,0.012,0c1.248,0,5.604,0.305,7.414,4.062c1.857,3.854,0.115,7.4-2.314,9.105c-1.08,0.834-7.707,6.029-7.707,6.029
+	s2.293,7.144,3.25,10.531c0.881,2.693,0.326,6.455-2.949,8.414c-2.408,1.592-3.434,2.262-3.973,2.596
+	c-1.07,0.779-2.361,1.191-3.748,1.191c-0.635,0-1.307-0.092-1.994-0.271c-1.346-0.354-3.207-1.729-3.207-1.729l-0.244,23.561
+	c12.174,6.484,20.857,12.912,21.838,13.646l4.599,4.234l1.31,7.098l-9.756,12.254l-3.476-3.161l-19.808,25.093l0.761,6.293
+	L149.662,191.924L149.662,191.924z"/>
+<path fill="#FFFFFF" d="M97.078,26.66l0.051-0.062c1.109-1.369,3.111-1.657,4.596-1.657c0.836,0,1.928,0.101,2.883,0.515
+	c0.318-2.675,0.992-5.212,1.99-7.419c0.486-1.105,1.078-2.147,1.75-3.068c1.932-2.641,4.676-4.271,7.723-4.598
+	c0.516-0.054,1.541-0.062,2.107-0.062c0.609,0,1.721,0.008,2.287,0.071c2.559,0.287,5.119,1.452,7.412,3.373
+	c0.975,0.799,1.893,1.736,2.705,2.773c4.85,6.165,5.111,15.228,0.629,22.032c-0.791,1.18-1.682,2.246-2.656,3.192
+	c-1.627,1.577-3.461,2.797-5.361,3.586c1.375,2.692,3.211,6.297,3.287,6.443c0.463,0.9,0.688,1.924,0.682,2.98
+	c2.654-0.324,5.254-0.598,7.771-0.818c0.531-1.107,1.463-1.928,2.625-2.275c0,0,4.605-1.141,6.172-1.29
+	c0.061-0.008,5.586-0.115,5.586-0.115l2.734-10.839c0.742-2.766,2.697-3.354,3.504-3.477c0,0,5.572-0.659,5.682-0.659
+	c2.227,0,4.031,1.145,4.84,3.066c0.277,0.613,4.262,12.181,4.262,12.181l10.574,0.434c0.008,0,0.018,0,0.025,0
+	c0.955,0,4.234,0.223,5.479,2.799c1.408,2.918-0.166,5.346-1.643,6.352c-1.045,0.809-8.963,7.025-8.963,7.025s2.791,8.7,3.719,12.01
+	c0.636,1.926,0.263,4.52-2.034,5.85c-2.521,1.664-3.533,2.33-4.017,2.623c-0.694,0.531-1.549,0.809-2.494,0.809
+	c-0.457,0-0.938-0.068-1.435-0.197c-1.362-0.361-3.118-1.973-3.118-1.973l-2.832-2.351l-0.308,29.654
+	c12.713,6.645,21.722,13.326,22.742,14.09l3.881,3.585l0.985,5.368l-7.642,9.593l-3.483-3.164l-22.174,28.096l0.426,0.533
+	l0.647,5.353l-8.772,11.015l0,0l-4.178-6.849c-9.25-14.047-18.106-25.179-26.359-33.136c0,0-25.568,27.908-25.601,27.947
+	c-0.781,0.951-3.209,3.912-6.807,5.578c-0.654,0.305-1.338,0.557-2.027,0.752c-0.912,0.252-1.83,0.381-2.736,0.381
+	c-4.566,0-9.146-4.726-9.146-4.726s-20.367-17.297-32.158-29.642c-11.121-11.637-27.121-31.885-27.688-32.588
+	c-2.039-2.53-2.975-3.729-3.373-4.588c-1.537-3.317-1.043-7.252,1.252-10.086c0.393-0.611,0.881-1.152,1.451-1.615l17.916-14.4
+	l-10.717-20.45l18.751-28.202l9.082,6.105c0.246,0.162,2.488,1.71,3.594,4.295c0,0,2.373,5.411,3.086,7.04
+	c-1.059-8.29-0.902-14.401-0.455-18.516c0.398-3.671,1.156-6.673,1.664-7.634c0.717-1.329,1.836-2.194,3.154-2.456
+	c0.25-0.052,0.543-0.083,0.84-0.083c0.08,0,26.158,5.236,26.158,5.236c2.799,0.319,3.957,1.981,4.447,3.338
+	c0.479,1.321,0.406,2.576,0.082,3.691C89.664,39.054,97.078,26.66,97.078,26.66z M42.824,63.879l-3.591,5.371
+	c-0.125,0.145-0.729,0.908-0.332,1.643l2.611,5.285l5.457-4.385L42.824,63.879L42.824,63.879z"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-199.0249" y1="773.0312" x2="-111.8019" y2="773.0312" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#ADE8FF"/>
+	<stop  offset="1" style="stop-color:#00A5E3"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M50.439,72.055l-9.777,7.857c0.262,0.531,0.525,1.07,0.797,1.619l9.812-7.889L50.439,72.055z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-198.9585" y1="829.0234" x2="-110.1712" y2="829.0234" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#ADE8FF"/>
+	<stop  offset="1" style="stop-color:#00A5E3"/>
+</linearGradient>
+<path fill="url(#SVGID_2_)" d="M33.923,85.329c0,0-10.902,8.764-16.354,13.145c-2.643,2.125-5.691,4.09-5.869,7.889
+	c-0.146,3.152,2.08,5.301,3.916,7.582c1.676,2.082,3.297,4.209,4.961,6.301c10.107,12.705,20.867,24.871,32.639,36.066
+	c5.424,5.16,16.695,15.021,16.695,15.021l5.559,4.778c0,0,4.533,3.74,7.523,3.437c4.182-0.422,6.916-3.678,9.557-6.562
+	c2.004-2.187,26.747-29.185,26.747-29.185l0.693-2.182L33.923,85.329z"/>
+<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-184.5488" y1="835.0322" x2="-127.4567" y2="814.2523" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#ADE8FF"/>
+	<stop  offset="1" style="stop-color:#00ADEE"/>
+</linearGradient>
+<path fill="url(#SVGID_3_)" d="M34.755,86.92l-19.352,15.557c-0.264,0.213-0.467,0.465-0.609,0.738
+	c-0.004,0.002-0.004,0.006-0.004,0.008c-1.348,1.492-1.752,3.699-0.854,5.639c0.363,0.785,0.904,1.438,1.547,1.93l0.643,0.854
+	l60.053,62.67c0,0,4.01,4.307,7.633,3.299c3.695-1.027,6.336-4.582,6.791-5.104l27.387-29.883l0.51-1.273L34.755,86.92z"/>
+<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-199.7646" y1="793.502" x2="-143.8804" y2="773.1617" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#ADE8FF"/>
+	<stop  offset="1" style="stop-color:#00ADEE"/>
+</linearGradient>
+<path fill="url(#SVGID_4_)" d="M50.596,82.719l3.326-4.015l-2.65-5.061l-9.812,7.889c0.984,1.996,2.014,4.086,3.012,6.111
+	L50.596,82.719z"/>
+<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-144.9917" y1="851.8828" x2="-132.1468" y2="859.2988" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#C9F0FF"/>
+	<stop  offset="1" style="stop-color:#6BCAEE"/>
+</linearGradient>
+<path fill="url(#SVGID_5_)" d="M98.826,151.707c0.586-0.27,1.127-0.625,1.611-1.053c2.93-2.604,3.027-7.293,0.213-10.465
+	c-2.285-2.578-5.906-3.439-8.805-2.098c-0.586,0.271-1.127,0.629-1.611,1.057c-2.93,2.598-3.025,7.293-0.213,10.465
+	C92.307,152.191,95.928,153.051,98.826,151.707z"/>
+<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="-143.4375" y1="853.3271" x2="-133.406" y2="857.9767" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_6_)" d="M99.389,149.285c2.167-1.92,2.181-5.445,0.029-7.871c-2.15-2.426-5.65-2.832-7.818-0.912
+	c-2.166,1.924-2.18,5.447-0.029,7.871C93.723,150.799,97.221,151.207,99.389,149.285z"/>
+<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-189.1006" y1="803.6055" x2="-126.7618" y2="832.4987" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="0.1776" style="stop-color:#EDFAFE"/>
+	<stop  offset="0.5357" style="stop-color:#BDECFD"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_7_)" d="M62.978,92.404l-13.194-4.142l-22.156,17.806c0,0,10.613,12.306,20.439,22.771
+	c9.824,10.467,21.598,20.307,21.598,20.307c0.172,0.176,0.371,0.312,0.586,0.404c0.213,0.096,0.441,0.146,0.67,0.15
+	c0.23,0.006,0.461-0.031,0.676-0.113c0.217-0.08,0.418-0.203,0.596-0.375l19.836-18.939l-3.965-8.6L62.978,92.404z"/>
+<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="-183.8726" y1="784.3984" x2="-127.9108" y2="784.3984" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="0.0107" style="stop-color:#3CA6DE"/>
+	<stop  offset="0.2102" style="stop-color:#61B8E3"/>
+	<stop  offset="0.4104" style="stop-color:#7DC6E6"/>
+	<stop  offset="0.6094" style="stop-color:#92D0E9"/>
+	<stop  offset="0.8066" style="stop-color:#9ED6EA"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_8_)" d="M49.855,85.572l-4.59,3.688c0.316,0.643,0.627,1.271,0.928,1.887l3.592-2.887
+	C49.715,87.363,49.738,86.457,49.855,85.572z"/>
+<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="-183.8711" y1="788.9805" x2="-127.9158" y2="788.9805" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="0.0107" style="stop-color:#3CA6DE"/>
+	<stop  offset="0.2102" style="stop-color:#61B8E3"/>
+	<stop  offset="0.4104" style="stop-color:#7DC6E6"/>
+	<stop  offset="0.6094" style="stop-color:#92D0E9"/>
+	<stop  offset="0.8066" style="stop-color:#9ED6EA"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_9_)" d="M27.555,103.498c-0.186,0.15-0.328,0.328-0.43,0.52c-0.102,0.195-0.16,0.402-0.174,0.613
+	c-0.016,0.211,0.014,0.424,0.086,0.627c0.074,0.203,0.193,0.396,0.357,0.566l0.236,0.244l12.074-9.707l-0.971-1.852L27.555,103.498z
+	"/>
+<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="-195.1782" y1="819.8594" x2="-151.5287" y2="776.2098" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#C9F0FF"/>
+	<stop  offset="1" style="stop-color:#6BCAEE"/>
+</linearGradient>
+<path fill="url(#SVGID_10_)" d="M44.471,87.643l0.795,1.619l4.59-3.689l0.74-2.854L44.471,87.643z"/>
+<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="-179.3018" y1="835.7402" x2="-135.6513" y2="792.0897" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#C9F0FF"/>
+	<stop  offset="1" style="stop-color:#6BCAEE"/>
+</linearGradient>
+<path fill="url(#SVGID_11_)" d="M71.6,149.588c-0.215,0.082-0.445,0.119-0.676,0.113c-0.229-0.006-0.457-0.057-0.67-0.15
+	c-0.215-0.094-0.414-0.229-0.586-0.406c0,0-11.773-9.84-21.598-20.305c-9.826-10.467-20.439-22.771-20.439-22.771l-0.236-0.242
+	c-0.164-0.17-0.283-0.363-0.357-0.566c-0.072-0.201-0.102-0.416-0.086-0.627c0.014-0.211,0.072-0.418,0.174-0.611
+	c0.102-0.191,0.244-0.369,0.43-0.521l11.18-8.986l-0.832-1.59l-11.463,9.211c-0.359,0.299-0.652,0.654-0.879,1.074
+	c-0.213,0.412-0.336,0.854-0.365,1.295c-0.029,0.396,0.016,0.785,0.129,1.16l0.453,0.951c0.105,0.152,0.223,0.303,0.355,0.438
+	c0,0,11.229,12.951,20.654,22.994c9.408,10.018,20.719,19.58,21.686,20.393c0.312,0.309,0.674,0.551,1.072,0.725
+	c0.42,0.186,0.865,0.285,1.336,0.299c0.461,0.014,0.912-0.062,1.33-0.221c0.088-0.031,0.172-0.068,0.256-0.105
+	c0.352-0.162,0.668-0.381,0.945-0.646L94.5,130.35c-0.824-0.076-1.621-0.105-2.385-0.094c-0.027,0.006-0.055,0.012-0.084,0.016
+	l-19.836,18.941C72.018,149.385,71.816,149.508,71.6,149.588z"/>
+<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="-196.4512" y1="832.3818" x2="-167.0591" y2="832.3818" gradientTransform="matrix(0.9073 -0.4205 0.4205 0.9073 -138.7168 -689.6455)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_12_)" d="M19.393,115.904c7.934,10.113,16.199,19.992,25.105,29.27c9.617,10.018,19.996,19.221,30.568,28.207
+	c0.852-1.047,1.611-2.131,0.346-3.219c-0.65-0.559-1.295-1.125-1.936-1.693c-3.264-2.895-6.459-5.867-9.619-8.873
+	c-10.428-9.912-20.48-20.145-29.814-31.096c-3.898-4.572-7.725-9.209-11.49-13.891c-0.898-1.119-1.795-2.24-2.684-3.365
+	c-1.188-1.502-2.533-0.531-3.744,0.4C17.201,113.074,18.293,114.492,19.393,115.904"/>
+<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="-742.2285" y1="-281.6123" x2="-742.2285" y2="-388.5609" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#CBEEFB"/>
+	<stop  offset="0.1436" style="stop-color:#97D3DC"/>
+	<stop  offset="0.2898" style="stop-color:#69BBC1"/>
+	<stop  offset="0.4368" style="stop-color:#43A8AB"/>
+	<stop  offset="0.5823" style="stop-color:#269999"/>
+	<stop  offset="0.7256" style="stop-color:#118E8D"/>
+	<stop  offset="0.866" style="stop-color:#048785"/>
+	<stop  offset="1" style="stop-color:#008583"/>
+</linearGradient>
+<path fill="url(#SVGID_13_)" d="M155.625,172.264l-51.594-46.002l-12.774,3.993c11.31-0.762,29.816,7.888,56.894,49.015l2.209,3.616
+	l5.688-7.139L155.625,172.264z"/>
+<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="-728.6826" y1="-280.9658" x2="-728.6826" y2="-388.6979" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#CBEEFB"/>
+	<stop  offset="0.1436" style="stop-color:#97D3DC"/>
+	<stop  offset="0.2898" style="stop-color:#69BBC1"/>
+	<stop  offset="0.4368" style="stop-color:#43A8AB"/>
+	<stop  offset="0.5823" style="stop-color:#269999"/>
+	<stop  offset="0.7256" style="stop-color:#118E8D"/>
+	<stop  offset="0.866" style="stop-color:#048785"/>
+	<stop  offset="1" style="stop-color:#008583"/>
+</linearGradient>
+<path fill="url(#SVGID_14_)" d="M187.607,132.113l-9.371,2.976l-25.512,33.621c0,0,0.727,0.847,1.615,1.955l25.225-31.953
+	c0.689,0.578,0.957,0.733,3.549,3.099l5.1-6.399L187.607,132.113z"/>
+<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="-728.2051" y1="-280.0845" x2="-728.2051" y2="-387.3286" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#CBEEFB"/>
+	<stop  offset="0.1436" style="stop-color:#97DBE4"/>
+	<stop  offset="0.2898" style="stop-color:#69CAD0"/>
+	<stop  offset="0.4368" style="stop-color:#43BCBF"/>
+	<stop  offset="0.5823" style="stop-color:#26B1B2"/>
+	<stop  offset="0.7256" style="stop-color:#11A9A8"/>
+	<stop  offset="0.866" style="stop-color:#04A5A3"/>
+	<stop  offset="1" style="stop-color:#00A3A1"/>
+</linearGradient>
+<path fill="url(#SVGID_15_)" d="M184.592,129.316c-0.504-0.377-10.135-7.615-23.816-14.607l-67.028,1.498l-5.561,5.372l-3.773,7.354
+	c-2.578,1.451-5.129,3.436-7.639,6.014c0,0-3.031,8.182-0.615,5.289c3.695-4.43,10.051-10.043,18.648-10.27
+	c15.681-0.408,33.982,15.436,52.925,45.82l2.207,3.619l5.688-7.145c-1.601-1.975-2.354-2.943-2.899-3.553l26.233-33.293
+	c0.815,0.391,0.959,0.734,3.552,3.096l5.098-6.398L184.592,129.316z"/>
+<linearGradient id="SVGID_16_" gradientUnits="userSpaceOnUse" x1="-724.4067" y1="-374.9897" x2="-724.4067" y2="-338.5796" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_16_)" d="M146.887,127.221L133.9,146.393c7.432,7.449,13.012,14.854,15.381,18.123l25.791-33.074
+	c-5.033-3.775-9.824-7.033-14.391-9.85L146.887,127.221z"/>
+<linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="-742.0537" y1="-356.6289" x2="-703.295" y2="-356.6289" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_17_)" d="M149.334,159.838l21.715-27.848c-4.367-3.188-8.686-6.066-12.914-8.629l-8.406,4.722l-12.183,17.981
+	C142.473,151.176,146.551,156.195,149.334,159.838z"/>
+<linearGradient id="SVGID_18_" gradientUnits="userSpaceOnUse" x1="-718.8262" y1="-346.5469" x2="-718.8262" y2="-318.8759" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_18_)" d="M124.848,119.457l-7.863,13.205c5.35,3.273,9.66,7.055,14.121,11.326l12.057-18.496l-9.125-5.889
+	L124.848,119.457z"/>
+<linearGradient id="SVGID_19_" gradientUnits="userSpaceOnUse" x1="-727.7036" y1="-330.998" x2="-698.5361" y2="-330.998" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_19_)" d="M130.688,140.475l10.35-15.871c-3.898-1.588-8.646-3.266-13.877-4.596l-7.102,11.924
+	C124.088,134.604,127.545,137.557,130.688,140.475z"/>
+<linearGradient id="SVGID_20_" gradientUnits="userSpaceOnUse" x1="-715.2876" y1="-322.7588" x2="-715.2876" y2="-301.4507" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_20_)" d="M105.007,117.566l-4.327,8.433c4.379,0.676,8.752,2.377,13.045,4.76l6.959-12.141l-6.791-2.302
+	L105.007,117.566z"/>
+<linearGradient id="SVGID_21_" gradientUnits="userSpaceOnUse" x1="-720.2607" y1="-310.4688" x2="-697.9523" y2="-310.4688" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_21_)" d="M113.068,128.477l5.824-10.16c-3.873-0.596-7.889-0.918-11.934-0.826l-3.73,7.271
+	C106.395,125.49,109.689,126.736,113.068,128.477z"/>
+<linearGradient id="SVGID_22_" gradientUnits="userSpaceOnUse" x1="-718.9722" y1="-304.21" x2="-718.9722" y2="-288.7786" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_22_)" d="M90.884,120.453l-3.637,7.088c3.645-1.516,7.33-2.045,11.02-1.803l4.086-7.963l-6.363-0.826
+	L90.884,120.453z"/>
+<linearGradient id="SVGID_23_" gradientUnits="userSpaceOnUse" x1="-723.0156" y1="-295.1836" x2="-701.2208" y2="-295.1836" gradientTransform="matrix(0.2388 -0.9711 -0.9711 -0.2388 -19.9312 -645.9684)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_23_)" d="M97.592,124.566l3.396-6.617c-2.99,0.396-5.842,1.043-8.543,1.945l-2.893,5.637
+	C92.143,124.787,94.834,124.463,97.592,124.566z"/>
+<linearGradient id="SVGID_24_" gradientUnits="userSpaceOnUse" x1="148.8223" y1="773.2998" x2="101.8089" y2="691.8701" gradientTransform="matrix(0.9997 -0.0257 0.0257 0.9997 2.2838 -641.6785)">
+	<stop  offset="0" style="stop-color:#5C7480"/>
+	<stop  offset="0.0487" style="stop-color:#738892"/>
+	<stop  offset="0.1616" style="stop-color:#A3B0B7"/>
+	<stop  offset="0.2689" style="stop-color:#C9D0D4"/>
+	<stop  offset="0.3678" style="stop-color:#E4E7E9"/>
+	<stop  offset="0.4552" style="stop-color:#F4F5F6"/>
+	<stop  offset="0.522" style="stop-color:#FAFAFA"/>
+	<stop  offset="0.7181" style="stop-color:#F8F8F9"/>
+	<stop  offset="0.7887" style="stop-color:#F1F3F3"/>
+	<stop  offset="0.8391" style="stop-color:#E6E9EA"/>
+	<stop  offset="0.8798" style="stop-color:#D5DADD"/>
+	<stop  offset="0.9147" style="stop-color:#BFC8CC"/>
+	<stop  offset="0.9456" style="stop-color:#A3B1B7"/>
+	<stop  offset="0.9728" style="stop-color:#84969F"/>
+	<stop  offset="0.9977" style="stop-color:#607783"/>
+	<stop  offset="1" style="stop-color:#5C7480"/>
+</linearGradient>
+<path fill="url(#SVGID_24_)" d="M119.787,63.203l21.377-3.471l-3.842-3.775c-4.854,0.377-10.545,0.922-14.744,1.502
+	C122.566,57.475,121.025,61.229,119.787,63.203z"/>
+<linearGradient id="SVGID_25_" gradientUnits="userSpaceOnUse" x1="146.8428" y1="766.3223" x2="103.1285" y2="690.6071" gradientTransform="matrix(0.9997 -0.0257 0.0257 0.9997 2.2838 -641.6785)">
+	<stop  offset="0" style="stop-color:#5C7480"/>
+	<stop  offset="0.0487" style="stop-color:#738892"/>
+	<stop  offset="0.1616" style="stop-color:#A3B0B7"/>
+	<stop  offset="0.2689" style="stop-color:#C9D0D4"/>
+	<stop  offset="0.3678" style="stop-color:#E4E7E9"/>
+	<stop  offset="0.4552" style="stop-color:#F4F5F6"/>
+	<stop  offset="0.522" style="stop-color:#FAFAFA"/>
+	<stop  offset="0.7181" style="stop-color:#F8F8F9"/>
+	<stop  offset="0.7887" style="stop-color:#F1F3F3"/>
+	<stop  offset="0.8391" style="stop-color:#E6E9EA"/>
+	<stop  offset="0.8798" style="stop-color:#D5DADD"/>
+	<stop  offset="0.9147" style="stop-color:#BFC8CC"/>
+	<stop  offset="0.9456" style="stop-color:#A3B1B7"/>
+	<stop  offset="0.9728" style="stop-color:#84969F"/>
+	<stop  offset="0.9977" style="stop-color:#607783"/>
+	<stop  offset="1" style="stop-color:#5C7480"/>
+</linearGradient>
+<path fill="url(#SVGID_25_)" d="M159.232,75.07L155,79.103c0,0-0.602,46.374-1.352,47.351l7.043-4.894l0.451-43.919L159.232,75.07z"
+	/>
+<linearGradient id="SVGID_26_" gradientUnits="userSpaceOnUse" x1="45.103" y1="706.6523" x2="135.1909" y2="706.6523" gradientTransform="matrix(0.9997 -0.0257 0.0257 0.9997 2.2838 -641.6785)">
+	<stop  offset="0" style="stop-color:#B5E5FB"/>
+	<stop  offset="0.1373" style="stop-color:#CEEEFC"/>
+	<stop  offset="0.3214" style="stop-color:#E9F7FE"/>
+	<stop  offset="0.4849" style="stop-color:#F9FDFF"/>
+	<stop  offset="0.6099" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path fill="url(#SVGID_26_)" d="M118.514,64.192c9.12-1.822,18.278-2.596,23.521-2.926c-0.613-0.506-1.242-1.014-1.871-1.533
+	c-4.924,0.363-12.787,1.084-20.408,2.52C119.748,62.264,118.555,64.129,118.514,64.192z"/>
+<linearGradient id="SVGID_27_" gradientUnits="userSpaceOnUse" x1="48.3496" y1="749.709" x2="134.6143" y2="749.709" gradientTransform="matrix(0.9997 -0.0257 0.0257 0.9997 2.2838 -641.6785)">
+	<stop  offset="0" style="stop-color:#B5E5FB"/>
+	<stop  offset="0.1373" style="stop-color:#CEEEFC"/>
+	<stop  offset="0.3214" style="stop-color:#E9F7FE"/>
+	<stop  offset="0.4849" style="stop-color:#F9FDFF"/>
+	<stop  offset="0.6099" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path fill="url(#SVGID_27_)" d="M154.863,122.945l-0.016-0.605L155,79.104l-84.952,29.16c0.418,10.491,3.1,19.351,3.334,20.104
+	l1.043,3.352l2.51-2.434c7.756-7.525,17.785-11.498,29.812-11.81c16.043-0.41,31.678,5.728,39.644,9.463
+	c1.021,0.619,1.967,1,2.86,1.153l2.181-0.098l2.217-1.539c0.75-0.978,1.149-2.244,1.211-3.459L154.863,122.945z"/>
+<linearGradient id="SVGID_28_" gradientUnits="userSpaceOnUse" x1="51.5605" y1="736.5537" x2="132.7621" y2="743.6579" gradientTransform="matrix(0.9997 -0.0257 0.0257 0.9997 2.2838 -641.6785)">
+	<stop  offset="0" style="stop-color:#C4EAFB"/>
+	<stop  offset="0.0303" style="stop-color:#CAE6E6"/>
+	<stop  offset="0.1069" style="stop-color:#D6DCB6"/>
+	<stop  offset="0.1798" style="stop-color:#E0D490"/>
+	<stop  offset="0.2469" style="stop-color:#E7CF75"/>
+	<stop  offset="0.3063" style="stop-color:#EBCB65"/>
+	<stop  offset="0.3516" style="stop-color:#EDCA5F"/>
+	<stop  offset="0.6923" style="stop-color:#FFD966"/>
+	<stop  offset="1" style="stop-color:#DEBD58"/>
+</linearGradient>
+<path fill="url(#SVGID_28_)" d="M100.535,83.148l-28.031,29.054c0.859,8.455,2.877,14.94,2.877,14.94
+	c18.035-17.504,45.338-13.783,66.639-5.082c1.186,0.481,2.357,0.985,3.523,1.508c1.254,0.562,2.521,1.435,3.854,1.746
+	c2.002,0.476,3.104-1.196,3.238-2.981l0.104-57.727L100.535,83.148z"/>
+<path fill="#C9A64B" d="M87.349,100.521c0,0-2.878,2.727-2.885,2.731c7.674,2.951,16.07,7.896,16.07,7.896
+	c17.688-20.809,34.649-35.299,47.391-42.902c0.005-0.016,0.007-0.033,0.011-0.049c0.106-0.486,1.317-3.457,1.317-3.457
+	L87.349,100.521z"/>
+<linearGradient id="SVGID_29_" gradientUnits="userSpaceOnUse" x1="58.2334" y1="727.8906" x2="132.4112" y2="727.8906" gradientTransform="matrix(0.9997 -0.0257 0.0257 0.9997 2.2838 -641.6785)">
+	<stop  offset="0" style="stop-color:#FAF020"/>
+	<stop  offset="0.138" style="stop-color:#FBEB2E"/>
+	<stop  offset="0.3971" style="stop-color:#FEE052"/>
+	<stop  offset="0.522" style="stop-color:#FFD966"/>
+	<stop  offset="1" style="stop-color:#CCAF53"/>
+</linearGradient>
+<path fill="url(#SVGID_29_)" d="M87.243,100.766c6.752,1.652,12.143,4.779,12.143,4.779c15.631-19.57,34.039-31.998,48.262-39.346
+	l-5.254-4.893c-2.023,0.137-5.045,0.309-7.062,0.516c-5.305,0.545-11.102,1.324-16.332,2.369L87.243,100.766z"/>
+<linearGradient id="SVGID_30_" gradientUnits="userSpaceOnUse" x1="149.8848" y1="703.1299" x2="179.5098" y2="703.1299" gradientTransform="matrix(1 0 0 1 5 -642)">
+	<stop  offset="0" style="stop-color:#855A00"/>
+	<stop  offset="0.054" style="stop-color:#8F650C"/>
+	<stop  offset="0.2468" style="stop-color:#B08834"/>
+	<stop  offset="0.4003" style="stop-color:#C59D4C"/>
+	<stop  offset="0.4945" style="stop-color:#CCA555"/>
+	<stop  offset="0.5908" style="stop-color:#C59D4C"/>
+	<stop  offset="0.7477" style="stop-color:#B08834"/>
+	<stop  offset="0.9448" style="stop-color:#8F650C"/>
+	<stop  offset="1" style="stop-color:#855A00"/>
+</linearGradient>
+<path fill="url(#SVGID_30_)" d="M176.322,82.162c1.557-0.846,0.875-2.777,0.875-2.777c-1.287-4.596-2.818-9.137-4.25-13.689
+	c-0.445,0.178,10.459-8.287,10.498-8.316c0,0,1.723-1.066,0.785-3.008c-0.645-1.336-3.199-1.285-3.199-1.285
+	c-3.828-0.156-12.398-0.506-12.398-0.506c-1.242-3.553-4.461-13.108-4.781-13.712c-0.549-1.352-1.863-1.49-2.566-1.455l-0.02-0.009
+	l-5.074,0.631c-0.562,0.085-1.041,0.657-1.307,1.647l17.318,45.172L176.322,82.162z"/>
+<linearGradient id="SVGID_31_" gradientUnits="userSpaceOnUse" x1="132.4189" y1="695.6914" x2="147.2754" y2="695.6914" gradientTransform="matrix(1 0 0 1 5 -642)">
+	<stop  offset="0" style="stop-color:#855A00"/>
+	<stop  offset="0.054" style="stop-color:#8F650C"/>
+	<stop  offset="0.2468" style="stop-color:#B08834"/>
+	<stop  offset="0.4003" style="stop-color:#C59D4C"/>
+	<stop  offset="0.4945" style="stop-color:#CCA555"/>
+	<stop  offset="0.5908" style="stop-color:#C59D4C"/>
+	<stop  offset="0.7477" style="stop-color:#B08834"/>
+	<stop  offset="0.9448" style="stop-color:#8F650C"/>
+	<stop  offset="1" style="stop-color:#855A00"/>
+</linearGradient>
+<path fill="url(#SVGID_31_)" d="M152.275,53.813l-0.637-1.445c-2.302,0.012-4.603,0.031-6.9,0.08
+	c-0.063,0.004-0.422,0.027-0.467,0.031c0.019-0.004,0.017-0.004-0.002,0c-1.343,0.105-5.713,1.199-5.713,1.199
+	c-0.63,0.188-0.998,0.715-1.138,1.336C137.645,54.383,152.275,53.813,152.275,53.813z"/>
+<linearGradient id="SVGID_32_" gradientUnits="userSpaceOnUse" x1="143.2031" y1="721.0137" x2="154.2109" y2="721.0137" gradientTransform="matrix(1 0 0 1 5 -642)">
+	<stop  offset="0" style="stop-color:#855A00"/>
+	<stop  offset="0.054" style="stop-color:#8F650C"/>
+	<stop  offset="0.2468" style="stop-color:#B08834"/>
+	<stop  offset="0.4003" style="stop-color:#C59D4C"/>
+	<stop  offset="0.4945" style="stop-color:#CCA555"/>
+	<stop  offset="0.5908" style="stop-color:#C59D4C"/>
+	<stop  offset="0.7477" style="stop-color:#B08834"/>
+	<stop  offset="0.9448" style="stop-color:#8F650C"/>
+	<stop  offset="1" style="stop-color:#855A00"/>
+</linearGradient>
+<path fill="url(#SVGID_32_)" d="M149.164,82.07c-0.322,0.23-0.643,0.445-0.961,0.602c0.154-0.053,0.311-0.117,0.465-0.203
+	c0.152-0.084,3.484-1.344,4.787-2.332c1.975-1.248,3.873-2.645,5.756-4.061c-0.291-0.24-0.582-0.48-0.873-0.721
+	C155.287,77.602,152.24,79.857,149.164,82.07z"/>
+<path fill="#855A00" d="M180.039,56.457h-0.006c-0.736-2.619-5.627-1.959-7.709-2.053c-2.859-0.127-5.719-0.254-8.58-0.383
+	c-1.576-4.512-3.152-9.021-4.729-13.532c-0.666-1.906-3.326-3.56-4.133-0.807c-1.131,4.214-3.486,13.65-3.607,14.13
+	c-1.89-0.006-3.781-0.016-5.672-0.014c-2.225,0.002-4.445,0.02-6.664,0.084c-0.799,0.023-1.295,0.5-1.521,1.131
+	c-0.297,0.832-0.121,1.928,0.461,2.596c1.391,1.6,3.363,2.943,4.947,4.346c1.801,1.596,3.604,3.191,5.402,4.787
+	c-0.793,3.6-1.582,7.201-2.357,10.805c-0.305,1.412-1.029,3.172-0.062,4.486c0.785,1.064,1.58,1.041,2.393,0.639
+	c0.316-0.156,0.639-0.371,0.961-0.602c3.076-2.213,6.123-4.469,9.174-6.715c0.291,0.24,6.658,5.506,9.568,7.879
+	c0.717,0.586,1.59,1.602,2.557,1.855c0.896,0.236,1.466,0.074,1.811-0.307c0.459-0.506,0.516-1.4,0.418-2.266
+	c-0.062-0.555-0.189-1.098-0.316-1.518c-0.486-1.598-0.982-3.193-1.477-4.789c-0.873-2.818-1.752-5.633-2.641-8.447
+	c3.523-2.775,7.066-5.533,10.529-8.387C179.738,58.594,180.416,57.84,180.039,56.457z M178.459,57.381
+	c-3.74,3.471-7.99,6.492-11.984,9.662c0.484,1.564,3.319,10.636,3.84,12.331c0.291,0.947,0.578,1.896,0.863,2.846
+	c0.07,0.234,0.143,0.469,0.213,0.703c-0.014,0.211-0.125,0.398-0.285,0.506c-0.098,0.066-0.215,0.102-0.338,0.092
+	c-0.053-0.004-0.105-0.014-0.16-0.035c-4.273-3.141-8.25-6.742-12.354-10.098c-3.115,2.299-6.166,4.729-9.338,6.957
+	c-0.445,0.312-0.891,0.619-1.34,0.922c-0.064,0.043-0.131,0.09-0.195,0.133c-0.123,0.025-0.24,0-0.344-0.055
+	c-0.172-0.09-0.307-0.266-0.371-0.455c-0.01-0.045-0.023-0.084-0.031-0.137c0.865-4.873,2.119-9.691,3.17-14.527
+	c-2.697-2.371-8.781-7.636-9.306-8.056c-0.942-0.75-2.112-1.822-1.881-2.438c0.004-0.012,0.01-0.025,0.016-0.037
+	c0.015-0.035,0.033-0.066,0.06-0.098c0.043-0.049,0.093-0.098,0.16-0.137c2.834-0.125,5.688-0.113,8.535-0.08
+	c1.661,0.02,3.323,0.045,4.979,0.061c0.428-1.623,3.431-13.433,3.901-15.182c0.008-0.032,0.017-0.065,0.024-0.097
+	c0.276-0.455,0.539-0.43,0.763-0.216c0.312,0.3,0.545,0.968,0.635,1.229c0.606,1.748,3.973,11.394,5.043,14.471
+	c3.72,0.172,7.438,0.346,11.158,0.518C174.387,56.188,179.148,55.812,178.459,57.381z"/>
+<linearGradient id="SVGID_33_" gradientUnits="userSpaceOnUse" x1="133.5889" y1="703.6895" x2="173.5166" y2="703.6895" gradientTransform="matrix(1 0 0 1 5 -642)">
+	<stop  offset="0" style="stop-color:#FDFF94"/>
+	<stop  offset="1" style="stop-color:#F5D900"/>
+</linearGradient>
+<path fill="url(#SVGID_33_)" d="M173.668,56.18c-3.645-0.178-7.289-0.355-10.936-0.533c-1.07-3.076-2.146-6.152-3.217-9.228
+	c-0.607-1.748-1.221-3.495-1.826-5.243c-0.09-0.261-0.324-0.929-0.635-1.229c-0.092-0.06-0.182-0.094-0.271-0.092
+	c-0.188,0.003-0.357,0.159-0.52,0.404c-0.471,1.749-0.922,3.503-1.369,5.258c-0.002,0.014-0.008,0.035-0.01,0.046
+	c-0.428,1.665-0.846,3.331-1.268,4.997c-0.414,1.629-0.828,3.258-1.256,4.881c-4.49-0.045-9.025-0.178-13.514,0.02
+	c-0.068,0.039-0.117,0.088-0.16,0.137c-0.025,0.031-0.045,0.062-0.061,0.098c-0.006,0.012-0.012,0.025-0.018,0.037
+	c-0.186,0.588,0.898,1.631,1.883,2.438c0.523,0.42,6.681,5.742,9.306,8.056c-1.051,4.836-2.305,9.654-3.17,14.527
+	c0.009,0.053,0.021,0.092,0.031,0.137c0.063,0.189,0.198,0.365,0.371,0.455c0.153,0.039,0.34,0.004,0.538-0.078
+	c0.449-0.303,0.896-0.609,1.341-0.922c0.196-0.168,6.364-4.763,9.338-6.957c4.104,3.355,8.078,6.957,12.354,10.098
+	c0.054,0.021,0.106,0.031,0.16,0.035c0.122,0.01,0.239-0.025,0.338-0.092c0.178-0.199,0.17-0.66,0.071-1.209
+	c-0.284-0.949-0.571-1.898-0.862-2.846c-0.783-2.551-1.58-5.096-2.377-7.643c-0.49-1.562-0.979-3.125-1.463-4.689
+	c3.993-3.17,8.243-6.191,11.983-9.662C179.135,55.842,174.197,56.205,173.668,56.18z"/>
+<linearGradient id="SVGID_34_" gradientUnits="userSpaceOnUse" x1="57.0723" y1="704.8457" x2="126.2905" y2="704.8457" gradientTransform="matrix(1 0 0 1 5 -642)">
+	<stop  offset="0" style="stop-color:#C9EBFB"/>
+	<stop  offset="0.2802" style="stop-color:#B5E5FB"/>
+	<stop  offset="1" style="stop-color:#1774A3"/>
+</linearGradient>
+<path fill="url(#SVGID_34_)" d="M62.478,92.902c0,0,5.143,11.965,7.883,17.87c0.146,0.315,0.674,1.957,1.094,1.963
+	c0.541,0.009,1.596,0.226,2.047-0.137c2.15-1.613,4.18-3.429,6.217-5.181c11.178-9.598,21.938-19.666,31.019-31.303
+	c2.537-3.236,4.955-6.562,7.253-9.973c1.266-1.893,2.493-3.809,3.653-5.77c0.785-1.326,1.858-2.818,2.244-4.309
+	c0.627-2.428-1.078-4.703-2.134-6.77c-0.953-1.87-1.903-3.739-2.856-5.609c5.763-0.7,10.338-5.946,11.806-11.312
+	c1.489-5.453,0.133-11.543-3.916-15.563c-3.42-3.396-9.384-5.288-13.884-2.759c-5.305,2.982-6.479,10.862-6.223,16.348
+	c-1.037-0.719-2.074-1.439-3.111-2.158c-1.047-0.729-3.874-1.029-4.786,0.096c-3.18,4.479-5.838,9.439-8.52,14.22
+	c-2.537,4.526-4.93,9.123-7.535,13.611c-1.408,2.422-2.811,4.848-4.213,7.271L62.478,92.902z"/>
+<linearGradient id="SVGID_35_" gradientUnits="userSpaceOnUse" x1="57.9014" y1="704.5957" x2="121.0943" y2="704.5957" gradientTransform="matrix(1 0 0 1 5 -642)">
+	<stop  offset="0" style="stop-color:#ABE3FF"/>
+	<stop  offset="0.1381" style="stop-color:#A5E0FD"/>
+	<stop  offset="0.3157" style="stop-color:#95D6F6"/>
+	<stop  offset="0.515" style="stop-color:#7BC6EA"/>
+	<stop  offset="0.73" style="stop-color:#56B0DA"/>
+	<stop  offset="0.9553" style="stop-color:#2793C6"/>
+	<stop  offset="1" style="stop-color:#1D8DC2"/>
+</linearGradient>
+<path fill="url(#SVGID_35_)" d="M114.164,39.146c0.297-0.01,0.65,0.045,1.143,0.123c2.342,0.371,4.971-0.613,7.146-2.797
+	c0.592-0.594,1.146-1.278,1.645-2.049c2.85-4.483,2.566-10.368-0.301-14.231c-0.49-0.661-1.047-1.266-1.67-1.799
+	c-3.559-3.116-7.801-2.747-10.354,0.568c-0.439,0.567-0.836,1.223-1.188,1.966c-1.848,3.824-2.053,8.869-0.77,12.781
+	c0.229,0.703,0.107,1.596-0.303,2.225s-1.006,0.854-1.479,0.557l-7.775-5.415c-0.086-0.068-0.656,0.104-0.656,0.104
+	s-7.652,11.599-13.684,22.48c-3.188,5.344-8.787,14.908-8.787,14.908L62.988,91.989l8.326,16.95c0,0,15.113-11.989,28.119-27.253
+	c7.475-8.531,12.283-14.994,15.148-19.283c1.392-2.139,2.336-3.74,2.924-4.793c0.291-0.527,1.004-1.896,1.134-2.062
+	c0.1-0.123-0.171-0.773-0.171-0.773l-5.813-12.583c-0.256-0.672-0.229-1.551,0.164-2.262c0.113-0.205,0.246-0.381,0.392-0.521
+	C113.209,39.409,113.445,39.169,114.164,39.146z"/>
+<path fill="#A6D2ED" d="M110.818,29.659c0-4.991,3.631-9.037,8.107-9.037c1.566,0,3.021,0.502,4.264,1.357
+	c-1.215-2.581-3.391-4.308-5.873-4.308c-3.812,0-6.902,4.046-6.902,9.036c0,1.066,0.148,2.085,0.408,3.034
+	C110.822,29.714,110.818,29.687,110.818,29.659z"/>
+<linearGradient id="SVGID_36_" gradientUnits="userSpaceOnUse" x1="67.437" y1="718.4004" x2="108.293" y2="718.4004" gradientTransform="matrix(1 0 0 1 5 -642)">
+	<stop  offset="0" style="stop-color:#C2DFF2"/>
+	<stop  offset="0.3734" style="stop-color:#BCDCF1"/>
+	<stop  offset="0.8526" style="stop-color:#ACD5EE"/>
+	<stop  offset="1" style="stop-color:#A6D2ED"/>
+</linearGradient>
+<path fill="url(#SVGID_36_)" d="M113.293,56.553l-3.297-6.332c0,0-19.605,32.041-37.559,49.059l1.926,3.299
+	C74.363,102.578,102.574,75.521,113.293,56.553z"/>
+<linearGradient id="SVGID_37_" gradientUnits="userSpaceOnUse" x1="108.9102" y1="726.8193" x2="108.9102" y2="658.0107" gradientTransform="matrix(0.9978 0.0668 -0.0668 0.9978 8.0332 -635.0205)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="0.0682" style="stop-color:#FDFFF8"/>
+	<stop  offset="0.4575" style="stop-color:#F1FCD8"/>
+	<stop  offset="0.782" style="stop-color:#EAFBC3"/>
+	<stop  offset="1" style="stop-color:#E7FABC"/>
+</linearGradient>
+<path fill="url(#SVGID_37_)" d="M63.77,89.775l5.865,7.162c0.352,0.428,0.779,0.689,1.172,0.715
+	c0.084,0.006,0.373-0.053,0.435-0.082c0.221-0.107,0.422-0.303,0.58-0.568l14.012-23.393c0.639-1.066,0.445-2.859-0.422-3.92
+	l-0.354-0.25c-0.123-0.021-8.9-0.924-8.9-0.924s0.094-1.262,0.108-1.287c0.801-15.023,6.639-24.262,9.105-27.53l0.053-0.068
+	c0.861-1.14,2.305-3.045,1.623-4.928c-0.359-0.992-1.062-1.482-2.283-1.592l-0.068-0.008l-0.064-0.012l-25.336-5.158
+	c-0.078-0.016-0.154-0.025-0.232-0.031c-0.141-0.009-0.281,0-0.42,0.027c-0.523,0.105-0.99,0.492-1.309,1.084
+	c-0.238,0.447-0.971,3.002-1.369,6.666c-0.65,5.967-0.654,16.315,3.023,31.733l0.312,1.314l-1.867,0.21L63.77,89.775z"/>
+<linearGradient id="SVGID_38_" gradientUnits="userSpaceOnUse" x1="108.8438" y1="724.0918" x2="108.8438" y2="660.1348" gradientTransform="matrix(0.9978 0.0668 -0.0668 0.9978 8.0332 -635.0205)">
+	<stop  offset="0" style="stop-color:#7A9E2E"/>
+	<stop  offset="0.3571" style="stop-color:#9DCB3B"/>
+	<stop  offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path fill="url(#SVGID_38_)" d="M64.629,87.432l6.043,7.477L84.043,71.38l-10.041-0.941l0.17-3.211
+	c0.809-15.66,6.938-25.348,9.514-28.759c0,0,1.693-2.239,1.394-3.061c-0.027-0.078-25.912-5.372-25.912-5.372
+	c-0.221,0.615-0.795,2.808-1.127,5.871c-0.635,5.801-0.631,15.891,2.977,31.023l0.863,3.611l-3.545,0.451L64.629,87.432z"/>
+<linearGradient id="SVGID_39_" gradientUnits="userSpaceOnUse" x1="-338.2412" y1="677.4316" x2="-331.6225" y2="742.6355" gradientTransform="matrix(0.827 -0.5621 0.5621 0.827 -68.9957 -704.6641)">
+	<stop  offset="0" style="stop-color:#EB2100"/>
+	<stop  offset="0.1353" style="stop-color:#E72101"/>
+	<stop  offset="0.2554" style="stop-color:#DD2005"/>
+	<stop  offset="0.3699" style="stop-color:#CA1F0B"/>
+	<stop  offset="0.4802" style="stop-color:#B11E14"/>
+	<stop  offset="0.5714" style="stop-color:#961C1E"/>
+	<stop  offset="0.8681" style="stop-color:#DBFAF8"/>
+</linearGradient>
+<path fill="url(#SVGID_39_)" d="M46.154,44.226l-6.85-4.604L60.166,82.33c0,0-1.51,13.504-1.621,13.613
+	c0.961-0.229,2.904-1.521,4.004-2.979c2.354-3.119,3.08-8.252,1.033-11.945c-0.172-0.311-11.57-26.295-14.805-33.668
+	C47.953,45.425,46.154,44.226,46.154,44.226z"/>
+<linearGradient id="SVGID_40_" gradientUnits="userSpaceOnUse" x1="-350.2832" y1="676.4775" x2="-350.2832" y2="743.606" gradientTransform="matrix(0.827 -0.5621 0.5621 0.827 -68.9957 -704.6641)">
+	<stop  offset="0" style="stop-color:#EB2100"/>
+	<stop  offset="0.1353" style="stop-color:#E72101"/>
+	<stop  offset="0.2554" style="stop-color:#DD2005"/>
+	<stop  offset="0.3699" style="stop-color:#CA1F0B"/>
+	<stop  offset="0.4802" style="stop-color:#B11E14"/>
+	<stop  offset="0.5714" style="stop-color:#961C1E"/>
+	<stop  offset="0.9066" style="stop-color:#D0EDEB"/>
+</linearGradient>
+<path fill="url(#SVGID_40_)" d="M31.195,69.121c0,0,16.051,46.221,15.893,46.368c3.314-2.111,6.77-7.791,3.348-15.729
+	c-0.42-0.977-11.051-22.523-13.812-28.109c-1.348-2.502,0.695-4.703,0.695-4.703l5.857-8.844l-2.061-3.932L31.195,69.121z"/>
+<linearGradient id="SVGID_41_" gradientUnits="userSpaceOnUse" x1="-349.9482" y1="743.6738" x2="-349.9482" y2="676.4775" gradientTransform="matrix(0.827 -0.5621 0.5621 0.827 -68.9957 -704.6641)">
+	<stop  offset="0" style="stop-color:#DCFAF8"/>
+	<stop  offset="0.4505" style="stop-color:#EB2100"/>
+	<stop  offset="0.5806" style="stop-color:#E72101"/>
+	<stop  offset="0.6962" style="stop-color:#DD2005"/>
+	<stop  offset="0.8062" style="stop-color:#CA1F0B"/>
+	<stop  offset="0.9123" style="stop-color:#B11E14"/>
+	<stop  offset="1" style="stop-color:#961C1E"/>
+</linearGradient>
+<path fill="url(#SVGID_41_)" d="M22.92,64.264L41.305,99.33c-0.594,0.32-1.166,0.771-1.693,1.357
+	c-2.805,3.107-3.301,8.844-1.107,12.803c2.076,3.744,5.812,4.557,8.584,1.998c0.158-0.146,0.316-0.299,0.469-0.469
+	c2.807-3.111,3.303-8.846,1.107-12.803c-0.217-0.393-17.469-33.098-17.469-33.098l9.92-14.949l2.061,3.932l10.752,20.531
+	c-0.598,0.32-1.174,0.773-1.705,1.361c-2.807,3.113-3.303,8.846-1.109,12.803c2.109,3.803,5.932,4.576,8.717,1.867
+	c0.113-0.109,0.227-0.215,0.336-0.336c2.807-3.109,3.303-8.844,1.107-12.801C61.06,81.142,39.306,39.62,39.306,39.62L22.92,64.264z"
+	/>
+<rect y="-0.001" fill="none" width="200" height="200.001"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/icons/qgn_menu_creator.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,62 @@
+<?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 88">
+  <defs
+     id="defs6909" />
+  <rect
+     id="rect7683"
+     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.12500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;stroke-dasharray:none"
+     transform="matrix(0.707097,0.707117,-0.707116,0.707097,0.000000,0.000000)"
+     y="-27.734158"
+     x="34.175232"
+     height="55.153564"
+     width="55.155079" />
+  <rect
+     id="rect10008"
+     style="fill:#ffd800;fill-opacity:0.00000000;stroke:#000000;stroke-width:1.4641515;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     transform="matrix(0.707807,0.706406,-0.707368,0.706845,0.000000,0.000000)"
+     y="-24.579279"
+     x="37.081882"
+     height="49.570164"
+     width="49.602535" />
+  <path
+     id="path13048"
+     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.6682692;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 27.031591,57.263037 L 60.609963,57.263037" />
+  <path
+     style="stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0.12965260;stroke:#000000;fill-rule:evenodd;fill-opacity:1.0000000;fill:#000000"
+     d="M 53.055235,56.214138 C 52.624696,55.783599 53.895322,55.268316 54.042996,54.677621 C 54.177132,54.141074 54.531315,54.216369 54.372250,53.580108 C 54.255651,53.113713 53.875841,52.644696 53.603991,52.372845 C 53.309600,52.078454 53.118192,51.620750 52.945484,51.275333 C 52.703517,50.791400 52.280433,50.498349 51.957723,50.068070 C 51.603941,49.596361 51.413359,49.198844 51.189464,48.751055 C 50.899300,48.170724 50.368976,47.381811 49.982201,46.995036 C 49.704954,46.717789 49.601842,45.905065 49.433445,45.568270 C 49.184790,45.070960 49.138813,44.724882 48.774938,44.361006 C 48.320481,43.906550 47.740713,44.517222 47.567675,44.690260 C 47.298191,44.959743 46.811103,45.340001 46.360411,45.678021 C 45.855798,46.056480 45.501514,46.517804 45.262898,46.995036 C 45.012812,47.495209 44.962345,48.087501 44.823894,48.641303 C 44.672748,49.245890 44.626653,49.759521 44.494640,50.287572 C 44.374994,50.766160 44.494640,51.437604 44.494640,51.933840 C 44.494640,52.473242 44.479725,53.091014 44.384889,53.470358 C 44.236156,54.065293 43.580797,53.654026 44.165387,54.238616 C 44.585434,54.658664 44.644693,54.758223 44.933645,55.336128 C 45.224512,55.917862 44.973069,56.284464 44.714142,56.543391 C 44.460419,56.797114 43.654774,56.762894 43.177626,56.762894 C 42.469818,56.762894 41.865291,56.872645 41.202104,56.872645 C 40.653348,56.872645 40.104592,56.872645 39.555835,56.872645 C 39.007079,56.872645 38.458323,56.872645 37.909567,56.872645 C 37.360811,56.872645 36.812055,56.872645 36.263299,56.872645 C 35.361025,56.872645 34.513340,56.762894 33.629270,56.762894 C 33.007346,56.762894 32.385423,56.762894 31.763499,56.762894 C 31.141575,56.762894 30.519651,56.762894 29.897729,56.762894 C 29.316629,56.762894 28.811179,56.765634 28.361211,56.653142 C 28.294677,56.636509 28.361211,54.800636 28.361211,54.677621 C 28.361211,54.122622 28.373835,53.419862 28.470963,53.031353 C 28.595884,52.531668 28.801084,52.149872 28.909968,51.714338 C 29.009519,51.316133 29.389366,50.975043 29.568474,50.616825 C 29.828283,50.097211 29.986001,49.824729 30.117231,49.299811 C 30.235460,48.826894 30.775433,48.531857 30.995240,48.312050 C 31.322699,47.984592 31.766969,47.981929 32.202504,47.873045 C 32.844620,47.712517 33.143720,48.218959 33.300016,48.531553 C 33.507317,48.946154 33.940327,49.281615 34.178026,49.519314 C 34.504402,49.845689 34.655723,50.255205 34.836533,50.616825 C 35.036987,51.017734 35.283331,51.306507 35.385290,51.714338 C 35.510174,52.213877 35.484864,52.661395 35.604792,53.141103 C 35.720800,53.605133 36.020969,53.996287 36.263299,54.238616 C 36.590757,54.566074 37.035027,54.568737 37.470562,54.677621 C 37.877196,54.779280 38.450774,54.787372 39.007079,54.787372 C 39.499561,54.787372 39.726237,54.336816 39.885089,54.019113 C 40.048252,53.692788 39.994840,52.735696 39.994840,52.372845 C 39.994840,51.764083 39.885089,51.340231 39.885089,50.836328 C 39.885089,50.227207 39.994840,49.666649 39.994840,49.080309 C 39.994840,48.594446 40.231693,47.913395 40.324094,47.543792 C 40.463214,46.987311 40.640950,46.471075 40.872850,46.007275 C 41.112138,45.528699 41.332188,45.417852 41.531357,45.019514 C 41.798584,44.485060 41.919124,44.478034 41.641109,43.922001 C 41.427678,43.495140 41.418998,43.033558 41.311854,42.604987 C 41.183697,42.092355 41.189896,41.666058 41.311854,41.178221 C 41.441133,40.661112 41.531357,40.378202 41.531357,39.751456 C 41.531357,39.357313 41.147280,38.983300 40.982601,38.653943 C 40.761616,38.211972 40.577118,38.019774 40.433845,37.446679 C 40.293896,36.886882 40.102128,36.558816 39.994840,36.129665 C 39.884579,35.688622 39.615766,35.371517 39.446084,35.032153 C 39.247021,34.634025 39.226582,34.204135 39.226582,33.605387 C 39.226582,32.945903 39.466503,32.796291 39.665587,32.398124 C 39.865488,31.998320 40.030648,31.703808 40.324094,31.410363 C 40.648346,31.086110 40.792597,30.722357 41.092353,30.422602 C 41.497139,30.017815 40.746419,29.764094 40.324094,29.764094 C 39.766471,29.764094 39.381552,29.512327 39.007079,29.325090 C 38.644368,29.143734 38.429384,28.550821 38.348572,28.227577 C 38.239216,27.790154 37.911825,27.569635 37.470562,27.459319 C 36.870536,27.309312 36.716357,27.816679 36.373050,27.130065 C 36.166333,26.716631 36.263299,26.084628 36.263299,25.593549 C 36.263299,25.032763 36.269922,24.469546 36.373050,24.057031 C 36.480019,23.629153 36.767491,23.268149 36.921806,22.959519 C 37.118553,22.566025 37.706265,22.347787 38.019318,22.191261 C 38.389122,22.006359 39.035295,22.081510 39.555835,22.081510 C 40.104592,22.081510 40.653348,22.081510 41.202104,22.081510 C 41.550777,22.081510 42.048741,22.504828 42.299615,22.630266 C 42.779900,22.870407 43.095825,22.877718 43.397128,23.179022 C 43.856580,23.638474 43.334114,23.790792 43.067875,24.057031 C 42.608660,24.516246 42.293774,24.264849 42.628870,24.935041 C 42.796868,25.271038 43.241637,25.657560 43.506879,25.922802 C 43.829866,26.245788 44.071833,26.471558 44.604392,26.471558 C 45.231133,26.471558 45.468527,26.258992 45.921406,26.032553 C 46.380507,25.803003 46.621967,25.682272 47.018918,25.483797 C 47.432354,25.277079 48.064355,25.374046 48.555436,25.374046 C 48.881562,25.374046 49.547228,25.870950 49.762698,26.032553 C 50.233060,26.385325 50.346134,26.562541 50.860211,26.691060 C 51.323258,26.806822 51.603308,27.096337 52.177225,27.239816 C 52.669260,27.362825 53.085679,27.686432 53.494239,27.788572 C 54.085273,27.936331 54.424563,27.883965 54.921006,28.008075 C 55.515417,28.156678 55.672225,28.522753 55.908767,28.995836 C 56.129829,29.437960 56.491410,29.722118 56.677025,30.093348 C 56.910943,30.561183 56.502923,30.880558 56.238021,31.410363 C 56.056374,31.773656 55.750791,32.117094 55.469761,32.398124 C 55.126451,32.741435 54.982268,33.373113 54.811255,33.715138 C 54.580847,34.175955 54.213651,34.581092 53.933245,35.141904 C 53.665425,35.677541 53.569455,36.088987 53.384489,36.458918 C 53.193251,36.841393 53.274738,37.478767 53.274738,37.995435 C 53.274738,38.355483 53.637246,38.896713 53.713742,39.202699 C 53.826257,39.652756 54.049119,39.995451 54.152747,40.409962 C 54.261646,40.845559 54.246127,41.441991 54.372250,41.946479 C 54.491897,42.425068 54.372250,43.096512 54.372250,43.592748 C 54.372250,44.221105 54.406333,44.648676 54.591752,45.019514 C 54.805887,45.447783 54.950405,45.736818 55.140508,46.117026 C 55.318283,46.472575 55.666926,46.862946 56.018518,47.214537 C 56.421894,47.617914 56.456093,48.089688 56.677025,48.531553 C 56.956851,49.091204 57.024443,49.445891 57.225781,49.848567 C 57.525499,50.448001 57.843039,50.781081 57.994040,51.385084 C 58.121209,51.893759 58.424571,52.009700 58.542796,52.482597 C 58.645326,52.892716 58.958398,53.157244 59.091552,53.689860 C 59.206608,54.150081 59.311055,54.491721 59.311055,55.116625 C 59.311055,55.745296 59.151256,56.154433 58.872050,56.433641 C 58.548620,56.757070 57.979019,56.653142 57.445283,56.653142 C 57.019297,56.653142 56.409259,56.762894 55.908767,56.762894 C 55.327666,56.762894 54.822217,56.760154 54.372250,56.872645 C 53.888809,56.993505 53.322734,56.966958 52.945484,56.872645 C 52.548865,56.773490 53.055235,56.085649 53.055235,55.665381"
+     id="path2140" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.15643996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 38.428125,47.795987 C 38.311148,47.854477 36.965297,46.068306 36.706578,45.809587 C 36.275090,45.378099 35.986619,44.957203 35.647163,44.617746 C 35.160123,44.130704 34.556573,44.434693 34.190469,44.617746 C 33.723208,44.851375 33.274878,45.075540 32.866201,45.279879 C 32.358140,45.533910 32.262581,46.015925 31.939214,46.339294 C 31.632132,46.646376 31.393272,47.331218 31.277080,47.795987 C 31.083157,48.571681 31.468244,48.972877 31.674360,49.385108 C 31.912314,49.861016 32.778380,50.223928 33.131055,50.312097 C 33.776711,50.473511 34.431575,50.444524 35.117456,50.444524 C 35.382879,50.444524 36.028034,49.885811 36.441723,49.782389 C 36.905836,49.666361 37.228511,49.190356 37.633565,48.987829 C 37.959970,48.824626 38.265273,48.203119 38.428125,47.795987 z "
+     id="path2902" />
+  <path
+     style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
+     d="M 36.399595,46.098141 C 41.690234,42.288881 41.690234,42.288881 41.690234,42.288881"
+     id="path3662" />
+  <path
+     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 51.177526,33.514353 C 51.643815,33.290634 52.117036,32.810504 52.277706,32.050272 C 52.490950,31.041286 52.186388,30.532180 51.727616,30.260839 C 51.228746,29.965782 50.690078,29.935489 49.939823,29.935489 C 48.958188,29.935489 48.839642,29.898727 48.839642,31.074218 C 48.839642,31.604089 49.483749,32.272697 49.664777,32.700974 C 49.972897,33.429925 50.486789,33.514353 51.177526,33.514353 z "
+     id="path3666" />
+  <path
+     style="fill:#ffd800;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 43.339938,38.616989 C 43.358543,38.676580 44.048989,37.735278 44.132320,37.601827 C 44.413539,37.151472 44.464358,36.937090 44.370034,36.332872 C 44.312608,35.965007 43.825038,35.713886 43.656891,35.444606 C 43.366077,34.978882 43.133760,34.623676 42.864509,34.048757 C 42.530139,33.334791 42.389080,34.076845 42.389080,34.683233 C 42.389080,35.330477 42.556959,35.728514 42.706032,36.205977 C 42.849733,36.666232 42.864509,37.134957 42.864509,37.855617 C 42.864509,38.303047 43.016630,38.409884 43.339938,38.616989 z "
+     id="path4426" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 43.635359,9.6022099 C 40.526110,12.711459 40.475138,12.762431 40.475138,12.762431 L 46.795580,12.762431 L 43.635359,9.6022099 z "
+     id="path8982" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 43.878453,78.154696 C 40.769204,75.045447 40.718232,74.994475 40.718232,74.994475 L 47.038674,74.994475 L 43.878453,78.154696 z "
+     id="path9742" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 9.4806628,43.878454 C 12.589911,46.987703 12.640883,47.038675 12.640883,47.038675 L 12.640883,40.718232 L 9.4806628,43.878454 z "
+     id="path9744" />
+  <path
+     style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.00000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+     d="M 78.033148,43.756906 C 74.923900,46.866155 74.872928,46.917127 74.872928,46.917127 L 74.872928,40.596684 L 78.033148,43.756906 z "
+     id="path9746" />
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/inc/engine.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,588 @@
+/*
+* 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 __CREATORENGINE_H__
+#define __CREATORENGINE_H__
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <e32hal.h>
+#include <s32file.h>
+#include <s32mem.h>
+#include <w32std.h>
+
+//#include <aknenv.h>
+#include <coeutils.h>
+#include <apparc.h>
+#include <eikenv.h>
+//#include <eikprogi.h>
+#include <bautils.h>
+#include <commdb.h>
+#include <imageconversion.h> //TFrameInfo
+
+#include "creator.hrh"
+#include "creator_std.h"
+#include "creator_randomdataparser.h"
+
+//class CCreatorAppUi;
+class TCommand;
+class CCreatorBrowser;
+class CCreatorCalendarBase;
+class CCreatorNotepad;
+class CCreatorLogs;
+//class CCreatorAccessPoints;
+class CCreatorMailboxes;
+class CCreatorIMPS;
+class CCreatorFiles;
+class CCreatorMessages;
+class CCreatorLandmarks;
+class MCreatorModuleBase;
+class CCreatorPhonebookBase;
+class CCreatorModuleBaseParameters;
+//class CCreatorConnectionSettingsBase;
+class CDictionaryFileStore;
+class CImageDecoder;
+class CFbsBitmap;
+class CBitmapScaler;
+class CCommandParser;
+class EngineWrapper;
+class CCreatorCmdScriptRun;
+
+static const TUid KUidCreatorApp = {0x20011383};
+
+enum TListQueryId
+	{
+	R_GROUP_CREATION_TYPE_QUERY,
+	R_CONTACT_CREATION_TYPE_QUERY,
+	R_MESSAGE_TYPE_QUERY,
+	R_FOLDER_TYPE_QUERY,
+	R_UNREAD_QUERY,
+	R_ATTACHMENT_MULTI_SELECTION_QUERY,
+	R_AMS_ATTACHMENT_SINGLE_SELECTION_QUERY,
+	R_ATTACHMENT_SINGLE_SELECTION_QUERY
+	};
+
+/*
+ * Interface for UI dialogs
+ */
+class MUIObserver
+    {
+public:
+    /**
+     * Called when some dialog in UI is closed
+     *
+     * @since S60 10.1
+     * @param aPositiveAction ETrue if "Ok", "Yes" or other "positive" button was pressed
+     * @param aUserData number that was passed to UI before dialog was opened
+     * @return None.
+     */
+    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData) = 0;
+
+    };
+
+/*
+ * Interface for CCommandParser
+ */
+class MCommandParserObserver
+    {
+public:
+    /**
+     * Called when CCommandParser user has choosen script file
+     *
+     * @since S60 10.1
+     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
+     * @param aFileName filename chosen by user
+     * @return None.
+     */
+    virtual void ScriptChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC) = 0;
+
+    /**
+     * Called when CCommandParser user has choosen random data file
+     *
+     * @since S60 10.1
+     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
+     * @param aFileName filename chosen by user
+     * @return None.
+     */
+    virtual void RandomDataFileChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC) = 0;
+    };
+
+/**
+ * Device memory information
+ */
+class TMemoryDetails
+	{
+public:
+	
+	TBuf<16> iFree;
+	TBuf<16> iSize;
+	TChar iDriveLetter;
+
+    TBuf<16> iRamFree;
+    TBuf<16> iRomFree;
+    
+	TBool    iENotAvailable;
+
+	TBuf<16> iRamSize;
+	TBuf<16> iRomSize;
+	};
+// Common constant for undefined integer value:
+const TInt KUndef = KErrNotFound;
+
+class CCreatorEngine : public CActive, public MUIObserver, public MCommandParserObserver
+	{
+enum ECreatorEngineState{
+    ECreatorEngineDeleteAllEntries,
+    ECreatorEngineDeleteAllCreatorEntries,
+};
+public:
+    
+    enum TRandomStringType
+        {
+        EFirstName = 0,
+        ESurname,
+        ECompany,
+        EAddress,
+        EJobTitle,
+        EPhoneNumber,
+        EGroupName,
+        EMeetingReason,
+        EMeetingPlace,
+        EMemoText,
+        EAnniversaryReason,
+        EToDoText,
+        EReminderText,
+        EMessageSubject,
+        EMessageText,
+        ECity,
+        ECountry,
+        EPostcode,        
+        EState,
+        EPobox,
+        EPrefix,
+        ESuffix,
+        ELandmarkName,
+        ELandmarkDescription
+        };
+
+
+// note! changing order will cause regression in other modules
+
+    enum TTestDataPath
+        {
+        EJPEG_25kB = 0,
+        EJPEG_200kB,
+        EJPEG_500kB,
+        EPNG_15kB,
+        EGIF_2kB,
+        ERNG_1kB,
+        EMIDI_10kB,
+        EWAVE_20kB,
+        EAMR_20kB,
+        EExcel_15kB,
+        EWord_20kB,
+        EPowerPoint_40kB,
+        EText_10kB,
+        EText_70kB,
+        E3GPP_70kB,
+        EMP3_250kB,
+        EAAC_100kB,
+        ERM_95kB,
+        EBMP_25kB,
+        EHTML_20kB,
+        EJAD_1kB,
+        EJAR_10kB,
+        EJP2_65kB,
+        EMP4_200kB,
+        EMXMF_40kB,
+        ERAM_1kB,
+        ESVG_15kB,
+        ESWF_15kB,
+        ETIF_25kB,
+        EVCF_1kB,
+        EVCS_1kB,
+        ESISX_10kB,
+        EWMA_50kB,
+        EWMV_200kB,
+        ESavedDeck_1kB,
+        LAST_FILE_ID//When you add new items to enum, add them before last item, so random number generations does not need to be updated also         
+        };
+        
+    enum TRandomDateType
+        {
+        EDatePast,
+        EDateFuture    
+        };
+
+public:
+    /**
+     * Constructor: NewL
+     */
+    static CCreatorEngine* NewL(EngineWrapper *aEngineWrapper);
+    /**
+     * Constructor: NewLC
+     */
+    static CCreatorEngine* NewLC(EngineWrapper *aEngineWrapper);	
+    ~CCreatorEngine();
+	
+    inline const RPointerArray<TMemoryDetails>& GetMemoryDetailsList(){ return iMemoryDetailsList; };
+	inline const TMemoryDetails& GetMemoryDetails(){ return iMemoryDetails; };
+	inline EngineWrapper* GetEngineWrapper(){ return iEngineWrapper; };
+	inline CCreatorPhonebookBase* GetPhonebook(){ return  iPhonebook; };
+	
+private:
+    CCreatorEngine();
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL(EngineWrapper *aEngineWrapper);
+	
+	void RequestMemoryDetails();
+    TBool MMC_OK() const;
+    void Init();
+    void RunL();
+    TInt RunError(TInt aError);
+    void DoCancel();
+
+    void ExecuteCommand();
+    void StartEnginesL();
+    void CheckForMoreCommandsL();
+    
+    TBool IsDeleteCommand( TInt aCommand );
+    
+    TInt ReadRandomDataL(const TRandomStringType aRandomStringType,
+    		             const TInt aResourceId,
+    		             const TDesC& aFilename,
+    		             const CCreatorRandomDataParser::TRandomDataType aRandomDataType);
+    void GenerateSourceImageFileL( const TTestDataPath aFileType, const TDesC& aFileName );
+    void GenereteSourceTextFileL( const TDesC& aFileName, TInt aSize );
+
+public: // from MUIObserver
+    /**
+     * Called when some dialog in UI is closed
+     *
+     * @since S60 10.1
+     * @param aPositiveAction ETrue if "Ok", "Yes" or other "positive" button was pressed
+     * @param aUserData number that was passed to UI before dialog was opened
+     * @return ?description
+     */
+    virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData);
+    
+public: // from MCommandParserObserver
+    /**
+     * Called when CCommandParser user has choosen script file
+     *
+     * @since S60 10.1
+     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
+     * @param aFileName filename chosen by user
+     * @return None.
+     */
+    virtual void ScriptChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC);
+    
+    /**
+     * Called when CCommandParser user has choosen random data file
+     *
+     * @since S60 10.1
+     * @param aSuccess ETrue if "Ok", "Yes" or other "positive" button was pressed
+     * @param aFileName filename chosen by user
+     * @return None.
+     */
+    virtual void RandomDataFileChosenL(TBool aSuccess, const TDesC& aFileName = KNullDesC);
+    
+public:
+    void ExecuteOptionsMenuCommandL(TInt aCommand);
+    void RunScriptL();
+    TInt RunScriptL(const TDesC& aScriptFile);
+    void ShutDownEnginesL();
+    void ExecuteFirstCommandL(const TDesC& aText);
+    
+    void AppendToCommandArrayL(TInt aCommand, CCreatorModuleBaseParameters* aParameters, TInt aNumberOfEntries = 1);
+    TInt CommandArrayCount();
+ 
+    TPtrC TestDataPathL(enum TTestDataPath aTestDataPath);
+    TPtrC RandomSoundFileL(); // Returns temporary path, which will be removed on shutdown 
+    void RandomPictureFileL(TDes& aPath);  // aPath temporary path, which will be removed on shutdown
+    TPtrC CreateRandomSoundFileL(); // Copies file to new location and returns the new path
+    TPtrC CreateSoundFileL(TTestDataPath aId); // Copies file to new location and returns the new path
+    
+    void CopyFileL(const TFileName& aSourceFile, const TFileName& aTargetFile, TBool aOverwrite = EFalse );
+    /*
+     * Gets attacment file id based on the file id string
+     * @return Attachment file id
+     * @param aAttachmentIdStr Attachment file id string
+     */
+    TInt GetAttachmentIdL( const TDesC& aAttachmentIdStr ) const;    
+
+    TUint32 GetDefaultIAPL();
+    TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse );
+
+    TPtrC RandomString(enum TRandomStringType aRandomStringType);    
+    TInt RandomNumber(TInt aRange);
+    TInt RandomNumber(TInt aMin, TInt aMax);
+    TTime RandomDate(TRandomDateType type, TInt aMinDays = 0, TInt aMaxDays = 360 );
+    TTime RandomDate(TTime baseTime, TRandomDateType type, TInt aMinDays = 0, TInt aMaxDays = 360);  
+    TTime RandomTime(TTime baseTime, TRandomDateType type, TInt aMinHours=0, TInt aMaxHours=24, TInt aMinMinutes=0, TInt aMaxMinutes=60 );
+    CDesCArrayFlat* SoundFilesL();
+    CDesCArrayFlat* PictureFilesL();
+    
+    HBufC* CreateEmailAddressLC();
+    HBufC* CreateHTTPUrlLC();
+    HBufC* CreateRandomStringLC(TInt aStrLen);
+    
+    HBufC* CreateEmailAddressLC(
+            const TDesC& firstname,
+            const TDesC& lastname,
+            const TDesC& domain,
+            const TDesC& country ) const;
+    
+    HBufC* CreateUrlLC(
+            const TDesC& protocol,
+            const TDesC& prefix,
+            const TDesC& domain,
+            const TDesC& country) const;
+    
+    void SetDefaultPathForFileCommandL(TInt aCommand, TFileName& aPath);
+
+    TBool GetRandomDataL();
+    TBool GetRandomDataFromFileL(const TDesC& aFilename);
+    void CancelComplete();
+    CDictionaryFileStore* FileStoreLC();
+    void ReadEntryIdsFromStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid );
+    void WriteEntryIdsToStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid );
+    void ReadEntryIdsFromStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid );
+    void WriteEntryIdsToStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid );
+    void RemoveStoreL( const TUid aModuleUid );
+	void ProgressDialogCancelledL();
+	
+	void SortCommands();
+    
+private:
+    // needed by the engine itself
+    RTimer iTimer;
+    CEikonEnv* iEnv;
+    //CCreatorAppUi* iAppUi;
+    TInt iCurrentEntry;
+    TInt iFailedCommands;
+
+    CDesCArrayFlat* iSoundFileArray;
+    CDesCArrayFlat* iPictureFileArray;
+    CCommandArray* iCommandArray;
+    RPointerArray<CCreatorModuleBaseParameters> iParameterArray;
+    // progress bar
+    //CAknProgressDialog* iProgressDialog;
+    //CEikProgressInfo* iProgressInfo;
+        
+    // for the random data generator
+    TInt64 iSeed;
+    
+    class TStringArrayPtr
+        {
+        public:
+        TStringArrayPtr(TRandomStringType aType, CDesCArray* aPtr)
+            {
+            iStringType = aType;
+            iArrayPtr = aPtr;
+            };
+        TRandomStringType iStringType;
+        CDesCArray* iArrayPtr;
+        }; 
+    
+    RArray<TStringArrayPtr> iStringArrays;
+    
+    // modules
+    CCreatorBrowser* iBrowser;
+    CCreatorCalendarBase* iCalendar;
+    CCreatorPhonebookBase* iPhonebook;
+    CCreatorNotepad* iNotepad;
+    CCreatorLogs* iLogs;
+//    CCreatorConnectionSettingsBase* iAccessPoints;
+    CCreatorMailboxes* iMailboxes;
+    CCreatorIMPS* iIMPS;
+    CCreatorFiles* iFiles;
+    CCreatorMessages* iMessages;
+    CCreatorLandmarks* iLandmarks;
+	CCreatorCmdScriptRun* iCmdScriptRun;
+	CCommandParser* iCommandParser;
+
+    // options menu command home module
+    MCreatorModuleBase* iUsedOptionsMenuModule;
+    
+    HBufC* iTempPath;
+    
+    RPointerArray<HBufC> iAllocatedFilePaths;
+    TBool iUserCancelled;
+    
+    // For generating missing bitmaps
+    HBufC8* iBitmapData;
+    CFbsBitmap* iBitmap;
+    CFbsBitmap* iScaledBitmap;
+    CImageDecoder* iDecoder;
+    TFrameInfo iFrameinfo;
+    CImageEncoder* iEncoder;
+    CFrameImageData* iFrameImageData;
+    CBitmapScaler* iScaler;
+
+    EngineWrapper* iEngineWrapper; // Enginewrapper that is used for communicating between QT and Symbian
+	TMemoryDetails iMemoryDetails;
+	
+	RPointerArray<TMemoryDetails> iMemoryDetailsList;
+	
+	TInt iResourceFileId;
+
+	HBufC* iCommandLineScriptName;
+	HBufC* iCommandLineRandomDataFileName;
+	};
+
+// this class contains a command which will be executed
+class TCommand
+    {
+public:
+    TInt iCommandId;
+    CCreatorModuleBaseParameters* iParameters;
+public:
+    TCommand(TInt aCommandId, CCreatorModuleBaseParameters* aParameters);
+    ~TCommand();
+
+    };
+
+
+// utility class for waiting for asychronous requests
+class CAsyncWaiter : public CActive
+	{
+public:
+	static CAsyncWaiter* NewL( TInt aPriority = EPriorityStandard );
+	static CAsyncWaiter* NewLC( TInt aPriority = EPriorityStandard );
+	~CAsyncWaiter();
+	
+	void StartAndWait();
+	TInt Result() const;
+	
+private:
+	CAsyncWaiter( TInt aPriority );
+	
+	// from CActive
+	void RunL();
+	void DoCancel();
+	
+private:
+    CActiveSchedulerWait iWait;
+	TInt iError;
+    };
+	
+	
+/*
+ * Maps file id string (file name) to TTestDataPath (file id) and TCreatorIds (command id)
+ */
+// File ids:
+	
+	_LIT(K3GPP_70KB, "3GPP-70kB");
+	_LIT(KAAC_100KB, "AAC-100kB");
+	_LIT(KAMR_20KB, "AMR-20kB");
+	_LIT(KXLS_15KB, "XLS-15kB");
+	_LIT(KGIF_2KB, "GIF-2kB");
+	_LIT(KJPEG_200KB, "JPEG-200kB");
+	_LIT(KJPEG_25KB, "JPEG-25kB");
+	_LIT(KJPEG_500KB, "JPEG-500kB");
+	_LIT(KMIDI_10KB, "MIDI-10kB");
+	_LIT(KMP3_250KB, "MP3-250kB");
+	_LIT(KPNG_15KB, "PNG-15kB");
+	_LIT(KPPT_40KB, "PPT-40kB");
+	_LIT(KRM_95KB, "RM-95kB");
+	_LIT(KRNG_1KB, "RNG-1kB");
+	_LIT(KTXT_10KB, "TXT-10kB");
+	_LIT(KTXT_70KB, "TXT-70kB");
+	_LIT(KWAV_20KB, "WAV-20kB");
+	_LIT(KDOC_20KB, "DOC-20kB");
+	_LIT(KSWF_15KB, "SWF-15kB");
+	_LIT(KJAD_1KB, "JAD-1kB");
+	_LIT(KJAR_10KB, "JAR-10kB");
+	_LIT(KTIF_25KB, "TIF-25kB");
+	_LIT(KMXMF_40KB, "MXMF-40kB");
+	_LIT(KBMP_25KB, "BMP-25kB");
+	_LIT(KJP2_25KB, "JP2-25kB");
+	_LIT(KSVG_15KB, "SVG-15kB");
+	_LIT(KHTML_20KB, "HTML-20kB");
+	_LIT(KVCF_1KB, "VCF-1kB");
+	_LIT(KVCS_1KB, "VCS-1kB");
+	_LIT(KMP4_200KB, "MP4-200kB");
+	_LIT(KSISX_10KB, "SISX-10kB");
+	_LIT(KRAM_1KB, "RAM-1kB");
+    _LIT(KDECK_1KB, "DECK-1kB");
+    _LIT(KWMA_50KB, "WMA-50kB");
+    _LIT(KWMV_200KB, "WMV-200kB");
+	
+class FileMapping
+    {
+	public:
+	FileMapping(const TDesC& aFileName, TInt aFileId, TInt aCommandId );
+	const TDesC& FileName() const;
+	TInt FileId() const;
+	TInt CommandId() const;
+
+	private:
+	const TDesC& iFileName;
+	TInt  iFileId;
+	TInt  iCommandId;
+	};
+	
+	/*
+	 * This table contains the string <-> TTestDataPath mappings for the file types
+	 */
+	static FileMapping FileMap[] = 
+	    {
+      
+	    FileMapping(K3GPP_70KB, CCreatorEngine::E3GPP_70kB, ECmdCreateFileEntry3GPP_70kB),
+	    FileMapping(KAAC_100KB, CCreatorEngine::EAAC_100kB, ECmdCreateFileEntryAAC_100kB),
+	    FileMapping(KAMR_20KB, CCreatorEngine::EAMR_20kB, ECmdCreateFileEntryAMR_20kB),
+	    FileMapping(KXLS_15KB, CCreatorEngine::EExcel_15kB, ECmdCreateFileEntryXLS_15kB),
+	    FileMapping(KGIF_2KB, CCreatorEngine::EGIF_2kB, ECmdCreateFileEntryGIF_2kB),
+	    FileMapping(KJPEG_200KB, CCreatorEngine::EJPEG_200kB, ECmdCreateFileEntryJPEG_200kB),
+	    FileMapping(KJPEG_25KB, CCreatorEngine::EJPEG_25kB, ECmdCreateFileEntryJPEG_25kB),
+	    FileMapping(KJPEG_500KB, CCreatorEngine::EJPEG_500kB, ECmdCreateFileEntryJPEG_500kB),
+	    FileMapping(KMIDI_10KB, CCreatorEngine::EMIDI_10kB, ECmdCreateFileEntryMIDI_10kB),
+	    FileMapping(KMP3_250KB, CCreatorEngine::EMP3_250kB, ECmdCreateFileEntryMP3_250kB),
+	    FileMapping(KPNG_15KB, CCreatorEngine::EPNG_15kB, ECmdCreateFileEntryPNG_15kB),
+	    FileMapping(KPPT_40KB, CCreatorEngine::EPowerPoint_40kB, ECmdCreateFileEntryPPT_40kB),
+	    FileMapping(KRM_95KB, CCreatorEngine::ERM_95kB, ECmdCreateFileEntryRM_95kB),
+	    FileMapping(KRNG_1KB, CCreatorEngine::ERNG_1kB, ECmdCreateFileEntryRNG_1kB),
+	    FileMapping(KTXT_10KB, CCreatorEngine::EText_10kB, ECmdCreateFileEntryTXT_10kB),
+	    FileMapping(KTXT_70KB, CCreatorEngine::EText_70kB, ECmdCreateFileEntryTXT_70kB),
+	    FileMapping(KWAV_20KB, CCreatorEngine::EWAVE_20kB, ECmdCreateFileEntryWAV_20kB),
+	    FileMapping(KDOC_20KB, CCreatorEngine::EWord_20kB, ECmdCreateFileEntryDOC_20kB),
+	    FileMapping(KBMP_25KB, CCreatorEngine::EBMP_25kB, ECmdCreateFileEntryBMP_25kB),
+	    FileMapping(KDECK_1KB, CCreatorEngine::ESavedDeck_1kB, ECmdCreateFileEntryDeck_1kB),
+	    FileMapping(KHTML_20KB, CCreatorEngine::EHTML_20kB, ECmdCreateFileEntryHTML_20kB),
+	    FileMapping(KJAD_1KB, CCreatorEngine::EJAD_1kB, ECmdCreateFileEntryJAD_1kB),
+	    FileMapping(KJAR_10KB, CCreatorEngine::EJAR_10kB, ECmdCreateFileEntryJAR_10kB),
+	    FileMapping(KJP2_25KB, CCreatorEngine::EJP2_65kB, ECmdCreateFileEntryJP2_65kB),
+	    FileMapping(KMP4_200KB, CCreatorEngine::EMP4_200kB, ECmdCreateFileEntryMP4_200kB),
+	    FileMapping(KMXMF_40KB, CCreatorEngine::EMXMF_40kB, ECmdCreateFileEntryMXMF_40kB),
+	    FileMapping(KRAM_1KB, CCreatorEngine::ERAM_1kB, ECmdCreateFileEntryRAM_1kB),
+	    FileMapping(KSVG_15KB, CCreatorEngine::ESVG_15kB, ECmdCreateFileEntrySVG_15kB),
+	    FileMapping(KSWF_15KB, CCreatorEngine::ESWF_15kB, ECmdCreateFileEntrySWF_15kB),
+	    FileMapping(KTIF_25KB, CCreatorEngine::ETIF_25kB, ECmdCreateFileEntryTIF_25kB),
+	    FileMapping(KVCF_1KB, CCreatorEngine::EVCF_1kB, ECmdCreateFileEntryVCF_1kB),
+	    FileMapping(KVCS_1KB, CCreatorEngine::EVCS_1kB, ECmdCreateFileEntryVCS_1kB),
+	    FileMapping(KSISX_10KB, CCreatorEngine::ESISX_10kB, ECmdCreateFileEntrySISX_10kB),
+	    FileMapping(KWMA_50KB, CCreatorEngine::EWMA_50kB, ECmdCreateFileEntryWMA_50kB),
+	    FileMapping(KWMV_200KB, CCreatorEngine::EWMV_200kB, ECmdCreateFileEntryWMV_200kB)
+	    };
+
+#endif // __CREATORENGINE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/inc/enginewrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,168 @@
+/*
+* 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 ENGINEWRAPPER_H
+#define ENGINEWRAPPER_H
+
+#include <e32std.h>
+#include <e32base.h>
+#include <badesca.h>
+#include <engine.h>
+
+#include <QObject> // for iProgressNote signal connect
+
+
+class MainView;
+class MemoryDetails;
+class HbProgressDialog;
+class HbPopup;
+class HbCommonNote;
+class HbAction;
+
+
+/**
+ * class that is used for communicating between Symbian and Qt code.
+ */
+class EngineWrapper : public QObject
+ { 
+	Q_OBJECT
+
+public:
+    
+    /**
+     * Constructor
+     */
+    EngineWrapper();
+    
+    /**
+     * Destructor
+     */
+    ~EngineWrapper();
+    
+    /**
+     * Initializes Engine Wrapper
+     * @return true if engine was started successfully
+     */
+    bool init();
+	
+	/**
+	* Get memory details
+	*/
+	MemoryDetails GetMemoryDetails();
+	
+	/**
+	 * Get memory details list
+	 */
+	QList<MemoryDetails> GetMemoryDetailsList();
+	
+public: 
+    
+    /* Functions that are called from UI */
+	bool ExecuteOptionsMenuCommand(int commandId);
+
+    
+public:
+
+    /* Functions that are called from engine: */
+    
+	/** 
+     * uses Notifications class to show error message 
+     */
+    void ShowErrorMessage(const TDesC& aErrorMessage);
+
+    /**
+     * uses Notifications class to show progressbar
+     */
+    void ShowProgressBar(const TDesC& aPrompt, int aMax);
+	
+	/**
+	* uses Notifications class to show user note
+	*/
+	void ShowNote(const TDesC& aNoteMessage, TInt aResourceId = 0);
+    
+    /**
+     * increments shown progressbar's value
+     */
+    void IncrementProgressbarValue();
+    
+    /**
+     * closes progressbar
+     */
+    void CloseProgressbar();	
+	
+	/**
+	* Create entries query dialog
+	*/
+	TBool EntriesQueryDialog(TInt* aNumberOfEntries, const TDesC& aPrompt, TBool aAcceptsZero, MUIObserver* aObserver, TInt aUserData);
+
+	/**
+	* Create time query dialog
+	*/    
+    TBool TimeQueryDialog(TTime* aTime, const TDesC& aPrompt, MUIObserver* aObserver, TInt aUserData);
+
+	/**
+	* Create yes or no query dialog
+	*/    
+    TBool YesNoQueryDialog(const TDesC& aPrompt, MUIObserver* aObserver, int userData);
+	
+	/**
+	* Popup list dialog for selecting item from dialog list
+	*/
+	TBool PopupListDialog(const TDesC& aPrompt, const CDesCArray* aFileNameArray, TInt* aIndex, MUIObserver* aObserver, TInt aUserData); 
+	
+	/**
+	* Directory query dialog
+	*/
+	TBool DirectoryQueryDialog(const TDesC& aPrompt, TDes& aDirectory, MUIObserver* aObserver, TInt aUserData);
+	
+	/**
+	* Create list query single-selection dialog
+	*/
+	TBool ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, TInt* aSeletedItem, MUIObserver* aObserver, TInt aUserData);
+
+	/**
+	* Create list query multi-selection dialog
+	*/
+	TBool ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* aObserver, TInt aUserData);
+	
+	
+	/**
+	* Close application when started from command line for script run.
+	*/
+	void CloseCreatorApp();
+
+private slots:
+	
+	/**
+	* progress dialog cancelled
+	*/
+	void ProgressDialogCancelled();
+	
+private:
+    
+    
+    /* Creator engine */
+    CCreatorEngine* iEngine;
+    
+    /* progress dialog that is shown */
+    HbProgressDialog* iProgressDialog;
+    
+    MCreatorModuleBase *iModule;
+};
+
+#endif //ENGINEWRAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/inc/mainview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,201 @@
+/*
+* 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 MAINVIEW_H
+#define MAINVIEW_H
+
+#include <hbview.h>
+#include <enginewrapper.h>
+
+class HbMainWindow;
+class HbApplication;
+class HbAction;
+class QSignalMapper;
+
+class MemoryDetails
+{
+public:
+	QString 		mFree;
+	QString			mSize;
+	QString			mDriveLetter;
+	
+    QString         mRamFree;
+	bool			mENotAvailable;
+	QString         mRamSize;
+};
+
+/**
+ * Class that implements the main view of Creator
+ */
+class MainView : public HbView
+{
+    Q_OBJECT
+    
+public:
+    
+    /**
+     * Constructor
+     */
+    MainView(HbMainWindow &mainWindow);
+    
+    /**
+     * Destructor
+     */
+	~MainView();
+
+	/**
+     * Initializes Engine Wrapper
+     * @param app application class of Creator
+     */
+    void init(HbApplication &app);
+	
+	/**
+	* Call application exit from engine.
+	*/
+	static void closeApp();
+
+private:
+    
+    /**
+     * Creates menu
+     */
+    void createMenu(HbApplication &app);
+    
+    /**
+     * Creates memory info text to UI
+     */
+    void createMemoryInfoText();
+    
+private slots:
+
+    
+    /**
+     * Shows about pop-up
+     */
+    void showAboutPopup();
+	/**
+	* calls engine wrapper to complete service request, specified with commandId.
+	*/
+	void executeMenuCommand(int cmd);
+  
+private:
+    
+    /* Main window of Creator */
+    HbMainWindow &mMainWindow;
+    
+   
+    /* Engine Wrapper */
+    EngineWrapper mEngineWrapper;
+    
+    /* Actions that are used in toolbars and menus */
+	HbAction* mActionRunScript;
+	HbAction* mActionCalendarAppointments;
+	HbAction* mActionCalendarEvents;
+	HbAction* mActionCalendarAnniversaries;
+	HbAction* mActionCalendarTodos;
+	HbAction* mActionCalendarReminders;	
+	HbAction* mActionBrowserBookmark;
+	HbAction* mActionBrowserBmarkFolder;
+	HbAction* mActionLogsMissedCalls;
+	HbAction* mActionLogsReceivedCalls;
+	HbAction* mActionLogsDialledNumbers;
+	HbAction* mActionMessageMailboxes;
+	HbAction* mActionMessages;
+	HbAction* mActionFilesJpeg25;
+	HbAction* mActionFilesJpeg200;
+	HbAction* mActionFilesJpeg500;
+	HbAction* mActionFilesPng15;
+	HbAction* mActionFilesGif2;
+	HbAction* mActionFilesBmp25;
+	HbAction* mActionFilesJp265;
+	HbAction* mActionFilesSvg15;
+	HbAction* mActionFilesTif25;
+	HbAction* mActionFilesRng1;
+	HbAction* mActionFilesMidi10;
+	HbAction* mActionFilesWave20;
+	HbAction* mActionFilesAmr20;
+	HbAction* mActionFilesExcel15;
+	HbAction* mActionFilesWord20;
+	HbAction* mActionFilesPPoint40;
+	HbAction* mActionFilesText10;
+	HbAction* mActionFilesText70;
+	HbAction* mActionFilesHtml20;
+	HbAction* mActionFilesMxmf40;
+	HbAction* mActionFilesRam1;
+	HbAction* mActionFilesJad1;
+	HbAction* mActionFilesJar10;
+	HbAction* mActionFilesVcf1;
+	HbAction* mActionFilesVcs1;
+	HbAction* mActionFilesSisx10;
+	HbAction* mActionFiles3Gpp70;
+	HbAction* mActionFilesMp3250;
+	HbAction* mActionFilesAAC100;
+	HbAction* mActionFilesSwf15;
+	HbAction* mActionFilesMp4200;
+	HbAction* mActionFilesRm95;
+	HbAction* mActionFilesWma50;
+	HbAction* mActionFilesWmv200;
+	HbAction* mActionPhonebookContacts;
+	HbAction* mActionPhonebookGroups;
+	HbAction* mActionBrowserSavedPages;
+	HbAction* mActionBrowserSavedPageFolders;
+	HbAction* mActionFilesEmptyFolder;
+	HbAction* mActionMiscConnection;
+	HbAction* mActionMiscImps;
+	HbAction* mActionMiscNotes;
+	HbAction* mActionMiscLandmarks;
+    HbAction* mActionAbout;
+    HbAction* mActionExit;
+	HbAction* mActionDeleteAllItems;
+	HbAction* mActionDeleteCreatorItems;
+	HbAction* mActionSelectRandomFile;
+	HbAction* mActionDeleteCalAllItems;
+	HbAction* mActionDeleteCalCreatorItems;
+	HbAction* mActionDeleteBookmarkAllItems;
+	HbAction* mActionDeleteBookmarkCreatorItems;
+	HbAction* mActionDeleteBookmarkFolderAllItems;
+	HbAction* mActionDeleteBookmarkFolderCreatorItems;
+	HbAction* mActionDeleteSavedPagesAllItems;
+	HbAction* mActionDeleteSavedPagesCreatorItems;
+	HbAction* mActionDeleteSavedPagesFolderAllItems;
+	HbAction* mActionDeleteSavedPagesFolderCreatorItems;
+	HbAction* mActionDeleteFiles;
+	HbAction* mActionDeleteLogsAll;
+	HbAction* mActionDeleteLogsByCreator;
+	HbAction* mActionDeleteMessagesAll;
+	HbAction* mActionDeleteMessagesByCreator;
+	HbAction* mActionDeleteConnMethsAll;
+	HbAction* mActionDeleteConnMethsByCreator;
+	HbAction* mActionDeleteImpsAll;
+	HbAction* mActionDeleteImpsByCreator;
+	HbAction* mActionDeleteNotes;
+	HbAction* mActionDeleteLandmarksAll;
+	HbAction* mActionDeleteLandmarksByCreator;
+	HbAction* mActionDeleteContactsAll;
+	HbAction* mActionDeleteContactsByCreator;
+	HbAction* mActionDeleteContactGroupsAll;
+	HbAction* mActionDeleteContactGroupsByCreator;
+	
+	
+	MemoryDetails mMemoryDetails;
+	QList<MemoryDetails> mMemoryDetailsList;
+    // signal mapper
+    QSignalMapper *mSm;    
+};
+
+#endif // MAINVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/inc/notifications.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,149 @@
+/*
+* 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 NOTIFICATIONS_H_
+#define NOTIFICATIONS_H_
+
+#include <hbmessagebox.h>
+#include <hbselectiondialog.h>
+#include <hbinputdialog.h>
+
+#include "engine.h"
+
+#include <stdexcept>
+
+class HbProgressDialog;
+class HbPopup;
+
+class Notifications : public HbPopup
+    {
+
+	Q_OBJECT 	
+	
+public:
+    /**
+     * shows massage box
+     */
+	static void showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout );
+	
+    /**
+     * shows about box
+     */
+    static void about();
+    
+    /** 
+     * shows error message 
+     */
+    static void error(const QString& errorMessage);
+	
+	/**
+     * to shows progressbar
+     */
+	static HbProgressDialog* showProgressBar(const QString& text, int max);
+	
+    /**
+     * shows global HbGlobalCommonNote type note
+     */
+	static void showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, int timeout = 1000 );
+    };
+
+class CreatorDialog
+{
+    Q_DISABLE_COPY(CreatorDialog)
+protected:
+    CreatorDialog(MUIObserver* observer, int userData) throw(std::exception) : mObserver(observer), mUserData(userData)
+        {
+            if(!mObserver)
+                throw std::invalid_argument("module cannot be the null!");
+        };
+protected:
+    virtual void NotifyObserver(TBool aPositiveAction)
+        {
+        TRAPD( err, mObserver->QueryDialogClosedL(aPositiveAction, mUserData) );
+        if(err)
+            {
+            Notifications::error( QString("Symbian Leave: %1 ").arg(err) );
+            }
+        }
+    
+protected:
+    MUIObserver* mObserver;
+    int mUserData;
+};
+
+class CreatorYesNoDialog : public HbMessageBox, public CreatorDialog
+{
+    Q_DISABLE_COPY(CreatorYesNoDialog)
+    Q_OBJECT
+public:
+    static void launch(const QString& text, const QString& label, MUIObserver* observer, int userData) throw( std::exception );
+protected:
+    CreatorYesNoDialog(MUIObserver* observer, int userData);
+protected slots:
+    void DialogClosed(HbAction*);
+};
+
+class CreatorInputDialog : public HbInputDialog, public CreatorDialog
+{
+    Q_DISABLE_COPY(CreatorInputDialog)
+    Q_OBJECT
+public:
+    static void launch(const QString& label, int* value, bool acceptZero,  MUIObserver* observer, int userData) throw( std::exception );
+    static void launch(const QString& label, TDes& value,  MUIObserver* observer, int userData) throw( std::exception );
+protected:
+    CreatorInputDialog(int* value, MUIObserver* observer, int userData);
+    CreatorInputDialog(TDes& value, MUIObserver* observer, int userData);
+protected slots:
+    void DialogClosed(HbAction*);
+private:
+    int *mIntValue;
+    TDes& mStrValue;
+    TBuf<1> mDummy;
+};
+
+class CreatorSelectionDialog : public HbSelectionDialog, public CreatorDialog
+{
+    Q_DISABLE_COPY(CreatorSelectionDialog)
+    Q_OBJECT
+public:
+    static void launch(const QString& label, const QStringList& items, TInt* selectedItem, MUIObserver* observer, int userData) throw( std::exception );
+    static void launch(const QString& label, const QStringList& items, CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* observer, int userData) throw( std::exception );
+protected:
+    CreatorSelectionDialog(TInt* selectedItem, MUIObserver* observer, int userData) throw( std::exception );
+    CreatorSelectionDialog(CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* observer, int userData) throw( std::exception );
+protected slots:
+    void DialogClosed(HbAction*);
+private:
+    TInt* mSelectedItem;
+    CArrayFixFlat<TInt>* mSelectedItems;
+};
+
+class CreatorDateTimeDialog : public HbDialog, public CreatorDialog
+{
+    Q_DISABLE_COPY(CreatorDateTimeDialog)
+    Q_OBJECT
+public:
+    static void launch(const QString& label, TTime* value, MUIObserver* observer, int userData) throw( std::exception );
+protected:
+    CreatorDateTimeDialog(TTime* value, MUIObserver* observer, int userData);
+protected slots:
+    void DialogClosed(HbAction*);
+private:
+    TTime *mValue;
+};
+#endif // NOTIFICATIONS_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/rom/creator.iby	Mon Oct 18 16:30:05 2010 +0300
@@ -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:  
+*
+*/
+
+
+#ifndef __CREATOR_IBY__
+#define __CREATOR_IBY__
+
+S60_APP_EXE(Creator)
+S60_APP_RESOURCE(Creator)
+S60_APP_RESOURCE(datacreator)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,Creator)
+
+data=ZPRIVATE\10003a3f\import\APPS\Creator_reg.RSC Private\10003a3f\import\Apps\Creator_reg.rsc 
+//#ifdef S60_UPGRADABLE_APP_REG_RSC
+//  S60_UPGRADABLE_APP_REG_RSC(Creator)
+//#else
+//  S60_APP_AIF_RSC(Creator)
+//#endif
+
+data=ZPRIVATE\20011383\backup_registration.xml        	private\20011383\backup_registration.xml
+data=ZSYSTEM\Install\Creator_stub.sis                   \system\install\Creator_stub.sis
+
+// test files (remove largest files if running out of ROM space):
+data=ZPRIVATE\20011383\3GPP-70kB.3gpp                   private\20011383\3GPP-70kB.3gpp
+data=ZPRIVATE\20011383\AAC-100kB.aac                    private\20011383\AAC-100kB.aac
+data=ZPRIVATE\20011383\AMR-20kB.amr                     private\20011383\AMR-20kB.amr
+data=ZPRIVATE\20011383\Deck-1kB.saveddeck               private\20011383\Deck-1kB.saveddeck
+data=ZPRIVATE\20011383\DOC-20kB.doc                     private\20011383\DOC-20kB.doc
+data=ZPRIVATE\20011383\HTML-20kB.html                   private\20011383\HTML-20kB.html
+data=ZPRIVATE\20011383\JAD-1kB.jad                      private\20011383\JAD-1kB.jad
+data=ZPRIVATE\20011383\JAR-10kB.jar                     private\20011383\JAR-10kB.jar
+data=ZPRIVATE\20011383\JP2-65kB.jp2                     private\20011383\JP2-65kB.jp2
+data=ZPRIVATE\20011383\MIDI-10kB.mid                    private\20011383\MIDI-10kB.mid
+data=ZPRIVATE\20011383\MP3-250kB.mp3                    private\20011383\MP3-250kB.mp3
+data=ZPRIVATE\20011383\MP4-200kB.mp4                    private\20011383\MP4-200kB.mp4
+data=ZPRIVATE\20011383\MXMF-40kB.mxmf                   private\20011383\MXMF-40kB.mxmf
+data=ZPRIVATE\20011383\PNG-15kB.png                     private\20011383\PNG-15kB.png
+data=ZPRIVATE\20011383\PPT-40kB.ppt                     private\20011383\PPT-40kB.ppt
+data=ZPRIVATE\20011383\RAM-1kB.ram                      private\20011383\RAM-1kB.ram
+data=ZPRIVATE\20011383\RM-95kB.rm                       private\20011383\RM-95kB.rm
+data=ZPRIVATE\20011383\RNG-1kB.rng                      private\20011383\RNG-1kB.rng
+data=ZPRIVATE\20011383\SVG-15kB.svg                     private\20011383\SVG-15kB.svg
+data=ZPRIVATE\20011383\SWF-15kB.swf                     private\20011383\SWF-15kB.swf
+data=ZPRIVATE\20011383\TIF-25kB.tif                     private\20011383\TIF-25kB.tif
+data=ZPRIVATE\20011383\VCF-1kB.vcf                      private\20011383\VCF-1kB.vcf
+data=ZPRIVATE\20011383\VCS-1kB.vcs                      private\20011383\VCS-1kB.vcs
+data=ZPRIVATE\20011383\WAV-20kB.wav                     private\20011383\WAV-20kB.wav
+data=ZPRIVATE\20011383\XLS-15kB.xls                     private\20011383\XLS-15kB.xls
+data=ZPRIVATE\20011383\SISX-10kB.sisx                   private\20011383\SISX-10kB.sisx
+data=ZPRIVATE\20011383\WMA-50kB.wma                     private\20011383\WMA-50kB.wma
+data=ZPRIVATE\20011383\WMV-200kB.wmv                    private\20011383\WMV-200kB.wmv
+
+#endif // __CREATOR_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/browserEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<!-- Create bookmark -->
+<bookmark>
+   <fields>
+    <name>Creator bookmark</name>
+    <url>http://example.net</url>
+    <username>User</username>
+    <password>passwd</password>
+  </fields>
+</bookmark>
+
+<!-- Create 5 random bookmarks -->
+<bookmark amount="5">
+   <fields>
+        <name randomlength="default"/>
+        <url randomlength="default"/>
+        <username randomlength="default"/>
+        <password randomlength="default"/>
+   </fields>
+</bookmark>
+
+<!-- Create bookmark folder -->
+<bookmarkfolder>
+   <fields>
+       <name>Creator bookmarks</name>
+   </fields>
+</bookmarkfolder>
+
+<!-- Create saved page folder -->
+<savedpagefolder>
+    <fields>
+       <name>Creator saved pages</name>
+    </fields>
+</savedpagefolder>
+
+<!-- Create saved page -->
+<savedpage>
+    <fields>
+       <name>Creator saved page</name>
+       <path randomlength="default"/>
+    </fields>
+</savedpage>
+
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/calendarEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,103 @@
+<?xml version="1.0" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<!-- Contact set with existing contacts -->
+<contact-set id="1" numberofexistingcontacts="10">
+</contact-set>
+
+<!-- Create an appointment with 5 attendees. Two of the attendees are selected from the contacts -->
+<!-- and two of the attendees are randomly generated. One contact explicitly given. -->
+<calendar type="appointment">
+   <fields>
+   <summary>Project meeting</summary>
+   <description>Let's have a bi-weekly project meeting. Welcome everyone!</description>
+   <location>Meeting room 1</location>
+   <starttime>2008-03-27T13:02:57</starttime>
+   <endtime>2008-03-27T16:15:00</endtime>
+   <recurrentfrequency>weekly</recurrentfrequency>
+   <recurrentinterval>2</recurrentinterval>
+   <recurrentfrom>2008-03-27</recurrentfrom>   
+   <recurrentto>2009-03-27</recurrentto>
+   <attendees>
+      <!-- Two existing contacts -->
+   	  <contact-set-reference id="1" maxamount="2"/>
+      <attendee>
+         <commonname>John Doe</commonname>
+         <email>john.doe@example.net</email>
+      </attendee>
+      <attendee>
+         <commonname/>
+         <email/>
+      </attendee>
+      <attendee>
+         <commonname/>
+         <email/>
+      </attendee>
+   </attendees>
+   </fields>  
+</calendar>
+
+<!-- Contact set with 5 contacts having first name "Jane" -->
+<contact-set id="2">
+    <contact amount="5">
+        <fields>
+            <firstname>Jane</firstname>
+            <lastname/>
+            <emailwork/>
+            <mobilephonework/>
+        </fields>
+    </contact>
+</contact-set>
+
+<!-- Create an appointment having "Jane" as an attendee (random location) -->
+<calendar type="appointment">
+   <fields>
+   <summary>Appointment with Jane</summary>
+   <starttime>2008-02-29T14:00:00</starttime>
+   <endtime>2008-02-29T15:00:00</endtime>
+   <location/>
+   <attendees>      
+      <contact-set-reference id="2" maxamount="1"/>      
+   </attendees>
+   </fields>
+</calendar>
+
+<!-- Create an event -->
+<calendar type="event">
+   <fields>
+   <summary>Tech Days</summary>
+   <description>Annual tech days, let's have fun!</description>
+   <starttime>2008-05-01</starttime>
+   <endtime>2008-05-03</endtime>
+   </fields>
+</calendar>
+
+<!-- Create a reminder -->
+<calendar type="reminder">
+  <fields>
+  <summary>Remember to buy Lotto!</summary>
+  <starttime>2008-02-28T18:00:00</starttime>
+  <endtime>2008-02-28T18:00:00</endtime>
+  </fields>
+</calendar>
+
+<!-- Create 10 random anniversaries -->
+<calendar type="anniversary" amount="10">
+  <fields>
+  <summary/>
+  <starttime/>
+  </fields>
+</calendar>
+
+<!-- Create a to-do entry -->
+<calendar type="todo">
+  <fields>
+     <summary>Should do something...?</summary>
+     <starttime>2008-02-29T10:00:00</starttime>
+     <endtime>2008-02-29T12:00:00</endtime>
+  </fields>
+</calendar>
+
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/connectionmethodEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<connectionmethod>
+  <fields>
+    <connectionname>CR_Example</connectionname>
+    <bearertype>GPRS</bearertype>
+    <startpage>http://wap.example.net</startpage>
+    <wapwspoption>connectionoriented</wapwspoption>
+    <protocoltype>ipv4</protocoltype>
+    <loginname>john</loginname>
+    <secureauthentication>no</secureauthentication>
+    <loginpass>doe</loginpass>
+    <promptpassword>no</promptpassword>
+    <gatewayaddress>10.10.10.101</gatewayaddress>
+    <subnetmask>255.255.255.0</subnetmask>
+    <deviceipaddr>10.10.10.102</deviceipaddr>
+    <useproxy>no</useproxy>
+  </fields>
+</connectionmethod>
+  <connectionmethod amount="2">
+    <fields>
+      <connectionname randomlength="max" />
+      <bearertype randomlength="max" />
+      <startpage randomlength="max" />
+      <wapwspoption randomlength="max" />
+      <protocoltype randomlength="max" />
+      <loginname randomlength="max" />
+      <secureauthentication randomlength="max" />
+      <loginpass randomlength="max" />
+      <promptpassword randomlength="max" />
+      <gatewayaddress randomlength="max" />
+      <subnetmask randomlength="max" />
+      <deviceipaddr randomlength="max" />
+      <ip4nameserver1 randomlength="max" />
+      <ip4nameserver2 randomlength="max" />
+      <datacalltelnumber randomlength="max" />
+      <datacalltypeisdn randomlength="max" />
+      <datacalllinespeed randomlength="max" />
+      <useproxy randomlength="max" />
+      <proxyserveraddress randomlength="max" />
+      <proxyportnumber randomlength="max" />
+      <ip6nameserver1 randomlength="max" />
+      <ip6nameserver2 randomlength="max" />
+      <disabletextauth randomlength="max" />
+      <wlanname randomlength="max" />
+      <wlanipaddr randomlength="max" />
+      <wlansecmode randomlength="max" />
+      <wlannetmode randomlength="max" />
+    </fields>
+  </connectionmethod>
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/contactEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<contact-set id="1" numberofexistingcontacts="10">
+</contact-set>
+
+<contactgroup name="Group with 5 existing contacts">
+   <members>
+      <contact-set-reference maxamount="5" id="1"/>
+   </members>
+</contactgroup>
+
+<contactgroup name="ExampleCompany&apos;s Designers">
+   <members>
+      <contact-set-reference id="2"/>
+   </members>
+</contactgroup>
+
+<contact>
+   <fields>
+      <firstname>John</firstname>
+      <lastname>Smith</lastname>
+      <mobilephonework>+35800101010101</mobilephonework>
+      <mobilephonework>00101010102</mobilephonework>
+      <emailgen>john.smith@example.com</emailgen>
+      <prefix>Mr.</prefix>
+   </fields>
+</contact>
+
+<contact-set id="2">
+   <contact amount="15">
+    <fields>
+    <firstname/>
+    <lastname/>
+    <mobilephonegen/>
+    <landphonegen/>
+    <emailgen/>
+    <videonumbergen/>
+    <voipgen/>
+    <poc/>
+    <company>ExampleCompany Ltd.</company>
+    <jobtitle>Software Designer</jobtitle>
+    <note/>
+ 	<middlename/>
+    <secondname/>
+    <prefix/>
+    <suffix/>
+    <addrlabelgen/>
+    <addrpogen/>
+    <addrextgen/>
+    <addrstreetgen/>
+    <addrlocalgen/>
+    </fields>
+   </contact>
+</contact-set>
+
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/creator.xsd	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1187 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="0.1">
+
+<!-- Version 0.1 February 13th 2009: First version of the schema-->
+
+<xs:complexType name="entityfield">
+  <xs:simpleContent>
+    <xs:extension base="xs:string">
+      <!-- If not given, amount="1" is assumed -->
+      <xs:attribute name="amount" type="xs:positiveInteger" use="optional" />
+      <!-- This can be a numeric length (in bytes) "default" or "max", valid with random data only -->
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:element name="contact-set-reference">
+  <xs:complexType>
+    <xs:attribute name="id" type="xs:integer" use="required" />
+    <xs:attribute name="maxamount" type="xs:integer" use="optional" />
+  </xs:complexType>
+</xs:element>
+                  
+<xs:complexType name="contactfield" mixed="true">
+  <xs:sequence>
+    <xs:element ref="contact-set-reference" minOccurs="0" maxOccurs="unbounded" />
+  </xs:sequence>
+  <!-- If not given, amount="1" is assumed -->
+  <xs:attribute name="amount" type="xs:positiveInteger" use="optional" />
+  <xs:attribute name="incvalueforeachcopy" type="xs:boolean" use="optional" />
+</xs:complexType>
+
+<xs:complexType name="simplefield">
+  <xs:simpleContent>
+    <xs:extension base="xs:string">
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:group name="randomElements">
+  <xs:sequence>
+  </xs:sequence>
+</xs:group>
+
+<xs:simpleType name="fileidfield">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="3GPP-70kB" />
+    <xs:enumeration value="AAC-100kB" />
+    <xs:enumeration value="AMR-20kB" />
+    <xs:enumeration value="XLS-15kB" />
+    <xs:enumeration value="GIF-2kB" />
+    <xs:enumeration value="JPEG-200kB" />
+    <xs:enumeration value="JPEG-25kB" />
+    <xs:enumeration value="JPEG-500kB" />
+    <xs:enumeration value="MIDI-10kB" />
+    <xs:enumeration value="MP3-250kB" />
+    <xs:enumeration value="PNG-15kB" />
+    <xs:enumeration value="PPT-40kB" />
+    <xs:enumeration value="RM-95kB" />
+    <xs:enumeration value="RNG-1kB" />
+    <xs:enumeration value="TXT-10kB" />
+    <xs:enumeration value="TXT-70kB" />
+    <xs:enumeration value="WAV-20kB" />
+    <xs:enumeration value="DOC-20kB" />
+    <xs:enumeration value="SWF-15kB" />
+    <xs:enumeration value="JAD-1kB" />
+    <xs:enumeration value="JAR-10kB" />
+    <xs:enumeration value="TIF-25kB" />
+    <xs:enumeration value="MXMF-40kB" />
+    <xs:enumeration value="BMP-25kB" />
+    <xs:enumeration value="JP2-65kB" />
+    <xs:enumeration value="SVG-15kB" />
+    <xs:enumeration value="HTML-20kB" />
+    <xs:enumeration value="VCF-1kB" />
+    <xs:enumeration value="VCS-1kB" />
+    <xs:enumeration value="MP4-200kB" />
+    <xs:enumeration value="SISX-10kB" />
+    <xs:enumeration value="RAM-1kB" />
+    <xs:enumeration value="WMV-200kB" />
+    <xs:enumeration value="WMA-50kB" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="syncfield">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="public" />
+    <xs:enumeration value="private" />
+    <xs:enumeration value="none" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="datetimeemptyfield">
+  <xs:union>
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0" />
+        <xs:maxLength value="0" />
+      </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType>
+      <xs:restriction base="xs:dateTime" />
+    </xs:simpleType>
+    <xs:simpleType>
+      <xs:restriction base="xs:date" />
+    </xs:simpleType>
+  </xs:union>
+</xs:simpleType>
+
+<xs:simpleType name="integerEmptyType">
+  <xs:union>
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0" />
+        <xs:maxLength value="0" />
+      </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType>
+      <xs:restriction base="xs:integer" />
+    </xs:simpleType>
+  </xs:union>
+</xs:simpleType>
+
+<xs:simpleType name="positiveIntegerEmptyType">
+  <xs:union>
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0" />
+        <xs:maxLength value="0" />
+      </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType>
+      <xs:restriction base="xs:positiveInteger" />
+    </xs:simpleType>
+  </xs:union>
+</xs:simpleType>
+
+<xs:simpleType name="datetimefield">
+  <xs:union>
+    <xs:simpleType>
+      <xs:restriction base="xs:dateTime" />
+    </xs:simpleType>
+    <xs:simpleType>
+      <xs:restriction base="xs:date" />
+    </xs:simpleType>
+  </xs:union>
+</xs:simpleType>
+
+<xs:group name="contactElements">
+  <xs:sequence>
+    <xs:element name="firstname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="lastname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="company" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="jobtitle" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="prefix" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="suffix" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="secondname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrlabelgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrpogen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrextgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrstreetgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrlocalgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrregiongen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrpostcodegen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrcountrygen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrlabelhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrpohome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrexthome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrstreethome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrlocalhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrregionhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrpostcodehome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrcountryhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrlabelwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrpowork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrextwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrstreetwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrlocalwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrregionwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrpostcodework" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="addrcountrywork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="poc" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="swis" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="sip" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="dtmfstring" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="middlename" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="department" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="asstname" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="spouse" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="children" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="locprivacy" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="genlabel" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="wvaddress" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="thumbnailpath" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="thumbnailid" minOccurs="0" maxOccurs="unbounded" type="fileidfield" />
+    <xs:element name="callerobjtext" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="landphonegen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="landphonehome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="landphonework" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="mobilephonegen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="mobilephonehome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="mobilephonework" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="faxnumbergen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="faxnumberhome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="faxnumberwork" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="pagernumber" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="videonumbergen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="videonumberhome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="videonumberwork" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="voipgen" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="voiphome" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="voipwork" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="asstphone" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="carphone" minOccurs="0" maxOccurs="unbounded" type="contactfield" />
+    <xs:element name="urlgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="urlhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="urlwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="emailgen" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="emailhome" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="emailwork" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="ringtonepath" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="ringtoneid" minOccurs="0" maxOccurs="unbounded" type="fileidfield" />
+    <xs:element name="callerobjimg" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+    <xs:element name="birthday" minOccurs="0" maxOccurs="unbounded" type="datetimeemptyfield" />
+    <xs:element name="anniversary" minOccurs="0" maxOccurs="unbounded" type="datetimeemptyfield" />
+    <xs:element name="synchronization" minOccurs="0" maxOccurs="unbounded" type="syncfield" />
+  </xs:sequence>
+</xs:group>
+  
+<xs:element name="contact">
+  <xs:annotation>
+    <xs:documentation>
+      There are three different contact related elements: contact, contact-set and contactgroup. The contact element describes one
+      contact in a database. The contact can be defined explicitly by giving the contact fields and their data, or it can just define the fields to be
+      used and let the Creator fill the fields with random data. There can also be several same type of fields, for example multiple emailwork fields.
+
+      When contact is defined without fields sub-element, a contact with all fields containing default length random data is created.
+    </xs:documentation>
+  </xs:annotation>
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" minOccurs="0" maxOccurs="1">
+        <xs:complexType>
+          <xs:choice minOccurs="0" maxOccurs="unbounded">
+            <xs:group ref="contactElements" minOccurs="0" maxOccurs="unbounded" />
+          </xs:choice>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="contact-set">
+  <xs:annotation>
+    <xs:documentation>
+      The contact-set element can be used to bind multiple contacts together and linking them to contactgroups, messages and
+      calendars. When contact-set is used as a link target it must have a unique id attribute. See example usage of contact-set in
+      contactEx.creatorxml.
+    </xs:documentation>
+  </xs:annotation>
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element ref="contact" minOccurs="0" maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:attribute name="id" use="required" type="xs:integer" />
+    <xs:attribute name="numberofexistingcontacts" type="xs:integer" use="optional">
+      <xs:annotation>
+        <xs:documentation>
+          Amount of members in the group. Indicates how many existing contacts should be taken to the set. 
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="contactgroup">
+  <xs:annotation>
+    <xs:documentation>
+      The contactgroup element describes one contact group that should be created to the device's database. 
+    </xs:documentation>
+  </xs:annotation>
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="members" maxOccurs="1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element ref="contact-set-reference" maxOccurs="unbounded" />
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="optional" />
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="calendar">
+  <xs:annotation>
+    <xs:documentation>
+      Note: If alarmtime element is not set, alarm is set as not active and if alarmtime is set, alarm is set to active.
+      Note: If recurrentfrequency is not set, or set to not-repeated recurrentinterval will be skipped, even if set.
+    </xs:documentation>
+  </xs:annotation>
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields">
+        <xs:complexType>
+          <xs:all>
+            <xs:element name="summary" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="description" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="location" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="starttime" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
+            <xs:element name="endtime" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
+            <xs:element name="creationperiodstartdate" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
+            <xs:element name="creationperiodenddate" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
+            <xs:element name="recurrentfrequency" minOccurs="0" maxOccurs="1" type="eventRecurrentfrequencyType" />
+            <xs:element name="recurrentinterval" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
+            <xs:element name="recurrentfrom" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
+            <xs:element name="recurrentto" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
+            <xs:element name="alarmtime" minOccurs="0" maxOccurs="1" type="datetimeemptyfield" />
+            <xs:element name="synchronization" minOccurs="0" maxOccurs="1" type="syncfield" />
+            <xs:element name="organizername" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="organizeremail" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="status" minOccurs="0" maxOccurs="1" type="eventStatusType" />
+            <xs:element name="priority" minOccurs="0" maxOccurs="1" type="eventPriorityType" />
+            <xs:element ref="attendees" minOccurs="0" maxOccurs="1" />
+          </xs:all>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="type" use="required" type="eventType" />
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:simpleType name="eventType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="appointment" />
+    <xs:enumeration value="event" />
+    <xs:enumeration value="reminder" />
+    <xs:enumeration value="todo" />
+    <xs:enumeration value="anniversary" />
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="eventRecurrentfrequencyType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="not-repeated" />
+    <xs:enumeration value="daily" />
+    <xs:enumeration value="weekly" />
+    <xs:enumeration value="monthly" />
+    <xs:enumeration value="yearly" />
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="eventStatusType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="tentative" />
+    <xs:enumeration value="confirmed" />
+    <xs:enumeration value="cancelled" />
+    <xs:enumeration value="todoneedsaction" />
+    <xs:enumeration value="todocompleted" />
+    <xs:enumeration value="todoinprocess" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+    
+<xs:simpleType name="eventPriorityType">
+  <xs:union>
+    <xs:simpleType>
+      <xs:restriction base="xs:integer">
+        <xs:minInclusive value="0" />
+        <xs:maxInclusive value="255" />
+      </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:enumeration value="high" />
+        <xs:enumeration value="medium" />
+        <xs:enumeration value="low" />
+        <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:union>
+</xs:simpleType>
+
+<xs:element name="attendees">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element ref="contact-set-reference" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="attendee" minOccurs="0" maxOccurs="unbounded">
+        <xs:complexType>
+          <xs:all>
+            <xs:element name="commonname" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="email" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="role" minOccurs="0" maxOccurs="1" type="attendeeRoleType" />
+            <xs:element name="status" minOccurs="0" maxOccurs="1" type="attendeeStatusType" />
+          </xs:all>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+</xs:element>
+
+<xs:simpleType name="attendeeRoleType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="required" />
+    <xs:enumeration value="optional" />
+    <xs:enumeration value="non-participant" />
+    <xs:enumeration value="chair" />
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="attendeeStatusType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="needsaction" />
+    <xs:enumeration value="accepted" />
+    <xs:enumeration value="tentative" />
+    <xs:enumeration value="confirmed" />
+    <xs:enumeration value="declined" />
+    <xs:enumeration value="completed" />
+    <xs:enumeration value="delegated" />
+    <xs:enumeration value="inprocess" />
+  </xs:restriction>
+</xs:simpleType>
+    
+<xs:group name="bookmarkElements">
+  <xs:sequence> <!-- Element order is fixed. This enables using both minOccurs="1" and maxOccurs="1". -->
+    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="url" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="username" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="password" minOccurs="1" maxOccurs="1" type="entityfield" />
+  </xs:sequence>
+</xs:group>
+
+<xs:element name="bookmark">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields">
+        <xs:complexType>
+          <xs:choice minOccurs="0" maxOccurs="1">
+            <xs:group ref="randomElements" minOccurs="0" maxOccurs="1" />
+            <xs:group ref="bookmarkElements" minOccurs="0" maxOccurs="1" />
+          </xs:choice>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="bookmarkfolder">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger"/>
+  </xs:complexType>
+</xs:element>
+
+<xs:group name="savedpageElements">
+  <xs:sequence>
+    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="path" minOccurs="1" maxOccurs="1" type="entityfield" />
+  </xs:sequence>
+</xs:group>
+
+<xs:group name="savedpageElementsReverse">
+  <xs:sequence>
+    <xs:element name="path" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
+  </xs:sequence>
+</xs:group>
+
+<xs:element name="savedpage">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:choice minOccurs="0" maxOccurs="1">
+            <xs:group ref="randomElements" minOccurs="0" maxOccurs="1" />
+            <xs:group ref="savedpageElements" minOccurs="0" maxOccurs="1" />
+            <xs:group ref="savedpageElementsReverse" minOccurs="0" maxOccurs="1" />
+          </xs:choice>
+          <!-- If not given, amount="1" is assumed -->
+          <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="savedpagefolder">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:all>
+            <xs:element name="name" minOccurs="0" maxOccurs="1" type="entityfield" />
+          </xs:all>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="note">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="text" minOccurs="0" maxOccurs="1" type="entityfield" />
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="log">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:all>
+            <xs:element name="direction" minOccurs="1" maxOccurs="1" type="logDirectionType" />
+            <xs:element name="datetime" minOccurs="1" maxOccurs="1" type="entityfield" />
+            <xs:element name="phonenumber" minOccurs="1" maxOccurs="1" type="entityfield" />
+            <xs:element name="duration" minOccurs="0" maxOccurs="1" type="entityfield" />
+          </xs:all>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:simpleType name="logDirectionType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="missed" />
+    <xs:enumeration value="in" />
+    <xs:enumeration value="out" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:element name="connectionmethod">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:all>
+            <xs:element name="connectionname" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="bearertype" minOccurs="0" maxOccurs="1" type="connBearerType" />
+            <xs:element name="startpage" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="wapwspoption" minOccurs="0" maxOccurs="1" type="wapwspoptionType" />
+            <xs:element name="protocoltype" minOccurs="0" maxOccurs="1" type="connProtocolType" />
+            <xs:element name="loginname" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="secureauthentication" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="loginpass" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="promptpassword" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="gatewayaddress" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="subnetmask" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="deviceipaddr" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="ip4nameserver1" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="ip4nameserver2" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="datacalltelnumber" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="datacalltypeisdn" minOccurs="0" maxOccurs="1" type="datacalltypeisdnType" />
+            <xs:element name="datacalllinespeed" minOccurs="0" maxOccurs="1" type="datacalllinespeedType" />
+            <xs:element name="useproxy" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="proxyserveraddress" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="proxyportnumber" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="ip6nameserver1" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="ip6nameserver2" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="disabletextauth" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="wlanname" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="wlanipaddr" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="wlansecmode" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="wlannetmode" minOccurs="0" maxOccurs="1" type="entityfield" />
+          </xs:all>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:simpleType name="connBearerEnumType"> 
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="WLAN" />
+    <xs:enumeration value="GPRS" />
+    <xs:enumeration value="datacall" />
+    <xs:enumeration value="HSGSM" />
+    <xs:enumeration value="embedded" />
+    <xs:enumeration value="VPN" />
+    <xs:enumeration value="LAN" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="connBearerType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="connBearerEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="connProtocolEnumType"> 
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="IPV4" />
+    <xs:enumeration value="ipv4" />
+    <xs:enumeration value="Ipv4" />
+    <xs:enumeration value="iPv4" />
+    <xs:enumeration value="ipV4" />
+    <xs:enumeration value="IPv4" />
+    <xs:enumeration value="IpV4" />
+    <xs:enumeration value="iPV4" />
+    <xs:enumeration value="IPV6" />
+    <xs:enumeration value="ipv6" />
+    <xs:enumeration value="Ipv6" />
+    <xs:enumeration value="iPv6" />
+    <xs:enumeration value="ipV6" />
+    <xs:enumeration value="IPv6" />
+    <xs:enumeration value="IpV6" />
+    <xs:enumeration value="iPV6" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="connProtocolType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="connProtocolEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="datacalltypeisdnEnumType"> 
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="analogue" />
+    <xs:enumeration value="isdnv110" />
+    <xs:enumeration value="isdnv120" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="datacalltypeisdnType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="datacalltypeisdnEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="datacalllinespeedEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="automatic" />
+    <xs:enumeration value="9600" />
+    <xs:enumeration value="14400" />
+    <xs:enumeration value="19200" />
+    <xs:enumeration value="28800" />
+    <xs:enumeration value="38400" />
+    <xs:enumeration value="43200" />
+    <xs:enumeration value="56000" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="datacalllinespeedType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="datacalllinespeedEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="wapwspoptionEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="connectionless" />
+    <xs:enumeration value="connectionoriented" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="wapwspoptionType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="wapwspoptionEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:element name="mailbox">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:all>
+            <xs:element name="name" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <!-- Incoming mail (POP3/IMAP4) settings -->
+            <xs:element name="incomingport" minOccurs="0" maxOccurs="1" type="positiveIntegerEmptyType" />
+
+            <!-- Specifies whether a secure TLS connection will be established directly over a TLS socket when connecting to the email server -->
+            <xs:element name="incomingsslwrapper" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <!-- Specifies whether a secure socket session will be negotiated after establishing a non-secure TCP connection with the email server -->
+            <xs:element name="incomingsecuresockets" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="incomingloginname" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="incomingpassword" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="incomingservername" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="incomingconnectionmethod" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <!-- Send return receipts to senders -->
+            <xs:element name="acknowledgereceipts" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <!-- maximum attachment size limit for the partial fetch of attachments in a message -->
+            <xs:element name="attachmentsizelimit" minOccurs="0" maxOccurs="1" type="integerEmptyType" />
+            <xs:element name="autosendonconnect" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="bodytextsizelimit" minOccurs="0" maxOccurs="1" type="integerEmptyType" />
+            <xs:element name="deletemailsatdisconnect" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <!-- Specifies the IMAP fetch size in bytes -->
+            <xs:element name="attachmentfetchsize" minOccurs="0" maxOccurs="1" type="positiveIntegerEmptyType" />
+            <xs:element name="incomingfolderpath" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="pathseparator" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="getemailoptions" minOccurs="0" maxOccurs="1" type="getEmailOptionsType" />
+            <!-- Specifies whether the IMAP IDLE command should be used as defined in RFC2177 -->
+            <xs:element name="imapidlecommand" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="imapidletimeout" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
+            <!-- Sets the maximum message size in bytes to be downloaded -->
+            <xs:element name="maxemailsize" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
+            <!-- Sets the method for synchronising IMAP4 subscription information with a server -->
+            <xs:element name="subscribetype" minOccurs="0" maxOccurs="1" type="mailboxSubscribeType" />
+            <!-- Specifies the rate in seconds at which the Inbox will be refreshed when connected -->
+            <xs:element name="syncrate" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
+            <!-- Sets the method for synchronising folder information with the server -->
+            <xs:element name="foldersynctype" minOccurs="0" maxOccurs="1" type="mailboxFolderSyncType" />
+            <!-- Specifies whether the seen flag is to be set on the IMAP4 server during synchronisation only when the message has been marked as read -->
+            <xs:element name="markseeninsync" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="enableexpungemode" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="useapopsecurelogin" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="inboxsynclimit" minOccurs="0" maxOccurs="1" type="syncLimitType" />
+            <xs:element name="mailboxsynclimit" minOccurs="0" maxOccurs="1" type="syncLimitType" />
+            <xs:element name="disconnectedusermode" minOccurs="0" maxOccurs="1" type="yesNoType" />
+
+            <!-- Outgoing mail (SMTP) settings -->
+            <xs:element name="outgoingport" minOccurs="0" maxOccurs="1" type="xs:positiveInteger" />
+            <xs:element name="outgoingsslwrapper" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="outgoingsecuresockets" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="outgoingloginname" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="outgoingpassword" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="outgoingservername" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="outgoingconnectionmethod" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="includesignature" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="addvcard" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="ownemail" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="emailalias" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="receiptaddress" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="replytoaddress" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="requestreceipts" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="smtpauth" minOccurs="0" maxOccurs="1" type="yesNoType" />
+            <xs:element name="copytoself" minOccurs="0" maxOccurs="1" type="copyToSelfType" />
+            <xs:element name="sendoption" minOccurs="0" maxOccurs="1" type="sendOptionType" />
+            <xs:element name="toccincludelimit" minOccurs="0" maxOccurs="1" type="integerEmptyType" />
+          </xs:all>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+    <xs:attribute name="type" use="required" type="mailboxType" />
+  </xs:complexType>
+</xs:element>
+
+<xs:simpleType name="mailboxType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="POP3" />
+    <xs:enumeration value="IMAP4" />
+    <xs:enumeration value="syncml" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="yesNoEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="yes" />
+    <xs:enumeration value="no" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="yesNoType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="yesNoEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="getEmailOptionsEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="getheaders" />
+    <xs:enumeration value="getbodytext" />
+    <xs:enumeration value="getbodytextandattachments" />
+    <xs:enumeration value="getattachments" />
+    <xs:enumeration value="getbodyalternativetext" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="getEmailOptionsType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="getEmailOptionsEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="syncLimitEnumType">
+  <xs:union>
+    <xs:simpleType>
+      <xs:restriction base="xs:integer">
+        <xs:minInclusive value="1" />
+        <xs:maxInclusive value="999" />
+      </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:enumeration value="all" />
+        <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:union>
+</xs:simpleType>
+
+<xs:complexType name="syncLimitType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="syncLimitEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="mailboxSubscribeEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="updateneither" />
+    <xs:enumeration value="updatelocal" />
+    <xs:enumeration value="updateremote" />
+    <xs:enumeration value="updateboth" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="mailboxSubscribeType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="mailboxSubscribeEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="mailboxFolderSyncEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="usecombination" />
+    <xs:enumeration value="uselocal" />
+    <xs:enumeration value="useremote" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="mailboxFolderSyncType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="mailboxFolderSyncEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="copyToSelfEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="no" />
+    <xs:enumeration value="to" />
+    <xs:enumeration value="cc" />
+    <xs:enumeration value="bcc" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="copyToSelfType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="copyToSelfEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:simpleType name="sendOptionEnumType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="immediately" />
+    <xs:enumeration value="onnextconnection" />
+    <xs:enumeration value="onrequest" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="sendOptionType"> <!-- type with both enum value restriction and randomlength attribute  -->
+  <xs:simpleContent>
+    <xs:extension base="sendOptionEnumType">
+      <xs:attribute name="randomlength" type="xs:string" use="optional" />
+    </xs:extension>
+  </xs:simpleContent>
+</xs:complexType>
+
+<xs:element name="message">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:sequence> <!-- Element order is fixed. This enables using both maxOccurs="unbounded" and maxOccurs="1". -->
+            <xs:element name="to" minOccurs="0" maxOccurs="unbounded" type="contactfield"/>
+            <xs:element name="from" minOccurs="0" maxOccurs="1" type="contactfield"/>
+            <xs:element name="folder" minOccurs="0" maxOccurs="1" type="messageFolderType" />
+            <xs:element name="subject" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="text" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="status" minOccurs="0" maxOccurs="1" type="messageStatusType" />
+            <xs:element name="smartmessagetype" minOccurs="0" maxOccurs="1" type="smartMessageType" />
+            <xs:element name="attachmentpath" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+            <xs:element name="attachmentid" minOccurs="0" maxOccurs="unbounded" type="fileidfield" />
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+    <xs:attribute name="type" use="required" type="messageType" />
+  </xs:complexType>
+</xs:element>
+
+<xs:simpleType name="messageType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="sms" />
+    <xs:enumeration value="mms" />
+    <xs:enumeration value="ams" />
+    <xs:enumeration value="email" />
+    <xs:enumeration value="smart" />
+    <xs:enumeration value="ir" />
+    <xs:enumeration value="bt" />
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="messageFolderType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="sent" />
+    <xs:enumeration value="inbox" />
+    <xs:enumeration value="draft" />
+    <xs:enumeration value="outbox" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="messageStatusType">
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="read" />
+    <xs:enumeration value="new" />
+    <xs:enumeration value="" /> <!-- allow empty content to enable random content to be generated -->
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="smartMessageType"> <!-- Currently not supported by S60 Creator -->
+  <xs:restriction base="xs:string">
+    <xs:enumeration value="internetsettings" />
+    <xs:enumeration value="emailnotification" />
+    <xs:enumeration value="businesscard" />
+    <xs:enumeration value="wapsettings" />
+    <xs:enumeration value="vcalendar" />
+    <xs:enumeration value="vcard" />
+    <xs:enumeration value="ringtone" />
+    <xs:enumeration value="operatorlogo" />
+    <xs:enumeration value="wapprovisioning" />
+    <xs:enumeration value="clilogo" />
+  </xs:restriction>
+</xs:simpleType>
+
+<xs:group name="impsserverElements">
+  <xs:sequence> <!-- Element order is fixed. This enables using both minOccurs="1" and maxOccurs="1". -->
+    <xs:element name="name" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="url" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="username" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="password" minOccurs="1" maxOccurs="1" type="entityfield" />
+    <xs:element name="connectionmethodname" minOccurs="1" maxOccurs="1" type="entityfield" />
+  </xs:sequence>
+</xs:group>
+ 
+<xs:element name="impsserver">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:choice minOccurs="0" maxOccurs="1">
+            <xs:group ref="randomElements" minOccurs="0" maxOccurs="1" />
+            <xs:group ref="impsserverElements" minOccurs="0" maxOccurs="1" />
+          </xs:choice>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+ 
+<xs:element name="file">
+  <xs:annotation>
+    <xs:documentation>
+      Note: If type is not set, a directory will be created. 
+    </xs:documentation>
+  </xs:annotation>
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:all>
+            <xs:element name="type" minOccurs="1" maxOccurs="1" type="fileidfield" />
+            <xs:element name="directory" minOccurs="1" maxOccurs="1" type="entityfield" />
+            <xs:element ref="encryption" minOccurs="0" maxOccurs="1" />
+          </xs:all>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="encryption"> <!-- Random values not supported inside encryption element -->
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element ref="right" minOccurs="0" maxOccurs="4" />
+    </xs:sequence>
+    <xs:attribute name="type" use="required">
+      <xs:simpleType>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="DRM-FL" />
+          <xs:enumeration value="DRM-CD" />
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="right">
+  <xs:complexType>
+    <xs:all>
+      <xs:element name="count" minOccurs="0" maxOccurs="1" type="xs:nonNegativeInteger" />
+      <xs:element name="starttime" minOccurs="0" maxOccurs="1" type="datetimefield" />
+      <xs:element name="endtime" minOccurs="0" maxOccurs="1" type="datetimefield" />
+      <xs:element name="interval" minOccurs="0" maxOccurs="1" type="xs:duration" />
+      <xs:element name="accumulated" minOccurs="0" maxOccurs="1" type="xs:duration" />
+    </xs:all>
+    <xs:attribute name="type" default="display">
+      <xs:simpleType>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="play" />
+          <xs:enumeration value="display" />
+          <xs:enumeration value="execute" />
+          <xs:enumeration value="print" />
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:complexType>
+</xs:element>
+
+<xs:element name="landmark">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="fields" maxOccurs="1">
+        <xs:complexType>
+          <xs:sequence> <!-- Element order is fixed. This enables using both maxOccurs="unbounded" and maxOccurs="1". -->
+            <xs:element name="name" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="entityfield" />
+            <xs:element name="description" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="street" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="postalcode" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="city" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="state" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="country" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="phonenbr" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="url" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="latitude" minOccurs="0" maxOccurs="1" type="entityfield">
+              <xs:annotation>
+                <xs:documentation>
+                  Data can have following format: -nn.nnnn - nn.nnnn, where positive latitude means north and negative south, zero
+                  point is Equator.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:element>
+            <xs:element name="longitude" minOccurs="0" maxOccurs="1" type="entityfield">
+              <xs:annotation>
+                <xs:documentation>
+                  Data can have following format: -nn.nnnn - nn.nnnn, where positive longitude means east and negative west, zero
+                  point is Prime Meridian.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:element>
+            <xs:element name="positionaccuracy" minOccurs="0" maxOccurs="1" type="entityfield" />
+            <xs:element name="altitude" minOccurs="0" maxOccurs="1" type="entityfield">
+              <xs:annotation>
+                <xs:documentation>
+                  Data can have following format: -nn.nnnn - nn.nnnn, where zero point is sea level.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:element>
+            <xs:element name="altitudeaccuracy" minOccurs="0" maxOccurs="1" type="entityfield" />
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <!-- If not given, amount="1" is assumed -->
+    <xs:attribute name="amount" use="optional" type="xs:positiveInteger" />
+  </xs:complexType>
+</xs:element>
+
+<xs:group name="creatorscriptElements">
+  <xs:sequence>
+    <xs:element ref="contact" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="contact-set" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="contactgroup" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="calendar" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="bookmark" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="bookmarkfolder" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="savedpage" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="savedpagefolder" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="note" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="log" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="connectionmethod" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="mailbox" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="message" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="impsserver" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="file" minOccurs="0" maxOccurs="unbounded" />
+    <xs:element ref="landmark" minOccurs="0" maxOccurs="unbounded" />
+  </xs:sequence>
+</xs:group>
+
+<xs:element name="creatorscript">
+  <xs:annotation>
+    <xs:documentation>
+      Root element of a Creator script. The sub-elements can be thought as 'commands', e.g. one contact element with explicitly
+      defined fields create one contact to the database of the device. 
+    </xs:documentation>
+  </xs:annotation>
+  <xs:complexType>
+    <xs:choice minOccurs="0" maxOccurs="unbounded">
+      <xs:group ref="creatorscriptElements" minOccurs="0" maxOccurs="unbounded" />
+    </xs:choice>
+    <xs:attribute name="scriptVersion" use="optional" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>
+          Declares the script version. Can be used to indicate the evolution of each script. 
+    </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="schemaVersion" use="required" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>
+          Declares the schema version used when designing a script file. This version information must be in sync with the schema used. Schema version is defined
+          at the beginning of the creator.xsd file in comment block.
+    </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+</xs:element>
+
+</xs:schema>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/filesEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+
+<!-- Create one jpg image file -->
+<file>
+    <fields>
+        <type>JPEG-25kB</type>
+        <directory>c:\data\images</directory>
+    </fields>
+</file>
+
+<!-- Create two midi files with DRM Forward Lock protection -->
+<file amount="2">
+    <fields>
+        <type>MIDI-10kB</type>
+        <directory>c:\data\Sounds</directory>
+        <encryption type="DRM-FL">
+        </encryption>
+    </fields>
+</file>
+
+<!-- Create one DRM protected 3GPP video file with specific access constraints -->
+<file>
+    <fields>
+        <type>3GPP-70kB</type>
+        <directory>c:\data\Videos</directory>
+        <!-- Define DRM Combined Delivery encryption type -->
+        <encryption type="DRM-CD">
+            <right type="play">
+                <!-- Define 21min 1s accumulated time constraint -->
+                <accumulated>P0Y0M0DT0H21M1S</accumulated>
+                <!-- Define that the content can only be played twice -->
+                <count>2</count>
+            </right>
+        </encryption>
+    </fields>
+</file>
+
+<!-- Create one DRM protected gif image file with specific access constraints -->
+<file>
+    <fields>
+        <type>GIF-2kB</type>
+        <directory>c:\data\Images</directory>
+        <!-- Define DRM Combined Delivery encryption type -->
+        <encryption type="DRM-CD">            
+            <right type="display">
+                <!-- Define that the content can be accessed 1,5h after first access -->
+                <interval>P0Y0M0DT1H30M0S</interval>
+                <!-- Define timeframe in which the content can be accessed -->
+                <starttime>2008-09-26T13:49:57</starttime>
+                <endtime>2009-03-27T16:15:00</endtime>
+            </right>
+        </encryption>
+    </fields>
+</file>
+
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/impsEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<!-- Create an IMPS server -->
+<impsserver>
+    <fields>
+        <name>Creator_test_imps</name>
+        <url/>
+        <username/>
+        <password/>
+        <connectionmethodname/>
+    </fields>
+</impsserver>
+
+</creatorscript>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/landmarkEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<!-- Create a landmark with all possible categories -->
+<landmark>
+  <fields>
+    <name>CreatorExample</name>
+    <category>accommodation</category>
+    <category>business</category>
+    <category>communication</category>
+    <category>educational</category>
+    <category>entertainment</category>
+    <category>food</category>
+    <category>geographical</category>
+    <category>outdoor</category>
+    <category>people</category>
+    <category>public</category>
+    <category>religious</category>
+    <category>shopping</category>
+    <category>sightseeing</category>
+    <category>sports</category>
+    <category>transport</category>
+    <description>This is an example landmark!</description>
+    <street>Landmark street 1</street>
+    <postalcode>00445</postalcode>
+    <city>Landmark City</city>
+    <state>Landmark State</state>
+    <country>Landmark Country</country>
+    <phonenbr>111222333</phonenbr>
+    <url>http://www.example.net</url>
+    <latitude>-76.0023</latitude>
+    <longitude>98.1002</longitude>
+    <positionaccuracy>2</positionaccuracy>
+    <altitude>-4.1</altitude>
+    <altitudeaccuracy>3</altitudeaccuracy>
+  </fields>
+</landmark>
+        
+<!-- Create 3 random landmarks -->
+<landmark amount="10">
+    <fields>
+        <name/>
+        <category/>
+        <description/>        
+        <latitude/>
+        <longitude/>        
+    </fields>
+</landmark>
+
+</creatorscript>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/logEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<!-- Create one missed call -->
+<log>
+   <fields>
+	<direction>missed</direction>
+	<datetime>2008-03-25T13:11:21</datetime>
+	<phonenumber>1115555554112</phonenumber>
+   </fields>
+</log>
+
+<!-- Create one received call -->
+<log>
+   <fields>
+        <direction>in</direction>
+        <datetime>2008-03-24T10:21:56</datetime>
+        <phonenumber>11155554112</phonenumber>
+        <duration>241</duration>
+   </fields>
+</log>
+
+<!-- Create one dialled call -->
+<log>
+   <fields>
+        <direction>out</direction>
+        <datetime>2008-03-22T12:01:06</datetime>
+        <phonenumber>0555554555</phonenumber>
+        <duration>445</duration>
+   </fields>
+</log>
+
+<!-- Create 5 random entries -->
+<log amount="5">
+   <fields>
+        <direction/>
+        <datetime/>
+        <phonenumber/>
+        <duration/>
+   </fields>
+</log>
+
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/mailboxEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<mailbox type="POP3">
+   <fields>
+      <name>cr_pop mail</name>
+      <ownemail/>
+      <copytoself/>
+      <useapopsecurelogin>yes</useapopsecurelogin>
+      <incomingsslwrapper>no</incomingsslwrapper>
+      <incomingsecuresockets>no</incomingsecuresockets>
+      <incomingloginname/>
+      <incomingpassword/>
+      <incomingservername/>
+   </fields>
+</mailbox>
+<mailbox type="IMAP4">
+   <fields>
+      <name>cr_imap4 mail</name>
+      <ownemail>creator@example.net</ownemail>
+      <copytoself>cc</copytoself>
+      <incomingsslwrapper>yes</incomingsslwrapper>
+      <incomingsecuresockets>yes</incomingsecuresockets>
+      <incomingloginname>creator</incomingloginname>
+      <incomingpassword>creator</incomingpassword>
+      <incomingservername>cr_mail.example.net</incomingservername>
+      <acknowledgereceipts>no</acknowledgereceipts>
+      <autosendonconnect>no</autosendonconnect>
+      <deletemailsatdisconnect>no</deletemailsatdisconnect>
+      <getemailoptions>getbodytextandattachments</getemailoptions>
+   </fields>
+</mailbox>
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/messagesEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<contact-set id="1">
+   <contact amount="6">
+      <fields>
+         <firstname/>
+         <lastname/>
+         <mobilephonegen/>
+         <emailgen/>
+      </fields>
+   </contact>
+</contact-set>
+
+<message amount="5" type="sms">
+   <fields>
+      <to/>
+      <folder>inbox</folder>
+      <text>This is an example SMS created by Creator.</text>
+      <status>new</status>
+   </fields>
+</message>
+
+<message type="mms">
+   <fields>
+      <to/>
+      <folder>sent</folder>
+      <subject>Good music!</subject>
+      <status>new</status>
+      <attachmentid>MP3-250kB</attachmentid>
+   </fields>
+</message>
+
+<message type="email">
+   <fields>
+      <from>
+         <contact-set-reference id="1"/>
+      </from> 
+      <folder>inbox</folder>
+      <subject/>
+      <text randomlength="max"/>
+      <status>new</status>
+      <attachmentid>JPEG-200kB</attachmentid>
+   </fields>
+</message>
+
+<message amount="5" type="sms">
+   <fields>
+      <from incvalueforeachcopy="true">123456</from>
+      <folder>inbox</folder>
+      <text>This is an example SMS created by Creator.</text>
+      <status>new</status>
+   </fields>
+</message>
+
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/scripts/notepadEx.creatorxml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<creatorscript schemaVersion="1.0" scriptVersion="1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="creator.xsd">
+
+<!-- Create a note -->
+<note>
+    <fields>
+        <text>This is a Creator example note!</text>
+    </fields>
+</note>
+        
+<!-- Create 3 random notes with default content -->
+<note amount="3">
+    <fields>
+        <text/>
+    </fields>
+</note>
+
+<!-- Create a random note with maximum length -->
+<note>
+    <fields>
+        <text randomlength="max"/>
+    </fields>
+</note>
+
+</creatorscript>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/sis/Creator_stub.pkg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,71 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+
+; Language - standard language definitions
+&EN
+
+; Standard SIS file header
+#{"Creator"},(0x20011383),1,0,0
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; normal stuff:
+""-"z:\sys\bin\creator.exe"
+""-"z:\resource\apps\creator.mif"
+""-"z:\resource\apps\creator.rsc"
+""-"z:\resource\apps\datacreator.rsc"
+""-"z:\private\10003a3f\import\apps\creator_reg.rsc"
+""-"z:\private\20011383\backup_registration.xml"
+
+; test data:
+""-"z:\private\20011383\3GPP-70kB.3gpp"
+""-"z:\private\20011383\AAC-100kB.aac"
+""-"z:\private\20011383\AMR-20kB.amr"
+""-"z:\private\20011383\BMP-25kB.bmp"
+""-"z:\private\20011383\Deck-1kB.saveddeck"
+""-"z:\private\20011383\DOC-20kB.doc"
+""-"z:\private\20011383\GIF-2kB.gif"
+""-"z:\private\20011383\HTML-20kB.html"
+""-"z:\private\20011383\JAD-1kB.jad"
+""-"z:\private\20011383\JAR-10kB.jar"
+""-"z:\private\20011383\JP2-65kB.jp2"
+""-"z:\private\20011383\JPEG-200kB.jpg"
+""-"z:\private\20011383\JPEG-25kB.jpg"
+""-"z:\private\20011383\JPEG-500kB.jpg"
+""-"z:\private\20011383\MIDI-10kB.mid"
+""-"z:\private\20011383\MP3-250kB.mp3"
+""-"z:\private\20011383\MP4-200kB.mp4"
+""-"z:\private\20011383\MXMF-40kB.mxmf"
+""-"z:\private\20011383\PNG-15kB.png"
+""-"z:\private\20011383\PPT-40kB.ppt"
+""-"z:\private\20011383\RAM-1kB.ram"
+""-"z:\private\20011383\RM-95kB.rm"
+""-"z:\private\20011383\RNG-1kB.rng"
+""-"z:\private\20011383\SVG-15kB.svg"
+""-"z:\private\20011383\SWF-15kB.swf"
+""-"z:\private\20011383\TIF-25kB.tif"
+""-"z:\private\20011383\TXT-10kB.txt"
+""-"z:\private\20011383\TXT-70kB.txt"
+""-"z:\private\20011383\VCF-1kB.vcf"
+""-"z:\private\20011383\VCS-1kB.vcs"
+""-"z:\private\20011383\WAV-20kB.wav"
+""-"z:\private\20011383\XLS-15kB.xls"
+""-"z:\private\20011383\SISX-10kB.sisx"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/src/engine.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,2610 @@
+/*
+* 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 <eikenv.h>
+#include <s32file.h> 
+#include <coemain.h>
+
+#include <driveinfo.h>
+
+#include <datacreator.rsg>
+
+#include "mainview.h"
+#include "engine.h"
+#include "enginewrapper.h"
+
+
+#include <cntdb.h>//For Math
+
+#include "creator_scriptentry.h"
+#include "creator_modulebase.h"
+//#include "creator_browser.h"
+#include "creator_calendar.h"
+#include "creator_phonebookbase.h"
+#include "creator_note.h"
+#include "creator_log.h"
+//#include "creator_connectionmethodbase.h"
+#include "creator_mailbox.h"
+//#include "creator_imps.h"
+#include "creator_message.h"
+#include "creator_landmark.h"
+
+
+#include "creator_traces.h"
+#include "creator_factory.h"
+#include "creator_scriptparser.h"
+#include "creator_file.h"
+#include "creator_cmdscriptrun.h"
+#include "creator_contactsetcache.h"
+
+#include <apparc.h>
+#include <eikappui.h>
+#include <eikapp.h>
+#include <bitmaptransforms.h>
+
+_LIT(KTempPathDrive, "d");
+_LIT(KTempPath, ":\\Creator\\");
+const TInt KRegisterDrive = EDriveC;
+_LIT(KRegisterFileName, "creator_created_items.dat");
+_LIT(KResourceFileName, "z:\\Resource\\apps\\datacreator.RSC");
+
+
+// ---------------------------------------------------------------------------
+
+CCreatorEngine* CCreatorEngine::NewL(EngineWrapper *aEngineWrapper)
+    {
+    CCreatorEngine* self = CCreatorEngine::NewLC(aEngineWrapper);
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CCreatorEngine* CCreatorEngine::NewLC(EngineWrapper *aEngineWrapper)
+    {
+    CCreatorEngine* self = new (ELeave) CCreatorEngine();
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngineWrapper);
+    return self;
+	}
+	
+// ---------------------------------------------------------------------------
+
+CCreatorEngine::CCreatorEngine() 
+: 
+CActive(0)
+{}
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::ConstructL(EngineWrapper *aEngineWrapper)
+    {
+    LOGSTRING("Creator: CCreatorEngine::ConstructL");
+
+    iEngineWrapper = aEngineWrapper;
+	iMemoryDetails.iENotAvailable = EFalse;
+	RequestMemoryDetails();
+    iEnv = CEikonEnv::Static();
+	// add second resource file to use for creator random data generation:
+	iResourceFileId = iEnv->AddResourceFileL(KResourceFileName);
+    User::LeaveIfError(iTimer.CreateLocal());
+
+    // these are needed by the random data generator
+    TTime now;
+    now.HomeTime();
+    iSeed=now.Int64();
+    
+    iTempPath = HBufC::NewL(KTempPathDrive().Length() + KTempPath().Length());
+    iTempPath->Des().Copy(KTempPathDrive);
+    iTempPath->Des().Append(KTempPath);
+	
+	iCmdScriptRun = CCreatorCmdScriptRun::NewL(this);
+
+    GetRandomDataFromFileL(KNullDesC);
+        
+    CActiveScheduler::Add(this);
+
+    }
+
+// ---------------------------------------------------------------------------
+
+CCreatorEngine::~CCreatorEngine()
+    {
+    LOGSTRING("Creator: CCreatorEngine::~CCreatorEngine");
+
+    Cancel();
+    
+    for( TInt i = 0; i < iStringArrays.Count(); ++i )
+        {
+        delete iStringArrays[i].iArrayPtr;
+        }
+    iStringArrays.Close();
+    iAllocatedFilePaths.ResetAndDestroy();
+    iAllocatedFilePaths.Close();
+    iTimer.Close();
+
+
+	iEnv->DeleteResourceFile(iResourceFileId);
+    
+	iMemoryDetailsList.Reset();
+    delete iPictureFileArray;
+    delete iSoundFileArray;
+    delete iTempPath;
+    delete iFrameImageData;
+    delete iEncoder;
+    delete iScaler;
+    delete iDecoder;
+    delete iScaledBitmap;
+    delete iBitmap;
+    delete iBitmapData;
+	
+    delete iCmdScriptRun;
+    iCmdScriptRun = NULL;
+    
+    delete iCommandParser;
+    }
+
+void CCreatorEngine::CopyFileL(const TFileName& aSourceFile, const TFileName& aTargetFile, TBool aOverwrite )
+	{
+	if( !aOverwrite && ConeUtils::FileExists(aTargetFile))
+		{
+		// File already exists
+		return;
+		}
+	
+	// Make sure that the path exists. Creates the directory if it does not exist already:
+	ConeUtils::EnsurePathExistsL(aTargetFile);	
+	User::LeaveIfError(BaflUtils::CopyFile(CEikonEnv::Static()->FsSession(), aSourceFile, aTargetFile));
+	}
+
+// ---------------------------------------------------------------------------
+	
+void CCreatorEngine::RequestMemoryDetails() 
+    {
+
+	TDriveList dl;
+    // variables for memory and disk handling
+    TVolumeInfo vinfo;
+
+    //*************************************************************************
+   
+    //*************************************************************************
+    // get an access to file server
+    RFs& fsSession = CEikonEnv::Static()->FsSession();
+
+    fsSession.DriveList(dl);
+    
+    for(TInt driveNum = EDriveC; driveNum <= EDriveZ ; driveNum ++ )
+    	{
+		if( dl[driveNum] )
+			{
+			TMemoryDetails *memDet = new TMemoryDetails;
+			if(fsSession.Volume(vinfo, driveNum) == KErrNone)
+				{
+				memDet->iFree.Num(TInt64(vinfo.iFree/1024));
+				memDet->iSize.Num(TInt64(vinfo.iSize/1024));
+				}
+			else
+				{
+				memDet->iFree.Num( 0 );
+				memDet->iSize.Num( 0 );
+				}
+			User::LeaveIfError(fsSession.DriveToChar(driveNum,memDet->iDriveLetter));
+			iMemoryDetailsList.AppendL( memDet );
+			}
+    	}
+  
+    // available work memory
+    TMemoryInfoV1Buf memory;
+    UserHal::MemoryInfo(memory);
+    TInt64 freeMemBytes=(TInt64)(memory().iFreeRamInBytes);
+    TInt64 sizeMemBytes=(TInt64)(memory().iTotalRamInBytes);
+    TInt64 sizeWorkMemBytes = sizeMemBytes; 
+    TInt64 sizeRomBytes = (TInt64)(memory().iTotalRomInBytes);
+    iMemoryDetails.iRamFree.Num(TInt64(freeMemBytes/1024));
+    iMemoryDetails.iRamSize.Num(TInt64(sizeWorkMemBytes/1024));
+    iMemoryDetails.iRomSize.Num(TInt64(sizeRomBytes/1024));
+    }
+
+// ---------------------------------------------------------------------------
+	
+TBool CCreatorEngine::MMC_OK() const
+	{
+	TBool MMCstatus = EFalse;
+
+	TDriveNumber eDrive=EDriveE;
+    TVolumeInfo vinfo;
+    TInt err = CEikonEnv::Static()->FsSession().Volume(vinfo, eDrive);
+	// check if we can access the E-drive:
+	if ( err == KErrNone)
+		{
+		MMCstatus = ETrue;
+		}
+	else
+		{
+		MMCstatus = EFalse;
+		}
+
+	// returns ETrue if MMC working properly
+	return MMCstatus;
+	}	
+	
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::ExecuteFirstCommandL(const TDesC& aText)
+    {
+    LOGSTRING("Creator: CCreatorEngine::ExecuteFirstCommand");
+
+    if( !iCommandArray->Count())
+        {
+        ShutDownEnginesL();
+        return;
+        }
+    
+    // show a progress dialog
+    iEngineWrapper->ShowProgressBar(aText, CommandArrayCount());	
+
+    iFailedCommands = 0;
+
+    // starts executing commands
+    ExecuteCommand();
+
+	
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::ExecuteCommand()
+    {
+    LOGSTRING("Creator: CCreatorEngine::ExecuteCommand");
+
+    // make sure the engine isn't active, should never happen
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("IsActive"), 500));
+
+    // execute a command after a very short delay (75ms)
+    iTimer.After(iStatus, 75);
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::RunL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::RunL");
+    LOGSTRING2("Creator: CCreatorEngine::RunL iCommandId=%d", iCommandArray->At(iCurrentEntry).iCommandId);
+    
+    if ( iUserCancelled ) 
+    	{
+    	return;
+    	}
+    
+    if (!iCommandArray->At(iCurrentEntry).iParameters)
+        {
+        LOGSTRING("Creator: CCreatorEngine::RunL - iParameters==NULL !");
+        }
+
+    // launch a command
+
+    TCreatorIds cmd = (TCreatorIds)iCommandArray->At(iCurrentEntry).iCommandId; 
+    switch( cmd )
+        {
+/*        
+	    case ECmdCreateBrowserBookmarkEntries: { iBrowser->CreateBookmarkEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+	    case ECmdCreateBrowserBookmarkFolderEntries: { iBrowser->CreateBookmarkFolderEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+	    case ECmdCreateBrowserSavedPageEntries: { iBrowser->CreateSavedDeckEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+	    case ECmdCreateBrowserSavedPageFolderEntries: { iBrowser->CreateSavedDeckFolderEntryL(reinterpret_cast<CBrowserParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+*/	    
+        case ECmdCreateCalendarEntryAppointments: { iCalendar->CreateAppointmentEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
+	    case ECmdCreateCalendarEntryEvents: { iCalendar->CreateEventEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
+	    case ECmdCreateCalendarEntryAnniversaries: { iCalendar->CreateAnniversaryEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
+	    case ECmdCreateCalendarEntryToDos: { iCalendar->CreateTodoEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
+        case ECmdCreateCalendarEntryReminders: { iCalendar->CreateReminderEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
+
+	    
+	    case ECmdCreatePhoneBookEntryContacts: { iPhonebook->CreateContactEntryL(iCommandArray->At(iCurrentEntry).iParameters) ; } break;
+	    case ECmdCreatePhoneBookEntryGroups: { iPhonebook->CreateGroupEntryL(iCommandArray->At(iCurrentEntry).iParameters) ; } break;
+	    case ECmdCreatePhoneBookEntrySubscribedContacts: { iPhonebook->CreateSubscribedContactEntryL(iCommandArray->At(iCurrentEntry).iParameters) ; } break;
+
+	    case ECmdCreateMiscEntryNotes: { iNotepad->CreateNoteEntryL(reinterpret_cast<CNotepadParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+
+	    case ECmdCreateLogEntryMissedCalls: { iLogs->CreateMissedCallEntryL(reinterpret_cast<CLogsParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+	    case ECmdCreateLogEntryReceivedCalls: { iLogs->CreateReceivedCallEntryL(reinterpret_cast<CLogsParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+	    case ECmdCreateLogEntryDialledNumbers: { iLogs->CreateDialledNumberEntryL(reinterpret_cast<CLogsParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+/*
+        case ECmdCreateMiscEntryAccessPoints: { iAccessPoints->CreateConnectionSettingsEntryL(iCommandArray->At(iCurrentEntry).iParameters); } break;
+        case ECmdDeleteIAPs: { iAccessPoints->DeleteAllL(); } break;
+        case ECmdDeleteCreatorIAPs: { iAccessPoints->DeleteAllCreatedByCreatorL(); } break;
+*/
+        case ECmdCreateMiscEntryLandmarks: { iLandmarks->CreateLandmarkEntryL(reinterpret_cast<CLandmarkParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+        
+	    case ECmdCreateMessagingEntryMailboxes: { iMailboxes->CreateMailboxEntryL(reinterpret_cast<CMailboxesParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+/*
+        #ifdef __PRESENCE
+  	     case ECmdCreateMiscEntryIMPSServers: { iIMPS->CreateIMPSServerEntryL(reinterpret_cast<CIMPSParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+        #endif
+*/
+	    case ECmdCreateMessagingEntryMessages:  { iMessages->CreateMessageEntryL(reinterpret_cast<CMessagesParameters*>(iCommandArray->At(iCurrentEntry).iParameters), ETrue); } break;
+	    case ECmdCreateMessagingEntryMessagesViaScript:  { iMessages->CreateMessageEntryL(reinterpret_cast<CMessagesParameters*>(iCommandArray->At(iCurrentEntry).iParameters)); } break;
+
+	    case ECmdCreateRandomEntrySMSInbox:
+	    case ECmdCreateRandomEntrySMSDrafts:
+	    case ECmdCreateRandomEntrySMSOutbox:
+	    case ECmdCreateRandomEntrySMSSent:
+	    case ECmdCreateRandomEntryMMSInbox:
+	    case ECmdCreateRandomEntryMMSDrafts:
+	    case ECmdCreateRandomEntryMMSOutbox:
+	    case ECmdCreateRandomEntryMMSSent:
+	    case ECmdCreateRandomEntryAMSInbox:
+	    case ECmdCreateRandomEntryAMSDrafts:
+	    case ECmdCreateRandomEntryAMSOutbox:
+	    case ECmdCreateRandomEntryAMSSent:
+	    case ECmdCreateRandomEntryEmailInbox:
+	    case ECmdCreateRandomEntryEmailDrafts:
+	    case ECmdCreateRandomEntryEmailOutbox:
+	    case ECmdCreateRandomEntryEmailSent:
+	    case ECmdCreateRandomEntryBIOInbox:
+	    case ECmdCreateRandomEntryBIODrafts:
+	    case ECmdCreateRandomEntryBIOOutbox:
+	    case ECmdCreateRandomEntryBIOSent:
+	    case ECmdCreateRandomEntryIRInbox:
+	    case ECmdCreateRandomEntryIRDrafts:
+	    case ECmdCreateRandomEntryIROutbox:
+	    case ECmdCreateRandomEntryIRSent:
+	    case ECmdCreateRandomEntryBTInbox:
+	    case ECmdCreateRandomEntryBTDrafts:
+	    case ECmdCreateRandomEntryBTOutbox:
+	    case ECmdCreateRandomEntryBTSent:
+	            { iMessages->CreateRandomMessageEntryL(iCommandArray->At(iCurrentEntry).iCommandId); } break;
+
+        case ECmdCreateFileEntryEmptyFolder:
+        case ECmdCreateFileEntry3GPP_70kB:
+        case ECmdCreateFileEntryAAC_100kB:
+        case ECmdCreateFileEntryAMR_20kB:
+        case ECmdCreateFileEntryBMP_25kB:
+        case ECmdCreateFileEntryDeck_1kB:
+        case ECmdCreateFileEntryDOC_20kB:
+        case ECmdCreateFileEntryGIF_2kB:
+        case ECmdCreateFileEntryHTML_20kB:
+        case ECmdCreateFileEntryJAD_1kB:
+        case ECmdCreateFileEntryJAR_10kB:
+        case ECmdCreateFileEntryJP2_65kB:
+        case ECmdCreateFileEntryJPEG_200kB:
+        case ECmdCreateFileEntryJPEG_25kB:
+        case ECmdCreateFileEntryJPEG_500kB:
+        case ECmdCreateFileEntryMIDI_10kB:
+        case ECmdCreateFileEntryMP3_250kB:
+        case ECmdCreateFileEntryMP4_200kB:
+        case ECmdCreateFileEntryMXMF_40kB:
+        case ECmdCreateFileEntryPNG_15kB:
+        case ECmdCreateFileEntryPPT_40kB:
+        case ECmdCreateFileEntryRAM_1kB:
+        case ECmdCreateFileEntryRM_95kB:
+        case ECmdCreateFileEntryRNG_1kB:
+        case ECmdCreateFileEntrySVG_15kB:
+        case ECmdCreateFileEntrySWF_15kB:
+        case ECmdCreateFileEntryTIF_25kB:
+        case ECmdCreateFileEntryTXT_10kB:
+        case ECmdCreateFileEntryTXT_70kB:
+        case ECmdCreateFileEntryVCF_1kB:
+        case ECmdCreateFileEntryVCS_1kB:
+        case ECmdCreateFileEntryWAV_20kB:
+        case ECmdCreateFileEntryXLS_15kB:
+        case ECmdCreateFileEntrySISX_10kB:
+        case ECmdCreateFileEntryWMA_50kB:
+        case ECmdCreateFileEntryWMV_200kB:
+	            { iFiles->CreateFileEntryL( reinterpret_cast<CFilesParameters*>(iCommandArray->At(iCurrentEntry).iParameters), iCommandArray->At(iCurrentEntry).iCommandId ); } break;
+        case ECmdDeleteContacts:
+            {
+            iPhonebook->DeleteAllL(); 
+            break;
+            }
+        case ECmdDeleteContactGroups:
+            {
+            iPhonebook->DeleteAllGroupsL();
+            break;            
+            }
+        case ECmdDeleteCreatorContacts:
+            {
+            iPhonebook->DeleteAllCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteCreatorContactGroups:
+            {
+            iPhonebook->DeleteAllGroupsCreatedByCreatorL();
+            break;            
+            }
+        case ECmdDeleteCalendarEntries:
+            {
+            iCalendar->DeleteAllL();
+            break;
+            }
+        case ECmdDeleteCreatorCalendarEntries:
+            {
+            iCalendar->DeleteAllCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteLogs:
+            {
+            iLogs->DeleteAllL();
+            break;
+            }
+        case ECmdDeleteCreatorLogs:
+            {
+            iLogs->DeleteAllCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteMessages:
+            {
+            iMessages->DeleteAllL();
+            break;
+            }
+        case ECmdDeleteCreatorMessages:
+            {
+            iMessages->DeleteAllCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteLandmarks:
+            {
+            iLandmarks->DeleteAllL();
+            break;
+            }
+        case ECmdDeleteCreatorLandmarks:
+            {
+            iLandmarks->DeleteAllCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteMailboxes:
+            {
+            iMailboxes->DeleteAllL();
+            break;
+            }
+        case ECmdDeleteCreatorMailboxes:
+            {
+            iMailboxes->DeleteAllCreatedByCreatorL();
+            break;
+            }
+
+        case ECmdDeleteNotes:
+            {
+            iNotepad->DeleteAllL();
+            break;
+            }
+
+        case ECmdDeleteIMPSs:
+            {
+//            iIMPS->DeleteAllL();
+            break;
+            }
+        case ECmdDeleteCreatorIMPSs:
+            {
+//            iIMPS->DeleteAllCreatedByCreatorL();
+            break;
+            }
+/*            
+        case ECmdDeleteBrowserBookmarks:
+            {
+            iBrowser->DeleteAllBookmarksL();
+            break;
+            }
+        case ECmdDeleteCreatorBrowserBookmarks:
+            {
+            iBrowser->DeleteAllBookmarksCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteBrowserBookmarkFolders:
+            {
+            iBrowser->DeleteAllBookmarkFoldersL();
+            break;
+            }
+        case ECmdDeleteCreatorBrowserBookmarkFolders:
+            {
+            iBrowser->DeleteAllBookmarkFoldersCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteBrowserSavedPages:
+            {
+            iBrowser->DeleteAllSavedPagesL();
+            break;
+            }
+        case ECmdDeleteCreatorBrowserSavedPages:
+            {
+            iBrowser->DeleteAllSavedPagesCreatedByCreatorL();
+            break;
+            }
+        case ECmdDeleteBrowserSavedPageFolders:
+            {
+            iBrowser->DeleteAllSavedPageFoldersL();
+            break;
+            }
+        case ECmdDeleteCreatorBrowserSavedPageFolders:
+            {
+            iBrowser->DeleteAllSavedPageFoldersCreatedByCreatorL();
+            break;
+            }
+*/            
+        case ECmdDeleteCreatorFiles:
+            {
+            iFiles->DeleteAllCreatedByCreatorL();
+            break;
+            }
+        default:
+            User::Panic (_L("ExecuteOptionsMenuCommandL"), 205);
+            break;
+        }
+
+    TRAP_IGNORE( CheckForMoreCommandsL() );
+
+    }
+    
+CDesCArrayFlat* CCreatorEngine::PictureFilesL()
+    {
+    if( iPictureFileArray == 0 )
+        {
+        _LIT(KImageFile, "JPEG*.jpg");
+        _LIT(KImageFileDir, "C:\\Data\\");
+        _LIT(KImageFileDir2, "Z:\\Data\\");
+        iPictureFileArray = new (ELeave) CDesCArrayFlat(8);        
+        TInt err = CreatorFileUtils::FindFilesRecursiveL(iPictureFileArray, KImageFile, KImageFileDir);
+        if( iPictureFileArray->Count() == 0 )
+            {
+            err = CreatorFileUtils::FindFilesRecursiveL(iPictureFileArray, KImageFile, KImageFileDir2);
+            }
+        }
+    return iPictureFileArray;
+    }
+
+CDesCArrayFlat* CCreatorEngine::SoundFilesL()
+    {
+    if( iSoundFileArray == 0 )
+        {
+        _LIT(KSoundFile, "*.aac");
+        _LIT(KSoundFileDir, "Z:\\data\\Sounds\\");
+        iSoundFileArray = new (ELeave) CDesCArrayFlat(8);                  
+        TInt err = CreatorFileUtils::FindFilesRecursiveL(iSoundFileArray, KSoundFile, KSoundFileDir);
+        }
+    return iSoundFileArray;
+    }
+// ---------------------------------------------------------------------------
+
+TInt CCreatorEngine::RunError(TInt aError)
+    {
+    LOGSTRING2("Creator: CCreatorEngine::RunError %d", aError);
+    
+    iFailedCommands++;
+  
+    _LIT(KMessage, "Command error %d");
+    TBuf<128> noteMsg;
+    noteMsg.Format(KMessage, aError);
+//    iEnv->InfoMsg(noteMsg);
+	iEngineWrapper->ShowNote(noteMsg);  
+    TRAP_IGNORE( CheckForMoreCommandsL() );
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::CheckForMoreCommandsL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL");
+    if ( iUserCancelled ) 
+		{
+		return;
+		}
+    // update the progress bar
+    //iProgressInfo->IncrementAndDraw(1);
+	iEngineWrapper->IncrementProgressbarValue();
+
+	// check if we have more commands to be executed
+	if (iCurrentEntry >= CommandArrayCount() - 1)
+		{
+        LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL all done");
+
+        // all done, free resources and show a note
+        ShutDownEnginesL();
+
+		//iProgressDialog->ProcessFinishedL();
+		
+		// remove the progress dialog from the screen
+        iEngineWrapper->CloseProgressbar();
+		
+		if (iFailedCommands == 0)
+		    {
+		    iEngineWrapper->ShowNote(_L("Done"));
+		    }
+		else
+		    {
+			_LIT(KMessage, "Done, %d commands failed");
+            TBuf<128> noteMsg;
+            noteMsg.Format(KMessage, iFailedCommands);
+			iEngineWrapper->ShowNote(noteMsg);
+		    }
+		
+	    iCmdScriptRun->RunScriptDone();
+
+		}
+	else
+		{
+		// maintain requests
+		iCurrentEntry++;
+
+        LOGSTRING2("Creator: CCreatorEngine::CheckForMoreCommandsL iCurrentEntry=%d", iCurrentEntry);
+
+        ExecuteCommand();
+		}
+    }
+
+// ---------------------------------------------------------------------------
+void CCreatorEngine::SortCommands()
+	{
+	TKeyArrayFix iBufKey(_FOFF(TCommand, iCommandId),ECmpTInt);
+	iCommandArray->Sort(iBufKey);
+	}
+// ---------------------------------------------------------------------------
+
+// This callback function is called when cancel button of the progress bar was pressed
+
+void CCreatorEngine::ProgressDialogCancelledL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::ProgressDialogCancelledL");
+
+        iUserCancelled = ETrue;
+        // cancel the active object, command executer 
+        Cancel();
+
+        // delete parameters from the command array, otherwise there might be memory leaks
+        for (TInt i=iCurrentEntry; i<CommandArrayCount(); i++)
+            {
+            if ( iCommandArray->At(i).iParameters )
+				{
+                delete iCommandArray->At(i).iParameters;
+                iCommandArray->At(i).iParameters = NULL;
+				}
+            }
+
+        if ( iDecoder  )
+            {
+            iDecoder->Cancel();
+            // CancelComplete() will be called from GenerateSourceImageFileL
+            }
+        else if ( iScaler )
+            {
+            iScaler->Cancel();
+            // CancelComplete() will be called from GenerateSourceImageFileL
+            }
+        else if ( iEncoder  )
+            {
+            iEncoder->Cancel();
+            // CancelComplete() will be called from GenerateSourceImageFileL
+            }
+        else
+            {
+            // free resources and show a note
+            ShutDownEnginesL();
+            iEngineWrapper->ShowNote(_L("Cancelled"));
+            }
+        
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::StartEnginesL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::StartEnginesL");
+    
+    // reset user cancel flag
+    iUserCancelled = EFalse;
+    
+    // start from the beginning
+    iCurrentEntry = 0;
+
+    // init the command array
+    __ASSERT_ALWAYS(!iCommandArray, User::Panic(_L("iCommandArray"), 701));
+    iCommandArray = new(ELeave) CCommandArray(10000);
+
+    // init all modules here
+    TInt err(KErrNone);
+//    TRAP(err, iBrowser = CCreatorBrowser::NewL(this));
+    TRAP(err, iCalendar = CCreatorInterimCalendar::NewL(this));
+    TRAP(err, iPhonebook = (CCreatorPhonebookBase*)TCreatorFactory::CreatePhoneBookL(this)); 
+    TRAP(err, iNotepad = CCreatorNotepad::NewL(this));
+    TRAP(err, iLogs = CCreatorLogs::NewL(this));
+//    TRAP(err, iAccessPoints = (CCreatorConnectionSettingsBase*)TCreatorFactory::CreateConnectionSettingsL(this));
+    TRAP(err, iMailboxes = CCreatorMailboxes::NewL(this));
+    TRAP(err, iFiles = CCreatorFiles::NewL(this));
+    TRAP(err, iMessages = CCreatorMessages::NewL(this));
+    TRAP(err, iLandmarks = CCreatorLandmarks::NewL(this));
+    ContactLinkCache::InitializeL();
+/*
+    #ifdef __PRESENCE
+      TRAP(err, iIMPS = CCreatorIMPS::NewL(this));
+    #endif 
+*/
+      
+      
+    // ...
+    // ...
+    // ...
+
+    }
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::ShutDownEnginesL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::ShutDownEnginesL");
+
+        
+    // delete all modules here and free resources which aren't anymore needed
+
+/*
+    #ifdef __PRESENCE
+     delete iIMPS;
+     iIMPS = NULL;
+    #endif
+*/
+    delete iMessages;
+    iMessages = NULL;
+    delete iFiles;
+    iFiles = NULL;
+    delete iMailboxes;
+    iMailboxes = NULL;
+ //   delete iAccessPoints;
+//    iAccessPoints = NULL;
+    delete iLogs;
+    iLogs = NULL;
+    delete iNotepad;
+    iNotepad = NULL;
+    delete iPhonebook;
+    iPhonebook = NULL;
+    delete iCalendar;
+    iCalendar = NULL;
+ //   delete iBrowser;
+ //   iBrowser = NULL;
+    delete iLandmarks;
+    iLandmarks = NULL;
+
+    ContactLinkCache::DestroyL();
+    // now delete the command array
+    delete iCommandArray;
+    iCommandArray = NULL;
+	
+	// delete parameter array
+	iParameterArray.ResetAndDestroy();
+	iParameterArray.Close();
+	
+	if(iCommandParser)
+	    {
+        delete iCommandParser;
+	    iCommandParser = NULL;
+	    }
+    
+    
+	// clear temp drive
+	CFileMan* fileMan = CFileMan::NewL( iEnv->FsSession() );
+	CleanupStack::PushL( fileMan );
+	fileMan->RmDir( iTempPath->Des() );
+	CleanupStack::PopAndDestroy(); //fileMan
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::DoCancel()
+    {
+    LOGSTRING("Creator: CCreatorEngine::DoCancel");
+
+    iTimer.Cancel();
+    }
+
+void CCreatorEngine::ScriptChosenL( TBool aSuccess, const TDesC& aFileName )
+    {
+    if( aSuccess )
+        {
+        // open the file for reading
+        RFile scriptFile;
+        User::LeaveIfError( scriptFile.Open( iEnv->FsSession(), aFileName, EFileRead ) );
+        CleanupClosePushL(scriptFile);
+    
+        
+        // wait dialog
+        /* TODO
+        CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
+        waitDialog->SetSoftkeys( R_AVKON_SOFTKEYS_CANCEL );
+        TInt dialogId = waitDialog->ShowNoteL( EAknGlobalWaitNote, _L("Parsing") );
+        */
+        TInt parseErr( KErrNone );
+        CCreatorScriptParser* scriptParser = CCreatorScriptParser::NewLC(this);
+        scriptParser->ParseL(scriptFile);
+        parseErr = scriptParser->GetError();
+        CleanupStack::PopAndDestroy( scriptParser );
+    
+        CleanupStack::PopAndDestroy( &scriptFile );
+    
+        //waitDialog->CancelNoteL( dialogId );
+        //CleanupStack::PopAndDestroy( waitDialog );
+    
+        if(parseErr != KErrNone)
+            {
+            // show error note
+            _LIT(KErrMsg, "Parser error: %d");
+            TBuf<32> msgBuf;
+            msgBuf.Format(KErrMsg, parseErr);
+            iEngineWrapper->ShowErrorMessage(msgBuf);
+            ShutDownEnginesL();
+            return;
+            }         
+        }
+
+    // start executing commands if commands in the command array
+    if (CommandArrayCount() > 0)
+        {
+        ExecuteFirstCommandL( KSavingText );
+        }
+    else
+        {
+        ShutDownEnginesL();
+        }
+    }
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::RunScriptL()
+    {
+    LOGSTRING("Creator: CCreatorEngine::RunScriptL");
+
+    // startup modules (also inits the command array):
+    StartEnginesL();
+
+    // use the command parser module to init the command array from a script file
+    delete iCommandParser;
+    iCommandParser = NULL;
+    iCommandParser = CCommandParser::NewL(this);
+    TBool ret = EFalse;
+    TRAPD(err, ret = iCommandParser->OpenScriptL( this ) );
+    if( err != KErrNone || ret == EFalse)
+        {
+        ShutDownEnginesL();
+        User::LeaveIfError(err);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CCreatorEngine::RunScriptL(const TDesC& aScriptFile)
+    {
+    LOGSTRING("Creator: CCreatorEngine::RunScriptL");
+
+    // startup modules (also inits the command array):
+    StartEnginesL();
+
+    RFile scriptFile;
+    if (scriptFile.Open(CEikonEnv::Static()->FsSession(), aScriptFile, EFileRead) != KErrNone)
+    	{
+    	ShutDownEnginesL();
+    	return KErrNotFound; // file error
+    	}
+    
+    CleanupClosePushL(scriptFile);
+    CCreatorScriptParser* scriptParser = CCreatorScriptParser::NewLC(this);
+    scriptParser->ParseL(scriptFile);
+    TInt err = scriptParser->GetError();
+    CleanupStack::PopAndDestroy(); //scriptParser
+    CleanupStack::Pop(); // scriptFile
+    scriptFile.Close();
+        
+    if (err != KErrNone)
+        {
+        ShutDownEnginesL();
+        return KErrCorrupt; // parser error
+        }         
+
+    // start executing commands if commands in the command array
+    if (CommandArrayCount() > 0)
+        {
+        ExecuteFirstCommandL( KSavingText );
+        return KErrNone; // executing commands is started
+        }
+    else
+        {
+        ShutDownEnginesL();
+        return KErrCompletion; // nothing to do
+        }
+    }
+
+// ---------------------------------------------------------------------------
+void CCreatorEngine::QueryDialogClosedL( TBool aPositiveAction, TInt aUserData )
+    {
+    LOGSTRING("Creator: CCreatorEngine::QueryDialogClosedL");
+    
+    if( aPositiveAction == EFalse )
+        {
+        ShutDownEnginesL();
+        return;
+        }
+
+    switch(aUserData)
+        {
+        case ECreatorEngineDeleteAllEntries:
+            AppendToCommandArrayL( ECmdDeleteContacts, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteContactGroups, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCalendarEntries, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteBrowserBookmarks, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteBrowserBookmarkFolders, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteBrowserSavedPages, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteBrowserSavedPageFolders, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteLogs, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteMessages, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteIAPs, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteIMPSs, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteNotes, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteLandmarks, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorFiles, NULL, 1 );
+            
+            // started exucuting delete commands
+            ExecuteFirstCommandL( KDeletingText );
+            break;
+        case ECreatorEngineDeleteAllCreatorEntries:
+            AppendToCommandArrayL( ECmdDeleteCreatorContacts, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorContactGroups, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorCalendarEntries, NULL, 1 );
+            /*
+            AppendToCommandArrayL( ECmdDeleteCreatorBrowserBookmarks, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorBrowserBookmarkFolders, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorBrowserSavedPages, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorBrowserSavedPageFolders, NULL, 1 );
+            */
+            AppendToCommandArrayL( ECmdDeleteCreatorFiles, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorLogs, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorMessages, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteCreatorIAPs, NULL, 1 );
+            //AppendToCommandArrayL( ECmdDeleteCreatorIMPSs, NULL, 1 );
+            AppendToCommandArrayL( ECmdDeleteCreatorLandmarks, NULL, 1 );
+            
+            // started exucuting delete commands
+            ExecuteFirstCommandL( KDeletingText );
+            break;
+        default:
+            //some error
+             ShutDownEnginesL();
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::ExecuteOptionsMenuCommandL(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorEngine::ExecuteOptionsMenuCommandL");
+
+    // startup modules (also inits the command array):
+    StartEnginesL();
+
+    // set the home module
+    switch(aCommand)
+        {
+/*
+        case ECmdCreateBrowserBookmarkEntries:
+	    case ECmdCreateBrowserBookmarkFolderEntries:
+	    case ECmdCreateBrowserSavedPageEntries:
+	    case ECmdCreateBrowserSavedPageFolderEntries:
+	    case ECmdDeleteBrowserBookmarks:
+	    case ECmdDeleteBrowserBookmarkFolders:
+	    case ECmdDeleteBrowserSavedPages:
+	    case ECmdDeleteBrowserSavedPageFolders:
+        case ECmdDeleteCreatorBrowserBookmarks:
+        case ECmdDeleteCreatorBrowserBookmarkFolders:
+        case ECmdDeleteCreatorBrowserSavedPages:
+        case ECmdDeleteCreatorBrowserSavedPageFolders:
+            {
+            iUsedOptionsMenuModule = iBrowser;
+            }
+            break;
+*/	    
+        case ECmdCreateCalendarEntryAppointments:
+	    case ECmdCreateCalendarEntryEvents:
+	    case ECmdCreateCalendarEntryAnniversaries:
+	    case ECmdCreateCalendarEntryToDos:
+	    case ECmdCreateCalendarEntryReminders:
+	    case ECmdDeleteCalendarEntries:
+	    case ECmdDeleteCreatorCalendarEntries:
+            {
+            iUsedOptionsMenuModule = iCalendar;
+            }
+            break;
+
+	    case ECmdCreatePhoneBookEntryContacts:
+	    case ECmdCreatePhoneBookEntryGroups:
+	    case ECmdCreatePhoneBookEntrySubscribedContacts:
+	    case ECmdDeleteContacts:
+	    case ECmdDeleteCreatorContacts:
+        case ECmdDeleteContactGroups:
+        case ECmdDeleteCreatorContactGroups:
+            {
+            iUsedOptionsMenuModule = iPhonebook;
+            }
+            break;
+
+	    case ECmdCreateMiscEntryNotes:
+	    case ECmdDeleteNotes:
+            {
+            iUsedOptionsMenuModule = iNotepad;
+            }
+            break;
+
+	    case ECmdCreateLogEntryMissedCalls:
+	    case ECmdCreateLogEntryReceivedCalls:
+	    case ECmdCreateLogEntryDialledNumbers:
+	    case ECmdDeleteLogs:
+	    case ECmdDeleteCreatorLogs:
+            {
+            iUsedOptionsMenuModule = iLogs;
+            }
+            break;
+/*
+	    case ECmdCreateMiscEntryAccessPoints:
+	    case ECmdDeleteIAPs:
+	    case ECmdDeleteCreatorIAPs:
+            {
+            iUsedOptionsMenuModule = iAccessPoints;
+            }
+            break;
+*/
+	    case ECmdCreateMessagingEntryMailboxes:
+	    case ECmdDeleteMailboxes:
+	    case ECmdDeleteCreatorMailboxes:
+            {
+            iUsedOptionsMenuModule = iMailboxes;
+            }
+            break;
+/*
+        #ifdef __PRESENCE
+	      case ECmdCreateMiscEntryIMPSServers:
+	      case ECmdDeleteIMPSs:
+	      case ECmdDeleteCreatorIMPSs:
+            {
+            iUsedOptionsMenuModule = iIMPS;
+            }
+            break;
+        #endif
+*/
+	      case ECmdCreateFileEntryEmptyFolder:
+	      case ECmdCreateFileEntry3GPP_70kB:
+	      case ECmdCreateFileEntryAAC_100kB:
+	      case ECmdCreateFileEntryAMR_20kB:
+	      case ECmdCreateFileEntryBMP_25kB:
+	      case ECmdCreateFileEntryDeck_1kB:
+	      case ECmdCreateFileEntryDOC_20kB:
+	      case ECmdCreateFileEntryGIF_2kB:
+	      case ECmdCreateFileEntryHTML_20kB:
+	      case ECmdCreateFileEntryJAD_1kB:
+	      case ECmdCreateFileEntryJAR_10kB:
+	      case ECmdCreateFileEntryJP2_65kB:
+	      case ECmdCreateFileEntryJPEG_200kB:
+	      case ECmdCreateFileEntryJPEG_25kB:
+	      case ECmdCreateFileEntryJPEG_500kB:
+	      case ECmdCreateFileEntryMIDI_10kB:
+	      case ECmdCreateFileEntryMP3_250kB:
+	      case ECmdCreateFileEntryMP4_200kB:
+	      case ECmdCreateFileEntryMXMF_40kB:
+	      case ECmdCreateFileEntryPNG_15kB:
+	      case ECmdCreateFileEntryPPT_40kB:
+	      case ECmdCreateFileEntryRAM_1kB:
+	      case ECmdCreateFileEntryRM_95kB:
+	      case ECmdCreateFileEntryRNG_1kB:
+	      case ECmdCreateFileEntrySVG_15kB:
+	      case ECmdCreateFileEntrySWF_15kB:
+	      case ECmdCreateFileEntryTIF_25kB:
+	      case ECmdCreateFileEntryTXT_10kB:
+	      case ECmdCreateFileEntryTXT_70kB:
+	      case ECmdCreateFileEntryVCF_1kB:
+	      case ECmdCreateFileEntryVCS_1kB:
+	      case ECmdCreateFileEntryWAV_20kB:
+	      case ECmdCreateFileEntryXLS_15kB:
+	      case ECmdCreateFileEntrySISX_10kB:
+	      case ECmdCreateFileEntryWMA_50kB:
+	      case ECmdCreateFileEntryWMV_200kB:
+	      case ECmdDeleteCreatorFiles:
+
+            {
+            iUsedOptionsMenuModule = iFiles;
+            }
+            break;
+
+
+        case ECmdCreateMessagingEntryMessages:
+        case ECmdDeleteMessages:
+        case ECmdDeleteCreatorMessages:
+            {
+            iUsedOptionsMenuModule = iMessages;
+            }
+            break;
+            
+        case ECmdCreateMiscEntryLandmarks:
+        case ECmdDeleteLandmarks:
+        case ECmdDeleteCreatorLandmarks:
+            {
+            iUsedOptionsMenuModule = iLandmarks;
+            }
+            break;
+        case ECmdDeleteAllEntries:
+        case ECmdDeleteAllCreatorEntries:
+            {
+            break;
+            }
+        default:
+            User::Panic (_L("ExecuteOptionsMenuCommandL"), 201);
+            break;
+        }
+
+
+    //If it's a delete command, asking do you really want to delete
+    if( IsDeleteCommand( aCommand ) )
+        {
+        if ( aCommand == ECmdDeleteAllEntries )
+            {
+            if ( !iEngineWrapper->YesNoQueryDialog( _L("Delete all entries?"), this, ECreatorEngineDeleteAllEntries) )
+                {
+                // cancelled, free resources
+                ShutDownEnginesL();
+                }
+            }
+        else if ( aCommand == ECmdDeleteAllCreatorEntries )
+            {
+            if ( !iEngineWrapper->YesNoQueryDialog( _L("Delete all entries created with Creator?"), this, ECreatorEngineDeleteAllCreatorEntries ) )
+                {
+                // cancelled, free resources
+                ShutDownEnginesL();
+                }
+            }
+        else if ( !iUsedOptionsMenuModule->AskDataFromUserL( aCommand )  )
+            {
+            // cancelled or error, free resources
+            ShutDownEnginesL();
+            }
+        }
+
+    // ask user data, if query accepted start processing...
+    else if (!iUsedOptionsMenuModule->AskDataFromUserL(aCommand))
+        {
+        // cancelled or error, free resources
+        ShutDownEnginesL();
+        }
+    }
+
+
+
+TBool CCreatorEngine::IsDeleteCommand(TInt aCommand)
+    {
+    LOGSTRING("Creator: CCreatorEngine::IsDeleteCommand");
+
+    switch(aCommand)
+        {
+        //Add supported delete command here        
+        case ECmdDeleteAllEntries:
+        case ECmdDeleteAllCreatorEntries:
+        case ECmdDeleteEntries:
+        case ECmdDeleteContacts:
+        case ECmdDeleteCreatorContacts:
+        case ECmdDeleteContactGroups:
+        case ECmdDeleteCreatorContactGroups:
+        case ECmdDeleteCalendarEntries:
+        case ECmdDeleteCreatorCalendarEntries:
+        case ECmdDeleteBrowserBookmarks:
+        case ECmdDeleteCreatorBrowserBookmarks:
+        case ECmdDeleteBrowserBookmarkFolders:
+        case ECmdDeleteCreatorBrowserBookmarkFolders:
+        case ECmdDeleteBrowserSavedPages:
+        case ECmdDeleteCreatorBrowserSavedPages:
+        case ECmdDeleteBrowserSavedPageFolders:
+        case ECmdDeleteCreatorBrowserSavedPageFolders:
+        case ECmdDeleteCreatorFiles:
+        case ECmdDeleteLogs:
+        case ECmdDeleteCreatorLogs:
+        case ECmdDeleteMessages:
+        case ECmdDeleteCreatorMessages:
+        case ECmdDeleteMailboxes:
+        case ECmdDeleteCreatorMailboxes:
+        case ECmdDeleteIAPs:
+        case ECmdDeleteCreatorIAPs:
+        case ECmdDeleteIMPSs:
+        case ECmdDeleteCreatorIMPSs:
+        case ECmdDeleteNotes:
+        case ECmdDeleteLandmarks:
+        case ECmdDeleteCreatorLandmarks:
+            {
+            return ETrue;
+            }
+        default:
+            {
+            return EFalse;
+            }
+        }
+     
+    }
+// ---------------------------------------------------------------------------
+void CCreatorEngine::RandomDataFileChosenL( TBool aSuccess, const TDesC& aFileName )
+    {
+    if( aSuccess )
+        {
+        GetRandomDataFromFileL( aFileName );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+TBool CCreatorEngine::GetRandomDataL()
+	{
+    delete iCommandParser;
+    iCommandParser = NULL;
+    iCommandParser = CCommandParser::NewL( this );
+	return iCommandParser->GetRandomDataFilenameL( this );
+	}
+
+// ---------------------------------------------------------------------------
+
+TBool CCreatorEngine::GetRandomDataFromFileL(const TDesC& aFilename)
+	{
+    // wait dialog
+	// TODO
+    //CAknGlobalNote* waitDialog = CAknGlobalNote::NewLC();
+    //waitDialog->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
+    //TInt dialogId = waitDialog->ShowNoteL(EAknGlobalWaitNote, _L("Reading random data"));
+
+    for (TInt i = 0; i < iStringArrays.Count(); ++i)
+        {
+        delete iStringArrays[i].iArrayPtr;
+        }
+    iStringArrays.Reset();
+
+    TBool errorDetected = EFalse;
+
+    // NOTE: These must be exactly in same order as in enumeration:
+
+    if (ReadRandomDataL(EFirstName, R_DATA_FIRSTNAMES, aFilename, CCreatorRandomDataParser::EFirstName) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(ESurname, R_DATA_SURNAMES, aFilename, CCreatorRandomDataParser::ESurname) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(ECompany, R_DATA_COMPANIES, aFilename, CCreatorRandomDataParser::ECompany) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EAddress, R_DATA_ADDRESSES, aFilename, CCreatorRandomDataParser::EAddress) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EJobTitle, R_DATA_JOBTITLES, aFilename, CCreatorRandomDataParser::EJobTitle) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EPhoneNumber, R_DATA_PHONENUMBERS, aFilename, CCreatorRandomDataParser::EPhoneNumber) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EGroupName, R_DATA_GROUPNAMES, aFilename, CCreatorRandomDataParser::EGroupName) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EMeetingReason, R_DATA_MEETINGREASONS, aFilename, CCreatorRandomDataParser::EMeetingReason) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EMeetingPlace, R_DATA_MEETINGPLACES, aFilename, CCreatorRandomDataParser::EMeetingPlace) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EMemoText, R_DATA_MEMOS, aFilename, CCreatorRandomDataParser::EMemoText) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EAnniversaryReason, R_DATA_ANNIVERSARIES, aFilename, CCreatorRandomDataParser::EAnniversaryReason) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EToDoText, R_DATA_TODOS, aFilename, CCreatorRandomDataParser::EToDoText) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EReminderText, R_DATA_REMINDERS, aFilename, CCreatorRandomDataParser::EReminderText) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EMessageSubject, R_DATA_MESSAGESUBJECTS, aFilename, CCreatorRandomDataParser::EMessageSubject) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EMessageText, R_DATA_MESSAGETEXTS, aFilename, CCreatorRandomDataParser::EMessageText) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(ECity, R_DATA_CITIES, aFilename, CCreatorRandomDataParser::ECity) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(ECountry, R_DATA_COUNTRIES, aFilename, CCreatorRandomDataParser::ECountry) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EPostcode, R_DATA_POSTCODES, aFilename, CCreatorRandomDataParser::EPostcode) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EState, R_DATA_STATES, aFilename, CCreatorRandomDataParser::EState) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EPobox, R_DATA_POBOXES, aFilename, CCreatorRandomDataParser::EPobox) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(EPrefix, R_DATA_PREFIXES, aFilename, CCreatorRandomDataParser::EPrefix) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(ESuffix, R_DATA_SUFFIXES, aFilename, CCreatorRandomDataParser::ESuffix) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(ELandmarkName, R_DATA_LANDMARK_NAMES, aFilename, CCreatorRandomDataParser::ELandmarkName) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    if (ReadRandomDataL(ELandmarkDescription, R_DATA_LANDMARK_DESCRIPTIONS, aFilename, CCreatorRandomDataParser::ELandmarkDescription) != KErrNone)
+    	{
+    	errorDetected = ETrue;
+    	}
+    
+    // remove the wait dialog
+    //waitDialog->CancelNoteL(dialogId);
+    //CleanupStack::PopAndDestroy(waitDialog);
+    
+    if (errorDetected)
+    	{
+		iEngineWrapper->ShowNote(_L("Error in reading random data."));
+   	}
+    return !errorDetected;
+	}
+
+// ---------------------------------------------------------------------------
+
+TInt CCreatorEngine::ReadRandomDataL(const TRandomStringType aRandomStringType,
+		                             const TInt aResourceId,
+		                             const TDesC& aFilename,
+		                             const CCreatorRandomDataParser::TRandomDataType aRandomDataType)
+	{
+	TInt error = KErrNone;
+	if (aFilename == KNullDesC)
+		{
+        iStringArrays.AppendL(TStringArrayPtr(aRandomStringType, iEnv->ReadDesCArrayResourceL(aResourceId)));
+		}
+	else
+		{
+	    CCreatorRandomDataParser* dataParser = CCreatorRandomDataParser::NewLC();
+		CDesCArrayFlat* array = NULL;
+	
+		TRAP(error, array = dataParser->ParseL(aFilename, aRandomDataType));
+		if (error == KErrNone)
+			{
+			error = dataParser->GetError();
+			}
+	    if ((error == KErrNone) && (array->MdcaCount() > 0))
+	    	{
+	    	iStringArrays.AppendL(TStringArrayPtr(aRandomStringType, array));
+	    	}
+	    else
+	    	{
+	    	if (array)
+	    		{
+	    		array->Reset();
+	    		delete array;
+	    		}
+	        iStringArrays.AppendL(TStringArrayPtr(aRandomStringType, iEnv->ReadDesCArrayResourceL(aResourceId)));
+	    	}
+		CleanupStack::PopAndDestroy(dataParser);
+		}
+	return error;
+	}
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::AppendToCommandArrayL(TInt aCommand, CCreatorModuleBaseParameters* aParameters, TInt aNumberOfEntries)
+    {
+    LOGSTRING("Creator: CCreatorEngine::AppendToCommandArrayL");
+    iParameterArray.AppendL(aParameters);
+
+    for (TInt i=0; i<aNumberOfEntries; i++)
+        iCommandArray->AppendL( TCommand(aCommand, aParameters) );
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CCreatorEngine::CommandArrayCount()
+    {
+    TInt count(0);
+    
+    if (iCommandArray)
+        count = iCommandArray->Count();
+    
+    LOGSTRING2("Creator: CCreatorEngine::CommandArrayCount returns %d", count);
+    
+    return count;
+    }
+
+// ---------------------------------------------------------------------------
+
+//returs fileid by its name, eg. 1 in 
+TInt CCreatorEngine::GetAttachmentIdL( const TDesC& aAttachmentIdStr ) const
+    {
+    TInt mapCount = sizeof(FileMap) / sizeof(FileMapping);
+    
+    for( TInt i = 0; i < mapCount; ++i )
+        {
+        if( FileMap[i].FileName() == aAttachmentIdStr )
+            return FileMap[i].FileId();
+        }
+    LOGSTRING2("CCreatorEngine::GetAttachmentIdL: Unknown attachment file id: %s", &aAttachmentIdStr);
+    User::Leave(KErrGeneral);
+    return KErrNotFound; // Not reached, but disables a compiler warning
+    }
+
+// ---------------------------------------------------------------------------
+
+// returns a random string from the resource files
+TPtrC CCreatorEngine::TestDataPathL (enum TTestDataPath aTestDataPath )
+    {
+    LOGSTRING("Creator: CCreatorEngine::TestDataPathL");
+
+    static TFileName filePath;
+
+    switch (aTestDataPath )
+        {
+        case ESavedDeck_1kB:
+            {
+            filePath.Copy (_L("Deck-1kB.saveddeck") );
+            }
+            break;
+    
+        case EJPEG_25kB:
+            {
+            filePath.Copy (_L("JPEG-25kB.jpg") );
+            }
+            break;
+    
+        case EJPEG_200kB:
+            {
+            filePath.Copy (_L("JPEG-200kB.jpg") );
+            }
+            break;
+    
+        case EJPEG_500kB:
+            {
+            filePath.Copy (_L("JPEG-500kB.jpg") );
+            }
+            break;
+    
+        case EPNG_15kB:
+            {
+            filePath.Copy (_L("PNG-15kB.png") );
+            }
+            break;
+    
+        case EGIF_2kB:
+            {
+            filePath.Copy (_L("GIF-2kB.gif") );
+            }
+            break;
+    
+        case ERNG_1kB:
+            {
+            filePath.Copy (_L("RNG-1kB.rng") );
+            }
+            break;
+    
+        case EMIDI_10kB:
+            {
+            filePath.Copy (_L("MIDI-10kB.mid") );
+            }
+            break;
+    
+        case EWAVE_20kB:
+            {
+            filePath.Copy (_L("WAV-20kB.wav") );
+            }
+            break;
+    
+        case EAMR_20kB:
+            {
+            filePath.Copy (_L("AMR-20kB.amr") );
+            }
+            break;
+    
+        case EExcel_15kB:
+            {
+            filePath.Copy (_L("XLS-15kB.xls") );
+            }
+            break;
+    
+        case EWord_20kB:
+            {
+            filePath.Copy (_L("DOC-20kB.doc") );
+            }
+            break;
+    
+        case EPowerPoint_40kB:
+            {
+            filePath.Copy (_L("PPT-40kB.ppt") );
+            }
+            break;
+    
+        case EText_10kB:
+            {
+            filePath.Copy (_L("TXT-10kB.txt") );
+            }
+            break;
+    
+        case EText_70kB:
+            {
+            filePath.Copy (_L("TXT-70kB.txt") );
+            }
+            break;
+    
+        case E3GPP_70kB:
+            {
+            filePath.Copy (_L("3GPP-70kB.3gpp") );
+            }
+            break;
+    
+        case EMP3_250kB:
+            {
+            filePath.Copy (_L("MP3-250kB.mp3") );
+            }
+            break;
+    
+        case EAAC_100kB:
+            {
+            filePath.Copy (_L("AAC-100kB.aac") );
+            }
+            break;
+    
+        case ERM_95kB:
+            {
+            filePath.Copy (_L("RM-95kB.rm") );
+            }
+            break;
+    
+        case EBMP_25kB:
+            {
+            filePath.Copy (_L("BMP-25kB.bmp") );
+            }
+            break;
+        case EHTML_20kB:
+            {
+            filePath.Copy (_L("HTML-20kB.html") );
+            }
+            break;
+        case EJAD_1kB:
+            {
+            filePath.Copy (_L("JAD-1kB.jad") );
+            }
+            break;
+        case EJAR_10kB:
+            {
+            filePath.Copy (_L("JAR-10kB.jar") );
+            }
+            break;
+        case EJP2_65kB:
+            {
+            filePath.Copy (_L("JP2-65kB.jp2") );
+            }
+            break;
+        case EMP4_200kB:
+            {
+            filePath.Copy (_L("MP4-200kB.mp4") );
+            }
+            break;
+        case EMXMF_40kB:
+            {
+            filePath.Copy (_L("MXMF-40kB.mxmf") );
+            }
+            break;
+        case ERAM_1kB:
+            {
+            filePath.Copy (_L("RAM-1kB.ram") );
+            }
+            break;
+        case ESVG_15kB:
+            {
+            filePath.Copy (_L("SVG-15kB.svg") );
+            }
+            break;
+        case ESWF_15kB:
+            {
+            filePath.Copy (_L("SWF-15kB.swf") );
+            }
+            break;
+        case ETIF_25kB:
+            {
+            filePath.Copy (_L("TIF-25kB.tif") );
+            }
+            break;
+        case EVCF_1kB:
+            {
+            filePath.Copy (_L("VCF-1kB.vcf") );
+            }
+            break;
+        case EVCS_1kB:
+            {
+            filePath.Copy (_L("VCS-1kB.vcs") );
+            }
+            break;
+        case ESISX_10kB:
+            {
+            filePath.Copy (_L("SISX-10kB.sisx") );
+            }
+            break;
+        case EWMA_50kB:
+            {
+            filePath.Copy (_L("WMA-50kB.wma") );
+            }
+            break;
+        case EWMV_200kB:
+            {
+            filePath.Copy (_L("WMV-200kB.wmv") );
+            }
+            break;
+
+        default:
+            User::Panic (_L("Test data"), 401 );
+            break;
+        }
+
+    TFileName fullTargetPath;
+    fullTargetPath.Copy( iTempPath->Des() );
+    fullTargetPath.Append( filePath );
+    if (ConeUtils::FileExists(fullTargetPath))
+        {        
+        // No need to copy, if the file already exists.
+        LOGSTRING2("Creator: CCreatorEngine::TestDataPathL %S already exists", &fullTargetPath);
+        return fullTargetPath;
+        }
+
+    // Define the path where the testdata can be retrieved
+	// get the data from the private directory in secure platform
+    TFileName fullAppPath = iEnv->EikAppUi()->Application()->AppFullName();
+	TChar driveLetter = fullAppPath[0];
+	TInt driveNumber;
+	
+	iEnv->FsSession().CharToDrive(driveLetter, driveNumber);
+	iEnv->FsSession().SetSessionToPrivate( driveNumber );   // "\\private\\20011383\\"
+ 
+
+    // check the file exists
+    if (!ConeUtils::FileExists(filePath))
+        {
+        LOGSTRING2("Creator: CCreatorEngine::TestDataPathL %S not found", &filePath);
+
+        TInt generatingError( KErrNone );
+        
+        // The file could be on C drive
+        iEnv->FsSession().SetSessionToPrivate( KRegisterDrive );
+        
+        if ( !ConeUtils::FileExists( filePath ) )
+            {
+            // The file is not on C drive, see if we can generate it
+            
+            // Make sure that the private path of this app in c-drive exists
+            iEnv->FsSession().CreatePrivatePath( KRegisterDrive );
+            
+            TFileName privatePath;
+            iEnv->FsSession().PrivatePath( privatePath );
+            privatePath.Append( filePath );
+            TChar privateDriveChar;
+            iEnv->FsSession().DriveToChar( KRegisterDrive, privateDriveChar );
+            TFileName fullPrivatePath; // full path of a file to be generated
+            fullPrivatePath.Append( privateDriveChar );
+            fullPrivatePath.Append( ':' );
+            fullPrivatePath.Append( privatePath );
+
+            switch ( aTestDataPath )
+                {
+                case EJPEG_25kB:
+                case EJPEG_200kB:
+                case EJPEG_500kB:
+                case EBMP_25kB:
+                case EGIF_2kB:
+                    {
+                    TRAP( generatingError, GenerateSourceImageFileL( aTestDataPath, fullPrivatePath ) );
+                    // GenerateSourceImageFileL calls TestDataPathL -> private session points to z
+                    // change it back to KRegisterDrive, because generated source file is there
+                    // and we need to copy it at the end of this function.
+                    iEnv->FsSession().SetSessionToPrivate( KRegisterDrive );
+                    break;
+                    }
+                case EText_10kB:
+                    {
+                    TRAP( generatingError, GenereteSourceTextFileL( fullPrivatePath, 10000 ) );
+                    // GenerateSourceImageFileL calls TestDataPathL -> private session points to z
+                    // change it back to KRegisterDrive, because generated source file is there
+                    // and we need to copy it at the end of this function.
+                    iEnv->FsSession().SetSessionToPrivate( KRegisterDrive );
+                    break;
+                    }
+                case EText_70kB:
+                    {
+                    TRAP( generatingError, GenereteSourceTextFileL( fullPrivatePath, 70000 ) );
+                    break;
+                    }
+                default:
+                    {
+                    generatingError = KErrNotSupported;
+                    break;
+                    }
+                }
+            }
+        
+        if ( iUserCancelled )
+            {
+            LOGSTRING("Creator: CCreatorEngine::TestDataPathL iUserCancelled" );
+            User::Leave( KErrCancel );
+            }
+        
+        if ( generatingError )
+            {
+            // Generating the file failed
+            
+            // cancel the dialog
+            //iProgressDialog->ProcessFinishedL();
+            //DialogDismissedL(EAknSoftkeyBack);
+
+			// remove the progress dialog from the screen
+			iEngineWrapper->CloseProgressbar();
+			
+			
+            // show error note
+            iEngineWrapper->ShowNote(_L("Test data missing"));
+			
+            User::Leave(KErrPathNotFound);
+            }
+        }
+
+	// now copy the data to D-drive to make the file public
+	iEnv->FsSession().MkDirAll( iTempPath->Des() );
+	TInt copyErr = BaflUtils::CopyFile(iEnv->FsSession(), filePath, fullTargetPath);
+	LOGSTRING4("Creator: CCreatorEngine::TestDataPathL copy %S to %S returns=%d", &filePath, &fullTargetPath, copyErr);
+	
+	// make sure that the file won't have a read only attribute
+	TEntry fileEntry;
+	iEnv->FsSession().Entry(fullTargetPath, fileEntry);
+	iEnv->FsSession().SetEntry(fullTargetPath, fileEntry.iModified, NULL, KEntryAttReadOnly);
+	
+	filePath = fullTargetPath;  // change the reference to the temp path
+    return filePath;
+    }
+
+
+// ---------------------------------------------------------------------------
+
+
+
+// a method to return a default Internet Access Point
+TUint32 CCreatorEngine::GetDefaultIAPL()
+	{
+    LOGSTRING("Creator: CCreatorEngine::GetDefaultIAPL");
+
+	TUint32 lIAPid = 1; // Default value
+
+	CCommsDatabase* cDatabase = CCommsDatabase::NewL();
+	CleanupStack::PushL(cDatabase);
+
+	CCommsDbTableView* tableView = cDatabase->OpenTableLC(TPtrC(IAP));
+
+	TInt errorCode = tableView->GotoFirstRecord();
+		
+	if ( errorCode == KErrNone ) 
+		{
+		TUint32	iValue;
+		tableView->ReadUintL(TPtrC(COMMDB_ID),iValue);
+		lIAPid = iValue;
+		}
+
+	CleanupStack::PopAndDestroy(2); // cDatabase,tableView
+
+	return lIAPid;
+	}
+
+// ---------------------------------------------------------------------------
+
+TUint32 CCreatorEngine::AccessPointNameToIdL(const TDesC& /*aAPName*/, TBool /*aAnyIfNotFound*/ )
+    {
+    LOGSTRING("Creator: CCreatorEngine::AccessPointNameToIdL");
+    // Accespoint impl moved from engine to accespoint implementations for supporting 3.0-3.1 and 3.2->
+    //return iAccessPoints->AccessPointNameToIdL(aAPName, aAnyIfNotFound );
+    return 0;
+    }
+
+static CCreatorEngine::TTestDataPath SoundFiles[] = {
+        CCreatorEngine::EMIDI_10kB,
+        CCreatorEngine::EWAVE_20kB,  
+        CCreatorEngine::EMP3_250kB,
+        CCreatorEngine::EAAC_100kB
+        };
+
+static CCreatorEngine::TTestDataPath PictureFiles[] = 
+    {
+    CCreatorEngine::EJPEG_25kB,
+    CCreatorEngine::EJPEG_200kB,
+    CCreatorEngine::EJPEG_500kB,
+    CCreatorEngine::EPNG_15kB,
+    CCreatorEngine::EGIF_2kB
+    };
+
+TPtrC CCreatorEngine::CreateSoundFileL(TTestDataPath aId)
+{
+	TPtrC tempPath(TestDataPathL(aId));
+	// Copy file to permanent location:
+    TParse parser;
+    parser.Set(tempPath, NULL, NULL);
+    TPtrC fileName(parser.NameAndExt());
+    HBufC* fullTargetPath = HBufC::NewLC( KMaxFileName );
+    fullTargetPath->Des().Copy( PathInfo::PhoneMemoryRootPath() );
+    fullTargetPath->Des().Append( PathInfo::DigitalSoundsPath() );
+    
+    fullTargetPath->Des().Append(fileName);
+    CopyFileL(tempPath, *fullTargetPath);
+    iAllocatedFilePaths.AppendL(fullTargetPath);
+    CleanupStack::Pop(); // fullTargetPath
+    return fullTargetPath->Des(); 
+}
+TPtrC CCreatorEngine::CreateRandomSoundFileL()
+{
+    TInt numOfFiles = sizeof(SoundFiles) / sizeof(TTestDataPath);
+    return CreateSoundFileL(SoundFiles[RandomNumber(0, numOfFiles-1)]);
+}
+TPtrC CCreatorEngine::RandomSoundFileL()
+{
+    TInt numOfFiles = sizeof(SoundFiles) / sizeof(TTestDataPath);
+    return TestDataPathL(SoundFiles[RandomNumber(0, numOfFiles-1)]);
+}
+    
+void CCreatorEngine::RandomPictureFileL(TDes& aPath)
+{
+    TInt numOfFiles = sizeof(PictureFiles) / sizeof(TTestDataPath);
+    aPath = TestDataPathL(PictureFiles[RandomNumber(0, numOfFiles-1)]);
+}
+// ---------------------------------------------------------------------------
+
+// returns a random string from the resource files
+TPtrC CCreatorEngine::RandomString(enum TRandomStringType aRandomStringType)
+    {
+    LOGSTRING("Creator: CCreatorEngine::RandomString");
+    
+    // Let's see if the array is OK and the string arrays are in correct order:
+    if( ((TInt) aRandomStringType) < iStringArrays.Count() && 
+        iStringArrays[aRandomStringType].iStringType == aRandomStringType)
+        {        
+        TInt rand = (TInt) (iStringArrays[aRandomStringType].iArrayPtr->Count() * Math::FRand(iSeed));
+        return (*iStringArrays[aRandomStringType].iArrayPtr)[rand];
+        }
+    
+    // Now let's loop the arrays and try to find one with the type:
+    for( TInt i = 0; i < iStringArrays.Count(); ++i )
+        {
+        if( iStringArrays[i].iStringType == aRandomStringType )
+            {
+            TInt rand = (TInt) (iStringArrays[i].iArrayPtr->Count() * Math::FRand(iSeed));
+            return (*iStringArrays[i].iArrayPtr)[rand];
+            }
+        }
+
+    User::Panic (_L("Random string"), 402);    
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+
+// returns a random number
+TInt CCreatorEngine::RandomNumber(TInt aRange)
+    {
+    LOGSTRING2("Creator: CCreatorEngine::RandomNumber aRange=%d", aRange);
+
+    return (TInt) (aRange*Math::FRand(iSeed));
+    }
+
+// ---------------------------------------------------------------------------
+
+// returns a random number
+TInt CCreatorEngine::RandomNumber(TInt aMin, TInt aMax)
+    {
+    LOGSTRING3("Creator: CCreatorEngine::RandomNumber aMin=%d aMax=%d", aMin, aMax);
+
+    TInt range = (aMax > aMin ? aMax - aMin : aMin - aMax) + 1;
+    TInt random = (TInt) (range*Math::FRand(iSeed));
+    
+    random = (random % range) + aMin;
+
+    if (random > aMax)
+        random = aMax;
+    else if (random < aMin)
+        random = aMin;
+    
+    return random;
+    }
+
+TTime CCreatorEngine::RandomTime(TTime baseTime, TRandomDateType type, TInt aMinHours, TInt aMaxHours, TInt aMinMinutes, TInt aMaxMinutes )
+    {
+    TInt randomHours = RandomNumber(aMinHours, aMaxHours);
+    TInt randomMinutes = RandomNumber(aMinMinutes, aMaxMinutes);
+    
+    switch( type )
+    {
+    case EDatePast:
+        return (baseTime - TTimeIntervalHours(randomHours)) - TTimeIntervalMinutes(randomMinutes);
+    case EDateFuture:
+        return (baseTime + TTimeIntervalHours(randomHours)) + TTimeIntervalMinutes(randomMinutes);
+    default:
+        break;
+    }
+    return baseTime;
+    }
+
+TTime CCreatorEngine::RandomDate(TTime baseTime, TRandomDateType type, TInt aMinDays, TInt aMaxDays)
+    {
+    TInt random = RandomNumber(aMinDays, aMaxDays);
+    
+    switch( type )
+    {
+    case EDatePast:
+        return baseTime - TTimeIntervalDays(random);
+    case EDateFuture:
+        return baseTime + TTimeIntervalDays(random);
+    default:
+        break;
+    }
+        
+    return baseTime;
+    }
+
+TTime CCreatorEngine::RandomDate(TRandomDateType type, TInt aMinDays, TInt aMaxDays)
+    {    
+    TTime time;
+    // Set to current time:
+    time.HomeTime();
+    return RandomDate(time, type, aMinDays, aMaxDays);
+    }
+
+HBufC* CCreatorEngine::CreateEmailAddressLC()
+    {
+    _LIT(KCountry, "com");    
+    return CreateEmailAddressLC(RandomString(EFirstName), RandomString(ESurname), RandomString(ECompany), KCountry);
+    }
+
+HBufC* CCreatorEngine::CreateHTTPUrlLC()
+    {
+    _LIT(KProtocol, "http://");
+    _LIT(KPrefix, "www");
+    _LIT(KCountry, "com");
+    return CreateUrlLC(KProtocol, KPrefix, RandomString(ECompany), KCountry);
+    }
+
+HBufC* CCreatorEngine::CreateRandomStringLC(TInt aStrLen)
+    {
+    TInt minAscii = 65;
+    TInt maxAscii = 90;
+    HBufC* str = HBufC::NewL(aStrLen);
+    CleanupStack::PushL(str);
+    for( TInt i = 0; i < aStrLen; ++i )
+        {
+        TInt random = RandomNumber(minAscii, maxAscii);
+        TChar randomChar = TChar((TUint) random);
+        str->Des().Append(randomChar);
+        }    
+    return str;
+    }
+
+HBufC* CCreatorEngine::CreateEmailAddressLC(
+        const TDesC& firstname,
+        const TDesC& lastname,
+        const TDesC& domain,
+        const TDesC& country ) const
+        {
+        HBufC* email = HBufC::New(firstname.Length() + lastname.Length() + domain.Length() + country.Length() + 3);
+        CleanupStack::PushL(email);        
+        _LIT(KEmailAddr, "%S.%S@%S.%S");
+        email->Des().Format(KEmailAddr, &firstname, &lastname, &domain, &country);
+        return email;
+        }
+        
+HBufC* CCreatorEngine::CreateUrlLC(
+        const TDesC& protocol,
+        const TDesC& prefix,
+        const TDesC& domain,
+        const TDesC& country) const
+    {
+    HBufC* url = HBufC::New(protocol.Size() + prefix.Size() + domain.Size() + country.Size() + 2);
+    CleanupStack::PushL(url);
+    _LIT(KUrl, "%S%S.%S.%S");
+    url->Des().Format(KUrl, &protocol, &prefix, &domain, &country);    
+    return url;
+    }
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::SetDefaultPathForFileCommandL(TInt aCommand, TFileName& aPath)
+	{
+	aPath.Copy( PathInfo::PhoneMemoryRootPath() );
+	switch (aCommand)
+	{
+	case ECmdCreateFileEntryJPEG_25kB:
+	case ECmdCreateFileEntryJPEG_200kB:
+	case ECmdCreateFileEntryJPEG_500kB:
+	case ECmdCreateFileEntryPNG_15kB:
+	case ECmdCreateFileEntryGIF_2kB:
+	case ECmdCreateFileEntryBMP_25kB:
+	case ECmdCreateFileEntrySVG_15kB:
+	case ECmdCreateFileEntryTIF_25kB:
+	case ECmdCreateFileEntryJP2_65kB:
+
+		{  aPath.Append( PathInfo::ImagesPath() );  break;  }
+
+	case ECmdCreateFileEntryRNG_1kB:
+		{  aPath.Append( PathInfo::SimpleSoundsPath() );  break;  }
+
+	case ECmdCreateFileEntryMIDI_10kB:
+	case ECmdCreateFileEntryWAV_20kB:
+	case ECmdCreateFileEntryAMR_20kB:
+	case ECmdCreateFileEntryMP3_250kB:
+	case ECmdCreateFileEntryAAC_100kB:
+	case ECmdCreateFileEntryWMA_50kB:
+		{  aPath.Append( PathInfo::DigitalSoundsPath() );  break;  }
+
+	case ECmdCreateFileEntry3GPP_70kB:
+	case ECmdCreateFileEntryRM_95kB:
+	case ECmdCreateFileEntryMP4_200kB:
+	case ECmdCreateFileEntryWMV_200kB:
+
+		{  aPath.Append( PathInfo::VideosPath() );  break;  }
+
+	case ECmdCreateFileEntryEmptyFolder:
+		{  aPath.Append( _L("MyFolder\\") );  break;  }
+
+	default:
+		{  aPath.Append( PathInfo::OthersPath() );  break;  }
+
+	}
+	}
+
+
+// ---------------------------------------------------------------------------
+
+void CCreatorEngine::CancelComplete()
+    {
+    LOGSTRING("Creator: CCreatorEngine::CancelComplete");
+    // free resources and show a note
+    TRAP_IGNORE( ShutDownEnginesL() );
+
+    TRAP_IGNORE(iEngineWrapper->ShowNote(_L("Cancelled")));
+	
+	}
+
+// ---------------------------------------------------------------------------
+
+TCommand::TCommand(TInt aCommandId, CCreatorModuleBaseParameters* aParameters)
+    {
+    iCommandId = aCommandId;
+    iParameters = aParameters;
+    }
+
+// ---------------------------------------------------------------------------
+
+TCommand::~TCommand()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+
+CAsyncWaiter* CAsyncWaiter::NewL(TInt aPriority)
+	{
+	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
+	return self;
+	}
+
+CAsyncWaiter* CAsyncWaiter::NewLC(TInt aPriority)
+	{
+	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
+	CleanupStack::PushL(self);
+	return self;
+	}
+	
+CAsyncWaiter::CAsyncWaiter(TInt aPriority) : CActive(aPriority)
+	{
+	CActiveScheduler::Add(this);
+	}	
+
+CAsyncWaiter::~CAsyncWaiter()
+	{
+	Cancel();
+	}
+	
+void CAsyncWaiter::StartAndWait()
+	{
+    LOGSTRING("Creator: CAsyncWaiter::StartAndWait");
+    iStatus = KRequestPending;
+    SetActive();
+    iWait.Start();
+	}
+	
+TInt CAsyncWaiter::Result() const
+	{
+	return iError;
+	}
+	
+void CAsyncWaiter::RunL()
+	{
+    LOGSTRING("Creator: CAsyncWaiter::RunL");
+
+	iError = iStatus.Int();
+	//CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
+	iWait.AsyncStop();
+	}
+	
+void CAsyncWaiter::DoCancel()
+	{
+    LOGSTRING("Creator: CAsyncWaiter::DoCancel");
+
+	iError = KErrCancel;
+    if( iStatus == KRequestPending )
+        {
+        TRequestStatus* s=&iStatus;
+        User::RequestComplete( s, KErrCancel );
+        }
+    iWait.AsyncStop();
+    //CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
+	}
+	
+FileMapping::FileMapping( const TDesC& aAttName, TInt aAttId, TInt aCommandId )
+    :
+    iFileName(aAttName),
+    iFileId(aAttId),
+    iCommandId(aCommandId)
+    {}
+
+    const TDesC& FileMapping::FileName() const
+    {
+        return iFileName;
+    }
+
+    TInt FileMapping::FileId() const
+    {
+        return iFileId;
+    }   
+
+    TInt FileMapping::CommandId() const
+    {
+        return iCommandId;
+    }
+    
+// ---------------------------------------------------------------------------  
+CDictionaryFileStore* CCreatorEngine::FileStoreLC()
+    {
+    LOGSTRING("Creator: CCreatorEngine::FileStoreLC");
+    CDictionaryFileStore* store;
+    
+    // make sure that the private path of this app in c-drive exists
+    CEikonEnv::Static()->FsSession().CreatePrivatePath( KRegisterDrive ); // c:\\private\\20011383\\
+
+    // handle register always in the private directory 
+    User::LeaveIfError( CEikonEnv::Static()->FsSession().SetSessionToPrivate( KRegisterDrive ) );
+    store = CDictionaryFileStore::OpenLC( CEikonEnv::Static()->FsSession(), KRegisterFileName, KUidCreatorApp );
+    return store;
+    }
+    
+// ---------------------------------------------------------------------------
+void CCreatorEngine::ReadEntryIdsFromStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid )
+    {
+    LOGSTRING("Creator: CCreatorEngine::ReadEntryIdsFromStoreL");
+    CDictionaryFileStore* store = FileStoreLC();
+    User::LeaveIfNull( store );
+    if ( store->IsPresentL( aModuleUid ) )
+        {
+        RDictionaryReadStream in;
+        in.OpenLC( *store, aModuleUid );
+        TFileName fullPath;
+        TInt err( KErrNone );
+        TInt id( KErrNotFound );
+        while ( !err )
+            {
+            TRAP( err, id = in.ReadInt32L() );  // will leave with KErrEof
+            if ( !err )
+                {
+                aEntryIds.AppendL( id );
+                }
+            }
+        CleanupStack::PopAndDestroy( &in );
+        }
+    CleanupStack::PopAndDestroy( store );
+    }
+
+// ---------------------------------------------------------------------------
+void CCreatorEngine::WriteEntryIdsToStoreL( RArray<TInt>& aEntryIds, const TUid aModuleUid )
+    {
+    LOGSTRING("Creator: CCreatorEngine::WriteEntryIdsToStoreL");
+    CDictionaryFileStore* store = FileStoreLC();
+    User::LeaveIfNull( store );
+    
+    // backup previous ids from store
+    // otherwise they would be overwritten when calling out.WriteL
+    RArray<TInt> previousIds;
+    CleanupClosePushL( previousIds );
+    
+    if ( store->IsPresentL( aModuleUid ) )
+        {
+        RDictionaryReadStream in;
+        in.OpenLC( *store, aModuleUid );        
+        TInt err( KErrNone );
+        TInt id( KErrNotFound );
+        while ( !err ) 
+            {
+            TRAP( err, id = in.ReadInt32L() ); // will leave with KErrEof
+            if ( !err )
+                {
+                previousIds.AppendL( id );
+                }
+            }
+        CleanupStack::PopAndDestroy( &in );
+        }
+    
+    RDictionaryWriteStream out;       
+    out.AssignLC( *store, aModuleUid );
+    
+    // restore previous ids to store
+    for ( TInt i = 0; i < previousIds.Count(); i++ )
+        {
+        out.WriteInt32L( previousIds[i] );            
+        }
+
+    // write new ids to store
+    for ( TInt i = 0; i < aEntryIds.Count(); i++ )
+        {
+        out.WriteInt32L( aEntryIds[i] );        
+        }
+    
+    out.CommitL();
+    CleanupStack::PopAndDestroy( &out );
+    
+    store->CommitL();
+    CleanupStack::PopAndDestroy( &previousIds );
+    CleanupStack::PopAndDestroy( store );
+    }
+
+// ---------------------------------------------------------------------------
+void CCreatorEngine::ReadEntryIdsFromStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid )
+    {
+    LOGSTRING("Creator: CCreatorEngine::ReadEntryIdsFromStoreL");
+    CDictionaryFileStore* store = FileStoreLC();
+    User::LeaveIfNull( store );
+    if ( store->IsPresentL( aModuleUid ) )
+        {
+        RDictionaryReadStream in;
+        in.OpenLC( *store, aModuleUid );
+        TFileName fullPath;
+        TInt err( KErrNone );
+        TUint32 id( KErrNone ); 
+        while ( !err )
+            {
+            TRAP( err, id = in.ReadUint32L() );  // will leave with KErrEof
+            if ( !err )
+                {
+                aEntryIds.AppendL( id );
+                }
+            }
+        CleanupStack::PopAndDestroy( &in );
+        }
+    CleanupStack::PopAndDestroy( store );
+    }
+
+// ---------------------------------------------------------------------------
+void CCreatorEngine::WriteEntryIdsToStoreL( RArray<TUint32>& aEntryIds, const TUid aModuleUid )
+    {
+    LOGSTRING("Creator: CCreatorEngine::WriteEntryIdsToStoreL");
+    CDictionaryFileStore* store = FileStoreLC();
+    User::LeaveIfNull( store );
+    
+    // backup previous ids from store
+    // otherwise they would be overwritten when calling out.WriteL
+    RArray<TUint32> previousIds;
+    CleanupClosePushL( previousIds );
+    
+    if ( store->IsPresentL( aModuleUid ) )
+        {
+        RDictionaryReadStream in;
+        in.OpenLC( *store, aModuleUid );
+        TInt err( KErrNone );
+        TUint32 id( KErrNone );
+        while ( !err ) 
+            {
+            TRAP( err, id = in.ReadUint32L() ); // will leave with KErrEof
+            if ( !err )
+                {
+                previousIds.AppendL( id );
+                }
+            }
+        CleanupStack::PopAndDestroy( &in );
+        }
+    
+    RDictionaryWriteStream out;       
+    out.AssignLC( *store, aModuleUid );
+    
+    // restore previous ids to store
+    for ( TInt i = 0; i < previousIds.Count(); i++ )
+        {
+        out.WriteUint32L( previousIds[i] );            
+        }
+
+    // write new ids to store
+    for ( TInt i = 0; i < aEntryIds.Count(); i++ )
+        {
+        out.WriteUint32L( aEntryIds[i] );        
+        }
+    
+    out.CommitL();
+    CleanupStack::PopAndDestroy( &out );
+    
+    store->CommitL();
+    CleanupStack::PopAndDestroy( &previousIds );
+    CleanupStack::PopAndDestroy( store );
+    }
+
+// ---------------------------------------------------------------------------
+void CCreatorEngine::RemoveStoreL( const TUid aModuleUid )
+    {
+    LOGSTRING("Creator: CCreatorEngine::RemoveStoreL");
+    CDictionaryFileStore* store = FileStoreLC();
+    User::LeaveIfNull( store );
+    if ( store->IsPresentL( aModuleUid ) )
+        {        
+        // entries of this module should be deleted by now,
+        // remove the Creator internal registry for this module
+        store->Remove( aModuleUid );
+        store->CommitL();
+        }
+    CleanupStack::PopAndDestroy( store );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorEngine::GenerateSourceImageFileL(
+    const CCreatorEngine::TTestDataPath aFileType,
+    const TDesC& aFileName )
+    {
+    LOGSTRING("Creator: CCreatorEngine::GenerateSourceImageFileL");
+    
+    // Peek file size
+    RFile file;
+    TInt fileSize( 0 );
+    // Using png file as the source file
+    TFileName fileName = TestDataPathL( CCreatorEngine::EPNG_15kB );
+    User::LeaveIfError( file.Open( iEnv->FsSession(),
+                                   fileName,
+                                   EFileRead | EFileShareAny ) );
+    CleanupClosePushL( file );
+    User::LeaveIfError( file.Size( fileSize ) );
+    CleanupStack::PopAndDestroy( &file );
+    
+    // Using heap variables, because bitmaps 
+    // may reserve large amount of memory.
+    
+    // Read data from the file
+    RFileReadStream ws;    
+    User::LeaveIfError( ws.Open( iEnv->FsSession(),
+                                 fileName,
+                                 EFileStream | EFileRead | EFileShareAny ) );
+    CleanupClosePushL( ws );
+    delete iBitmapData;
+    iBitmapData = NULL;
+    iBitmapData = HBufC8::NewL( fileSize );
+    TPtr8 dataPtr = iBitmapData->Des();
+    ws.ReadL( dataPtr, fileSize );
+    CleanupStack::PopAndDestroy( &ws );
+       
+    // Create decoder for the data
+    delete iDecoder;
+    iDecoder = NULL;
+    iDecoder = CImageDecoder::DataNewL( iEnv->FsSession(), dataPtr );
+    iFrameinfo = iDecoder->FrameInfo();
+    
+    // Create bitmap handle for the source image
+    iBitmap = new (ELeave) CFbsBitmap();
+    User::LeaveIfError( iBitmap->Create( iFrameinfo.iFrameCoordsInPixels.Size(), EColor16M ) );
+    
+    // Convert the data from the file into bitmap format (inmemory)  
+    CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+    iDecoder->Convert( &waiter->iStatus, *iBitmap );
+    waiter->StartAndWait();
+    delete iDecoder;
+    iDecoder = NULL;
+    delete iBitmapData;
+    iBitmapData = NULL;
+    if ( iUserCancelled )
+        {
+        CancelComplete();
+        User::Leave( KErrCancel );
+        }
+    User::LeaveIfError( waiter->Result() );
+    
+    // Define the target dimensions and image quality
+    // so that the generated file size will match required size.
+    // Quality and scaling factors are defined experimentally.
+    delete iScaler;
+    iScaler = NULL;
+    iScaler = CBitmapScaler::NewL();
+    iScaledBitmap = new (ELeave) CFbsBitmap();
+    // use original size as base
+    TSize scaledSize( iFrameinfo.iFrameCoordsInPixels.Size() );
+    delete iFrameImageData;
+    iFrameImageData = NULL;
+    iFrameImageData = CFrameImageData::NewL();
+    TBuf8<64> mimeType;
+    TJpegImageData* jpegImageData( NULL );
+    TBmpImageData* bmpImageData( NULL );
+    switch ( aFileType )
+        {
+        case CCreatorEngine::EJPEG_25kB:
+            // QualityFactor = 93 and size factor = 2 -> 25kB jpeg file
+            mimeType.Copy( _L8("image/jpeg") );
+            jpegImageData = new (ELeave) TJpegImageData;
+            // Set some format specific data
+            jpegImageData->iSampleScheme = TJpegImageData::EColor444;
+            jpegImageData->iQualityFactor = 93; // 0..100
+            // ownership passed to iFrameImageData after AppendImageData
+            User::LeaveIfError( iFrameImageData->AppendImageData( jpegImageData ) );
+            scaledSize.iHeight *= 2;
+            scaledSize.iWidth *= 2;
+            break;
+        case CCreatorEngine::EJPEG_200kB:
+            {
+            mimeType.Copy( _L8("image/jpeg") );
+            jpegImageData = new (ELeave) TJpegImageData;
+            // Set some format specific data
+            jpegImageData->iSampleScheme = TJpegImageData::EColor444;
+#ifdef __WINS__
+            // QualityFactor = 95 and size factor = 7 -> 196kB jpeg file
+            jpegImageData->iQualityFactor = 95; // 0..100
+            scaledSize.iHeight *= 7;
+            scaledSize.iWidth *= 7;
+#else
+            // In hw the image compression seems to work
+            // more efficiently. Need to set greater values.
+            jpegImageData->iQualityFactor = 100; // 0..100
+            scaledSize.iHeight *= 7;
+            scaledSize.iWidth *= 7;
+            // 100, 7, 7 -> 213kB
+#endif
+            // ownership passed to iFrameImageData after AppendImageData
+            User::LeaveIfError( iFrameImageData->AppendImageData( jpegImageData ) );
+            break;
+            }
+        case CCreatorEngine::EJPEG_500kB:
+            {
+            mimeType.Copy( _L8("image/jpeg") );
+            jpegImageData = new (ELeave) TJpegImageData;
+            // Set some format specific data
+            jpegImageData->iSampleScheme = TJpegImageData::EColor444;
+#ifdef __WINS__
+            // QualityFactor = 99 and size factor = 8 -> 514kB jpeg file
+            jpegImageData->iQualityFactor = 99; // 0..100
+            scaledSize.iHeight *= 8;
+            scaledSize.iWidth *= 8;
+#else
+            // In hw the image compression seems to work
+            // more efficiently. Need to set greater values. 
+            jpegImageData->iQualityFactor = 100; // 0..100
+            scaledSize.iHeight *= 13;
+            scaledSize.iWidth *= 13;
+            // 100, 13, 13 -> 535kB
+#endif
+            // ownership passed to iFrameImageData after AppendImageData
+            User::LeaveIfError( iFrameImageData->AppendImageData( jpegImageData ) );
+            break;
+            }
+        case CCreatorEngine::EBMP_25kB:
+            {
+            // bit depyh 8 and 11/10 size factor -> 25kB bmp
+            mimeType.Copy( _L8("image/bmp") );
+            bmpImageData = new (ELeave) TBmpImageData;
+            bmpImageData->iBitsPerPixel = 8;
+            // ownership passed to iFrameImageData after AppendImageData
+            User::LeaveIfError( iFrameImageData->AppendImageData( bmpImageData ) );
+            scaledSize.iHeight *= 11;
+            scaledSize.iWidth *= 11;
+            scaledSize.iHeight /= 10;
+            scaledSize.iWidth /= 10;
+            break;
+            }
+        case CCreatorEngine::EGIF_2kB:
+            {
+            // size factor 1/2 -> 2560B gif
+            mimeType.Copy( _L8("image/gif") );
+            // GIF encoder is not configurable, only the size matters here
+            scaledSize.iHeight /= 2;
+            scaledSize.iWidth /= 2;
+            break;
+            }
+        default: break;
+        }
+
+    // Scale to reach target size
+    User::LeaveIfError( iScaledBitmap->Create( scaledSize, EColor16M ) );
+    iScaler->Scale( &waiter->iStatus, *iBitmap, *iScaledBitmap );
+    waiter->StartAndWait();
+    delete iBitmap;
+    iBitmap = NULL;
+    delete iScaler;
+    iScaler = NULL;
+    if ( iUserCancelled )
+        {
+        CancelComplete();
+        User::Leave( KErrCancel );
+        }
+    User::LeaveIfError( waiter->Result() );
+    
+    // Encode to target format
+    delete iEncoder;
+    iEncoder = NULL;
+    // Creating CImageEncoder opens the target file
+    iEncoder = CImageEncoder::FileNewL( iEnv->FsSession(), aFileName, mimeType );
+
+    // Do the conversion to target format, this will write to the file
+    iEncoder->Convert( &waiter->iStatus, *iScaledBitmap, iFrameImageData );
+    waiter->StartAndWait();
+    delete iEncoder;
+    iEncoder = NULL;
+    delete iFrameImageData;
+    iFrameImageData = NULL;
+    delete iScaledBitmap;
+    iScaledBitmap = NULL;
+    if ( iUserCancelled )
+        {
+        CancelComplete();
+        User::Leave( KErrCancel );
+        }
+    User::LeaveIfError( waiter->Result() );
+    CleanupStack::PopAndDestroy( waiter );
+    }
+
+//----------------------------------------------------------------------------
+void CCreatorEngine::GenereteSourceTextFileL( const TDesC& aFileName, TInt aSize )
+    {
+    LOGSTRING("Creator: CCreatorEngine::GenereteSourceTextFileL");
+    RFile txtFile;
+    _LIT8( KTestContent, "Testing... ");
+    _LIT8( KTestContentCRLF, "\r\n");
+    txtFile.Create( iEnv->FsSession(),
+                    aFileName,
+                    EFileStreamText | EFileWrite | EFileShareAny );
+    CleanupClosePushL( txtFile );
+    for ( TInt i = 1; i*KTestContent().Length() < aSize; i++ )
+        {
+        User::LeaveIfError( txtFile.Write( KTestContent ) );
+        if ( !( i % 10 ) ) // linefeed for every 10th
+            {
+            User::LeaveIfError( txtFile.Write( KTestContentCRLF ) );
+            }
+        }
+    CleanupStack::PopAndDestroy( &txtFile );
+    }
+
+//----------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/src/enginewrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,377 @@
+/*
+* 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 <hbprogressdialog.h>
+#include <hbmessagebox.h>
+#include <hblabel.h>
+
+#include <QString>
+#include <QDate>
+
+#include <e32std.h>
+#include <e32base.h>
+
+#include "creator.hrh" // for command ids
+#include "notifications.h"
+#include "enginewrapper.h"
+#include "engine.h"
+#include "mainview.h"
+
+
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::EngineWrapper()
+: iEngine(0), iProgressDialog(0)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::~EngineWrapper()
+{
+    if (iEngine != 0) {
+        delete iEngine;
+        iEngine = NULL;
+    }
+    if (iProgressDialog != 0) {
+        delete iProgressDialog;
+        iProgressDialog = NULL;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::init()
+{
+    TRAPD(err, iEngine = CCreatorEngine::NewL(this));
+    if(err != KErrNone) {
+        return false;
+    }
+    else {
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+QList<MemoryDetails> EngineWrapper::GetMemoryDetailsList()
+	{
+	RPointerArray<TMemoryDetails> tMemDetList = iEngine->GetMemoryDetailsList();
+	QList<MemoryDetails> memDetList;
+	MemoryDetails memDet;
+		for(int i=0; i<tMemDetList.Count(); i++)
+			{
+			TMemoryDetails* temp = tMemDetList.operator [](i);
+			QString free = QString::fromUtf16( temp->iFree.Ptr(), temp->iFree.Length() );
+			QString size = QString::fromUtf16( temp->iSize.Ptr(), temp->iSize.Length() );
+			QChar drive(temp->iDriveLetter.GetUpperCase());
+			memDet.mFree = free; //QString((QChar*)tMemDetList[i]->iFree.Ptr(), tMemDetList[i]->iFree.Length());
+			memDet.mSize = size; //QString((QChar*) tMemDetList[i]->iSize.Ptr(), tMemDetList[i]->iSize.Length());
+			memDet.mDriveLetter = QString(drive);
+			
+			//memDetList[i].mDriveLetter = QString::fromUtf8( (char *) &tMemDetList[i]->iDriveLetter, (int) sizeof( char ) );
+			memDetList.append( memDet );
+			}
+	return memDetList;
+	}
+
+MemoryDetails EngineWrapper::GetMemoryDetails()
+{
+	
+    TMemoryDetails tMemoryDetails = iEngine->GetMemoryDetails();
+    MemoryDetails memoryDetails;
+
+    // Convert TMemoryDetails to MemoryDetails 
+	memoryDetails.mRamFree  = QString::fromUtf16( tMemoryDetails.iRamFree.Ptr(), tMemoryDetails.iRamFree.Length() );
+	memoryDetails.mRamSize  = QString::fromUtf16( tMemoryDetails.iRamSize.Ptr(), tMemoryDetails.iRamSize.Length() );
+
+	return memoryDetails;
+}
+
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowErrorMessage(const TDesC& aErrorMessage)
+{
+    QString errorMessage((QChar*)aErrorMessage.Ptr(),aErrorMessage.Length());
+    Notifications::error(errorMessage);
+ 
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowNote(const TDesC& aNoteMessage, TInt /*aResourceId*/)
+{
+    QString note((QChar*)aNoteMessage.Ptr(),aNoteMessage.Length());
+    Notifications::showGlobalNote(note, HbMessageBox::MessageTypeInformation, 1000);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowProgressBar(const TDesC& aPrompt, int aMax)
+{
+	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+	CloseProgressbar();
+    iProgressDialog = Notifications::showProgressBar(text, aMax);
+	connect(iProgressDialog, SIGNAL(cancelled()), this, SLOT(ProgressDialogCancelled()));
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::IncrementProgressbarValue()
+{
+    if(iProgressDialog)
+        iProgressDialog->setProgressValue(iProgressDialog->progressValue() + 1);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::CloseProgressbar()
+{
+    if(iProgressDialog){
+        disconnect(iProgressDialog, SIGNAL(cancelled()), this, SLOT(ProgressDialogCancelled()));
+        delete iProgressDialog;
+        iProgressDialog = NULL;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+TBool EngineWrapper::EntriesQueryDialog(TInt* aNumberOfEntries, const TDesC& aPrompt, TBool aAcceptsZero, MUIObserver* observer, int userData)
+    {
+	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+	TBool success(EFalse);
+    try{
+        CreatorInputDialog::launch(text, aNumberOfEntries, aAcceptsZero ? true : false, observer, userData);
+        success = ETrue;
+    }
+    catch (std::exception& e)
+        {
+        Notifications::error( QString("exception: ")+e.what() );
+        }
+	return success;
+    }
+	
+// ---------------------------------------------------------------------------	
+
+TBool EngineWrapper::TimeQueryDialog(TTime* aTime, const TDesC& aPrompt, MUIObserver* observer, int userData)
+    {
+    QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+    TBool success(EFalse);
+    try{
+        CreatorDateTimeDialog::launch(text, aTime, observer, userData); 
+        success = ETrue;
+    }
+    catch (std::exception& e)
+        {
+        Notifications::error( QString("exception: ")+e.what() );
+        }
+    return success;
+    }
+
+TBool EngineWrapper::YesNoQueryDialog(const TDesC& aPrompt, MUIObserver* observer, int userData)
+{
+	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+	TBool success(EFalse);
+    try{
+        CreatorYesNoDialog::launch(text, "", observer, userData);	
+        success = ETrue;
+    }
+    catch (std::exception& e)
+        {
+        Notifications::error( QString("exception: ")+e.what() );
+        }
+    return success;
+}
+ 
+// ---------------------------------------------------------------------------	
+
+bool EngineWrapper::ExecuteOptionsMenuCommand(int commandId)
+{
+	TInt err = KErrNone;
+	if (commandId == ECmdCreateFromFile) {
+		TRAP(err, iEngine->RunScriptL());
+	}
+	else if (commandId == ECmdSelectRandomDataFile) {
+		TBool ret = EFalse;
+		TRAP(err, ret = iEngine->GetRandomDataL());
+		if ( err != KErrNone || ret == EFalse ) {
+			Notifications::error("Error in getting random data.");
+			return false;
+		}		
+	}
+    else {
+		TRAP(err, iEngine->ExecuteOptionsMenuCommandL(commandId));
+	}
+	// error handling
+    if(err != KErrNone) {
+        return false;
+    }
+    else {
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------	
+
+TBool EngineWrapper::PopupListDialog(const TDesC& aPrompt, const CDesCArray* aFileNameArray, TInt* aIndex, MUIObserver* aObserver, TInt aUserData) 
+{
+	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+	QStringList itemList;
+
+	for (int i = 0; i < aFileNameArray->Count(); i++) {
+		itemList.append(QString::fromUtf16(
+				  aFileNameArray->MdcaPoint(i).Ptr(),
+				  aFileNameArray->MdcaPoint(i).Length()));
+	}
+	TBool success(EFalse);
+    try{
+        CreatorSelectionDialog::launch(text, itemList, aIndex, aObserver, aUserData);
+	    success = ETrue;
+    }
+    catch (std::exception& e)
+        {
+        Notifications::error( QString("exception: ")+e.what() );
+        }
+    return success;
+}
+
+// ---------------------------------------------------------------------------	
+
+TBool EngineWrapper::DirectoryQueryDialog(const TDesC& aPrompt, TDes& aDirectory, MUIObserver* aObserver, TInt aUserData)
+{
+	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+	TBool success(EFalse);
+    try{
+        CreatorInputDialog::launch(text, aDirectory, aObserver, aUserData);
+        success = ETrue;
+    }
+    catch (std::exception& e)
+        {
+        Notifications::error( QString("exception: ")+e.what() );
+        }
+    return success;
+}
+
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ProgressDialogCancelled()
+{
+	TRAPD(err, iEngine->ProgressDialogCancelledL());
+	// error handling
+    if(err != KErrNone) {
+        Notifications::error("Error in operation cancel.");
+    }
+    // disconnect & delete iProgressDialog to free memory
+    disconnect(iProgressDialog, SIGNAL(cancelled()), this, SLOT(ProgressDialogCancelled()));
+    iProgressDialog->deleteLater();
+    iProgressDialog = NULL;
+}
+
+// ---------------------------------------------------------------------------
+
+TBool EngineWrapper::ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, TInt* aIndex, MUIObserver* aObserver, TInt aUserData)
+{
+	bool ret = false;
+	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+	QStringList itemList;
+	
+	switch (aId) {
+		case R_CONTACT_CREATION_TYPE_QUERY: {
+			itemList << "Default fields" << "Define...";
+			break;
+		}
+		case R_GROUP_CREATION_TYPE_QUERY: {
+			itemList << "Random" << "Define...";
+			break;
+		}
+		case R_MESSAGE_TYPE_QUERY: {
+			itemList << "SMS" << "MMS" << "AMS" << "Email" << "Smart Message" << "IR Message" << "BT Message";
+			break;
+		}
+		case R_FOLDER_TYPE_QUERY: {
+			itemList << "Inbox" << "Drafts" << "Outbox" << "Sent";
+			break;
+		}
+		case R_UNREAD_QUERY: {
+			itemList << "Read" << "New";
+			break;
+		}
+		case R_ATTACHMENT_MULTI_SELECTION_QUERY: {
+			Notifications::error("Not supported resource id."); 
+			break;
+		}
+		case R_AMS_ATTACHMENT_SINGLE_SELECTION_QUERY: {
+			itemList << "AMR 20kB";
+			break;
+		}
+		case R_ATTACHMENT_SINGLE_SELECTION_QUERY: {
+			itemList << "JPEG 25kB" << "JPEG 300kB" << "JPEG 500kB" << "PNG 15kB" << "GIF 2kB" << "RNG 1kB" 
+			<< "MIDI 10kB" << "WAVE 20kB" << "AMR 20kB" << "Excel 15kB" << "Word 20kB" << "PowerPoint 40kB" 
+			<< "Text 10kB" << "Text 70kB" << "3GPP 70kB" << "MP3 250kB" << "AAC 100kB" << "RM 95kB";
+			break;
+		}
+		default: {
+			Notifications::error("Error in resource id.");
+			return ret;
+		}
+	}
+	TBool success(EFalse);
+    try{
+        CreatorSelectionDialog::launch(text, itemList, aIndex, aObserver, aUserData);
+        success = ETrue;
+    }
+    catch (std::exception& e)
+        {
+        Notifications::error( QString("exception: ")+e.what() );
+        }
+    return success;
+}
+
+TBool EngineWrapper::ListQueryDialog(const TDesC& aPrompt, TListQueryId aId, CArrayFixFlat<TInt>* aSelectedItems, MUIObserver* aObserver, TInt aUserData)
+{
+    TBool success(EFalse);
+	QStringList itemList;
+	QString text((QChar*)aPrompt.Ptr(), aPrompt.Length());
+	if (aId == R_ATTACHMENT_MULTI_SELECTION_QUERY) {
+       itemList << "None" << "JPEG 25kB" << "JPEG 300kB" << "JPEG 500kB" << "PNG 15kB" << "GIF 2kB" << "RNG 1kB" 
+           << "MIDI 10kB" << "WAVE 20kB" << "AMR 20kB" << "Excel 15kB" << "Word 20kB" << "PowerPoint 40kB" 
+           << "Text 10kB" << "Text 70kB" << "3GPP 70kB" << "MP3 250kB" << "AAC 100kB" << "RM 95kB";
+	}
+	else{
+        Notifications::error("Error in resource id.");
+        return EFalse;
+    }
+	
+    try{
+        CreatorSelectionDialog::launch(text, itemList, aSelectedItems, aObserver, aUserData);
+        success = ETrue;
+    }
+    catch (std::exception& e)
+        {
+        Notifications::error( QString("exception: ")+e.what() );
+        }
+    return success;
+}
+
+void EngineWrapper::CloseCreatorApp()
+{
+	MainView::closeApp();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/src/main.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* 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 <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbview.h>
+
+#include "mainview.h"
+#include "enginewrapper.h"
+
+int main(int argc, char *argv[])
+{
+	
+    
+
+    HbApplication app(argc, argv);
+    HbMainWindow mainWindow;
+    
+    //Create main view
+    MainView* view = new MainView(mainWindow);
+
+    //initialize main view
+    view->init(app);
+	
+	// Add View to main window and reveal it.
+    mainWindow.addView(view);
+    mainWindow.show();
+    
+    int result = app.exec();
+   
+    return result;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/src/mainview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,659 @@
+/*
+* 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 <hbview.h>
+#include <hbmainwindow.h>
+#include <hbapplication.h>
+#include <hblabel.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbtextedit.h>
+
+#include <QSignalMapper>
+#include <QGraphicsLinearLayout>
+
+#include "notifications.h"
+#include "enginewrapper.h"
+#include "mainview.h"
+#include "hbtoolbar.h"
+#include "creator.hrh" // for command ids
+
+// ---------------------------------------------------------------------------
+
+MainView::MainView(HbMainWindow &mainWindow):
+    mMainWindow(mainWindow)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+MainView::~MainView()
+{
+	delete mSm;
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::init(HbApplication &app)
+{
+    mEngineWrapper.init();
+    this->setTitle("Creator");
+    createMenu(app);
+    createMemoryInfoText();
+}
+
+void MainView::createMenu(HbApplication& app)
+{
+    HbMenu* menu = this->menu();
+
+    // signal mapper for identifying the different command actions  
+	// in executeCommand() handler function:
+    mSm = new QSignalMapper(this);
+    connect(mSm, SIGNAL(mapped(int)), this, SLOT(executeMenuCommand(int)));
+    
+    if (menu != NULL) {
+
+		// Run script menu item:
+		mActionRunScript = menu->addAction("Run script"); 
+		connect(mActionRunScript, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionRunScript, ECmdCreateFromFile);	
+
+		// Calendar sub-menu items:
+		HbMenu* calendarSubMenu = new HbMenu("Calendar");
+		menu->addMenu(calendarSubMenu);
+		mActionCalendarAppointments = calendarSubMenu->addAction("Appointments");
+		mActionCalendarEvents = calendarSubMenu->addAction("Events");
+		mActionCalendarAnniversaries = calendarSubMenu->addAction("Anniversaries");
+		mActionCalendarTodos = calendarSubMenu->addAction("Todos");
+		mActionCalendarReminders = calendarSubMenu->addAction("Reminders");
+		
+		connect(mActionCalendarAppointments, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionCalendarAppointments, ECmdCreateCalendarEntryAppointments);
+
+		connect(mActionCalendarEvents, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionCalendarEvents, ECmdCreateCalendarEntryEvents);
+
+		connect(mActionCalendarAnniversaries, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionCalendarAnniversaries, ECmdCreateCalendarEntryAnniversaries);
+
+		connect(mActionCalendarTodos, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionCalendarTodos, ECmdCreateCalendarEntryToDos);
+
+		connect(mActionCalendarReminders, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionCalendarReminders, ECmdCreateCalendarEntryReminders);		
+/*		
+		// Browser sub-menu items:
+		HbMenu* browserSubMenu = new HbMenu("Browser");
+		menu->addMenu(browserSubMenu);
+		mActionBrowserBookmark = browserSubMenu->addAction("Bookmarks");
+		mActionBrowserBmarkFolder = browserSubMenu->addAction("Bookmark folders");
+		mActionBrowserSavedPages = browserSubMenu->addAction("Saved pages");
+		mActionBrowserSavedPageFolders = browserSubMenu->addAction("Saved page folders");
+
+		connect(mActionBrowserBookmark, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionBrowserBookmark, ECmdCreateBrowserBookmarkEntries);
+
+		connect(mActionBrowserBmarkFolder, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionBrowserBmarkFolder, ECmdCreateBrowserBookmarkFolderEntries);
+
+		connect(mActionBrowserSavedPages, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionBrowserSavedPages, ECmdCreateBrowserSavedPageEntries);
+
+		connect(mActionBrowserSavedPageFolders, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionBrowserSavedPageFolders, ECmdCreateBrowserSavedPageFolderEntries);	
+*/
+		// Files sub-menu items:
+		HbMenu* filesSubMenu = new HbMenu("Files");
+		menu->addMenu(filesSubMenu);
+		
+		mActionFilesEmptyFolder = filesSubMenu->addAction("Empty folder");
+		
+		connect(mActionFilesEmptyFolder, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesEmptyFolder, ECmdCreateFileEntryEmptyFolder);
+		
+		mActionFilesJpeg25 = filesSubMenu->addAction("JPEG 25kB");
+		connect(mActionFilesJpeg25, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesJpeg25, ECmdCreateFileEntryJPEG_25kB);
+
+		mActionFilesJpeg200 = filesSubMenu->addAction("JPEG 200kB");
+		connect(mActionFilesJpeg200, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesJpeg200, ECmdCreateFileEntryJPEG_200kB);
+
+		mActionFilesJpeg500 = filesSubMenu->addAction("JPEG 500kB");
+		connect(mActionFilesJpeg500, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesJpeg500, ECmdCreateFileEntryJPEG_500kB);		
+
+		mActionFilesPng15 = filesSubMenu->addAction("PNG 15kB");
+		connect(mActionFilesPng15, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesPng15, ECmdCreateFileEntryPNG_15kB);
+		
+		mActionFilesGif2 = filesSubMenu->addAction("GIF 2kB");
+		connect(mActionFilesGif2, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesGif2, ECmdCreateFileEntryGIF_2kB);
+		
+		mActionFilesBmp25 = filesSubMenu->addAction("BMP 25kB");
+		connect(mActionFilesBmp25, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesBmp25, ECmdCreateFileEntryBMP_25kB);
+		
+		mActionFilesJp265 = filesSubMenu->addAction("JP2 65kB");
+		connect(mActionFilesJp265, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesJp265, ECmdCreateFileEntryJP2_65kB);
+		
+		mActionFilesSvg15 = filesSubMenu->addAction("SVG 15kB");
+		connect(mActionFilesSvg15, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesSvg15, ECmdCreateFileEntrySVG_15kB);
+		
+		mActionFilesTif25 = filesSubMenu->addAction("TIF 25kB");
+		connect(mActionFilesTif25, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesTif25, ECmdCreateFileEntryTIF_25kB);
+		
+		mActionFilesRng1 = filesSubMenu->addAction("RNG 1kB");
+		connect(mActionFilesRng1, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesRng1, ECmdCreateFileEntryRNG_1kB);		
+		
+		mActionFilesMidi10 = filesSubMenu->addAction("MIDI 10kB");
+		connect(mActionFilesMidi10, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesMidi10, ECmdCreateFileEntryMIDI_10kB);
+		
+		mActionFilesWave20 = filesSubMenu->addAction("WAVE 20kB");
+		connect(mActionFilesWave20, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesWave20, ECmdCreateFileEntryWAV_20kB);
+
+		mActionFilesAmr20 = filesSubMenu->addAction("AMR 20kB");
+		connect(mActionFilesAmr20, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesAmr20, ECmdCreateFileEntryAMR_20kB);		
+
+		mActionFilesExcel15 = filesSubMenu->addAction("Excel 15kB");
+		connect(mActionFilesExcel15, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesExcel15, ECmdCreateFileEntryXLS_15kB);
+
+		mActionFilesWord20 = filesSubMenu->addAction("Word 20kB");
+		connect(mActionFilesWord20, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesWord20, ECmdCreateFileEntryDOC_20kB);		
+
+		mActionFilesPPoint40 = filesSubMenu->addAction("PowerPoint 40kB");
+		connect(mActionFilesPPoint40, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesPPoint40, ECmdCreateFileEntryPPT_40kB);		
+
+		mActionFilesText10 = filesSubMenu->addAction("Text 10kB");
+		connect(mActionFilesText10, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesText10, ECmdCreateFileEntryTXT_10kB);		
+
+		mActionFilesText70 = filesSubMenu->addAction("Text 70kB");
+		connect(mActionFilesText70, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesText70, ECmdCreateFileEntryTXT_70kB);
+
+		mActionFilesHtml20 = filesSubMenu->addAction("HTML 20kB");
+		connect(mActionFilesHtml20, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesHtml20, ECmdCreateFileEntryHTML_20kB);		
+
+		mActionFilesMxmf40 = filesSubMenu->addAction("MXMF 40kB");
+		connect(mActionFilesMxmf40, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesMxmf40, ECmdCreateFileEntryMXMF_40kB);	
+		
+		mActionFilesRam1 = filesSubMenu->addAction("RAM 1kB");
+		connect(mActionFilesRam1, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesRam1, ECmdCreateFileEntryRAM_1kB);			
+
+		mActionFilesJad1 = filesSubMenu->addAction("JAD 1kB");
+		connect(mActionFilesJad1, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesJad1, ECmdCreateFileEntryJAD_1kB);			
+
+		mActionFilesJar10 = filesSubMenu->addAction("JAR 10kB");
+		connect(mActionFilesJar10, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesJar10, ECmdCreateFileEntryJAR_10kB);
+
+		mActionFilesVcf1 = filesSubMenu->addAction("VCF 1kB");
+		connect(mActionFilesVcf1, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesVcf1, ECmdCreateFileEntryVCF_1kB);
+		
+		mActionFilesVcs1 = filesSubMenu->addAction("VCS 1kB");
+		connect(mActionFilesVcs1, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesVcs1, ECmdCreateFileEntryVCS_1kB);
+		
+		mActionFilesSisx10 = filesSubMenu->addAction("SISX 10kB");
+		connect(mActionFilesSisx10, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesSisx10, ECmdCreateFileEntrySISX_10kB);
+
+		mActionFiles3Gpp70 = filesSubMenu->addAction("3GPP 70kB");
+		connect(mActionFiles3Gpp70, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFiles3Gpp70, ECmdCreateFileEntry3GPP_70kB);
+
+		mActionFilesMp3250 = filesSubMenu->addAction("MP3 250kB");
+		connect(mActionFilesMp3250, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesMp3250, ECmdCreateFileEntryMP3_250kB);	
+
+		mActionFilesAAC100 = filesSubMenu->addAction("AAC 100kB");
+		connect(mActionFilesAAC100, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesAAC100, ECmdCreateFileEntryAAC_100kB);	
+
+		mActionFilesSwf15 = filesSubMenu->addAction("SWF 15kB");
+		connect(mActionFilesSwf15, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesSwf15, ECmdCreateFileEntrySWF_15kB);	
+
+		mActionFilesMp4200 = filesSubMenu->addAction("MP4 200kB");
+		connect(mActionFilesMp4200, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesMp4200, ECmdCreateFileEntryMP4_200kB);	
+
+		mActionFilesRm95 = filesSubMenu->addAction("RM 95kB");
+		connect(mActionFilesRm95, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesRm95, ECmdCreateFileEntryRM_95kB);	
+
+		mActionFilesWma50 = filesSubMenu->addAction("WMA 50kB");
+		connect(mActionFilesWma50, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesWma50, ECmdCreateFileEntryWMA_50kB);			
+
+		mActionFilesWmv200 = filesSubMenu->addAction("WMV 200kB");
+		connect(mActionFilesWmv200, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionFilesWmv200, ECmdCreateFileEntryWMV_200kB);	
+		
+		// Logs sub-menu items:	
+		HbMenu* logsSubMenu = new HbMenu("Logs");
+		menu->addMenu(logsSubMenu);
+        
+		mActionLogsMissedCalls = logsSubMenu->addAction("Missed calls");
+		connect(mActionLogsMissedCalls, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionLogsMissedCalls, ECmdCreateLogEntryMissedCalls);
+
+		mActionLogsReceivedCalls = logsSubMenu->addAction("Received calls");
+		connect(mActionLogsReceivedCalls, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionLogsReceivedCalls, ECmdCreateLogEntryReceivedCalls);
+
+		mActionLogsDialledNumbers = logsSubMenu->addAction("Dialled numbers");
+		connect(mActionLogsDialledNumbers, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionLogsDialledNumbers, ECmdCreateLogEntryDialledNumbers);	
+
+		// Messaging sub-menu items:	
+		HbMenu* messageSubMenu = new HbMenu("Messaging");
+		menu->addMenu(messageSubMenu);
+        
+		mActionMessageMailboxes = messageSubMenu->addAction("Mailboxes");
+		connect(mActionMessageMailboxes, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionMessageMailboxes, ECmdCreateMessagingEntryMailboxes);
+
+		mActionMessages = messageSubMenu->addAction("Messages");
+		connect(mActionMessages, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionMessages, ECmdCreateMessagingEntryMessages);		
+		
+		// Misc sub-menu items:	
+		HbMenu* miscSubMenu = new HbMenu("Misc");
+		menu->addMenu(miscSubMenu);
+        
+		//mActionMiscConnection = miscSubMenu->addAction("Connection methods");
+		//mActionMiscImps = miscSubMenu->addAction("IMPS servers");
+		mActionMiscNotes = miscSubMenu->addAction("Notes");
+		//mActionMiscLandmarks = miscSubMenu->addAction("Landmarks");
+/*    
+		connect(mActionMiscConnection, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionMiscConnection, ECmdCreateMiscEntryAccessPoints);
+
+		connect(mActionMiscImps, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionMiscImps, ECmdCreateMiscEntryIMPSServers);
+*/
+		connect(mActionMiscNotes, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionMiscNotes, ECmdCreateMiscEntryNotes);
+/*
+		connect(mActionMiscLandmarks, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionMiscLandmarks, ECmdCreateMiscEntryLandmarks);
+*/
+		// Phonebook sub-menu items:	
+		HbMenu* phonebookSubMenu = new HbMenu("Phonebook");
+		menu->addMenu(phonebookSubMenu);
+        
+		mActionPhonebookContacts = phonebookSubMenu->addAction("Contacts");
+		connect(mActionPhonebookContacts, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionPhonebookContacts, ECmdCreatePhoneBookEntryContacts);
+
+		mActionPhonebookGroups = phonebookSubMenu->addAction("Groups");
+		connect(mActionPhonebookGroups, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionPhonebookGroups, ECmdCreatePhoneBookEntryGroups);	
+		
+		// Delete sub-menu items: 
+		HbMenu* deleteSubMenu = new HbMenu("Delete");
+		menu->addMenu(deleteSubMenu);
+
+		HbMenu* deleteAllSubMenu = new HbMenu("All items");
+		deleteSubMenu->addMenu(deleteAllSubMenu);
+        
+		mActionDeleteAllItems = deleteAllSubMenu->addAction("All");
+		connect(mActionDeleteAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteAllItems, ECmdDeleteAllEntries);
+
+		mActionDeleteCreatorItems = deleteAllSubMenu->addAction("By Creator");
+		connect(mActionDeleteCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteCreatorItems, ECmdDeleteAllCreatorEntries);
+		
+		HbMenu* deleteCalendarSubMenu = new HbMenu("Calendar entries");
+		deleteSubMenu->addMenu(deleteCalendarSubMenu);
+        
+		mActionDeleteCalAllItems = deleteCalendarSubMenu->addAction("All");
+		connect(mActionDeleteCalAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteCalAllItems, ECmdDeleteCalendarEntries);
+
+		mActionDeleteCalCreatorItems = deleteCalendarSubMenu->addAction("By Creator");
+		connect(mActionDeleteCalCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteCalCreatorItems, ECmdDeleteCreatorCalendarEntries);
+/*
+		HbMenu* deleteBookmarksSubMenu = new HbMenu("Br bookmarks");
+		deleteSubMenu->addMenu(deleteBookmarksSubMenu);
+        
+		mActionDeleteBookmarkAllItems = deleteBookmarksSubMenu->addAction("All");
+		connect(mActionDeleteBookmarkAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteBookmarkAllItems, ECmdDeleteBrowserBookmarks);
+
+		mActionDeleteBookmarkCreatorItems = deleteBookmarksSubMenu->addAction("By Creator");
+		connect(mActionDeleteBookmarkCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteBookmarkCreatorItems, ECmdDeleteCreatorBrowserBookmarks);
+
+		HbMenu* deleteBookmarkFoldersSubMenu = new HbMenu("Br bookmark folders");
+		deleteSubMenu->addMenu(deleteBookmarkFoldersSubMenu);
+        
+		mActionDeleteBookmarkFolderAllItems = deleteBookmarkFoldersSubMenu->addAction("All");
+		connect(mActionDeleteBookmarkFolderAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteBookmarkFolderAllItems, ECmdDeleteBrowserBookmarkFolders);
+
+		mActionDeleteBookmarkFolderCreatorItems = deleteBookmarkFoldersSubMenu->addAction("By Creator");
+		connect(mActionDeleteBookmarkFolderCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteBookmarkFolderCreatorItems, ECmdDeleteCreatorBrowserBookmarkFolders);		
+
+		HbMenu* deleteSavedPagesSubMenu = new HbMenu("Br saved pages");
+		deleteSubMenu->addMenu(deleteSavedPagesSubMenu);
+        
+		mActionDeleteSavedPagesAllItems = deleteSavedPagesSubMenu->addAction("All");
+		connect(mActionDeleteSavedPagesAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteSavedPagesAllItems, ECmdDeleteBrowserSavedPages);
+
+		mActionDeleteSavedPagesCreatorItems = deleteSavedPagesSubMenu->addAction("By Creator");
+		connect(mActionDeleteSavedPagesCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteSavedPagesCreatorItems, ECmdDeleteCreatorBrowserSavedPages);	
+
+		HbMenu* deleteSavedPagesFolderSubMenu = new HbMenu("Br saved page folders");
+		deleteSubMenu->addMenu(deleteSavedPagesFolderSubMenu);
+        
+		mActionDeleteSavedPagesFolderAllItems = deleteSavedPagesFolderSubMenu->addAction("All");
+		connect(mActionDeleteSavedPagesFolderAllItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteSavedPagesFolderAllItems, ECmdDeleteBrowserSavedPageFolders);
+
+		mActionDeleteSavedPagesFolderCreatorItems = deleteSavedPagesFolderSubMenu->addAction("By Creator");
+		connect(mActionDeleteSavedPagesFolderCreatorItems, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteSavedPagesFolderCreatorItems, ECmdDeleteCreatorBrowserSavedPageFolders);	
+*/
+		HbMenu* deleteFilesSubMenu = new HbMenu("Files");
+		deleteSubMenu->addMenu(deleteFilesSubMenu);
+
+		mActionDeleteFiles = deleteFilesSubMenu->addAction("By Creator");
+		connect(mActionDeleteFiles, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteFiles, ECmdDeleteCreatorFiles);			
+		
+		HbMenu* deleteLogsSubMenu = new HbMenu("Logs");
+		deleteSubMenu->addMenu(deleteLogsSubMenu);
+
+		mActionDeleteLogsAll = deleteLogsSubMenu->addAction("All");
+		connect(mActionDeleteLogsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteLogsAll, ECmdDeleteLogs);
+		
+		mActionDeleteLogsByCreator = deleteLogsSubMenu->addAction("By Creator");
+		connect(mActionDeleteLogsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteLogsByCreator, ECmdDeleteCreatorLogs);
+
+		HbMenu* deleteMessagesSubMenu = new HbMenu("Messages");
+		deleteSubMenu->addMenu(deleteMessagesSubMenu);
+
+		mActionDeleteMessagesAll = deleteMessagesSubMenu->addAction("All");
+		connect(mActionDeleteMessagesAll, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteMessagesAll, ECmdDeleteMessages);
+		
+		mActionDeleteMessagesByCreator = deleteMessagesSubMenu->addAction("By Creator");
+		connect(mActionDeleteMessagesByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteMessagesByCreator, ECmdDeleteCreatorMessages);
+/*
+		HbMenu* deleteConnMethsSubMenu = new HbMenu("Connection methods");
+		deleteSubMenu->addMenu(deleteConnMethsSubMenu);
+
+		mActionDeleteConnMethsAll = deleteConnMethsSubMenu->addAction("All");
+		connect(mActionDeleteConnMethsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteConnMethsAll, ECmdDeleteMessages);
+		
+		mActionDeleteConnMethsByCreator = deleteConnMethsSubMenu->addAction("By Creator");
+		connect(mActionDeleteConnMethsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteConnMethsByCreator, ECmdDeleteCreatorMessages);
+
+		HbMenu* deleteImpsSubMenu = new HbMenu("IMPS servers");
+		deleteSubMenu->addMenu(deleteImpsSubMenu);
+
+		mActionDeleteImpsAll = deleteImpsSubMenu->addAction("All");
+		connect(mActionDeleteImpsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteImpsAll, ECmdDeleteIMPSs);
+		
+		mActionDeleteImpsByCreator = deleteImpsSubMenu->addAction("By Creator");
+		connect(mActionDeleteImpsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteImpsByCreator, ECmdDeleteCreatorIMPSs);		
+*/		
+		HbMenu* deleteNotesSubMenu = new HbMenu("Notes");
+		deleteSubMenu->addMenu(deleteNotesSubMenu);
+
+		mActionDeleteNotes = deleteNotesSubMenu->addAction("All");
+		connect(mActionDeleteNotes, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteNotes, ECmdDeleteNotes);
+/*
+		HbMenu* deleteLandmarksSubMenu = new HbMenu("Landmarks");
+		deleteSubMenu->addMenu(deleteLandmarksSubMenu);
+
+		mActionDeleteLandmarksAll = deleteLandmarksSubMenu->addAction("All");
+		connect(mActionDeleteLandmarksAll, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteLandmarksAll, ECmdDeleteLandmarks);
+		
+		mActionDeleteLandmarksByCreator = deleteLandmarksSubMenu->addAction("By Creator");
+		connect(mActionDeleteLandmarksByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteLandmarksByCreator, ECmdDeleteCreatorLandmarks);
+*/
+		HbMenu* deleteContactsSubMenu = new HbMenu("Contacts");
+		deleteSubMenu->addMenu(deleteContactsSubMenu);
+
+		mActionDeleteContactsAll = deleteContactsSubMenu->addAction("All");
+		connect(mActionDeleteContactsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteContactsAll, ECmdDeleteContacts);
+		
+		mActionDeleteContactsByCreator = deleteContactsSubMenu->addAction("By Creator");
+		connect(mActionDeleteContactsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteContactsByCreator, ECmdDeleteCreatorContacts);
+
+		HbMenu* deleteContactGroupsSubMenu = new HbMenu("Contact groups");
+		deleteSubMenu->addMenu(deleteContactGroupsSubMenu);
+
+		mActionDeleteContactGroupsAll = deleteContactGroupsSubMenu->addAction("All");
+		connect(mActionDeleteContactGroupsAll, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteContactGroupsAll, ECmdDeleteContactGroups);
+		
+		mActionDeleteContactGroupsByCreator = deleteContactGroupsSubMenu->addAction("By Creator");
+		connect(mActionDeleteContactGroupsByCreator, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionDeleteContactGroupsByCreator, ECmdDeleteCreatorContactGroups);		
+/*		
+		// select random data file:
+		mActionSelectRandomFile = menu->addAction("Select random data file"); 
+		connect(mActionSelectRandomFile, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mActionSelectRandomFile, ECmdSelectRandomDataFile);	
+*/		
+		// About & exit menu items:
+		mActionAbout = menu->addAction("About Creator");
+        connect(mActionAbout, SIGNAL( triggered() ), this, SLOT( showAboutPopup() ) );
+    
+        mActionExit = menu->addAction("Exit");
+        connect(mActionExit, SIGNAL(triggered()), &app, SLOT( quit() ) );
+
+        this->setMenu(menu);
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::createMemoryInfoText()
+{
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical, this);
+
+    // get memory details from engine;
+    mMemoryDetails = mEngineWrapper.GetMemoryDetails();
+	
+    QList<MemoryDetails> memDet = mEngineWrapper.GetMemoryDetailsList();
+    
+    if (layout != NULL) 
+    	{
+		HbLabel* edit = new HbLabel(this);
+        //HbTextEdit* edit = new HbTextEdit(this);
+        if(edit != NULL) 
+        	{
+        QString text = QString("<BR><BR>Free RAM Memory:<BR> %1 of %2 kB").arg(mMemoryDetails.mRamFree).arg(mMemoryDetails.mRamSize);	
+        //QString text = QString("\n\nFree RAM Memory:\n %1 of %2 kB").arg(mMemoryDetails.mRamFree).arg(mMemoryDetails.mRamSize);
+			for(int i=0 ; i < memDet.count() ; i++ )
+				{
+			text += QString("<BR><BR>Free %1: Memory:<BR> %2 of %3 kB").arg(memDet[i].mDriveLetter).arg(memDet[i].mFree).arg(memDet[i].mSize);//text += QString("\n\nFree %1: Memory:\n %2 of %3 kB").arg(memDet[i].mDriveLetter).arg(memDet[i].mFree).arg(memDet[i].mSize);
+				}
+			edit->setTextWrapping(Hb::TextWordWrap);
+			edit->setHtml(text);
+			//edit->setPlainText(text);
+                	
+            //edit->setReadOnly(true);
+            //edit->setCursorHidden(true);
+            edit->setAttribute(Qt::WA_InputMethodEnabled, false);
+            layout->addItem(edit);
+            layout->setContentsMargins(5, 5, 5, 5);
+            this->setLayout(layout);
+        	}
+        
+    }
+    
+}
+
+
+// ---------------------------------------------------------------------------
+
+void MainView::showAboutPopup()
+{
+	Notifications::about();
+
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::executeMenuCommand(int cmd)
+{
+    switch (cmd) {
+		case ECmdCreateFromFile:
+		case ECmdCreateCalendarEntryAppointments:
+		case ECmdCreateCalendarEntryEvents:
+		case ECmdCreateCalendarEntryAnniversaries:
+		case ECmdCreateCalendarEntryToDos:
+		case ECmdCreateCalendarEntryReminders:
+		case ECmdCreateBrowserBookmarkEntries:
+        case ECmdCreateBrowserBookmarkFolderEntries:
+        case ECmdCreateBrowserSavedPageEntries:
+        case ECmdCreateBrowserSavedPageFolderEntries: 
+		case ECmdCreateFileEntryEmptyFolder:
+	    case ECmdCreateFileEntry3GPP_70kB:
+	    case ECmdCreateFileEntryAAC_100kB:
+	    case ECmdCreateFileEntryAMR_20kB:
+	    case ECmdCreateFileEntryBMP_25kB:
+	    case ECmdCreateFileEntryDeck_1kB:
+	    case ECmdCreateFileEntryDOC_20kB:
+	    case ECmdCreateFileEntryGIF_2kB:
+	    case ECmdCreateFileEntryHTML_20kB:
+	    case ECmdCreateFileEntryJAD_1kB:
+	    case ECmdCreateFileEntryJAR_10kB:
+	    case ECmdCreateFileEntryJP2_65kB:
+	    case ECmdCreateFileEntryJPEG_200kB:
+	    case ECmdCreateFileEntryJPEG_25kB:
+	    case ECmdCreateFileEntryJPEG_500kB:
+	    case ECmdCreateFileEntryMIDI_10kB:
+	    case ECmdCreateFileEntryMP3_250kB:
+	    case ECmdCreateFileEntryMP4_200kB:
+	    case ECmdCreateFileEntryMXMF_40kB:
+	    case ECmdCreateFileEntryPNG_15kB:
+	    case ECmdCreateFileEntryPPT_40kB:
+	    case ECmdCreateFileEntryRAM_1kB:
+	    case ECmdCreateFileEntryRM_95kB:
+	    case ECmdCreateFileEntryRNG_1kB:
+	    case ECmdCreateFileEntrySVG_15kB:
+	    case ECmdCreateFileEntrySWF_15kB:
+	    case ECmdCreateFileEntryTIF_25kB:
+	    case ECmdCreateFileEntryTXT_10kB:
+	    case ECmdCreateFileEntryTXT_70kB:
+	    case ECmdCreateFileEntryVCF_1kB:
+	    case ECmdCreateFileEntryVCS_1kB:
+	    case ECmdCreateFileEntryWAV_20kB:
+	    case ECmdCreateFileEntryXLS_15kB:
+	    case ECmdCreateFileEntrySISX_10kB:
+	    case ECmdCreateFileEntryWMA_50kB:
+	    case ECmdCreateFileEntryWMV_200kB:
+	    case ECmdCreateLogEntryMissedCalls:
+	    case ECmdCreateLogEntryReceivedCalls:
+	    case ECmdCreateLogEntryDialledNumbers:
+	    case ECmdCreateMessagingEntryMailboxes:
+	    case ECmdCreateMessagingEntryMessages:		
+        case ECmdCreateMiscEntryAccessPoints:
+		case ECmdCreateMiscEntryIMPSServers:
+		case ECmdCreateMiscEntryNotes:
+		case ECmdCreateMiscEntryLandmarks:		
+		case ECmdCreatePhoneBookEntryContacts:
+	    case ECmdCreatePhoneBookEntryGroups:
+		case ECmdDeleteAllEntries:
+	    case ECmdDeleteAllCreatorEntries:
+	    case ECmdDeleteContacts:
+        case ECmdDeleteCreatorContacts:
+        case ECmdDeleteContactGroups:
+        case ECmdDeleteCreatorContactGroups:
+        case ECmdDeleteCalendarEntries:
+        case ECmdDeleteCreatorCalendarEntries:
+        case ECmdDeleteBrowserBookmarks:
+        case ECmdDeleteCreatorBrowserBookmarks:
+        case ECmdDeleteBrowserBookmarkFolders:
+        case ECmdDeleteCreatorBrowserBookmarkFolders:
+        case ECmdDeleteBrowserSavedPages:
+        case ECmdDeleteCreatorBrowserSavedPages:
+        case ECmdDeleteBrowserSavedPageFolders:
+        case ECmdDeleteCreatorBrowserSavedPageFolders:
+        case ECmdDeleteCreatorFiles:
+        case ECmdDeleteLogs:
+        case ECmdDeleteCreatorLogs:
+        case ECmdDeleteMessages:
+        case ECmdDeleteCreatorMessages:
+        case ECmdDeleteMailboxes:
+        case ECmdDeleteCreatorMailboxes:
+        case ECmdDeleteIAPs:
+        case ECmdDeleteCreatorIAPs:
+        case ECmdDeleteIMPSs:
+        case ECmdDeleteCreatorIMPSs:
+        case ECmdDeleteNotes:
+        case ECmdDeleteLandmarks:
+        case ECmdDeleteCreatorLandmarks:
+		case ECmdSelectRandomDataFile: {
+			mEngineWrapper.ExecuteOptionsMenuCommand(cmd);
+            break;
+        }
+        default: {
+            Notifications::error(QString("Unsupported command: %1").arg(cmd));
+            break;
+        }
+    }
+}
+
+void MainView::closeApp()
+{
+	qApp->quit();
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/creator/src/notifications.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,308 @@
+/*
+* 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 <hbmessagebox.h>
+#include <hblabel.h>
+#include <hbaction.h>
+#include <hbpopup.h>
+#include <hblineedit.h>
+#include <hbvalidator.h>
+#include <hbabstractitemview.h>
+#include <hbprogressdialog.h>
+#include <hbdatetimepicker.h>
+
+#include <QString>
+#include <QDate>
+#include <QRegExp>
+#include <QList>
+
+#include "notifications.h"
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout )
+{
+    HbMessageBox *messageBox = new HbMessageBox(type);
+    messageBox->setText(text);
+    messageBox->setStandardButtons( HbMessageBox::Ok );
+    if(label.length())
+        {
+        HbLabel *header = new HbLabel(label, messageBox);
+        messageBox->setHeadingWidget(header);
+        }
+    messageBox->setAttribute(Qt::WA_DeleteOnClose);
+    messageBox->setTimeout(timeout);
+    messageBox->open();
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::about()
+{
+    showMessageBox(HbMessageBox::MessageTypeInformation,
+        "Version 6.1.2 - September 9th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.",
+        "About Creator", 
+        HbPopup::NoTimeout
+        );
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::error(const QString& errorMessage)
+{
+    showMessageBox(HbMessageBox::MessageTypeWarning, errorMessage, QString("Error"), 3000);
+}
+
+
+// ---------------------------------------------------------------------------
+
+HbProgressDialog* Notifications::showProgressBar(const QString& text, int max)
+{
+	HbProgressDialog *note = new HbProgressDialog(HbProgressDialog::ProgressDialog);
+    note->setText(text);
+    note->setMaximum(max);
+    note->setAutoClose(false);
+    note->show();
+    return note;
+
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, int timeout)
+{
+    showMessageBox(type, text, QString("Creator"), timeout);
+}
+
+
+// ---------------------------------------------------------------------------
+
+CreatorYesNoDialog::CreatorYesNoDialog(MUIObserver* observer, int userData) : 
+    HbMessageBox(HbMessageBox::MessageTypeQuestion, NULL),
+    CreatorDialog(observer, userData)
+{
+}
+
+void CreatorYesNoDialog::launch(const QString& text, const QString& label, MUIObserver* observer, int userData) throw(std::exception)
+{
+    CreatorYesNoDialog* dlg = new CreatorYesNoDialog(observer, userData);
+    dlg->setStandardButtons( HbMessageBox::Yes | HbMessageBox::No );
+    dlg->setText(text);
+    if(label.length())
+        dlg->setHeadingWidget(new HbLabel(label, dlg));
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->setTimeout(HbPopup::NoTimeout);
+    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
+}
+
+void CreatorYesNoDialog::DialogClosed(HbAction *action)
+{
+    TBool PositiveAction(EFalse);
+    if(action && (action->softKeyRole()==QAction::PositiveSoftKey || !action->text().compare("yes", Qt::CaseInsensitive))){
+        PositiveAction = ETrue;
+    }
+    NotifyObserver(PositiveAction);
+}
+
+CreatorInputDialog::CreatorInputDialog(int* value, MUIObserver* module, int userData) : 
+    HbInputDialog(NULL),
+    CreatorDialog(module, userData),
+    mIntValue(value), 
+    mStrValue(mDummy)// will not be used
+{
+    if(!value)
+        throw std::invalid_argument("value cannot be the null!");
+}
+
+CreatorInputDialog::CreatorInputDialog(TDes& value, MUIObserver* module, int userData) : 
+    HbInputDialog(NULL),
+    CreatorDialog(module, userData),
+    mIntValue(NULL),
+    mStrValue(value)
+{
+}
+
+void CreatorInputDialog::launch(const QString& label, int* value, bool acceptsZero, MUIObserver* observer, int userData) throw( std::exception )
+{
+    CreatorInputDialog* dlg = new CreatorInputDialog(value, observer, userData);
+    dlg->setPromptText(label);
+    dlg->setInputMode(IntInput);
+    HbValidator *validator = new HbValidator(dlg);
+    QString tmp;
+    if (acceptsZero == false) {
+        tmp.append("^[1-9]{1}\\d{0,4}");
+    }
+    else {
+        tmp.append("^[0-9]{1,5}");
+    }
+        
+    QRegExp rxBasic(tmp);
+    validator->addField(new QRegExpValidator(rxBasic, 0), "");
+    dlg->setValidator(validator);
+    dlg->setValue(QVariant(*value));
+    dlg->lineEdit()->setSelection(0, dlg->value().toString().length());
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
+}
+
+void CreatorInputDialog::launch(const QString& label, TDes& value, MUIObserver* observer, int userData) throw( std::exception )
+{
+    CreatorInputDialog* dlg = new CreatorInputDialog(value, observer, userData);
+    dlg->setPromptText(label);
+    dlg->lineEdit()->setMaxLength(value.MaxLength());
+    dlg->setValue(QString::fromUtf16(value.Ptr(), value.Length()));
+    dlg->lineEdit()->setSelection(0, dlg->value().toString().length());
+    dlg->setInputMode(TextInput);
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
+}
+
+void CreatorInputDialog::DialogClosed(HbAction *action)
+{
+    TBool PositiveAction(EFalse);
+    if(action && (action->softKeyRole()==QAction::PositiveSoftKey || !action->text().compare("ok", Qt::CaseInsensitive))){
+        bool ok = true;
+        if( inputMode() == IntInput )
+            *mIntValue = value().toInt(&ok);
+        else if( inputMode() == TextInput && mStrValue.MaxLength() >= value().toString().length() )
+            mStrValue.Copy(value().toString().utf16());
+        else
+            ok = false;
+        PositiveAction = ok ? ETrue : EFalse;
+    }
+    NotifyObserver(PositiveAction);
+}
+
+CreatorSelectionDialog::CreatorSelectionDialog(int* selectedItem, MUIObserver* observer, int userData) throw(std::exception) : 
+    HbSelectionDialog(NULL),
+    CreatorDialog(observer, userData),
+    mSelectedItem(selectedItem),
+    mSelectedItems(NULL)
+{
+    if(!mSelectedItem)
+        throw std::invalid_argument("selectedItem cannot be null!");
+}
+
+CreatorSelectionDialog::CreatorSelectionDialog(CArrayFixFlat<TInt>* selectedItems, MUIObserver* observer, int userData) throw(std::exception) : 
+    HbSelectionDialog(NULL),
+    CreatorDialog(observer, userData),
+    mSelectedItem(NULL),
+    mSelectedItems(selectedItems)
+{
+    if(!mSelectedItems)
+        throw std::invalid_argument("selectedItems cannot be null!");
+}
+
+void CreatorSelectionDialog::launch(const QString& label, const QStringList& items, int* selectedItem, MUIObserver* observer, int userData) throw(std::exception)
+{
+    CreatorSelectionDialog* dlg = new CreatorSelectionDialog(selectedItem, observer, userData);
+    if(label.length())
+        dlg->setHeadingWidget(new HbLabel(label, dlg));
+    dlg->setStringItems(items);
+    dlg->setSelectionMode(HbAbstractItemView::SingleSelection); 
+    dlg->setSelectedItems(QList<QVariant>());
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
+}
+
+void CreatorSelectionDialog::launch(const QString& label, const QStringList& items, CArrayFixFlat<TInt>* selectedItems, MUIObserver* observer, int userData) throw(std::exception)
+{
+    CreatorSelectionDialog* dlg = new CreatorSelectionDialog(selectedItems, observer, userData);
+    if(label.length())
+        dlg->setHeadingWidget(new HbLabel(label, dlg));
+    dlg->setStringItems(items);
+    dlg->setSelectionMode(HbAbstractItemView::MultiSelection); 
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
+}
+
+void CreatorSelectionDialog::DialogClosed(HbAction *action)
+{
+    TBool PositiveAction(EFalse);
+    //CreatorSelectionDialog* dlg = qobject_cast<CreatorSelectionDialog*>(sender());
+    if(!action || (action && action->softKeyRole()==QAction::SelectSoftKey) || (action && !action->text().compare("ok", Qt::CaseInsensitive))){
+        if(selectedItems().count()){
+            try{
+                if( selectionMode() == HbAbstractItemView::SingleSelection && mSelectedItem){
+                    bool ok(false);
+                    *mSelectedItem = selectedItems().at(0).toInt(&ok);
+                    if(!ok)
+                        throw std::invalid_argument("cannot obtain selected item!");
+                }
+                if( selectionMode() == HbAbstractItemView::MultiSelection && mSelectedItems){
+                    QList<QVariant> items = selectedItems();
+                    foreach( QVariant item, items){
+                        QT_TRAP_THROWING( mSelectedItems->AppendL( item.toInt() ) );
+                    }
+                }
+                PositiveAction = ETrue;
+            }
+            catch (std::exception& e){
+                Notifications::error( QString("exception: ")+e.what() );
+            }
+        }
+    }
+    NotifyObserver(PositiveAction);
+}
+
+CreatorDateTimeDialog::CreatorDateTimeDialog(TTime* value, MUIObserver* observer, int userData) : 
+    HbDialog(NULL),
+    CreatorDialog(observer, userData),
+    mValue(value)
+{
+}
+
+void CreatorDateTimeDialog::launch(const QString& label, TTime* value, MUIObserver* observer, int userData) throw( std::exception )
+{
+    CreatorDateTimeDialog* dlg = new CreatorDateTimeDialog(value, observer, userData);
+    if(!value)
+        throw std::invalid_argument("value cannot be the null!");
+    if(label.length())
+        dlg->setHeadingWidget( new HbLabel(label, dlg) );
+    
+    // TTime to QDate
+    TBuf<20> timeString;
+    _LIT(KDateString,"%D%M%Y%/0%1%/1%2%/2%3%/3");
+    TRAP_IGNORE( value->FormatL(timeString, KDateString) );
+    QString temp = QString::fromUtf16(timeString.Ptr(), timeString.Length());
+    temp.replace(QChar('/'), QChar('-'));
+    QDate date = QDate::fromString(temp, "dd-MM-yyyy");
+    HbDateTimePicker* widget = new HbDateTimePicker( date, dlg );
+    dlg->setContentWidget( widget );
+    dlg->addAction(new HbAction("Ok", dlg));
+    dlg->addAction(new HbAction("Cancel", dlg));
+    dlg->setModal(true); // Dialog is modal  
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->setTimeout(HbPopup::NoTimeout);
+    dlg->open(dlg, SLOT(DialogClosed(HbAction*)));
+}
+
+void CreatorDateTimeDialog::DialogClosed(HbAction *action)
+{
+    TBool PositiveAction(EFalse);
+    if(action && (action->softKeyRole()==QAction::PositiveSoftKey || !action->text().compare("ok", Qt::CaseInsensitive))){
+        QString str = qobject_cast<HbDateTimePicker*>(contentWidget())->date().toString(Qt::ISODate);
+        str.remove('-');
+        str += ":000000";// 0h 0m 0s
+        TBuf<30> dateTimeString(str.utf16());
+        mValue->Set(dateTimeString);
+        PositiveAction = ETrue;
+    }
+    NotifyObserver(PositiveAction);
+}
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FB.hrh	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,294 @@
+/*
+* 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 FILEBROWSER_HRH
+#define FILEBROWSER_HRH
+
+enum TFileBrowserCommandIds
+    {
+    EFileBrowserCmdFile = 1,
+    EFileBrowserCmdFileBack,
+    EFileBrowserCmdFileOpen,
+    EFileBrowserCmdFileOpenApparc,
+    EFileBrowserCmdFileOpenDocHandlerEmbed,
+    EFileBrowserCmdFileOpenDocHandlerStandAlone,
+    EFileBrowserCmdFileOpenFileService,
+    EFileBrowserCmdFileOpenDrive,
+    EFileBrowserCmdFileOpenDirectory,
+    EFileBrowserCmdFileView,
+    EFileBrowserCmdFileViewText,
+    EFileBrowserCmdFileViewHex,
+    EFileBrowserCmdFileEdit,
+    EFileBrowserCmdFileEditText,
+    EFileBrowserCmdFileEditHex,
+    EFileBrowserCmdFileSearch,
+    EFileBrowserCmdFileSendTo,
+    EFileBrowserCmdFileNew,
+    EFileBrowserCmdFileNewFile,
+    EFileBrowserCmdFileNewDirectory,
+    EFileBrowserCmdFileDelete,
+    EFileBrowserCmdFileRename,
+    EFileBrowserCmdFileTouch,
+    EFileBrowserCmdFileProperties,
+    EFileBrowserCmdFileChecksums,
+    EFileBrowserCmdFileChecksumsMD5,
+    EFileBrowserCmdFileChecksumsMD2,
+    EFileBrowserCmdFileChecksumsSHA1,
+    EFileBrowserCmdFileSetAttributes,
+    EFileBrowserCmdFileCompress,
+    EFileBrowserCmdFileDecompress,
+    EFileBrowserCmdEdit,
+    EFileBrowserCmdSnapShot,
+    EFileBrowserCmdEditCut,
+    EFileBrowserCmdEditCopy,    
+    EFileBrowserCmdEditPaste,
+    EFileBrowserCmdEditCopyToFolder,    
+    EFileBrowserCmdEditMoveToFolder,
+    EFileBrowserCmdEditSelect,    
+    EFileBrowserCmdEditUnselect,
+    EFileBrowserCmdEditSelectAll,    
+    EFileBrowserCmdEditUnselectAll,
+    EFileBrowserCmdView,
+    EFileBrowserCmdViewSort,
+    EFileBrowserCmdViewSortByName,
+    EFileBrowserCmdViewSortByExtension,
+    EFileBrowserCmdViewSortByDate,
+    EFileBrowserCmdViewSortBySize,
+    EFileBrowserCmdViewOrder,
+    EFileBrowserCmdViewOrderAscending,
+    EFileBrowserCmdViewOrderDescending,
+    EFileBrowserCmdViewFilterEntries,
+    EFileBrowserCmdViewRefresh,
+    EFileBrowserCmdDiskAdmin,    
+    EFileBrowserCmdDiskAdminSetDrivePassword,    
+    EFileBrowserCmdDiskAdminUnlockDrive,    
+    EFileBrowserCmdDiskAdminClearDrivePassword,    
+    EFileBrowserCmdDiskAdminEraseDrivePassword,    
+    EFileBrowserCmdDiskAdminFormatDrive,    
+    EFileBrowserCmdDiskAdminQuickFormatDrive,    
+    EFileBrowserCmdDiskAdminCheckDisk,    
+    EFileBrowserCmdDiskAdminScanDrive,    
+    EFileBrowserCmdDiskAdminSetDriveName,    
+    EFileBrowserCmdDiskAdminSetDriveVolumeLabel,    
+    EFileBrowserCmdDiskAdminEraseMBR,
+    EFileBrowserCmdDiskAdminDrivePartition,    
+    EFileBrowserCmdDiskAdminEjectDrive,    
+    EFileBrowserCmdDiskAdminDismountFileSystem,    
+    EFileBrowserCmdTools,    
+    EFileBrowserCmdToolsAllFiles,
+    EFileBrowserCmdToolsAvkonIconCache,
+    EFileBrowserCmdToolsAvkonIconCacheEnable,
+    EFileBrowserCmdToolsAvkonIconCacheDisable,    
+    EFileBrowserCmdToolsDisableExtErrors,    
+    EFileBrowserCmdToolsEditDataTypes,
+    EFileBrowserCmdToolsEnableExtErrors,
+    EFileBrowserCmdToolsErrorSimulate,
+    EFileBrowserCmdToolsErrorSimulateLeave,
+    EFileBrowserCmdToolsErrorSimulatePanic,
+    EFileBrowserCmdToolsErrorSimulateException,    
+    EFileBrowserCmdToolsLocalConnectivity,    
+    EFileBrowserCmdToolsLocalConnectivityActivateInfrared,    
+    EFileBrowserCmdToolsLocalConnectivityLaunchBTUI,    
+    EFileBrowserCmdToolsLocalConnectivityLaunchUSBUI,    
+    EFileBrowserCmdToolsInstalledApps,    
+    EFileBrowserCmdToolsOpenFiles,    
+    EFileBrowserCmdToolsMsgAttachments,    
+    EFileBrowserCmdToolsMsgAttachmentsInbox,    
+    EFileBrowserCmdToolsMsgAttachmentsDrafts,    
+    EFileBrowserCmdToolsMsgAttachmentsSentItems,    
+    EFileBrowserCmdToolsMsgAttachmentsOutbox,    
+    EFileBrowserCmdToolsMsgStoreWalk,
+    EFileBrowserCmdToolsSecureBackup,    
+    EFileBrowserCmdToolsSecureBackupStartBackup,    
+    EFileBrowserCmdToolsSecureBackupStartRestore,    
+    EFileBrowserCmdToolsSecureBackupStop,    
+    EFileBrowserCmdToolsSetDebugMask,    
+    EFileBrowserCmdToolsMemoryInfo,    
+    EFileBrowserCmdSettings,
+    EFileBrowserCmdAbout,
+    EFileBrowserCmdSettingsChange,
+    EFileBrowserCmdSettingsExit,
+    EFileBrowserCmdSettingsBack,
+    EFileBrowserSettingItemList,
+    EFileBrowserCmdDataTypesChangeMapping,
+    EFileBrowserCmdDataTypesSetDefaultMapping,
+    EFileBrowserCmdDataTypesRefresh,
+    EFileBrowserCmdDataTypesExit,
+    EFileBrowserCmdDataTypesBack,
+    EFileBrowserDataTypesList,
+    EFileBrowserProgressNote,
+    EFileBrowserWaitNote,
+    EFileBrowserAttributeEditorSetArchive,
+    EFileBrowserAttributeEditorSetHidden,
+    EFileBrowserAttributeEditorSetReadOnly,
+    EFileBrowserAttributeEditorSetSystem,
+    EFileBrowserAttributeEditorSetRecurse,
+    EFileBrowserSearchQuerySearchDir,
+    EFileBrowserSearchQueryWildCards,
+    EFileBrowserSearchQueryTextInFile,
+    EFileBrowserSearchQueryMinSize,
+    EFileBrowserSearchQueryMaxSize,
+    EFileBrowserSearchQueryMinDate,
+    EFileBrowserSearchQueryMaxDate,
+    EFileBrowserSearchQueryRecurse,
+    EFileBrowserCmdFileEditorViewAsText,
+    EFileBrowserCmdFileEditorViewAsHex,
+    EFileBrowserCmdFileEditorSave,
+    EFileBrowserCmdFileEditorSaveAs,
+    EFileBrowserCmdFileEditorSaveFormat,
+    EFileBrowserCmdFileEditorSaveFormatANSIASCII,
+    EFileBrowserCmdFileEditorSaveFormatUTF8,
+    EFileBrowserCmdFileEditorSaveFormatUTF16LE,
+    EFileBrowserCmdFileEditorSaveFormatUTF16BE,
+    EFileBrowserCmdFileEditorEditAsText,
+    EFileBrowserCmdFileEditorEditAsHex,
+    EFileBrowserCmdFileEditorExit,
+    EFileBrowserFileOpCommandAttribs,
+    EFileBrowserFileOpCommandCopy,
+    EFileBrowserFileOpCommandMove,
+    EFileBrowserFileOpCommandRename,
+    EFileBrowserFileOpCommandDelete,
+    EFileBrowserFileOpCommandDriveSnapShot
+    };
+
+enum TFileBrowserFixedIconIds
+    {
+    EFixedIconMarking = 0,
+    EFixedIconEmpty,    
+    EFixedIconPhoneMemory,    
+    EFixedIconMemoryCard,    
+    EFixedIconMemoryCardDisabled,    
+    EFixedIconFolder,    
+    EFixedIconFolderSub,    
+    EFixedIconFolderCurrent,
+    EFixedIconListLength // this should be last   
+    };
+
+enum TFileBrowserEntryOverwriteActions
+    {
+    EFileActionOverwriteAll = 0,
+    EFileActionSkipAllExisting,    
+    EFileActionGenerateUniqueFilenames,
+    EFileActionQueryPostFix   
+    };
+
+enum TFileBrowserSecureBackupState
+    {
+    ESecureBackupStateFull = 0,
+    ESecureBackupStatePartial    
+    };
+
+enum TFileBrowserSecureBackupType
+    {
+    ESecureBackupTypeBase = 0,
+    ESecureBackupTypeIncremental    
+    };
+    
+enum TFileBrowserDataTypePriorities
+    {
+    EDataTypePriorityMaximum = 0,
+    EDataTypePriorityHigh,    
+    EDataTypePriorityNormal,
+    EDataTypePriorityLow,
+    EDataTypePriorityLastResort   
+    };
+
+enum TFileBrowserCommonFileActions
+    {
+    ECommonFileActionViewAsTextHex = 0,
+    ECommonFileActionOpenWithApparc,    
+    ECommonFileActionOpenWithDocHandlerEmbed   
+    };
+                     
+enum TFileBrowserSettingListTabs
+    {
+    ETabGeneral = 0,
+    ETabFileOps    
+    };
+    
+enum TFileBrowserSettingListIds
+    {
+    ESettingListDisplayModeSelection = 0,
+    ESettingListFileViewModeSelection,
+    ESettingListShowSubdirectoryInfoSelection,
+    ESettingListShowAssociatedIconsSelection,
+    ESettingListRememberLastPathSelection,
+    ESettingListRememberFolderSelection,
+    ESettingListEnableToolbar,
+
+    ESettingListSupportNetworkDrivesSelection,
+    ESettingListBypassPlatformSecuritySelection,
+    ESettingListRemoveFileLocksSelection,
+    ESettingListIgnoreProtectionsAttsSelection,
+    ESettingListRemoveROMWriteProtectionSelection
+    };
+
+enum TFileBrowserSettingDisplayModes
+    {
+    EDisplayModeFullScreen = 0,
+    EDisplayModeNormal
+    };
+
+enum TFileBrowserSettingFileViewModes
+    {
+    EFileViewModeSimple = 0,
+    EFileViewModeExtended
+    };
+
+enum TFileBrowserFileEditorModes
+    {
+    EFileEditorViewAsText = 0,
+    EFileEditorViewAsHex,
+    EFileEditorEditAsText,
+    EFileEditorEditAsHex
+    };
+
+enum
+    {
+    EFileViewerDialogControl = 0x5FEC
+    };
+
+enum
+    {
+    EFileEditorDialogId = 1
+    };
+
+enum TFileBrowserCmdFileChecksums
+    {
+    EFileChecksumsMD5 = 0,
+    EFileChecksumsMD2,
+    EFileChecksumsSHA1
+    };
+
+enum TListingMode
+    {
+    ENormalEntries = 0,
+    ESearchResults,
+    EOpenFiles,
+    EMsgAttachmentsInbox,
+    EMsgAttachmentsDrafts,
+    EMsgAttachmentsSentItems,
+    EMsgAttachmentsOutbox
+    };
+
+enum TClipBoardMode
+    {
+    EClipBoardModeCut = 0,
+    EClipBoardModeCopy
+    };
+
+#endif      // FILEBROWSER_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBFileOps.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1164 @@
+/*
+* 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 FILES
+#include "FBFileOps.h"
+#include "FBFileUtils.h"
+#include "engine.h"
+#include "FBTraces.h"
+
+#ifndef FILEBROWSER_LITE
+  #include "FBFileOpClient.h"
+#endif  
+
+#include <f32file.h>
+#include <bautils.h>
+#include <eikenv.h>
+#include <babackup.h>
+
+const TInt KSecureBackupStartDelay = 750000;
+const TInt KSecureBackupLoopDelay = 100000;
+const TInt KSecureBackupEndDelay = 200000;
+const TInt KMaxFileLockAttempts = 3;
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+CFileBrowserFileOps* CFileBrowserFileOps::NewL(CEngine* aEngine)
+	{
+	CFileBrowserFileOps* self = new(ELeave) CFileBrowserFileOps(aEngine);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+// --------------------------------------------------------------------------------------------
+
+CFileBrowserFileOps::CFileBrowserFileOps(CEngine* aEngine) : iEngine(aEngine)
+	{
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileOps::ConstructL()
+	{
+	iRecursiveState = EFileOpInvalid;
+	iSecureBackUpActive = EFalse;
+	iFileCommandActivatedSecureBackup = EFalse;
+	
+    User::LeaveIfError(iFs.Connect());
+    iFileMan = CFileMan::NewL( iFs, this );
+	}
+
+// --------------------------------------------------------------------------------------------
+
+CFileBrowserFileOps::~CFileBrowserFileOps()
+	{
+	if (iSBEClient)
+	    delete iSBEClient;
+	
+    #ifndef FILEBROWSER_LITE	
+        if (iFileOpClient)
+            delete iFileOpClient;
+    #endif	
+
+    delete iFileMan;
+    iFs.Close();    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::ActivateSecureBackUpViaFileOp()
+    {
+    iFileManObserverResult = MFileManObserver::EContinue;
+    // if already activate by a file command, return ok
+    if (iFileCommandActivatedSecureBackup)
+        return KErrNone;
+    else
+        {
+        // if secure backup is already active, disable it first, because it may in wrong state
+        if (iSecureBackUpActive)
+            DeActivateSecureBackUp();
+        }
+    
+    // try to activate full secure backup
+    TInt err = ActivateSecureBackUp(conn::EBURBackupFull, conn::EBackupBase);
+    
+    if (err == KErrNone)
+        iFileCommandActivatedSecureBackup = ETrue;
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DeActivateSecureBackUpViaFileOp()
+    {
+    TInt err(KErrGeneral);
+    iFileManObserverResult = MFileManObserver::EContinue;
+    
+    // if activate by a file command, try to reactivate it
+    if (iFileCommandActivatedSecureBackup)
+        {
+        err = DeActivateSecureBackUp();
+        
+        // even if it fails, forget the state
+        iFileCommandActivatedSecureBackup = EFalse;
+        }
+
+    return err;
+    }    
+    
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::ActivateSecureBackUp(conn::TBURPartType aPartType, conn::TBackupIncType aBackupIncType)
+    {
+    iFileManObserverResult = MFileManObserver::EContinue;
+    // check for invalid parameters
+    if (aPartType == conn::EBURNormal || aBackupIncType == conn::ENoBackup)
+        User::Panic(_L("Inv.Usage.SE"), 532);
+    
+    TInt err(KErrNone);
+    
+    if (!iSBEClient)
+        {
+        TRAP(err, iSBEClient = conn::CSBEClient::NewL());
+        if (err != KErrNone)
+            return err;
+        }
+    
+    TDriveList driveList;
+    err = iFs.DriveList(driveList);
+    
+    if (err == KErrNone)
+        {
+        // make sure that the application has a system status to prevent getting shut down events
+        iEngine->EikonEnv()->SetSystem(ETrue);
+    
+        // activating secure back up removes locks from files which respect this fuctionality                
+        TRAP(err, iSBEClient->SetBURModeL(driveList, aPartType, aBackupIncType));
+        
+        if (err == KErrNone)
+            {
+            iSecureBackUpActive = ETrue;
+            User::After(KSecureBackupStartDelay); // a short delay to wait to activate
+            }
+        }
+
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DeActivateSecureBackUp()
+    {
+    TInt err(KErrNone);
+    
+    if (!iSBEClient)
+        {
+        TRAP(err, iSBEClient = conn::CSBEClient::NewL());
+        if (err != KErrNone)
+            return err;
+        
+        // make sure that the application has a system status
+        iEngine->EikonEnv()->SetSystem(ETrue);
+        }
+        
+    TDriveList driveList;
+    err = iFs.DriveList(driveList);
+    
+    if (err == KErrNone)
+        {
+        // deactivate secure backup
+        TRAP(err, iSBEClient->SetBURModeL(driveList, conn::EBURNormal, conn::ENoBackup));
+        
+        User::After(KSecureBackupEndDelay); // a short delay to wait to deactivate
+
+        // system status not needed anymore
+        iEngine->EikonEnv()->SetSystem(EFalse);
+        }
+    
+    iSecureBackUpActive = EFalse;
+
+    return err;
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DoFindEntries(const TDesC& aFileName, const TDesC& aPath)
+    {
+    TFindFile fileFinder(iFs);
+    CDir* dir;
+    TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir);
+
+    while (err == KErrNone && iFileManObserverResult != MFileManObserver::ECancel)
+        {
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TEntry entry = (*dir)[i];
+
+            if (entry.iName.Length() && aPath.Length())
+                {
+                // parse the entry
+                TParse parsedName;
+                parsedName.Set(entry.iName, &fileFinder.File(), NULL);
+                
+                if (parsedName.Drive().Length() && aPath.Length() && parsedName.Drive()[0] == aPath[0])
+                    {
+                    // get full source path
+                    TFileName fullSourcePath = parsedName.FullName();
+                    if (entry.IsDir())
+                        fullSourcePath.Append(_L("\\"));
+                    
+                    // call the file operation command
+                    switch(iRecursiveState)
+                        {
+                        case EFileOpAttribs:
+                            {
+                            // the same attribs command can be given for both directories and files
+                            FileOpAttribs(fullSourcePath, iUint1, iUint2, iTime1, iUint3);
+                            }
+                            break;
+
+                        case EFileOpCopy:
+                            {
+                            // calculate length of new entries added to the original source path
+                            TUint newEntriesLength = fullSourcePath.Length() - iBuf1.Length();
+                            
+                            // get pointer description to the rightmost data
+                            TPtr16 newEntriesPtr = fullSourcePath.RightTPtr(newEntriesLength);
+                            
+                            // generate target path
+                            TFileName fullTargetPath = iBuf2;
+                            fullTargetPath.Append(newEntriesPtr);
+                            
+                            if (entry.IsDir())
+                                {
+                                // if it is a directory entry, just create it based on the entry's attributes
+                                FileOpMkDirAll(fullTargetPath, entry.iAtt);
+                                }
+                            else
+                                {
+                                // ensure that root target folder exists
+                                BaflUtils::EnsurePathExistsL(iFs, iBuf2);
+                                // otherwise copy the file
+                                FileOpCopy(fullSourcePath, fullTargetPath, iUint1);
+                                }
+                            }
+                            break;
+
+                        case EFileOpDelete:
+                            {
+                            if (entry.IsDir())
+                                {
+                                // for directories call rmdir    
+                                FileOpRmDir(fullSourcePath, iUint1);
+                                }
+                            else
+                                {
+                                // for files call the normal file deletion operation    
+                                FileOpDeleteFile(fullSourcePath, iUint1);
+                                }
+                            }
+                            break;
+                                                    
+                        default:
+                            User::Panic (_L("FileOpRecurs"), 775);
+                            break;
+                        }                        
+                    }
+                }
+                if ( iFileManObserverResult == MFileManObserver::ECancel ) break;
+            }
+
+        delete dir;
+        dir = NULL;
+        if ( iFileManObserverResult != MFileManObserver::ECancel )
+            {
+            err = fileFinder.FindWild(dir);
+            }
+        }
+
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DoFindEntriesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
+	{
+    TInt err(KErrNone);
+
+    // it is logical to scan upwards when deleting and changing attributes
+    CDirScan::TScanDirection scanDirection = CDirScan::EScanUpTree;
+    
+    // when copying files, it is more logical to move downwards
+    if (iRecursiveState == EFileOpCopy)
+        scanDirection = CDirScan::EScanDownTree;
+    
+    
+    CDirScan* scan = CDirScan::NewLC(iFs);
+    scan->SetScanDataL(aPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst, scanDirection);
+    CDir* dir = NULL;
+
+    for(;;)
+        {
+        TRAP(err, scan->NextL(dir));
+        if (!dir  || (err != KErrNone))
+            break;
+
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TEntry entry = (*dir)[i];
+            
+            if (entry.IsDir())
+                {
+                TFileName path(scan->FullPath());
+                
+                if (path.Length())
+                    {
+                    path.Append(entry.iName);
+                    path.Append(_L("\\"));
+                    // test path.Left(iBuf2.Length()).Compare(iBuf2) - to prevent never ending recursive copy (in case of copy folder under itself)
+                    if( !(iRecursiveState == EFileOpCopy && !path.Left(iBuf2.Length()).Compare(iBuf2)) )
+                        {
+                        DoFindEntries(aFileName, path);
+                        }
+                    }
+                }
+            if ( iFileManObserverResult == MFileManObserver::ECancel )
+                {
+                break;
+                }
+            }
+        delete(dir);
+        if ( iFileManObserverResult == MFileManObserver::ECancel )
+            {
+            break;
+            }
+        }
+
+    CleanupStack::PopAndDestroy(scan);
+    return err;
+    }
+    
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::Copy(const TFileEntry& aSourceEntry, const TDesC& aTargetFullName, TUint aSwitch, TBool aDeleteSource) 
+    {
+    iOperationError = KErrNone;
+    iFileManObserverResult = MFileManObserver::EContinue;
+    
+    TFileName sourcePath = aSourceEntry.iPath;
+    sourcePath.Append(aSourceEntry.iEntry.iName);
+    
+    TInt err(KErrNone);
+
+    if (aSourceEntry.iEntry.IsDir() && (aSwitch & CFileMan::ERecurse))
+        {
+        // find all files recursively and run the operation for them
+        iRecursiveState = EFileOpCopy;
+        sourcePath.Append(_L("\\"));
+        
+        TFileName targetPath = aTargetFullName;
+        targetPath.Append(_L("\\"));
+        
+        // remove the recursion flag because we will implement our own recursion
+        TUint newSwitch(aSwitch);
+        newSwitch &= ~CFileMan::ERecurse;
+    
+        iBuf1.Copy(sourcePath);
+        iBuf2.Copy(targetPath);
+        iUint1 = newSwitch;
+        
+        TRAP(err, DoFindEntries(_L("*"), sourcePath));              // entries under current directory entry
+        if ( iFileManObserverResult != MFileManObserver::ECancel )
+            {
+            TRAP(err, DoFindEntriesRecursiveL(_L("*"), sourcePath));    // recursively under directories of current directory entry
+            }
+        // ensure that target folder exists in case of copying empty folder
+        BaflUtils::EnsurePathExistsL(iFs, targetPath);
+        // a path has a trailing backslash so it needs to be removed before the call
+        err = FileOpAttribs(targetPath.Left(targetPath.Length()-1), aSourceEntry.iEntry.iAtt, 0, 0, 0);
+        }
+
+    else if (aSourceEntry.iEntry.IsDir())
+        {
+        TFileName targetPath = aTargetFullName;
+        targetPath.Append(_L("\\"));
+        
+        // just create a directory based on the file attributes of the source directory
+        err = FileOpMkDirAll(targetPath, aSourceEntry.iEntry.iAtt);
+        }
+        
+    else
+        {
+        // remove a recursion flag if present (this should never happen, but some extra error checking)
+        if (aSwitch & CFileMan::ERecurse)
+            aSwitch &= ~CFileMan::ERecurse;    
+            
+        // do the operation for a file entry
+        err = FileOpCopy(sourcePath, aTargetFullName, aSwitch);
+        }
+    
+        
+    // delete source if needed and copy succeeded without any errors (== move operation)
+    if ( aDeleteSource && iOperationError == KErrNone &&
+         iFileManObserverResult != MFileManObserver::ECancel )
+        {
+        err = Delete(aSourceEntry, aSwitch);    
+        }
+    
+    if ( !iOperationError && iFileManObserverResult == MFileManObserver::ECancel )
+        {
+        iOperationError = KErrCancel;
+        }
+        
+    return iOperationError; 
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::FileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch) 
+    {
+    TInt err = DoFileOpCopy(aSourceFullName, aTargetFullName, aSwitch);
+
+    // if locked, unlock the file and retry
+    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
+        {
+        // try to remove the file lock by activating secure backup mode
+        if (ActivateSecureBackUpViaFileOp() == KErrNone)
+            {
+            // try the operation several times
+            for (TInt i=0; i<KMaxFileLockAttempts; i++)
+                {
+                err = DoFileOpCopy(aSourceFullName, aTargetFullName, aSwitch);
+                
+                if (err != KErrInUse)
+                    break;
+                else
+                    User::After(KSecureBackupLoopDelay);
+                }
+            }
+        }
+
+    // if access denied, then try to remove the target path and try again
+    if (iEngine->Settings().iIgnoreProtectionsAtts && err == KErrAccessDenied && BaflUtils::FileExists(iFs, aTargetFullName))
+        {
+        if (FileOpDeleteFile(aTargetFullName, 0) == KErrNone)
+            {
+            err = DoFileOpCopy(aSourceFullName, aTargetFullName, aSwitch);
+            }
+        }
+
+    // if the file already exists, it is not an error    
+    if (err == KErrAlreadyExists)
+        err = KErrNone;
+    
+    
+    // if copying from a ROM drive, remove the writing protection flag
+    if (iEngine->Settings().iRemoveROMWriteProrection && err == KErrNone && aSourceFullName.Length() > 3 && (aSourceFullName[0]=='z' || aSourceFullName[0]=='Z'))
+        {
+        FileOpAttribs(aTargetFullName, 0, KEntryAttReadOnly, 0, 0);
+        }
+    
+    
+    // remember the "lowest" error
+    if (err < iOperationError)
+        iOperationError = err;
+
+    LOGSTRING4("FileBrowser: FileOpCopy %S -> %S, err=%d", &aSourceFullName, &aTargetFullName, err);
+        
+    return err; 
+    }
+            
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DoFileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch) 
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();   
+            
+        return iFileOpClient->Copy(aSourceFullName, aTargetFullName, aSwitch);
+        }
+    else
+        {
+    #endif
+        //CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+        //TInt result = iFileMan->Copy( aSourceFullName, aTargetFullName, aSwitch, waiter->iStatus );
+        //waiter->StartAndWait();
+        //if ( !result ) result = waiter->Result();
+        //CleanupStack::PopAndDestroy( waiter );
+        TInt result = iFileMan->Copy( aSourceFullName, aTargetFullName, aSwitch );
+        return result;
+    #ifndef FILEBROWSER_LITE
+        }    
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::Rename(const TFileEntry& aSourceEntry, const TDesC& aNew, TUint aSwitch)
+    {
+    iOperationError = KErrNone;
+    iFileManObserverResult = MFileManObserver::EContinue;
+    
+    TFileName sourcePath = aSourceEntry.iPath;
+    sourcePath.Append(aSourceEntry.iEntry.iName);
+    
+    if (aSourceEntry.iEntry.IsDir())
+        {
+        // do the operation for a directory entry
+        FileOpRename(sourcePath, aNew, aSwitch);
+        }
+    else
+        {
+        // do the operation for a file
+        FileOpRename(sourcePath, aNew, aSwitch);
+        }
+
+    return iOperationError; 
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::FileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch)
+    {
+    TBool setBackROFlag(EFalse);
+
+    TInt err = DoFileOpRename(aName, aNew, aSwitch);
+
+    // if locked, unlock the file and retry
+    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
+        {
+        // try to remove the file lock by activating secure backup mode
+        if (ActivateSecureBackUpViaFileOp() == KErrNone)
+            {
+            // try the operation several times
+            for (TInt i=0; i<KMaxFileLockAttempts; i++)
+                {
+                err = DoFileOpRename(aName, aNew, aSwitch);
+                
+                if (err != KErrInUse)
+                    break;
+                else
+                    User::After(KSecureBackupLoopDelay);
+                }
+            }
+        }
+
+    // if write protected, remove protection and retry
+    else if (iEngine->Settings().iIgnoreProtectionsAtts && err == KErrAccessDenied)
+        {
+        // remove write protection and try again
+        if (FileOpAttribs(aName, 0, KEntryAttReadOnly, 0, 0) == KErrNone)
+            {
+            err = DoFileOpRename(aName, aNew, aSwitch);
+            
+            setBackROFlag = ETrue;
+            }
+        }
+
+    // if still access denied, then try to remove the target path and try again
+    if (iEngine->Settings().iIgnoreProtectionsAtts && err == KErrAccessDenied && BaflUtils::FileExists(iFs, aNew))
+        {
+        if (FileOpDeleteFile(aNew, 0) == KErrNone)
+            {
+            err = DoFileOpRename(aName, aNew, aSwitch);
+            }
+        }
+
+    // set back the read only flag
+    if (setBackROFlag)
+        FileOpAttribs(aName, KEntryAttReadOnly, 0, 0, 0);
+            
+
+    // remember the "lowest" error
+    if (err < iOperationError)
+        iOperationError = err;
+
+    LOGSTRING3("FileBrowser: FileOpRename %S, err=%d", &aName, err);
+        
+    return err; 
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DoFileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch)
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();   
+
+        return iFileOpClient->Rename(aName, aNew, aSwitch);
+        }
+    else
+        {
+    #endif
+        return iFileMan->Rename(aName, aNew, aSwitch);
+    #ifndef FILEBROWSER_LITE
+        }    
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::Attribs(const TFileEntry& aSourceEntry, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
+    {
+    iOperationError = KErrNone;
+    iFileManObserverResult = MFileManObserver::EContinue;
+    
+    TFileName sourcePath = aSourceEntry.iPath;
+    sourcePath.Append(aSourceEntry.iEntry.iName);
+    
+    TInt err(KErrNone);
+
+    if (aSourceEntry.iEntry.IsDir() && (aSwitch & CFileMan::ERecurse))
+        {
+        // do the operation for a current directory entry
+        err = FileOpAttribs(sourcePath, aSetMask, aClearMask, aTime, 0);
+
+        // find all files recursively and run the operation for them
+        iRecursiveState = EFileOpAttribs;
+        sourcePath.Append(_L("\\"));
+    
+        iBuf1.Copy(sourcePath);
+        iUint1 = aSetMask;
+        iUint2 = aClearMask;
+        iTime1 = aTime;
+        iUint3 = 0;
+        
+        TRAP(err, DoFindEntriesRecursiveL(_L("*"), sourcePath));    // recursively under directories of current directory entry
+        TRAP(err, DoFindEntries(_L("*"), sourcePath));              // entries under current directory entry
+        }
+
+    else if (aSourceEntry.iEntry.IsDir())
+        {
+        //sourcePath.Append(_L("\\"));   // <-- do not apply!
+    
+        // do the operation for a directory entry
+        err = FileOpAttribs(sourcePath, aSetMask, aClearMask, aTime, 0);
+        }
+            
+    else
+        {
+        // do the operation for a file entry
+        err = FileOpAttribs(sourcePath, aSetMask, aClearMask, aTime, 0);
+        }
+
+    return iOperationError;     
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+TInt CFileBrowserFileOps::FileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
+    {
+    TInt err = DoFileOpAttribs(aName, aSetMask, aClearMask, aTime, aSwitch);
+
+    // if locked, unlock the file and retry
+    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
+        {
+        // try to remove the file lock by activating secure backup mode
+        if (ActivateSecureBackUpViaFileOp() == KErrNone)
+            {
+            // try the operation several times
+            for (TInt i=0; i<KMaxFileLockAttempts; i++)
+                {
+                err = DoFileOpAttribs(aName, aSetMask, aClearMask, aTime, aSwitch);
+                
+                if (err != KErrInUse)
+                    break;
+                else
+                    User::After(KSecureBackupLoopDelay);
+                }
+            }
+        }
+
+    // remember the "lowest" error
+    if (err < iOperationError)
+        iOperationError = err;
+
+    LOGSTRING3("FileBrowser: FileOpAttribs %S, err=%d", &aName, err);
+        
+    return err;    
+    }
+    
+// --------------------------------------------------------------------------------------------
+    
+TInt CFileBrowserFileOps::DoFileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();   
+
+        return iFileOpClient->Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
+        }
+    else
+        {
+    #endif
+        return iFileMan->Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
+    #ifndef FILEBROWSER_LITE
+        }    
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::Delete(const TFileEntry& aSourceEntry, TUint aSwitch) 
+    {
+    iOperationError = KErrNone;
+    iFileManObserverResult = MFileManObserver::EContinue;
+    
+    TFileName sourcePath = aSourceEntry.iPath;
+    sourcePath.Append(aSourceEntry.iEntry.iName);
+    
+    TInt err(KErrNone);
+
+    if (aSourceEntry.iEntry.IsDir() && (aSwitch & CFileMan::ERecurse))
+        {
+        // find all files recursively and run the operation for them
+        iRecursiveState = EFileOpDelete;
+        sourcePath.Append(_L("\\"));
+    
+        iBuf1.Copy(sourcePath);
+        iUint1 = 0;
+        
+        TRAP(err, DoFindEntriesRecursiveL(_L("*"), sourcePath));    // recursively under directories of current directory entry
+        if ( iFileManObserverResult != MFileManObserver::ECancel )
+            {
+            TRAP(err, DoFindEntries(_L("*"), sourcePath));              // entries under current directory entry
+            }
+        
+        if ( iFileManObserverResult != MFileManObserver::ECancel )
+            {
+            // do the operation for a current directory entry as well
+            err = FileOpRmDir(sourcePath, 0);
+            }
+        }
+
+    else if (aSourceEntry.iEntry.IsDir())
+        {
+        sourcePath.Append(_L("\\"));
+    
+        // do the operation for a directory entry
+        err = FileOpRmDir(sourcePath, 0);
+        }
+
+    else
+        {
+        // do the operation for a file entry
+        err = FileOpDeleteFile(sourcePath, 0);
+        }
+    if ( !iOperationError && iFileManObserverResult == MFileManObserver::ECancel )
+        {
+        iOperationError = KErrCancel;
+        }
+    return iOperationError; 
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::FileOpDeleteFile(const TDesC& aName, TUint aSwitch) 
+    {
+    TInt err = DoFileOpDeleteFile(aName, aSwitch);
+
+    // if locked, unlock the file and retry
+    if (iEngine->Settings().iRemoveFileLocks && err == KErrInUse)
+        {
+        // try to remove the file lock by activating secure backup mode
+        if (ActivateSecureBackUpViaFileOp() == KErrNone)
+            {
+            // try the operation several times
+            for (TInt i=0; i<KMaxFileLockAttempts; i++)
+                {
+                err = DoFileOpDeleteFile(aName, aSwitch);
+                
+                if (err != KErrInUse)
+                    break;
+                else
+                    User::After(KSecureBackupLoopDelay);
+                }
+            }
+        }
+
+    // if write protected or system file, remove protections and retry
+    else if (iEngine->Settings().iIgnoreProtectionsAtts && (err == KErrAccessDenied || err == KErrNotFound))
+        {
+        // remove protections  and try again
+        if (FileOpAttribs(aName, 0, KEntryAttReadOnly|KEntryAttSystem|KEntryAttHidden, 0, 0) == KErrNone)
+            {
+            err = DoFileOpDeleteFile(aName, aSwitch);
+            }
+        }
+
+    // remember the "lowest" error
+    if (err < iOperationError)
+        iOperationError = err;
+
+    LOGSTRING3("FileBrowser: FileOpDeleteFile %S, err=%d", &aName, err);
+        
+    return err; 
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DoFileOpDeleteFile(const TDesC& aName, TUint aSwitch) 
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();   
+
+        return iFileOpClient->Delete(aName, aSwitch);
+        }
+    else
+        {
+    #endif
+//        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+//        TInt result = iFileMan->Delete( aName, aSwitch, waiter->iStatus );
+//        waiter->StartAndWait();
+//        if ( iFileManObserverResult == MFileManObserver::ECancel ) result = KErrCancel;
+//        if ( !result ) result = waiter->Result();
+//        CleanupStack::PopAndDestroy( waiter );
+		TInt result = iFileMan->Delete( aName, aSwitch );
+        return result;
+    #ifndef FILEBROWSER_LITE
+        }    
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::FileOpRmDir(const TDesC& aName, TUint aSwitch) 
+    {
+    TInt err = DoFileOpRmDir(aName, aSwitch);
+
+    // if write protected or system directory, remove protections and retry
+    if (iEngine->Settings().iIgnoreProtectionsAtts && (err == KErrAccessDenied || err == KErrInUse))
+        {
+        // remove protections and try again
+        if (FileOpAttribs(aName.Left(aName.Length()-1), 0, KEntryAttReadOnly|KEntryAttSystem|KEntryAttHidden, 0, 0) == KErrNone)
+            {
+            err = DoFileOpRmDir(aName, aSwitch);
+            }
+        }
+
+    // remember the "lowest" error
+    if (err < iOperationError)
+        iOperationError = err;
+
+    LOGSTRING3("FileBrowser: FileOpRmDir %S, err=%d", &aName, err);
+        
+    return err; 
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DoFileOpRmDir(const TDesC& aDirName, TUint aSwitch)
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();   
+
+        return iFileOpClient->RmDir(aDirName, aSwitch);
+        }
+    else
+        {
+    #endif
+        if ( aSwitch & CFileMan::ERecurse )
+            {
+//            CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+//            TInt result = iFileMan->RmDir( aDirName, waiter->iStatus );
+//            waiter->StartAndWait();
+//            if ( iFileManObserverResult == MFileManObserver::ECancel ) result = KErrCancel;
+//            if ( !result ) result = waiter->Result();
+//            CleanupStack::PopAndDestroy( waiter);
+            TInt result = iFileMan->RmDir( aDirName );
+            return result;
+            }
+        else
+            return iFs.RmDir(aDirName);    
+    #ifndef FILEBROWSER_LITE
+        }    
+    #endif
+   }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::MkDirAll(const TDesC& aPath, TInt aSetAtts, TBool aQuickOperation) 
+    {
+    iFileManObserverResult = MFileManObserver::EContinue;
+    if (aQuickOperation)
+        return DoFileOpMkDirAll(aPath);
+    else
+        return FileOpMkDirAll(aPath, aSetAtts);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::FileOpMkDirAll(const TDesC& aPath, TInt aSetAtts) 
+    {
+    TInt err = DoFileOpMkDirAll(aPath);
+
+    // if the directory already exists, it is not an error    
+    if (err == KErrAlreadyExists)
+        err = KErrNone;
+    
+    
+    // set attributes for directory just created
+    if (aSetAtts > 0 && err == KErrNone && aPath.Length() > 3)
+        {
+        // a path has a trailing backslash so it needs to be removed before the call
+        err = FileOpAttribs(aPath.Left(aPath.Length()-1), aSetAtts, 0, 0, 0);
+        }
+    
+
+    // remember the "lowest" error
+    if (err < iOperationError)
+        iOperationError = err;
+    
+    LOGSTRING3("FileBrowser: FileOpMkDirAll %S, err=%d", &aPath, err);
+    
+    return err;
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DoFileOpMkDirAll(const TDesC& aPath) 
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();   
+
+        return iFileOpClient->MkDirAll(aPath);
+        }
+    else
+        {
+    #endif
+        return iFs.MkDirAll(aPath);
+    #ifndef FILEBROWSER_LITE
+        }    
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::CreateEmptyFile(const TDesC& aName) 
+    {
+    return DoFileOpCreateEmptyFile(aName);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::FileOpCreateEmptyFile(const TDesC& aName) 
+    {
+    TInt err = DoFileOpCreateEmptyFile(aName);
+
+    // remember the "lowest" error
+    if (err < iOperationError)
+        iOperationError = err;
+    
+    LOGSTRING3("FileBrowser: FileOpCreateEmptyFile %S, err=%d", &aName, err);
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+TInt CFileBrowserFileOps::DoFileOpCreateEmptyFile(const TDesC& aName) 
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();   
+
+        return iFileOpClient->CreateEmptyFile(aName);
+        }
+    else
+        {
+    #endif
+        TInt err(KErrNone);
+            
+        RFile newFile;
+        err = newFile.Create(iFs, aName, EFileShareExclusive);
+        if (err == KErrNone)
+            err = newFile.Flush(); 
+        newFile.Close();
+        
+        return err; 
+    #ifndef FILEBROWSER_LITE
+        }    
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::DriveSnapShot(TChar aSourceDriveLetter, TChar aTargetDriveLetter)
+    {
+    TInt err(KErrNone);
+    iFileManObserverResult = MFileManObserver::EContinue;
+    
+    // remember old settings and force them to be true for this operation
+    TBool currentRemoveFileLocksValue = iEngine->Settings().iRemoveFileLocks;
+    TBool currentIgnoreProtectionAttsValue = iEngine->Settings().iIgnoreProtectionsAtts;
+    TBool currentRemoveROMWriteProrection = iEngine->Settings().iRemoveROMWriteProrection;
+    iEngine->Settings().iRemoveFileLocks = ETrue;
+    iEngine->Settings().iIgnoreProtectionsAtts = ETrue;
+    iEngine->Settings().iRemoveROMWriteProrection = ETrue;
+
+    
+    TFileName sourceDir;
+    sourceDir.Append(aSourceDriveLetter);
+    sourceDir.Append(_L(":"));
+
+    _LIT(KTargetDir, "%c:\\SnapShot_%c_drive");
+    TFileName targetDir;
+    targetDir.Format(KTargetDir, TUint(aTargetDriveLetter), TUint(aSourceDriveLetter));            
+
+    // remove any existing content, first get TEntry
+    TEntry entry;
+    err = iFs.Entry(targetDir, entry);
+
+    // entry directory exists, delete it
+    if (err == KErrNone && entry.IsDir())
+        {
+        TFileName targetRoot;
+        targetRoot.Append(aTargetDriveLetter);
+        targetRoot.Append(_L(":\\"));
+
+        TFileEntry targetEntry;
+        targetEntry.iPath = targetRoot;
+        targetEntry.iEntry = entry;
+
+        err = Delete(targetEntry, CFileMan::ERecurse);                
+        }
+        
+    // do not care if removing succeeded or not, just continue with copying    
+    TEntry fakeEntry;
+    fakeEntry.iAtt |= KEntryAttDir;
+
+    TFileEntry sourceEntry;
+    sourceEntry.iPath = sourceDir;
+    sourceEntry.iEntry = fakeEntry;
+
+    err = Copy(sourceEntry, targetDir, CFileMan::ERecurse|CFileMan::EOverWrite);                
+
+
+    // restore back settings
+    iEngine->Settings().iRemoveFileLocks = currentRemoveFileLocksValue;
+    iEngine->Settings().iIgnoreProtectionsAtts = currentIgnoreProtectionAttsValue;    
+    iEngine->Settings().iRemoveROMWriteProrection = currentRemoveROMWriteProrection;    
+
+
+    return iOperationError;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::EraseMBR(TUint aDriveNumber) 
+    {
+    #ifndef FILEBROWSER_LITE
+
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();
+        
+        return iFileOpClient->EraseMBR(aDriveNumber);
+
+    #else
+        return KErrNotSupported;
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileOps::PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions) 
+    {
+    #ifndef FILEBROWSER_LITE
+
+        if (!iFileOpClient)
+            iFileOpClient = CFBFileOpClient::NewL();
+        
+        return iFileOpClient->PartitionDrive(aDriveNumber, aNumberOfPartitions);
+
+    #else
+        return KErrNotSupported
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+
+MFileManObserver::TControl CFileBrowserFileOps::NotifyFileManStarted()
+    {
+    return iFileManObserverResult;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+MFileManObserver::TControl CFileBrowserFileOps::NotifyFileManOperation()
+    {
+    return iFileManObserverResult;
+    }
+// --------------------------------------------------------------------------------------------
+
+MFileManObserver::TControl CFileBrowserFileOps::NotifyFileManEnded()
+    {
+    return iFileManObserverResult;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileOps::CancelOp()
+    {
+#ifndef FILEBROWSER_LITE
+
+    if ( iEngine->Settings().iBypassPlatformSecurity )
+        {
+        if ( !iFileOpClient )
+            iFileOpClient = CFBFileOpClient::NewL();
+        
+        iFileOpClient->CancelOp();
+        }
+
+    // we need this information even when using iFileOpClient
+    // to be able to not execute aggregate operations 
+    iFileManObserverResult = MFileManObserver::ECancel;
+    
+#else
+    iFileManObserverResult = MFileManObserver::ECancel;
+#endif
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBFileOps.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* 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 FILEBROWSER_FILEOPS_H
+#define FILEBROWSER_FILEOPS_H
+
+// INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+#include <connect/sbeclient.h>
+
+// FORWARD DECLARATIONS
+class TFileEntry;
+class CFBFileOpClient;
+class CFileMan;
+class CEngine;
+class CSBEClient;
+
+
+class CFileBrowserFileOps : public CBase,
+                            public MFileManObserver 
+	{
+private:
+    enum TRecursiveOperation
+    	{
+    	EFileOpInvalid = -1,
+    	EFileOpCopy,
+    	EFileOpMove,
+    	EFileOpRename,
+    	EFileOpAttribs,
+    	EFileOpDelete,
+    	EFileOpMkDirAll,
+    	EFileOpCreateEmptyFile,
+    	EFileOpEraseMBR,
+    	EFileOpPartitionDrive
+    	};
+public:
+	static CFileBrowserFileOps* NewL(CEngine* aEngine);
+	~CFileBrowserFileOps();
+
+public: // From MFileManObserver
+    
+    TControl NotifyFileManStarted();
+    TControl NotifyFileManOperation();
+    TControl NotifyFileManEnded();
+    
+private:
+	CFileBrowserFileOps(CEngine* aEngine);
+	void ConstructL();
+
+public:
+    TInt ActivateSecureBackUpViaFileOp();
+    TInt DeActivateSecureBackUpViaFileOp();
+    TInt ActivateSecureBackUp(conn::TBURPartType aPartType=conn::EBURBackupFull, conn::TBackupIncType aBackupIncType=conn::EBackupBase);
+    TInt DeActivateSecureBackUp();
+    TInt Copy(const TFileEntry& aSourceEntry, const TDesC& aTargetFullName, TUint aSwitch=CFileMan::EOverWrite, TBool aDeleteSource=EFalse); 
+    TInt Rename(const TFileEntry& aSourceEntry, const TDesC& aNew, TUint aSwitch=CFileMan::EOverWrite); 
+    TInt Attribs(const TFileEntry& aSourceEntry, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch=0); 
+    TInt Delete(const TFileEntry& aSourceEntry, TUint aSwitch=0); 
+    TInt MkDirAll(const TDesC& aPath, TInt aSetAtts=0, TBool aQuickOperation=EFalse); 
+    TInt CreateEmptyFile(const TDesC& aName); 
+    TInt DriveSnapShot(TChar aSourceDriveLetter, TChar aTargetDriveLetter); 
+    TInt EraseMBR(TUint aDriveNumber); 
+    TInt PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions);
+    void CancelOp();
+
+private:
+    TInt DoFindEntries(const TDesC& aFileName, const TDesC& aPath);
+    TInt DoFindEntriesRecursiveL(const TDesC& aFileName, const TDesC& aPath);    
+
+    TInt FileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch); 
+    TInt DoFileOpCopy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch); 
+
+    TInt FileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch); 
+    TInt DoFileOpRename(const TDesC& aName, const TDesC& aNew, TUint aSwitch); 
+
+    TInt FileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
+    TInt DoFileOpAttribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
+
+    TInt FileOpDeleteFile(const TDesC& aName, TUint aSwitch); 
+    TInt DoFileOpDeleteFile(const TDesC& aName, TUint aSwitch); 
+
+    TInt FileOpRmDir(const TDesC& aDirName, TUint aSwitch); 
+    TInt DoFileOpRmDir(const TDesC& aDirName, TUint aSwitch); 
+
+    TInt FileOpMkDirAll(const TDesC& aPath, TInt aSetAtts=0); 
+    TInt DoFileOpMkDirAll(const TDesC& aPath); 
+
+    TInt FileOpCreateEmptyFile(const TDesC& aName); 
+    TInt DoFileOpCreateEmptyFile(const TDesC& aName); 
+
+public:
+    inline TBool SecureBackUpActive() { return iSecureBackUpActive; }
+    inline TBool FileCommandActivatedSecureBackup() { return iFileCommandActivatedSecureBackup; }
+
+private:
+    TInt                            iRecursiveState;
+    CEngine*                        iEngine;
+    CFBFileOpClient*                iFileOpClient;
+    CFileMan*                       iFileMan;
+    RFs                             iFs;
+    TInt                            iOperationError;
+    conn::CSBEClient*               iSBEClient;
+    TBool                           iSecureBackUpActive;
+    TBool                           iFileCommandActivatedSecureBackup;
+
+    TFileName   iBuf1;
+    TFileName   iBuf2;
+    TUint       iUint1;
+    TUint       iUint2;
+    TUint       iUint3;
+    TTime       iTime1;
+    MFileManObserver::TControl iFileManObserverResult;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBFileUtils.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,4200 @@
+/*
+* 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 FILES
+#include "FBFileUtils.h"
+#include "FBFileOps.h"
+#include "engine.h"
+#include "FB.hrh"
+#include <filebrowser.rsg>
+
+#include <textresolver.h> 
+#include <eikprogi.h>
+#include <e32svr.h>
+#include <eikfutil.h>
+#include <apparc.h>
+#include <apaid.h>
+#include <apaidpartner.h>
+#include <eikenv.h>
+#include <bautils.h>
+#include <gulicon.h>
+#include <babackup.h> 
+//#include <aknmemorycardui.mbg>
+//#include <sendui.h>
+#include <CMessageData.h>
+#include <ezgzip.h>
+#include <e32hal.h>
+#include <pathinfo.h>
+#include <apgcli.h>
+#include <apmstd.h>
+#include <apgtask.h>
+#include <apacmdln.h>
+#include <DocumentHandler.h>
+#include <msvapi.h>
+#include <msvids.h>
+#include <msvstd.h>
+#include <msvstore.h>
+#include <mmsvattachmentmanager.h>
+#include <cmsvattachment.h>
+#include <hash.h>
+//#include <sbeclient.h>
+#include <e32property.h>
+#if (!defined __SERIES60_30__ && !defined __SERIES60_31__) 
+#include <driveinfo.h>
+#endif // !defined __SERIES60_30__ && !defined __SERIES60_31__
+
+#ifndef __SERIES60_30__
+//  #include <akniconconfig.h>
+#endif
+
+//_LIT(KGZipExt, ".gz");
+_LIT8(KFileNewLine, "\r\n");
+const TInt KForcedFormatTimeout = 1000000;
+
+// copied from coreapplicationuisdomainpskeys.h
+const TUid KPSUidCoreApplicationUIs = { 0x101F8767 };
+const TUint32 KCoreAppUIsMmcRemovedWithoutEject = 0x00000109;
+enum TCoreAppUIsMmcRemovedWithoutEject
+    {
+    ECoreAppUIsEjectCommandUsedUninitialized = 0,
+    ECoreAppUIsEjectCommandNotUsed,
+    ECoreAppUIsEjectCommandUsed,
+    ECoreAppUIsEjectCommandUsedToDrive // Low 16-bits contain this value and high 16-bits TDriveNumber to eject
+    };
+const TInt KDriveLetterStringLength = 3; // e.g. C:\
+
+// ================= MEMBER FUNCTIONS =======================
+
+CFileBrowserFileUtils* CFileBrowserFileUtils::NewL(CEngine* aEngine)
+	{
+	CFileBrowserFileUtils* self = new(ELeave) CFileBrowserFileUtils(aEngine);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+// --------------------------------------------------------------------------------------------
+
+CFileBrowserFileUtils::CFileBrowserFileUtils(CEngine* aEngine) : CActive(EPriorityStandard), iEngine(aEngine)
+	{
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ConstructL()
+	{
+    User::LeaveIfError(iTimer.CreateLocal());
+    User::LeaveIfError(iFs.Connect());
+    User::LeaveIfError(iTz.Connect());
+    
+    iState = EIdle;
+    iListingMode = ENormalEntries;
+
+    iSortMode = EFileBrowserCmdViewSortByName;
+    iOrderMode = EFileBrowserCmdViewOrderAscending;
+    iCurrentPath = KNullDesC;
+    
+    iFileOps = CFileBrowserFileOps::NewL(iEngine);
+    
+    iDriveEntryList = new(ELeave) CDriveEntryList(8);
+    iFileEntryList = new(ELeave) CFileEntryList(64);
+    iFindFileEntryList = new(ELeave) CFileEntryList(64);
+    iAppIconList = new(ELeave) CAppIconList(16);
+    iClipBoardList = new(ELeave) CFileEntryList(64);
+    iCurrentSelectionList = new(ELeave) CFileEntryList(64);
+
+    iDocHandler = CDocumentHandler::NewL();
+//    iDocHandler->SetExitObserver(this);
+    
+    // set defaults to the search settings
+    iSearchAttributes.iSearchDir = KNullDesC;
+    iSearchAttributes.iWildCards = _L("*.jpg");
+    iSearchAttributes.iTextInFile = KNullDesC;
+    iSearchAttributes.iMinSize = 0;
+    iSearchAttributes.iMaxSize = 999999999;
+    iSearchAttributes.iMinDate = TDateTime(1980, EJanuary,   0,0,0,0,0);
+    iSearchAttributes.iMaxDate = TDateTime(2060, EDecember, 30,0,0,0,0);
+    iSearchAttributes.iRecurse = ETrue;
+    
+    // init the command array
+    iCommandArray = new(ELeave) CCommandArray(64);
+        
+    // get current path from settings
+    if (iEngine->Settings().iRememberLastPath)
+        {
+        TFileName settingPath = iEngine->Settings().iLastPath;
+        if (BaflUtils::PathExists(iFs, settingPath))
+            iCurrentPath = settingPath;
+        
+        if (iCurrentPath != KNullDesC)
+            GetDriveListL();
+        }
+
+    CActiveScheduler::Add(this);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CFileBrowserFileUtils::~CFileBrowserFileUtils()
+	{
+	Cancel();
+	
+	// save current path from settings
+    if (iEngine->Settings().iRememberLastPath)
+        {
+        iEngine->Settings().iLastPath = iCurrentPath;
+        TRAP_IGNORE(iEngine->SaveSettingsL(EFalse));
+        }
+
+//    if (iWaitDialog)
+//        TRAP_IGNORE(iWaitDialog->ProcessFinishedL()); 
+//     
+//    if (iProgressDialog)
+//        TRAP_IGNORE(iProgressDialog->ProcessFinishedL());
+    
+        delete iFileOps;
+
+        delete iDocHandler;
+	
+//	if (iOpenFileService)
+//	    delete iOpenFileService;
+	
+        delete iCurrentSelectionList;
+        delete iClipBoardList;
+        delete iAppIconList;
+        delete iFindFileEntryList;
+        delete iFileEntryList;
+        delete iDriveEntryList;
+
+        delete iFileMan;
+
+        if (iCommandArray)
+            {
+            ResetCommandArray();
+            delete iCommandArray;
+            }
+
+        iTz.Close();
+        iFs.Close();
+        iTimer.Close();
+        }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::DoCancel()
+	{
+    iTimer.Cancel();
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::StartExecutingCommandsL(const TDesC& aLabel)
+    {
+    if (iCommandArray->Count() >= 2)
+        {
+        // init progress bar
+//        iProgressDialog = new(ELeave) CAknProgressDialog((reinterpret_cast<CEikDialog**>(&iProgressDialog)), ETrue);
+//        iProgressDialog->SetCallback(this);
+//        iProgressDialog->PrepareLC(R_GENERAL_PROGRESS_NOTE);
+//        iProgressDialog->SetCurrentLabelL( EAknCtNote, aLabel );
+//        iProgressInfo = iProgressDialog->GetProgressInfoL();
+//        iProgressInfo->SetFinalValue( CommandArrayCount() );
+//        iProgressDialog->RunLD();
+//        iProgressDialog->MakeVisible( ETrue );        
+        iEngine->FileBrowserUI()->ShowProgressDialog(aLabel, 0, CommandArrayCount());
+        isProgressDialog = ETrue;
+        }
+    else if (iCommandArray->Count() >= 1)
+        {
+        // init wait dialog
+//        iWaitDialog = new(ELeave) CAknWaitDialog((reinterpret_cast<CEikDialog**>(&iWaitDialog)), ETrue);
+//        iWaitDialog->SetCallback(this);
+//        iWaitDialog->PrepareLC(R_GENERAL_WAIT_NOTE);
+//        iWaitDialog->SetTextL( aLabel );
+//        iWaitDialog->RunLD();
+        iEngine->FileBrowserUI()->ShowWaitDialog(aLabel);
+        isWaitDialog = ETrue;
+        }
+    else
+        {
+        // no commands, just do nothing
+        return;
+        }
+
+
+    // start with the first operation
+    iCurrentEntry = 0;
+    iSucceededOperations = 0;
+    iFailedOperations = 0;
+
+    // starts executing commands
+    ExecuteCommand();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ExecuteCommand()
+    {
+    // make sure the engine isn't active, should never happen
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("FileUtils:IsActive"), 333));
+
+    // execute a command after a very short delay (25ms)
+    if (isWaitDialog)
+        {
+        iEngine->FileBrowserUI()->ProcessEvents();
+        }
+    if (isProgressDialog)
+        {
+        TInt newValue = iCurrentEntry;
+        iEngine->FileBrowserUI()->SetProgressValue(newValue);
+        }
+    iTimer.After(iStatus, 25);
+    SetActive();
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+void CFileBrowserFileUtils::RunL()
+    {
+    TInt err(KErrNone);
+    TInt currentCommand = iCommandArray->At(iCurrentEntry).iCommandId;
+
+    // execute a command from the queue
+    switch(currentCommand)
+        {
+        case EFileBrowserFileOpCommandAttribs:
+            {
+            CCommandParamsAttribs* params = static_cast<CCommandParamsAttribs*>(iCommandArray->At(iCurrentEntry).iParameters);
+            err = iFileOps->Attribs(params->iSourceEntry, params->iSetMask, params->iClearMask, params->iTime, params->iSwitch);
+            }
+            break;
+            
+        case EFileBrowserFileOpCommandCopy:
+            {
+            CCommandParamsCopyOrMove* params = static_cast<CCommandParamsCopyOrMove*>(iCommandArray->At(iCurrentEntry).iParameters);
+            err = iFileOps->Copy(params->iSourceEntry, params->iTargetPath, params->iSwitch);
+            }
+            break;
+            
+        case EFileBrowserFileOpCommandMove:
+            {
+            CCommandParamsCopyOrMove* params = static_cast<CCommandParamsCopyOrMove*>(iCommandArray->At(iCurrentEntry).iParameters);
+            err = iFileOps->Copy(params->iSourceEntry, params->iTargetPath, params->iSwitch, ETrue);
+            }
+            break;
+                
+        case EFileBrowserFileOpCommandRename:
+            {
+            CCommandParamsRename* params = static_cast<CCommandParamsRename*>(iCommandArray->At(iCurrentEntry).iParameters);
+            err = iFileOps->Rename(params->iSourceEntry, params->iTargetPath, params->iSwitch);
+            }
+            break;
+
+        case EFileBrowserFileOpCommandDelete:
+            {
+            CCommandParamsDelete* params = static_cast<CCommandParamsDelete*>(iCommandArray->At(iCurrentEntry).iParameters);
+            err = iFileOps->Delete(params->iSourceEntry, params->iSwitch);
+            }
+            break;
+
+        case EFileBrowserFileOpCommandDriveSnapShot:
+            {
+            CCommandParamsDriveSnapShot* params = static_cast<CCommandParamsDriveSnapShot*>(iCommandArray->At(iCurrentEntry).iParameters);
+            err = iFileOps->DriveSnapShot(params->iSourceDriveLetter, params->iTargetDriveLetter);
+            }
+            break;
+                                                
+        default:
+            User::Panic (_L("Unknown command"), 400);
+            break;
+        }
+
+    
+    if (err == KErrNone)
+        {
+        iSucceededOperations++;
+        }
+    else if ( err != KErrCancel )
+        {
+        iFailedOperations++;
+        }
+        
+    iLastError = err;            
+
+    // check for more commands in queue
+    TRAP_IGNORE( CheckForMoreCommandsL() );
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::RunError(TInt aError)
+    {
+    _LIT(KMessage, "Command error %d");
+    TBuf<128> noteMsg;
+    noteMsg.Format(KMessage, aError);
+            
+    iEngine->EikonEnv()->InfoMsg(noteMsg);
+    
+    TRAP_IGNORE( CheckForMoreCommandsL() );
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::CheckForMoreCommandsL()
+    {
+    //LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL");
+    
+    // update the progress bar
+//    if (iProgressInfo)
+//        iProgressInfo->IncrementAndDraw(1);
+
+	// check if we have more commands to be executed
+	if (iCurrentEntry >= CommandArrayCount() - 1)
+		{
+        //LOGSTRING("Creator: CCreatorEngine::CheckForMoreCommandsL all done");
+
+        // all done, free resources
+        ResetCommandArray();
+        
+        // deactive secure backup if it was activated by a file command
+        iFileOps->DeActivateSecureBackUpViaFileOp();
+
+        // dismiss any wait/progress dialogs        
+        if (isWaitDialog)
+            {
+            iEngine->FileBrowserUI()->CancelWaitDialog();
+            isWaitDialog = EFalse;
+            }
+        if (isProgressDialog)
+            {
+            iEngine->FileBrowserUI()->CancelProgressDialog();
+            isProgressDialog = EFalse;
+            }
+//        if (iWaitDialog)
+//            {
+//            TRAP_IGNORE(iWaitDialog->ProcessFinishedL()); 
+//            iWaitDialog = NULL;
+//            }
+//        if (iProgressDialog)
+//            {
+//            TRAP_IGNORE(iProgressDialog->ProcessFinishedL());
+//            iProgressDialog = NULL;
+//            }
+
+
+        // show result note
+        if ( iSucceededOperations == 0 && iFailedOperations == 0 )
+            {
+            // single operation cancelled -> show nothing
+            }
+        else if (iSucceededOperations == 1 && iFailedOperations == 0)    
+            {
+            _LIT(KMessage, "Operation succeeded");
+            iEngine->FileBrowserUI()->ShowConfirmationNote(KMessage);
+            }
+        else if (iSucceededOperations > 0 && iFailedOperations == 0)    
+            {
+            _LIT(KMessage, "%d operations succeeded");
+            TBuf<128> noteMsg;
+            noteMsg.Format(KMessage, iSucceededOperations);
+            iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
+            }
+        else if (iSucceededOperations == 0 && iFailedOperations > 1)    
+            {
+            _LIT(KMessage, "%d operations failed");
+            TBuf<128> noteMsg;
+            noteMsg.Format(KMessage, iFailedOperations);
+
+            iEngine->FileBrowserUI()->ShowErrorNote(noteMsg);
+            }
+        else if (iSucceededOperations > 0 && iFailedOperations > 0)    
+            {
+            _LIT(KMessage, "%d operations succeeded, %d failed");
+            TBuf<128> noteMsg;
+            noteMsg.Format(KMessage, iSucceededOperations, iFailedOperations);
+
+            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
+            }
+        else    
+            {
+            iEngine->FileBrowserUI()->ShowErrorNote(ResolveErrorMessage(iLastError));
+            }
+
+        RefreshViewL();
+        iEngine->FileBrowserUI()->NotifyModelHasChanged();
+
+            }
+	else
+            {
+            // maintain requests
+            iCurrentEntry++;
+
+            //LOGSTRING2("Creator: CCreatorEngine::CheckForMoreCommandsL iCurrentEntry=%d", iCurrentEntry);
+
+            ExecuteCommand();
+            }
+    }    
+// --------------------------------------------------------------------------------------------
+
+// This callback function is called when cancel button of the progress bar was pressed
+void CFileBrowserFileUtils::DialogDismissedL(/*TInt aButtonId*/)
+    {
+//    iProgressDialog = NULL;
+//    iProgressInfo = NULL;
+//    iWaitDialog = NULL;
+    
+    // check if cancel button was pressed
+//    if (aButtonId == EAknSoftkeyCancel)
+//        {
+        // cancel the active object, command executer 
+        Cancel();
+        
+        iFileOps->CancelOp();
+        
+        ResetCommandArray();
+
+        isProgressDialog = EFalse;
+
+        iEngine->FileBrowserUI()->ShowInformationNote(_L("Cancelled"), _L(""));
+//        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::AppendToCommandArrayL(TInt aCommand, CCommandParamsBase* aParameters)
+    {
+    if (iCommandArray)
+        iCommandArray->AppendL( TCommand(aCommand, aParameters) );
+    else
+        User::Leave(KErrNotReady);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::CommandArrayCount() const
+    {
+    TInt count(0);
+    
+    if (iCommandArray)
+        count = iCommandArray->Count();
+    
+    return count;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ResetCommandArray()
+    {
+    // delete params first
+    for (TInt i=0; i<CommandArrayCount(); i++)
+        {
+        if ( iCommandArray->At(i).iParameters )
+            {
+            delete iCommandArray->At(i).iParameters;
+            iCommandArray->At(i).iParameters = NULL;
+            }
+        }
+
+    // reset the entries
+    iCommandArray->Reset();
+    }
+                    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::HandleSettingsChangeL()
+    {
+	// TODO
+
+//    if (iEngine->FileListContainer())
+//        {
+//        iEngine->FileListContainer()->SetScreenLayoutL(iEngine->Settings().iDisplayMode);
+//        iEngine->FileListContainer()->CreateListBoxL(iEngine->Settings().iFileViewMode);
+        //iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
+        RefreshViewL();
+//        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetSortModeL(TInt aSortMode)
+    {
+    iSortMode = aSortMode;
+    RefreshViewL();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetOrderModeL(TInt aOrderMode)
+    {
+    iOrderMode = aOrderMode;
+    RefreshViewL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TKeyResponse CFileBrowserFileUtils::HandleOfferKeyEventL(const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/)
+    {
+	// TODO
+	/*
+    if(aType != EEventKey)
+        return EKeyWasNotConsumed;
+    
+    TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift) ||
+                            (aKeyEvent.iModifiers & EModifierLeftShift) ||
+                            (aKeyEvent.iModifiers & EModifierRightShift);
+    TBool controlKeyPressed = (aKeyEvent.iModifiers & EModifierCtrl) || 
+                              (aKeyEvent.iModifiers & EModifierRightCtrl); 
+    
+    // handle left arrow key press
+    if (aKeyEvent.iCode == EKeyLeftArrow)
+        {
+        MoveUpOneLevelL();
+        return EKeyWasConsumed;
+        }
+    
+    // handle right arrow key press
+    else if (aKeyEvent.iCode == EKeyRightArrow)
+        {
+        if (IsDriveListViewActive() && iDriveEntryList->Count() > 0)
+            {
+            MoveDownToDirectoryL();
+            return EKeyWasConsumed;
+            }
+        else if (iFileEntryList->Count() > 0)
+            {
+            MoveDownToDirectoryL();
+            return EKeyWasConsumed;
+            }        
+        }    
+
+    // skip OK/Enter keys when shift or ctrl is pressed because those are needed by the listbox
+    else if ((aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && (shiftKeyPressed || controlKeyPressed))
+        {
+        return EKeyWasNotConsumed;
+        }
+    
+    // handle OK/Enter keys
+    else if (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter)
+        {
+        if (IsDriveListViewActive() && iDriveEntryList->Count() > 0)
+            {
+            MoveDownToDirectoryL();
+            return EKeyWasConsumed;
+            }
+        else if (iFileEntryList->Count() > 0)
+            {
+            TFileEntry fileEntry = iFileEntryList->At(iEngine->FileListContainer()->CurrentListBoxItemIndex());
+            
+            if (fileEntry.iEntry.IsDir())
+                MoveDownToDirectoryL();
+            else
+                OpenCommonFileActionQueryL();
+            
+            return EKeyWasConsumed;
+            } 
+        }
+    
+    // handle Delete/Backspace keys
+    else if (!iEngine->FileListContainer()->SearchField() && (aKeyEvent.iCode == EKeyBackspace || aKeyEvent.iCode == EKeyDelete) &&
+             !iEngine->FileUtils()->IsCurrentDriveReadOnly() && !iEngine->FileUtils()->IsDriveListViewActive())
+        {
+        DeleteL();
+        return EKeyWasConsumed;
+        }
+    */                      
+    return EKeyWasNotConsumed;
+    }        
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::RefreshViewL()
+    {
+//    if (iEngine->FileListContainer())
+//        {
+//
+//        // make sure that the search field is disabled
+//        iEngine->FileListContainer()->DisableSearchFieldL();
+        
+        // read directory listing
+        GenerateDirectoryDataL();
+        
+//        // set an icon array
+//        iEngine->FileListContainer()->SetListBoxIconArrayL(GenerateIconArrayL());
+//
+//        // set text items
+//        iEngine->FileListContainer()->SetListBoxTextArrayL(GenerateItemTextArrayL());
+//        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+//CAknIconArray* CFileBrowserFileUtils::GenerateIconArrayL(TBool aGenerateNewBasicIconArray)
+//    {
+//	// TODO
+//
+//    CAknIconArray* iconArray = NULL;
+//
+//    if (aGenerateNewBasicIconArray)
+//        {
+//        iconArray = new(ELeave) CAknIconArray(16);
+//        }
+//    else
+//        {
+//        if (iEngine->FileListContainer())
+//            iconArray = iEngine->FileListContainer()->ListBoxIconArrayL();
+//
+//        if (!iconArray)
+//            iconArray = new(ELeave) CAknIconArray(16);
+//        }
+//
+//
+//    CleanupStack::PushL(iconArray);
+//
+//    // generate basic items if not already existing
+//    if (iconArray->Count() < EFixedIconListLength)
+//        {
+//        // reset arrays
+//        iconArray->Reset();
+//        iAppIconList->Reset();
+//
+//        // get default control color
+//        TRgb defaultColor;
+//        defaultColor = iEngine->EikonEnv()->Color(EColorControlText);
+//
+//        // create a color icon of the marking indicator
+//        CFbsBitmap* markBitmap = NULL;
+//        CFbsBitmap* markBitmapMask = NULL;
+//
+//        AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
+//                KAknsIIDQgnIndiMarkedAdd,
+//                KAknsIIDQsnIconColors,
+//                EAknsCIQsnIconColorsCG13,
+//                markBitmap,
+//                markBitmapMask,
+//                AknIconUtils::AvkonIconFileName(),
+//                EMbmAvkonQgn_indi_marked_add,
+//                EMbmAvkonQgn_indi_marked_add_mask,
+//                defaultColor
+//                );
+//
+//        // 0 marking indicator
+//        CGulIcon* markIcon = CGulIcon::NewL(markBitmap, markBitmapMask);
+//        iconArray->AppendL(markIcon);
+//
+//        // 1 empty
+//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
+//                                  EMbmAvkonQgn_prop_empty, EMbmAvkonQgn_prop_empty_mask, KAknsIIDQgnPropEmpty);
+//        // 2 phone memory
+//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
+//                                  EMbmAvkonQgn_prop_phone_memc, EMbmAvkonQgn_prop_phone_memc_mask, KAknsIIDQgnPropPhoneMemc);
+//        // 3 memory card
+//        AppendGulIconToIconArrayL(iconArray, KMemoryCardUiBitmapFile,
+//                                  EMbmAknmemorycarduiQgn_prop_mmc_memc, EMbmAknmemorycarduiQgn_prop_mmc_memc_mask, KAknsIIDQgnPropMmcMemc);
+//        // 4 memory card disabled
+//        AppendGulIconToIconArrayL(iconArray, KMemoryCardUiBitmapFile,
+//                                  EMbmAknmemorycarduiQgn_prop_mmc_non, EMbmAknmemorycarduiQgn_prop_mmc_non_mask, KAknsIIDQgnPropMmcNon);
+//        // 5 folder
+//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
+//                                  EMbmAvkonQgn_prop_folder_small, EMbmAvkonQgn_prop_folder_small_mask, KAknsIIDQgnPropFolderSmall);
+//        // 6 folder with subfolders
+//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
+//                                  EMbmAvkonQgn_prop_folder_sub_small, EMbmAvkonQgn_prop_folder_sub_small_mask, KAknsIIDQgnPropFolderSubSmall);
+//        // 7 current folder
+//        AppendGulIconToIconArrayL(iconArray, AknIconUtils::AvkonIconFileName(),
+//                                  EMbmAvkonQgn_prop_folder_current, EMbmAvkonQgn_prop_folder_current_mask, KAknsIIDQgnPropFolderCurrent);
+//        }
+//
+//    // append custom icons if not in drive list view and setting is enabled
+//    if (!aGenerateNewBasicIconArray && !IsDriveListViewActive() && iEngine->Settings().iShowAssociatedIcons)
+//        {
+//        // init id counter
+//        TInt idCounter(EFixedIconListLength + iAppIconList->Count());
+//
+//        // loop all items in the file list
+//        for (TInt i=0; i<iFileEntryList->Count(); i++)
+//            {
+//            TFileEntry& fileEntry = iFileEntryList->At(i);
+//
+//            // just check for normal files
+//            if (!fileEntry.iEntry.IsDir())
+//                {
+//                TUid appUid = GetAppUid(fileEntry);
+//                TInt iconId = AppIconIdForUid(appUid);
+//
+//                if (appUid != KNullUid && iconId == KErrNotFound)
+//                    {
+//                    // icon not found from the icon array, generate it
+//                    CFbsBitmap* bitmap = NULL;
+//                    CFbsBitmap* mask = NULL;
+//                    CGulIcon* appIcon = NULL;
+//
+//                    TRAPD(err,
+//                        AknsUtils::CreateAppIconLC(AknsUtils::SkinInstance(), appUid, EAknsAppIconTypeList, bitmap, mask);
+//                        appIcon = CGulIcon::NewL(bitmap, mask);
+//                        CleanupStack::Pop(2); //bitmap, mask
+//                        );
+//
+//                    if (err == KErrNone)
+//                        {
+//                        TAppIcon appIconEntry;
+//                        appIconEntry.iId = idCounter;
+//                        appIconEntry.iUid = appUid;
+//
+//                        appIcon->SetBitmapsOwnedExternally(EFalse);
+//                        iconArray->AppendL(appIcon);
+//                        iAppIconList->AppendL(appIconEntry);
+//
+//                        fileEntry.iIconId = idCounter;
+//
+//                        idCounter++;
+//                        }
+//                    else
+//                        {
+//                        delete bitmap;
+//                        delete mask;
+//
+//                        TAppIcon appIconEntry;
+//                        appIconEntry.iId = EFixedIconEmpty;
+//                        appIconEntry.iUid = appUid;
+//
+//                        iAppIconList->AppendL(appIconEntry);
+//                        }
+//                    }
+//
+//                else if (appUid != KNullUid && iconId >= 0)
+//                    {
+//                    // we already have already generated an icon for this uid, use it
+//                    fileEntry.iIconId = iconId;
+//                    }
+//                }
+//            }
+//        }
+//
+//    CleanupStack::Pop(); //iconArray
+//	return iconArray;
+//
+//	}
+//
+// --------------------------------------------------------------------------------------------
+
+//void CFileBrowserFileUtils::AppendGulIconToIconArrayL(CAknIconArray* aIconArray, const TDesC& aIconFile, TInt aIconId, TInt aMaskId, const TAknsItemID aAknsItemId)
+//    {
+//    CGulIcon* icon = AknsUtils::CreateGulIconL(
+//            AknsUtils::SkinInstance(),
+//            aAknsItemId,
+//            aIconFile,
+//            aIconId,
+//            aMaskId);
+//    CleanupStack::PushL(icon);
+//	
+//	icon->SetBitmapsOwnedExternally(EFalse);
+//	aIconArray->AppendL(icon);
+//	
+//	CleanupStack::Pop(); //icon          
+//    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::AppIconIdForUid(TUid aUid)
+    {
+    TInt result(KErrNotFound);
+    
+    for (TInt i=0; i<iAppIconList->Count(); i++)
+        {
+        if (iAppIconList->At(i).iUid == aUid)
+            {
+            result = iAppIconList->At(i).iId;
+            break;
+            }
+        }
+    
+    return result;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TUid CFileBrowserFileUtils::GetAppUid(const TFileEntry &aFileEntry)
+    {
+    TFileName fullPath;
+    fullPath.Copy(aFileEntry.iPath);
+    fullPath.Append(aFileEntry.iEntry.iName);
+    
+    TParse parsedName;
+    parsedName.Set(fullPath, NULL, NULL);
+
+    // this will boost performance in \sys\bin folder    
+    if (parsedName.Ext().CompareF(_L(".dll")) == 0 || parsedName.Ext().CompareF(_L(".rsc")) == 0)
+        return KNullUid;
+    
+    TInt err1(KErrNone), err2(KErrNone);
+    TUid appUid;
+    TDataType dataType;
+    TBool isProgram;
+    
+    err1 = iEngine->LsSession().AppForDocument(fullPath, appUid, dataType);
+    err2 = iEngine->LsSession().IsProgram(fullPath, isProgram);
+        
+    if (err1 == KErrNone && err2 == KErrNone)
+        {
+        if (isProgram)
+            {
+            // get the real app Uid from the app list
+            TApaAppInfo appInfo;
+            iEngine->LsSession().GetAllApps();
+
+            while (iEngine->LsSession().GetNextApp(appInfo) == KErrNone)
+                {
+                if (fullPath.CompareF(appInfo.iFullName) == 0)
+                    return appInfo.iUid;
+                }
+            }
+        else
+            {
+            // return the app Uid associated for it
+            return appUid;
+            }            
+        }
+
+    return KNullUid;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CFileEntryList* CFileBrowserFileUtils::FileEntries() const
+{
+    return iFileEntryList;
+}
+
+// --------------------------------------------------------------------------------------------
+
+CDriveEntryList* CFileBrowserFileUtils::DriveEntries() const
+{
+    return iDriveEntryList;
+}
+
+// --------------------------------------------------------------------------------------------
+
+TFileName CFileBrowserFileUtils::ResolveErrorMessage(TInt aErrCode)
+    {
+    TPtrC buf;
+    CTextResolver* textResolver = CTextResolver::NewLC(*iEngine->EikonEnv());
+    buf.Set(textResolver->ResolveErrorString(aErrCode, CTextResolver::ECtxNoCtxNoSeparator));
+
+    TFileName errorMessage;
+    errorMessage.Copy(buf);
+
+    CleanupStack::PopAndDestroy();  //textResolver
+    return errorMessage;
+    }
+
+//// --------------------------------------------------------------------------------------------
+//
+//CDesCArray* CFileBrowserFileUtils::GenerateItemTextArrayL()
+//    {
+//    iTextArray = new(ELeave) CDesCArrayFlat(64);
+////    CleanupStack::PushL(textArray);
+//
+//    if (IsDriveListViewActive())
+//        {
+//        _LIT(KSimpleDriveEntry, "%d\t%c: <%S>\t\t");
+//        _LIT(KExtendedDriveEntry, "%d\t%c: <%S>\t%LD / %LD kB\t");
+//
+//        for (TInt i=0; i<iDriveEntryList->Count(); i++)
+//            {
+//            TFileName textEntry;
+//            TDriveEntry driveEntry = iDriveEntryList->At(i);
+//
+//            if (iEngine->Settings().iFileViewMode == EFileViewModeSimple)
+//                {
+//                textEntry.Format(KSimpleDriveEntry, driveEntry.iIconId, TUint(driveEntry.iLetter), &driveEntry.iMediaTypeDesc);
+//                }
+//            else if (iEngine->Settings().iFileViewMode == EFileViewModeExtended)
+//                {
+//                textEntry.Format(KExtendedDriveEntry, driveEntry.iIconId, TUint(driveEntry.iLetter), &driveEntry.iMediaTypeDesc, driveEntry.iVolumeInfo.iFree/1024, driveEntry.iVolumeInfo.iSize/1024);
+//                }
+//
+//            iTextArray->AppendL(textEntry);
+//            }
+//        }
+//
+//    else
+//        {
+//        _LIT(KSimpleFileEntry, "%d\t%S\t\t");
+//        _LIT(KExtendedFileEntry, "%d\t%S\t%S\t");
+//
+//        for (TInt i=0; i<iFileEntryList->Count(); i++)
+//            {
+//            TFileName textEntry;
+//            TFileEntry fileEntry = iFileEntryList->At(i);
+//
+//            // format text line entries
+//            if (iEngine->Settings().iFileViewMode == EFileViewModeSimple)
+//                {
+//                textEntry.Format(KSimpleFileEntry, fileEntry.iIconId, &fileEntry.iEntry.iName);
+//                }
+//            else if (iEngine->Settings().iFileViewMode == EFileViewModeExtended)
+//                {
+//                TBuf<128> extraData;
+//
+//                // append entry date
+//                TTime entryModified = fileEntry.iEntry.iModified;
+//                if ( iTz.ConvertToLocalTime( entryModified ) == KErrNone )
+//                    {
+//                    entryModified = fileEntry.iEntry.iModified;
+//                    }
+//
+//                _LIT(KCurrentDate,"%D%M%*Y%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B");
+//                entryModified.FormatL(extraData, KCurrentDate);
+//
+//                // for a directory append number of entries and for a file the file size
+//                if (fileEntry.iEntry.IsDir() && fileEntry.iDirEntries >= 0)
+//                    {
+//                    extraData.Append(_L(" - "));
+//                    extraData.AppendNum(fileEntry.iDirEntries);
+//
+//                    if (fileEntry.iDirEntries == 1)
+//                        extraData.Append(_L(" entry"));
+//                    else
+//                        extraData.Append(_L(" entries"));
+//                    }
+//
+//                // normal file entry
+//                else if (!fileEntry.iEntry.IsDir())
+//                    {
+//                    extraData.Append(_L(" - "));
+//
+//                    if (fileEntry.iEntry.iSize < 1024)
+//                        {
+//                        extraData.AppendNum(fileEntry.iEntry.iSize);
+//                        extraData.Append(_L(" B"));
+//                        }
+//                    else if (fileEntry.iEntry.iSize < 1024*1024)
+//                        {
+//                        TReal sizeKB = (TReal)fileEntry.iEntry.iSize / 1024;
+//                        extraData.AppendNum(sizeKB, TRealFormat(KDefaultRealWidth, 1));
+//                        extraData.Append(_L(" kB"));
+//                        }
+//                    else
+//                        {
+//                        TReal sizeMB = (TReal)fileEntry.iEntry.iSize / (1024*1024);
+//                        extraData.AppendNum(sizeMB, TRealFormat(KDefaultRealWidth, 1));
+//                        extraData.Append(_L(" MB"));
+//                        }
+//                    }
+//
+//                // append attribute flags if any
+//                TBuf<4> atts;
+//                if (fileEntry.iEntry.IsArchive())
+//                    atts.Append(_L("A"));
+//                if (fileEntry.iEntry.IsHidden())
+//                    atts.Append(_L("H"));
+//                if (fileEntry.iEntry.IsReadOnly())
+//                    atts.Append(_L("R"));
+//                if (fileEntry.iEntry.IsSystem())
+//                    atts.Append(_L("S"));
+//
+//                if (atts.Length() > 0)
+//                    {
+//                    extraData.Append(_L(" - ["));
+//                    extraData.Append(atts);
+//                    extraData.Append(_L("]"));
+//                    }
+//
+//                // format
+//                textEntry.Format(KExtendedFileEntry, fileEntry.iIconId, &fileEntry.iEntry.iName, &extraData);
+//                }
+//
+//            iTextArray->AppendL(textEntry);
+//            }
+//        }
+//
+////    CleanupStack::Pop(); //textArray
+//    return iTextArray;
+//    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::GenerateDirectoryDataL()
+    {
+    if (iListingMode == ENormalEntries)
+        {
+        if (IsDriveListViewActive())
+            GetDriveListL();    
+        else
+            GetDirectoryListingL();        
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::GetDriveListL()
+    {
+    TDriveList driveList;
+    
+    // get drive listing depending of the support for network drives
+    if (iEngine->Settings().iSupportNetworkDrives)
+        {
+        #ifndef __SERIES60_30__
+            #ifndef __SERIES60_31__
+                User::LeaveIfError(iFs.DriveList(driveList, KDriveAttAll));
+            #endif
+        #else    
+            User::LeaveIfError(iFs.DriveList(driveList));
+        #endif        
+        }
+    else
+        {
+        User::LeaveIfError(iFs.DriveList(driveList));
+        }
+    
+    iDriveEntryList->Reset();        
+    
+    for (TInt i=0; i<KMaxDrives; i++)
+        {
+        if (driveList[i])
+            {
+            TDriveEntry driveEntry;
+            
+            // set default icon
+            driveEntry.iIconId = EFixedIconPhoneMemory;
+
+            // get drive letter and number 
+            driveEntry.iLetter = 'A' + i;
+            iFs.CharToDrive(driveEntry.iLetter, driveEntry.iNumber);
+            
+            // get volume info and check errors
+            if (iFs.Volume(driveEntry.iVolumeInfo, driveEntry.iNumber) == KErrNone)
+                {
+                // set media type descriptor
+                TInt mediaType = driveEntry.iVolumeInfo.iDrive.iType;
+                TBool extMountable( EFalse );
+                
+                if (mediaType == EMediaNotPresent)
+                    driveEntry.iMediaTypeDesc = _L("Not present");
+                else if (mediaType ==EMediaUnknown )
+                    driveEntry.iMediaTypeDesc = _L("Unknown");
+                else if (mediaType ==EMediaFloppy )
+                    driveEntry.iMediaTypeDesc = _L("Floppy");
+                else if (mediaType == EMediaHardDisk)
+                    driveEntry.iMediaTypeDesc = _L("Mass storage");
+                else if (mediaType == EMediaCdRom)
+                    driveEntry.iMediaTypeDesc = _L("CD-ROM");
+                else if (mediaType == EMediaRam)
+                    driveEntry.iMediaTypeDesc = _L("RAM");
+                else if (mediaType == EMediaFlash)
+                    driveEntry.iMediaTypeDesc = _L("Flash");
+                else if (mediaType == EMediaRom)
+                    driveEntry.iMediaTypeDesc = _L("ROM");
+                else if (mediaType == EMediaRemote)
+                    driveEntry.iMediaTypeDesc = _L("Remote");
+                else if (mediaType == EMediaNANDFlash)
+                    driveEntry.iMediaTypeDesc = _L("NAND flash");
+                
+                // get real size of the ROM drive
+                if (mediaType == EMediaRom)
+                    {
+                    TMemoryInfoV1Buf ramMemory;
+                    UserHal::MemoryInfo(ramMemory);
+                    driveEntry.iVolumeInfo.iSize = ramMemory().iTotalRomInBytes;
+                    }
+                
+                // set attribute descripitions
+                if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatNotSupported)
+                    driveEntry.iAttributesDesc.Append(_L("Battery not supported"));
+                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatGood)
+                    driveEntry.iAttributesDesc.Append(_L("Battery good"));
+                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatLow)
+                    driveEntry.iAttributesDesc.Append(_L("Battery low"));
+                else
+                    driveEntry.iAttributesDesc.Append(_L("Battery state unknown"));
+                
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttLocal)
+                    driveEntry.iAttributesDesc.Append(_L(" + Local"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRom)
+                    driveEntry.iAttributesDesc.Append(_L(" + ROM"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRedirected)
+                    driveEntry.iAttributesDesc.Append(_L("+ Redirected"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttSubsted)
+                    driveEntry.iAttributesDesc.Append(_L(" + Substed"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttInternal)
+                    driveEntry.iAttributesDesc.Append(_L(" + Internal"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable)
+                    {
+                    driveEntry.iAttributesDesc.Append(_L(" + Removable"));
+#if (!defined __SERIES60_30__ && !defined __SERIES60_31__)
+                    TUint drvStatus( 0 );
+                    if ( !DriveInfo::GetDriveStatus( iFs, driveEntry.iNumber, drvStatus ) &&
+                         drvStatus & DriveInfo::EDriveExternallyMountable &&
+                         drvStatus & DriveInfo::EDriveInternal )
+                        {
+                        extMountable = ETrue;
+                        // iMediaTypeDesc already set as "Mass storage" 
+                        }
+                    else
+                        {
+                        driveEntry.iMediaTypeDesc = _L("Memory card");
+                        }
+#else
+                    driveEntry.iMediaTypeDesc = _L("Memory card");
+#endif
+                    }
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemote)
+                    driveEntry.iAttributesDesc.Append(_L(" + Remote"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttTransaction)
+                    driveEntry.iAttributesDesc.Append(_L(" + Transaction"));
+                                
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttVariableSize)
+                    driveEntry.iAttributesDesc.Append(_L(" + Variable size"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDualDensity)
+                    driveEntry.iAttributesDesc.Append(_L(" + Dual density"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttFormattable)
+                    driveEntry.iAttributesDesc.Append(_L(" + Formattable"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttWriteProtected)
+                    driveEntry.iAttributesDesc.Append(_L(" + Write protected"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLockable)
+                    driveEntry.iAttributesDesc.Append(_L(" + Lockable"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked)
+                    driveEntry.iAttributesDesc.Append(_L(" + Locked"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttHasPassword)
+                    driveEntry.iAttributesDesc.Append(_L(" + Has password"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttReadWhileWrite)
+                    driveEntry.iAttributesDesc.Append(_L(" + Read while write"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDeleteNotify)
+                    driveEntry.iAttributesDesc.Append(_L(" + Supports DeleteNotify"));
+                
+                
+                // mark a removable media with memory card icon
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable && !extMountable)
+                    {
+                    if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAbsent)
+                        {                
+                        driveEntry.iIconId = EFixedIconMemoryCardDisabled;
+                        }                 
+                    else
+                        {                
+                        driveEntry.iIconId = EFixedIconMemoryCard;
+                        } 
+                    }
+                }   
+            
+            // if this fails, likely it's a memory card which is not present
+            else
+                {
+                TVolumeInfo volumeInfo;
+                volumeInfo.iSize = 0;
+                volumeInfo.iFree = 0;
+                volumeInfo.iDrive.iDriveAtt = KDriveAttRemovable;
+                volumeInfo.iDrive.iMediaAtt = KMediaAttWriteProtected;
+                driveEntry.iVolumeInfo = volumeInfo;
+
+                driveEntry.iMediaTypeDesc = _L("Not ready");
+                driveEntry.iIconId = EFixedIconMemoryCardDisabled;
+                }
+            
+            if ( iPrevFolderName != KNullDesC && iPrevFolderName[0] == driveEntry.iLetter )
+                {
+                iPrevFolderIndex = iDriveEntryList->Count();
+                }
+            
+            iDriveEntryList->AppendL(driveEntry);
+            }
+        }
+    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::GetDirectoryListingL()
+    {
+    iFileEntryList->Reset();
+
+    TInt sortMode(ESortByName);
+    if (iSortMode == EFileBrowserCmdViewSortByExtension)    
+        sortMode = ESortByExt; 
+    else if (iSortMode == EFileBrowserCmdViewSortBySize)    
+        sortMode = ESortBySize; 
+    else if (iSortMode == EFileBrowserCmdViewSortByDate)    
+        sortMode = ESortByDate; 
+    
+    TInt orderMode(EAscending);
+    if (iOrderMode == EFileBrowserCmdViewOrderDescending)    
+        orderMode = EDescending; 
+    
+    CDir* dir = NULL;
+    if (iFs.GetDir(iCurrentPath, KEntryAttMatchMask, sortMode | orderMode | EDirsFirst, dir) == KErrNone)
+        {
+        CleanupStack::PushL(dir);
+        
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TFileEntry fileEntry;
+            fileEntry.iPath = iCurrentPath;
+            fileEntry.iEntry = (*dir)[i];
+            fileEntry.iDirEntries = KErrNotFound;
+            fileEntry.iIconId = EFixedIconEmpty;
+            
+            if ( iPrevFolderName != KNullDesC && iPrevFolderName == fileEntry.iEntry.iName )
+                {
+                iPrevFolderIndex = i;
+                }
+            
+            // check for directory entries
+            if (fileEntry.iEntry.IsDir())
+                {
+                fileEntry.iIconId = EFixedIconFolder;
+
+                TFileName subPath = fileEntry.iPath;
+                subPath.Append(fileEntry.iEntry.iName);
+                subPath.Append(_L("\\"));
+                                
+                // get number of entries in this directory if extended info about sub directories enabled
+                if (iEngine->Settings().iShowSubDirectoryInfo && iEngine->Settings().iFileViewMode == EFileViewModeExtended)
+                    {
+                    CDir* subDir = NULL;
+                    if (iFs.GetDir(subPath, KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
+                        {
+                        fileEntry.iDirEntries = subDir->Count();
+                        delete subDir;    
+                        }
+                    }
+                
+                // apply subfolder icon for known directories (speed improvement)
+                if (subPath[0]=='Z' && (subPath.CompareF(_L("Z:\\data\\"))==0 || subPath.CompareF(_L("Z:\\Nokia\\"))==0
+                    || subPath.Compare(_L("Z:\\private\\"))==0 || subPath.Compare(_L("Z:\\resource\\"))==0
+                    || subPath.Compare(_L("Z:\\sys\\"))==0 || subPath.Compare(_L("Z:\\system\\"))==0))
+                    {
+                    fileEntry.iIconId = EFixedIconFolderSub;
+                    }
+                else if (subPath[0]=='Z' && (subPath.CompareF(_L("Z:\\sys\\bin\\"))==0))
+                    {
+                    // normal folder icon for these ones
+                    fileEntry.iIconId = EFixedIconFolder;
+                    }
+                else
+                    {
+                    // check if this folder has subdirectories
+                    CDir* subDir = NULL;
+                    if (iFs.GetDir(subPath, KEntryAttDir|KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
+                        {
+                        for (TInt j=0; j<subDir->Count(); j++)
+                            {
+                            TEntry entry = (*subDir)[j];
+
+                            if (entry.IsDir())
+                                {
+                                fileEntry.iIconId = EFixedIconFolderSub;
+                                break;    
+                                }
+                            }
+
+                        delete subDir;    
+                        }                    
+                    }
+                }
+
+            iFileEntryList->AppendL(fileEntry);
+            }
+        
+        CleanupStack::PopAndDestroy(); //dir    
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::MoveUpOneLevelL()
+    {
+    iPrevFolderIndex = KErrNotFound;
+    iPrevFolderName.Zero();
+    
+    // change back to normal mode or move up
+    if (iListingMode != ENormalEntries)
+        {
+        iListingMode = ENormalEntries;
+        }
+    else
+        {
+        // do nothing if displaying drive list view
+        if (IsDriveListViewActive())
+            return;
+        
+        if (iCurrentPath.Length() <= KDriveLetterStringLength)
+            {
+            if ( iCurrentPath.Length() > 0 )
+                {
+                iPrevFolderName.Append( iCurrentPath[0] );
+                }
+            // move to drive list view if the current path is already short enough
+            iCurrentPath = KNullDesC;
+            }
+        else
+            {
+            // move one directory up
+            TInt marker(iCurrentPath.Length());
+            
+            // find second last dir marker
+            for (TInt i=iCurrentPath.Length()-2; i>=0; i--)
+                {
+                if (iCurrentPath[i] == '\\')
+                    {
+                    marker = i;
+                    break;
+                    }
+                    
+                }
+            
+            // update iPrevDir with the directory name that we just left 
+            iPrevFolderName.Copy( iCurrentPath.RightTPtr( iCurrentPath.Length() -  marker - 1 ) );
+            iPrevFolderName.Delete( iPrevFolderName.Length() -1, 2 ); // remove extra '\\'
+            
+            iCurrentPath = iCurrentPath.LeftTPtr(marker+1);
+            }    
+        }
+
+//    if (iEngine->FileListContainer())
+//        {
+        //iEngine->FileListContainer()->DisableSearchFieldL();
+        //iEngine->FileListContainer()->ListBox()->ClearSelection();
+        //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
+        //iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
+//        }
+    
+    // update view
+    RefreshViewL();
+    
+    if (iEngine->Settings().iRememberFolderSelection
+        //&& iEngine->FileListContainer()
+        && iPrevFolderIndex > KErrNotFound )
+        {
+        
+//        TInt visibleItems = iEngine->FileListContainer()->ListBox()->Rect().Height() /
+//                            iEngine->FileListContainer()->ListBox()->ItemHeight()
+//                            - 1; // for the title row
+//
+//        // By default, the selected item would be the last visible item on the listbox.
+//        // We want the selected item be displayed at the middle of the listbox, so we
+//        // select one of the successor items first to scroll down a bit
+//        iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(
+//            Min( iEngine->FileListContainer()->ListBox()->Model()->ItemTextArray()->MdcaCount() -1,
+//                 iPrevFolderIndex + visibleItems / 2 ) );
+//
+//        // ...and after that we select the the correct item.
+//        iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex( iPrevFolderIndex );
+        
+        // update view
+        RefreshViewL();
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::MoveDownToDirectoryL(TInt aIndex)
+    {
+
+    // change back to normal mode
+    if (iListingMode != ENormalEntries)
+        {
+        iListingMode = ENormalEntries;
+        }
+    
+    if (aIndex >= 0)
+        {
+        TBool needsRefresh(EFalse);
+
+        if (IsDriveListViewActive())
+            {
+            // currently in a drive list view, move to root of selected drive
+            if (iDriveEntryList->Count() > aIndex)
+                {
+                TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+                
+                iCurrentPath.Append(driveEntry.iLetter);    
+                iCurrentPath.Append(_L(":\\"));
+                
+                needsRefresh = ETrue;    
+                }
+            }
+        else
+            {
+            // otherwise just append the new directory
+            if (iFileEntryList->Count() > aIndex)
+                {
+                TFileEntry fileEntry = iFileEntryList->At(aIndex);
+                
+                if (fileEntry.iEntry.IsDir())
+                    {
+                    iCurrentPath.Copy(fileEntry.iPath);
+                    iCurrentPath.Append(fileEntry.iEntry.iName);
+                    iCurrentPath.Append(_L("\\"));
+
+                    needsRefresh = ETrue;    
+                    }
+                }
+            }
+
+        if (needsRefresh /*&& iEngine->FileListContainer()*/)
+            {
+            //iEngine->FileListContainer()->DisableSearchFieldL();
+            //iEngine->FileListContainer()->ListBox()->ClearSelection();
+            //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
+            //iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
+
+            // update view
+            RefreshViewL();
+            }
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CFileBrowserFileUtils::IsCurrentDriveReadOnly()
+    {
+    if (iListingMode !=ENormalEntries || iCurrentPath.Length() < 2)
+        return EFalse;
+    else
+        {
+        for (TInt i=0; i<iDriveEntryList->Count(); i++)
+            {
+            TDriveEntry driveEntry = iDriveEntryList->At(i);
+            
+            if (driveEntry.iLetter == iCurrentPath[0])
+                {
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt == KMediaAttWriteProtected || driveEntry.iVolumeInfo.iDrive.iMediaAtt == KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt == KDriveAbsent)
+                    return ETrue;    
+                else
+                    return EFalse;
+                }
+            }
+        }
+
+    return EFalse;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CFileBrowserFileUtils::IsItemDirectory(TInt aCurrentItemIndex)
+    {
+    if (aCurrentItemIndex < 0)
+        {
+        return EFalse;
+        }
+    else
+        {
+        if (iFileEntryList->Count() > aCurrentItemIndex)
+            {
+            TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex) ;
+            return fileEntry.iEntry.IsDir();
+            }
+        else
+            {
+            return EFalse;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::SetSelectedItemsOrCurrentItemL(const CArrayFix<TInt>* selectionIndexes,
+                                                           CFileEntryList* aFileEntryList)
+    {
+    aFileEntryList->Reset();
+
+    // by default use selected items
+    if (selectionIndexes && selectionIndexes->Count() > 0)
+        {
+        TInt ref(0);
+        TKeyArrayFix key(0, ECmpTUint16);
+        TInt index(0);
+
+        for (TInt i=0; i<iFileEntryList->Count(); i++)
+            {
+            ref = i;
+
+            if (selectionIndexes->Find(ref, key, index) == 0)
+                {
+                aFileEntryList->AppendL(iFileEntryList->At(i));
+                }
+            }
+        }
+    return aFileEntryList->Count();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::ClipboardCutL(const CArrayFix<TInt>* aSelectionIndices)
+    {
+	
+    iClipBoardMode = EClipBoardModeCut;
+    TInt operations = SetSelectedItemsOrCurrentItemL(aSelectionIndices, iClipBoardList);
+    return operations;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::ClipboardCopyL(const CArrayFix<TInt>* aSelectionIndices)
+    {
+    iClipBoardMode = EClipBoardModeCopy;
+    TInt operations = SetSelectedItemsOrCurrentItemL(aSelectionIndices, iClipBoardList);
+    return operations;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ClipboardPasteL(const TOverwriteOptions &aOverwriteOptions)
+    {
+    if (iClipBoardMode == EClipBoardModeCut)
+        {
+        DoCopyToFolderL(iClipBoardList, iCurrentPath, aOverwriteOptions, ETrue );
+        iClipBoardList->Reset();
+        }
+    else if (iClipBoardMode == EClipBoardModeCopy)
+        {
+        DoCopyToFolderL(iClipBoardList, iCurrentPath, aOverwriteOptions, EFalse);
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::SetCurrentSelection(const CArrayFix<TInt>* aSelectionIndices)
+    {
+    TInt operations = SetSelectedItemsOrCurrentItemL(aSelectionIndices, iCurrentSelectionList);
+    return operations;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::CopyToFolderL(const TFileName &aTargetDir,
+                                          const TOverwriteOptions &aOverwriteOptions,
+                                          TBool aMove)
+    {
+
+    //	TFileName destinationFolder;
+
+    // generate an icon array
+    // CAknIconArray* iconArray = GenerateIconArrayL(ETrue);
+    //    CleanupStack::PushL(iconArray);
+
+    // run folder selection dialog
+    //    CFileBrowserDestinationFolderSelectionDlg* dlg = CFileBrowserDestinationFolderSelectionDlg::NewL(destinationFolder, iDriveEntryList, iconArray);
+
+    // do the file operations
+    //DoCopyToFolderL(entryList, aTargetDir, aOverwriteOptions, aMove);
+    DoCopyToFolderL(iCurrentSelectionList, aTargetDir, aOverwriteOptions, aMove);
+
+    //    CleanupStack::Pop(); //iconArray
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CFileBrowserFileUtils::IsDestinationEntriesExists(const TDesC& aTargetDir)
+    {
+    TBool someEntryExists(EFalse);
+    if (iCurrentSelectionList && iCurrentSelectionList->Count() > 0)
+        {
+        // check if some destination entries also exists
+        for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
+            {
+            TFileEntry fileEntry = iCurrentSelectionList->At(i);
+
+            TFileName targetEntry = aTargetDir;
+            targetEntry.Append(fileEntry.iEntry.iName);
+
+            if (fileEntry.iEntry.IsDir())
+                {
+                targetEntry.Append(_L("\\"));
+
+                if (BaflUtils::PathExists(iFs, targetEntry))
+                    {
+                    someEntryExists = ETrue;
+                    break;
+                    }
+                }
+            else
+                {
+                if (BaflUtils::FileExists(iFs, targetEntry))
+                    {
+                    someEntryExists = ETrue;
+                    break;
+                    }
+                }
+            }
+        }
+    return someEntryExists;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::DoCopyToFolderL(CFileEntryList* aEntryList,
+                                            const TDesC& aTargetDir,
+                                            const TOverwriteOptions &aOverwriteOptions,
+                                            TBool aDeleteSource)
+    {
+    if (aEntryList && aEntryList->Count() > 0)
+        {
+        if (aOverwriteOptions.iDoFileOperations)
+            {
+            // set correct command id depending if we are copying or moving
+            TInt commandId(EFileBrowserFileOpCommandCopy);
+            if (aDeleteSource)
+                commandId = EFileBrowserFileOpCommandMove;
+            
+            // do the file operations for each entry
+            for (TInt i=0; i<aEntryList->Count(); i++)
+                {
+                TFileEntry fileEntry = aEntryList->At(i);
+                
+                TFileName targetEntry = aTargetDir;
+                targetEntry.Append(fileEntry.iEntry.iName);
+                
+                if (aOverwriteOptions.iQueryIndex == EFileActionGenerateUniqueFilenames)
+                    {
+                    CApaApplication::GenerateFileName(iFs, targetEntry);
+                    }
+                else if (aOverwriteOptions.iQueryIndex == EFileActionQueryPostFix)
+                    {
+                    targetEntry.Append(aOverwriteOptions.iPostFix);
+                    }
+
+                
+                // append the new command to the command array
+                if (fileEntry.iEntry.IsDir())
+                    {
+                    AppendToCommandArrayL(commandId,
+                                          new(ELeave)CCommandParamsCopyOrMove(fileEntry, targetEntry, aOverwriteOptions.iOverWriteFlags|CFileMan::ERecurse)
+                                         );
+                    }
+                else
+                    {
+                    AppendToCommandArrayL(commandId,
+                                          new(ELeave)CCommandParamsCopyOrMove(fileEntry, targetEntry, aOverwriteOptions.iOverWriteFlags)
+                                         );
+                    }
+
+                }
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::DeleteL()
+    {
+    // do the file operations for each entry
+    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
+        {
+        TFileEntry fileEntry = iCurrentSelectionList->At(i);
+
+        // append the new command to the command array
+        if (fileEntry.iEntry.IsDir())
+            {
+            AppendToCommandArrayL(EFileBrowserFileOpCommandDelete,
+                                  new(ELeave)CCommandParamsDelete(fileEntry, CFileMan::ERecurse)
+                                 );
+            }
+        else
+            {
+            AppendToCommandArrayL(EFileBrowserFileOpCommandDelete,
+                                  new(ELeave)CCommandParamsDelete(fileEntry, 0)
+                                 );
+            }
+
+        }
+    }
+
+
+// --------------------------------------------------------------------------------------------
+
+TBool CFileBrowserFileUtils::SelectionHasDirs()
+{
+    TBool isDir(EFalse);
+
+    // check if any directories and ask recursion
+    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
+        {
+        TFileEntry fileEntry = iCurrentSelectionList->At(i);
+
+        if (fileEntry.iEntry.IsDir())
+            {
+            isDir = ETrue;
+            break;
+            }
+        }
+    return isDir;
+}
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::TouchL(TBool aRecurse)
+    {
+    // now go through all entries
+    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
+        {
+        TFileEntry fileEntry = iCurrentSelectionList->At(i);
+
+        // touch to current time
+        TTime now;
+        now.UniversalTime();
+
+
+        // append the new command to the command array
+        if (fileEntry.iEntry.IsDir() && aRecurse)
+            {
+            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
+                                  new(ELeave)CCommandParamsAttribs(fileEntry, NULL, NULL, now, CFileMan::ERecurse)
+                                 );
+            }
+        else
+            {
+            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
+                                  new(ELeave)CCommandParamsAttribs(fileEntry, NULL, NULL, now, 0)
+                                 );
+            }
+        }
+    }
+
+TBool CFileBrowserFileUtils::TargetExists(const TInt aIndex, const TFileName &newName)
+    {
+    TBool alreadyExists(EFalse);
+    if (iFileEntryList->Count() > aIndex && aIndex >= 0)
+        {
+
+        TFileEntry fileEntry = iFileEntryList->At(aIndex);
+        TFileName targetEntry = fileEntry.iPath;
+        targetEntry.Append(newName);
+        if (fileEntry.iEntry.IsDir())
+            {
+            //targetEntry.Append(_L("\\"));
+            alreadyExists = BaflUtils::PathExists(iFs, targetEntry);
+            }
+        else
+            {
+            alreadyExists = BaflUtils::FileExists(iFs, targetEntry);
+            }
+        }
+    return alreadyExists;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::RenameL(const TInt aIndex, const TFileName &newName)
+    {
+        if (iFileEntryList->Count() > aIndex && aIndex >= 0)
+        {
+            TFileEntry fileEntry = iFileEntryList->At(aIndex);
+
+            TFileName targetEntry = fileEntry.iPath;
+            targetEntry.Append(newName);
+
+            // append the new command to the command array
+            AppendToCommandArrayL(EFileBrowserFileOpCommandRename,
+                                  new(ELeave)CCommandParamsRename(fileEntry, targetEntry, CFileMan::EOverWrite)
+                                 );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetAttributesL(TUint &aSetAttMask, TUint &aClearAttMask, TBool &aRecurse)
+    {
+    for (TInt i=0; i<iCurrentSelectionList->Count(); i++)
+        {
+        TFileEntry fileEntry = iCurrentSelectionList->At(i);
+
+        // append the new command to the command array
+        if (fileEntry.iEntry.IsDir() && aRecurse)
+            {
+            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
+                                  new(ELeave)CCommandParamsAttribs(fileEntry, aSetAttMask, aClearAttMask, fileEntry.iEntry.iModified, CFileMan::ERecurse)
+                                 );
+            }
+        else
+            {
+            AppendToCommandArrayL(EFileBrowserFileOpCommandAttribs,
+                                  new(ELeave)CCommandParamsAttribs(fileEntry, aSetAttMask, aClearAttMask, fileEntry.iEntry.iModified, 0)
+                                 );
+            }
+        }
+
+    // execute all operations
+    StartExecutingCommandsL(_L("Changing attributes"));
+    }
+       
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SearchL()
+    {
+//    iEngine->FileListContainer()->SetScreenLayoutL(EDisplayModeNormal);
+//    iEngine->FileListContainer()->SetNaviPaneTextL(KNullDesC);
+//
+//    iEngine->FileListContainer()->SetScreenLayoutL(iEngine->Settings().iDisplayMode);
+//    iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
+//
+        iEngine->FileBrowserUI()->ShowWaitDialog(_L("Searching"));
+        iFileEntryList->Reset();
+
+        // if search dir is empty, find from all drives
+        if (iSearchAttributes.iSearchDir == KNullDesC)
+            {
+            for (TInt i=0; i<iDriveEntryList->Count(); i++)
+                {
+                TDriveEntry driveEntry = iDriveEntryList->At(i);
+
+                TBuf<10> driveRoot;
+                driveRoot.Append(driveEntry.iLetter);
+                driveRoot.Append(_L(":\\"));
+
+                DoSearchFiles(iSearchAttributes.iWildCards, driveRoot);
+
+                if (iSearchAttributes.iRecurse)
+                    DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, driveRoot);
+                }
+
+            }
+
+        // otherwise just search from the selected directory
+        else
+            {
+            DoSearchFiles(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir);
+
+            if (iSearchAttributes.iRecurse)
+                DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir);
+            }
+
+        iEngine->FileBrowserUI()->CancelWaitDialog();
+
+        iListingMode = ESearchResults;
+        RefreshViewL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::DoSearchFiles(const TDesC& aFileName, const TDesC& aPath)
+    {
+    TFindFile fileFinder(iFs);
+    CDir* dir;
+    TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir);
+    iEngine->FileBrowserUI()->ProcessEvents();
+
+    while (err == KErrNone && iAllowProcessing)
+        {
+        iEngine->FileBrowserUI()->ProcessEvents();
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TEntry entry = (*dir)[i];
+            
+            TTime entryModified = entry.iModified;
+            // convert from universal time
+            if ( iTz.ConvertToLocalTime( entryModified ) == KErrNone )
+                {
+                entryModified = entry.iModified;
+                }
+            if ((entry.IsDir() && entryModified >= iSearchAttributes.iMinDate && entryModified <= iSearchAttributes.iMaxDate) ||
+                (!entry.IsDir() &&entry.iSize >= iSearchAttributes.iMinSize && entry.iSize <= iSearchAttributes.iMaxSize &&
+                 entryModified >= iSearchAttributes.iMinDate && entryModified <= iSearchAttributes.iMaxDate))
+                {
+                TParse parsedName;
+                parsedName.Set(entry.iName, &fileFinder.File(), NULL);
+                
+                if (parsedName.Drive().Length() && aPath.Length() && parsedName.Drive()[0] == aPath[0])
+                    {
+                    TFileEntry fileEntry;
+                    fileEntry.iPath = parsedName.DriveAndPath();
+                    fileEntry.iEntry = entry;
+                    fileEntry.iDirEntries = KErrNotFound;
+                    
+                    TBool appendToArray(EFalse);
+                    
+                    // append directories always
+                    if (entry.IsDir() && !iSearchAttributes.iTextInFile.Length())
+                        {
+                        fileEntry.iIconId = EFixedIconFolder;
+                        appendToArray = ETrue;    
+                        }
+                    
+                    // normal file
+                    else
+                        {
+                        fileEntry.iIconId = EFixedIconEmpty;
+                        
+                        // check if a string needs to be found inside the file
+                        if (iSearchAttributes.iTextInFile.Length())
+                            {
+                            // currently only 8-bit searching, so convert from 16-bit
+                            TBuf8<256> searchText;
+                            searchText.Copy(iSearchAttributes.iTextInFile);
+                            
+                            // specify buffer size and create a buffer
+                            const TInt KReadBufSize = 1024*1024;
+                            HBufC8* buffer = HBufC8::NewLC(KReadBufSize);
+                            TPtr8 bufferPtr = buffer->Des();
+
+                            // open the file for reading
+                            RFile file;
+                            if (file.Open(iFs, parsedName.FullName(), EFileRead) == KErrNone)
+                                {
+                                TInt currentPos(0);
+                                
+                                for (;;)
+                                    {
+                                    // read from the file
+                                    file.Read(currentPos, bufferPtr, KReadBufSize);
+
+                                    // stop looping if the read buffer isn't long enough
+                                    if (bufferPtr.Length() < searchText.Length())
+                                        {
+                                        break;
+                                        }
+                                        
+                                    // try to find the text
+                                    if (bufferPtr.FindF(searchText) >= 0)
+                                        {
+                                        // match found!
+                                        appendToArray = ETrue;
+                                        break;
+                                        }
+                                        
+                                    // calculate the next position
+                                    currentPos += KReadBufSize - searchText.Length();    
+                                    }
+                                
+                                file.Close();
+                                }
+                            
+                            CleanupStack::PopAndDestroy(); //buffer
+                            }
+                        else
+                            {
+                            appendToArray = ETrue;
+                            }
+                        }
+
+                    if (appendToArray)
+                        TRAP(err, iFileEntryList->AppendL(fileEntry));    
+                    }
+                }
+            }
+
+        delete dir;
+        err = fileFinder.FindWild(dir);
+        }
+
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::DoSearchFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
+	{
+    TInt err(KErrNone);
+    CDirScan* scan = CDirScan::NewLC(iFs);
+    scan->SetScanDataL(aPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst);
+    CDir* dir = NULL;
+
+    for(;;)
+        {
+        TRAP(err, scan->NextL(dir));
+        if (!dir  || (err != KErrNone))
+            break;
+
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TEntry entry = (*dir)[i];
+            
+            if (entry.IsDir())
+                {
+                TFileName path(scan->FullPath());
+                
+                if (path.Length())
+                    {
+                    path.Append(entry.iName);
+                    path.Append(_L("\\"));
+                    DoSearchFiles(aFileName, path);
+                    }
+                }
+            }
+        delete(dir);
+        }
+
+    CleanupStack::PopAndDestroy(scan);
+    return err;
+    }
+         
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::NewFileL(const TFileName &aNewFileName)
+    {
+    TFileName fullPath = iCurrentPath;
+    fullPath.Append(aNewFileName);
+
+    TParse nameParser;
+    User::LeaveIfError(nameParser.SetNoWild(fullPath, NULL, NULL));
+
+    // do not try to recreate the file if it already exists
+    if (BaflUtils::PathExists(iFs, nameParser.DriveAndPath()))
+        {
+        User::LeaveIfError(iFileOps->CreateEmptyFile(fullPath));
+        }
+    else
+        {
+        User::Leave(KErrAlreadyExists);
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::NewDirectoryL(const TFileName &aNewDirectoryName)
+    {       
+    TFileName fullPath = iCurrentPath;
+    fullPath.Append(aNewDirectoryName);
+    fullPath.Append(_L("\\"));
+
+    User::LeaveIfError(iFileOps->MkDirAll(fullPath, 0, ETrue));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SendToL()
+    {
+//    CFileEntryList* entries = new(ELeave) CFileEntryList(32);
+//    GetSelectedItemsOrCurrentItemL(entries);
+//    CleanupStack::PushL(entries);
+//
+//    TInt operations(0);
+//
+//    CSendUi* sendUi = CSendUi::NewL();
+//    CleanupStack::PushL(sendUi);
+//    CMessageData* messageData = CMessageData::NewL();
+//    CleanupStack::PushL(messageData);
+//
+//    for (TInt i=0; i<entries->Count(); i++)
+//        {
+//        TFileEntry fileEntry = entries->At(i);
+//
+//        // only supported for normal file entries
+//        if (!fileEntry.iEntry.IsDir())
+//            {
+//            TFileName fullPath = fileEntry.iPath;
+//            fullPath.Append(fileEntry.iEntry.iName);
+//
+//            messageData->AppendAttachmentL(fullPath);
+//            operations++;
+//
+//            }
+//        }
+//
+//    if (operations > 0)
+//        {
+//        sendUi->ShowQueryAndSendL(messageData, TSendingCapabilities(0, 0, TSendingCapabilities::ESupportsAttachments));
+//
+//        // I guess this note is not needed..
+////        _LIT(KMessage, "%d entries sent");
+////        TFileName noteMsg;
+////        noteMsg.Format(KMessage, operations);
+////
+////        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
+//        }
+//    else
+//        {
+//        _LIT(KMessage, "Nothing to send");
+//        iEngine->FileBrowserUI()->ShowInformationNote(KMessage, _L(""));
+//        }
+//
+//    CleanupStack::PopAndDestroy(3); // entries, sendUi, messageData
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::CompressL()
+    {
+//    CFileEntryList* entries = new(ELeave) CFileEntryList(16);
+//    GetSelectedItemsOrCurrentItemL(entries);
+//    CleanupStack::PushL(entries);
+//
+//    for (TInt i=0; i<entries->Count(); i++)
+//        {
+//        TFileEntry fileEntry = entries->At(i);
+//
+//        TFileName sourceEntry = fileEntry.iPath;
+//        sourceEntry.Append(fileEntry.iEntry.iName);
+//
+//        TFileName targetEntry = sourceEntry;
+//        targetEntry.Append(KGZipExt);
+//
+//        TFileName targetEntryShort;
+//        targetEntryShort.Copy(fileEntry.iEntry.iName);
+//        targetEntryShort.Append(KGZipExt);
+//
+//        if (BaflUtils::FileExists(iFs, targetEntry))
+//            {
+//            _LIT(KMessage, "%S already exists");
+//            TFileName noteMsg;
+//            noteMsg.Format(KMessage, &targetEntryShort);
+//
+//            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
+//            }
+//        else
+//            {
+//            TRAPD(err,
+//                RFile inputFile;
+//                User::LeaveIfError(inputFile.Open(iFs, sourceEntry, EFileStream | EFileRead | EFileShareAny));
+//                CleanupClosePushL(inputFile);
+//
+//                CEZFileToGZip* gZip = CEZFileToGZip::NewLC(iFs, targetEntry, inputFile);
+//
+//                while (gZip->DeflateL())
+//                    ;
+//
+//                CleanupStack::PopAndDestroy(2); //inputFile, gZip
+//                );
+//
+//             if (err == KErrNone)
+//                {
+//                _LIT(KMessage, "%S created succesfully");
+//                TFileName noteMsg;
+//                noteMsg.Format(KMessage, &targetEntryShort);
+//
+//                iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
+//                }
+//             else
+//                {
+//                _LIT(KMessage, "Unable to create %S");
+//                TFileName noteMsg;
+//                noteMsg.Format(KMessage, &targetEntryShort);
+//
+//                iEngine->FileBrowserUI()->ShowErrorNote(noteMsg);
+//                }
+//
+//            RefreshViewL();
+//            }
+//        }
+//
+//    CleanupStack::PopAndDestroy(); //entries
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::DecompressL()
+    {
+//    CFileEntryList* entries = new(ELeave) CFileEntryList(16);
+//    GetSelectedItemsOrCurrentItemL(entries);
+//    CleanupStack::PushL(entries);
+//
+//    for (TInt i=0; i<entries->Count(); i++)
+//        {
+//        TFileEntry fileEntry = entries->At(i);
+//
+//        TFileName sourceEntry = fileEntry.iPath;
+//        sourceEntry.Append(fileEntry.iEntry.iName);
+//
+//        TFileName targetEntry;
+//        TFileName targetEntryShort;
+//
+//        TInt sourceNameLen = fileEntry.iEntry.iName.Length();
+//        TInt gZipExtLen = KGZipExt().Length();
+//
+//        if (sourceNameLen > gZipExtLen && sourceEntry.Right(gZipExtLen).CompareF(KGZipExt) == 0)
+//            {
+//            targetEntry = sourceEntry.Left(sourceEntry.Length() - gZipExtLen);
+//            targetEntryShort = fileEntry.iEntry.iName.Left(sourceNameLen - gZipExtLen);
+//
+//            if (BaflUtils::FileExists(iFs, targetEntry))
+//                {
+//                _LIT(KMessage, "%S already exists");
+//                TFileName noteMsg;
+//                noteMsg.Format(KMessage, &targetEntryShort);
+//
+//                iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
+//                }
+//            else
+//                {
+//                TRAPD(err,
+//                    RFile outputFile;
+//                    User::LeaveIfError(outputFile.Create(iFs, targetEntry, EFileStream | EFileWrite | EFileShareExclusive));
+//                    CleanupClosePushL(outputFile);
+//
+//                    CEZGZipToFile* gZip = CEZGZipToFile::NewLC(iFs, sourceEntry, outputFile);
+//
+//                    while (gZip->InflateL())
+//                        ;
+//
+//                    CleanupStack::PopAndDestroy(2); //outputFile, gZip
+//                    );
+//
+//                 if (err == KErrNone)
+//                    {
+//                    _LIT(KMessage, "%S decompressed succesfully");
+//                    TFileName noteMsg;
+//                    noteMsg.Format(KMessage, &fileEntry.iEntry.iName);
+//
+//                    iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg);
+//                    }
+//                 else
+//                    {
+//                    _LIT(KMessage, "Unable to decompress %S");
+//                    TFileName noteMsg;
+//                    noteMsg.Format(KMessage, &fileEntry.iEntry.iName);
+//
+//                    iEngine->FileBrowserUI()->ShowErrorNote(noteMsg);
+//                    }
+//
+//                RefreshViewL();
+//                }
+//            }
+//        else
+//            {
+//            _LIT(KMessage, "%S does not have %S extension");
+//            TFileName noteMsg;
+//            noteMsg.Format(KMessage, &fileEntry.iEntry.iName, &KGZipExt);
+//
+//            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
+//            }
+//        }
+//
+//    CleanupStack::PopAndDestroy(); //entries
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::GetFilesCount(const TFileName &aFullPath)
+    {
+    iFindFileEntryList->Reset();
+
+    SetAllowProcessing(ETrue);
+    DoFindFiles(_L("*"), aFullPath);
+    DoFindFilesRecursiveL(_L("*"), aFullPath);
+    SetAllowProcessing(EFalse);
+
+    TInt filesCount = iFindFileEntryList->Count();
+
+    iFindFileEntryList->Reset();
+
+    return filesCount;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::GetFilesCountAndSize(const TFileName &aFullPath, TInt64 &aSize)
+    {
+    iFindFileEntryList->Reset();
+
+    SetAllowProcessing(ETrue);
+    DoFindFiles(_L("*"), aFullPath);
+    DoFindFilesRecursiveL(_L("*"), aFullPath);
+    SetAllowProcessing(EFalse);
+
+    // number of files
+    TInt filesCount = iFindFileEntryList->Count();
+
+    // size
+    TInt64 size(0);
+    for (TInt i=0; i<iFindFileEntryList->Count(); i++)
+        {
+        TFileEntry fileEntry = iFindFileEntryList->At(i);
+        size += fileEntry.iEntry.iSize;
+        }
+    aSize = size;
+
+    iFindFileEntryList->Reset();
+
+    return filesCount;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::GetEntriesCount(const TFileName &aFullPath)
+    {
+    // number of entries
+    CDir* subDir = NULL;
+    TInt entriesCount = -1;
+    if (iFs.GetDir(aFullPath, KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
+        {
+        entriesCount = subDir->Count();
+        }
+    return entriesCount;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TFileName CFileBrowserFileUtils::GetMimeType(const TFileName &aFullPath)
+    {
+    // mime type
+    TDataType dataType;
+    TUid appUid;
+    TBuf<128> mimeTypeBuf;
+    if (iEngine->LsSession().AppForDocument(aFullPath, appUid, dataType) == KErrNone)
+        {
+        mimeTypeBuf.Copy(dataType.Des8());
+        if (mimeTypeBuf == KNullDesC)
+            mimeTypeBuf.Copy(_L("N/A"));
+        }
+    return mimeTypeBuf;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TFileName CFileBrowserFileUtils::GetOpenWith(const TFileName &aFullPath)
+    {
+    // opens with
+    TDataType dataType;
+    TUid appUid;
+    TApaAppInfo appInfo;
+    TFileName opensWithBuf;
+    if (iEngine->LsSession().AppForDocument(aFullPath, appUid, dataType) == KErrNone)
+        {
+        if (iEngine->LsSession().GetAppInfo(appInfo, appUid) == KErrNone)
+            {
+            _LIT(KOpensWithFormat, "%S (0x%08X)");
+            opensWithBuf.Format(KOpensWithFormat, &appInfo.iCaption, appInfo.iUid);
+            }
+        }
+    return opensWithBuf;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::OpenWithApparcL(const TFileName &aFileName)
+    {
+       
+        TFileName fullPath = aFileName;
+        TInt err1(KErrNone), err2(KErrNone);
+        TUid appUid;
+        TDataType dataType;
+        TBool isProgram;
+        
+	
+        err1 = iEngine->LsSession().AppForDocument(fullPath, appUid, dataType);
+        err2 = iEngine->LsSession().IsProgram(fullPath, isProgram);
+        
+        if (err1 == KErrNone && err2 == KErrNone)
+            {
+            if (appUid != KNullUid)
+                {
+                // found an app, run using it
+                TApaTaskList taskList(CEikonEnv::Static()->WsSession());
+                TApaTask task = (taskList.FindApp(appUid));
+                if (task.Exists())
+                    {
+                    User::LeaveIfError(task.SwitchOpenFile(fullPath));
+                    task.BringToForeground();
+                    }
+                else
+                    {
+                    TThreadId id;
+                    iEngine->LsSession().StartDocument(fullPath, appUid, id, RApaLsSession::ESwitchFiles);
+                    }
+                }
+            else if (isProgram)
+                {
+                LaunchProgramL(fullPath);
+                }            
+            }
+        //}   
+    }
+	
+// --------------------------------------------------------------------------------------------
+
+//void CFileBrowserFileUtils::HandleServerAppExit(TInt aReason)
+//	{
+//	if (iOpenFileService)
+//		{
+//		delete iOpenFileService;
+//		iOpenFileService = NULL;
+//		}
+//	MAknServerAppExitObserver::HandleServerAppExit(aReason);
+//	}
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::OpenWithDocHandlerL(const TFileName &aFileName, TBool aEmbed)
+    {
+        TFileName fullPath = aFileName;
+        RFile sharableFile;
+        iDocHandler->OpenTempFileL(fullPath, sharableFile);
+        CleanupClosePushL(sharableFile);
+        TDataType dataType;
+        if (aEmbed) 
+            {
+    	    iDocHandler->OpenFileEmbeddedL(sharableFile, dataType);
+            }
+        else
+            {
+    	    iDocHandler->OpenFileL(sharableFile, dataType);
+            }
+        CleanupStack::PopAndDestroy();  //sharableFile
+    //    }   
+    }
+
+	// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::OpenWithFileServiceL(TInt aCurrentItemIndex)
+    {
+    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
+        {
+        TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
+        
+        TFileName fullPath = fileEntry.iPath;
+        fullPath.Append(fileEntry.iEntry.iName);
+
+//    	TBool itemSelected(EFalse);
+        RFile sharableFile;
+//        TUid appUidExtracted;
+        
+        TRAPD(err,
+           
+        	// use doc handler to get a sharable file handle
+            iDocHandler->OpenTempFileL(fullPath, sharableFile);
+            CleanupClosePushL(sharableFile);
+            
+            // find the data type
+            TDataRecognitionResult dataType;
+        	User::LeaveIfError(iEngine->LsSession().RecognizeData(sharableFile, dataType));
+
+        	// get all apps that support OpenFileService for this datatype
+        	CApaAppServiceInfoArray* apps = iEngine->LsSession().GetServiceImplementationsLC(KOpenServiceUid, dataType.iDataType);
+        	TArray<TApaAppServiceInfo> appServiceInfos = apps->Array();
+    	
+        	if (appServiceInfos.Count() > 0)
+        		{
+        		// build an array of the app names
+        		CDesCArray* names = new (ELeave) CDesCArrayFlat(16);
+        		CleanupStack::PushL(names);
+        		for (TInt ii=0; ii<appServiceInfos.Count(); ii++)
+        			{
+        			TUid appUid = appServiceInfos[ii].Uid();
+        			TApaAppInfo appInfo;
+        			if (iEngine->LsSession().GetAppInfo(appInfo, appUid) == KErrNone)
+        				{
+        				names->AppendL(appInfo.iCaption);
+        				}
+        			else
+        				{
+        				TBuf<10> buf;
+        				buf.Format(_L("0x%08x"), appUid);
+        				names->AppendL(buf);
+        				}
+        			}
+    		
+        		// use a list query to select the app
+//        		TInt index(0);
+//        		CAknListQueryDialog* dlg = new(ELeave) CAknListQueryDialog(&index);
+//        		dlg->PrepareLC(R_APP_SELECTION_QUERY);
+//        		dlg->SetItemTextArray(names);
+//        		dlg->SetOwnershipType(ELbmDoesNotOwnItemArray);
+//
+//        		if(dlg->RunLD())
+//        			{
+//        			// extract the chosen UID
+//        			appUidExtracted = appServiceInfos[index].Uid();
+//        			itemSelected = ETrue;
+//        			}
+    		
+        		CleanupStack::PopAndDestroy(); // names
+        		}
+
+//            if (itemSelected)
+//                {
+//                // start OpenFileService for the selected app
+//                CAiwGenericParamList& paramList = iDocHandler->InParamListL();
+//                (void)paramList;
+//                if (iOpenFileService)
+//                    {
+//                    delete iOpenFileService;
+//                    iOpenFileService = NULL;
+//                    }
+//
+//                iOpenFileService = CAknOpenFileService::NewL(appUidExtracted, sharableFile, this, &paramList);
+//                }
+
+            CleanupStack::PopAndDestroy(2); // sharableFile, apps
+
+            ); // TRAPD
+
+        if (err != KErrNone)
+            {
+            _LIT(KMessage, "No file service available for %S");
+            TFileName noteMsg;
+            noteMsg.Format(KMessage, &fileEntry.iEntry.iName);
+            
+            iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
+            }
+        }   
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CFileBrowserFileUtils::FileExists(const TDesC& aPath)
+    {
+    return BaflUtils::FileExists(iFs, aPath);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::LaunchProgramL(const TDesC& aPath)
+    {
+    CApaCommandLine* commandLine = CApaCommandLine::NewLC();
+    commandLine->SetExecutableNameL(aPath);
+    commandLine->SetCommandL(EApaCommandRun);
+    TInt err = iEngine->LsSession().StartApp(*commandLine);
+    CleanupStack::PopAndDestroy(); //commandLine
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::MemoryInfoPopupL()
+    {
+    _LIT(KUsedBytesEntry, "Used: %S bytes\n");
+    _LIT(KFreeBytesEntry, "Free: %S bytes\n");
+    _LIT(KSizeBytesEntry, "Size: %S bytes\n");
+        
+    HBufC* messageBuf = HBufC::NewLC(2048);
+    TPtr messagePtr = messageBuf->Des();
+    TBuf<128> entryLine;
+
+    // RAM
+    TMemoryInfoV1Buf ramMemory;
+    UserHal::MemoryInfo(ramMemory);
+    messagePtr.Append(_L("RAM\n"));
+
+    // used
+    TBuf<32> usedBuf;
+    usedBuf.AppendNum(ramMemory().iMaxFreeRamInBytes-ramMemory().iFreeRamInBytes, TRealFormat(KDefaultRealWidth, 0));
+    entryLine.Format(KUsedBytesEntry, &usedBuf);
+    messagePtr.Append(entryLine);        
+
+    // free
+    TBuf<32> freeBuf;
+    freeBuf.AppendNum(ramMemory().iFreeRamInBytes, TRealFormat(KDefaultRealWidth, 0));
+    entryLine.Format(KFreeBytesEntry, &freeBuf);
+    messagePtr.Append(entryLine);
+            
+    // size
+    TBuf<32> sizeBuf;
+    sizeBuf.AppendNum(ramMemory().iMaxFreeRamInBytes, TRealFormat(KDefaultRealWidth, 0));
+    entryLine.Format(KSizeBytesEntry, &sizeBuf);
+    messagePtr.Append(entryLine); 
+    
+    // All drives
+    for (TInt i=0; i<iDriveEntryList->Count(); i++)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(i);
+
+        messagePtr.Append(_L("\n"));
+        messagePtr.Append(driveEntry.iLetter);
+        messagePtr.Append(_L(":\n"));
+
+        // used
+        TBuf<32> usedBuf;
+        usedBuf.AppendNum(driveEntry.iVolumeInfo.iSize-driveEntry.iVolumeInfo.iFree, TRealFormat(KDefaultRealWidth, 0));
+        entryLine.Format(KUsedBytesEntry, &usedBuf);
+        messagePtr.Append(entryLine);        
+
+        // free
+        TBuf<32> freeBuf;
+        freeBuf.AppendNum(driveEntry.iVolumeInfo.iFree, TRealFormat(KDefaultRealWidth, 0));
+        entryLine.Format(KFreeBytesEntry, &freeBuf);
+        messagePtr.Append(entryLine);
+                
+        // size
+        TBuf<32> sizeBuf;
+        sizeBuf.AppendNum(driveEntry.iVolumeInfo.iSize, TRealFormat(KDefaultRealWidth, 0));
+        entryLine.Format(KSizeBytesEntry, &sizeBuf);
+        messagePtr.Append(entryLine); 
+        }
+
+//    CAknMessageQueryDialog* dialog = new(ELeave) CAknMessageQueryDialog;
+//    dialog->PrepareLC(R_MEMORYINFO_DIALOG);
+//    dialog->SetMessageTextL(messagePtr);
+//    dialog->RunLD();
+    
+    CleanupStack::PopAndDestroy(); //messageBuf
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ShowFileCheckSumsL(TInt aCurrentItemIndex, TInt aType)
+    {
+    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
+        {
+        TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
+        TFileName fullPath = fileEntry.iPath;
+        fullPath.Append(fileEntry.iEntry.iName);
+        
+        // try to open the file for reading
+        RFile fileP;
+        User::LeaveIfError(fileP.Open(iEngine->EikonEnv()->FsSession(),
+                                      fullPath,
+                                      EFileRead|EFileShareReadersOnly));
+
+        CleanupClosePushL(fileP);
+
+        TBuf<128> checkSum;
+        HBufC* messageBuf = HBufC::NewLC(2048);
+        TPtr messagePtr = messageBuf->Des();
+
+        // get MD5 checksum
+        if (aType == EFileChecksumsMD5)
+            {
+            CMD5* md5 = CMD5::NewL();
+            CleanupStack::PushL(md5);
+            HBufC8* md5Buf = MessageDigestInHexLC(md5, fileP);
+            checkSum.Copy(*md5Buf);
+            messagePtr.Append(_L("MD5\n"));
+            messagePtr.Append(checkSum);
+            CleanupStack::PopAndDestroy(2); // md5, md5Buf
+            }
+
+        // get MD2 checksum
+        else if (aType == EFileChecksumsMD2)
+            {
+            CMD2* md2 = CMD2::NewL();
+            CleanupStack::PushL(md2);
+            HBufC8* md2Buf = MessageDigestInHexLC(md2, fileP);
+            checkSum.Copy(*md2Buf);
+            messagePtr.Append(_L("MD2\n"));
+            messagePtr.Append(checkSum);
+            CleanupStack::PopAndDestroy(2); // md2, md2Buf
+            }
+
+        // get SHA-1 checksum
+        else if (aType == EFileChecksumsSHA1)
+            {
+            CSHA1* sha1 = CSHA1::NewL();
+            CleanupStack::PushL(sha1);
+            HBufC8* sha1Buf = MessageDigestInHexLC(sha1, fileP);
+            checkSum.Copy(*sha1Buf);
+            messagePtr.Append(_L("SHA-1\n"));
+            messagePtr.Append(checkSum);
+            CleanupStack::PopAndDestroy(2); // sha1, sha1Buf
+            }
+
+        else
+            {
+            User::Panic(_L("Inv.CS.Type"), 723);
+            }
+
+        // show dialog
+        iEngine->FileBrowserUI()->ShowInformationNote(messagePtr, fileEntry.iEntry.iName);
+
+        CleanupStack::PopAndDestroy(2); // messageBuf, fileP
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+HBufC8* CFileBrowserFileUtils::MessageDigestInHexLC(CMessageDigest* aMD, RFile& aFile)
+    {
+    // seek to file start
+    TInt startPos(0);
+    aFile.Seek(ESeekStart, startPos);
+
+    // create result buffer
+    HBufC8* result = HBufC8::NewLC(128);
+
+    const TInt KBufSize(1024);
+    TInt fileSize(0);
+    TInt fileOffset(0);
+
+    // get file size
+    aFile.Size(fileSize);
+
+    HBufC8* buf = HBufC8::NewMaxLC(KBufSize);
+    TPtr8 bufPtr(buf->Des());
+
+    // read to buffer
+    while (fileOffset < fileSize - KBufSize)
+        {
+        aFile.Read(bufPtr, KBufSize);
+        aMD->Hash(bufPtr);
+        fileOffset += bufPtr.Length();
+        }
+
+    aFile.Read(bufPtr, fileSize - fileOffset);
+    bufPtr.SetLength(fileSize - fileOffset);
+    
+    // get final message digest
+    TPtrC8 hashedSig(aMD->Final(bufPtr));
+    
+    // change size of the result buffer
+    result->ReAllocL(hashedSig.Length() * 2);
+    TPtr8 resultPtr = result->Des();
+
+    // convert to hex format
+    for (TInt i=0; i<hashedSig.Length(); i++)
+        {
+        resultPtr.AppendFormat(_L8("%+02x"), hashedSig[i]);
+        }
+                    
+    CleanupStack::PopAndDestroy(); // buf
+    
+    return result;
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetErrRdL(TBool aEnable)
+    {
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        TInt err(KErrNone);
+        
+        if (aEnable)
+            {
+            // make sure that the directory exists
+            iFileOps->MkDirAll(KErrRdPath);        
+
+            // create the file
+            err = iFileOps->CreateEmptyFile(KErrRdPath);
+            }
+        else    
+            {
+            // get TEntry of ErrRd
+            TEntry entry;
+            err = iFs.Entry(KErrRdPath, entry);
+            
+            if (err == KErrNone)
+                {
+                TFileEntry fileEntry;
+                fileEntry.iPath = KErrRdDir;
+                fileEntry.iEntry = entry;
+                
+                err = iFileOps->Delete(fileEntry);                
+                }
+            }        
+
+        // update view
+        RefreshViewL(); 
+    
+        if (err == KErrNone)
+            {
+            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("State changed"));
+            }
+        else    
+            {
+            iEngine->FileBrowserUI()->ShowErrorNote(_L("Cannot change the state"));
+            }        
+        }
+    else
+        {
+        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
+        }
+    #else
+        aEnable = aEnable;
+        iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in lite version"), _L(""));
+    #endif
+    }
+
+// --------------------------------------------------------------------------------------------
+
+//void CFileBrowserFileUtils::EnableAvkonIconCacheL(TBool aEnable)
+//    {
+//#ifndef __SERIES60_30__
+//    if (AknIconConfig::EnableAknIconSrvCache(aEnable) == KErrNone)
+//        {
+//        iEngine->FileBrowserUI()->ShowConfirmationNote(_L("State changed"));
+//        }
+//    else
+//        {
+//        iEngine->FileBrowserUI()->ShowErrorNote(_L("Unknown error occured"));
+//        }
+// #else
+//    aEnable = aEnable;
+//    iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in S60 3.0"), _L(""));
+// #endif
+// 
+//    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SimulateLeaveL(TInt aLeaveCode)
+    {
+    User::Leave(aLeaveCode);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SimulatePanicL(const TDesC& aPanicCategory, TInt aPanicCode)
+    {
+    User::Panic(aPanicCategory, aPanicCode);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SimulateExceptionL(TInt aExceptionCode)
+    {
+    User::RaiseException((TExcType)aExceptionCode);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TUint32 CFileBrowserFileUtils::GetDebugMask()
+    {
+    return UserSvr::DebugMask();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetDebugMaskL(TUint32 aDbgMask)
+    {
+    User::SetDebugMask(aDbgMask);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::WriteAllAppsL()
+    {
+    _LIT(KAllAppsFileName, "AllApps.txt");
+    TFileName allAppsPath = PathInfo::PhoneMemoryRootPath();
+    allAppsPath.Append(KAllAppsFileName);
+
+    RFile file;
+    if (file.Replace(iFs, allAppsPath, EFileWrite) == KErrNone)
+        {
+        CleanupClosePushL(file);
+        
+        CDesC8Array* appsArray = new(ELeave) CDesC8ArrayFlat(192);
+        CleanupStack::PushL(appsArray);
+        
+        TBuf8<KMaxFileName> fileEntry;
+        TBuf8<KMaxFileName> appFullPath;
+        _LIT8(KAppEntryFormat, "%S (0x%08X)%S");
+        TApaAppInfo appInfo;
+
+        iEngine->LsSession().GetAllApps();        
+
+        while (iEngine->LsSession().GetNextApp(appInfo) == KErrNone)
+            {
+            appFullPath.Copy(appInfo.iFullName);
+            fileEntry.Format(KAppEntryFormat, &appFullPath, appInfo.iUid, &KFileNewLine);
+            appsArray->AppendL(fileEntry);    
+            }
+        
+        appsArray->Sort();
+        
+        for (TInt i=0; i<appsArray->Count(); i++)
+            {
+            file.Write(appsArray->MdcaPoint(i));
+            }
+        
+        CleanupStack::PopAndDestroy(2); //appsArray, file
+        
+        _LIT(KMessage, "App list written to %S");
+        TFileName noteMsg;
+        noteMsg.Format(KMessage, &allAppsPath);
+
+        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg, ETrue); // NoTimeout
+        }
+    else
+        {
+        _LIT(KMessage, "Failed writing to %S");
+        TFileName noteMsg;
+        noteMsg.Format(KMessage, &allAppsPath);
+
+        iEngine->FileBrowserUI()->ShowErrorNote(noteMsg, ETrue); // NoTimeout
+        }    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::WriteAllFilesL()
+    {
+    _LIT(KAllFilesFileName, "AllFiles.txt");
+    TFileName allFilesPath = PathInfo::PhoneMemoryRootPath();
+    allFilesPath.Append(KAllFilesFileName);
+
+    RFile file;
+    if (file.Replace(iFs, allFilesPath, EFileWrite) == KErrNone)
+        {
+        CleanupClosePushL(file);
+        iFindFileEntryList->Reset();
+        
+        iEngine->FileBrowserUI()->ShowWaitDialog(_L("Generating"));
+        
+        for (TInt i=0; i<iDriveEntryList->Count(); i++)
+            {
+            TDriveEntry driveEntry = iDriveEntryList->At(i);
+
+            TBuf<10> driveRoot;
+            driveRoot.Append(driveEntry.iLetter);
+            driveRoot.Append(_L(":\\"));
+
+            // current dir
+            DoFindFiles(_L("*"), driveRoot);
+            
+            // recurse into sub directories
+            DoFindFilesRecursiveL(_L("*"), driveRoot);
+            }
+        
+        // write entries
+        TBuf8<KMaxFileName> writeBuf;
+        for (TInt i=0; i<iFindFileEntryList->Count(); i++)
+            {
+            TFileEntry fileEntry = iFindFileEntryList->At(i);
+            
+            writeBuf.Copy(fileEntry.iPath);
+            writeBuf.Append(fileEntry.iEntry.iName);
+            writeBuf.Append(_L(","));
+            writeBuf.AppendNum(fileEntry.iEntry.iSize);
+            writeBuf.Append(_L(" B"));
+
+//            // date
+//            TTime entryModified = fileEntry.iEntry.iModified;
+//            // convert from universal time
+//            if ( iTz.ConvertToLocalTime( entryModified ) == KErrNone )
+//                {
+//                entryModified = fileEntry.iEntry.iModified; // use universal time
+//                }
+//
+//            _LIT(KDateFormat,               "%D%M%Y%/0%1%/1%2%/2%3%/3");
+//            TBuf<32> dateBuf;
+//            entryModified.FormatL(dateBuf, KDateFormat);
+//            writeBuf.Append(dateBuf);
+//
+//            writeBuf.Append(_L(" "));
+//            // time
+//            _LIT(KTimeFormat, "%-B%:0%J%:1%T%:2%S%:3%+B");
+//            TBuf<32> timeBuf;
+//            entryModified.FormatL(timeBuf, KTimeFormat);
+//            writeBuf.Append(timeBuf);
+//
+            writeBuf.Append(KFileNewLine);
+            file.Write(writeBuf);
+            }
+        
+        iEngine->FileBrowserUI()->CancelWaitDialog();
+        
+        CleanupStack::PopAndDestroy(); //file
+        iFindFileEntryList->Reset();
+        
+        _LIT(KMessage, "File list written to %S");
+        TFileName noteMsg;
+        noteMsg.Format(KMessage, &allFilesPath);
+
+        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg, EFalse); // NoTimeout
+        }
+    else
+        {
+        _LIT(KMessage, "Failed writing to %S");
+        TFileName noteMsg;
+        noteMsg.Format(KMessage, &allFilesPath);
+
+        iEngine->FileBrowserUI()->ShowErrorNote(noteMsg, ETrue); // NoTimeout
+        }    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::DoFindFiles(const TDesC& aFileName, const TDesC& aPath)
+    {
+    TFindFile fileFinder(iFs);
+    CDir* dir;
+    TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir);
+
+    while (err == KErrNone && iAllowProcessing)
+        {
+        iEngine->FileBrowserUI()->ProcessEvents();
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TEntry entry = (*dir)[i];
+
+            // ignore any directory entries
+            if (!entry.IsDir() && entry.iName.Length() && aPath.Length())
+                {
+                TParse parsedName;
+                parsedName.Set(entry.iName, &fileFinder.File(), NULL);
+                
+                if (parsedName.Drive().Length() && aPath.Length() && parsedName.Drive()[0] == aPath[0])
+                    {
+                    TFileEntry fileEntry;
+                    fileEntry.iPath = parsedName.DriveAndPath();
+                    fileEntry.iEntry = entry;
+                    fileEntry.iDirEntries = KErrNotFound;
+                    fileEntry.iIconId = EFixedIconEmpty;
+                    
+                    TRAP(err, iFindFileEntryList->AppendL(fileEntry));             
+                    }
+                }
+            }
+
+        delete dir;
+        dir = NULL;
+        err = fileFinder.FindWild(dir);
+        }
+
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CFileBrowserFileUtils::DoFindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath)
+	{
+    TInt err(KErrNone);
+    CDirScan* scan = CDirScan::NewLC(iFs);
+    scan->SetScanDataL(aPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst);
+    CDir* dir = NULL;
+
+    for(;;)
+        {
+        TRAP(err, scan->NextL(dir));
+        if (!dir  || (err != KErrNone))
+            break;
+
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TEntry entry = (*dir)[i];
+            
+            if (entry.IsDir())
+                {
+                TFileName path(scan->FullPath());
+                
+                if (path.Length())
+                    {
+                    path.Append(entry.iName);
+                    path.Append(_L("\\"));
+                    DoFindFiles(aFileName, path);
+                    }
+                }
+            }
+        delete(dir);
+        }
+
+    CleanupStack::PopAndDestroy(scan);
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ListOpenFilesL()
+    {
+    iFileEntryList->Reset();
+
+    CFileList* dir = NULL;
+    TOpenFileScan fileScan(iFs);
+    fileScan.NextL(dir);
+    
+    while (dir)
+        {
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TEntry entry = (*dir)[i];
+            TFileName fullPath;
+
+            // TOpenFileScan does not return drive letters for the entries, so try to guess it
+            if (entry.iName.Length() > 2 && entry.iName[1] != ':')
+                {
+                for (TInt i=0; i<iDriveEntryList->Count(); i++)
+                    {
+                    TDriveEntry driveEntry = iDriveEntryList->At(i);
+                    
+                    TFileName guessPath;
+                    guessPath.Append(driveEntry.iLetter);
+                    guessPath.Append(_L(":"));
+                    guessPath.Append(entry.iName);
+                    
+                    // check if the file exists
+                    if (BaflUtils::FileExists(iFs, guessPath))
+                        {
+                        // if it's on read only drive, then take it or check if it's really in use
+                        TBool readOnlyDrive(ETrue);
+                        BaflUtils::DiskIsReadOnly(iFs, guessPath, readOnlyDrive);
+                        
+                        if (readOnlyDrive || iFs.SetEntry(guessPath, entry.iModified, NULL, NULL) == KErrInUse)
+                            {
+                            fullPath = guessPath;
+                            break;
+                            }
+                        }
+                    }
+                }
+            else
+                {
+                fullPath = entry.iName;   
+                }
+
+            TParse nameParser;
+            if (fullPath.Length() && nameParser.SetNoWild(fullPath, NULL, NULL) == KErrNone)
+                {
+                entry.iName = nameParser.NameAndExt();
+                
+                TFileEntry fileEntry;
+                fileEntry.iPath = nameParser.DriveAndPath();
+                fileEntry.iEntry = entry;
+                fileEntry.iDirEntries = KErrNotFound;
+                fileEntry.iIconId = EFixedIconEmpty;
+                
+                iFileEntryList->AppendL(fileEntry);                
+                }
+            }
+            
+        delete dir;
+        dir = NULL;
+        fileScan.NextL(dir);
+        }
+
+    TInt operations = iFileEntryList->Count();
+    
+    iListingMode = EOpenFiles;
+	// TODO
+    //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
+    RefreshViewL();            
+
+    _LIT(KMessage, "%d open files found");
+    TFileName noteMsg;
+    noteMsg.Format(KMessage, operations);
+
+    iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ListMessageAttachmentsL(TInt aType)
+    {
+    iFileEntryList->Reset();
+
+    CMsvSession* session = CMsvSession::OpenSyncL(*this);
+    CleanupStack::PushL(session);
+    
+    CMsvEntry* context = NULL;
+    
+    if (aType == EFileBrowserCmdToolsMsgAttachmentsInbox)
+        context = session->GetEntryL(KMsvGlobalInBoxIndexEntryId);
+    else if (aType == EFileBrowserCmdToolsMsgAttachmentsDrafts)
+        context = session->GetEntryL(KMsvDraftEntryId);
+    else if (aType == EFileBrowserCmdToolsMsgAttachmentsSentItems)
+        context = session->GetEntryL(KMsvSentEntryId);
+    else if (aType == EFileBrowserCmdToolsMsgAttachmentsOutbox)
+        context = session->GetEntryL(KMsvGlobalOutBoxIndexEntryId);
+    else
+        User::Panic(_L("MsgAtt.Mode"), 100);
+    
+    CleanupStack::PushL(context);
+    
+    CDesCArray* attPaths = new(ELeave) CDesCArrayFlat(128);
+    CleanupStack::PushL(attPaths);
+    
+    // read attachment paths
+    ReadAttachmentPathsRecursiveL(session, context, attPaths);
+    
+    // create file entries of the paths
+    for (TInt i=0; i<attPaths->MdcaCount(); i++)
+        {
+        TFileEntry fileEntry;
+        TEntry entry;
+        TParse nameParser;
+        
+        if (attPaths->MdcaPoint(i).Length() &&
+            nameParser.SetNoWild(attPaths->MdcaPoint(i), NULL, NULL) == KErrNone &&
+            iFs.Entry(attPaths->MdcaPoint(i), entry) == KErrNone)
+            {
+            TFileEntry fileEntry;
+            fileEntry.iPath = nameParser.DriveAndPath();
+            fileEntry.iEntry = entry;
+            fileEntry.iDirEntries = KErrNotFound;
+            fileEntry.iIconId = EFixedIconEmpty;
+
+            iFileEntryList->AppendL(fileEntry);                
+            }
+        }
+    
+    CleanupStack::PopAndDestroy(3); //session, context, attPaths
+            
+    TInt operations = iFileEntryList->Count();
+    
+    if (aType == EFileBrowserCmdToolsMsgAttachmentsInbox)
+        iListingMode = EMsgAttachmentsInbox;
+    else if (aType == EFileBrowserCmdToolsMsgAttachmentsDrafts)
+        iListingMode = EMsgAttachmentsDrafts;
+    else if (aType == EFileBrowserCmdToolsMsgAttachmentsSentItems)
+        iListingMode = EMsgAttachmentsSentItems;
+    else if (aType == EFileBrowserCmdToolsMsgAttachmentsOutbox)
+        iListingMode = EMsgAttachmentsOutbox;
+	
+    // TODO
+    //iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0);
+    RefreshViewL();            
+
+    _LIT(KMessage, "%d files found");
+    TFileName noteMsg;
+    noteMsg.Format(KMessage, operations);
+
+    iEngine->FileBrowserUI()->ShowInformationNote(noteMsg, _L(""));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ReadAttachmentPathsRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, CDesCArray* aAttPaths)
+    {
+    CMsvEntrySelection* entrySelection = aContext->ChildrenL(); 
+    CleanupStack::PushL(entrySelection);
+    
+    for (TInt i=0; i<entrySelection->Count(); i++)
+        {
+        CMsvEntry* entry = aSession->GetEntryL((*entrySelection)[i]);
+        CleanupStack::PushL(entry);
+        
+        CMsvStore* store = NULL;
+        TRAPD(err, store = entry->ReadStoreL());
+        
+        if (err == KErrNone)
+            {
+            CleanupStack::PushL(store);
+
+            for (TInt j=0; j<store->AttachmentManagerL().AttachmentCount(); j++)
+                {
+                CMsvAttachment* attachment = store->AttachmentManagerL().GetAttachmentInfoL(j);
+                CleanupStack::PushL(attachment);
+                
+                aAttPaths->AppendL(attachment->FilePath());
+                
+                CleanupStack::PopAndDestroy(); //attachment
+                }
+            CleanupStack::PopAndDestroy(); // store
+            }
+
+        // recurse into children
+        if (entry->Count() > 0)
+            {
+            ReadAttachmentPathsRecursiveL(aSession, entry, aAttPaths);
+            }
+
+        CleanupStack::PopAndDestroy(); // entry
+        }      
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::WriteMsgStoreWalkL()
+    {
+    _LIT(KAllAppsFileName, "MsgStoreWalk.txt");
+    TFileName allAppsPath = PathInfo::PhoneMemoryRootPath();
+    allAppsPath.Append(KAllAppsFileName);
+
+    if (iMsgStoreWalkFile.Replace(iFs, allAppsPath, EFileWrite) == KErrNone)
+        {
+        CMsvSession* session = CMsvSession::OpenSyncL(*this);
+        CleanupStack::PushL(session);
+        
+        CMsvEntry* context = session->GetEntryL(KMsvRootIndexEntryId);
+        CleanupStack::PushL(context);
+        
+        iMsgStoreWalkFile.Write(_L8("id  service_id  related_id  type  mtm  date  size  error  biotype  mtmdata1  mtmdata2  mtmdata3  description  details\r\n\r\n"));
+        
+        // write details about the root entry
+        DoWriteMessageEntryInfoL(context, iMsgStoreWalkFile, 0);
+        
+        // get and write info recursively
+        TInt level(1);        
+        WriteMessageEntryInfoRecursiveL(session, context, iMsgStoreWalkFile, level);
+
+        CleanupStack::PopAndDestroy(2); //session, context
+        
+        iMsgStoreWalkFile.Flush();
+        iMsgStoreWalkFile.Close();
+        
+        _LIT(KMessage, "Msg. store walk written to %S");
+        TFileName noteMsg;
+        noteMsg.Format(KMessage, &allAppsPath);
+
+        iEngine->FileBrowserUI()->ShowConfirmationNote(noteMsg, ETrue); // NoTimeout
+        }
+    else
+        {
+        _LIT(KMessage, "Failed writing to %S");
+        TFileName noteMsg;
+        noteMsg.Format(KMessage, &allAppsPath);
+
+        iEngine->FileBrowserUI()->ShowErrorNote(noteMsg, ETrue); // NoTimeout
+        }    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::WriteMessageEntryInfoRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, RFile& aFile, TInt& aLevel)
+    {
+    CMsvEntrySelection* entrySelection = aContext->ChildrenL(); 
+    CleanupStack::PushL(entrySelection);
+    
+    for (TInt i=0; i<entrySelection->Count(); i++)
+        {
+        CMsvEntry* entry = aSession->GetEntryL((*entrySelection)[i]);
+        CleanupStack::PushL(entry);
+        
+        DoWriteMessageEntryInfoL(entry, aFile, aLevel);
+
+        // recurse into children
+        if (entry->Count() > 0)
+            {
+            aLevel++;
+            WriteMessageEntryInfoRecursiveL(aSession, entry, aFile, aLevel);
+            aLevel--;
+            }
+
+        CleanupStack::PopAndDestroy(); // entry
+        }      
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::DoWriteMessageEntryInfoL(CMsvEntry* aContext, RFile& aFile, TInt aLevel)
+    {
+    TMsvEntry messageEntry = aContext->Entry();
+    
+    for (TInt j=0; j<aLevel; j++)
+        {
+        aFile.Write(_L8("     "));
+        }
+
+    TBuf8<256> desc;
+    desc.Copy(messageEntry.iDescription);
+
+    TBuf8<256> details;
+    details.Copy(messageEntry.iDetails);
+
+    _LIT8(KLine, "-> %d  %d  %d  %d  %d  %Ld  %d  %d  %d  %d  %d  %d  %S  %S\r\n");
+    TBuf8<1024> buf;
+    buf.Format(KLine, messageEntry.Id(), messageEntry.iServiceId, messageEntry.iRelatedId, messageEntry.iType.iUid,
+        messageEntry.iMtm.iUid, messageEntry.iDate.Int64(), messageEntry.iSize, messageEntry.iError, messageEntry.iBioType,
+        messageEntry.iMtmData1, messageEntry.iMtmData2, messageEntry.iMtmData3, &desc, &details);
+
+    aFile.Write(buf);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::FileEditorL(TInt aCurrentItemIndex, TInt /*aType*/)
+    {
+    // TODO
+    // just get current item 
+    //TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
+    
+    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
+        {
+        TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
+        
+        // only valid for files
+        if (!fileEntry.iEntry.IsDir())
+            {
+            TFileName fullPath = fileEntry.iPath;
+            fullPath.Append(fileEntry.iEntry.iName);
+
+//            iEngine->FileListContainer()->SetNaviPaneTextL(fileEntry.iEntry.iName);
+//
+//            TInt editorMode(0);
+//
+//            if (aType == EFileBrowserCmdFileViewText)
+//                editorMode = EFileEditorViewAsText;
+//            else if (aType == EFileBrowserCmdFileViewHex)
+//                editorMode = EFileEditorViewAsHex;
+//            else if (aType == EFileBrowserCmdFileEditText)
+//                editorMode = EFileEditorEditAsText;
+//            else if (aType == EFileBrowserCmdFileEditHex)
+//                editorMode = EFileEditorEditAsHex;
+//            else
+//                User::Panic(_L("Inv.Ed.Mode"), 843);
+//
+//            // launch dialog
+//            CFileBrowserFileEditorDlg* dlg = CFileBrowserFileEditorDlg::NewL(fullPath, editorMode);
+//            dlg->RunDlgLD();
+//
+//            iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);
+//
+//            if (aType == EFileBrowserCmdFileEditText || aType == EFileBrowserCmdFileEditHex)
+//                {
+//                RefreshViewL();
+//                }
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CFileBrowserFileUtils::DriveSnapShotPossible()
+    {
+//    // TODO
+//    // check that E-drive is available
+//    TBool EDriveIsOK(EFalse);
+//
+//    for (TInt i=0; i<iDriveEntryList->Count(); i++)
+//        {
+//        TDriveEntry driveEntry = iDriveEntryList->At(i);
+//
+//        if (driveEntry.iNumber == EDriveE)
+//            {
+//            if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAbsent)
+//                EDriveIsOK = EFalse;
+//            else
+//                EDriveIsOK = ETrue;
+//            }
+//        }
+//
+//    if (!EDriveIsOK)
+//        return EFalse;
+//
+//    // get current item
+//    TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
+//
+//    if (iDriveEntryList->Count() > currentItemIndex && currentItemIndex >= 0)
+//        {
+//        TDriveEntry driveEntry = iDriveEntryList->At(currentItemIndex);
+//
+//        // drive snapshot not possible when E-drive is highlighted, since that's where we are copying
+//        if (driveEntry.iNumber == EDriveE)
+//            return EFalse;
+//        else
+//            return ETrue;
+//        }
+    return EFalse;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::DriveSnapShotL()
+    {
+//    if (iEngine->Settings().iBypassPlatformSecurity)
+//        {
+//        // get current item
+//        TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
+//
+//        if (iDriveEntryList->Count() > currentItemIndex && currentItemIndex >= 0)
+//            {
+//            TDriveEntry driveEntry = iDriveEntryList->At(currentItemIndex);
+//
+//            TChar sourceDriveLetter = driveEntry.iLetter;
+//            TChar targetDriveLetter = 'E';  // hardcoded drive letter, could be better if would be queried from the user
+//
+//            // append to the command array
+//            AppendToCommandArrayL(EFileBrowserFileOpCommandDriveSnapShot,
+//                                  new(ELeave)CCommandParamsDriveSnapShot(sourceDriveLetter, targetDriveLetter)
+//                                 );
+//
+//            // execute the operation
+//            StartExecutingCommandsL(_L("Copying"));
+//            }
+//        }
+//    else
+//        {
+//        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
+//        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetDrivePasswordL(TInt aIndex,
+                                              const TFileName &aOldPassword,
+                                              const TFileName &aNewPassword)
+    {    
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TMediaPassword oldPassword;
+        TMediaPassword newPassword;
+
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        ConvertCharsToPwd(aOldPassword, oldPassword);
+        ConvertCharsToPwd(aNewPassword, newPassword);
+
+        // set the password, does not actually lock the drive
+        User::LeaveIfError(iFs.LockDrive(driveEntry.iNumber, oldPassword, newPassword, ETrue));
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::UnlockDriveL(TInt aIndex, const TFileName &aOldPassword)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        TMediaPassword oldPassword;
+        ConvertCharsToPwd(aOldPassword, oldPassword);
+
+        // unlock the drive
+        User::LeaveIfError(iFs.UnlockDrive(driveEntry.iNumber, oldPassword, ETrue));
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ClearDrivePasswordL(TInt aIndex, const TFileName &aOldPassword)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        TMediaPassword oldPassword;
+
+        ConvertCharsToPwd(aOldPassword, oldPassword);
+
+        // clear the password from the drive
+        User::LeaveIfError(iFs.ClearPassword(driveEntry.iNumber, oldPassword));
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::EraseDrivePasswordL(TInt aIndex)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+        
+        // erase the password from the drive
+        User::LeaveIfError(iFs.ErasePassword(driveEntry.iNumber));
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::FormatDriveL(TInt aIndex, TBool aQuickFormat)
+    {    
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        TInt err(KErrNone);
+        TInt formatCount(0);
+
+        TBuf<10> driveRoot;
+        driveRoot.Append(driveEntry.iLetter);
+        driveRoot.Append(_L(":"));
+
+        TUint formatMode(0);
+        if (aQuickFormat)
+            formatMode = ESpecialFormat|EQuickFormat;
+        else
+            formatMode = ESpecialFormat|EFullFormat;
+
+        // set as system application to prevent getting shut down events
+        iEngine->EikonEnv()->SetSystem(ETrue);
+
+        // first close any open applications
+        CBaBackupSessionWrapper* BSWrapper = CBaBackupSessionWrapper::NewL();
+        CleanupStack::PushL(BSWrapper);
+
+        TBackupOperationAttributes atts(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart);
+        BSWrapper->NotifyBackupOperationL(atts);
+
+        CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+        BSWrapper->CloseAll( MBackupObserver::EReleaseLockNoAccess, waiter->iStatus );
+        waiter->StartAndWait();
+        CleanupStack::PopAndDestroy(); //waiter
+
+        // some delay to make sure all applications have been closed
+        User::After(1000000);
+
+        // format the drive
+        RFormat format;
+        err = format.Open(iFs, driveRoot, formatMode, formatCount);
+
+        // Forced format for locked card
+        if ( err == KErrLocked )
+            {
+            // Erase password and try again
+            err = iFs.ErasePassword( driveEntry.iNumber );
+            if ( !err )
+                {
+                err = format.Open(iFs, driveRoot, formatMode, formatCount);
+                }
+            }
+
+        if( err != KErrNone &&  err != KErrLocked )
+            {
+//            CAknQueryDialog* lockQuery = CAknQueryDialog::NewL();
+//            if ( lockQuery->ExecuteLD(R_GENERAL_CONFIRMATION_QUERY, _L("Memory card in use by other application. Proceed anyway?")))
+            // TODO Dialog should be opened in UI part
+            if (iEngine->FileBrowserUI()->ShowConfirmationQuery(_L("Memory card in use by other application. Proceed anyway?")))
+                {
+                // If format could not be started, someone is still keeping
+                // files open on media. Let's try to dismount file system, then
+                // remount with own extension embedded and try again.
+
+                TFullName fsName;
+                err = iFs.FileSystemName( fsName, driveEntry.iNumber );
+
+                if ( err == KErrNone && fsName.Length() > 0 )
+                    {
+                    // Prevent SysAp shutting down applications
+                    RProperty::Set(
+                        KPSUidCoreApplicationUIs,
+                        KCoreAppUIsMmcRemovedWithoutEject,
+                        ECoreAppUIsEjectCommandUsed );
+
+                    TRequestStatus stat;
+                    iFs.NotifyDismount( driveEntry.iNumber, stat, EFsDismountForceDismount );
+                    User::WaitForRequest( stat );
+
+                    // Unfortunately, at the moment we have to wait until clients have received
+                    // notification about card dismount. Otherwise at least causes problems with
+                    // theme selected from card. In future clients should use new notify-API.
+                    User::After( KForcedFormatTimeout );
+
+                    // Let's set priority higher than normally. This is done to decrease the chance
+                    // that someone reopens files on memory card after mandatory file system
+                    // remounting hence preventing formatting again.
+                    TThreadPriority priority( RThread().Priority() );
+                    RThread().SetPriority( EPriorityAbsoluteHigh );
+
+                    // Mount file system back...
+                    err = iFs.MountFileSystem( fsName, driveEntry.iNumber );
+                    err = format.Open(iFs, driveRoot, formatMode, formatCount);
+                    RThread().SetPriority( priority );
+                    }
+                }
+            }
+
+
+        if (err == KErrNone)
+            {
+            // needs to be implemented with active objects
+            // CAknProgressDialog* dlg = new(ELeave) CAknProgressDialog(formatCount, 1, 1, NULL);
+            // dlg->SetTone(CAknNoteDialog::ENoTone);
+            // dlg->ExecuteLD(R_FORMAT_PROGRESS_NOTE);
+
+            while (formatCount && err == KErrNone)
+                {
+                err = format.Next(formatCount);
+                }
+            }
+
+        format.Close();
+
+        // restart closed applications
+        TBackupOperationAttributes atts2(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
+        BSWrapper->NotifyBackupOperationL(atts2);
+        BSWrapper->RestartAll();
+        CleanupStack::PopAndDestroy(); //BSWrapper
+
+        // system status not needed anymore
+        iEngine->EikonEnv()->SetSystem(EFalse);
+
+
+        if (err == KErrNone)
+            {
+            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Format succeeded"));
+            }
+        else if (err == KErrNotSupported)
+            {
+            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
+            }
+        else
+            {
+            iEngine->FileBrowserUI()->ShowErrorNote(ResolveErrorMessage(err));
+            }
+
+        RefreshViewL();
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::EraseMBRL(TInt aIndex)
+    {
+    // TODO
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {        
+        if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+            {
+            TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+            TInt err(KErrNone);
+
+            iEngine->FileBrowserUI()->ShowInformationNote(_L("Please wait, this may take 30 seconds"), _L(""));
+
+            // set as system application to prevent getting shut down events
+            iEngine->EikonEnv()->SetSystem(ETrue);
+
+            // first close any open applications
+            CBaBackupSessionWrapper* BSWrapper = CBaBackupSessionWrapper::NewL();
+            CleanupStack::PushL(BSWrapper);
+
+            TBackupOperationAttributes atts(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart);
+            BSWrapper->NotifyBackupOperationL(atts);
+
+            CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+            BSWrapper->CloseAll( MBackupObserver::EReleaseLockNoAccess, waiter->iStatus );
+            waiter->StartAndWait();
+            CleanupStack::PopAndDestroy(); //waiter
+
+            // some delay to make sure all applications have been closed
+            User::After(1000000);
+
+
+            // do the erase MBR operation
+            err = iFileOps->EraseMBR(driveEntry.iNumber);
+
+
+            // restart closed applications
+            TBackupOperationAttributes atts2(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
+            BSWrapper->NotifyBackupOperationL(atts2);
+            BSWrapper->RestartAll();
+            CleanupStack::PopAndDestroy(); //BSWrapper
+
+            // system status not needed anymore
+            iEngine->EikonEnv()->SetSystem(EFalse);
+
+
+            if (err == KErrNone)
+                {
+                iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Erase MBR succeeded"));
+                }
+            else if (err == KErrNotSupported)
+                {
+                iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
+                }
+            else
+                {
+                iEngine->FileBrowserUI()->ShowErrorNote(ResolveErrorMessage(err));
+                }
+
+            RefreshViewL();
+            }
+        }
+    else
+        {
+        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
+        }
+    #else
+        iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in lite version"), _L(""));
+    #endif
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::PartitionDriveL(TInt aIndex, TBool aEraseMBR, TInt aAmountOfPartitions)
+    {
+    // TODO
+    #ifndef FILEBROWSER_LITE
+    if (iEngine->Settings().iBypassPlatformSecurity)
+        {
+        if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+            {
+            TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+            TInt err(KErrNone);
+
+            iEngine->FileBrowserUI()->ShowInformationNote(_L("Please wait, this may take 30 seconds"), _L(""));
+
+            // set as system application to prevent getting shut down events
+            iEngine->EikonEnv()->SetSystem(ETrue);
+
+            // first close any open applications
+            CBaBackupSessionWrapper* BSWrapper = CBaBackupSessionWrapper::NewL();
+            CleanupStack::PushL(BSWrapper);
+
+            TBackupOperationAttributes atts(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart);
+            BSWrapper->NotifyBackupOperationL(atts);
+
+            CAsyncWaiter* waiter = CAsyncWaiter::NewLC();
+            BSWrapper->CloseAll( MBackupObserver::EReleaseLockNoAccess, waiter->iStatus );
+            waiter->StartAndWait();
+            CleanupStack::PopAndDestroy(); //waiter
+
+            // some delay to make sure all applications have been closed
+            User::After(1000000);
+
+            // do the erase operation
+            if (aEraseMBR)
+                {
+                err = iFileOps->EraseMBR(driveEntry.iNumber);
+
+                if (err != KErrNone)
+                    {
+                    iEngine->FileBrowserUI()->ShowErrorNote(_L("Erase MBR failed"));
+                    }
+
+                User::After(500000);
+                }
+
+
+            // do the partition operation
+            err = iFileOps->PartitionDrive(driveEntry.iNumber, aAmountOfPartitions);
+
+
+            // restart closed applications
+            TBackupOperationAttributes atts2(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
+            BSWrapper->NotifyBackupOperationL(atts2);
+            BSWrapper->RestartAll();
+            CleanupStack::PopAndDestroy(); //BSWrapper
+
+            // system status not needed anymore
+            iEngine->EikonEnv()->SetSystem(EFalse);
+
+
+            if (err == KErrNone)
+                {
+                iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Partition succeeded"));
+                }
+            else if (err == KErrNotSupported)
+                {
+                iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
+                }
+            else
+                {
+                iEngine->FileBrowserUI()->ShowErrorNote(ResolveErrorMessage(err));
+                }
+
+            RefreshViewL();
+            }
+        }
+    else
+        {
+        iEngine->FileBrowserUI()->ShowInformationNote(_L("Enable \"bypass platform security\" from the settings first"), _L(""));
+        }
+    #else
+        iEngine->FileBrowserUI()->ShowInformationNote(_L("Not supported in lite version"), _L(""));
+    #endif
+	}
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::CheckDiskL(TInt aIndex)
+    {    
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+        
+        TBuf<10> driveRoot;
+        driveRoot.Append(driveEntry.iLetter);
+        driveRoot.Append(_L(":"));
+        
+        // check disk
+        TInt err = iFs.CheckDisk(driveRoot);
+
+        if (err == KErrNone)
+            {
+            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Integrity of the disk is ok"));
+            }
+        else if (err == KErrNotReady)
+            {
+            iEngine->FileBrowserUI()->ShowInformationNote(_L("Disk is empty"), _L(""));
+            }
+        else if (err == KErrNotSupported)
+            {
+            iEngine->FileBrowserUI()->ShowErrorNote(_L("Not supported for this drive"));
+            }
+        else
+            {
+            iEngine->FileBrowserUI()->ShowErrorNote(_L("Disk is corrupted"));
+            }        
+
+        RefreshViewL();
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ScanDriveL(TInt aIndex)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        TBuf<10> driveRoot;
+        driveRoot.Append(driveEntry.iLetter);
+        driveRoot.Append(_L(":"));
+
+        // scan disk
+        User::LeaveIfError(iFs.ScanDrive(driveRoot));
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::GetDriveName(TInt aIndex, TFileName &aDriveName)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        // get existing drive name
+        iFs.GetDriveName(driveEntry.iNumber, aDriveName);
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetDriveNameL(TInt aIndex, const TFileName &aDriveName)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        // set drive name
+        User::LeaveIfError(iFs.SetDriveName(driveEntry.iNumber, aDriveName));
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::GetDriveVolumeLabel(TInt aIndex, TFileName &aVolumeLabel)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        // get existing volume label
+        aVolumeLabel.Copy(driveEntry.iVolumeInfo.iName);
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SetDriveVolumeLabelL(TInt aIndex, const TFileName &aVolumeLabel)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        // set volume label
+        User::LeaveIfError(iFs.SetVolumeLabel(aVolumeLabel, driveEntry.iNumber));
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::EjectDriveL(TInt aIndex)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+        
+        TInt err(KErrNone);
+        
+        // get current filesystem name
+        TFileName fileSystemName;
+        User::LeaveIfError(iFs.FileSystemName(fileSystemName, driveEntry.iNumber));
+        
+        // Prevent SysAp shutting down applications
+        RProperty::Set(
+            KPSUidCoreApplicationUIs,
+            KCoreAppUIsMmcRemovedWithoutEject,
+            ECoreAppUIsEjectCommandUsed );
+
+        // dismount the file system
+        User::LeaveIfError(iFs.DismountFileSystem(fileSystemName, driveEntry.iNumber));
+
+        // remount the file system
+        err = iFs.MountFileSystem(fileSystemName, driveEntry.iNumber);
+
+        if (err == KErrInUse)
+            {
+            // try to remount after a while if locked
+            User::After(1000000);
+            err = iFs.MountFileSystem(fileSystemName, driveEntry.iNumber);
+            }
+        User::LeaveIfError(err);
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::DismountFileSystemL(TInt aIndex)
+    {
+    if (iDriveEntryList->Count() > aIndex && aIndex >= 0)
+        {
+        TDriveEntry driveEntry = iDriveEntryList->At(aIndex);
+
+        // get current filesystem name
+        TFileName fileSystemName;
+        User::LeaveIfError(iFs.FileSystemName(fileSystemName, driveEntry.iNumber));
+
+        // Prevent SysAp shutting down applications
+        RProperty::Set(
+            KPSUidCoreApplicationUIs,
+            KCoreAppUIsMmcRemovedWithoutEject,
+            ECoreAppUIsEjectCommandUsed );
+
+        // dismount the file system
+        User::LeaveIfError(iFs.DismountFileSystem(fileSystemName, driveEntry.iNumber));
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::ConvertCharsToPwd(const TDesC& aWord, TDes8& aConverted) const
+    {
+    aConverted.FillZ(aConverted.MaxLength());
+    aConverted.Zero();
+    
+    if (aWord.Length())
+        {
+        aConverted.Copy( (TUint8*)(&aWord[0]), aWord.Size() );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::EditDataTypesL()
+    {
+	// TODO
+	/*
+    iEngine->FileListContainer()->SetScreenLayoutL(EDisplayModeNormal);
+    iEngine->FileListContainer()->SetNaviPaneTextL(KNullDesC);
+    
+    CFileBrowserDataTypesDlg* dlg = CFileBrowserDataTypesDlg::NewL();
+    dlg->RunQueryLD();
+
+    iEngine->FileListContainer()->SetScreenLayoutL(iEngine->Settings().iDisplayMode);
+    iEngine->FileListContainer()->SetNaviPaneTextL(iCurrentPath);  
+	*/	
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::SecureBackupL(TInt aType)
+    {
+    TInt err(KErrNone);
+    TInt showStatus(EFalse);
+    
+    if (aType == EFileBrowserCmdToolsSecureBackupStartBackup || aType == EFileBrowserCmdToolsSecureBackupStartRestore)
+        {
+//        TInt queryIndexState(0);
+//        TInt queryIndexType(0);
+        
+//        CAknListQueryDialog* listQueryDlgState = new(ELeave) CAknListQueryDialog(&queryIndexState);
+//        if (listQueryDlgState->ExecuteLD(R_SECUREBACKUP_STATE_QUERY))
+//            {
+//
+//            CAknListQueryDialog* listQueryDlgType = new(ELeave) CAknListQueryDialog(&queryIndexType);
+//            if (listQueryDlgType->ExecuteLD(R_SECUREBACKUP_TYPE_QUERY))
+//                {
+//                conn::TBURPartType partType = conn::EBURNormal;
+//                conn::TBackupIncType backupIncType = conn::ENoBackup;
+//                
+//                if (aType == EFileBrowserCmdToolsSecureBackupStartBackup)
+//                    {
+//                    if (queryIndexState == ESecureBackupStateFull)
+//                        partType = conn::EBURBackupFull;
+//                    else if (queryIndexState == ESecureBackupStatePartial)
+//                        partType = conn::EBURBackupPartial;
+//                    }
+//                else if (aType == EFileBrowserCmdToolsSecureBackupStartRestore)
+//                    {
+//                    if (queryIndexState == ESecureBackupStateFull)
+//                        partType = conn::EBURRestoreFull;
+//                    else if (queryIndexState == ESecureBackupStatePartial)
+//                        partType = conn::EBURRestorePartial;
+//                    }
+//                    
+//                if (queryIndexType == ESecureBackupTypeBase)
+//                    backupIncType = conn::EBackupBase;
+//                else if (queryIndexType == ESecureBackupTypeIncremental)    
+//                    backupIncType = conn::EBackupIncrement;    
+//
+//                // start secure backup
+//                err = iFileOps->ActivateSecureBackUp(partType, backupIncType);
+//                showStatus = ETrue;
+//                }
+//            }
+        }
+
+    else if (aType == EFileBrowserCmdToolsSecureBackupStop)
+        {
+        err = iFileOps->DeActivateSecureBackUp();
+        showStatus = ETrue;
+        }
+
+    else
+        User::Panic(_L("Sec.br.mode"), 101);
+    
+    
+    if (showStatus)
+        {
+        if (err == KErrNone)
+            {
+            iEngine->FileBrowserUI()->ShowConfirmationNote(_L("Succeeded"));
+            }
+        else
+            {
+            iEngine->FileBrowserUI()->ShowErrorNote(ResolveErrorMessage(err));
+            }  
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFileUtils::OpenCommonFileActionQueryL(TInt aCurrentItemIndex)
+    {
+    // TODO
+    // just get current item
+//    TInt currentItemIndex = iEngine->QueryCurrentItemIndex();
+
+    if (iFileEntryList->Count() > aCurrentItemIndex && aCurrentItemIndex >= 0)
+        {
+//        TInt queryIndex(0);
+//
+//        CAknListQueryDialog* listQueryDlg = new(ELeave) CAknListQueryDialog(&queryIndex);
+//
+//        if (listQueryDlg->ExecuteLD(R_COMMON_FILE_ACTION_QUERY))
+//            {
+//            if (queryIndex == ECommonFileActionViewAsTextHex)
+//                {
+//                TFileEntry fileEntry = iFileEntryList->At(aCurrentItemIndex);
+//
+//                TFileName fullPath = fileEntry.iPath;
+//                fullPath.Append(fileEntry.iEntry.iName);
+//
+//                TInt viewerType(EFileBrowserCmdFileViewHex);
+//
+//                // check from mime type if it's text
+//                TDataType dataType;
+//                TUid appUid;
+//                if (iEngine->LsSession().AppForDocument(fullPath, appUid, dataType) == KErrNone)
+//                    {
+//                    TBuf<128> mimeTypeBuf;
+//                    mimeTypeBuf.Copy(dataType.Des8());
+//                    if (mimeTypeBuf == KNullDesC)
+//                        mimeTypeBuf.Copy(_L("N/A"));
+//
+//                    if (mimeTypeBuf.CompareF(_L("text/plain")) == 0)
+//                        viewerType = EFileBrowserCmdFileViewText;
+//                    }
+//
+//                FileEditorL(viewerType);
+//                }
+//
+//            else if (queryIndex == ECommonFileActionOpenWithApparc)
+//                {
+//                // TODO
+//                //OpenWithApparcL();
+//                }
+//
+//            else if (queryIndex == ECommonFileActionOpenWithDocHandlerEmbed)
+//                {
+//                // TODO
+//                //OpenWithDocHandlerL(ETrue);
+//                }
+//
+//            else
+//                User::Panic(_L("Unk.Com.Act"), 221);
+//            }
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+	            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBFileUtils.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,413 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef FILEBROWSER_FILEUTILS_H
+#define FILEBROWSER_FILEUTILS_H
+
+// INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+#include <w32std.h>
+#include <badesca.h>
+#include <coedef.h>
+#include <msvapi.h>
+#include <tz.h>
+#include "FB.hrh"
+
+_LIT(KIRAppPath, "z:\\sys\\bin\\irapp.exe");
+_LIT(KBTAppPath, "z:\\sys\\bin\\btui.exe");
+_LIT(KUSBAppPath, "z:\\sys\\bin\\usbclasschangeui.exe");
+_LIT(KErrRdPath, "c:\\resource\\ErrRd");
+_LIT(KErrRdDir, "c:\\resource\\");
+
+
+// FORWARD DECLARATIONS
+class CEngine;
+class CFileBrowserFileOps;
+class CDocumentHandler;
+class CEikProgressInfo;
+class CFBFileOpClient;
+class CEikProgressInfo;
+class CMessageDigest;
+
+// CLASS DECLARATIONS
+
+class TSearchAttributes
+	{
+public:
+    TFileName       iSearchDir;
+    TFileName       iWildCards;
+    TFileName       iTextInFile;
+    TUint           iMinSize;
+    TUint           iMaxSize;
+    TTime           iMinDate;
+    TTime           iMaxDate;
+    TBool           iRecurse;
+    TBool           iDefaultWildCard;
+	};
+
+class TDriveEntry
+	{
+public:
+    TChar           iLetter;
+    TInt            iNumber;
+    TVolumeInfo     iVolumeInfo;
+    TBuf<64>        iMediaTypeDesc;
+    TBuf<128>       iAttributesDesc;
+    TInt            iIconId;
+	};
+
+class TFileEntry
+	{
+public:
+    TFileName       iFullName;	
+    TFileName       iPath;
+    TEntry          iEntry;
+    TInt            iDirEntries;
+    TInt            iIconId;
+	};
+
+class TAppIcon
+	{
+public:
+    TInt            iId;
+    TUid            iUid;
+	};
+
+typedef CArrayFixSeg<TDriveEntry> CDriveEntryList;
+typedef CArrayFixSeg<TFileEntry> CFileEntryList;
+typedef CArrayFixSeg<TAppIcon> CAppIconList;
+
+class TSearchResults
+    {
+public:
+    TInt iNumberOfFoundFiles;
+    //CFileEntryList iFoundFilesList;
+    };
+
+class TOverwriteOptions
+    {
+public:
+    TBool iDoFileOperations/*(ETrue)*/;
+    TInt iQueryIndex/*(0)*/;
+    TFileName iPostFix;
+    TInt iOverWriteFlags/* = CFileMan::EOverWrite*/;
+    };
+
+class CCommandParamsBase : public CBase
+    {
+    };
+
+class CCommandParamsAttribs : public CCommandParamsBase
+    {
+public:
+    TFileEntry iSourceEntry;
+    TUint iSetMask;
+    TUint iClearMask;
+    TTime iTime;
+    TUint iSwitch;
+public:
+    CCommandParamsAttribs(const TFileEntry& aSourceEntry, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) : iSourceEntry(aSourceEntry), iSetMask(aSetMask), iClearMask(aClearMask), iTime(aTime), iSwitch(aSwitch) {}
+    };
+    
+class CCommandParamsCopyOrMove : public CCommandParamsBase
+    {
+public:
+    TFileEntry iSourceEntry;
+    TFileName iTargetPath;
+    TUint iSwitch;
+public:
+    CCommandParamsCopyOrMove(const TFileEntry& aSourceEntry, const TDesC& aTargetPath, TUint aSwitch) : iSourceEntry(aSourceEntry), iTargetPath(aTargetPath), iSwitch(aSwitch) {}
+    };
+        
+class CCommandParamsRename : public CCommandParamsBase
+    {
+public:
+    TFileEntry iSourceEntry;
+    TFileName iTargetPath;
+    TUint iSwitch;
+public:
+    CCommandParamsRename(const TFileEntry& aSourceEntry, const TDesC& aTargetPath, TUint aSwitch) : iSourceEntry(aSourceEntry), iTargetPath(aTargetPath), iSwitch(aSwitch) {}
+    };
+
+class CCommandParamsDelete : public CCommandParamsBase
+    {
+public:
+    TFileEntry iSourceEntry;
+    TUint iSwitch;
+public:
+    CCommandParamsDelete(const TFileEntry& aSourceEntry, TUint aSwitch) : iSourceEntry(aSourceEntry), iSwitch(aSwitch) {}
+    };
+
+class CCommandParamsDriveSnapShot : public CCommandParamsBase
+    {
+public:
+    TInt iSourceDriveLetter;
+    TInt iTargetDriveLetter;
+public:
+    CCommandParamsDriveSnapShot(TChar aSourceDriveLetter, TChar aTargetDriveLetter) : iSourceDriveLetter(aSourceDriveLetter), iTargetDriveLetter(aTargetDriveLetter) {}
+    };
+    
+class TCommand
+    {
+public:
+    TInt iCommandId;
+    CCommandParamsBase* iParameters;
+public:
+    TCommand(TInt aCommandId, CCommandParamsBase* aParameters) : iCommandId(aCommandId), iParameters(aParameters) {}
+    };
+
+typedef CArrayFixSeg<TCommand> CCommandArray;
+
+
+
+class CFileBrowserFileUtils : public CActive, public MMsvSessionObserver
+	{
+private:
+    enum TState // active object states
+    	{
+    	EIdle = 0,              // do nothing
+    	};
+
+//    enum TClipBoardMode
+//    	{
+//    	EClipBoardModeCut = 0,
+//    	EClipBoardModeCopy
+//    	};
+
+public:
+	static CFileBrowserFileUtils* NewL(CEngine* aEngine);
+	~CFileBrowserFileUtils();
+
+private:
+	CFileBrowserFileUtils(CEngine* aEngine);
+	void ConstructL();
+
+private: // from CActive
+	void RunL();
+        TInt RunError(TInt aError);
+	void DoCancel();
+
+private: // from MMsvSessionObserver
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
+
+public:  //from MProgressDialogCallback
+    void DialogDismissedL(/*TInt aButtonId*/);
+    
+public: // command handling
+    void StartExecutingCommandsL(const TDesC& aLabel);
+private: // command handling
+    void ExecuteCommand();
+    void CheckForMoreCommandsL();
+    void AppendToCommandArrayL(TInt aCommand, CCommandParamsBase* aParameters);
+    TInt CommandArrayCount() const;
+    void ResetCommandArray();       
+
+private: // misc functionality
+    void GenerateDirectoryDataL();
+    void GetDriveListL();
+    void GetDirectoryListingL();
+//    CAknIconArray* GenerateIconArrayL(TBool aGenerateNewBasicIconArray=EFalse);
+//    void AppendGulIconToIconArrayL(CAknIconArray* aIconArray, const TDesC& aIconFile, TInt aIconId, TInt aMaskId, const TAknsItemID aAknsItemId);
+    TInt AppIconIdForUid(TUid aUid);
+    TUid GetAppUid(const TFileEntry &aFileEntry);
+//    CDesCArray* GenerateItemTextArrayL();
+//    TInt GetSelectedItemsOrCurrentItemL(CFileEntryList* aFileEntryList);
+    TInt SetSelectedItemsOrCurrentItemL(const CArrayFix<TInt>* selectionIndexes,
+                                        CFileEntryList* aFileEntryList);
+
+//    TBool IsDestinationEntriesExists(const CFileEntryList* aEntryList, const TDesC& aTargetDir);
+    void DoCopyToFolderL(CFileEntryList* aEntryList, const TDesC& aTargetDir, const TOverwriteOptions &aOverwriteOptions, TBool aDeleteSource);
+    TInt DoSearchFiles(const TDesC& aFileName, const TDesC& aPath);
+    TInt DoSearchFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath);
+    TInt DoFindFiles(const TDesC& aFileName, const TDesC& aPath);
+    TInt DoFindFilesRecursiveL(const TDesC& aFileName, const TDesC& aPath);
+    void ReadAttachmentPathsRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, CDesCArray* aAttPaths);
+    void WriteMessageEntryInfoRecursiveL(CMsvSession* aSession, CMsvEntry* aContext, RFile& aFile, TInt& aLevel);
+    void DoWriteMessageEntryInfoL(CMsvEntry* aContext, RFile& aFile, TInt aLevel);
+    void ConvertCharsToPwd(const TDesC& aWord, TDes8& aConverted) const;
+    HBufC8* MessageDigestInHexLC(CMessageDigest* aMD, RFile& aFile);
+    void OpenCommonFileActionQueryL(TInt aCurrentItemIndex);
+    
+public: // public interfaces
+    TKeyResponse HandleOfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+    void HandleSettingsChangeL();
+    void SetSortModeL(TInt aSortMode);
+    void SetOrderModeL(TInt aOrderMode);
+    void RefreshViewL();
+    TBool IsCurrentDriveReadOnly();
+    TBool IsItemDirectory(TInt aCurrentItemIndex);
+    void MoveUpOneLevelL();
+    void MoveDownToDirectoryL(TInt aIndex);
+    TInt ClipboardCutL(const CArrayFix<TInt>* aSelectionIndices);
+    TInt ClipboardCopyL(const CArrayFix<TInt>* aSelectionIndices);
+    void ClipboardPasteL(const TOverwriteOptions &aOverwriteOptions);
+    TInt SetCurrentSelection(const CArrayFix<TInt>* aSelectionIndices);
+    void CopyToFolderL(const TFileName &, const TOverwriteOptions &, TBool aMove=EFalse);
+    void DeleteL();
+    TBool SelectionHasDirs();
+    void TouchL(TBool aRecurse);
+    void RenameL(const TInt aIndex, const TFileName &newName);
+    void SetAttributesL(TUint &aSetAttMask, TUint &aClearAttMask, TBool &aRecurse);
+    void SearchL();
+    void NewFileL(const TFileName &aNewFileName);
+    void NewDirectoryL(const TFileName &aNewDirectoryName);
+    void SendToL();
+    void CompressL();
+    void DecompressL();
+    TInt GetFilesCount(const TFileName &aDriveRoot);
+    TInt GetFilesCountAndSize(const TFileName &aFullPath, TInt64 &aSize);
+    TInt GetEntriesCount(const TFileName &aFullPath);
+    TFileName GetMimeType(const TFileName &aFullPath);
+    TFileName GetOpenWith(const TFileName &aFullPath);
+    void OpenWithApparcL(const TFileName &);
+    void OpenWithDocHandlerL(const TFileName &, TBool);
+    void OpenWithFileServiceL(TInt aCurrentItemIndex);
+    TBool FileExists(const TDesC& aPath);
+    TInt LaunchProgramL(const TDesC& aPath);
+    void MemoryInfoPopupL();
+    void ShowFileCheckSumsL(TInt aCurrentItemIndex, TInt aType);
+    void SetErrRdL(TBool aEnable);
+//    void EnableAvkonIconCacheL(TBool aEnable);
+    void SimulateLeaveL(TInt aLeaveCode);
+    void SimulatePanicL(const TDesC& aPanicCategory, TInt aPanicCode);
+    void SimulateExceptionL(TInt aExceptionCode);
+    TUint32 GetDebugMask();
+    void SetDebugMaskL(TUint32 aDbgMask);
+    void WriteAllAppsL();
+    void WriteAllFilesL();
+    void ListOpenFilesL();
+    void ListMessageAttachmentsL(TInt aType);
+    void WriteMsgStoreWalkL();
+    void FileEditorL(TInt aCurrentItemIndex, TInt aType);
+    void SetDrivePasswordL(TInt aIndex, const TFileName &aOldPassword, const TFileName &aNewPassword);
+    void UnlockDriveL(TInt aIndex, const TFileName &aOldPassword);
+    void ClearDrivePasswordL(TInt aIndex, const TFileName &aOldPassword);
+    void EraseDrivePasswordL(TInt aIndex);
+    void FormatDriveL(TInt aIndex, TBool aQuickFormat);
+    void CheckDiskL(TInt aIndex);
+    void ScanDriveL(TInt aIndex);
+    void SetDriveNameL(TInt aIndex, const TFileName &aDriveName);
+    void SetDriveVolumeLabelL(TInt aIndex, const TFileName &aVolumeLabel);
+    void EjectDriveL(TInt aIndex);
+    void DismountFileSystemL(TInt aIndex);
+    void EraseMBRL(TInt aIndex);
+    void PartitionDriveL(TInt aIndex, TBool aEraseMBR, TInt aAmountOfPartitions);
+    TBool DriveSnapShotPossible();
+    void DriveSnapShotL();
+    void EditDataTypesL();
+    void SecureBackupL(TInt aType);
+
+    TBool IsDestinationEntriesExists(const TDesC& aTargetDir);
+    TBool TargetExists(const TInt aIndex, const TFileName &newName);
+    void GetDriveName(TInt aIndex, TFileName &aDriveName);
+    void GetDriveVolumeLabel(TInt aIndex, TFileName &aVolumeLabel);
+
+    CFileEntryList* FileEntries() const;
+    CDriveEntryList* DriveEntries() const;
+
+    TFileName ResolveErrorMessage(TInt aErrCode);
+    
+public:    
+    inline TInt SortMode() { return iSortMode; }
+    inline TInt OrderMode() { return iOrderMode; }
+    inline CFileEntryList* ClipBoardList() { return iClipBoardList; }
+    inline CFileEntryList* CurrentSelectionList() { return iCurrentSelectionList; }
+    inline TBool IsDriveListViewActive() { return iCurrentPath==KNullDesC && iListingMode==ENormalEntries; }
+    inline TBool IsNormalModeActive() { return iListingMode==ENormalEntries; }
+    inline TListingMode ListingMode() { return iListingMode; }
+    inline TFileName CurrentPath() { return iCurrentPath; }
+	
+    inline TSearchAttributes GetSearchAttributes(){ return iSearchAttributes; };
+    inline void ChangeAttributes(const TSearchAttributes &attributes) { iSearchAttributes = attributes; };
+    inline TSearchResults SearchResults(){ return iFileSearchResults; };
+    inline CFileEntryList* FoundFiles() { return iFileEntryList; };    
+    inline void SetAllowProcessing(TBool aAllowProcessing) { iAllowProcessing = aAllowProcessing; }
+    TClipBoardMode GetClipBoardMode() { return iClipBoardMode; }
+	
+private:
+    TState                          iState;
+    CEngine*                        iEngine;
+    CFileBrowserFileOps*            iFileOps;
+
+    TBool                           isWaitDialog;
+    TBool                           isProgressDialog;
+
+    //CEikProgressInfo*               iProgressInfo;
+    CCommandArray*                  iCommandArray;
+    TInt                            iCurrentEntry;
+    TInt                            iSucceededOperations;
+    TInt                            iFailedOperations;
+    TInt                            iLastError;
+    RTimer                          iTimer;
+    RFs                             iFs;
+    TListingMode                    iListingMode;
+    CFileMan*                       iFileMan;
+    TInt                            iViewMode;
+    TFileName                       iCurrentPath;
+    TInt                            iSortMode;
+    TInt                            iOrderMode;
+//    TInt                            iClipboardMode;
+    CDesCArray*                     iClipboardPaths;
+    CDriveEntryList*                iDriveEntryList;
+    CFileEntryList*                 iFileEntryList;
+    CFileEntryList*                 iFindFileEntryList;
+    CAppIconList*                   iAppIconList;
+    TClipBoardMode                  iClipBoardMode;
+    CFileEntryList*                 iClipBoardList;
+    CFileEntryList*                 iCurrentSelectionList;
+    TSearchAttributes               iSearchAttributes;
+    CDocumentHandler*               iDocHandler;
+
+    RFile                           iMsgStoreWalkFile;
+    TInt                            iPrevFolderIndex;
+    TFileName                       iPrevFolderName;
+    RTz                             iTz;
+    TSearchResults                  iFileSearchResults;
+    CDesCArray*                     iTextArray;
+    TBool                           iAllowProcessing;
+    };
+
+
+// utility class for waiting for asychronous requests
+class CAsyncWaiter : public CActive
+	{
+public:
+	static CAsyncWaiter* NewL( TInt aPriority = EPriorityStandard );
+	static CAsyncWaiter* NewLC( TInt aPriority = EPriorityStandard );
+	~CAsyncWaiter();
+	
+	void StartAndWait();
+	TInt Result() const;
+	
+private:
+	CAsyncWaiter( TInt aPriority );
+	
+	// from CActive
+	void RunL();
+	void DoCancel();
+	
+private:
+    CActiveSchedulerWait iWait;
+	TInt iError;
+	};
+	
+	
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBFolderSelector.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,619 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 "FBFolderSelector.h"
+#include "FBFileUtils.h"
+#include "FB.hrh"
+#include "FBStd.h"
+
+#if (!defined __SERIES60_30__ && !defined __SERIES60_31__)
+#include <driveinfo.h>
+#endif // !defined __SERIES60_30__ && !defined __SERIES60_31__
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CFileBrowserFolderSelector *CFileBrowserFolderSelector::NewL(
+        TDes& aReturnPath,
+        MFolderSelectorUI *aFolderSelectorUI)
+    {
+    CFileBrowserFolderSelector* self = new(ELeave) CFileBrowserFolderSelector(aReturnPath,
+                                                                              aFolderSelectorUI);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CFileBrowserFolderSelector::~CFileBrowserFolderSelector()
+    {
+    delete iFileEntryList;
+    delete iDriveEntryList;
+    
+    iFs.Close();
+
+    //iEikonEnv->InfoMsgCancel();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CFileBrowserFolderSelector::CFileBrowserFolderSelector(TDes& aReturnPath, MFolderSelectorUI *aFolderSelectorUI) :
+    iReturnPath(aReturnPath),
+    iFolderSelectorUI(aFolderSelectorUI)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFolderSelector::ConstructL()
+    {
+    User::LeaveIfError( iFs.Connect() );
+    iDriveEntryList = new(ELeave) CDriveEntryList(8);
+    iFileEntryList = new(ELeave) CFileEntryList(32);
+    iCurrentPath = KNullDesC;
+    
+    //iIsDragging = EFalse;
+    //EnableDragEvents();
+    
+    // get only writeable drives
+    GetDriveListL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+/*
+void CFileBrowserFolderSelector::HandlePointerEventL(const TPointerEvent &aPointerEvent)
+    {
+    // detect direction of dragging by comparing the start and finish points
+    
+    if (aPointerEvent.iType == TPointerEvent::EButton1Down)
+        {
+        iDragStartPoint = aPointerEvent.iPosition;
+        iIsDragging = EFalse;
+        }
+    else if (aPointerEvent.iType == TPointerEvent::EDrag)
+        {
+        iIsDragging = ETrue;
+        
+        return;
+        }
+    else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
+        {
+        if (iIsDragging)
+            {
+            const TInt KDelta = iDragStartPoint.iX - aPointerEvent.iPosition.iX;
+            const TInt KThreshold = 30;
+            
+            if (KDelta < -KThreshold) // dragging to right
+                {
+                // "emulate" right key press
+                
+                TKeyEvent keyEvent;
+                keyEvent.iCode = EKeyRightArrow;
+                keyEvent.iModifiers = 0;
+                
+                TEventCode type = EEventKey;
+        
+                OfferKeyEventL(keyEvent, type);
+                
+                return;
+                }
+            else if (KDelta > KThreshold) // dragging to left
+                {
+                // "emulate" left key press
+                
+                TKeyEvent keyEvent;
+                keyEvent.iCode = EKeyLeftArrow;
+                keyEvent.iModifiers = 0;
+                
+                TEventCode type = EEventKey;
+        
+                OfferKeyEventL(keyEvent, type);
+                
+                return;
+                }            
+            }
+        iIsDragging = EFalse;
+        }
+    else
+        {
+        iIsDragging = EFalse;        
+        }
+
+    CAknListQueryDialog::HandlePointerEventL(aPointerEvent);    
+    }
+*/
+       
+// --------------------------------------------------------------------------------------------
+
+TKeyResponse CFileBrowserFolderSelector::OfferKeyEventL(const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/)
+    {
+//    if(aType != EEventKey)
+//        return EKeyWasNotConsumed;
+    
+//    if (aKeyEvent.iCode == EKeyLeftArrow && !IsDriveListViewActive())
+//        {
+//        MoveUpOneLevelL();
+//        return EKeyWasConsumed;
+//        }
+//    else if (aKeyEvent.iCode == EKeyRightArrow && ((ListBox()->CurrentItemIndex() > 0 && !IsDriveListViewActive()) || IsDriveListViewActive()))
+//        {
+//        MoveDownToDirectoryL();
+//        return EKeyWasConsumed;
+//        }
+//    else if (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter)
+//        {
+//        if (IsDriveListViewActive())
+//            {
+//            MoveDownToDirectoryL();
+//            return EKeyWasConsumed;
+//            }
+//        else if (ListBox()->CurrentItemIndex() == 0)
+//            {
+//            TryExitL(EAknSoftkeyOk);
+//            return EKeyWasConsumed;
+//            }
+//        else if (ListBox()->CurrentItemIndex() > 0)
+//            {
+//            MoveDownToDirectoryL();
+//            return EKeyWasConsumed;
+//            }
+//        }
+//
+//    TKeyResponse result = CAknDialog::OfferKeyEventL(aKeyEvent, aType);
+//
+//    // update LSK label
+//    if (!IsDriveListViewActive())
+//        {
+//        if (ListBox()->CurrentItemIndex() == 0)
+//            {
+//            ButtonGroupContainer().SetCommandL(0, EAknSoftkeyOk, iLSKActionText);
+//            ButtonGroupContainer().DrawNow();
+//            }
+//        else
+//            {
+//            ButtonGroupContainer().SetCommandL(0, EAknSoftkeyOk, _L("Open dir"));
+//            ButtonGroupContainer().DrawNow();
+//            }
+//        }
+//
+//    return result;
+    return TKeyResponse();
+    }    
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFolderSelector::PreLayoutDynInitL()
+    {
+//    CAknListQueryDialog::PreLayoutDynInitL();
+
+//    static_cast<CEikFormattedCellListBox*>(ListBox())->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFolderSelector::PostLayoutDynInitL()
+    {
+//    CAknListQueryDialog::PostLayoutDynInitL();
+    
+    //w SetIconArrayL(static_cast<CArrayPtr<CGulIcon>*>(iIconArray));
+    
+    RefreshViewL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CFileBrowserFolderSelector::OkToExitL(TInt /*aButtonId*/)
+    {
+//    if (aButtonId == GetLeftCBAShortKeyPress())
+//        {
+//        if (IsDriveListViewActive())
+//            {
+//            MoveDownToDirectoryL();
+//            return EFalse;
+//            }
+//        else if (ListBox()->CurrentItemIndex() == 0)
+//            {
+//            // close the dialog
+//            iReturnPath = iCurrentPath;
+//            return ETrue;
+//            }
+//        else if (ListBox()->CurrentItemIndex() > 0)
+//            {
+//            MoveDownToDirectoryL();
+//            return EFalse;
+//            }
+//        else
+//            return EFalse;
+//        }
+//    else if (aButtonId == GetRightCBAShortKeyPress())
+//        {
+//        return ETrue;
+//        }
+//    else
+//        {
+//        return EFalse;
+//        }
+    return ETrue;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFolderSelector::MoveUpOneLevelL()
+    {
+    if (iCurrentPath.Length() <= 3)
+        {
+        // move to drive list view is the current path is already short enough
+        iCurrentPath = KNullDesC;
+        }
+    else
+        {
+        // move one directory up
+        TInt marker(iCurrentPath.Length());
+        
+        // find second last dir marker
+        for (TInt i=iCurrentPath.Length()-2; i>=0; i--)
+            {
+            if (iCurrentPath[i] == '\\')
+                {
+                marker = i;
+                break;
+                }
+                
+            }
+        iCurrentPath = iCurrentPath.LeftTPtr(marker+1);
+        }    
+
+    // update view
+    RefreshViewL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFolderSelector::MoveDownToDirectoryL(TInt index)
+    {
+    if (index >= 0)
+        {
+        if (IsDriveListViewActive())
+            {
+            // currently in a drive list view, move to root of selected drive
+            if (iDriveEntryList->Count() > index)
+                {
+                TDriveEntry driveEntry = iDriveEntryList->At(index);
+                
+                iCurrentPath.Append(driveEntry.iLetter);    
+                iCurrentPath.Append(_L(":\\"));
+                }
+            }
+        else
+            {
+            // append the new directory
+            if (index >= 0 && index < iFileEntryList->Count())
+                {
+                TFileEntry fileEntry = iFileEntryList->At(index);
+                
+                if (fileEntry.iEntry.IsDir())
+                    {
+                    iCurrentPath.Append(fileEntry.iEntry.iName);
+                    iCurrentPath.Append(_L("\\"));
+                    }
+                }
+            }
+                   
+        // update view
+        RefreshViewL();
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFolderSelector::RefreshViewL()
+    {
+    if (IsDriveListViewActive())
+        {
+        GetDriveListL();
+        }
+    else
+        {
+        GetFileListL();
+        }
+    iFolderSelectorUI->InformFolderSelectionChanged();
+
+    // TODO
+//    if (iCurrentPath == KNullDesC)
+//        iEikonEnv->InfoMsgWithDuration(_L("<- up dir  down dir ->"), TTimeIntervalMicroSeconds32(KMaxTInt));
+//    else
+//        iEikonEnv->InfoMsgWithDuration(iCurrentPath, TTimeIntervalMicroSeconds32(KMaxTInt));
+   
+//    SetItemTextArray(textArray);
+//    SetOwnershipType(ELbmOwnsItemArray);
+//    ListBox()->HandleItemAdditionL();
+//    Layout();
+//    ListBox()->SetCurrentItemIndex(0);
+//    DrawDeferred();
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+//TBool CFileBrowserFolderSelector::RunCopyDlgLD()
+//    {
+//    iLSKActionText.Copy(_L("Copy"));
+//    return ExecuteLD(1/*R_COPY_TO_FOLDER_SELECTION_QUERY*/);
+//    }
+
+//// --------------------------------------------------------------------------------------------
+
+//TBool CFileBrowserFolderSelector::RunMoveDlgLD()
+//    {
+//    iLSKActionText.Copy(_L("Move"));
+//    return ExecuteLD(1/*R_MOVE_TO_FOLDER_SELECTION_QUERY*/);
+//    }
+
+//// --------------------------------------------------------------------------------------------
+
+//TInt CAknQueryDialog::GetLeftCBAShortKeyPress()
+//    {
+//    return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(0)));
+//    }
+
+//// --------------------------------------------------------------------------------------------
+  
+//TInt CAknQueryDialog::GetRightCBAShortKeyPress()
+//    {
+//    return TInt16(0xffff & TInt16(ButtonGroupContainer().ButtonGroup()->CommandId(2)));
+//    }
+       
+// --------------------------------------------------------------------------------------------
+
+void CFileBrowserFolderSelector::GetDriveListL()
+    {
+    TDriveList driveList;
+
+    // get drive listing depending of the support for network drives
+    if (true/*TODO iEngine->Settings().iSupportNetworkDrives*/)
+        {
+        #ifndef __SERIES60_30__
+            #ifndef __SERIES60_31__
+                User::LeaveIfError(iFs.DriveList(driveList, KDriveAttAll));
+            #endif
+        #else
+            User::LeaveIfError(iFs.DriveList(driveList));
+        #endif
+        }
+    else
+        {
+        User::LeaveIfError(iFs.DriveList(driveList));
+        }
+
+    iDriveEntryList->Reset();
+
+    //TDriveEntry driveEntry;
+    for (TInt i=0; i<KMaxDrives; i++)
+        {
+        if (driveList[i])
+            {
+            TDriveEntry driveEntry;
+
+            // set default icon
+            driveEntry.iIconId = EFixedIconPhoneMemory;
+
+            // get drive letter and number
+            driveEntry.iLetter = 'A' + i;
+            iFs.CharToDrive(driveEntry.iLetter, driveEntry.iNumber);
+
+            // get volume info and check errors
+            if (iFs.Volume(driveEntry.iVolumeInfo, driveEntry.iNumber) == KErrNone)
+                {
+                // set media type descriptor
+                TInt mediaType = driveEntry.iVolumeInfo.iDrive.iType;
+                TBool extMountable( EFalse );
+
+                if (mediaType == EMediaNotPresent)
+                    driveEntry.iMediaTypeDesc = _L("Not present");
+                else if (mediaType ==EMediaUnknown )
+                    driveEntry.iMediaTypeDesc = _L("Unknown");
+                else if (mediaType ==EMediaFloppy )
+                    driveEntry.iMediaTypeDesc = _L("Floppy");
+                else if (mediaType == EMediaHardDisk)
+                    driveEntry.iMediaTypeDesc = _L("Mass storage");
+                else if (mediaType == EMediaCdRom)
+                    driveEntry.iMediaTypeDesc = _L("CD-ROM");
+                else if (mediaType == EMediaRam)
+                    driveEntry.iMediaTypeDesc = _L("RAM");
+                else if (mediaType == EMediaFlash)
+                    driveEntry.iMediaTypeDesc = _L("Flash");
+                else if (mediaType == EMediaRom)
+                    driveEntry.iMediaTypeDesc = _L("ROM");
+                else if (mediaType == EMediaRemote)
+                    driveEntry.iMediaTypeDesc = _L("Remote");
+                else if (mediaType == EMediaNANDFlash)
+                    driveEntry.iMediaTypeDesc = _L("NAND flash");
+
+                // get real size of the ROM drive
+                if (mediaType == EMediaRom)
+                    {
+                    TMemoryInfoV1Buf ramMemory;
+                    UserHal::MemoryInfo(ramMemory);
+                    driveEntry.iVolumeInfo.iSize = ramMemory().iTotalRomInBytes;
+                    }
+
+                // set attribute descripitions
+                if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatNotSupported)
+                    driveEntry.iAttributesDesc.Append(_L("Battery not supported"));
+                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatGood)
+                    driveEntry.iAttributesDesc.Append(_L("Battery good"));
+                else if (driveEntry.iVolumeInfo.iDrive.iBattery == EBatLow)
+                    driveEntry.iAttributesDesc.Append(_L("Battery low"));
+                else
+                    driveEntry.iAttributesDesc.Append(_L("Battery state unknown"));
+
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttLocal)
+                    driveEntry.iAttributesDesc.Append(_L(" + Local"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRom)
+                    driveEntry.iAttributesDesc.Append(_L(" + ROM"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRedirected)
+                    driveEntry.iAttributesDesc.Append(_L("+ Redirected"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttSubsted)
+                    driveEntry.iAttributesDesc.Append(_L(" + Substed"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttInternal)
+                    driveEntry.iAttributesDesc.Append(_L(" + Internal"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable)
+                    {
+                    driveEntry.iAttributesDesc.Append(_L(" + Removable"));
+#if (!defined __SERIES60_30__ && !defined __SERIES60_31__)
+                    TUint drvStatus( 0 );
+                    if ( !DriveInfo::GetDriveStatus( iFs, driveEntry.iNumber, drvStatus ) &&
+                         drvStatus & DriveInfo::EDriveExternallyMountable &&
+                         drvStatus & DriveInfo::EDriveInternal )
+                        {
+                        extMountable = ETrue;
+                        // iMediaTypeDesc already set as "Mass storage"
+                        }
+                    else
+                        {
+                        driveEntry.iMediaTypeDesc = _L("Memory card");
+                        }
+#else
+                    driveEntry.iMediaTypeDesc = _L("Memory card");
+#endif
+                    }
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemote)
+                    driveEntry.iAttributesDesc.Append(_L(" + Remote"));
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttTransaction)
+                    driveEntry.iAttributesDesc.Append(_L(" + Transaction"));
+
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttVariableSize)
+                    driveEntry.iAttributesDesc.Append(_L(" + Variable size"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDualDensity)
+                    driveEntry.iAttributesDesc.Append(_L(" + Dual density"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttFormattable)
+                    driveEntry.iAttributesDesc.Append(_L(" + Formattable"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttWriteProtected)
+                    driveEntry.iAttributesDesc.Append(_L(" + Write protected"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLockable)
+                    driveEntry.iAttributesDesc.Append(_L(" + Lockable"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked)
+                    driveEntry.iAttributesDesc.Append(_L(" + Locked"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttHasPassword)
+                    driveEntry.iAttributesDesc.Append(_L(" + Has password"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttReadWhileWrite)
+                    driveEntry.iAttributesDesc.Append(_L(" + Read while write"));
+                if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttDeleteNotify)
+                    driveEntry.iAttributesDesc.Append(_L(" + Supports DeleteNotify"));
+
+
+                // mark a removable media with memory card icon
+                if (driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable && !extMountable)
+                    {
+                    if (driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked || driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAbsent)
+                        {
+                        driveEntry.iIconId = EFixedIconMemoryCardDisabled;
+                        }
+                    else
+                        {
+                        driveEntry.iIconId = EFixedIconMemoryCard;
+                        }
+                    }
+                }
+
+            // if this fails, likely it's a memory card which is not present
+            else
+                {
+                TVolumeInfo volumeInfo;
+                volumeInfo.iSize = 0;
+                volumeInfo.iFree = 0;
+                volumeInfo.iDrive.iDriveAtt = KDriveAttRemovable;
+                volumeInfo.iDrive.iMediaAtt = KMediaAttWriteProtected;
+                driveEntry.iVolumeInfo = volumeInfo;
+
+                driveEntry.iMediaTypeDesc = _L("Not ready");
+                driveEntry.iIconId = EFixedIconMemoryCardDisabled;
+                }
+// TODO What to do with iPrevFolderName and iPrevFolderIndex
+//            if ( iPrevFolderName != KNullDesC && iPrevFolderName[0] == driveEntry.iLetter )
+//                {
+//                iPrevFolderIndex = iDriveEntryList->Count();
+//                }
+
+            if (driveEntry.iVolumeInfo.iDrive.iMediaAtt != KMediaAttWriteProtected
+                && driveEntry.iVolumeInfo.iDrive.iMediaAtt != KMediaAttLocked
+                && driveEntry.iVolumeInfo.iDrive.iDriveAtt != KDriveAbsent)
+                {
+                iDriveEntryList->AppendL(driveEntry);
+                }
+            }
+        }
+    }
+
+void CFileBrowserFolderSelector::GetFileListL()
+    {
+    iFileEntryList->Reset();
+
+    CDir* dir = NULL;
+    if (iFs.GetDir(iCurrentPath, KEntryAttDir|KEntryAttMatchMask, ESortByName | EAscending | EDirsFirst, dir) == KErrNone)
+        {
+        CleanupStack::PushL(dir);
+
+        for (TInt i=0; i<dir->Count(); i++)
+            {
+            TFileEntry fileEntry;
+            fileEntry.iPath = iCurrentPath;
+            fileEntry.iEntry = (*dir)[i];
+            fileEntry.iDirEntries = KErrNotFound;
+            fileEntry.iIconId = EFixedIconEmpty;
+
+            // check for directory entries
+            if (fileEntry.iEntry.IsDir())
+                {
+                fileEntry.iIconId = EFixedIconFolder;
+
+                TFileName subPath = fileEntry.iPath;
+                subPath.Append(fileEntry.iEntry.iName);
+                subPath.Append(_L("\\"));
+
+                // check if any sub directories
+                CDir* subDir = NULL;
+                if (iFs.GetDir(subPath, KEntryAttDir|KEntryAttMatchMask, ESortNone | EDirsFirst, subDir) == KErrNone)
+                    {
+                    fileEntry.iDirEntries = subDir->Count();
+
+                    for (TInt j=0; j<subDir->Count(); j++)
+                        {
+                        TEntry entry = (*subDir)[j];
+
+                        if (entry.IsDir())
+                            {
+                            fileEntry.iIconId = EFixedIconFolderSub;
+                            break;
+                            }
+                        }
+
+                    delete subDir;
+                    }
+                    iFileEntryList->AppendL(fileEntry);
+                }
+            }
+
+        CleanupStack::PopAndDestroy(); //dir
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+      
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBFolderSelector.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 FILEBROWSER_FILEDLGS_H
+#define FILEBROWSER_FILEDLGS_H
+
+#include "FBFileUtils.h"
+
+#include <e32std.h>
+#include <e32base.h>
+#include <f32file.h>
+#include <apgcli.h>
+
+/**
+  * Interface to communicate UI with
+  */
+class MFolderSelectorUI
+{
+public:
+    /**
+     * Shows info message with text
+//     * @param A aText text to be shown in message body.
+//     * @param A aTitle text to be shown in message title.
+     * @return None.
+     */
+    virtual void InformFolderSelectionChanged() = 0;
+};
+
+/**
+  * Backend class for destination folder selection dialog
+  */
+class CFileBrowserFolderSelector : public CBase
+    {
+public:
+    static CFileBrowserFolderSelector *NewL(TDes& aReturnPath, MFolderSelectorUI *);
+    virtual ~CFileBrowserFolderSelector();
+
+    inline TFileName CurrentPath() const { return iCurrentPath; }
+    inline TBool IsDriveListViewActive() const { return iCurrentPath==KNullDesC; }
+    inline const CDriveEntryList *DriveEntryList() { return iDriveEntryList; }
+    inline const CFileEntryList *FileEntryList() {return iFileEntryList; }
+
+    void MoveDownToDirectoryL(TInt index);
+    void MoveUpOneLevelL();
+
+private: // Constructors
+    CFileBrowserFolderSelector(TDes& aReturnPath, MFolderSelectorUI *);
+    void ConstructL();
+
+protected:  // From CEikDialog
+    TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
+    void PreLayoutDynInitL();
+    void PostLayoutDynInitL();
+    TBool OkToExitL(TInt aButtonId);    
+
+protected:  // From CCoeControl
+    //void HandlePointerEventL(const TPointerEvent &aPointerEvent); 
+
+private: // New methods
+    void RefreshViewL();
+
+    void GetDriveListL();
+    void GetFileListL();
+
+private: // Data
+    TInt                            iSelectedIndex;
+    TBuf<16>                        iLSKActionText;
+    TDes                           &iReturnPath;
+    RFs                             iFs;
+    CDriveEntryList                *iDriveEntryList;
+    CFileEntryList                 *iFileEntryList;
+    TFileName                       iCurrentPath;
+    MFolderSelectorUI               *iFolderSelectorUI;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBStd.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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 FILEBROWSER_STD_H
+#define FILEBROWSER_STD_H
+
+#include <e32cmn.h>
+#include <e32std.h>
+#include <e32base.h>
+
+LOCAL_C inline TBool IsQHD(const TSize& aSize) { return ((aSize.iWidth==640 && aSize.iHeight==360) || (aSize.iWidth==360 && aSize.iHeight==640)); }
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/FBTraces.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* 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 FILEBROWSER_TRACES_H
+#define FILEBROWSER_TRACES_H
+
+#include <e32def.h>
+
+
+// ---------------------------------------------------------------------------
+// You can change these logging method values below! Recompile the application to take changes effect.
+
+    // logging methods
+    // 0 = No logging
+    // 1 = Flogger
+    // 2 = RDebug
+    // 3 = Flogger and RDebug
+    
+    #ifndef _DEBUG
+        
+        // Logging method for UREL/release builds:
+        #define FILEBROWSER_LOGGING_METHOD  0
+
+    #else
+
+        // Logging method for UDEB/debug builds:
+        #define FILEBROWSER_LOGGING_METHOD  2
+
+    #endif    
+    
+
+
+// ---------------------------------------------------------------------------
+// Do not make any changes to lines below...
+
+    #if FILEBROWSER_LOGGING_METHOD == 1 || FILEBROWSER_LOGGING_METHOD == 3
+
+        #include <flogger.h>
+        _LIT(KLogFolder,"Launcher");
+        _LIT(KLogFile,"Launcher_Trace.txt");
+
+    #endif
+
+    #if FILEBROWSER_LOGGING_METHOD == 2 || FILEBROWSER_LOGGING_METHOD == 3
+
+        #include <e32debug.h>
+
+    #endif
+
+
+    #if FILEBROWSER_LOGGING_METHOD == 0
+    
+        #define LOGTEXT(AAA)
+        #define LOGSTRING(AAA)
+        #define LOGSTRING2(AAA,BBB)
+        #define LOGSTRING3(AAA,BBB,CCC)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD)
+    
+    
+    #elif FILEBROWSER_LOGGING_METHOD == 1
+    
+        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+   
+    #elif FILEBROWSER_LOGGING_METHOD == 2
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
+    
+    #elif FILEBROWSER_LOGGING_METHOD == 3
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+
+    #endif
+
+// ---------------------------------------------------------------------------
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/engine.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,427 @@
+/*
+* 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 FILES
+
+#include "engine.h"
+
+//#include "FBApp.h"
+#include "FB.hrh"
+#include "FBFileUtils.h"
+#include "FBStd.h"
+//#include <filebrowser.rsg>
+
+#include <eikenv.h>
+#include <coeutils.h>
+#include <bautils.h>
+#include <apaid.h>
+#include <s32file.h>
+
+// CONSTANTS
+// UID of the application
+const TUid KUidFileBrowser = { 0x102828D6 };
+
+const TInt KSettingsDrive = EDriveC;
+_LIT(KSettingsFileName, "filebrowser_settings.ini");
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CEngine* CEngine::NewL(MFileBrowserUI *aFileBrowserUI)
+    {
+    CEngine* self = new(ELeave) CEngine;
+    CleanupStack::PushL(self);
+    self->ConstructL(aFileBrowserUI);
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CEngine::CEngine()
+    : iFileUtils(NULL)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::ConstructL(MFileBrowserUI *aFileBrowserUI)
+    {
+    iFileBrowserUI = aFileBrowserUI;
+    iEnv = CEikonEnv::Static();
+    User::LeaveIfError(iLs.Connect());
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CEngine::~CEngine()
+    {
+	if (iFileUtils != NULL)
+	    delete iFileUtils;
+
+	iLs.Close();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CEngine::ActivateEngineL()
+    {
+    TRAP_IGNORE( LoadSettingsL() );
+
+    iFileUtils = CFileBrowserFileUtils::NewL(this);
+    }
+
+// ---------------------------------------------------------------------------
+
+void CEngine::DeActivateEngineL()
+    {
+    }
+	
+// ---------------------------------------------------------------------------
+
+void CEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue)
+    {
+    if (aDicFS->IsPresentL(aUid))
+        {
+        RDictionaryReadStream in;
+        in.OpenLC(*aDicFS, aUid);
+        aValue = in.ReadInt16L();
+        CleanupStack::PopAndDestroy(); // in        
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue)
+    {
+    if (aDicFS->IsPresentL(aUid))
+        {
+        RDictionaryReadStream in;
+        in.OpenLC(*aDicFS, aUid);
+        TInt bufLength = in.ReadInt16L();   // get length of descriptor
+        in.ReadL(aValue, bufLength);        // get the descriptor itself
+        CleanupStack::PopAndDestroy(); // in
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue)
+    {
+    RDictionaryWriteStream out;
+    out.AssignLC(*aDicFS, aUid);
+    out.WriteInt16L(aValue);
+    out.CommitL(); 	
+    CleanupStack::PopAndDestroy(1);// out
+    }
+
+// ---------------------------------------------------------------------------
+
+void CEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue)
+    {
+    RDictionaryWriteStream out;
+    out.AssignLC(*aDicFS, aUid);
+    out.WriteInt16L(aValue.Length());       // write length of the descriptor
+    out.WriteL(aValue, aValue.Length());    // write the descriptor itself
+    out.CommitL(); 	
+    CleanupStack::PopAndDestroy(1);// out
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+void CEngine::LoadSettingsL()
+    {
+    const TSize screenSize = iEnv->ScreenDevice()->SizeInPixels();
+
+    // set defaults
+    iSettings.iDisplayMode = EDisplayModeFullScreen;
+    iSettings.iFileViewMode = IsQHD(screenSize) ? EFileViewModeExtended : EFileViewModeSimple;
+    iSettings.iShowSubDirectoryInfo = EFalse;
+    iSettings.iShowAssociatedIcons = EFalse;
+    iSettings.iRememberLastPath = EFalse;
+    iSettings.iLastPath = KNullDesC;
+    iSettings.iRememberFolderSelection = ETrue;
+//#if 0 // TODO
+//#if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)
+//    if ( AknLayoutUtils::PenEnabled() )
+//        {
+//        iSettings.iEnableToolbar = ETrue;
+//        }
+//    else
+//        {
+//        iSettings.iEnableToolbar = EFalse;
+//        }
+//#else
+//    iSettings.iEnableToolbar = EFalse;
+//#endif
+//#endif // TODO
+
+    iSettings.iSupportNetworkDrives = EFalse;
+    iSettings.iBypassPlatformSecurity = EFalse;
+    iSettings.iRemoveFileLocks = ETrue;
+    iSettings.iIgnoreProtectionsAtts = ETrue;
+    iSettings.iRemoveROMWriteProrection = ETrue;
+
+    // build specific defaults
+#if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
+    iSettings.iSupportNetworkDrives = ETrue;
+#endif 
+
+
+    // make sure that the private path of this app in c-drive exists
+    iEnv->FsSession().CreatePrivatePath( KSettingsDrive ); // c:\\private\\102828d6\\
+    
+    // handle settings always in the private directory 
+    if (iEnv->FsSession().SetSessionToPrivate( KSettingsDrive ) == KErrNone)
+        {
+        // open or create a dictionary file store
+        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iEnv->FsSession(), KSettingsFileName, KUidFileBrowser);
+
+        LoadDFSValueL(settingsStore, KFBSettingDisplayMode,                 iSettings.iDisplayMode);
+        LoadDFSValueL(settingsStore, KFBSettingFileViewMode,                iSettings.iFileViewMode);
+        LoadDFSValueL(settingsStore, KFBSettingShowSubDirectoryInfo,        iSettings.iShowSubDirectoryInfo);
+        LoadDFSValueL(settingsStore, KFBSettingShowAssociatedIcons,         iSettings.iShowAssociatedIcons);
+        LoadDFSValueL(settingsStore, KFBSettingRememberLastPath,            iSettings.iRememberLastPath);
+        LoadDFSValueL(settingsStore, KFBSettingLastPath,                    iSettings.iLastPath);
+        LoadDFSValueL(settingsStore, KFBSettingFolderSelection,             iSettings.iRememberFolderSelection);
+        LoadDFSValueL(settingsStore, KFBSettingEnableToolbar,               iSettings.iEnableToolbar);
+
+        LoadDFSValueL(settingsStore, KFBSettingSupportNetworkDrives,        iSettings.iSupportNetworkDrives);
+        LoadDFSValueL(settingsStore, KFBSettingBypassPlatformSecurity,      iSettings.iBypassPlatformSecurity);
+        LoadDFSValueL(settingsStore, KFBSettingRemoveFileLocks,             iSettings.iRemoveFileLocks);
+        LoadDFSValueL(settingsStore, KFBSettingIgnoreProtectionsAtts,       iSettings.iIgnoreProtectionsAtts);
+        LoadDFSValueL(settingsStore, KFBSettingRemoveROMWriteProtection,    iSettings.iRemoveROMWriteProrection);
+
+        CleanupStack::PopAndDestroy(); // settingsStore         
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::SaveSettingsL(TBool aNotifyModules)
+    {
+    // handle settings always in c:\\private\\102828d6\\
+    if (iEnv->FsSession().SetSessionToPrivate( KSettingsDrive ) == KErrNone)
+        {
+        // delete existing store to make sure that it is clean and not eg corrupted
+        if (BaflUtils::FileExists(iEnv->FsSession(), KSettingsFileName))
+            {
+            iEnv->FsSession().Delete(KSettingsFileName);
+            }
+        
+        // create a dictionary file store
+        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iEnv->FsSession(), KSettingsFileName, KUidFileBrowser);
+
+        SaveDFSValueL(settingsStore, KFBSettingDisplayMode,                 iSettings.iDisplayMode);
+        SaveDFSValueL(settingsStore, KFBSettingFileViewMode,                iSettings.iFileViewMode);
+        SaveDFSValueL(settingsStore, KFBSettingShowSubDirectoryInfo,        iSettings.iShowSubDirectoryInfo);
+        SaveDFSValueL(settingsStore, KFBSettingShowAssociatedIcons,         iSettings.iShowAssociatedIcons);
+        SaveDFSValueL(settingsStore, KFBSettingRememberLastPath,            iSettings.iRememberLastPath);
+        SaveDFSValueL(settingsStore, KFBSettingLastPath,                    iSettings.iLastPath);
+        SaveDFSValueL(settingsStore, KFBSettingFolderSelection,             iSettings.iRememberFolderSelection);
+        SaveDFSValueL(settingsStore, KFBSettingEnableToolbar,               iSettings.iEnableToolbar);
+
+        SaveDFSValueL(settingsStore, KFBSettingSupportNetworkDrives,        iSettings.iSupportNetworkDrives);
+        SaveDFSValueL(settingsStore, KFBSettingBypassPlatformSecurity,      iSettings.iBypassPlatformSecurity);
+        SaveDFSValueL(settingsStore, KFBSettingRemoveFileLocks,             iSettings.iRemoveFileLocks);
+        SaveDFSValueL(settingsStore, KFBSettingIgnoreProtectionsAtts,       iSettings.iIgnoreProtectionsAtts);
+        SaveDFSValueL(settingsStore, KFBSettingRemoveROMWriteProtection,    iSettings.iRemoveROMWriteProrection);
+        
+        settingsStore->CommitL();
+        CleanupStack::PopAndDestroy(); // settingsStore             
+        }
+
+    // update changes to modules
+    if (aNotifyModules)
+        {
+        //iScreenCapture->HandleSettingsChangeL();
+        if (iFileUtils != NULL) 
+			{
+			iFileUtils->HandleSettingsChangeL();
+			}
+        //iFileListContainer->HandleSettingsChangeL();
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CEngine::LaunchSettingsDialogL()
+    {
+	TInt retValue = KErrNone;
+	// TODO:
+    // set to normal mode
+    //iFileListContainer->SetScreenLayoutL(EDisplayModeNormal);
+    //iFileListContainer->DeleteNaviPane();
+    //iFileListContainer->HideToolbar();
+    
+    // launch the dialog and save settings
+    //CFileBrowserSettingViewDlg* dlg = CFileBrowserSettingViewDlg::NewL(iSettings);
+    //TInt retValue = dlg->ExecuteLD(R_FILEBROWSER_SETTINGS_DIALOG);        
+    //FileListContainer()->CreateEmptyNaviPaneLabelL();
+    TRAP_IGNORE(SaveSettingsL());
+    return retValue;
+    }
+	
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CAsyncWaiter* CAsyncWaiter::NewL(TInt aPriority)
+	{
+	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
+	return self;
+	}
+
+CAsyncWaiter* CAsyncWaiter::NewLC(TInt aPriority)
+	{
+	CAsyncWaiter* self = new(ELeave) CAsyncWaiter(aPriority);
+	CleanupStack::PushL(self);
+	return self;
+	}
+	
+CAsyncWaiter::CAsyncWaiter(TInt aPriority) : CActive(aPriority)
+	{
+	CActiveScheduler::Add(this);
+	}	
+
+CAsyncWaiter::~CAsyncWaiter()
+	{
+	Cancel();
+	}
+	
+void CAsyncWaiter::StartAndWait()
+	{
+        iStatus = KRequestPending;
+        SetActive();
+        iWait.Start();
+	}
+	
+TInt CAsyncWaiter::Result() const
+	{
+	return iError;
+	}
+	
+void CAsyncWaiter::RunL()
+	{
+	iError = iStatus.Int();
+	//CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
+	iWait.AsyncStop();
+	}
+	
+void CAsyncWaiter::DoCancel()
+	{
+	iError = KErrCancel;
+    if( iStatus == KRequestPending )
+        {
+        TRequestStatus* s=&iStatus;
+        User::RequestComplete( s, KErrCancel );
+        }
+
+        //CAknEnv::StopSchedulerWaitWithBusyMessage( iWait );
+	iWait.AsyncStop();
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::OpenWithApparcL(const TFileName &aFileName)
+        {
+	if (iFileUtils != NULL) 
+		{
+		iFileUtils->OpenWithApparcL(aFileName);
+		}
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::OpenWithDocHandlerL(const TFileName &aFileName, TBool aEmbed)
+        {
+	if (iFileUtils != NULL) 
+		{
+		iFileUtils->OpenWithDocHandlerL(aFileName, aEmbed);
+		}
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//TInt CEngine::QueryCurrentItemIndex()
+//	{
+//        return iFileBrowserUI->QueryCurrentItemIndex();
+//	}
+
+// --------------------------------------------------------------------------------------------	
+
+TSearchAttributes CEngine::GetSearchAttributes()
+	{
+	if (iFileUtils != NULL) 
+		{
+		return iFileUtils->GetSearchAttributes();
+		} 
+	else
+		{
+		return TSearchAttributes(); 
+		}
+	}
+
+// --------------------------------------------------------------------------------------------	
+
+void CEngine::ChangeAttributes(const TSearchAttributes &attributes)
+	{ 
+	if (iFileUtils != NULL) 
+		{
+		iFileUtils->ChangeAttributes(attributes); 
+		}
+	}
+
+// --------------------------------------------------------------------------------------------	
+
+TSearchResults CEngine::SearchResults() 
+	{ 
+	if (iFileUtils != NULL) 
+		{
+		return iFileUtils->SearchResults(); 
+		}
+	else
+		{
+		return TSearchResults();
+		}
+	}
+
+// --------------------------------------------------------------------------------------------	
+
+CFileEntryList* CEngine::FoundFiles() 
+	{ 
+	if (iFileUtils != NULL) 
+		{
+		return iFileUtils->FoundFiles(); 
+		}
+	else 
+		{
+		return NULL;
+		}
+	}
+	
+// --------------------------------------------------------------------------------------------	
+
+void CEngine::SearchL() 
+	{ 
+	if (iFileUtils != NULL) 
+		{
+		TRAP_IGNORE(iFileUtils->SearchL()); 
+		}
+	}
+	
+// --------------------------------------------------------------------------------------------	
+	
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/engine/engine.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,222 @@
+/*
+* 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 __ENGINE_H__
+#define __ENGINE_H__
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <apgcli.h>
+
+#include "FBFileUtils.h"
+
+// setting keys (do not change uids of existing keys to maintain compatibility to older versions!)
+const TUid KFBSettingDisplayMode                   = { 0x00 };
+const TUid KFBSettingFileViewMode                  = { 0x01 };
+const TUid KFBSettingShowSubDirectoryInfo          = { 0x02 };
+const TUid KFBSettingShowAssociatedIcons           = { 0x03 };
+const TUid KFBSettingRememberLastPath              = { 0x04 };
+const TUid KFBSettingLastPath                      = { 0x05 };
+
+const TUid KFBSettingSupportNetworkDrives          = { 0x06 };
+const TUid KFBSettingBypassPlatformSecurity        = { 0x07 };
+const TUid KFBSettingRemoveFileLocks               = { 0x08 };
+const TUid KFBSettingIgnoreProtectionsAtts         = { 0x09 };
+const TUid KFBSettingRemoveROMWriteProtection      = { 0x0A };
+
+const TUid KFBSettingFolderSelection               = { 0x0B };
+const TUid KFBSettingEnableToolbar                 = { 0x0C };
+
+
+// FORWARD DECLARATIONS
+class CFileBrowserFileListContainer;
+class CFileBrowserScreenCapture;
+class CFileBrowserFileUtils;
+class CEikonEnv;
+class CDictionaryFileStore;
+class MFileBrowserUI;
+
+// CLASS DECLARATIONS
+
+class TFileBrowserSettings
+    {
+public:
+    TInt                                        iDisplayMode;
+    TInt                                        iFileViewMode;
+    TBool                                       iShowSubDirectoryInfo;
+    TBool                                       iShowAssociatedIcons;
+    TBool                                       iRememberLastPath;
+    TFileName                                   iLastPath;
+    TBool                                       iRememberFolderSelection;
+    TBool                                       iEnableToolbar;
+
+    TBool                                       iSupportNetworkDrives;
+    TBool                                       iBypassPlatformSecurity;
+    TBool                                       iRemoveFileLocks;
+    TBool                                       iIgnoreProtectionsAtts;
+    TBool                                       iRemoveROMWriteProrection;
+    };
+
+// INFERFACE FOR COMMUNICATION WITH UI
+
+class MFileBrowserUI
+{
+public:
+//    /**
+//      * Method from getting current index
+//      * @return current index.
+//      */
+//    virtual TInt QueryCurrentItemIndex() = 0;
+
+    /**
+     * Shows info message with text
+     * @param A aText text to be shown in message body.
+     * @param A aTitle text to be shown in message title.
+     * @return None.
+     */
+    virtual void ShowInformationNote(const TDesC &aDescText, const TDesC &aDescTitle) = 0;
+
+    /**
+     * Shows error message with error text
+     * @param aText An error text to be shown in message.
+     * @return None.
+     */
+    virtual void ShowErrorNote(const TDesC& aText, TBool aNoTimeout = EFalse) = 0;
+
+    /**
+     * Shows confirmation message with text
+     * @param aText An text to be shown in message.
+     * @return None.
+     */
+    virtual void ShowConfirmationNote(const TDesC& aText, TBool aNoTimeout = EFalse) = 0;
+
+    /**
+     * Shows progress bar with text
+     * @param aText A text to be shown at top of the progress bar.
+     * @param aMinimum A minimum progress bar value.
+     * @param aMaximum A maximum progress bar value.
+     * @return None.
+     */
+    virtual void ShowProgressDialog(const TDesC& aDescText, TInt aMinimum, TInt aMaximum ) = 0;
+
+    /**
+     * Cancel progress dialog
+     * @return None.
+     */
+    virtual void CancelProgressDialog() = 0;
+
+    /**
+      * Set progress dialog value
+      * @param aValue A vaule to be shown at top of the progress dialog.
+      */
+    virtual void SetProgressValue(TInt aValue) = 0;
+//
+//    /**
+//     * Sets progress bar value
+//     * @param aValue A value between min and max value of the progress bar range
+//     * @return None.
+//     */
+//    virtual void SetProgressBarValue(TInt aValue) = 0;
+//
+//    /**
+//     * Hides progress bar
+//     * @return None.
+//     */
+//    virtual void HideProgressBar() = 0;
+//
+    /**
+     * Shows wait dialog with text
+     * @param aText A text to be shown at top of the wait bar.
+     * @return None.
+     */
+    virtual void ShowWaitDialog(const TDesC& aText) = 0;
+
+    /**
+     * Cancel wait dialog
+     * @return None.
+     */
+    virtual void CancelWaitDialog() = 0;
+
+    /**
+     * Processes all pending events to allow wait/progresa dialog to update itself
+     * @return None.
+     */
+    virtual void ProcessEvents() = 0;
+
+    /**
+     * Shows confirmation dialog
+     * @param aFileName String contaning file name and path
+     * @return ETrue if user pressed OK button, otherwise EFalse.
+     */
+    virtual TBool ShowConfirmationQuery(const TDesC& aDescText) = 0;
+
+    /**
+      * Notify wrapping model data has changed
+      */
+    virtual void NotifyModelHasChanged() = 0;
+
+};
+
+class CEngine : public CBase
+    {
+public:
+    static CEngine* NewL(MFileBrowserUI *aFileBrowserUI);
+    ~CEngine();
+
+private:
+    CEngine();
+    void ConstructL(MFileBrowserUI *aFileBrowserUI);
+    void LoadSettingsL();
+    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue);
+    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue);
+    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue);
+    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue);
+
+public:
+    void ActivateEngineL();
+    void DeActivateEngineL();
+    void SaveSettingsL(TBool aNotifyModules=ETrue);
+    TInt LaunchSettingsDialogL();
+    inline TFileBrowserSettings& Settings() { return iSettings; }
+    inline CEikonEnv* EikonEnv() { return iEnv; }
+    inline RApaLsSession& LsSession() { return iLs; }
+    inline CFileBrowserScreenCapture* ScreenCapture() { return iScreenCapture; }
+    inline CFileBrowserFileUtils* FileUtils() { return iFileUtils; }
+    inline MFileBrowserUI* FileBrowserUI() { return iFileBrowserUI; }
+
+    void OpenWithApparcL(const TFileName &);
+    void OpenWithDocHandlerL(const TFileName &, TBool);
+//    TInt QueryCurrentItemIndex();
+    TSearchAttributes GetSearchAttributes();
+    void ChangeAttributes(const TSearchAttributes &);
+    TSearchResults SearchResults();
+    CFileEntryList* FoundFiles();	
+    void SearchL();
+
+private:
+    MFileBrowserUI                  *iFileBrowserUI;
+    CFileBrowserScreenCapture       *iScreenCapture;
+    CFileBrowserFileUtils           *iFileUtils;
+    CEikonEnv*                      iEnv;
+    TFileBrowserSettings            iSettings;
+    RApaLsSession                   iLs;
+    TBool                           iIsHashKeySelectionInUse; 
+    };
+   
+
+#endif // __ENGINE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/filebrowser.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,23 @@
+#
+# 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
+
+DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT QT_NO_DEBUG
+
+SUBDIRS = group \
+          ui
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopclient/BWINS/FileBrowserFileOpClientU.DEF	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	??1CFBFileOpClient@@UAE@XZ @ 1 NONAME ; CFBFileOpClient::~CFBFileOpClient(void)
+	?Attribs@CFBFileOpClient@@QAEHABVTDesC16@@IIABVTTime@@I@Z @ 2 NONAME ; int CFBFileOpClient::Attribs(class TDesC16 const &, unsigned int, unsigned int, class TTime const &, unsigned int)
+	?Copy@CFBFileOpClient@@QAEHABVTDesC16@@0I@Z @ 3 NONAME ; int CFBFileOpClient::Copy(class TDesC16 const &, class TDesC16 const &, unsigned int)
+	?CreateEmptyFile@CFBFileOpClient@@QAEHABVTDesC16@@@Z @ 4 NONAME ; int CFBFileOpClient::CreateEmptyFile(class TDesC16 const &)
+	?Delete@CFBFileOpClient@@QAEHABVTDesC16@@I@Z @ 5 NONAME ; int CFBFileOpClient::Delete(class TDesC16 const &, unsigned int)
+	?EraseMBR@CFBFileOpClient@@QAEHI@Z @ 6 NONAME ; int CFBFileOpClient::EraseMBR(unsigned int)
+	?MkDirAll@CFBFileOpClient@@QAEHABVTDesC16@@@Z @ 7 NONAME ; int CFBFileOpClient::MkDirAll(class TDesC16 const &)
+	?NewL@CFBFileOpClient@@SAPAV1@XZ @ 8 NONAME ; class CFBFileOpClient * CFBFileOpClient::NewL(void)
+	?PartitionDrive@CFBFileOpClient@@QAEHII@Z @ 9 NONAME ; int CFBFileOpClient::PartitionDrive(unsigned int, unsigned int)
+	?Rename@CFBFileOpClient@@QAEHABVTDesC16@@0I@Z @ 10 NONAME ; int CFBFileOpClient::Rename(class TDesC16 const &, class TDesC16 const &, unsigned int)
+	?RmDir@CFBFileOpClient@@QAEHABVTDesC16@@I@Z @ 11 NONAME ; int CFBFileOpClient::RmDir(class TDesC16 const &, unsigned int)
+	?CancelOp@CFBFileOpClient@@QAEXXZ @ 12 NONAME ; void CFBFileOpClient::CancelOp(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopclient/eabi/FileBrowserFileOpClientu.def	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN15CFBFileOpClient14PartitionDriveEjj @ 1 NONAME
+	_ZN15CFBFileOpClient15CreateEmptyFileERK7TDesC16 @ 2 NONAME
+	_ZN15CFBFileOpClient4CopyERK7TDesC16S2_j @ 3 NONAME
+	_ZN15CFBFileOpClient4NewLEv @ 4 NONAME
+	_ZN15CFBFileOpClient5RmDirERK7TDesC16j @ 5 NONAME
+	_ZN15CFBFileOpClient6DeleteERK7TDesC16j @ 6 NONAME
+	_ZN15CFBFileOpClient6RenameERK7TDesC16S2_j @ 7 NONAME
+	_ZN15CFBFileOpClient7AttribsERK7TDesC16jjRK5TTimej @ 8 NONAME
+	_ZN15CFBFileOpClient8EraseMBREj @ 9 NONAME
+	_ZN15CFBFileOpClient8MkDirAllERK7TDesC16 @ 10 NONAME
+	_ZN15CFBFileOpClientD0Ev @ 11 NONAME
+	_ZN15CFBFileOpClientD1Ev @ 12 NONAME
+	_ZN15CFBFileOpClientD2Ev @ 13 NONAME
+	_ZTI15CFBFileOpClient @ 14 NONAME ; #<TI>#
+	_ZTV15CFBFileOpClient @ 15 NONAME ; #<VT>#
+	_ZN15CFBFileOpClient8CancelOpEv @ 16 NONAME
+	_ZTI18CAsyncWaiterClient @ 17 NONAME ; #<TI>#
+	_ZTV18CAsyncWaiterClient @ 18 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopclient/group/FBFileOpClient.mmp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+
+TARGET        FileBrowserFileOpClient.dll
+TARGETTYPE    dll
+
+CAPABILITY 	  CAP_GENERAL_DLL
+
+SMPSAFE
+
+UID           0x102828D7
+VENDORID      VID_DEFAULT
+
+
+USERINCLUDE       ../inc
+SOURCEPATH        ../src
+OS_LAYER_SYSTEMINCLUDE
+
+
+SOURCE        FBFileOpClient.cpp
+
+LIBRARY       euser.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopclient/group/bld.inf	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+PRJ_MMPFILES
+FBFileOpClient.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopclient/inc/FBFileOpClient.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 __FBFILEOPCLIENT_H__
+#define __FBFILEOPCLIENT_H__
+
+// INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+#include "FBFileOpClientServer.h" // TFileOpArgs
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATIONS
+
+class RFBFileOpServerSession : public RSessionBase
+    {
+public:
+    TInt Connect();
+	
+    void Copy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch, TRequestStatus& aStatus);
+    TInt Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch); 
+    TInt Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
+    void RmDir(const TDesC& aDirName, TUint aSwitch, TRequestStatus& aStatus); 
+    void Delete(const TDesC& aName, TUint aSwitch, TRequestStatus& aStatus); 
+    TInt MkDirAll(const TDesC& aPath); 
+    TInt CreateEmptyFile(const TDesC& aName); 
+    TInt EraseMBR(TUint aDriveNumber); 
+    TInt PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions);
+    TInt CancelOp();
+
+private:
+    TVersion Version() const;
+    TPckgBuf<TFileOpArgs> iPckgBuf;
+    };
+
+
+class CFBFileOpClient : public CBase
+    {
+public:
+    IMPORT_C static CFBFileOpClient* NewL();
+    IMPORT_C ~CFBFileOpClient();
+    IMPORT_C TInt Copy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch);
+    IMPORT_C TInt Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch); 
+    IMPORT_C TInt Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch); 
+    IMPORT_C TInt RmDir(const TDesC& aDirName, TUint aSwitch); 
+    IMPORT_C TInt Delete(const TDesC& aName, TUint aSwitch); 
+    IMPORT_C TInt MkDirAll(const TDesC& aPath); 
+    IMPORT_C TInt CreateEmptyFile(const TDesC& aName); 
+    IMPORT_C TInt EraseMBR(TUint aDriveNumber); 
+    IMPORT_C TInt PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions); 
+    IMPORT_C void CancelOp();
+    
+private:
+    CFBFileOpClient();
+    void ConstructL();
+    
+ private :
+    RFBFileOpServerSession  iFBFileOpServerSession;
+    };
+
+
+/**
+ * Similar class as CAsyncWaiter defined in FBUtils.h, except
+ * CAsyncWaiterClient uses iWait.AsyncStop() instead of   
+ * CAknEnv::StopSchedulerWaitWithBusyMessage( iWait )
+ * to stop the nested loop. This class can be utilized
+ * if CAknEnv is not running.
+ */
+class CAsyncWaiterClient : public CActive
+    {
+public:
+    static CAsyncWaiterClient* NewL( TInt aPriority = EPriorityStandard );
+    static CAsyncWaiterClient* NewLC( TInt aPriority = EPriorityStandard );
+    ~CAsyncWaiterClient();
+    
+    void StartAndWait();
+    TInt Result() const;
+    
+private:
+    CAsyncWaiterClient( TInt aPriority );
+    
+    // from CActive
+    void RunL();
+    void DoCancel();
+    
+private:
+    CActiveSchedulerWait iWait;
+    TInt iError;
+    };
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopclient/inc/FBFileOpClientServer.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 __FBCLIENTSERVER_H__
+#define __FBCLIENTSERVER_H__
+
+#include <e32std.h>
+
+const TUint KCopyServMajorVersionNumber = 1;
+const TUint KCopyServMinorVersionNumber = 0;
+const TUint KCopyServBuildVersionNumber = 0;
+
+_LIT(KMyServerName, "FileBrowserFileOpServer");
+_LIT(KMyServerImg, "FileBrowserFileOpServer");		// EXE name
+const TUid KServerUid3 = {0x102828D8};
+
+enum TFileOpMessages
+	{
+	EFileOpCopy,
+	EFileOpRename,
+	EFileOpAttribs,
+	EFileOpRmDir,
+	EFileOpDelete,
+	EFileOpMkDirAll,
+	EFileOpCreateEmptyFile,
+	EFileOpEraseMBR,
+	EFileOpPartitionDrive,
+	EFileOpCancel
+	};
+
+class TFileOpArgs
+    {
+public:
+    TFileName   iBuf1;
+    TFileName   iBuf2;
+    TUint       iUint1;
+    TUint       iUint2;
+    TUint       iUint3;
+    TTime       iTime1;
+    };
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopclient/src/FBFileOpClient.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,481 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+// needed for client interface
+#include "FBFileOpClient.h"
+
+const TUint KDefaultMessageSlots=4;
+
+// --------------------------------------------------------------------------------------------
+
+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.
+//
+	{
+	const TUidType serverUid(KNullUid,KNullUid,KServerUid3);
+	RProcess server;
+	TInt r=server.Create(KMyServerImg,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();
+	return r;
+	}
+
+// --------------------------------------------------------------------------------------------
+
+TVersion RFBFileOpServerSession::Version(void) const
+	{
+	return(TVersion(KCopyServMajorVersionNumber,KCopyServMinorVersionNumber,KCopyServBuildVersionNumber));
+	}
+
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::Connect()
+//
+// Connect to the server, attempting to start it if necessary
+//
+	{
+	TInt retry=2;
+	for (;;)
+		{
+		TInt r=CreateSession(KMyServerName,Version(),KDefaultMessageSlots);
+		if (r!=KErrNotFound && r!=KErrServerTerminated)
+			return r;
+		if (--retry==0)
+			return r;
+		r=StartServer();
+		if (r!=KErrNone && r!=KErrAlreadyExists)
+			return r;
+		}
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void RFBFileOpServerSession::Copy(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch, TRequestStatus& aStatus) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iBuf1.Copy(aSourceFullName);
+    argsStruct.iBuf2.Copy(aTargetFullName);
+    argsStruct.iUint1 = aSwitch;
+    
+    iPckgBuf = argsStruct;
+    TIpcArgs args(&iPckgBuf);
+    SendReceive(EFileOpCopy, args, aStatus);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iBuf1.Copy(anOld);
+    argsStruct.iBuf2.Copy(aNew);
+    argsStruct.iUint1 = aSwitch;
+    
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    pckgBuf = argsStruct;
+	TIpcArgs args(&pckgBuf);
+	return SendReceive(EFileOpRename, args);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iBuf1.Copy(aName);
+    argsStruct.iUint1 = aSetMask;
+    argsStruct.iUint2 = aClearMask;
+    argsStruct.iTime1 = aTime;
+    argsStruct.iUint3 = aSwitch;
+    
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    pckgBuf = argsStruct;
+	TIpcArgs args(&pckgBuf);
+	return SendReceive(EFileOpAttribs, args);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void RFBFileOpServerSession::RmDir( const TDesC& aDirName,
+                                    TUint aSwitch,
+                                    TRequestStatus& aStatus ) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iBuf1.Copy(aDirName);
+    argsStruct.iUint1 = aSwitch;
+
+    iPckgBuf = argsStruct;
+    TIpcArgs args(&iPckgBuf);
+	SendReceive(EFileOpRmDir, args, aStatus);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void RFBFileOpServerSession::Delete(const TDesC& aName, TUint aSwitch, TRequestStatus& aStatus) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iBuf1.Copy(aName);
+    argsStruct.iUint1 = aSwitch;
+
+    iPckgBuf = argsStruct;
+    TIpcArgs args(&iPckgBuf);
+	SendReceive(EFileOpDelete, args, aStatus);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::MkDirAll(const TDesC& aPath) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iBuf1.Copy(aPath);
+    
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    pckgBuf = argsStruct;
+	TIpcArgs args(&pckgBuf);
+	return SendReceive(EFileOpMkDirAll, args);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::CreateEmptyFile(const TDesC& aName) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iBuf1.Copy(aName);
+    
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    pckgBuf = argsStruct;
+	TIpcArgs args(&pckgBuf);
+	return SendReceive(EFileOpCreateEmptyFile, args);
+    }
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::EraseMBR(TUint aDriveNumber) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iUint1 = aDriveNumber;
+        
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    pckgBuf = argsStruct;
+	TIpcArgs args(&pckgBuf);
+	return SendReceive(EFileOpEraseMBR, args);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions) 
+    {
+    TFileOpArgs argsStruct = TFileOpArgs();
+    argsStruct.iUint1 = aDriveNumber;
+    argsStruct.iUint2 = aNumberOfPartitions;
+        
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    pckgBuf = argsStruct;
+	TIpcArgs args(&pckgBuf);
+	return SendReceive(EFileOpPartitionDrive, args);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt RFBFileOpServerSession::CancelOp() 
+    {
+    TIpcArgs args( NULL );
+    return SendReceive( EFileOpCancel, args );
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C CFBFileOpClient* CFBFileOpClient::NewL()
+    {
+    CFBFileOpClient* self = new(ELeave) CFBFileOpClient;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C CFBFileOpClient::~CFBFileOpClient()
+    {
+    iFBFileOpServerSession.Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CFBFileOpClient::CFBFileOpClient()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpClient::ConstructL()
+    {	
+    User::LeaveIfError(iFBFileOpServerSession.Connect());
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::Copy( const TDesC& aSourceFullName,
+                                     const TDesC& aTargetFullName,
+                                     TUint aSwitch ) 
+    {
+    CAsyncWaiterClient* waiter = CAsyncWaiterClient::NewLC();
+    iFBFileOpServerSession.Copy( aSourceFullName, aTargetFullName, aSwitch, waiter->iStatus );
+    waiter->StartAndWait();
+    TInt err = waiter->Result();
+    
+    if ( err == KErrServerTerminated )
+        {
+        User::LeaveIfError( iFBFileOpServerSession.Connect() );
+        iFBFileOpServerSession.Copy( aSourceFullName, aTargetFullName, aSwitch, waiter->iStatus );
+        waiter->StartAndWait();
+        err = waiter->Result();
+        }
+    CleanupStack::PopAndDestroy( waiter );
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::Rename(const TDesC& anOld, const TDesC& aNew, TUint aSwitch) 
+    {
+    TInt err = iFBFileOpServerSession.Rename(anOld, aNew, aSwitch);
+        
+    if (err == KErrServerTerminated)
+        {
+        User::LeaveIfError(iFBFileOpServerSession.Connect());
+        err = iFBFileOpServerSession.Rename(anOld, aNew, aSwitch);
+        }
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::Attribs(const TDesC& aName, TUint aSetMask, TUint aClearMask, const TTime& aTime, TUint aSwitch) 
+    {
+    TInt err = iFBFileOpServerSession.Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
+    
+    if (err == KErrServerTerminated)
+        {
+        User::LeaveIfError(iFBFileOpServerSession.Connect());
+        err = iFBFileOpServerSession.Attribs(aName, aSetMask, aClearMask, aTime, aSwitch);
+        }
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::RmDir(const TDesC& aDirName, TUint aSwitch)
+    {
+    CAsyncWaiterClient* waiter = CAsyncWaiterClient::NewLC();
+    iFBFileOpServerSession.RmDir( aDirName, aSwitch, waiter->iStatus );
+    waiter->StartAndWait();
+    TInt err = waiter->Result();
+    
+    if ( err == KErrServerTerminated )
+        {
+        User::LeaveIfError( iFBFileOpServerSession.Connect() );
+        iFBFileOpServerSession.RmDir( aDirName, aSwitch, waiter->iStatus );
+        waiter->StartAndWait();
+        err = waiter->Result();
+        }
+    CleanupStack::PopAndDestroy( waiter );
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::Delete(const TDesC& aName, TUint aSwitch)
+    {
+    CAsyncWaiterClient* waiter = CAsyncWaiterClient::NewLC();
+    iFBFileOpServerSession.Delete(aName, aSwitch, waiter->iStatus );
+    waiter->StartAndWait();
+    TInt err = waiter->Result();
+    
+    if ( err == KErrServerTerminated )
+        {
+        User::LeaveIfError( iFBFileOpServerSession.Connect() );
+        iFBFileOpServerSession.Delete(aName, aSwitch, waiter->iStatus );
+        waiter->StartAndWait();
+        err = waiter->Result();
+        }
+    CleanupStack::PopAndDestroy( waiter );
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::MkDirAll(const TDesC& aPath) 
+    {
+    TInt err = iFBFileOpServerSession.MkDirAll(aPath);
+    
+    if (err == KErrServerTerminated)
+        {
+        User::LeaveIfError(iFBFileOpServerSession.Connect());
+        err = iFBFileOpServerSession.MkDirAll(aPath);
+        }
+            
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::CreateEmptyFile(const TDesC& aName) 
+    {
+    TInt err = iFBFileOpServerSession.CreateEmptyFile(aName);
+    
+    if (err == KErrServerTerminated)
+        {
+        User::LeaveIfError(iFBFileOpServerSession.Connect());
+        err = iFBFileOpServerSession.CreateEmptyFile(aName);
+        }
+
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::EraseMBR(TUint aDriveNumber) 
+    {
+    TInt err = iFBFileOpServerSession.EraseMBR(aDriveNumber);
+    
+    if (err == KErrServerTerminated)
+        {
+        User::LeaveIfError(iFBFileOpServerSession.Connect());
+        err = iFBFileOpServerSession.EraseMBR(aDriveNumber);
+        }
+
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C TInt CFBFileOpClient::PartitionDrive(TUint aDriveNumber, TUint aNumberOfPartitions) 
+    {
+    TInt err = iFBFileOpServerSession.PartitionDrive(aDriveNumber, aNumberOfPartitions);
+    
+    if (err == KErrServerTerminated)
+        {
+        User::LeaveIfError(iFBFileOpServerSession.Connect());
+        err = iFBFileOpServerSession.PartitionDrive(aDriveNumber, aNumberOfPartitions);
+        }
+
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+EXPORT_C void CFBFileOpClient::CancelOp() 
+    {
+    TInt err = iFBFileOpServerSession.CancelOp();
+    
+    if ( err == KErrServerTerminated )
+        {
+        User::LeaveIfError( iFBFileOpServerSession.Connect() );
+        err = iFBFileOpServerSession.CancelOp(); // Ignore return value this time
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CAsyncWaiterClient* CAsyncWaiterClient::NewL( TInt aPriority )
+    {
+    CAsyncWaiterClient* self = new(ELeave) CAsyncWaiterClient( aPriority );
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CAsyncWaiterClient* CAsyncWaiterClient::NewLC( TInt aPriority )
+    {
+    CAsyncWaiterClient* self = new (ELeave) CAsyncWaiterClient( aPriority );
+    CleanupStack::PushL( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CAsyncWaiterClient::CAsyncWaiterClient( TInt aPriority ) : CActive( aPriority )
+    {
+    CActiveScheduler::Add( this );
+    }   
+
+// --------------------------------------------------------------------------------------------
+
+CAsyncWaiterClient::~CAsyncWaiterClient()
+    {
+    Cancel();
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+void CAsyncWaiterClient::StartAndWait()
+    {
+    SetActive();
+    iWait.Start();
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+TInt CAsyncWaiterClient::Result() const
+    {
+    return iError;
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+void CAsyncWaiterClient::RunL()
+    {
+    iError = iStatus.Int();
+    iWait.AsyncStop();
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+void CAsyncWaiterClient::DoCancel()
+    {
+    iError = KErrCancel;
+    if( iStatus == KRequestPending )
+        {
+        TRequestStatus* s = &iStatus;
+        User::RequestComplete( s, KErrCancel );
+        }
+    iWait.AsyncStop();
+    }
+
+// --------------------------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopserver/group/FBFileOpServer.mmp	Mon Oct 18 16:30:05 2010 +0300
@@ -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:  
+*
+*/
+
+
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+
+TARGET        FileBrowserFileOpServer.exe
+TARGETTYPE    exe
+UID           0 0x102828D8
+VENDORID      VID_DEFAULT
+
+CAPABILITY    CAP_FILE_SERVER
+
+SMPSAFE
+
+USERINCLUDE   ../inc
+USERINCLUDE   ../../fileopclient/inc
+OS_LAYER_SYSTEMINCLUDE
+//SYSTEMINCLUDE /epoc32/include/kernel
+SOURCEPATH    ../src
+
+
+SOURCE        FBFileOpServer.cpp
+SOURCE        FBDrivePartitioner.cpp
+
+LIBRARY       euser.lib
+LIBRARY       efsrv.lib
+LIBRARY       efile.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopserver/group/bld.inf	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+PRJ_MMPFILES
+FBFileOpServer.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopserver/inc/FBDrivePartitioner.h	Mon Oct 18 16:30:05 2010 +0300
@@ -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:  
+*
+*/
+
+
+#ifndef __FBDRIVEPARTITIONER_H__
+#define __FBDRIVEPARTITIONER_H__
+
+#include <e32base.h>
+#include <f32file.h>
+
+class FBDrivePartioner
+    {
+public:
+    static TInt FindLocalDriveNumber(RFs& aFs, TInt aDriveNumber, TInt& aLocalDriveNum);
+    static TInt EraseMBR(RFs& aFs, TInt aDriveNumber);
+    static TInt CreatePartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount);
+    static TInt FormatPartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount);    
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopserver/inc/FBFileOpServer.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 __FBFILEOPSERVER_H__
+#define __FBFILEOPSERVER_H__
+
+#include <e32base.h>
+#include <f32file.h>
+#include "FBFileOpClientServer.h"
+
+// needed for creating server thread.
+//const TUint KDefaultHeapSize=0x10000;
+
+// reasons for server panic
+enum TMyPanic
+	{
+	EPanicBadDescriptor,
+	EPanicIllegalFunction
+	};
+
+class CShutdown : public CTimer
+	{
+	enum {KMyShutdownDelay=0x200000};	// approx 2s
+
+public :
+	inline CShutdown();
+	inline void ConstructL();
+	inline void Start();
+
+private :
+	void RunL();
+	};
+
+//**********************************
+//CFBFileOpServer
+//**********************************
+/**
+Our server class - an active object - and therefore derived ultimately from CActive.
+It accepts requests from client threads and forwards
+them to the client session to be dealt with. It also handles the creation
+of the server-side client session.
+*/
+class CFBFileOpServer : public CServer2
+	{
+
+public :
+	static CServer2* NewLC();
+	void AddSession();
+	void DropSession();
+
+protected :
+
+private :
+	CFBFileOpServer();
+	void ConstructL();
+	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
+
+public :
+
+private :
+	TInt iSessionCount;
+	CShutdown iShutdown;
+	
+	};
+
+//**********************************
+//CRequestObserver
+//**********************************
+/**
+This class is for monitoring asynchronous request
+and for completing related RMessage2 object.
+*/
+class CRequestObserver : public CActive
+    {
+public:
+    CRequestObserver( TInt aPriority );
+    virtual ~CRequestObserver();
+    
+    void StartWaiting( const RMessage2& aMsg );
+    
+private:
+    // from CActive
+    void RunL();
+    void DoCancel();
+    
+private:
+    RMessage2 iMsg;
+    };
+
+
+//**********************************
+//CFBFileOpServerSession
+//**********************************
+/**
+This class represents a session with the  server.
+Functions are provided to respond appropriately to client messages.
+*/
+class CFBFileOpServerSession : public CSession2,
+                               public MFileManObserver
+	{
+
+public :
+	CFBFileOpServerSession();
+
+private: // From MFileManObserver
+    
+    TControl NotifyFileManStarted();
+    TControl NotifyFileManOperation();
+    TControl NotifyFileManEnded();
+    
+protected :
+	// panic the client
+	void PanicClient(const RMessage2& aMessage,TInt aPanic) const;
+
+private :
+	~CFBFileOpServerSession();
+	inline CFBFileOpServer& Server();
+	void CreateL();
+	
+	//service requests
+	void ServiceL(const RMessage2& aMessage);
+	void DispatchMessageL(const RMessage2& aMessage, TBool& aComplete);
+	
+	void CopyL(const RMessage2& aMessage);
+	void RenameL(const RMessage2& aMessage);
+	void AttribsL(const RMessage2& aMessage);
+	void RmDirL(const RMessage2& aMessage, TBool& aComplete);
+	void DeleteL(const RMessage2& aMessage);
+	void MkDirAllL(const RMessage2& aMessage);
+	void CreateEmptyFileL(const RMessage2& aMessage);
+	void EraseMBRL(const RMessage2& aMessage);
+	void PartitionDriveL(const RMessage2& aMessage);
+
+	void ServiceError(const RMessage2& aMessage, TInt aError);
+	
+	void CancelOp();
+					
+private :
+	RFs iFs;
+	RFile iFile;
+	CFileMan* iFileMan;
+	MFileManObserver::TControl iFileManObserverResult;
+	CRequestObserver* iReqObserver;
+	};
+
+
+//**********************************
+//Inlines
+//**********************************
+
+inline CShutdown::CShutdown()
+	:CTimer(-1)
+	{CActiveScheduler::Add(this);}
+
+inline void CShutdown::ConstructL()
+	{CTimer::ConstructL();}
+
+inline void CShutdown::Start()
+	{After(KMyShutdownDelay);}
+
+inline CFBFileOpServer::CFBFileOpServer()
+	:CServer2(0,ESharableSessions)
+	{}
+
+inline CFBFileOpServerSession::CFBFileOpServerSession()
+	{}
+
+inline CFBFileOpServer& CFBFileOpServerSession::Server()
+	{return *static_cast<CFBFileOpServer*>(const_cast<CServer2*>(CSession2::Server()));}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopserver/src/FBDrivePartitioner.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,454 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <e32test.h>
+#include <e32std.h>
+#include <f32fsys.h>
+#include <e32property.h>
+
+#include "FBDrivePartitioner.h"
+
+
+// copied from coreapplicationuisdomainpskeys.h
+const TUid KPSUidCoreApplicationUIs = { 0x101F8767 };
+const TUint32 KCoreAppUIsMmcRemovedWithoutEject = 0x00000109;
+enum TCoreAppUIsMmcRemovedWithoutEject
+    {
+    ECoreAppUIsEjectCommandUsedUninitialized = 0,
+    ECoreAppUIsEjectCommandNotUsed,
+    ECoreAppUIsEjectCommandUsed,
+    ECoreAppUIsEjectCommandUsedToDrive // Low 16-bits contain this value and high 16-bits TDriveNumber to eject
+    };
+
+
+// trace macros
+#define TRACE(a) {_LIT( KMsg, a ); RDebug::Print(KMsg);}
+#define TRACE1(a,b) {_LIT( KMsg, a ); RDebug::Print(KMsg,b);}
+#define TRACE2(a,b,c) {_LIT( KMsg, a ); RDebug::Print(KMsg,b,c);}
+
+	
+// Set the partition alignment boundary
+const TInt KPartitionAlignment = 0x1000; // 4kB
+const TInt KMBRSize = 512;
+const TInt KSectorSize = 512;
+const TInt KMBRPartitionInfoOffset = 0x1BE;
+const TInt KLargeFAT16Partition = 0x2000000; // 32MB
+const TInt KPartitionEntrySize = 16;
+
+// Set for the iX86BootIndicator
+//const TInt KPartitionBootable = 0x80;
+const TInt KPartitionNonBootable = 0x0;
+
+
+class TMBRPartition
+	{
+public:
+	TUint8 iX86BootIndicator;
+	TUint8 iStartHead;
+	TUint8 iStartSector;
+	TUint8 iStartCylinder;
+	TUint8 iPartitionType;
+	TUint8 iEndHead;
+	TUint8 iEndSector;
+	TUint8 iEndCylinder;
+	TUint32 iFirstSector;
+	TUint32 iNumSectors;
+	};
+
+
+// --------------------------------------------------------------------------------------------
+
+TInt FBDrivePartioner::FindLocalDriveNumber(RFs& aFs, TInt aDriveNumber, TInt& aLocalDriveNum)
+    {
+    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: start aDriveNumber=%d", aDriveNumber );
+
+    TInt err(KErrNone);
+    
+    TDriveInfo driveInfo;
+    err = aFs.Drive(driveInfo, aDriveNumber);
+
+    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: get DriveInfo err=%d", err );
+
+
+    TVolumeInfo vi;
+    err = aFs.Volume(vi, aDriveNumber);
+
+    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: get VolumeInfo err=%d", err );
+
+
+    TMediaSerialNumber serialNum;
+    err = aFs.GetMediaSerialNumber(serialNum, aDriveNumber);
+
+    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: get MediaSerialNumber err=%d", err );
+
+
+    TInt len = serialNum.Length();
+    TInt n(0);
+    for (n=0; n<len; n+=16)
+        {
+        TBuf16<16*3 +1> buf;
+        for (TInt m=n; m<n+16; m++)
+            {
+            TBuf16<3> hexBuf;
+            hexBuf.Format(_L("%02X "),serialNum[m]);
+            buf.Append(hexBuf);
+            }
+        buf.Append(_L("\n"));
+        }
+
+    TBusLocalDrive drv;
+    TBool chg(EFalse);
+    aLocalDriveNum = -1;
+    for (n=0; n<KMaxLocalDrives; n++)
+        {
+        TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: drv.Connect drive %d", n );
+        err = drv.Connect(n, chg); //for user area
+        TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: drv.Connect returns %d", err );
+
+        if(err != KErrNone)
+            {
+            continue;
+            }    
+
+        TLocalDriveCapsV5Buf capsBuf;
+        TLocalDriveCapsV5& caps = capsBuf();
+        err = drv.Caps(capsBuf);
+        TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: drv.Caps returns %d", err );
+
+        if(err != KErrNone)
+            {
+            continue;
+            }    
+
+        TPtrC8 localSerialNum(caps.iSerialNum, caps.iSerialNumLength);
+        if (serialNum.Compare(localSerialNum) == 0)
+            {
+            TBool sizeMatch = (vi.iSize < caps.iSize)?ETrue:EFalse;
+            if (sizeMatch)
+                {
+                aLocalDriveNum = n;
+                TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: sizeMatch for localDrive %d", n );
+                }
+            else
+                {
+                TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: sizeMatch failed for localDrive %d", n );
+                }
+
+            }
+
+        drv.Disconnect();
+        }
+
+    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: localDriveNum=%d", aLocalDriveNum );
+
+    err = aLocalDriveNum == -1 ? KErrNotFound : KErrNone;
+    
+    TRACE1( "FBDrivePartitioner::FindLocalDriveNumber: returns %d", err );
+    return err;    
+
+    }
+	
+// --------------------------------------------------------------------------------------------
+
+TInt FBDrivePartioner::EraseMBR(RFs& aFs, TInt aDriveNumber)
+	{
+    TRACE1( "FBDrivePartitioner::EraseMBR: start aDriveNumber=%d", aDriveNumber );
+
+    // Prevent SysAp shutting down applications
+    RProperty::Set(
+        KPSUidCoreApplicationUIs,
+        KCoreAppUIsMmcRemovedWithoutEject,
+        ECoreAppUIsEjectCommandUsed );
+
+	TInt err(KErrNone);
+
+	TInt localDriveNumber;
+	err = FindLocalDriveNumber(aFs, aDriveNumber, localDriveNumber);
+	
+	if (err != KErrNone)
+	    {
+    	TRACE1("FBDrivePartitioner::EraseMBR: FindLocalDriveNumber err=%d returning", err); 
+	    return err;
+	    }
+	
+	TRACE1("FBDrivePartitioner::EraseMBR: connecting to local drive %d", localDriveNumber); 
+
+	TBusLocalDrive drv;
+	TBool chg(EFalse);
+	err = drv.Connect(localDriveNumber, chg); //for user area
+
+	TRACE1("FBDrivePartitioner::EraseMBR: drv.Connect %d", err);
+
+	
+	TRACE("FBDrivePartitioner::EraseMBR: Now start to invalidate MBR"); 
+
+	// create a buffers of zeros
+	TBuf8<KMBRSize> mbrBuf;
+	mbrBuf.Fill(0, mbrBuf.MaxLength());
+
+/*	
+	// write the next 16 sectors with the buffer. Usually you only write the first one, but this one should erase any following invalid sectors
+	for (TInt i=0; i<16; i++)
+	    {
+    	err = drv.Write(i*KMBRSize, KMBRSize, &mbrBuf, -1 , 0, 0x40000000);  // RLocalDrive::ELocDrvWholeMedia==0x40000000
+       	TRACE2("FBDrivePartitioner::EraseMBR: sector %d, write returns %d", i+1, err); 
+	    }
+*/
+
+    // erase the MBR
+	err = drv.Write(0, KMBRSize, &mbrBuf, -1 , 0, 0x40000000);  // RLocalDrive::ELocDrvWholeMedia==0x40000000
+   	TRACE1("FBDrivePartitioner::EraseMBR: write returns %d", err); 
+
+	drv.Disconnect();
+
+	// force a remount, if this is the protected area, then it will have to be remounted
+    TRACE1( "FBDrivePartitioner::EraseMBR: Remounting drive number %d", aDriveNumber );
+	TInt err2 = aFs.RemountDrive(aDriveNumber, NULL, 0);
+    TRACE1( "FBDrivePartitioner::EraseMBR: RemountDrive err2=%d", err2 );
+
+    TRACE1( "FBDrivePartitioner::EraseMBR: returns %d", err );
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt FBDrivePartioner::CreatePartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount)
+	{
+    TRACE2( "FBDrivePartitioner::CreatePartitions: start aDriveNumber=%d aPartCount=%d", aDriveNumber, aPartCount );
+	TInt err(KErrNone);
+
+    TUint8 MBRPartitionInfo[ KPartitionEntrySize*KMBRMaxPrimaryPartitions ];
+
+    // Prevent SysAp shutting down applications
+    RProperty::Set(
+        KPSUidCoreApplicationUIs,
+        KCoreAppUIsMmcRemovedWithoutEject,
+        ECoreAppUIsEjectCommandUsed );
+
+	// Force the system to read the memory card erased MBR
+	err = aFs.RemountDrive( aDriveNumber );
+	TRACE1( "FBDrivePartitioner::CreatePartitions: Remount result %d", err );
+	
+	// Get the number of partitions from user
+    TUint8 partitionCount(aPartCount);
+	TBool change = EFalse;
+	TInt mcDriveNbr(2);
+	TLocalDriveCapsV4 dc;
+	TInt64 diskSpace(0);
+
+/*
+	err = FindLocalDriveNumber(aFs, aDriveNumber, mcDriveNbr);
+	
+	if (err != KErrNone)
+	    {
+    	TRACE1("FBDrivePartitioner::CreatePartitions: FindLocalDriveNumber err=%d returning", err); 
+	    return err;
+	    }
+*/
+
+	// Seek through the system drives to find memory card drive
+	for (TInt i = 0; i < KMaxLocalDrives; ++i)
+		{
+		RLocalDrive	d;
+		change = EFalse;
+		err = d.Connect(i, change);
+		if (err == KErrNone)
+			{
+			TPckg<TLocalDriveCapsV4> capsPack(dc);
+			
+			if (d.Caps(capsPack) == KErrNone)
+				{
+				if (dc.iType == EMediaHardDisk)
+					{
+					mcDriveNbr = i;
+					diskSpace  = dc.iSize;
+                 	TRACE1( "FBDrivePartitioner::CreatePartitions: found hard drive %d:", mcDriveNbr );
+					}
+				}
+			d.Close();
+			}
+		}
+
+	// Connect to the local drive we found
+	RLocalDrive	localDrive;
+	change = EFalse;
+    err = localDrive.Connect( mcDriveNbr, change );
+ 	TRACE2( "FBDrivePartitioner::CreatePartitions: localDrive.Connect %d: %d", mcDriveNbr, err );
+	TRACE1( "FBDrivePartitioner::CreatePartitions: diskSpace in sectors 0x%x, %d", diskSpace / KSectorSize );
+
+	// Let's read the MBR by using RLocalDrive
+	TUint8 data[KMBRSize];
+	TPtr8 buf( &data[0], KMBRSize );
+	err = localDrive.Read( 0, KMBRSize, buf );
+	TRACE1( "FBDrivePartitioner::CreatePartitions: localDrive.Read %d", err );
+	// Let's check the current drive layout here
+	memcpy( MBRPartitionInfo, &data[KMBRPartitionInfoOffset],(sizeof(TMBRPartition)<<2)); 
+	TMBRPartition *partitionInfo = (TMBRPartition*) MBRPartitionInfo;
+
+	// Clean the rest of the MBR buffer
+	buf.FillZ();
+
+	// Print out the partition info
+	for( TInt i = 0; i<KMBRMaxPrimaryPartitions; i++ )
+		{
+		TRACE1( "FBDrivePartitioner::CreatePartitions: Partition %d", i+1 );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iX86BootIndicator %x", partitionInfo[i].iX86BootIndicator );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartHead        %x", partitionInfo[i].iStartHead );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartSector      %x", partitionInfo[i].iStartSector );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartCylinder    %x", partitionInfo[i].iStartCylinder );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iPartitionType    %x", partitionInfo[i].iPartitionType );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndHead          %x", partitionInfo[i].iEndHead );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndSector        %x", partitionInfo[i].iEndSector );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndCylinder      %x", partitionInfo[i].iEndCylinder );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iFirstSector      %x", partitionInfo[i].iFirstSector );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iNumSectors       %x", partitionInfo[i].iNumSectors );
+		}
+
+	// Calculate partition size	
+	TRACE( "FBDrivePartitioner::CreatePartitions: Calculating partition size" );
+	TInt64 partitionSize = (diskSpace / partitionCount) - KPartitionAlignment;
+	//TRACE1( "FBDrivePartitioner::CreatePartitions: PartitionSize in sectors 0x%x", partitionSize/KSectorSize );
+	TRACE1( "FBDrivePartitioner::CreatePartitions: Size of the partition is %Ld bytes", partitionSize );
+
+	// Activate the specified amount of partitions 
+	for( TInt i = 0; i < KMBRMaxPrimaryPartitions; i++ )
+		{
+		if( i < partitionCount )
+			{
+			if( partitionSize <= KLargeFAT16Partition )
+				{
+				partitionInfo[i].iPartitionType = KPartitionTypeFAT16small;
+				}
+			else
+				{
+				partitionInfo[i].iPartitionType = KPartitionTypeFAT16;
+				}
+			partitionInfo[i].iX86BootIndicator = KPartitionNonBootable;
+			}
+		else
+			{
+			partitionInfo[i].iX86BootIndicator = 0;
+			partitionInfo[i].iPartitionType = 0;
+			}
+		}
+
+	TRACE( "FBDrivePartitioner::CreatePartitions: Set first partition start address and change to sector addresses" );
+
+	// Set first partition start address
+	TInt64 offSet = KPartitionAlignment;
+	// Change to sector addresses
+	offSet = offSet / KSectorSize;
+
+	// Align and set the partitions
+	for( TInt i = 0; i < KMBRMaxPrimaryPartitions; i++ )
+		{
+		if( i < partitionCount )
+			{
+			// Start sector
+			partitionInfo[i].iFirstSector = offSet;
+			// Number of sectors in a partition
+			partitionInfo[i].iNumSectors = partitionSize / KSectorSize;
+			// Start of the next partition
+			offSet += ((partitionSize &~ (KPartitionAlignment - 1)) / KSectorSize);
+			}
+		else
+			{
+			partitionInfo[i].iFirstSector = 0;
+			partitionInfo[i].iNumSectors = 0;
+			}
+		// Start address HDD
+		partitionInfo[i].iStartHead = 0;
+		partitionInfo[i].iStartSector = 0;
+		partitionInfo[i].iStartCylinder = 0;
+		// End address HDD
+		partitionInfo[i].iEndHead = 0;
+		partitionInfo[i].iEndSector = 0;
+		partitionInfo[i].iEndCylinder = 0;
+
+		}
+
+	// Print out the new partition boot record
+ 	TRACE( "FBDrivePartitioner::CreatePartitions: Partitions created" );
+	for( TInt i = 0; i<KMBRMaxPrimaryPartitions; i++ )
+		{
+		TRACE1("FBDrivePartitioner::CreatePartitions: Partition %d", i+1 );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iX86BootIndicator %x", partitionInfo[i].iX86BootIndicator );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartHead        %x", partitionInfo[i].iStartHead );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartSector      %x", partitionInfo[i].iStartSector );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iStartCylinder    %x", partitionInfo[i].iStartCylinder );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iPartitionType    %x", partitionInfo[i].iPartitionType );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndHead          %x", partitionInfo[i].iEndHead );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndSector        %x", partitionInfo[i].iEndSector );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iEndCylinder      %x", partitionInfo[i].iEndCylinder );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iFirstSector      %x", partitionInfo[i].iFirstSector );
+		TRACE1( "FBDrivePartitioner::CreatePartitions: iNumSectors       %x", partitionInfo[i].iNumSectors );
+		}
+
+	// Copy the new layout to MBR buffer
+ 	TRACE( "FBDrivePartitioner::CreatePartitions: Copy the new layout to MBR buffer" );
+	memcpy( &data[KMBRPartitionInfoOffset], MBRPartitionInfo, (sizeof(TMBRPartition)<<2) ); 
+
+	// Make sure we have a valid signature
+ 	TRACE( "FBDrivePartitioner::CreatePartitions: Make sure we have a valid signature" );
+	*(TUint16*)(&data[KMBRSignatureOffset]) = 0xAA55;
+
+	// Now flush the new partition layout
+ 	TRACE( "FBDrivePartitioner::CreatePartitions: Flush the new partition layout" );
+	err = localDrive.Write( 0, buf );
+	TRACE1( "FBDrivePartitioner::CreatePartitions: localDrive.Write err=%d", err );
+	localDrive.Close();
+
+    TRACE1( "FBDrivePartitioner::CreatePartitions: returns %d", err );
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt FBDrivePartioner::FormatPartitions(RFs& aFs, TInt aDriveNumber, TInt aPartCount)
+	{
+    TRACE2( "FBDrivePartitioner::FormatPartitions: aDriveNumber=%d aPartCount=%d", aDriveNumber, aPartCount );
+    TInt err(KErrNone);
+
+    for( TInt i = 0; i < aPartCount; i++ )
+        {
+        TDriveName name(TDriveUnit(aDriveNumber + i).Name());
+        TRACE1( "FBDrivePartitioner::FormatPartitions: Format %S start", &name );
+        RFormat fmt;
+        TInt count(0);
+        err = fmt.Open(aFs, name, EQuickFormat, count);
+        TRACE1( "FBDrivePartitioner::FormatPartitions: Format open=%d", err );
+        while (count > 0)
+            {
+            err = fmt.Next(count);
+            if (err != KErrNone)
+                {
+                TRACE1( "FBDrivePartitioner::FormatPartitions: Format error=%d", err );
+                break;
+                }
+            }
+        fmt.Close();
+        TRACE1( "FBDrivePartitioner::FormatPartitions: Format %S end", &name );
+	    }
+
+    TRACE1("FBDrivePartitioner::FormatPartitions returns %d", err);
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/fileopserver/src/FBFileOpServer.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,474 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 "FBFileOpServer.h"
+#include "FBDrivePartitioner.h"
+
+#include <e32svr.h>
+#include <bautils.h>
+
+// --------------------------------------------------------------------------------------------
+
+//***********************************
+//CFBFileOpServer - implementations
+//***********************************
+
+CServer2* CFBFileOpServer::NewLC()
+	{
+	CFBFileOpServer* self = new(ELeave) CFBFileOpServer;
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//
+// 2nd phase construction - ensure the timer and server objects are running
+//
+void CFBFileOpServer::ConstructL()
+	{
+	StartL(KMyServerName);
+	iShutdown.ConstructL();
+	// ensure that the server still exits even if the 1st client fails to connect
+	iShutdown.Start();
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//
+// Cretae a new client session. This should really check the version number.
+//
+CSession2* CFBFileOpServer::NewSessionL(const TVersion&,const RMessage2&) const
+	{
+	return new(ELeave) CFBFileOpServerSession();
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//
+// A new session is being created
+// Cancel the shutdown timer if it was running
+//
+void CFBFileOpServer::AddSession()
+	{
+	++iSessionCount;
+	iShutdown.Cancel();
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//
+// A session is being destroyed
+// Start the shutdown timer if it is the last session.
+//
+void CFBFileOpServer::DropSession()
+	{
+	if (--iSessionCount==0)
+		iShutdown.Start();
+	}
+
+// --------------------------------------------------------------------------------------------
+    
+CRequestObserver::CRequestObserver( TInt aPriority ) : CActive( aPriority )
+    {
+    CActiveScheduler::Add( this );
+    }   
+
+CRequestObserver::~CRequestObserver()
+    {
+    Cancel();
+    }
+    
+void CRequestObserver::StartWaiting( const RMessage2& aMsg )
+    {
+    iMsg = aMsg;
+    SetActive();
+    }
+    
+void CRequestObserver::RunL()
+    {
+    iMsg.Complete( iStatus.Int() );
+    }
+    
+void CRequestObserver::DoCancel()
+    {
+    iMsg.Complete( KErrCancel );
+    }
+
+// --------------------------------------------------------------------------------------------
+
+//***********************************
+//CFBFileOpServerSession - implementations
+//***********************************
+
+//
+// 2nd phase construct for sessions - called by the CServer framework
+//
+void CFBFileOpServerSession::CreateL()
+	{
+	User::LeaveIfError(iFs.Connect());
+	iFileMan = CFileMan::NewL( iFs, this );
+	iReqObserver = new (ELeave) CRequestObserver( CActive::EPriorityStandard );
+	Server().AddSession();
+	}
+
+// --------------------------------------------------------------------------------------------
+
+CFBFileOpServerSession::~CFBFileOpServerSession()
+	{
+	if (iFileMan)
+		{
+		delete iFileMan;
+		iFileMan = NULL;
+		}
+	iFs.Close();
+	delete iReqObserver;
+	Server().DropSession();
+	}
+
+// --------------------------------------------------------------------------------------------
+	
+/**
+Services a client request.
+*/
+void CFBFileOpServerSession::ServiceL(const RMessage2& aMessage)
+	{
+	TBool completeImmediately( ETrue );
+	TRAPD( err,DispatchMessageL( aMessage, completeImmediately ) );
+	if ( completeImmediately ) aMessage.Complete( err );
+	}
+
+// --------------------------------------------------------------------------------------------
+
+/**
+Called by ServiceL()
+
+It tests the function code and then delegates to
+the appropriate function.
+*/
+void CFBFileOpServerSession::DispatchMessageL(const RMessage2& aMessage, TBool& aComplete)
+	{
+	switch (aMessage.Function())
+        {
+        case EFileOpCopy:
+            CopyL(aMessage);
+            aComplete = EFalse;
+            return;
+
+        case EFileOpRename:
+            RenameL(aMessage);
+            return;            
+
+        case EFileOpAttribs:
+            AttribsL(aMessage);
+            return; 
+
+        case EFileOpRmDir:
+            RmDirL(aMessage, aComplete);
+            return; 
+
+        case EFileOpDelete:
+            DeleteL(aMessage);
+            aComplete = EFalse;
+            return; 
+
+        case EFileOpMkDirAll:
+            MkDirAllL(aMessage);
+            return;             
+
+        case EFileOpCreateEmptyFile:
+            CreateEmptyFileL(aMessage);
+            return;            
+
+        case EFileOpEraseMBR:
+            EraseMBRL(aMessage);
+            return;
+            
+        case EFileOpPartitionDrive:
+            PartitionDriveL(aMessage);
+            return;
+            
+        case EFileOpCancel: 
+            CancelOp();
+            return; 
+            
+        default:
+            PanicClient(aMessage, EPanicIllegalFunction);
+            return;
+        }
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::CopyL( const RMessage2& aMessage )
+    {
+    __ASSERT_ALWAYS( iReqObserver && !iReqObserver->IsActive(), User::Leave( KErrServerBusy ) );
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL( 0, pckgBuf, 0 );
+    TFileOpArgs argsStruct = pckgBuf();
+
+    TInt err = iFileMan->Copy( argsStruct.iBuf1, argsStruct.iBuf2, argsStruct.iUint1, iReqObserver->iStatus );
+    User::LeaveIfError( err );
+    iFileManObserverResult = MFileManObserver::EContinue;
+    iReqObserver->StartWaiting( aMessage ); // start asynchronous waiting
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::RenameL(const RMessage2& aMessage)
+    {
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL(0, pckgBuf, 0);
+    TFileOpArgs argsStruct = pckgBuf();
+    
+    iFileManObserverResult = MFileManObserver::EContinue;
+    User::LeaveIfError(iFileMan->Rename(argsStruct.iBuf1, argsStruct.iBuf2, argsStruct.iUint1));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::AttribsL(const RMessage2& aMessage)
+    {
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL(0, pckgBuf, 0);
+    TFileOpArgs argsStruct = pckgBuf();
+    
+    iFileManObserverResult = MFileManObserver::EContinue;
+    User::LeaveIfError(iFileMan->Attribs(argsStruct.iBuf1, argsStruct.iUint1, argsStruct.iUint2, argsStruct.iTime1, argsStruct.iUint3));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::RmDirL( const RMessage2& aMessage, TBool& aComplete )
+    {
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL( 0, pckgBuf, 0 );
+    TFileOpArgs argsStruct = pckgBuf();
+    
+    if ( argsStruct.iUint1 & CFileMan::ERecurse )
+        {
+        __ASSERT_ALWAYS( iReqObserver && !iReqObserver->IsActive(), User::Leave( KErrServerBusy ) );
+        User::LeaveIfError( iFileMan->RmDir( argsStruct.iBuf1, iReqObserver->iStatus ) );
+        iFileManObserverResult = MFileManObserver::EContinue;
+        aComplete = EFalse;
+        iReqObserver->StartWaiting( aMessage ); // start asynchronous waiting
+        }
+    else
+        {
+        iFileManObserverResult = MFileManObserver::EContinue;
+        User::LeaveIfError( iFs.RmDir( argsStruct.iBuf1 ) );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::DeleteL( const RMessage2& aMessage )
+    {
+    __ASSERT_ALWAYS( iReqObserver && !iReqObserver->IsActive(), User::Leave( KErrServerBusy ) );
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL( 0, pckgBuf, 0 );
+    TFileOpArgs argsStruct = pckgBuf();
+    
+    User::LeaveIfError( iFileMan->Delete(argsStruct.iBuf1, argsStruct.iUint1, iReqObserver->iStatus ) ); 
+    iFileManObserverResult = MFileManObserver::EContinue;
+    iReqObserver->StartWaiting( aMessage ); // start asynchronous waiting
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::MkDirAllL(const RMessage2& aMessage)
+    {
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL(0, pckgBuf, 0);
+    TFileOpArgs argsStruct = pckgBuf();
+    
+    User::LeaveIfError(iFs.MkDirAll(argsStruct.iBuf1));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::CreateEmptyFileL(const RMessage2& aMessage)
+    {
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL(0, pckgBuf, 0);
+    TFileOpArgs argsStruct = pckgBuf();
+    
+    TInt err(KErrNone);
+    RFile newFile;
+    err = newFile.Create(iFs, argsStruct.iBuf1, EFileShareExclusive);
+    if (err == KErrNone)
+        err = newFile.Flush(); 
+    newFile.Close(); 
+    
+    User::LeaveIfError(err);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::EraseMBRL(const RMessage2& aMessage)
+    {
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL(0, pckgBuf, 0);
+    TFileOpArgs argsStruct = pckgBuf();
+
+	RFs fs;
+	CleanupClosePushL(fs);
+	User::LeaveIfError(fs.Connect());
+
+    User::LeaveIfError(FBDrivePartioner::EraseMBR(fs, argsStruct.iUint1));
+
+    CleanupStack::PopAndDestroy(); //fs
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::PartitionDriveL(const RMessage2& aMessage)
+    {
+    TPckgBuf<TFileOpArgs> pckgBuf;
+    aMessage.ReadL(0, pckgBuf, 0);
+    TFileOpArgs argsStruct = pckgBuf();
+
+	RFs fs;
+	CleanupClosePushL(fs);
+	User::LeaveIfError(fs.Connect());
+
+    FBDrivePartioner::CreatePartitions(fs, argsStruct.iUint1, argsStruct.iUint2);
+    User::LeaveIfError(FBDrivePartioner::FormatPartitions(fs, argsStruct.iUint1, argsStruct.iUint2));
+
+    CleanupStack::PopAndDestroy(); //fs
+    }
+               
+// --------------------------------------------------------------------------------------------
+
+//
+// Panics the client
+//
+void CFBFileOpServerSession::PanicClient(const RMessage2& aMessage, TInt aPanic) const
+	{
+	_LIT(KTxtServer,"FBFileOpServer");
+	aMessage.Panic(KTxtServer, aPanic);
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//
+// Handle an error from CFBFileOpServerSession::ServiceL()
+// A bad descriptor error implies a badly programmed client, so panic it;
+// otherwise use the default handling (report the error to the client)
+//
+void CFBFileOpServerSession::ServiceError(const RMessage2& aMessage, TInt aError)
+	{
+	if (aError==KErrBadDescriptor)
+		PanicClient(aMessage,EPanicBadDescriptor);
+	CSession2::ServiceError(aMessage,aError);
+	}
+
+// --------------------------------------------------------------------------------------------
+
+MFileManObserver::TControl CFBFileOpServerSession::NotifyFileManStarted()
+    {
+    return iFileManObserverResult;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+MFileManObserver::TControl CFBFileOpServerSession::NotifyFileManOperation()
+    {
+    return iFileManObserverResult;
+    }
+// --------------------------------------------------------------------------------------------
+
+MFileManObserver::TControl CFBFileOpServerSession::NotifyFileManEnded()
+    {
+    return iFileManObserverResult;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CFBFileOpServerSession::CancelOp()
+    {
+    iFileManObserverResult = MFileManObserver::ECancel;
+    iReqObserver->Cancel();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+//**********************************
+//Global functions
+//**********************************
+
+//
+// Initiate server exit when the timer expires
+//
+void CShutdown::RunL()
+	{
+	CActiveScheduler::Stop();
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//
+// Perform all server initialisation, in particular creation of the
+// scheduler and server and then run the scheduler
+//
+static void RunServerL()
+	{
+	// naming the server thread after the server helps to debug panics
+	User::LeaveIfError(RThread::RenameMe(KMyServerName));
+	//
+	// create and install the active scheduler we need
+	CActiveScheduler* s=new(ELeave) CActiveScheduler;
+	CleanupStack::PushL(s);
+	CActiveScheduler::Install(s);
+	//
+	// create the server (leave it on the cleanup stack)
+	CFBFileOpServer::NewLC();
+	//
+	// Initialisation complete, now signal the client
+	RProcess::Rendezvous(KErrNone);
+	//
+	// Ready to run
+	CActiveScheduler::Start();
+	//
+	// Cleanup the server and scheduler
+	CleanupStack::PopAndDestroy(2);
+	}
+
+// --------------------------------------------------------------------------------------------
+
+//
+// Server process entry-point
+//
+TInt E32Main()
+	{
+	__UHEAP_MARK;
+	//
+	CTrapCleanup* cleanup=CTrapCleanup::New();
+	TInt r=KErrNoMemory;
+	if (cleanup)
+		{
+		TRAP(r,RunServerL());
+		delete cleanup;
+		}
+	//
+	__UHEAP_MARKEND;
+	return r;
+	}
+
+// --------------------------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/group/ReleaseNotes_FileBrowser.txt	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,278 @@
+===============================================================================
+
+RELEASE NOTES - FILEBROWSER v5.3.0
+RELEASED 24th September 2010
+
+SUPPORTS S60 3.0+
+
+===============================================================================
+
+Product Description:
+====================
+The FileBrowser tool can be used to browse directory hierarchies and perform 
+file operations under the S60 environment. It also contains some smaller tools 
+and functionalities that help RnD development and verification.
+
+Main Features:
+==============
+- Showing a drive list
+- Browsing through directory hierarchies
+- Disk admin tools for generic disk operations
+- Searching files with different parameters
+- Full clipboard functionality
+- Copying/moving files with the help of a separate dialog
+- Creating new files and directories
+- Showing properties of files, directories and disks
+- Sending, deleting, renaming, touching, setting attributes,
+  compressing and uncompressing of files
+- Recursive directory support
+- Sorting and ordering file view
+- Filtering entries with a search field
+- Text and hex viewer for files
+- A settings screen for altering different kind of settings
+- Data type viewer/editor
+- Ability to give TCB capability for file operations
+- Showing message attachments from Symbian messaging store
+- Touch UI toolbar (S60 5.x only)
+
+===============================================================================
+
+What's New in v5.3.0
+====================
+- Destination folder selection dialog updates
+- Property dialog improved
+- Toolbar placed to right in landscape
+- New toobak button icons
+
+===============================================================================
+
+Installation Notes:
+===================
+FileBrowser is typically preinstalled on ROM. If not, it can be added to the
+ROM with the .iby file. Alternatively, the .sis file can be found under the sis-
+directory, but the user need to sign it with their own developer certificate.
+In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
+internal\sis directory.
+
+FileBrowser is provided as full and lite version. Lite version is aimed for
+those who cannot sign with TCB capability. Lite version can be generated by
+defining FILEBROWSER_LITE flag and then by recompiling the application and
+regenerating the sis file.
+
+When signing with own developer certificate, the following capabilities are
+needed in the lite version:
+  ReadDeviceData
+  WriteDeviceData
+  DiskAdmin
+  AllFiles
+  SwEvent
+  NetworkServices
+  LocalServices
+  ReadUserData
+  WriteUserData
+  Location
+  UserEnvironment
+  
+The full version requires these addtional capabilities:
+  CommDD
+  PowerMgmt
+  MultimediaDD
+  DRM
+  TrustedUI
+  ProtServ
+  NetworkControl
+  SurroundingsDD
+  TCB
+
+When builing FileBrowser against S60 3.0 or 3.1, you may need to patch your SDK
+environment first with some fixes. For more information, please refer to the
+instructions under the "envpatcher" directory.  
+
+===============================================================================
+
+System Requirements:
+====================
+Basic Requirements:
+- Any S60 3.x device or emulator environment
+
+===============================================================================
+
+Compatibility Issues:
+=====================
+N/A
+
+===============================================================================
+
+Known Issues:
+=============
+N/A
+
+===============================================================================
+
+Version History:
+================
+
+Version 5.2.0 - 27th August 2010
+====================
+- Error fixes
+- Destination folder selection dialog
+
+Version 5.1.1 - 26th June 2010
+====================
+- Error fixes
+- File attributes
+
+Version 5.1.0  - 18th June 2010
+====================
+- Error fixes
+- File filtering
+- Usability improvements
+
+Version 5.0.1 - 21th May 2010
+====================
+- Error fixes
+- All files to text file with file sizes
+- Usability improvements
+
+Version 5.0.0 - 23th April 2010
+-----------------------------
+- Orbit UI
+
+Version 4.5.2 - 10th December 2009
+-----------------------------
+- Fix: UI layout problems fixed
+- Fix: Filebrowser crashes with too long filenames
+
+Version 4.5.1 - 15th May 2009
+-----------------------------
+- Fix: Refreshing display does not work well when starting FileBrowser
+- Fix: Internal Mass storage drive is displayed as Memory Card
+
+Version 4.5.0 - 13th February 2009 
+----------------------------------
+- Feature: Touch UI toolbar introduced with Navigate Up, Filter and Select
+  functionalities (S60 5.x only)
+- Fix: Date and directory attributes don't work correctly with search
+
+Version 4.4.0 - 12th December 2008 
+----------------------------------
+- Feature: "Remember last folder": File list view now remembers which folder
+  had the last focus before navigating deeper in a directory, and selects that
+  folder instead of the root of the directory when navigating back upwards.
+- Fix: Execution of long file operations may cause WSERV 11 panic
+- Fix: Allow formatting even if files are in use
+
+Version 4.3.3 - 8th August 2008 
+-------------------------------
+- Fix: Calculation of partition size with 64-bit values caused unwanted side
+  effects
+  
+Version 4.3.2 - 5th May 2008
+------------------------------
+- Fix: Size of drive partitions should be calculated with 64-bit values
+
+Version 4.3.1 - 7th March 2008
+------------------------------
+- Fix: Crash when search field was active and changing file view mode 
+
+Version 4.3.0 - 28th January 2008
+---------------------------------
+- Feature: Extended file view now displays also the directory/file time
+- Feature: Text file viewer/editor supports also in UTF-8, UTF-16 little endian
+  and UTF-16 big endian formats
+- Change: Opening with apparc is not anymore a default opening action but now
+  a list of another common actions appears
+- Change: Font size in file list view has been adjusted to suit better in
+  currently used resolution
+- Change: In first time start, extended view is activated in QHD resolution     
+- Change: Font size in file viewer and editor is now smaller so that more text
+  fits to the screen
+- Change: Settings are now saved in dictionary store instead of cenreps  
+- Fix: Copy/move to folder functionality was broken
+- Fix: Scroll bar did not work properly in text viewer when used via touch UI
+- Fix: Last line of hex viewer was not warpped correctly 
+- Fix: Menu bars of file viewer and editor did not work properly
+- Fix: Search should not return directories when searching a string
+- Fix: Hash key selection should not be active in qwerty mode  
+
+Version 4.2.0 - 14th January 2008
+---------------------------------
+- Feature: User mapped remote drives are visible in drive list view as normal
+  drive when setting is turned on
+- Feature: Files can be edited in both text and hex modes
+- Feature: Show checksums (message digests) on different algorithms for a file
+- Feature: Error strings are now displayed for various operations instead of
+  generic error messages
+- Feature: Disk can be ejected and dismounted via disk admin
+- Change: Increased maximum heap usage to 32Mb to allow loading large files to
+  file editor    
+- Fix: Trying to create a directory which already exists did not return an
+  error
+- Fix: In the file list view active item not visible when deleting last item in
+  the view
+- Fix: Some file specific commands were visibile in menus also for directory
+  entries  
+- Fix: Utilizing secure backup leaked memory 
+
+Version 4.1.0 - 17th December 2007
+----------------------------------
+- Feature: File operations are now started asynchronously with own recursion
+  handler which allows removing file locks and any protection attributes
+- Feature: Status of each file operation can be monitored via RDebug 
+- Feature: Remove file locks via Secure Backup
+- Feature: File operation functionality can be customized via the settings
+  dialog
+- Feature: Multidrive support with erasing MBR and drive partition for drives
+  which support it
+- Change: Remove screen capture support since the same functionality can be
+  done with the ScreenGrabber tool
+- Fix: Forms were incorrectly constructed in search dialog and attribute editor
+
+Version 4.0.7 - 16th November 2007
+--------------------------------
+- Feature: In the list view, left/right arrow keys can be simulated with drag to
+  left/right gestures
+- Fix: Touch click in the listbox view
+- Fix: Scroll bar in the hex/text viewer can be scrolled on a touch UI
+
+Version 4.0.6 - 9th October 2007
+--------------------------------
+- Feature: Data type editor
+- Fix: Layout in hex/text viewer in mirrored mode
+  
+Version 4.0.5 - 27th August 2007
+--------------------------------
+- Fix: Wrong functionality while moving a folder
+- Change: Handle backup session while formatting a drive
+
+Version 4.0.4 - 23th May 2007
+-----------------------------
+- Feature: Modify debug mask
+- Feature: Simulate Symbian OS error types
+- Feature: Enable/disable icon server cache
+
+Version 4.0.3 - 28th February 2007
+----------------------------------
+- Feature: Drive snapshot functionality under the main drive selection list
+
+Version 4.0.2 - 31st January 2007
+---------------------------------
+- Feature: Dump message store walk into a text file
+- Change: Enhance hex/text viewer
+- Fix: Enhance folder browsing speed in Z-drive
+
+Version 4.0.1 - 17th January 2007
+---------------------------------
+- Fix: Opening of search field
+- Fix: Enabling extended errors if c:\resource directory does not already
+  exist
+
+===============================================================================
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+This component and the accompanying materials are made available
+under the terms of "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/group/backup_registration.xml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <passive_backup>
+    <include_directory name="\"/>
+  </passive_backup>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/group/bld_generic.inf	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+#ifndef FILEBROWSER_LITE
+  #include "../fileopserver/group/bld.inf"
+  #include "../fileopclient/group/bld.inf"
+#endif
+
+PRJ_EXPORTS
+../group/backup_registration.xml    Z:/private/102828D6/backup_registration.xml
+../rom/filebrowser.iby CORE_IBY_EXPORT_PATH(tools,filebrowser.iby)
+
+
+PRJ_MMPFILES
+#if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__S60_32__)
+
+  #ifdef MARM
+  gnumakefile filebrowser_stub_sis.mk
+  #endif
+#endif
+
+#if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)
+  PRJ_EXTENSIONS
+
+  #ifdef MARM
+  START EXTENSION app-services/buildstubsis
+  OPTION SRCDIR ../sis
+  OPTION SISNAME FileBrowser_stub
+  END
+  #endif  
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/group/filebrowser_stub_sis.mk	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,56 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:  
+#
+
+
+TARGETDIR=$(EPOCROOT)EPOC32\Data\Z\System\Install
+
+SISNAME=FileBrowser_stub
+PKGNAME=FileBrowser_stub
+
+$(TARGETDIR) :
+	@perl -S emkdir.pl "$(TARGETDIR)"
+
+do_nothing :
+	rem do_nothing
+
+SISFILE=$(TARGETDIR)\$(SISNAME).sis
+
+$(SISFILE) : ..\sis\$(PKGNAME).pkg
+	makesis -s $? $@ 
+
+
+
+MAKMAKE : do_nothing
+
+RESOURCE : do_nothing
+
+SAVESPACE : do_nothing
+
+BLD : do_nothing
+
+FREEZE : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+FINAL : $(TARGETDIR) $(SISFILE)
+
+CLEAN : 
+	@if exist $(SISFILE) erase $(SISFILE)
+
+RELEASABLES : 
+	@echo $(SISFILE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/group/group.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,19 @@
+#
+# 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_platforms += "$${LITERAL_HASH}include \"bld_generic.inf\""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/icons/qgn_menu_filebrowser.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   baseProfile="tiny"
+   height="100%"
+   preserveAspectRatio="xMidYMid meet"
+   version="1.0"
+   viewBox="0 0 87.9995117 88.0004883"
+   width="100%"
+   zoomAndPan="magnify"
+   id="svg76799"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   sodipodi:docname="qgn_menu_filebrowser.svg"
+   sodipodi:docbase="Z:\">
+  <metadata
+     id="metadata76883">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs76881">
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_4_"
+       id="linearGradient76934"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.105,-0.4005,0.3754,-9.84e-2,-314.9889,-11.936)"
+       x1="-316.0620117"
+       y1="809.9614258"
+       x2="-323.5102844"
+       y2="840.2769165" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#XMLID_4_"
+       id="linearGradient76936"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.105,-0.4005,0.3754,-9.84e-2,-314.9889,-11.936)"
+       x1="-316.0620117"
+       y1="809.9614258"
+       x2="-323.5102844"
+       y2="840.2769165" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-height="820"
+     inkscape:window-width="952"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="10.0"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="4.2840671"
+     inkscape:cx="43.999756"
+     inkscape:cy="62.674088"
+     inkscape:window-x="66"
+     inkscape:window-y="87"
+     inkscape:current-layer="svg76799" />
+  <g
+     id="g76801"
+     transform="matrix(0.875332,0,0,0.875332,0.2333,0.23342)">
+    <g
+       id="g76803">
+      <rect
+         height="88.000488"
+         width="87.999512"
+         id="rect76805"
+         x="0"
+         y="0"
+         style="fill:none" />
+      <path
+         d="M 39.916016,17.900391 C 39.919434,17.900391 39.92334,17.900391 39.927246,17.900391 C 39.885742,17.900391 39.873047,17.902832 31.596191,19.527832 C 31.416992,19.476074 26.807617,18.142578 26.807617,18.142578 C 26.736816,18.128906 26.474609,18.099121 26.474609,18.099121 L 21.785645,18.360352 C 21.785645,18.360352 21.786621,18.360352 21.786621,18.36084 C 21.786621,18.369629 21.067871,18.680664 21.067871,18.680664 C 20.967774,18.724121 20.907227,18.80127 20.869629,18.903809 L 20.679199,19.42041 C 20.674317,19.433594 20.675293,19.444824 20.671875,19.456543 C 19.964844,19.278809 18.22168,18.841309 18.22168,18.841309 C 17.789551,18.730469 17.334961,18.868652 17.03711,19.200684 C 17.004883,19.236816 16.972656,19.297363 16.955078,19.342285 L 16.756348,19.858399 C 16.738281,19.905274 16.729004,19.955078 16.729004,20.004883 C 16.729004,20.026367 16.730957,20.047852 16.734375,20.068848 L 16.776367,20.324707 C 16.787109,20.368652 17.119141,21.356934 17.320801,21.956055 C 16.562012,22.062988 13.388672,22.510254 13.388672,22.510254 C 12.800293,22.592285 12.355957,23.102539 12.355957,23.697754 C 12.356445,23.719238 12.67627,28.669434 12.778809,30.25586 C 12.211426,30.143067 11.284668,29.958985 11.284668,29.958985 C 11.206543,29.951172 10.875,29.95459 10.875,29.95459 L 6.378418,30.950684 C 5.8271485,31.072266 5.440918,31.553711 5.440918,32.121094 C 5.440918,32.149902 5.440918,32.149902 6.6865235,55.366699 C 6.7143555,55.878418 7.0634766,56.315918 7.5556641,56.456543 C 7.5576172,56.45752 12.411621,57.834473 13.638184,58.184082 C 13.654785,58.691895 13.769043,62.250489 13.769043,62.250489 C 13.785156,62.762207 14.125,63.20752 14.614746,63.358887 L 53.833496,75.559082 C 53.884277,75.574707 53.937012,75.580567 53.988769,75.57666 L 54.601074,75.52002 C 54.653809,75.51416 54.70459,75.499512 54.751465,75.475098 L 76.42334,63.968262 C 76.804199,63.765137 77.04834,63.371582 77.060059,62.940918 L 78.158691,24.119629 C 78.17627,23.507324 77.729981,22.980957 77.121582,22.896973 L 40.238281,17.896484 C 40.18457,17.893066 39.916016,17.900391 39.916016,17.900391 z "
+         id="path76807"
+         style="fill:#7c6800;fill-opacity:0.25;stroke-opacity:0.25" />
+      <polygon
+         points="14.077148,31.736816 13.555664,23.698242 18.919922,22.943359 17.928711,20.003906 22.00293,21.028809 21.854492,19.558594 26.473633,19.29541 31.541992,20.761231 40.077148,19.085938 76.958496,24.085938 75.86084,62.908691 54.188965,74.414551 14.96875,62.212402 14.80957,57.268066 7.8847656,55.302246 6.640625,32.121094 11.050781,31.136231 14.077148,31.736816 "
+         id="polygon76809"
+         style="fill:white" />
+      <polygon
+         points="53.817871,71.10791 73.304199,61.252441 74.040527,25.139648 52.780762,30.843262 53.817871,71.10791 "
+         id="polygon76811"
+         style="fill:#06f" />
+      <polygon
+         points="53.817871,71.10791 53.083496,30.885254 15.444336,24.263672 16.897461,60.968262 53.817871,71.10791 "
+         id="polygon76813"
+         style="fill:#09f" />
+      <polygon
+         points="74.040527,25.139648 38.993164,20.189453 15.444336,24.263672 53.083496,30.885254 74.040527,25.139648 "
+         id="polygon76815"
+         style="fill:#0cf" />
+      <polygon
+         points="19.116211,28.543945 19.602539,52.943848 48.778809,60.572754 48.942871,34.204102 19.116211,28.543945 "
+         id="polygon76817"
+         style="fill:#070791" />
+      <polygon
+         points="29.621094,31.085938 19.97168,34.612305 28.161133,36.790039 29.621094,31.085938 "
+         id="polygon76819"
+         style="fill:#0046b7" />
+      <polyline
+         points="19.6669922,34.8325195 31.8251953,30.7675781 29.9619141,30.3671875       17.9521484,34.1640625 "
+         id="polyline76821"
+         style="fill:#b3ddff" />
+      <polygon
+         points="23.104492,38.689453 22.814453,20 46.210449,26.876953 45.011719,46.129394 43.783203,47.189941 23.104492,38.689453 "
+         id="polygon76823"
+         style="fill:white" />
+      <polygon
+         points="22.835938,20.076172 45.976074,26.93457 49.001465,26.404297 26.605469,20.072266 22.835938,20.076172 "
+         id="polygon76825"
+         style="fill:#ffc400" />
+      <polygon
+         points="45.976074,26.93457 43.477539,47.744629 46.04834,46.354004 49.001465,26.404297 45.976074,26.93457 "
+         id="polygon76827"
+         style="fill:#d98204" />
+      <path
+         d="M 43.552734,47.766113 L 22.87207,38.785156 C 21.706543,27.642578 18.78418,20.716309 18.78418,20.716309 C 23.080078,22.266113 42.229492,28.328613 42.229492,28.328613 C 45.289063,40.192383 43.37207,42.625 43.552734,47.766113 z "
+         id="path76829"
+         style="fill:#fc0" />
+      <linearGradient
+         gradientTransform="matrix(-0.105,-0.4005,0.3754,-9.84e-2,-314.9889,-11.936)"
+         gradientUnits="userSpaceOnUse"
+         id="XMLID_4_"
+         x1="-316.06201"
+         x2="-323.51028"
+         y1="809.96143"
+         y2="840.27692">
+        <stop
+           offset="0"
+           style="stop-color:#FFFFFF"
+           id="stop76832" />
+        <stop
+           offset="1"
+           style="stop-color:#FFCC00"
+           id="stop76834" />
+      </linearGradient>
+      <path
+         d="M 22.844727,22.126953 C 29.491211,24 42.229492,28.328613 42.229492,28.328613 C 45.283203,38.26123 43.242188,45.841309 43.552734,47.766113 L 22.800781,38.818359 L 22.844727,22.126953 z "
+         id="path76836"
+         style="fill:url(#linearGradient76936)" />
+      <polygon
+         points="41.004883,42.025391 40.986328,40.810059 48.065918,37.460449 48.069824,38.693359 41.004883,42.025391 "
+         id="polygon76838"
+         style="fill:#b3ddff" />
+      <polygon
+         points="8.1904297,32.516113 38.138672,39.671875 38.34668,62.253418 9.2324219,54.01416 8.1904297,32.516113 "
+         id="polygon76840"
+         style="fill:#0cf" />
+      <polygon
+         points="10.730469,32.03125 8.1904297,32.516113 38.138672,39.671875 40.969727,38.604004 10.730469,32.03125 "
+         id="polygon76842"
+         style="fill:#cfecff" />
+      <polygon
+         points="17.31543,46.994629 16.231445,47.297363 28.15918,50.725098 29.324219,50.242676 17.31543,46.994629 "
+         id="polygon76844"
+         style="fill:#cfecff" />
+      <polygon
+         points="18.113281,38.503906 18.243164,42.424316 28.248047,45.068359 28.248047,40.839844 18.113281,38.503906 "
+         id="polygon76846"
+         style="fill:#f9f9f9" />
+      <polygon
+         points="28.163086,50.70166 28.295898,52.703613 29.241211,52.10791 29.324219,50.242676 28.163086,50.70166 "
+         id="polygon76848"
+         style="fill:#06f" />
+      <linearGradient
+         gradientUnits="userSpaceOnUse"
+         id="XMLID_5_"
+         x1="11.963867"
+         x2="34.643429"
+         y1="53.834473"
+         y2="60.526596">
+        <stop
+           offset="0"
+           style="stop-color:#66F2EE"
+           id="stop76851" />
+        <stop
+           offset="1"
+           style="stop-color:#464646"
+           id="stop76853" />
+      </linearGradient>
+      <polygon
+         points="9.3466797,52.802246 38.393555,60.729981 38.337891,62.307129 9.2617188,53.941894 9.3466797,52.802246 "
+         id="polygon76855"
+         style="fill:url(#XMLID_5_)" />
+      <polygon
+         points="38.138672,39.671875 40.969727,38.604004 40.969727,42.076172 48.075684,38.633301 48.083496,56.816894 38.34668,62.253418 38.138672,39.671875 "
+         id="polygon76857"
+         style="fill:#0852bc" />
+      <linearGradient
+         gradientUnits="userSpaceOnUse"
+         id="XMLID_6_"
+         x1="53.26709"
+         x2="73.433105"
+         y1="48.185059"
+         y2="48.185059">
+        <stop
+           offset="0"
+           style="stop-color:#00FFFF"
+           id="stop76860" />
+        <stop
+           offset="0.0490068"
+           style="stop-color:#00E1FF"
+           id="stop76862" />
+        <stop
+           offset="0.1141682"
+           style="stop-color:#00C0FF"
+           id="stop76864" />
+        <stop
+           offset="0.1871896"
+           style="stop-color:#00A4FF"
+           id="stop76866" />
+        <stop
+           offset="0.2686932"
+           style="stop-color:#008DFF"
+           id="stop76868" />
+        <stop
+           offset="0.3624018"
+           style="stop-color:#007BFF"
+           id="stop76870" />
+        <stop
+           offset="0.4758376"
+           style="stop-color:#006FFF"
+           id="stop76872" />
+        <stop
+           offset="0.6294785"
+           style="stop-color:#0068FF"
+           id="stop76874" />
+        <stop
+           offset="1"
+           style="stop-color:#0066FF"
+           id="stop76876" />
+      </linearGradient>
+      <polygon
+         points="55.04834,70.125488 53.849121,71.018066 53.26709,30.977051 73.433105,25.351563 55.04834,70.125488 "
+         id="polygon76878"
+         style="fill:url(#XMLID_6_)" />
+    </g>
+  </g>
+  <g
+     id="g66764"
+     transform="matrix(0.580892,0,0,0.580892,30.46276,33.49717)">
+    <g
+       id="g66766">
+      <rect
+         height="88.000488"
+         width="87.998535"
+         id="rect66768"
+         x="0"
+         y="0"
+         style="fill:none" />
+      <path
+         d="M 12.445313,23.541992 C 12.450684,23.536621 12.459961,23.538574 12.46582,23.533203 C 12.399902,23.605469 12.33252,23.711426 12.217773,23.902832 L 11.669434,25.508789 C 11.420898,28.112793 8.7612305,29.766601 7.7451172,29.761719 C 7.7431641,29.761719 7.1030274,29.961914 7.1030274,29.961914 C 7.0551758,29.977051 7.0234376,29.996582 6.9838868,30.027832 L 2.6176759,33.564941 C 2.5869142,33.593262 2.2260743,34.223144 2.2260743,34.223144 C 2.1948243,34.276855 2.1816407,34.330566 2.1782227,34.393066 C 2.1782227,34.393066 2.0952149,35.925781 2.0952149,35.926269 C 2.0952149,41.897461 5.9643555,44.13623 8.7773438,44.98584 C 8.597168,45.19873 8.4672852,45.446777 8.4672852,45.736816 L 11.043945,64.936035 C 11.108399,65.408691 11.444824,65.79834 11.901367,65.929199 L 60.859863,80.074707 C 61.250488,80.188965 61.67041,80.096191 61.980957,79.82666 L 84.133301,60.395019 C 84.172363,60.359863 84.205566,60.315918 84.229004,60.270019 L 84.497559,59.734863 C 84.521973,59.687988 84.535645,59.637207 84.539551,59.585449 C 86.019043,40.415527 86.019043,40.415527 86.019043,40.373535 C 86.019043,39.777344 85.573731,39.266601 84.98291,39.185058 C 84.98291,39.185058 75.30127,37.846191 72.290527,37.430176 C 72.355957,37.376953 72.479004,37.276367 72.479004,37.276367 C 72.439942,37.308594 72.407715,37.306152 72.374512,37.311035 C 72.496582,37.270996 72.809082,37.124023 74.008301,36.560547 C 75.133301,36.081055 76.311035,35.579101 77.156738,34.694824 C 78.469238,33.407715 79.227051,31.364746 79.227051,29.098144 L 79.223145,28.824219 C 79.144043,25.855469 77.844238,23.051758 75.656738,21.126465 C 75.621582,21.094726 75.574707,21.067871 75.529785,21.051269 L 75.010254,20.853515 C 74.965332,20.836914 74.918457,20.827637 74.869629,20.827637 L 71.266113,20.810058 C 70.694824,20.810058 70.199707,21.215332 70.088379,21.773926 C 70.088379,21.773926 69.250488,25.944824 69.046387,26.961426 C 68.818848,26.751465 68.604004,26.479492 68.442871,26.118164 C 68.489746,25.844726 69.39502,20.551269 69.39502,20.551269 C 69.400879,20.512207 69.421387,20.455566 69.421387,20.412109 C 69.421387,20.404785 69.42041,20.399414 69.42041,20.393555 L 69.390137,20.219726 L 69.240723,19.757324 C 69.211426,19.66748 69.222168,19.646973 69.143066,19.597168 L 68.535644,19.21582 C 68.488769,19.186523 68.441894,19.17041 68.387207,19.162597 L 65.260254,18.697754 L 64.92041,18.696777 C 62.097168,19.086914 59.969238,20.297363 58.596191,22.293945 C 57.271973,24.219726 57.074707,26.316894 57.074707,27.395996 L 57.247559,29.104492 C 57.26709,29.184082 57.461426,30.003418 57.461426,30.003418 C 57.737793,31.127441 58.049316,32.395019 58.049316,33.294433 C 58.049316,33.294433 57.946777,33.943359 57.935059,34.017578 C 57.82959,34.20459 57.615723,34.613769 57.205566,35.407715 C 56.671387,35.333984 41.949219,33.300781 41.638672,33.257812 C 41.459961,33.027832 37.396484,27.795898 36.745117,26.957519 C 39.82373,26.290527 47.033691,26.475586 52.600098,27.415527 C 53.043457,27.487793 53.484863,27.312988 53.754395,26.958008 C 54.025879,26.602051 54.07666,26.128906 53.887207,25.723144 L 49.924316,17.249023 C 49.902832,17.205566 49.875488,17.166015 49.840332,17.132324 L 49.436035,16.737793 C 49.401855,16.704101 49.361816,16.676757 49.316895,16.657226 C 38.896973,12.099121 23.738281,11.51416 12.445313,23.541992 z M 16.739746,39.831055 C 16.741211,38.884277 18.64502,37.631348 19.720703,36.945801 C 19.999512,37.088867 21.273926,37.740234 22.068359,38.146484 C 21.14502,38.611816 18.191406,40.099121 16.487305,40.95752 C 16.497559,40.934082 16.739746,40.380859 16.739746,40.380859 C 16.756836,40.341309 16.763184,40.260254 16.763184,40.180664 C 16.763184,40.109375 16.758301,40.039551 16.750488,40.001465 L 16.758789,40.042481 L 16.739746,39.831055 z M 72.281738,37.328613 C 72.303223,37.328613 72.322754,37.327149 72.35498,37.317383 C 72.333496,37.318848 72.312988,37.328613 72.281738,37.328613 z "
+         id="path66770"
+         style="fill:#7c6800;fill-opacity:0.25;stroke-opacity:0.25" />
+      <path
+         d="M 69.965332,38.319824 L 84.818848,40.374023 L 83.342285,59.492676 L 61.191894,78.922363 L 12.233398,64.775879 L 9.6669922,45.736816 L 24.719727,38.153809 L 19.647461,35.561523 C 17.205567,37.086914 15.258789,38.483398 15.573242,40.220703 L 11.157227,44.286621 C 7.8017578,43.873047 2.5927735,41.928711 3.3735352,34.498047 L 7.7392579,30.961426 C 9.4326173,30.969727 12.573242,28.71875 12.807617,25.889649 L 13.319336,24.36377 C 23.454102,13.569824 37.645508,12.861817 48.836426,17.757324 L 52.799317,26.231445 C 46.812988,25.22168 36.821289,24.815918 34.748535,26.342774 L 40.991211,34.379883 L 57.881348,36.712891 L 59.064942,34.420899 C 59.588379,33.134766 58.85791,30.745117 58.424317,28.882813 C 57.906738,26.655762 58.391113,20.8125 65.084473,19.884766 L 68.211426,20.349121 L 67.191895,26.3125 C 67.713379,27.916992 69.350098,28.623047 69.350098,28.623047 L 70.010254,28.255859 L 71.26416,22.009766 L 74.86377,22.027344 C 78.686035,25.392578 78.896973,31.307617 76.289551,33.865234 C 75.240723,34.961426 73.248535,35.453125 71.885254,36.233398 C 70.322754,37.124023 69.965332,38.319824 69.965332,38.319824 z "
+         id="path66772"
+         style="fill:white" />
+      <polygon
+         points="82.98877,41.490234 34.850586,34.807617 10.897461,46.449707 59.643066,56.678223 82.98877,41.490234 "
+         id="polygon66774"
+         style="fill:#ff6" />
+      <polygon
+         points="34.645508,36.333008 77.516113,42.653809 59.053223,54.161621 34.930664,49.486816 34.645508,36.333008 "
+         id="polygon66776"
+         style="fill:#c15200" />
+      <polygon
+         points="34.645508,36.333008 15.549805,45.724121 34.930664,49.486816 34.645508,36.333008 "
+         id="polygon66778"
+         style="fill:#ff7300" />
+      <g
+         id="g66780">
+        <g
+           id="g66782">
+          <path
+             d="M 76.352051,31.694824 C 76.67041,30.902832 76.869629,29.890625 76.838379,28.59375 C 76.791504,27.172852 76.148926,24.931641 74.311035,22.837891 L 71.859863,22.851563 C 73.848144,25.124023 74.611816,27.337891 74.234863,30.358398 C 74.176269,30.860352 74.059082,31.303711 73.904785,31.695801 L 76.352051,31.694824 z "
+             id="path66784"
+             style="fill:url(#linearGradient76934)" />
+          <g
+             id="g66786">
+            <defs
+               id="defs66788">
+              <path
+                 d="M 55.395019,59.633301 L 52.963379,59.641113 C 53.992676,59.63916 54.779785,59.342285 54.828613,59.32666 L 57.260254,59.316895 C 57.213379,59.334473 56.424316,59.628418 55.395019,59.633301 z "
+                 id="XMLID_2_" />
+            </defs>
+            <use
+               xlink:actuate="onLoad"
+               xlink:href="#XMLID_2_"
+               xlink:show="embed"
+               xlink:type="simple"
+               id="use66791"
+               style="fill:#0046b7"
+               x="0"
+               y="0"
+               width="87.999512"
+               height="88.000488" />
+            <g
+               id="g66793">
+              <path
+                 d="M 54.828613,59.32666 L 57.260254,59.316895 C 57.213379,59.334473 56.424316,59.628418 55.39502,59.633301 L 52.963379,59.641113 C 53.992676,59.63916 54.779785,59.342285 54.828613,59.32666"
+                 id="path66795"
+                 style="fill:#0046b7" />
+            </g>
+          </g>
+          <g
+             id="g66797">
+            <polygon
+               points="65.090332,20.790527 67.375488,21.078125 66.404785,26.494141 63.975098,26.501953 65.090332,20.790527 "
+               id="polygon66799"
+               style="fill:#b7b9b9" />
+          </g>
+          <path
+             d="M 73.904785,31.695801 C 73.131348,33.666992 71.398926,34.34668 70.73877,34.55957 C 69.943848,34.8125 67.314942,35.589844 66.088379,37.922852 L 66.104004,37.922852 C 65.13916,39.753418 55.355957,58.328613 54.828613,59.32666 L 57.260254,59.316895 C 57.797363,58.299316 67.977051,38.970703 68.588379,37.811523 L 68.570801,37.811523 C 69.730957,35.546875 72.955566,34.633789 73.383301,34.485352 C 73.703613,34.375 75.479004,33.878418 76.352051,31.694824 L 73.904785,31.695801 z "
+             id="path66801"
+             style="fill:#6d6d6d" />
+          <path
+             d="M 63.971191,26.500977 L 66.393066,26.485352 C 66.766113,27.546875 67.797363,29.191406 69.502441,29.476563 C 66.766113,30.402832 64.658691,28.758789 63.971191,26.500977 z "
+             id="path66803"
+             style="fill:#c9c9c9" />
+          <path
+             d="M 72.650879,33.527832 L 75.080566,33.520019 C 74.645019,33.931641 74.137207,34.241211 73.572754,34.421875 C 71.439941,35.101563 70.23291,35.813477 69.477051,36.530762 L 67.047363,36.539063 C 67.80127,35.820801 69.008301,35.109375 71.141113,34.428711 C 71.70752,34.248047 72.215332,33.940918 72.650879,33.527832"
+             id="path66805"
+             style="fill:#333" />
+          <g
+             id="g66807">
+            <path
+               d="M 71.88916,22.849121 C 76.004395,27.4375 74.67627,33.291992 71.242676,34.388672 C 67.799316,35.486816 66.768066,36.667969 66.158691,37.819824 C 65.54541,38.979492 55.365723,58.307129 54.828613,59.32666 C 54.771973,59.346191 53.721191,59.737793 52.449707,59.615723 C 50.994629,59.477051 49.32666,58.63916 48.854004,55.686035 L 59.963379,34.609375 C 60.756348,32.59082 59.32666,29.636719 59.172363,27.599121 C 59.025879,25.561523 60.932129,21.179687 65.090332,20.790527 L 63.975098,26.501953 C 64.508301,28.180664 65.984863,29.490234 67.687988,29.652344 C 68.600098,29.742187 69.57666,29.5 70.510254,28.811523 L 71.88916,22.849121 z "
+               id="path66809"
+               style="fill:#919191" />
+          </g>
+          <circle
+             cx="52.789551"
+             cy="55.814941"
+             r="1.6933594"
+             id="circle66811"
+             sodipodi:cx="52.789551"
+             sodipodi:cy="55.814941"
+             sodipodi:rx="1.6933594"
+             sodipodi:ry="1.6933594"
+             style="fill:#36c" />
+          <defs
+             id="defs66813">
+            <linearGradient
+               gradientUnits="userSpaceOnUse"
+               id="linearGradient76911"
+               x1="74.182129"
+               x2="74.765144"
+               y1="24.07373"
+               y2="29.573807">
+              <stop
+                 offset="0"
+                 style="stop-color:#B7B9B9"
+                 id="stop66816" />
+              <stop
+                 offset="0.005618"
+                 style="stop-color:#B7B9B9"
+                 id="stop66818" />
+              <stop
+                 offset="1"
+                 style="stop-color:#6D6D6D"
+                 id="stop66820" />
+            </linearGradient>
+          </defs>
+        </g>
+        <g
+           id="g66822">
+          <g
+             id="g66824">
+            <path
+               d="M 50.832519,44.053711 C 43.444336,39.834961 37.477539,33.416992 34.688476,29.511719 L 33.342773,32.220703 C 33.342773,32.220703 46.459473,45.211426 50.13916,46.160645 L 50.832519,44.053711 z "
+               id="path66826"
+               style="fill:#333" />
+            <path
+               d="M 50.469238,45.766113 C 43.623535,42.766602 34.067383,31.725586 34.067383,31.725586 L 27.676758,36.816406 C 31.770508,39.287109 38.879883,43.388672 45.479004,49.699707 L 50.469238,45.766113 z "
+               id="path66828"
+               style="fill:#6d6d6d" />
+            <path
+               d="M 48.385254,20.231445 L 47.199707,19.206055 C 37.325195,15.119141 28.913086,16.099121 16.15918,23.868164 C 15.344727,24.647461 14.579102,24.813477 13.959961,27.211426 C 13.50293,28.967774 12.106445,31.232422 8.3349609,32.696777 L 7.915039,32.555664 L 5.305664,34.822754 C 4.2705077,36.157227 5.0185546,42.132813 11.46582,42.494141 L 13.651367,40.511719 L 13.651367,39.290527 C 14.12793,36.078125 18.623535,34.112793 20.125977,34.132813 L 26.737305,37.532227 C 28.920899,36.6875 34.623535,32.71875 34.852539,31.164063 C 35.080566,29.604492 34.55957,28.042969 34.55957,28.042969 L 32.520508,25.804687 C 32.520508,25.804687 36.00293,22.625 50.541504,24.591797 C 50.541504,24.591797 50.477051,24.333008 48.998535,22.310547 C 48.998535,22.310547 41.084961,19.855469 32.688477,18.334961 C 36.459961,17.017578 42.286133,17.490234 48.385254,20.231445 z "
+               id="path66830"
+               style="fill:#919191" />
+            <path
+               d="M 34.631836,31.655762 C 35.020508,31.074219 35.165039,30.155762 34.55957,28.042969 L 32.520508,25.804687 C 31.510742,26.799316 30.780273,27.730469 32.039551,28.901367 C 33.299805,30.068359 34.631836,31.655762 34.631836,31.655762 z "
+               id="path66832"
+               style="fill:#6d6d6d" />
+            <path
+               d="M 50.541504,24.591797 C 50.541504,24.591797 51.102051,24.30957 49.621582,22.289063 C 49.621582,22.289063 44.786133,18.80957 35.485352,18.399414 C 39.358398,18.367188 42.692383,18.016602 48.793457,20.757324 L 47.498535,18.779297 C 37.625977,14.6875 28.192383,14.202149 16.25293,23.478516 C 15.719727,23.984375 15.051758,24.650391 14.555664,25.546875 L 15.793945,29.016602 C 31.30957,16.411621 45.932129,22.136719 50.541504,24.591797"
+               id="path66834"
+               style="fill:#c9c9c9" />
+            <path
+               d="M 16.586914,32.304688 C 16.586914,32.304688 12.022461,35.138672 10.043945,38.625 L 7.2333984,41.441406 C 8.0732422,41.981445 12.514648,40.385742 13.717773,40.462891 L 13.854492,39.743164 C 13.963867,38.047852 17.163086,34.486816 20.125977,34.132812 L 16.586914,32.304688 z "
+               id="path66836"
+               style="fill:#333" />
+            <path
+               d="M 16.600586,32.283203 C 14.96582,33.356445 11.579101,35.924805 10.036133,38.587891 L 7.2509765,41.455078 C 6.2861327,40.680664 5.1923827,39.529297 4.8251952,38.158203 L 7.5341796,35.494141 C 8.9443359,34.972656 12.993164,32.606445 15.793945,29.016602 L 16.600586,32.283203 z "
+               id="path66838"
+               style="fill:#6d6d6d" />
+            <path
+               d="M 7.7998047,32.655762 L 7.5068359,35.485352 L 4.8154296,38.153808 C 4.5791015,37.099121 4.5419921,35.902344 4.9482421,35.053223 L 7.7998047,32.655762 z "
+               id="path66840"
+               style="fill:#c9c9c9" />
+            <path
+               d="M 7.5068359,35.485352 C 7.5068359,35.485352 9.3134765,37.180664 10.02832,38.601563 L 7.2666015,41.444824 C 6.6435546,41.074219 5.0283202,39.418945 4.8154296,38.153809 L 7.5068359,35.485352 z "
+               id="path66842"
+               style="fill:#b7b9b9" />
+            <path
+               d="M 7.2666016,41.444824 L 10.02832,38.601563 C 10.811524,38.779297 12.194336,39.764648 13.711914,40.511719 L 11.188477,42.78418 C 9.6630859,42.866211 8.0732422,42.018555 7.2666016,41.444824 z "
+               id="path66844"
+               style="fill:#6d6d6d" />
+            <path
+               d="M 44.65332,48.95166 C 47.324707,48.807129 48.992676,46.717285 49.498535,43.475586 L 50.787598,42.709961 L 73.391113,58.754395 C 74.699707,63.26416 70.836426,69.141113 65.439941,69.166504 L 44.274414,50.365723 L 44.65332,48.95166 z "
+               id="path66846"
+               style="fill:#8e8e8e" />
+            <path
+               d="M 44.274414,50.365723 L 44.65332,48.95166 C 47.070801,48.23291 48.980957,46.559082 49.45752,43.18457 L 50.787598,42.709961 C 51.586426,44.164063 49.070801,49.775879 44.274414,50.365723 z "
+               id="path66848"
+               style="fill:#c9c9c9" />
+          </g>
+          <path
+             d="M 50.787598,42.709961 C 50.805176,43.702148 50.92041,44.510742 50.230957,45.887207 L 67.062988,58.01416 L 70.17041,56.402832 L 50.787598,42.709961 z "
+             id="path66850"
+             style="fill:#464646" />
+        </g>
+      </g>
+      <polygon
+         points="24.135742,47.375488 23.672852,49.090332 59.643066,56.678223 80.211426,43.274414 76.771973,43.078125 59.053223,54.161621 24.135742,47.375488 "
+         id="polygon66852"
+         style="fill:#ff6" />
+      <polygon
+         points="60.791504,76.643066 13.458008,62.793457 11.22168,46.449707 59.973144,56.678223 60.791504,76.643066 "
+         id="polygon66854"
+         style="fill:#f90" />
+      <polygon
+         points="60.791504,76.643066 81.945801,58.510254 82.98877,41.490234 59.893066,56.594238 60.791504,76.643066 "
+         id="polygon66856"
+         style="fill:#ff7300" />
+    </g>
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/icons/qtg_indi_status_back.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+	 x="0px" y="0px" width="36px" height="36px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve">
+<defs>
+</defs>
+<path fill="#FFFFFF" d="M2.631,9.923l9.245-7.078c0.286-0.164,0.637-0.164,0.923,0c0.285,0.166,0.461,0.471,0.461,0.801v4.633h7.069
+	c7.455,0.001,13.498,5.043,13.501,12.498c-0.003,7.459-6.046,12.498-13.501,12.502c0,0-0.604,0-1.207,0s-1-0.473-1-1.129
+	c0-0.654,0-2.432,0-2.871s0.493-1.002,1-1.002s2.207,0,2.207,0c4.137-0.008,7.492-3.361,7.499-7.5
+	c-0.007-4.139-3.362-7.493-7.499-7.5H13.26V17.8c0,0.33-0.176,0.635-0.461,0.799c-0.286,0.164-0.637,0.166-0.923,0l-9.245-7.078
+	c-0.285-0.164-0.461-0.469-0.461-0.799C2.17,10.394,2.346,10.089,2.631,9.923z"/>
+<rect fill-rule="evenodd" clip-rule="evenodd" fill="none" width="36" height="36"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/icons/qtg_mono_filebrowser_parent_folder.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect fill="none" height="30" width="30"/>
+<path d="M15,12v-2h-4V8h3L9.5,1.5L5,8h3v2H4v18h22V12H15z M24,26H6V12h2v10h6v-3h-3v-7h2v2h11V26z"/>
+<rect height="3" width="2" x="15" y="19"/>
+<rect height="3" width="2" x="18" y="19"/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/icons/qtg_mono_filebrowser_paste.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect height="1" width="8" x="16" y="15"/>
+<rect height="1" width="6" x="18" y="18"/>
+<rect height="1" width="7" x="17" y="21"/>
+<rect height="1" width="6" x="16" y="24"/>
+<polygon points="12,10 12,12 14,14 14,11.9 26,11.9 26,27 14,27 14,24.5 12,26.5 12,29 28,29 28,10 "/>
+<path d="M23.5,3h-2.092C21.201,2.419,20.652,2,20,2h-2.092c-0.207-0.581-0.756-1-1.408-1h-5c-0.652,0-1.202,0.419-1.408,1H8  C7.348,2,6.798,2.419,6.592,3H4.5C3.119,3,2,4.119,2,5.5v14C2,20.881,3.119,22,4.5,22H11v-0.694C7,21,5.9,18.266,5.9,15.305V12.9  h4.2v2.405c0,0.616,0.302,1.194,0.8,1.548H11V8.9h15V5.5C26,4.119,24.881,3,23.5,3z M19,5H9C8.448,5,8,4.552,8,4s0.448-1,1-1h1.592  C10.798,2.419,11.348,2,12,2h4c0.652,0,1.201,0.419,1.408,1H19c0.553,0,1,0.448,1,1S19.553,5,19,5z"/>
+<path d="M17,19.107l-5-4v3.197c-1.654,0-3-1.346-3-3V14H7v1.305c0,2.76,2.239,5,5,5v2.803L17,19.107z"/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/icons/qtg_mono_filebrowser_search.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,10 @@
+<?xml version="1.0" ?>
+<!DOCTYPE svg  PUBLIC '-//W3C//DTD SVG 1.1 Tiny//EN'  'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd'>
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M10.57,19.43c-0.359-0.361-0.68-0.746-0.982-1.139l-1.542,1.542c-0.766-0.451-1.767-0.354-2.425,0.304l-2.828,2.828,4.242,4.242,2.828-2.828c0.659-0.658,0.756-1.658,0.304-2.425l1.542-1.542c-0.39-0.29-0.78-0.61-1.14-0.97z"/>
+<path d="M26.13,3.871c-4.1-4.102-10.75-4.102-14.85-0.002-4.1,4.102-4.1,10.75,0.002,14.85,4.1,4.102,10.75,4.102,14.85,0,4.1-4.1,4.1-10.75,0-14.85zm-2.12,12.73c-2.928,2.93-7.678,2.93-10.6,0-2.94-2.93-2.94-7.68-0.01-10.61,2.93-2.928,7.678-2.928,10.61,0.002s2.93,7.678,0,10.61z"/>
+<path d="M1.381,27.2l1.414,1.414c0.781,0.781,2.047,0.781,2.828,0l-4.242-4.242c-0.781,0.79-0.781,2.05,0,2.83z"/>
+<g fill-opacity="0.5" stroke-opacity="0.5">
+<rect fill="none" height="30" width="30"/>
+</g>
+</svg>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/icons/qtg_mono_filebrowser_selection_mode.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<polygon points="20,17.738 20,20 17.74,20 15.742,22 22,22 22,15.736 "/>
+<polygon points="10,11.903 10,10 18.965,10 20.965,8 8,8 8,13.903 "/>
+<polygon points="10.069,20 10,20 10,19.931 8,17.928 8,22 12.065,22 "/>
+<polygon points="25.92,9.55 23.799,7.429 13.904,17.324 10.373,13.793 8.251,15.915 13.899,21.571 13.903,21.566 13.908,21.571 "/>
+<polygon points="20,2 20,4 10,4 10,2 8,2 8,6 22,6 22,2 "/>
+<polygon points="8,24 8,28 10,28 10,26 20,26 20,28 22,28 22,24 "/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/icons/qtg_mono_filebrowser_selection_mode_off.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<polygon points="10.069,20 10,20 10,19.931 8,17.928 8,22 12.065,22 "/>
+<polygon points="19.757,24 8,24 8,28 10,28 10,26 20,26 20,28 22,28 22,26.243 "/>
+<polygon points="10.243,6 22,6 22,2 20,2 20,4 10,4 10,2 8,2 8,3.757 "/>
+<polygon points="9.961,14.205 8.251,15.915 13.899,21.571 13.903,21.566 13.908,21.571 15.618,19.86 "/>
+<rect height="3" transform="matrix(-0.7068 0.7074 -0.7074 -0.7068 45.409 4.2241)" width="8.575" x="17.542" y="10.022"/>
+<polygon points="14.243,10 18.965,10 20.965,8 12.243,8 "/>
+<polygon points="8,12.243 8,13.903 8.83,13.073 "/>
+<polygon points="22,17.757 22,15.736 20.99,16.747 "/>
+<polygon points="16.749,20.992 15.742,22 17.757,22 "/>
+<rect height="36" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -6.2131 14.9998)" width="2" x="14" y="-3"/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/rom/filebrowser.iby	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 __ORBITFILEBROWSER_IBY__
+#define __ORBITFILEBROWSER_IBY__
+
+S60_APP_EXE(FileBrowser)
+//S60_APP_AIF_ICONS(FileBrowser)
+S60_APP_RESOURCE(FileBrowser)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,FileBrowser)
+
+//#ifdef S60_UPGRADABLE_APP_REG_RSC
+//  S60_UPGRADABLE_APP_REG_RSC(FileBrowser)
+//#else
+//  S60_APP_AIF_RSC(FileBrowser)
+//#endif
+data=ZPRIVATE\10003a3f\import\APPS\FileBrowser_reg.RSC Private\10003a3f\import\Apps\FileBrowser_reg.rsc
+
+#ifndef FILEBROWSER_LITE
+file=ABI_DIR\BUILD_DIR\FileBrowserFileOpServer.exe      PROGRAMS_DIR\FileBrowserFileOpServer.exe
+file=ABI_DIR\BUILD_DIR\FileBrowserFileOpClient.dll      SHARED_LIB_DIR\FileBrowserFileOpClient.dll
+#endif
+
+data=ZPRIVATE\102828D6\backup_registration.xml          private\102828D6\backup_registration.xml
+data=ZSYSTEM\Install\FileBrowser_stub.sis               \system\install\FileBrowser_stub.sis
+
+
+#endif // __ORBITFILEBROWSER_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/sis/FileBrowser_stub.pkg	Mon Oct 18 16:30:05 2010 +0300
@@ -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:
+;
+
+
+; Language - standard language definitions
+&EN
+
+; Standard SIS file header
+#{"FileBrowser"},(0x102828D6),1,0,0
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; normal stuff:
+""-"z:\sys\bin\FileBrowser.exe"
+""-"z:\Resource\Apps\FileBrowser.mif"
+""-"z:\Resource\Apps\FileBrowser.rsc"
+""-"z:\private\10003a3f\import\apps\FileBrowser_reg.rsc"
+""-"z:\private\102828D6\backup_registration.xml"
+
+""-"z:\sys\bin\FileBrowserFileOpServer.exe"
+""-"z:\sys\bin\FileBrowserFileOpClient.dll"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/enginewrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,202 @@
+/*
+* 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 ENGINEWRAPPER_H
+#define ENGINEWRAPPER_H
+
+#include "fbdriveentry.h"
+#include "fbfileentry.h"
+#include "filebrowsersettings.h"
+
+#include "engine.h"
+#include "FBFileUtils.h"
+#include "FB.hrh"
+
+#include <QString>
+#include <QStringList>
+#include <QModelIndexList>
+
+class CEngine;
+class SearchAttributes;
+class SearchResults;
+class FileBrowserView;
+class HbProgressDialog;
+
+class QModelIndex;
+
+class OverwriteOptions
+{
+public:
+    OverwriteOptions() :
+            doFileOperations(true),
+            queryIndex(0),
+            overWriteFlags(CFileMan::EOverWrite)
+    {}
+
+    bool doFileOperations;
+    int queryIndex;
+    QString postFix;
+    int overWriteFlags;
+};
+
+/**
+ * class that is used for communicating between Symbian and Qt code.
+ */
+class EngineWrapper : public QObject, public MFileBrowserUI
+{
+    Q_OBJECT
+public:
+    /**
+     * Constructor
+     */
+    EngineWrapper();
+    
+    /**
+     * Destructor
+     */
+    ~EngineWrapper();
+    
+    /**
+     * Initializes Engine Wrapper
+     * @return true if engine was started successfully
+     */
+    bool init();
+
+public: // from MFileBrowserUI
+    /* Functions that are called from engine: */
+    void ShowInformationNote(const TDesC &aDescText, const TDesC &aDescTitle);
+    void ShowErrorNote(const TDesC& aDescText, TBool aNoTimeout = EFalse);
+    void ShowConfirmationNote(const TDesC& aDescText, TBool aNoTimeout = EFalse);
+
+    void ShowProgressDialog(const TDesC& aDescText, TInt aMinimum, TInt aMaximum);
+    void CancelProgressDialog();
+    void SetProgressValue(TInt aValue);
+
+    void ShowWaitDialog(const TDesC& aText);
+    void CancelWaitDialog();
+    void ProcessEvents();
+
+    TBool ShowConfirmationQuery(const TDesC& aDescText);
+    void NotifyModelHasChanged();
+
+public: 
+    /* Functions that are called from UI */
+    bool searchFiles();
+    SearchAttributes getFileSearchAttributes();
+    int setFileSearchAttributes(SearchAttributes attributes);
+    SearchResults getSearchResults();
+
+    FileBrowserSettings &settings() { return mSettings; }
+    const FileBrowserSettings &settings() const { return mSettings; }
+
+    void saveSettings(bool aNotifyModules = true);
+
+    void startExecutingCommands(const QString &aCommandsExecutionMessage);
+    void refreshView();
+    inline TListingMode listingMode() { return mEngine->FileUtils()->ListingMode(); }
+//    TBool IsCurrentDriveReadOnly();
+//    TBool IsCurrentItemDirectory();
+    void moveUpOneLevel();
+    void moveDownToDirectory(const QModelIndex& index);
+    int clipboardCut(const QModelIndexList &aSelectionIndices);
+    int clipboardCopy(const QModelIndexList &aSelectionIndices);
+    void clipboardPaste(const OverwriteOptions &aOverwriteOptions);
+    void copyToFolder(const QString &aTargetDir, const OverwriteOptions &aOverwriteOptions, bool aMove);
+    void createNewFile(const QString &aNewFileName);
+    void createNewDirectory(const QString &aNewDirectoryName);
+    void deleteItems(const QModelIndexList& aSelectionIndices);
+    bool selectionHasDirs();
+    void rename(const QModelIndex& aIndex, const QString aNewName);
+    void touch(bool aRecurse);
+    int getFilesCount(const QString &aDriveRoot);
+    int getFilesCountAndSize(const QString &aDriveRoot, qint64 &aSize);
+    int getEntriesCount(const QString &aDriveRoot);
+    QString getMimeType(const QString &aFullPath);
+    QString getOpenWith(const QString &aFullPath);
+    void setAttributes(quint32 &, quint32 &, bool &);
+
+    bool openAppArc(QString fileName);
+    bool openDocHandler(QString fileName, bool embeddedVal = false);
+
+    bool isDriveListViewActive();
+    bool isCurrentDriveReadOnly();
+    bool isClipBoardListInUse();
+    int itemCount() const;
+    FbDriveEntry getDriveEntry(const QModelIndex& aIndex) const;
+    FbFileEntry getFileEntry(const QModelIndex& aIndex) const;
+	
+    const CArrayFix<TInt> *convertSelectionList(const QModelIndexList &aSelectionIndices);
+    void setCurrentSelection(const QModelIndexList &aSelectionIndices);
+    bool isDestinationEntriesExists(const QModelIndexList &aSelectionIndices, QString aTargetDir);
+    bool targetExists(const QModelIndex& aIndex, const QString aNewName);
+    QString currentPath() const;
+    TOverwriteOptions convertOverwriteOptions(const OverwriteOptions &aOverwriteOptions);
+    bool hasDrivePassword(const QModelIndex &aIndex);
+    bool isDriveRemovable(const QModelIndex &aIndex);
+    bool isDriveLocked(const QModelIndex &aIndex);
+    void GetDriveName(const QModelIndex &aIndex, QString &aDriveName);
+    void GetDriveVolumeLabel(const QModelIndex &aIndex, QString &aDriveName);
+
+    void DiskAdminSetDrivePassword(const QModelIndex &aIndex, const QString &aOldPassword, const QString &aNewPassword);
+    void DiskAdminUnlockDrive(const QModelIndex &aIndex, const QString &aOldPassword);
+    void DiskAdminClearDrivePassword(const QModelIndex &aIndex, const QString &aOldPassword);
+    void DiskAdminEraseDrivePassword(const QModelIndex &aIndex);
+    void DiskAdminFormatDrive(const QModelIndex &aIndex, bool aQuickFormat);
+    void DiskAdminQuickFormatDrive(const QModelIndex &aIndex, bool aQuickFormat);
+    void DiskAdminCheckDisk(const QModelIndex &aIndex);
+    void DiskAdminScanDrive(const QModelIndex &aIndex);
+    void DiskAdminSetDriveName(const QModelIndex &aIndex, const QString &aDriveName);
+    void DiskAdminSetDriveVolumeLabel(const QModelIndex &aIndex, const QString &aVolumeLabel);
+    void DiskAdminEjectDrive(const QModelIndex &aIndex);
+    void DiskAdminDismountDrive(const QModelIndex &aIndex);
+    void DiskAdminEraseMBR(const QModelIndex &aIndex);
+    void DiskAdminPartitionDrive(const QModelIndex &aIndex, bool aEraseMBR, int aAmountOfPartitions);
+
+    void ToolsSetErrRd(bool aEnable);
+    bool ErrRdFileExists();
+
+    void ToolsErrorSimulateLeave(int aLeaveCode);
+    void ToolsErrorSimulatePanic(QString aPanicCategory, int aPanicCode);
+    void ToolsErrorSimulateException(int aExceptionCode);
+
+    quint32 getDebugMask();
+    void toolsSetDebugMask(quint32 aDbgMask);
+
+    void toolsWriteAllFiles();
+
+    void showFileCheckSums(const QModelIndex &aIndex, TFileBrowserCmdFileChecksums checksumType);
+
+    TClipBoardMode getClipBoardMode() { return mEngine->FileUtils()->GetClipBoardMode(); }
+
+signals:
+    void fileSystemDataChanged();
+
+private slots:
+        void progressDialogCancelled();
+        void waitDialogCancelled();
+
+private:
+    // FB engine
+    CEngine *mEngine;
+    // List of found files results for Ui
+    QStringList mFilesFound;
+    FileBrowserSettings mSettings;
+    HbProgressDialog *mProgressDialog;
+    HbProgressDialog *mWaitDialog;
+    };
+
+#endif //ENGINEWRAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbattributesview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* 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 FBATTRIBUTESVIEW_H
+#define FBATTRIBUTESVIEW_H
+
+#include <HbView>
+
+class HbDataForm;
+class HbDataFormModelItem;
+
+class FbAttributesView : public HbView
+{
+    Q_OBJECT
+
+public:
+    FbAttributesView(quint32 &, quint32 &, bool &);
+    virtual ~FbAttributesView();
+
+    quint32 &setAttributesMask() { return mSetAttributesMask; }
+    quint32 &clearAttributesMask() { return mClearAttributesMask; }
+    bool &recurse() { return mRecurse; }
+
+signals:
+    void finished(bool ok);
+
+public slots:
+    void accept();
+    void reject();
+
+private:
+    void initDataForm();
+    void createToolbar();
+    void loadSettings();
+    void saveSettings();
+
+private:
+    quint32 mSetAttributesMask;
+    quint32 mClearAttributesMask;
+    bool mRecurse;
+
+    HbDataForm *mForm;
+    HbDataFormModelItem *mArchiveItem;
+    HbDataFormModelItem *mHiddenItem;
+    HbDataFormModelItem *mReadOnlyItem;
+    HbDataFormModelItem *mSystemItem;
+    HbDataFormModelItem *mRecurseItem;
+};
+
+#endif // FBATTRIBUTESVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbdriveentry.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* 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 FBDRIVEENTRY_H
+#define FBDRIVEENTRY_H
+
+#include "FBFileUtils.h"
+#include <QString>
+#include <QDate>
+
+
+/**
+ * class that is used for communicating between Symbian and Qt code.
+ */
+class FbDriveEntry {
+
+public:
+    
+    /**
+     * Constructor
+     */
+    FbDriveEntry(TDriveEntry &);
+    
+    /**
+     * Destructor
+     */
+    ~FbDriveEntry();
+    
+    /* Functions that are called from UI */
+public: 
+    QChar driveLetter();
+    int number();
+    QString mediaTypeString();
+    QString attributesString();
+    int iconId();
+    qint64 volumeInfoFree();
+    qint64 volumeInfoSize();
+    QString volumeInfoNameString();
+    uint volumeInfoUniqueId();
+
+private:
+    TDriveEntry mDriveEntry;
+    };
+
+#endif //FBDRIVEENTRY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbdrivelistviewitem.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* 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 FBDRIVELISTVIEWITEMS_H
+#define FBDRIVELISTVIEWITEMS_H
+
+#include <HbListViewItem>
+
+#include <QGraphicsWidget>
+#include <QtGlobal>
+
+class HbAbstractViewItem;
+class HbLabel;
+class HbCheckBox;
+class HbWidget;
+
+class QGraphicsLinearLayout;
+class QModelIndex;
+class QGraphicsItem;
+
+class FbDriveListViewItem : public HbListViewItem
+{
+    Q_OBJECT
+
+public:
+    FbDriveListViewItem( QGraphicsItem *parent = 0 );
+    ~FbDriveListViewItem();
+
+    virtual bool canSetModelIndex(const QModelIndex &index) const;
+    virtual HbAbstractViewItem *createItem();
+    virtual void updateChildItems();
+
+private slots:
+    void setCheckedState( int state );
+
+private:
+    virtual void polish(HbStyleParameters& params);
+
+private:
+    void init();
+
+    QGraphicsLinearLayout *hLayout;
+
+    HbLabel *mDiskNameLabel;
+    HbLabel *mSizeLabel;
+    HbLabel *mFreeLabel;
+    //HbCheckBox *mCheckBox;
+    HbLabel *mIconLabel;
+};
+
+#endif // FBDRIVELISTVIEWITEMS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbdrivemodel.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* 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 FBDRIVEMODELH_H_
+#define FBDRIVEMODELH_H_
+
+#include "fbdriveentry.h"
+
+#include <QAbstractListModel>
+#include <QVariant>
+
+// Forward declarations
+class EngineWrapper;
+class QModelIndex;
+class QFileIconProvider;
+class QObject;
+
+class FbDriveModel : public QAbstractListModel
+{
+    Q_OBJECT
+
+public:
+    explicit FbDriveModel(EngineWrapper *engineWrapper, QObject *parent = 0);
+    virtual ~FbDriveModel();
+
+    int rowCount(const QModelIndex &parent = QModelIndex()) const;
+    QVariant data(const QModelIndex &index, int role) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+
+    FbDriveEntry driveEntry(const QModelIndex &index) const;
+    QString driveLetter( const QModelIndex &index ) const;
+    QString mediaTypeString(const QModelIndex &index) const;
+
+private:
+    EngineWrapper *mEngineWrapper;
+    QFileIconProvider *mFileIconProvider;
+};
+
+
+
+#endif /* FBDRIVEMODELH_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbdriveview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,240 @@
+/*
+* 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 FBDRIVEVIEWH_H_
+#define FBDRIVEVIEWH_H_
+
+#include "menuaction.h"
+#include "enginewrapper.h"
+
+#include <HbView>
+#include <HbApplication>
+
+#include <QModelIndexList>
+
+// Forward declarations
+class QFileInfo;
+class QSignalMapper;
+class QItemSelection;
+class QString;
+class QGraphicsLinearLayout;
+
+class HbListView;
+class HbListWidget;
+class HbToolBar;
+class HbLabel;
+class HbDialog;
+class HbAbstractViewItem;
+class HbMenu;
+class HbSearchPanel;
+
+class EditorView;
+class SearchView;
+class SettingsView;
+class EngineWrapper;
+class FbDriveModel;
+class FileBrowserSortFilterProxyModel;
+
+class FbDriveView : public HbView
+{
+    Q_OBJECT
+
+public:
+    explicit FbDriveView();
+    virtual ~FbDriveView();
+    void init(EngineWrapper *engineWrapper);
+
+public slots:
+    void refreshList();
+
+private:
+    void openListDialog(const QStringList &items, const QString &titleText, QObject *receiver, const char *member);
+
+    QModelIndex currentItemIndex();
+    void storeSelectedItemsOrCurrentItem();
+
+    // Menu related methods
+    void createMenu();
+    void createFileMenu();
+    void createEditMenu();
+    void createViewMenu();
+    void createToolsMenu();
+
+    void createSettingsMenuItem();
+    void createAboutMenuItem();
+    void createExitMenuItem();
+
+    void createContextMenu();
+    void createFileContextMenu();
+    void createEditContextMenu();
+    void createViewContextMenu();
+    void createDiskAdminContextMenu();
+
+private slots:
+    // menu action slots
+    // file menu
+    void fileOpenDrive();
+    void fileSearch();
+
+    void fileProperties();
+
+    // edit menu
+    void editSnapShotToE();
+
+    // view menu
+    void viewRefresh();
+
+    // disk admin menu
+    void diskAdminSetDrivePassword();
+    void diskAdminSetDrivePasswordNew(HbAction *);
+    void doDiskAdminSetDrivePassword(HbAction *);
+
+    void diskAdminUnlockDrive();
+    void doDiskAdminUnlockDrive(HbAction *);
+
+    void diskAdminClearDrivePassword();
+    void doDiskAdminClearDrivePassword(HbAction *);
+
+    void diskAdminEraseDrivePassword();
+    void doDiskAdminEraseDrivePassword(int);
+
+    void diskAdminFormatDrive();
+    void doDiskAdminFormatDrive(int);
+
+    void diskAdminQuickFormatDrive();
+    void doDiskAdminQuickFormatDrive(int);
+
+    void diskAdminCheckDisk();
+
+    void diskAdminScanDrive();
+    void doDiskAdminScanDrive(int);
+
+    void diskAdminSetDriveName();
+    void doDiskAdminSetDriveName(HbAction *);
+
+    void diskAdminSetDriveVolumeLabel();
+    void doDiskAdminSetDriveVolumeLabel(HbAction *);
+
+    void diskAdminEjectDrive();
+    void diskAdminDismountDrive();
+    void doDiskAdminDismountDrive(int);
+
+    void diskAdminEraseMBR();
+    void doDiskAdminEraseMBR(int);
+    void doDiskAdminReallyEraseMBR(int);
+    void doDiskAdminNotRemovableReallyEraseMBR(int);
+    
+    void diskAdminPartitionDrive();
+    void diskAdminPartitionDriveProceed(int);
+    void diskAdminPartitionDriveReallyProceed(int);
+    void diskAdminPartitionDriveIsNotRemovable(int);
+    void diskAdminPartitionDriveEraseMbr(int);
+    void diskAdminPartitionDriveGetCount(HbAction *);
+
+    // tools menu
+    void toolsAllAppsToTextFile();
+    void toolsAllFilesToTextFile();
+//    void toolsAvkonIconCacheEnable();
+//    void toolsAvkonIconCacheDisable();
+
+    void toolsDisableExtendedErrors();
+    void toolsDumpMsgStoreWalk();
+    void toolsEditDataTypes();
+    void toolsEnableExtendedErrors();
+
+    void toolsErrorSimulateLeave();
+    void doToolsErrorSimulateLeave(HbAction *);
+
+    void toolsErrorSimulatePanic();
+    void doToolsErrorSimulatePanicCode(HbAction *);
+    void doToolsErrorSimulatePanic(HbAction *);
+
+    void toolsErrorSimulateException();
+    void doToolsErrorSimulateException(HbAction *);
+
+//    void toolsLocalConnectivityActivateInfrared();
+//    void toolsLocalConnectivityLaunchBTUI();
+//    void toolsLocalConnectivityLaunchUSBUI();
+    void toolsMessageInbox();
+    void toolsMessageDrafts();
+    void toolsMessageSentItems();
+    void toolsMessageOutbox();
+    void toolsMemoryInfo();
+    void toolsSecureBackStart();
+    void toolsSecureBackRestore();
+    void toolsSecureBackStop();
+    void toolsSetDebugMaskQuestion();
+    void toolsSetDebugMask(HbAction *);
+    void toolsShowOpenFilesHere();
+
+    // main menu items
+    void about();
+    
+signals:
+    void aboutToShowFileView();
+    void aboutToShowSettingsView();
+    void aboutToShowEditorView(const QString &, bool);
+    void aboutToShowSearchView(const QString &);
+    void aboutToSimulateLeave(int);
+
+private slots:
+    void updateOptionMenu();
+    void updateContextMenu();
+    void selectionChanged(const QItemSelection &, const QItemSelection &);
+    void activated(const QModelIndex& index);
+
+    void onLongPressed(HbAbstractViewItem *, QPointF);
+
+private:
+    EngineWrapper *mEngineWrapper;
+
+    HbListView *mListView;
+    HbLabel *mNaviPane;
+
+    QGraphicsLinearLayout *mMainLayout;
+
+    // file info contains all needed information of selected file from file model
+    QModelIndexList mClipboardIndexes;
+    QModelIndexList mSelectionIndexes;
+
+    FbDriveModel *mFbDriveModel;
+    OptionMenuActions mOptionMenuActions;
+    ContextMenuActions mContextMenuActions;
+    HbMenu *mContextMenu;
+
+    // flags
+    bool mLocationChanged;
+    // flag for removing source file after copied to target file
+    bool mRemoveFileAfterCopied;
+    bool mClipBoardInUse;
+    bool mFolderContentChanged;
+    QModelIndex mCurrentIndex;
+
+    // temporarily storage
+    QString mOldPassword;
+    QString mPanicCategory;
+    QString mAbsoluteFilePath;
+    OverwriteOptions mOverwriteOptions;
+    QModelIndex mModelIndex;
+    QString mNewFileName;
+    bool mProceed;
+    bool mEraseMBR;
+};
+
+
+
+#endif /* FBDRIVEVIEWH_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbeditorview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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 FBEDITORVIEW_H
+#define FBEDITORVIEW_H
+
+#include <hbview.h>
+
+class HbTextEdit;
+class HbAction;
+
+class FbEditorView : public HbView
+{
+    Q_OBJECT
+
+public:
+    FbEditorView();
+    ~FbEditorView();
+    void open(const QString& fileName, bool flagReadOnly);
+
+signals:
+    void finished(bool ok);
+
+private slots:
+    void backButtonClicked();
+    void displayInText();
+    void displayInHex();
+    void updateMenu();
+
+    /*
+    void newFile();
+    bool save();
+    bool saveAs();
+    void about();
+    void documentWasModified();
+    */
+ 
+
+private:
+    void loadFile(const QString &fileName);
+    void createMenu();
+
+    // editor
+    HbTextEdit *mTextEdit;
+    // if flag true, file is currently in hex format
+    bool mFileHex;
+    bool mFlagReadOnly;
+    QString mFileName;
+    QString mFileContent;
+
+    HbAction* mToTextAction;
+    HbAction* mToHexAction;
+    HbAction* mExitAction;
+};
+
+#endif // FBEDITORVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbfileentry.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef FILEEENTRY_H
+#define FILEEENTRY_H
+
+#include "FBFileUtils.h"
+#include <QString>
+#include <QDate>
+#include <QStringList>
+
+/**
+ * class that is used for communicating between Symbian and Qt code.
+ */
+class FbFileEntry
+{
+public:
+    /**
+     * Constructor
+     */
+    FbFileEntry(TFileEntry &);
+    
+    /**
+     * Destructor
+     */
+    ~FbFileEntry();
+    
+    /* Functions that are called from UI */
+public: 
+    QString fullName();
+    QString path();
+
+    int attributes();
+    QString attributesString();
+    bool isArchive() const { return mFileEntry.iEntry.IsArchive(); }
+    bool isHidden() const { return mFileEntry.iEntry.IsHidden(); }
+    bool isReadOnly() const { return mFileEntry.iEntry.IsReadOnly(); }
+    bool isSystem() const { return mFileEntry.iEntry.IsSystem(); }
+
+    const QString archiveTextShort() const  { return QString("A"); }
+    const QString hiddenTextShort() const  { return QString("H"); }
+    const QString readOnlyTextShort() const  { return QString("R"); }
+    const QString systemTextShort() const  { return QString("S"); }
+    const QString noAttributeTextShort() const  { return QString("-"); }
+
+    const QString archiveText() const  { return QString("Archive"); }
+    const QString hiddenText() const  { return QString("Hidden"); }
+    const QString readOnlyText() const  { return QString("Read Only"); }
+    const QString systemText() const  { return QString("System"); }
+    const QString noAttributeText() const  { return QString("None"); }
+
+    int size();
+    QString sizeString();
+
+//    QDateTime modified();
+    QString modifiedDateTimeString(const QString aDateTimeFormat);
+    QString modifiedString();
+//    int Uid(int id);
+    bool isDir();
+    QString name();
+
+    int dirEntries();
+    QString dirEntriesString();
+
+    int iconId();
+
+private:
+    TFileEntry mFileEntry;
+    };
+
+#endif //FBFILEEENTRY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbfilelistviewitem.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* 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 FBFILELISTVIEWITEM_H
+#define FBFILELISTVIEWITEM_H
+
+#include <HbListViewItem>
+
+#include <QGraphicsWidget>
+#include <QtGlobal>
+
+class HbAbstractViewItem;
+class HbLabel;
+class HbCheckBox;
+class HbWidget;
+
+class QGraphicsLinearLayout;
+class QModelIndex;
+class QGraphicsItem;
+
+class FbFileListViewItem : public HbListViewItem
+{
+    Q_OBJECT
+
+public:
+    FbFileListViewItem( QGraphicsItem *parent = 0 );
+    ~FbFileListViewItem();
+
+    virtual bool canSetModelIndex(const QModelIndex &) const;
+    virtual HbAbstractViewItem *createItem();
+    virtual void updateChildItems();
+
+private slots:
+    void setCheckedState(int state);
+
+private:
+    virtual void polish(HbStyleParameters &);
+
+private:
+    void init();
+
+    QGraphicsLinearLayout *hLayout;
+
+    HbLabel *mDiskNameLabel;
+    HbLabel *mSizeLabel;
+    HbLabel *mFreeLabel;
+    //HbCheckBox *mCheckBox;
+    HbLabel *mIconLabel;
+};
+
+#endif // FBFILELISTVIEWITEM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbfilemodel.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* 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 FBFILEMODELH_H_
+#define FBFILEMODELH_H_
+
+#include <QAbstractListModel>
+
+// Forward declarations
+class EngineWrapper;
+class QModelIndex;
+class QFileIconProvider;
+
+class FbFileModel : public QAbstractListModel
+{
+    Q_OBJECT
+
+public:
+    explicit FbFileModel(EngineWrapper *engineWrapper, QObject *parent = 0);
+    virtual ~FbFileModel();
+
+    int rowCount(const QModelIndex &parent = QModelIndex()) const;
+    QVariant data(const QModelIndex &index, int role) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+
+    void moveDownToDirectory(const QModelIndex &index);
+    void moveUpOneLevel();
+
+private:
+    EngineWrapper *mEngineWrapper;
+    QFileIconProvider *mFileIconProvider;
+};
+
+
+
+#endif /* FBFILEMODELH_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbfileview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,267 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef FBFILEVIEWH_H_
+#define FBFILEVIEWH_H_
+
+#include "menuaction.h"
+#include "enginewrapper.h"
+
+#include <HbView>
+#include <HbApplication>
+#include <HbIcon>
+
+#include <QModelIndexList>
+
+// Forward declarations
+class QFileInfo;
+class QSignalMapper;
+class QItemSelection;
+class QString;
+class QGraphicsLinearLayout;
+
+class HbListView;
+class HbListWidget;
+class HbToolBar;
+class HbLabel;
+class HbDialog;
+class HbAbstractViewItem;
+class HbMenu;
+class HbSearchPanel;
+
+class FbEditorView;
+class SearchView;
+class SettingsView;
+class EngineWrapper;
+class FbFileModel;
+class FileBrowserSortFilterProxyModel;
+
+class FbFileView : public HbView
+{
+    Q_OBJECT
+
+public:
+    explicit FbFileView();
+    virtual ~FbFileView();
+    void init(EngineWrapper *engineWrapper);
+
+public slots:
+    void refreshList();
+
+private:
+    void fileOverwriteDialog();
+    void openListDialog(const QStringList &, const QString &, QObject *, const char *);
+
+    void storeSelectedItemsOrCurrentItem();
+    QModelIndex currentItemIndex();
+
+    // Menu related methods
+    void createMenu();
+    void createFileMenu();
+    void createEditMenu();
+    void createViewMenu();
+    void createToolsMenu();
+
+    void createSelectionMenuItem();
+    void createSettingsMenuItem();
+    void createAboutMenuItem();
+    void createExitMenuItem();
+
+    void createContextMenu();
+    void createFileContextMenu();
+    void createEditContextMenu();
+    void createViewContextMenu();
+    void createSearchPanel();
+    void createToolBar();
+
+private slots:
+    // menu action slots
+    // file menu
+    void fileBackMoveUp();
+    void fileOpenDirectory();
+    void fileSearch();
+
+    void fileNewFile();
+    void doFileNewFile(HbAction *);
+
+    void fileNewDirectory();
+    void doFileNewDirectory(HbAction *);
+
+    void fileDelete();
+    void doFileDelete(int);
+
+    void fileRename();
+    void doFileRename(HbAction *);
+    void doFileRenameFileExist(int);
+
+    void fileTouch();
+    void doFileTouch(int);
+    void fileProperties();
+
+    void fileChecksumsMD5();
+    void fileChecksumsMD2();
+    void fileChecksumsSHA1();
+    void fileChecksums(TFileBrowserCmdFileChecksums checksumType);
+
+    void fileSetAttributes();
+
+    // edit menu
+    void editSnapShotToE();
+    void editCut();
+    void editCopy();
+
+    void editPaste();
+    void doEditPaste();
+
+    void editCopyToFolder();
+    void doEditCopyToFolder(int);
+    void doEditCopy();
+
+    void editMoveToFolder();
+    void doEditMoveToFolder(int);
+    void doEditMove();
+
+    void editSelect();
+    void editUnselect();
+    void editSelectAll();
+    void editUnselectAll();
+
+    // view menu
+    void viewFilterEntries();
+    void filterCriteriaChanged(const QString &);
+    void clearFilterCriteria();
+    void viewRefresh();
+
+    // tools menu
+    void toolsAllAppsToTextFile();
+    void toolsAllFilesToTextFile();
+//    void toolsAvkonIconCacheEnable();
+//    void toolsAvkonIconCacheDisable();
+
+    void toolsDisableExtendedErrors();
+    void toolsDumpMsgStoreWalk();
+    void toolsEditDataTypes();
+    void toolsEnableExtendedErrors();
+
+    void toolsErrorSimulateLeave();
+    void doToolsErrorSimulateLeave(HbAction *);
+
+    void toolsErrorSimulatePanic();
+    void doToolsErrorSimulatePanicCode(HbAction *);
+    void doToolsErrorSimulatePanic(HbAction *);
+
+    void toolsErrorSimulateException();
+    void doToolsErrorSimulateException(HbAction *);
+
+//    void toolsLocalConnectivityActivateInfrared();
+//    void toolsLocalConnectivityLaunchBTUI();
+//    void toolsLocalConnectivityLaunchUSBUI();
+    void toolsMessageInbox();
+    void toolsMessageDrafts();
+    void toolsMessageSentItems();
+    void toolsMessageOutbox();
+    void toolsMemoryInfo();
+    void toolsSecureBackStart();
+    void toolsSecureBackRestore();
+    void toolsSecureBackStop();
+    void toolsSetDebugMaskQuestion();
+    void toolsSetDebugMask(HbAction *);
+    void toolsShowOpenFilesHere();
+
+    // main menu items
+    void selectionModeChanged();
+    void selectionModeButtonTriggered();
+
+    void about();
+    
+signals:
+    void aboutToShowDriveView();
+    void aboutToShowSettingsView();
+    void aboutToShowEditorView(const QString &, bool);
+    void aboutToShowSearchView(const QString &);
+    void aboutToShowAttributesView(const QString &, quint32 &, quint32 &, bool &);
+    void aboutToSimulateLeave(int);
+    void overwriteOptionSelected();
+
+private slots:
+    void setOrientation(Qt::Orientation);
+    void updateOptionMenu();
+    void updateContextMenu();
+    void activated(const QModelIndex& index);
+    void activateSelectionMode();
+    void deActivateSelectionMode();
+    void onLongPressed(HbAbstractViewItem *, QPointF);
+
+    void fileOpen(HbAction *);
+    void fileOverwrite(HbAction *);
+    void fileOverwritePostfix(HbAction *);
+
+private:
+    // Internal methods
+    void proceedFileRename();
+    void proceedFileTouch(bool recurse);
+
+private:
+    EngineWrapper *mEngineWrapper;
+
+    HbListView *mListView;
+    HbToolBar *mToolBar;
+    HbLabel *mNaviPane;
+    HbSearchPanel *mSearchPanel;
+
+    QGraphicsLinearLayout *mMainLayout;
+
+    // file info contains all needed information of selected file from file model
+    QModelIndexList mClipboardIndexes;
+    QModelIndexList mSelectionIndexes;
+
+    FbFileModel *mFbFileModel;
+    FileBrowserSortFilterProxyModel *mSortFilterProxyModel;
+    OptionMenuActions mOptionMenuActions;
+    ContextMenuActions mContextMenuActions;
+    HbMenu *mContextMenu;
+    HbAction *mToolbarBackAction;
+    HbAction* mToolbarFilterAction;
+    HbAction* mToolbarSelectionModeAction;
+    HbAction *mToolbarPasteAction;
+
+    HbIcon mSelectionModeOnIcon;
+    HbIcon mSelectionModeOffIcon;
+
+    // flags
+    bool mItemHighlighted;
+    bool mLocationChanged;
+    // flag for removing source file after copied to target file
+    bool mRemoveFileAfterCopied;
+    bool mClipBoardInUse;
+    QModelIndex mCurrentIndex;
+
+    // temporarily storage
+    QString mOldPassword;
+    QString mPanicCategory;
+    QString mAbsoluteFilePath;
+    OverwriteOptions mOverwriteOptions;
+    QString mTargetDir;
+    QModelIndex mModelIndex;
+    QString mNewFileName;
+    bool mProceed;
+    bool mEraseMBR;
+};
+
+
+
+#endif /* FBFILEVIEWH_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbfolderselectiondialog.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef FBFOLDERSELECTIONDIALOG_H_
+#define FBFOLDERSELECTIONDIALOG_H_
+
+#include <HbDialog>
+
+// forward declarations
+class FbFolderSelectorWrapper;
+class HbListWidget;
+class HbListWidgetItem;
+class HbLabel;
+class QFileIconProvider;
+
+class FbFolderSelectionDialog : public HbDialog
+{
+    Q_OBJECT
+
+public:
+    explicit FbFolderSelectionDialog(QGraphicsItem *parent = 0);
+    virtual ~FbFolderSelectionDialog();
+
+    QString selectedFolder();
+
+private:
+    void init();
+    void createHeading();
+    void createList();
+    void createToolBar();
+
+private slots:
+    void activated(HbListWidgetItem *);
+    void refreshView();
+    void moveUpPressed();
+    void acceptTriggered();
+
+protected:
+    HbLabel *mTitle;
+
+private:
+    HbLabel *mCurrentPath;
+    HbListWidget *mFolderList;
+    FbFolderSelectorWrapper *mFolderSelectorWrapper;
+    QFileIconProvider *mFileIconProvider;
+};
+
+class FbCopyToFolderSelectionDialog : public FbFolderSelectionDialog
+{
+    Q_OBJECT
+
+public:
+    explicit FbCopyToFolderSelectionDialog(QGraphicsItem *parent = 0);
+};
+
+class FbMoveToFolderSelectionDialog : public FbFolderSelectionDialog
+{
+    Q_OBJECT
+
+public:
+    explicit FbMoveToFolderSelectionDialog(QGraphicsItem *parent = 0);
+};
+
+#endif // FBFOLDERSELECTIONDIALOG_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbfolderselectorwrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* 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 FBFOLDERSELECTORWRAPPER_H_
+#define FBFOLDERSELECTORWRAPPER_H_
+
+#include "fbdriveentry.h"
+#include "fbfileentry.h"
+#include "FBFolderSelector.h"
+
+#include <QString>
+#include <QStringList>
+#include <QModelIndexList>
+
+class CEngine;
+class SearchAttributes;
+class SearchResults;
+class FileBrowserView;
+class HbProgressDialog;
+
+class QModelIndex;
+class CFileBrowserFolderSelector;
+class EngineWrapper;
+
+
+/**
+ * class that is used for communicating between Symbian and Qt code.
+ */
+class FbFolderSelectorWrapper : public QObject, public MFolderSelectorUI
+{
+    Q_OBJECT
+public:
+    FbFolderSelectorWrapper();
+    ~FbFolderSelectorWrapper();
+    
+    bool init();
+
+    QString currentPath() const;
+    bool isDriveListViewActive() const;
+    int itemCount() const;
+    FbDriveEntry getDriveEntry(const int aIndex) const;
+    FbFileEntry getFileEntry(const int aIndex) const;
+
+    void moveDownToDirectory(int);
+    void moveUpOneLevel();
+
+signals:
+    void FolderSelectionChanged();
+
+public:  // From MFolderSelectorUI
+    virtual void InformFolderSelectionChanged();
+
+private:
+    CFileBrowserFolderSelector *mDestinationFolderSelector;
+};
+
+#endif // FBFOLDERSELECTORWRAPPER_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbmainwindow.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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 FBMAINWINDOW_H_
+#define FBMAINWINDOW_H_
+
+#include <HbMainWindow>
+
+class HbApplication;
+class HbView;
+
+class EngineWrapper;
+class FbDriveView;
+class FbFileView;
+class FbSettingsView;
+class FbEditorView;
+class FbSearchView;
+class FbAttributesView;
+class QWidget;
+
+class FbMainWindow : public HbMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit FbMainWindow(QWidget *parent = 0);
+    virtual ~FbMainWindow();
+    
+    void init();
+
+private slots:
+    void openPreviousBrowserView();
+    void openFileBrowserView(bool);
+    void openDriveView();
+    void openFileView();
+    void openSettingsView();
+    void openEditorView(const QString &, bool);
+
+    void openSearchView(const QString &);
+    void closeSearchView(bool);
+
+    void openAttributesView(const QString &, quint32 &, quint32 &, bool &);
+    void closeAttributesView(bool);
+    
+private:
+    EngineWrapper *mEngineWrapper;
+    FbDriveView *mDriveView;
+    FbFileView *mFileView;
+    FbSettingsView *mSettingsView;
+    FbEditorView *mEditorView;
+    FbSearchView *mSearchView;
+    FbAttributesView *mAttributesView;
+    HbView *mPreviousView;
+};
+
+#endif /* FBMAINWINDOW_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbpropertiesdialog.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef FBPROPERTIESDIALOG_H_
+#define FBPROPERTIESDIALOG_H_
+
+#include <HbDialog>
+#include <QVector>
+#include <QPair>
+
+// forward declarations
+class HbMarqueeItem;
+class QString;
+class QGraphicsItem;
+class QGraphicsGridLayout;
+
+class FbPropertiesDialog : public HbDialog
+{
+    Q_OBJECT
+
+public:
+    explicit FbPropertiesDialog(QGraphicsItem *parent = 0);
+    virtual ~FbPropertiesDialog();
+
+    void setTitle(const QString &);
+    void setProperties(const QVector<QPair<QString, QString> > &);
+
+private:
+    void createHeading();
+    void createContentWidget();
+    void createToolBar();
+private:
+    HbMarqueeItem *mTitle;
+    QGraphicsGridLayout *mGridLayout;
+};
+
+#endif // FBPROPERTIESDIALOG_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbsearchview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* 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 FBSEARCHVIEW_H
+#define FBSEARCHVIEW_H
+
+#include <HbView>
+
+#include <QDateTime>
+#include <QString>
+
+class QStringList;
+
+class EngineWrapper;
+class HbDataForm;
+class HbDataFormModelItem;
+class HbProgressDialog;
+
+/**
+  * Settings class that is used for 
+  */
+class SearchAttributes
+{
+public:
+    QString   mSearchDir;
+    QString   mWildCards;
+    QString   mTextInFile;
+    int       mMinSize;
+    int       mMaxSize;
+    QDate     mMinDate;
+    QDate     mMaxDate;
+    bool      mRecurse;
+    bool      mDefaultWildCard;
+};
+
+/**
+ * search results class.
+ */
+class SearchResults
+{
+public:
+    int mNumberOfFoundFiles;
+    QStringList *mFoundFilesList;
+};
+
+class FbSearchView : public HbView
+{
+    Q_OBJECT
+
+public:
+    explicit FbSearchView(QGraphicsItem *parent = 0);
+    ~FbSearchView();
+
+    void open(const SearchAttributes &, const QString &);
+    void startFileSearch(EngineWrapper *);
+
+signals:
+    void finished(bool ok);
+
+private slots:
+    void accept();
+    void reject();
+
+private:
+    void initDataForm();
+    void createToolbar();
+    void loadAttributes();
+    void readFormItems();
+
+private:
+    /* Search attributes */
+    SearchAttributes mAttributes;    
+    /* Search results */
+    SearchResults mResults;
+
+    HbDataForm *mForm;
+    HbDataFormModelItem *mSearchFileNameItem;
+    HbDataFormModelItem *mWildCardItem;
+    HbDataFormModelItem *mHasString;
+    HbDataFormModelItem *mRecurse;
+    HbDataFormModelItem *mMinSize;
+    HbDataFormModelItem *mMaxSize;
+    HbDataFormModelItem *mMinDate;
+    HbDataFormModelItem *mMaxDate;
+    QString mPath;
+    HbProgressDialog *mProgressDialog;
+};
+
+#endif // FBSEARCHVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/fbsettingsview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* 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 FBSETTINGSVIEW_H
+#define FBSETTINGSVIEW_H
+
+#include <hbview.h>
+
+class HbDataForm;
+class HbDataFormModelItem;
+class EngineWrapper;
+class FileBrowserSettings;
+
+class FbSettingsView : public HbView
+{
+    Q_OBJECT
+
+public:
+    FbSettingsView(EngineWrapper &engineWrapper);
+    virtual ~FbSettingsView();
+
+    void initDataForm();
+signals:
+    void finished(bool ok);
+
+public slots:
+//    void displayModeChanged();
+//    void fileViewChanged();
+//    void subDirectoryInfoChanged();
+//    void associatedIconsChanged();
+//    void rememberFolderOnExitChanged();
+//    void rememberLastFolderChanged();
+//    void showToolbarChanged();
+
+//    void toggleChange(QModelIndex, QModelIndex);
+    void accept();
+    void reject();
+
+private:
+    void createToolbar();
+    void constructMenu();
+    void loadSettings(const FileBrowserSettings &settings);
+    void saveSettings(FileBrowserSettings &settings);
+
+private:
+    EngineWrapper &mEngineWrapper;
+
+    HbDataForm *mForm;
+    HbDataFormModelItem *mDisplayModeItem;
+    HbDataFormModelItem *mFileViewItem;
+    HbDataFormModelItem *mShowDirectoryInfoItem;
+    HbDataFormModelItem *mShowAssociatedIconsItem;
+    HbDataFormModelItem *mRememberFolderOnExitItem;
+    HbDataFormModelItem *mRememberLastFolderItem;
+    HbDataFormModelItem *mShowToolbarItem;
+
+    HbDataFormModelItem *mSupportNetDrivesItem; //"Support net drives"
+    HbDataFormModelItem *mBypassPlatformSecurityItem; //"Bypass plat.security"
+    HbDataFormModelItem *mUnlockFilesViaSBItem; //"Unlock files via SB"
+    HbDataFormModelItem *mIgnoreProtectionAttributesItem; //"Ign. protection atts"
+    HbDataFormModelItem *mNoROAttributeCopyFromZItem; //"No RO-att copy from Z:"
+
+};
+
+#endif // FBSETTINGSVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/filebrowsersettings.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef FILEBROWSERSETTINGS_H_
+#define FILEBROWSERSETTINGS_H_
+
+#include "engine.h"
+#include "enginewrapper.h"
+
+#include <QString>
+
+/**
+  * Settings class that is used for ui settings handling
+  */
+class FileBrowserSettings
+{
+public:
+    FileBrowserSettings(TFileBrowserSettings *aSettings) : mSettings(aSettings) { }
+    ~FileBrowserSettings() { }
+
+    int displayMode() const { return mSettings->iDisplayMode; }
+    void setDisplayMode(int displayMode) { mSettings->iDisplayMode = displayMode; }
+
+    int fileViewMode() const { return mSettings->iFileViewMode; }
+    void setFileViewMode(int fileViewMode) { mSettings->iFileViewMode = fileViewMode; }
+
+    bool showSubDirectoryInfo() const { return mSettings->iShowSubDirectoryInfo; }
+    void setShowSubDirectoryInfo(bool showSubDirectoryInfo) { mSettings->iShowSubDirectoryInfo = showSubDirectoryInfo; }
+
+    bool showAssociatedIcons() const { return mSettings->iShowAssociatedIcons; }
+    void setShowAssociatedIcons(bool showAssociatedIcons) { mSettings->iShowAssociatedIcons = showAssociatedIcons; }
+
+    bool rememberLastPath() const { return mSettings->iRememberLastPath; }
+    void setRememberLastPath(bool rememberLastPath) { mSettings->iRememberLastPath = rememberLastPath; }
+
+    QString lastPath() const { return QString((QChar*)mSettings->iLastPath.Ptr(),mSettings->iLastPath.Length()); }
+    void lastPath(const QString& lastPath) { mSettings->iLastPath = lastPath.utf16(); }
+
+    bool rememberFolderSelection() const { return mSettings->iRememberFolderSelection; }
+    void setRememberFolderSelection(bool rememberFolderSelection) { mSettings->iRememberFolderSelection = rememberFolderSelection; }
+
+    bool enableToolbar() const { return mSettings->iEnableToolbar; }
+    void setEnableToolbar(bool enableToolbar) { mSettings->iEnableToolbar = enableToolbar; }
+
+    bool supportNetworkDrives() const { return mSettings->iSupportNetworkDrives; }
+    void setSupportNetworkDrives(bool supportNetworkDrives) { mSettings->iSupportNetworkDrives = supportNetworkDrives; }
+
+    bool bypassPlatformSecurity() const { return mSettings->iBypassPlatformSecurity; }
+    void setBypassPlatformSecurity(bool bypassPlatformSecurity) { mSettings->iBypassPlatformSecurity = bypassPlatformSecurity; }
+
+    bool removeFileLocks() const { return mSettings->iRemoveFileLocks; }
+    void setRemoveFileLocks(bool removeFileLocks) { mSettings->iRemoveFileLocks = removeFileLocks; }
+
+    bool ignoreProtectionsAttributes() const { return mSettings->iIgnoreProtectionsAtts; }
+    void setIgnoreProtectionsAttributes(bool ignoreProtectionsAttributes) { mSettings->iIgnoreProtectionsAtts = ignoreProtectionsAttributes; }
+
+    bool removeROMWriteProrection() const { return mSettings->iRemoveROMWriteProrection; }
+    void setRemoveROMWriteProrection(bool removeROMWriteProrection) { mSettings->iRemoveROMWriteProrection = removeROMWriteProrection; }
+
+private:
+    TFileBrowserSettings *mSettings;
+};
+
+#endif /* FILEBROWSERSETTINGS_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/filebrowsersortfilterproxymodel.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* 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 FILEBROWSERSORTFILTERPROXYMODEL_H
+#define FILEBROWSERSORTFILTERPROXYMODEL_H
+
+#include <QString>
+#include <QSortFilterProxyModel>
+
+class FileBrowserSortFilterProxyModel : public QSortFilterProxyModel
+{
+    Q_OBJECT
+
+public:
+    FileBrowserSortFilterProxyModel(QObject *parent = 0);
+
+    QString filterCriteria() const { return mFilterCriteria; }
+    void setFilterCriteria(const QString &criteria);
+
+protected:
+    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+
+private:
+    QString mFilterCriteria;
+};
+
+#endif // FILEBROWSERSORTFILTERPROXYMODEL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/menuaction.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,331 @@
+/*
+* 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 MENUACTION_H
+#define MENUACTION_H
+
+class HbMenu;
+class HbAction;
+
+class OptionMenuActions
+{
+public:
+    OptionMenuActions() :
+            mFileMenu(0),
+            mFileBackMoveUp(0),
+            mFileOpenDrive(0),
+            mFileOpenDirectory(0),
+            mFileSearch(0),
+            mFileNewMenu(0),
+            mFileNewFile(0),
+            mFileNewDirectory(0),
+            mFileDelete(0),
+            mFileRename(0),
+            mFileTouch(0),
+            mFileProperties(0),
+            mFileChecksumsMenu(0),
+            mFileChecksumsMD5(0),
+            mFileChecksumsMD2(0),
+            mFileChecksumsSHA1(0),
+            mFileSetAttributes(0),
+            //Edit -
+            mEditMenu(0),
+            mEditSnapShotToE(0),
+            mEditCut(0),
+            mEditCopy(0),
+            mEditPaste(0),
+            mEditCopyToFolder(0),
+            mEditMoveToFolder(0),
+            mEditSelect(0),
+            mEditUnselect(0),
+            mEditSelectAll(0),
+            mEditUnselectAll(0),
+            // View -
+            mViewMenu(0),
+            mViewFilterEntries(0),
+            mViewRefresh(0),
+            // Disk admin -
+            mDiskAdminMenu(0),
+            mDiskAdminSetDrivePassword(0),
+            mDiskAdminUnlockDrive(0),
+            mDiskAdminClearDrivePassword(0),
+            mDiskAdminEraseDrivePassword(0),
+            mDiskAdminFormatDrive(0),
+            mDiskAdminQuickFormatDrive(0),
+            mDiskAdminCheckDisk(0),
+            mDiskAdminScanDrive(0),
+            mDiskAdminSetDriveName(0),
+            mDiskAdminSetDriveVolumeLabel(0),
+            mDiskAdminEjectDrive(0),
+            mDiskAdminDismountDrive(0),
+            mDiskAdminEraseMBR(0),
+            mDiskAdminPartitionDrive(0),
+            // Tools -
+            mToolsMenu(0),
+            mToolsAllAppsToTextFile(0),
+            mToolsAllFilesToTextFile(0),
+            mToolsAvkonIconCacheMenu(0),
+            mToolsAvkonIconCacheEnable(0),
+            mToolsAvkonIconCacheDisable(0),
+            mToolsDisableExtendedErrors(0),
+            mToolsDumpMsgStoreWalk(0),
+            mToolsEditDataTypes(0),
+            mToolsEnableExtendedErrors(0),
+            mToolsErrorSimulateMenu(0),
+            mToolsErrorSimulateLeave(0),
+            mToolsErrorSimulatePanic(0),
+            mToolsErrorSimulateException(0),
+            mToolsMessageAttachmentsMenu(0),
+            mToolsMessageInbox(0),
+            mToolsMessageDrafts(0),
+            mToolsMessageSentItems(0),
+            mToolsMessageOutbox(0),
+            mToolsLocalConnectivityMenu(0),
+            mToolsLocalConnectivityActivateInfrared(0),
+            mToolsLocalConnectivityLaunchBTUI(0),
+            mToolsLocalConnectivityLaunchUSBUI(0),
+            mToolsMemoryInfo(0),
+            mToolsSecureBackupMenu(0),
+            mToolsSecureBackStart(0),
+            mToolsSecureBackRestore(0),
+            mToolsSecureBackStop(0),
+            mToolsSetDebugMask(0),
+            mToolsShowOpenFilesHere(0),
+            mSelection(0),
+            mSetting(0),
+            mAbout(0),
+            mExit(0)
+    {
+
+    }
+
+    ~OptionMenuActions() { }
+public:
+    //File menu operations
+    HbMenu *mFileMenu;
+    HbAction *mFileBackMoveUp;
+    HbAction *mFileOpenDrive;
+    HbAction *mFileOpenDirectory;
+    HbAction *mFileSearch;
+    HbMenu *mFileNewMenu;
+    HbAction *mFileNewFile;
+    HbAction *mFileNewDirectory;
+    HbAction *mFileDelete;
+    HbAction *mFileRename;
+    HbAction *mFileTouch;
+    HbAction *mFileProperties;
+    HbMenu *mFileChecksumsMenu;
+    HbAction *mFileChecksumsMD5;
+    HbAction *mFileChecksumsMD2;
+    HbAction *mFileChecksumsSHA1;
+    HbAction *mFileSetAttributes;
+
+    //Edit -
+    HbMenu *mEditMenu;
+    HbAction *mEditSnapShotToE;
+    HbAction *mEditCut;
+    HbAction *mEditCopy;
+    HbAction *mEditPaste;
+    HbAction *mEditCopyToFolder;
+    HbAction *mEditMoveToFolder;
+    HbAction *mEditSelect;
+    HbAction *mEditUnselect;
+    HbAction *mEditSelectAll;
+    HbAction *mEditUnselectAll;
+
+    // View -
+    HbMenu *mViewMenu;
+    HbAction *mViewFilterEntries;
+    HbAction *mViewRefresh;
+
+    // Disk admin -
+    HbMenu *mDiskAdminMenu;
+    HbAction *mDiskAdminSetDrivePassword;
+    HbAction *mDiskAdminUnlockDrive;
+    HbAction *mDiskAdminClearDrivePassword;
+    HbAction *mDiskAdminEraseDrivePassword;
+    HbAction *mDiskAdminFormatDrive;
+    HbAction *mDiskAdminQuickFormatDrive;
+    HbAction *mDiskAdminCheckDisk;
+    HbAction *mDiskAdminScanDrive;
+    HbAction *mDiskAdminSetDriveName;
+    HbAction *mDiskAdminSetDriveVolumeLabel;
+    HbAction *mDiskAdminEjectDrive;
+    HbAction *mDiskAdminDismountDrive;
+    HbAction *mDiskAdminEraseMBR;
+    HbAction *mDiskAdminPartitionDrive;
+
+    // Tools -
+    HbMenu *mToolsMenu;
+    HbAction *mToolsAllAppsToTextFile;
+    HbAction *mToolsAllFilesToTextFile;
+
+    HbMenu *mToolsAvkonIconCacheMenu;
+    HbAction *mToolsAvkonIconCacheEnable;
+    HbAction *mToolsAvkonIconCacheDisable;
+
+    HbAction *mToolsDisableExtendedErrors;
+    HbAction *mToolsDumpMsgStoreWalk;
+    HbAction *mToolsEditDataTypes;
+
+    HbAction *mToolsEnableExtendedErrors;
+
+    HbMenu *mToolsErrorSimulateMenu;    
+    HbAction *mToolsErrorSimulateLeave;
+    HbAction *mToolsErrorSimulatePanic;
+    HbAction *mToolsErrorSimulateException;
+
+    HbMenu *mToolsMessageAttachmentsMenu;
+    HbAction *mToolsMessageInbox;
+    HbAction *mToolsMessageDrafts;
+    HbAction *mToolsMessageSentItems;
+    HbAction *mToolsMessageOutbox;
+
+    HbMenu *mToolsLocalConnectivityMenu;
+    HbAction *mToolsLocalConnectivityActivateInfrared;
+    HbAction *mToolsLocalConnectivityLaunchBTUI;
+    HbAction *mToolsLocalConnectivityLaunchUSBUI;
+
+    HbAction *mToolsMemoryInfo;
+
+    HbMenu *mToolsSecureBackupMenu;
+    HbAction *mToolsSecureBackStart;
+    HbAction *mToolsSecureBackRestore;
+    HbAction *mToolsSecureBackStop;
+
+    HbAction *mToolsSetDebugMask;
+    HbAction *mToolsShowOpenFilesHere;
+
+    HbAction *mSelection;
+    HbAction *mSetting;
+    HbAction *mAbout;
+    HbAction *mExit;
+};
+
+
+class ContextMenuActions
+{
+public:
+    ContextMenuActions() :
+            mOpenDirectory(0),
+            mSearch(0),
+            //File -
+            mFileMenu(0),
+            mFileBackMoveUp(0),
+            mFileOpenDrive(0),
+            mFileOpenDirectory(0),
+            mFileSearch(0),
+            mFileNewMenu(0),
+            mFileNewFile(0),
+            mFileNewDirectory(0),
+            mFileDelete(0),
+            mFileRename(0),
+            mFileTouch(0),
+            mFileProperties(0),
+            mFileChecksumsMenu(0),
+            mFileChecksumsMD5(0),
+            mFileChecksumsMD2(0),
+            mFileChecksumsSHA1(0),
+            mFileSetAttributes(0),
+            //Edit -
+            mEditMenu(0),
+//            mEditSnapShotToE(0),
+            mEditCut(0),
+            mEditCopy(0),
+            mEditPaste(0),
+            mEditCopyToFolder(0),
+            mEditMoveToFolder(0),
+            // View -
+//            mViewMenu(0),
+//            mViewFilterEntries(0),
+//            mViewRefresh(0),
+            // Disk admin -
+            mDiskAdminMenu(0),
+            mDiskAdminSetDrivePassword(0),
+            mDiskAdminUnlockDrive(0),
+            mDiskAdminClearDrivePassword(0),
+            mDiskAdminEraseDrivePassword(0),
+            mDiskAdminFormatDrive(0),
+            mDiskAdminQuickFormatDrive(0),
+            mDiskAdminCheckDisk(0),
+            mDiskAdminScanDrive(0),
+            mDiskAdminSetDriveName(0),
+            mDiskAdminSetDriveVolumeLabel(0),
+            mDiskAdminEjectDrive(0),
+            mDiskAdminDismountDrive(0),
+            mDiskAdminEraseMBR(0),
+            mDiskAdminPartitionDrive(0)
+    {
+
+    }
+
+    ~ContextMenuActions() { }
+public:
+    HbAction *mOpenDirectory;
+    HbAction *mSearch;
+    //File menu operations
+    HbMenu *mFileMenu;
+    HbAction *mFileBackMoveUp;
+    HbAction *mFileOpenDrive;
+    HbAction *mFileOpenDirectory;
+    HbAction *mFileSearch;
+    HbMenu *mFileNewMenu;
+    HbAction *mFileNewFile;
+    HbAction *mFileNewDirectory;
+    HbAction *mFileDelete;
+    HbAction *mFileRename;
+    HbAction *mFileTouch;
+    HbAction *mFileProperties;
+    HbMenu *mFileChecksumsMenu;
+    HbAction *mFileChecksumsMD5;
+    HbAction *mFileChecksumsMD2;
+    HbAction *mFileChecksumsSHA1;
+    HbAction *mFileSetAttributes;
+
+    //Edit -
+    HbMenu *mEditMenu;
+//    HbAction *mEditSnapShotToE;
+    HbAction *mEditCut;
+    HbAction *mEditCopy;
+    HbAction *mEditPaste;
+    HbAction *mEditCopyToFolder;
+    HbAction *mEditMoveToFolder;
+
+//    // View -
+//    HbMenu *mViewMenu;
+//    HbAction *mViewFilterEntries;
+//    HbAction *mViewRefresh;
+
+    // Disk admin -
+    HbMenu *mDiskAdminMenu;
+    HbAction *mDiskAdminSetDrivePassword;
+    HbAction *mDiskAdminUnlockDrive;
+    HbAction *mDiskAdminClearDrivePassword;
+    HbAction *mDiskAdminEraseDrivePassword;
+    HbAction *mDiskAdminFormatDrive;
+    HbAction *mDiskAdminQuickFormatDrive;
+    HbAction *mDiskAdminCheckDisk;
+    HbAction *mDiskAdminScanDrive;
+    HbAction *mDiskAdminSetDriveName;
+    HbAction *mDiskAdminSetDriveVolumeLabel;
+    HbAction *mDiskAdminEjectDrive;
+    HbAction *mDiskAdminDismountDrive;
+    HbAction *mDiskAdminEraseMBR;
+    HbAction *mDiskAdminPartitionDrive;
+};
+
+#endif // MENUACTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/inc/notifications.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* 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 NOTIFICATIONS_H_
+#define NOTIFICATIONS_H_
+
+#include <hbmessagebox.h>
+
+class HbProgressDialog;
+
+class Notifications
+{
+public:
+    static void showAboutNote();
+    static void showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout = HbPopup::NoTimeout);
+    static void showInformationNote(const QString &text, const QString &title = QString());
+    static void showErrorNote(const QString &text, bool noTimeout = false);
+    static void showConfirmationNote(const QString &text, bool noTimeout = false);
+    static bool showConfirmationQuery(const QString &aText);
+};
+
+#endif // NOTIFICATIONS_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/enginewrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1004 @@
+/*
+* 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 "enginewrapper.h"
+#include "engine.h"
+#include "FBFileUtils.h"
+#include "notifications.h"
+#include "fbfileview.h"
+#include "fbsearchview.h"
+#include "filebrowsersettings.h"
+//#include "fbsettingsview.h"
+
+#include <HbProgressDialog>
+
+#include <QString>
+#include <QFileInfo>
+#include <QModelIndex>
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::EngineWrapper()
+    : mEngine(0),
+    mFilesFound(),
+    mSettings(0),
+    mProgressDialog(0),
+    mWaitDialog(0)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::~EngineWrapper()
+{
+    if(mEngine != NULL) {
+        TRAP_IGNORE(mEngine->DeActivateEngineL());
+        delete mEngine;
+    } 
+    if (mProgressDialog)
+        delete mProgressDialog;
+
+    if (mWaitDialog)
+        delete mWaitDialog;
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::init()
+{
+    TRAPD(err, mEngine = CEngine::NewL(this));
+    if (err != KErrNone) {
+        return false;
+    } else {
+        TRAP_IGNORE(mEngine->ActivateEngineL());
+        mSettings = FileBrowserSettings(&mEngine->Settings());
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+// Functions that are called from UI
+// ---------------------------------------------------------------------------
+bool EngineWrapper::searchFiles()
+{
+    TRAPD(err, mEngine->SearchL() );
+    if(err != KErrNone) {
+        return false;
+    }
+    else {
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+SearchAttributes EngineWrapper::getFileSearchAttributes()
+{
+    TSearchAttributes tAttributes = mEngine->GetSearchAttributes();
+    SearchAttributes attributes;
+
+    // Convert TSearchAttributes to SearchAttributes 
+    attributes.mSearchDir  = QString((QChar*)tAttributes.iSearchDir.Ptr(),tAttributes.iSearchDir.Length());
+    attributes.mWildCards  = QString((QChar*)tAttributes.iWildCards.Ptr(),tAttributes.iWildCards.Length()); 
+    attributes.mTextInFile = QString((QChar*)tAttributes.iTextInFile.Ptr(),tAttributes.iTextInFile.Length()); 
+    attributes.mMinSize    = tAttributes.iMinSize;
+    attributes.mMaxSize    = tAttributes.iMaxSize;
+    attributes.mRecurse    = tAttributes.iRecurse;
+    attributes.mDefaultWildCard = tAttributes.iDefaultWildCard;
+    
+    // TTime to QDate
+    TBuf<20> timeString;
+    _LIT(KDateString,"%D%M%Y%/0%1%/1%2%/2%3%/3");
+    TRAP_IGNORE( tAttributes.iMinDate.FormatL(timeString, KDateString) );
+    QString temp = QString::fromUtf16(timeString.Ptr(), timeString.Length());
+    temp.replace(QChar('/'), QChar('-'));
+    attributes.mMinDate = QDate::fromString(temp, "dd-MM-yyyy");
+    
+    
+    TRAP_IGNORE( tAttributes.iMaxDate.FormatL(timeString, KDateString) );
+    temp = QString::fromUtf16(timeString.Ptr(), timeString.Length());
+    temp.replace(QChar('/'), QChar('-'));
+    attributes.mMaxDate = QDate::fromString(temp, "dd-MM-yyyy");
+    
+    return attributes;
+
+}
+
+// ---------------------------------------------------------------------------
+int EngineWrapper::setFileSearchAttributes(SearchAttributes attributes)
+{
+    TSearchAttributes tAttributes;
+    // Convert SearchAttributes to TSearchAttributes 
+    
+    //convert QString to TFilename:
+    tAttributes.iSearchDir = TFileName(attributes.mSearchDir.utf16());
+    tAttributes.iWildCards = TFileName(attributes.mWildCards.utf16());
+    tAttributes.iTextInFile = TFileName(attributes.mTextInFile.utf16());
+    
+    tAttributes.iMinSize    = attributes.mMinSize;
+    tAttributes.iMaxSize    = attributes.mMaxSize;    
+    tAttributes.iRecurse    = attributes.mRecurse;
+    tAttributes.iDefaultWildCard = attributes.mDefaultWildCard;
+    
+    // QDate to TTime for both min- and max Date
+    QString temp = attributes.mMinDate.toString("yyyy-MM-dd");
+    QStringList dateList = temp.split("-");
+    int month = dateList[1].toInt() - 1;
+    int day = dateList[2].toInt() - 1;
+    temp = dateList[0];
+    if (month == 0) {
+        temp.append("00");
+    }
+    else {
+        temp.append(QString::number(month));
+    }
+    if (day == 0) {
+        temp.append("00");
+    }
+    else { 
+        temp.append(QString::number(day));
+    }
+    temp.append(":");
+        
+    TBuf<24> dateString(temp.utf16());
+    tAttributes.iMinDate.Set(dateString);
+    
+    temp = attributes.mMaxDate.toString("yyyy-MM-dd");
+    dateList = temp.split("-");
+    month = dateList[1].toInt() - 1;
+    day = dateList[2].toInt() - 1;
+    temp = dateList[0];
+    if (month == 0) {
+        temp.append("00");
+    }
+    else {
+        temp.append(QString::number(month));
+    }
+    if (day == 0) {
+        temp.append("00");
+    }
+    else { 
+        temp.append(QString::number(day));
+    }
+    temp.append(":");
+    dateString.Copy(temp.utf16());
+    tAttributes.iMaxDate.Set(dateString);
+    
+    mEngine->ChangeAttributes(tAttributes);
+    return KErrNone;
+}
+
+
+// ---------------------------------------------------------------------------
+SearchResults EngineWrapper::getSearchResults()
+{
+    TSearchResults tResults = mEngine->SearchResults();
+    SearchResults results;
+    results.mNumberOfFoundFiles = tResults.iNumberOfFoundFiles;
+    CFileEntryList* foundFilesResult = mEngine->FoundFiles();
+    if (!mFilesFound.isEmpty()) {
+        mFilesFound.clear();
+        }
+    // copy file names and convert them from TFileName format to QStringList items type
+    for (int i = 0; i < foundFilesResult->Count(); i++) {
+            mFilesFound.append(
+                    QString((QChar*)foundFilesResult->At(i).iFullName.Ptr(), 
+                    foundFilesResult->At(i).iFullName.Length()) 
+                    );
+        }
+    results.mFoundFilesList = &mFilesFound;
+    return results;
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::saveSettings(bool aNotifyModules)
+{
+    return mEngine->SaveSettingsL(aNotifyModules);;
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::isDriveListViewActive()
+{
+    // TODO check return value
+    if (mEngine->FileUtils() && mEngine->FileUtils()->IsDriveListViewActive()) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+bool EngineWrapper::isCurrentDriveReadOnly()
+{
+    // TODO check return value
+    if (mEngine->FileUtils() && mEngine->FileUtils()->IsCurrentDriveReadOnly()) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+bool EngineWrapper::isClipBoardListInUse()
+{
+    if (mEngine->FileUtils() && mEngine->FileUtils()->ClipBoardList() && mEngine->FileUtils()->ClipBoardList()->Count() != 0)
+        return true;
+    else
+        return false;
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::startExecutingCommands(const QString &aCommandsExecutionMessage)
+{
+    TPtrC commandsExecutionMessage(reinterpret_cast<const TText*>(aCommandsExecutionMessage.constData()));
+    TRAPD(err, mEngine->FileUtils()->StartExecutingCommandsL(commandsExecutionMessage) );
+    Q_UNUSED(err); //TODO
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::refreshView()
+{
+    if (mEngine->FileUtils()) {
+        TRAPD(err, mEngine->FileUtils()->RefreshViewL() );
+        Q_UNUSED(err); //TODO
+    }
+}
+
+void EngineWrapper::moveUpOneLevel()
+{
+    if (mEngine->FileUtils()) {
+        TRAPD(err, mEngine->FileUtils()->MoveUpOneLevelL() );
+        Q_UNUSED(err); //TODO
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::moveDownToDirectory(const QModelIndex& aIndex)
+{
+    if (mEngine->FileUtils()) {
+        TRAPD(err, mEngine->FileUtils()->MoveDownToDirectoryL(aIndex.row()) );
+        Q_UNUSED(err); //TODO
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+int EngineWrapper::clipboardCut(const QModelIndexList& aSelectionIndices)
+{
+    TInt operations = 0;
+    const CArrayFix<TInt> *selectionIndexes = convertSelectionList(aSelectionIndices);
+    if (mEngine->FileUtils()) {
+        TRAPD(err, operations = mEngine->FileUtils()->ClipboardCutL(selectionIndexes) );
+        Q_UNUSED(err); //TODO
+    }
+    delete selectionIndexes;
+    return operations;
+}
+
+// ---------------------------------------------------------------------------
+int EngineWrapper::clipboardCopy(const QModelIndexList& aSelectionIndices)
+{
+    TInt operations = 0;
+    const CArrayFix<TInt> *selectionIndexes = convertSelectionList(aSelectionIndices);
+
+    if (mEngine->FileUtils()) {
+        TRAPD(err, operations = mEngine->FileUtils()->ClipboardCopyL(selectionIndexes));
+        Q_UNUSED(err); //TODO
+    }
+    delete selectionIndexes;
+    return operations;
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::clipboardPaste(const OverwriteOptions &aOverwriteOptions)
+{
+    TOverwriteOptions tOverwriteOptions = convertOverwriteOptions(aOverwriteOptions);
+    if (mEngine->FileUtils()) {
+        TRAPD(err, mEngine->FileUtils()->ClipboardPasteL(tOverwriteOptions));
+        Q_UNUSED(err); //TODO
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::copyToFolder(const QString &aTargetDir, const OverwriteOptions &aOverwriteOptions, bool aMove)
+{
+    TFileName targetDir = TFileName(aTargetDir.utf16());
+    TOverwriteOptions tOverwriteOptions = convertOverwriteOptions(aOverwriteOptions);
+
+
+    TRAPD(err, mEngine->FileUtils()->CopyToFolderL(targetDir, tOverwriteOptions, aMove ? ETrue : EFalse) );
+    Q_UNUSED(err); //TODO
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::createNewFile(const QString &aNewFileName)
+{
+    TFileName fileName = TFileName(aNewFileName.utf16());
+    TRAPD(err, mEngine->FileUtils()->NewFileL(fileName) );
+    if (err == KErrNone) {
+        Notifications::showConfirmationNote(QString("New file created"));
+    } else if (err == KErrAlreadyExists) {
+        Notifications::showInformationNote(QString("File already exists"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::createNewDirectory(const QString &aNewDirectoryName)
+{
+    TFileName newDirectoryName = TFileName(aNewDirectoryName.utf16());
+    TRAPD(err, mEngine->FileUtils()->NewDirectoryL(newDirectoryName) );
+    if (err == KErrNone) {
+        Notifications::showConfirmationNote(QString("New directory created"));
+    } else if (err == KErrAlreadyExists) {
+        Notifications::showInformationNote(QString("Directory already exists"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::deleteItems(const QModelIndexList& aSelectionIndices)
+{
+    setCurrentSelection(aSelectionIndices);
+    TRAPD(err, mEngine->FileUtils()->DeleteL() );
+    Q_UNUSED(err); //TODO
+}
+
+// ---------------------------------------------------------------------------
+bool EngineWrapper::selectionHasDirs()
+{
+    return mEngine->FileUtils()->SelectionHasDirs();
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::rename(const QModelIndex& aIndex, const QString aNewName)
+{
+    if (mEngine->FileUtils()) {
+        const TFileName newName = TFileName(aNewName.utf16());
+        TRAPD(err, mEngine->FileUtils()->RenameL(aIndex.row(), newName) );
+        Q_UNUSED(err); //TODO
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::touch(bool aRecurse)
+{
+    if (mEngine->FileUtils()) {
+        TRAPD(err, mEngine->FileUtils()->TouchL(aRecurse) );
+        Q_UNUSED(err); //TODO
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+int EngineWrapper::getFilesCount(const QString &aDriveRoot)
+{
+    int count = 0;
+    const TFileName driveRoot = TFileName(aDriveRoot.utf16());
+    if (mEngine->FileUtils()) {
+        TRAPD(err, count = mEngine->FileUtils()->GetFilesCount(driveRoot));
+        Q_UNUSED(err); //TODO
+    }
+    return count;
+}
+
+int EngineWrapper::getFilesCountAndSize(const QString &aDriveRoot, qint64 &aSize)
+{
+    int count = 0;
+    TInt64 size = 0;
+    const TFileName driveRoot = TFileName(aDriveRoot.utf16());
+    if (mEngine->FileUtils()) {
+        TRAPD(err, count = mEngine->FileUtils()->GetFilesCountAndSize(driveRoot, size));
+        aSize = size;
+        Q_UNUSED(err); //TODO
+    }
+    return count;
+}
+
+int EngineWrapper::getEntriesCount(const QString &aDriveRoot)
+{
+    int count = -1;
+    const TFileName driveRoot = TFileName(aDriveRoot.utf16());
+    if (mEngine->FileUtils()) {
+        TRAPD(err, count = mEngine->FileUtils()->GetEntriesCount(driveRoot));
+        Q_UNUSED(err); //TODO
+    }
+    return count;
+}
+
+QString EngineWrapper::getMimeType(const QString &aFullPath)
+{
+    QString qMimeType;
+    if (mEngine->FileUtils()) {
+        const TFileName fullPath = TFileName(aFullPath.utf16());
+        TFileName mimeType = mEngine->FileUtils()->GetMimeType(fullPath);
+        qMimeType = QString::fromUtf16(mimeType.Ptr(), mimeType.Length());
+    }
+    return qMimeType;
+}
+
+QString EngineWrapper::getOpenWith(const QString &aFullPath)
+{
+    QString qOpenWith;
+    if (mEngine->FileUtils()) {
+        const TFileName fullPath = TFileName(aFullPath.utf16());
+        TFileName openWith = mEngine->FileUtils()->GetOpenWith(fullPath);
+        qOpenWith = QString::fromUtf16(openWith.Ptr(), openWith.Length());
+    }
+    return qOpenWith;
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::setAttributes(quint32 &setAttributesMask, quint32 &clearAttributesMask, bool &recurse)
+{
+    if (mEngine->FileUtils()) {
+        TBool tRecurse = recurse ? ETrue : EFalse;
+        TRAPD(err, mEngine->FileUtils()->SetAttributesL(setAttributesMask, clearAttributesMask, tRecurse));
+        Q_UNUSED(err); //TODO
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::openAppArc(QString fileName)
+{
+
+    //convert QString to TFilename:
+    fileName.replace("/", "\\");
+    TFileName fileToOpen = TFileName(fileName.utf16());
+
+    TRAPD(err, mEngine->OpenWithApparcL(fileToOpen) );
+    if(err != KErrNone) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::openDocHandler(QString fileName, bool embeddedVal)
+{
+    //convert QString to TFilename:
+    fileName.replace("/", "\\");
+    TFileName fileToOpen = TFileName(fileName.utf16());
+
+    TRAPD(err, mEngine->OpenWithDocHandlerL(fileToOpen, embeddedVal) );
+    if(err != KErrNone) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+int EngineWrapper::itemCount() const
+{
+    if (mEngine->FileUtils()->IsDriveListViewActive()) {
+        return mEngine->FileUtils()->DriveEntries()->Count();
+    } else {
+        return mEngine->FileUtils()->FileEntries()->Count();
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+FbDriveEntry EngineWrapper::getDriveEntry(const QModelIndex& aIndex) const
+{
+    TDriveEntry driveEntry;
+    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0) {
+        driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
+    }
+    return FbDriveEntry(driveEntry);
+}
+
+// ---------------------------------------------------------------------------
+
+FbFileEntry EngineWrapper::getFileEntry(const QModelIndex& aIndex) const
+{
+    TFileEntry fileEntry;
+    if (mEngine->FileUtils()->FileEntries()->Count() > aIndex.row() && aIndex.row() >= 0) {
+        fileEntry = mEngine->FileUtils()->FileEntries()->At(aIndex.row());
+    }
+    return FbFileEntry(fileEntry);
+}
+
+// ---------------------------------------------------------------------------
+
+const CArrayFix<TInt> *EngineWrapper::convertSelectionList(const QModelIndexList &aSelectionIndices)
+{
+    CArrayFixFlat<TInt>* selectionIndexes = 0;
+    TRAPD(err, selectionIndexes = new(ELeave)CArrayFixFlat<TInt>(4));
+    if (err != KErrNone) {
+        return 0;
+    }
+
+    for (int i=0; i< aSelectionIndices.count(); ++i) {
+        TRAPD(err, selectionIndexes->AppendL(aSelectionIndices.at(i).row()) );
+        Q_UNUSED(err); //TODO
+    }
+    return selectionIndexes;
+}
+
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::setCurrentSelection(const QModelIndexList &aSelectionIndices)
+{
+    const CArrayFix<TInt> *selectionIndexes = convertSelectionList(aSelectionIndices);
+    mEngine->FileUtils()->SetCurrentSelection(selectionIndexes);
+    delete selectionIndexes;
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::isDestinationEntriesExists(const QModelIndexList &aSelectionIndices, QString aTargetDir)
+{
+    TFileName targetDir = TFileName(aTargetDir.utf16());
+    //setCurrentSelection(aSelectionIndices);
+    Q_UNUSED(aSelectionIndices);
+
+    TBool someEntryExists = mEngine->FileUtils()->IsDestinationEntriesExists(targetDir);
+    return someEntryExists;
+}
+
+// ---------------------------------------------------------------------------
+bool EngineWrapper::targetExists(const QModelIndex& aIndex, const QString aNewName)
+{
+    const TFileName newName = TFileName(aNewName.utf16());
+    return mEngine->FileUtils()->TargetExists(aIndex.row(), newName);
+}
+
+// ---------------------------------------------------------------------------
+
+QString EngineWrapper::currentPath() const
+{
+    return QString::fromUtf16(mEngine->FileUtils()->CurrentPath().Ptr(),
+                              mEngine->FileUtils()->CurrentPath().Length());
+}
+
+TOverwriteOptions EngineWrapper::convertOverwriteOptions(const OverwriteOptions &aOverwriteOptions)
+{
+    TOverwriteOptions tOverwriteOptions;
+    tOverwriteOptions.iDoFileOperations = aOverwriteOptions.doFileOperations;
+    tOverwriteOptions.iQueryIndex = aOverwriteOptions.queryIndex;
+    tOverwriteOptions.iPostFix = TFileName(aOverwriteOptions.postFix.utf16());
+    tOverwriteOptions.iOverWriteFlags = aOverwriteOptions.overWriteFlags;
+    return tOverwriteOptions;
+}
+
+bool EngineWrapper::hasDrivePassword(const QModelIndex &aIndex)
+{
+    bool hasPassword = false;
+    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0)
+    {
+        TDriveEntry driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
+        hasPassword = driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttHasPassword;
+    }
+    return hasPassword;
+}
+
+bool EngineWrapper::isDriveRemovable(const QModelIndex &aIndex)
+{
+    bool isRemovable = false;
+    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0)
+    {
+        TDriveEntry driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
+        isRemovable = driveEntry.iVolumeInfo.iDrive.iDriveAtt & KDriveAttRemovable;
+    }
+    return isRemovable;
+}
+
+bool EngineWrapper::isDriveLocked(const QModelIndex &aIndex)
+{
+    bool isRemovable = false;
+    if (mEngine->FileUtils()->DriveEntries()->Count() > aIndex.row() && aIndex.row() >= 0)
+    {
+        TDriveEntry driveEntry = mEngine->FileUtils()->DriveEntries()->At(aIndex.row());
+        isRemovable = driveEntry.iVolumeInfo.iDrive.iMediaAtt & KMediaAttLocked;
+    }
+    return isRemovable;
+}
+
+void EngineWrapper::GetDriveName(const QModelIndex &aIndex, QString &aDriveName)
+{
+    TFileName driveName;
+    mEngine->FileUtils()->GetDriveName(aIndex.row(), driveName);
+    aDriveName = QString::fromUtf16(driveName.Ptr(), driveName.Length());
+}
+
+
+void EngineWrapper::GetDriveVolumeLabel(const QModelIndex &aIndex, QString &aVolumeLabel)
+{
+    TFileName volumeLabel;
+    mEngine->FileUtils()->GetDriveName(aIndex.row(), volumeLabel);
+    aVolumeLabel = QString::fromUtf16(volumeLabel.Ptr(), volumeLabel.Length());
+}
+
+/**
+  * Wrapper function for SetDrivePasswordL
+  */
+void EngineWrapper::DiskAdminSetDrivePassword(const QModelIndex &aIndex,
+                                              const QString &aOldPassword,
+                                              const QString &aNewPassword)
+{
+    TFileName oldPassword = TFileName(aOldPassword.utf16());
+    TFileName newPassword = TFileName(aNewPassword.utf16());
+
+    TRAPD(err, mEngine->FileUtils()->SetDrivePasswordL(aIndex.row(), oldPassword, newPassword));
+
+    if (err == KErrNone) {
+        Notifications::showInformationNote(QString("Password set"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for UnlockDriveL
+  */
+void EngineWrapper::DiskAdminUnlockDrive(const QModelIndex &aIndex, const QString &aOldPassword)
+{
+    TFileName oldPassword = TFileName(aOldPassword.utf16());
+
+    TRAPD(err, mEngine->FileUtils()->UnlockDriveL(aIndex.row(), oldPassword));
+
+    if (err == KErrNone) {
+        Notifications::showInformationNote(QString("Drive unlocked"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for ClearDrivePasswordL
+  */
+void EngineWrapper::DiskAdminClearDrivePassword(const QModelIndex &aIndex, const QString &aOldPassword)
+{
+    TFileName oldPassword = TFileName(aOldPassword.utf16());
+    TRAPD(err, mEngine->FileUtils()->ClearDrivePasswordL(aIndex.row(), oldPassword));
+
+    if (err == KErrNone) {
+        Notifications::showInformationNote(QString("Password cleared"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for ClearDrivePasswordL
+  */
+void EngineWrapper::DiskAdminEraseDrivePassword(const QModelIndex &aIndex)
+{
+    TRAPD(err, mEngine->FileUtils()->EraseDrivePasswordL(aIndex.row()));
+
+    if (err == KErrNone) {
+        Notifications::showInformationNote(QString("Password erased"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        Notifications::showErrorNote(QString("Cannot erase, you may have to format the drive first"));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+void EngineWrapper::DiskAdminFormatDrive(const QModelIndex &aIndex, bool aQuickFormat)
+{
+    TRAP_IGNORE(mEngine->FileUtils()->FormatDriveL(aIndex.row(), aQuickFormat));
+}
+
+void EngineWrapper::DiskAdminQuickFormatDrive(const QModelIndex &aIndex, bool aQuickFormat)
+{
+    TRAP_IGNORE(mEngine->FileUtils()->FormatDriveL(aIndex.row(), aQuickFormat));
+}
+
+void EngineWrapper::DiskAdminCheckDisk(const QModelIndex &aIndex)
+{
+    TRAP_IGNORE(mEngine->FileUtils()->CheckDiskL(aIndex.row()));
+}
+
+/**
+  * Wrapper function for ScanDriveL
+  */
+void EngineWrapper::DiskAdminScanDrive(const QModelIndex &aIndex)
+{
+    TRAPD(err, mEngine->FileUtils()->ScanDriveL(aIndex.row()));
+
+    if (err == KErrNone) {
+        Notifications::showConfirmationNote(QString("Run succesfully"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for SetDriveNameL
+  */
+void EngineWrapper::DiskAdminSetDriveName(const QModelIndex &aIndex, const QString &aDriveName)
+{
+    TFileName driveName = TFileName(aDriveName.utf16());
+    TRAPD(err, mEngine->FileUtils()->SetDriveNameL(aIndex.row(), driveName));
+
+    if (err == KErrNone) {
+        Notifications::showConfirmationNote(QString("Name changed"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for SetDriveVolumeLabelL
+  */
+void EngineWrapper::DiskAdminSetDriveVolumeLabel(const QModelIndex &aIndex, const QString &aVolumeLabel)
+{
+    TFileName volumeLabel = TFileName(aVolumeLabel.utf16());
+    TRAPD(err, mEngine->FileUtils()->SetDriveVolumeLabelL(aIndex.row(), volumeLabel));
+
+    if (err == KErrNone) {
+        Notifications::showConfirmationNote(QString("Volume label changed"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for EjectDriveL
+  */
+void EngineWrapper::DiskAdminEjectDrive(const QModelIndex &aIndex)
+{
+    TRAPD(err, mEngine->FileUtils()->EjectDriveL(aIndex.row()));
+
+    if (err == KErrNone) {
+        Notifications::showConfirmationNote(QString("Ejected succesfully"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for DismountFileSystemL
+  */
+void EngineWrapper::DiskAdminDismountDrive(const QModelIndex &aIndex)
+{
+    TRAPD(err, mEngine->FileUtils()->DismountFileSystemL(aIndex.row()));
+
+    if (err == KErrNone) {
+        Notifications::showConfirmationNote(QString("Dismounted succesfully"));
+    } else if (err == KErrNotSupported) {
+        Notifications::showErrorNote(QString("Not supported for this drive"));
+    } else {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+
+    TRAP_IGNORE(mEngine->FileUtils()->RefreshViewL());
+}
+
+/**
+  * Wrapper function for EraseMBRL
+  */
+void EngineWrapper::DiskAdminEraseMBR(const QModelIndex &aIndex)
+{
+    TRAP_IGNORE(mEngine->FileUtils()->EraseMBRL(aIndex.row()));
+}
+
+/**
+  * Wrapper function for PartitionDriveL
+  */
+void EngineWrapper::DiskAdminPartitionDrive(const QModelIndex &aIndex, bool aEraseMBR, int aAmountOfPartitions)
+{
+    TRAP_IGNORE(mEngine->FileUtils()->PartitionDriveL(aIndex.row(), aEraseMBR, aAmountOfPartitions));
+}
+
+void EngineWrapper::ToolsSetErrRd(bool aEnable)
+{
+    TRAP_IGNORE(mEngine->FileUtils()->SetErrRdL(aEnable));
+}
+
+bool EngineWrapper::ErrRdFileExists()
+{
+    return mEngine->FileUtils()->FileExists(KErrRdPath);
+}
+
+void EngineWrapper::ToolsErrorSimulateLeave(int aLeaveCode)
+{
+    mEngine->FileUtils()->SimulateLeaveL(aLeaveCode);
+}
+
+void EngineWrapper::ToolsErrorSimulatePanic(QString aPanicCategory, int aPanicCode)
+{
+    TBuf<128> panicCategory;
+    panicCategory.Copy(aPanicCategory.utf16());
+    mEngine->FileUtils()->SimulatePanicL(panicCategory, aPanicCode);
+}
+
+void EngineWrapper::ToolsErrorSimulateException(int aExceptionCode)
+{
+    mEngine->FileUtils()->SimulateExceptionL(aExceptionCode);
+}
+
+quint32 EngineWrapper::getDebugMask()
+{
+    return mEngine->FileUtils()->GetDebugMask();
+}
+
+void EngineWrapper::toolsSetDebugMask(quint32 aDbgMask)
+{
+    mEngine->FileUtils()->SetDebugMaskL(aDbgMask);
+}
+
+void EngineWrapper::toolsWriteAllFiles()
+{
+    mEngine->FileUtils()->WriteAllFilesL();
+}
+
+void EngineWrapper::showFileCheckSums(const QModelIndex &aIndex, TFileBrowserCmdFileChecksums checksumType)
+{
+    TRAPD(err, mEngine->FileUtils()->ShowFileCheckSumsL(aIndex.row(), checksumType));
+
+    if (err != KErrNone) {
+        ShowErrorNote(mEngine->FileUtils()->ResolveErrorMessage(err));
+    }
+}
+
+// ---------------------------------------------------------------------------
+// Functions that are called from engine
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowErrorNote(const TDesC& aDescText, TBool aNoTimeout /*= EFalse*/)
+{
+    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
+    Notifications::showErrorNote(qText, aNoTimeout);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowInformationNote(const TDesC &aDescText, const TDesC &aDescTitle)
+{
+    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
+    QString qTitle = QString::fromUtf16(aDescTitle.Ptr(), aDescTitle.Length());
+    Notifications::showInformationNote(qText, qTitle);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowConfirmationNote(const TDesC& aDescText, TBool aNoTimeout /*= EFalse*/)
+{
+    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
+    Notifications::showConfirmationNote(qText, aNoTimeout);
+}
+
+void EngineWrapper::ShowProgressDialog(const TDesC& aDescText, TInt aMinimum, TInt aMaximum )
+{
+    const QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
+    if (!mProgressDialog) {
+        mProgressDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
+        QObject::connect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(progressDialogCancelled()));
+    }
+
+    mProgressDialog->setText(qText);
+    mProgressDialog->setMinimum(aMinimum);
+    mProgressDialog->setMaximum(aMaximum);
+    mEngine->FileUtils()->SetAllowProcessing(true);
+    mProgressDialog->show();
+}
+
+void EngineWrapper::CancelProgressDialog()
+{
+    if (mProgressDialog) {
+        QObject::disconnect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(progressDialogCancelled()));
+        mProgressDialog->cancel();
+        QObject::connect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(progressDialogCancelled()));
+    }
+}
+
+void EngineWrapper::SetProgressValue(TInt aValue)
+{
+    if (mProgressDialog)
+        mProgressDialog->setProgressValue(aValue);
+}
+
+void EngineWrapper::progressDialogCancelled()
+{
+    mEngine->FileUtils()->DialogDismissedL();
+}
+
+void EngineWrapper::ShowWaitDialog(const TDesC& aDescText)
+{
+    const QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
+    if (!mWaitDialog) {
+        mWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
+        QObject::connect(mWaitDialog, SIGNAL(cancelled()), this, SLOT(waitDialogCancelled()));
+    }
+
+    mWaitDialog->setText(qText);
+    mEngine->FileUtils()->SetAllowProcessing(true);
+    //mWaitDialog->setAttribute(Qt::WA_DeleteOnClose);
+    mWaitDialog->show();
+}
+
+void EngineWrapper::CancelWaitDialog()
+{
+    if (mWaitDialog)
+        mWaitDialog->cancel();
+}
+
+void EngineWrapper::waitDialogCancelled()
+{
+    mEngine->FileUtils()->SetAllowProcessing(false);
+}
+
+void EngineWrapper::ProcessEvents()
+{
+    qApp->processEvents();
+}
+
+TBool EngineWrapper::ShowConfirmationQuery(const TDesC& aDescText)
+{
+    QString qText = QString::fromUtf16(aDescText.Ptr(), aDescText.Length());
+    return Notifications::showConfirmationQuery(qText);
+}
+
+void EngineWrapper::NotifyModelHasChanged()
+{
+    emit fileSystemDataChanged();
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbattributesview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,210 @@
+/*
+* 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 "fbattributesview.h"
+
+#include <HbView>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormModelItem>
+#include <HbAction>
+#include <HbToolBar>
+
+#include <QGraphicsLinearLayout>
+
+#include <f32file.h>
+
+const QStringList AttributesChoices = QStringList() << "Skip" << "On" << "Off";
+const QStringList RecurseChoices = QStringList() << "Recursive" << "Non-recursive";
+const QString acceptActionText = "OK";
+const QString rejectActionText = "Cancel";
+const int AttributeOn = 1;
+const int AttributeOff = 2;
+const int AttributeEnableRecursion = 0;
+const int AttributeDisableRecursion = 1;
+
+FbAttributesView::FbAttributesView(quint32 &aSetAttMask, quint32 &aClearAttMask, bool &aRecurse) :
+    mSetAttributesMask(aSetAttMask),
+    mClearAttributesMask(aClearAttMask),
+    mRecurse(aRecurse),
+    mForm(0),
+    mArchiveItem(0),
+    mHiddenItem(0),
+    mReadOnlyItem(0),
+    mSystemItem(0),
+    mRecurseItem(0)
+{
+    setTitle("Set attributes");
+
+    // Override back navigation action
+    HbAction *leaveViewAction = new HbAction(Hb::BackNaviAction, this);
+    connect(leaveViewAction, SIGNAL(triggered()), this, SLOT(reject()));
+    setNavigationAction(leaveViewAction);
+
+    initDataForm();
+    createToolbar();
+}
+
+FbAttributesView::~FbAttributesView()
+{
+}
+
+void FbAttributesView::initDataForm()
+{
+    mForm = new HbDataForm(this);
+    HbDataFormModel *model = new HbDataFormModel();
+
+    // Create Group for sequential image components
+    //mGroupSeguantialCapture = model->appendDataFormGroup(QString("Archive"), parent);
+
+    mArchiveItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
+    mArchiveItem->setLabel("Archive");
+    mArchiveItem->setContentWidgetData(QString("items"), AttributesChoices);
+    mArchiveItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
+
+    mHiddenItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
+    mHiddenItem->setLabel("Hidden");
+    mHiddenItem->setContentWidgetData(QString("items"), AttributesChoices);
+    mHiddenItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
+
+    mReadOnlyItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
+    mReadOnlyItem->setLabel("Read only");
+    mReadOnlyItem->setContentWidgetData(QString("items"), AttributesChoices);
+    mReadOnlyItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
+
+    mSystemItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
+    mSystemItem->setLabel("System");
+    mSystemItem->setContentWidgetData(QString("items"), AttributesChoices);
+    mSystemItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
+
+    mRecurseItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem);
+    mRecurseItem->setLabel("Recurse");
+    mRecurseItem->setContentWidgetData(QString("items"), RecurseChoices);
+    mRecurseItem->setContentWidgetData(QString("displayMode"), QString("embedded"));
+
+    // load file search attribute values from FB engine:
+    loadSettings();
+
+    model->appendDataFormItem(mArchiveItem);
+    model->appendDataFormItem(mHiddenItem);
+    model->appendDataFormItem(mReadOnlyItem);
+    model->appendDataFormItem(mSystemItem);
+    model->appendDataFormItem(mRecurseItem);
+
+    mForm->setModel(model);
+
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
+    layout->addItem(mForm);
+    setLayout(layout);
+}
+
+void FbAttributesView::createToolbar()
+{
+    HbToolBar *toolBar = new HbToolBar(this);
+    HbAction *acceptAction = new HbAction(acceptActionText);
+    connect(acceptAction, SIGNAL(triggered()), this, SLOT(accept()));
+    toolBar->addAction(acceptAction);
+
+    HbAction *rejectAction = new HbAction(rejectActionText);
+    connect(rejectAction, SIGNAL(triggered()), this, SLOT(reject()));
+    toolBar->addAction(rejectAction);
+
+    setToolBar(toolBar);
+}
+
+/**
+  Set form item values from settings \a settings.
+ */
+void FbAttributesView::loadSettings()
+{
+    if (mSetAttributesMask & KEntryAttArchive)
+        mArchiveItem->setContentWidgetData(QString("selected"), AttributeOn);
+    else if (mClearAttributesMask & KEntryAttArchive)
+        mArchiveItem->setContentWidgetData(QString("selected"), AttributeOff);
+
+    if (mSetAttributesMask & KEntryAttHidden)
+        mHiddenItem->setContentWidgetData(QString("selected"), AttributeOn);
+    else if (mClearAttributesMask & KEntryAttHidden)
+        mHiddenItem->setContentWidgetData(QString("selected"), AttributeOff);
+
+    if (mSetAttributesMask & KEntryAttReadOnly)
+        mReadOnlyItem->setContentWidgetData(QString("selected"), AttributeOn);
+    else if (mClearAttributesMask & KEntryAttReadOnly)
+        mReadOnlyItem->setContentWidgetData(QString("selected"), AttributeOff);
+
+    if (mSetAttributesMask & KEntryAttSystem)
+        mSystemItem->setContentWidgetData(QString("selected"), AttributeOn);
+    else if (mClearAttributesMask & KEntryAttSystem)
+        mSystemItem->setContentWidgetData(QString("selected"), AttributeOff);
+
+    if (mRecurse)
+        mRecurseItem->setContentWidgetData(QString("selected"), AttributeEnableRecursion);
+    else
+        mRecurseItem->setContentWidgetData(QString("selected"), AttributeDisableRecursion);
+}
+
+/**
+  Store form item data into \a settings
+ */
+void FbAttributesView::saveSettings()
+{
+    mSetAttributesMask = 0;
+    mClearAttributesMask = 0;
+
+    int archive = mArchiveItem->contentWidgetData(QString("selected")).toInt();
+    if (archive == AttributeOn)
+        mSetAttributesMask |= KEntryAttArchive;
+    else if (archive == AttributeOff)
+        mClearAttributesMask |= KEntryAttArchive;
+
+    int hidden = mHiddenItem->contentWidgetData(QString("selected")).toInt();
+    if (hidden == AttributeOn)
+        mSetAttributesMask |= KEntryAttHidden;
+    else if (hidden == AttributeOff)
+        mClearAttributesMask |= KEntryAttHidden;
+
+    int readOnly = mReadOnlyItem->contentWidgetData(QString("selected")).toInt();
+    if (readOnly == AttributeOn)
+        mSetAttributesMask |= KEntryAttReadOnly;
+    else if (readOnly == AttributeOff)
+        mClearAttributesMask |= KEntryAttReadOnly;
+
+    int system = mSystemItem->contentWidgetData(QString("selected")).toInt();
+    if (system == AttributeOn)
+        mSetAttributesMask |= KEntryAttSystem;
+    else if (system == AttributeOff)
+        mClearAttributesMask |= KEntryAttSystem;
+
+    int recurse = mRecurseItem->contentWidgetData(QString("selected")).toInt();
+    if (recurse == AttributeEnableRecursion)
+        mRecurse = ETrue;
+    else if (recurse == AttributeDisableRecursion)
+        mRecurse = EFalse;
+}
+
+void FbAttributesView::accept()
+{
+    saveSettings();
+    emit finished(true);
+}
+
+void FbAttributesView::reject()
+{
+    emit finished(false);
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbdriveentry.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* 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 "fbdriveentry.h"
+
+// ---------------------------------------------------------------------------
+
+FbDriveEntry::FbDriveEntry(TDriveEntry &aDriveEntry)
+: mDriveEntry(aDriveEntry)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+FbDriveEntry::~FbDriveEntry()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+QChar FbDriveEntry::driveLetter()
+{
+    return QChar(TUint(mDriveEntry.iLetter));
+}
+
+// ---------------------------------------------------------------------------
+
+int FbDriveEntry::number()
+{
+    return mDriveEntry.iNumber;
+}
+
+// ---------------------------------------------------------------------------
+
+QString FbDriveEntry::mediaTypeString()
+{
+    return QString::fromUtf16(mDriveEntry.iMediaTypeDesc.Ptr(), mDriveEntry.iMediaTypeDesc.Length());
+}
+
+// ---------------------------------------------------------------------------
+
+QString FbDriveEntry::attributesString()
+{
+    return QString::fromUtf16(mDriveEntry.iAttributesDesc.Ptr(), mDriveEntry.iAttributesDesc.Length());
+}
+
+// ---------------------------------------------------------------------------
+
+int FbDriveEntry::iconId()
+{
+    return mDriveEntry.iIconId;
+}
+
+// ---------------------------------------------------------------------------
+
+qint64 FbDriveEntry::volumeInfoFree()
+{
+    return mDriveEntry.iVolumeInfo.iFree;
+}
+
+// ---------------------------------------------------------------------------
+
+qint64 FbDriveEntry::volumeInfoSize()
+{
+    return mDriveEntry.iVolumeInfo.iSize;
+}
+
+// ---------------------------------------------------------------------------
+
+QString FbDriveEntry::volumeInfoNameString()
+{
+    return QString::fromUtf16(mDriveEntry.iVolumeInfo.iName.Ptr(), mDriveEntry.iVolumeInfo.iName.Length());
+}
+
+// ---------------------------------------------------------------------------
+
+uint FbDriveEntry::volumeInfoUniqueId()
+{
+    return mDriveEntry.iVolumeInfo.iUniqueID;
+}
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbdrivelistviewitem.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,173 @@
+/*
+* 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 "fbdrivelistviewitem.h"
+#include "fbdriveentry.h"
+#include "fbdrivemodel.h"
+
+#include <hblabel.h>
+#include <hbcheckbox.h>
+#include <hbabstractitemview.h>
+
+#include <QString>
+#include <QStringList>
+#include <QFileIconProvider>
+#include <QGraphicsLinearLayout>
+#include <QRectF>
+#include <QPainter>
+
+FbDriveListViewItem::FbDriveListViewItem(QGraphicsItem *parent) :
+    HbListViewItem(parent),
+    hLayout(0),
+    mDiskNameLabel(0),
+    mSizeLabel(0),
+    mFreeLabel(0),
+    mIconLabel(0)
+{
+}
+
+FbDriveListViewItem::~FbDriveListViewItem()
+{
+}
+
+void FbDriveListViewItem::polish(HbStyleParameters& params)
+{
+    Q_UNUSED(params);
+}
+
+bool FbDriveListViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+    Q_UNUSED(index);
+    return true;
+}
+
+
+HbAbstractViewItem *FbDriveListViewItem::createItem()
+{
+    return new FbDriveListViewItem(*this);
+}
+
+void FbDriveListViewItem::updateChildItems()
+{
+    if(!hLayout) {
+        init();
+    }
+
+    // Qt::DisplayRole
+//    QVariant displayRole = modelIndex().data(Qt::DisplayRole);
+//    QString diskName("default");
+    QStringList stringList;
+//    if (displayRole.isValid()) {
+//        if (displayRole.canConvert<QString>()) {                // EFileViewModeSimple
+//            stringList.append(displayRole.toString());
+//        } else if (displayRole.canConvert<QStringList>()) {     // EFileViewModeExtended
+//            stringList = displayRole.toStringList();
+//        }
+//        if (stringList.count() > 0)
+//            diskName = stringList[0]; //modelIndex().data( Qt::UserRole ).toString();
+//
+//        mDiskNameLabel->setPlainText(diskName/*displayString*/);
+//    }
+//    if (stringList.count() > 1)
+//        mSizeLabel->setPlainText( stringList[1] );
+
+
+    // Get the Drive Entry
+    const FbDriveModel* driveModel= qobject_cast<const FbDriveModel *>(modelIndex().model());
+    FbDriveEntry driveEntry = driveModel->driveEntry(modelIndex());
+
+    const QString SimpleDriveEntry("%1: <%2>");
+
+    QString diskName = SimpleDriveEntry.arg(driveEntry.driveLetter()).arg(driveEntry.mediaTypeString());
+    mDiskNameLabel->setPlainText(diskName);
+
+    const QString ExtendedDriveEntry("%1/%2 kB");
+    QString diskSize = ExtendedDriveEntry.arg(QString::number(driveEntry.volumeInfoFree()/1024))
+                                         .arg(QString::number(driveEntry.volumeInfoSize()/1024));
+    mSizeLabel->setPlainText( diskSize );
+
+    //mFreeLabel->setPlainText( stringList[2] );
+
+    //    mCheckBox->setCheckState( checkState() );
+
+    // Qt::DecorationRole
+    // QTBUG-11033 No Icon provided for QFileIconProvider::Desktop, Network, Drive on Symbian
+    QVariant decorationRole = modelIndex().data(Qt::DecorationRole);
+    if (decorationRole.isValid()) {
+        QIcon icon = qvariant_cast<QIcon>(decorationRole);
+    if( icon.isNull() ) {
+        QFileIconProvider fileIconProvider;
+        icon = fileIconProvider.icon(QFileIconProvider::File);
+    }
+    mIconLabel->setIcon(HbIcon(icon));
+    }
+}
+
+void FbDriveListViewItem::setCheckedState(int state)
+{
+    HbAbstractViewItem::setCheckState(static_cast<Qt::CheckState>(state));
+}
+
+void FbDriveListViewItem::init()
+{
+    hLayout = new QGraphicsLinearLayout();
+    hLayout->setContentsMargins(0, 0, 0, 0);
+
+    hLayout->setOrientation( Qt::Horizontal );
+    hLayout->addItem(layout());
+
+    mIconLabel = new HbLabel();
+    hLayout->addItem( mIconLabel );
+    hLayout->setAlignment( mIconLabel, Qt::AlignTop );
+    hLayout->setStretchFactor( mIconLabel, 0 );
+
+    QGraphicsLinearLayout *vLayout = new QGraphicsLinearLayout();
+    //vLayout->setContentsMargins(0, 0, 0, 0);
+    vLayout->setOrientation( Qt::Vertical );
+
+    mDiskNameLabel = new HbLabel();
+    HbFontSpec fontSpecPrimary(HbFontSpec::Primary);
+    //fontSpecPrimary.setTextHeight(18.0);
+    mDiskNameLabel->setFontSpec( fontSpecPrimary );
+    vLayout->addItem( mDiskNameLabel );
+    vLayout->setAlignment( mDiskNameLabel, Qt::AlignLeft );
+
+    mSizeLabel = new HbLabel();
+    HbFontSpec fontSpecSecondary(HbFontSpec::Secondary);
+    //fontSpecSecondary.setTextHeight(18.0);
+    mSizeLabel->setFontSpec(fontSpecSecondary);
+    vLayout->addItem( mSizeLabel );
+    vLayout->setAlignment(mSizeLabel, Qt::AlignLeft);
+
+//    mFreeLabel = new HbLabel();
+//    mFreeLabel->setFontSpec( HbFontSpec( HbFontSpec::Secondary ) );
+//    vLayout->addItem( mFreeLabel );
+//    vLayout->setAlignment( mFreeLabel, Qt::AlignLeft );
+
+    HbWidget *labelsWidget = new HbWidget();
+    labelsWidget->setLayout(vLayout);
+
+    hLayout->setAlignment( labelsWidget, Qt::AlignLeft );
+
+    hLayout->addItem( labelsWidget );
+    hLayout->setStretchFactor( labelsWidget, 1 );
+
+    //this->setMaximumHeight( mDiskNameLabel->preferredHeight() );
+    //setMaximumHeight( mIconLabel->preferredHeight() );
+
+    setLayout( hLayout );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbdrivemodel.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* 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 "fbdrivemodel.h"
+#include "enginewrapper.h"
+#include "fbdriveentry.h"
+#include "filebrowsersettings.h"
+#include "FB.hrh"
+
+#include <QModelIndex>
+#include <QFileIconProvider>
+
+/**
+  Constructs a file browser custom system model with the given \a engineWrapper and \a parent.
+  */
+FbDriveModel::FbDriveModel(EngineWrapper *engineWrapper, QObject *parent) :
+    QAbstractListModel(parent),
+    mEngineWrapper(engineWrapper),
+    mFileIconProvider(0)
+{
+    mFileIconProvider = new QFileIconProvider();
+}
+
+/**
+  Destroys this file browser custom system model.
+  */
+FbDriveModel::~FbDriveModel()
+{  
+    if (mFileIconProvider) {
+        delete mFileIconProvider;
+    }
+}
+
+/**
+  \reimp
+  */
+int FbDriveModel::rowCount(const QModelIndex &parent) const
+{
+    Q_UNUSED(parent);
+    return mEngineWrapper->itemCount();
+}
+
+/**
+  \reimp
+  */
+QVariant FbDriveModel::data(const QModelIndex &index, int role) const
+{
+    if (!index.isValid() || index.model() != this)
+        return QVariant();
+
+    switch (role) {
+    case Qt::EditRole:
+    case Qt::DisplayRole: {
+            QStringList listItem;
+            FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(index));
+            if (mEngineWrapper->settings().fileViewMode() == EFileViewModeSimple)
+            {
+                const QString SimpleDriveEntry("%1: <%2>");
+                listItem /*<< driveEntry.IconId() */
+                        << SimpleDriveEntry.arg(driveEntry.driveLetter())
+                                           .arg(driveEntry.mediaTypeString());
+            } else if (mEngineWrapper->settings().fileViewMode() == EFileViewModeExtended) {
+                const QString SimpleDriveEntry("%1: <%2>");
+                const QString ExtendedDriveEntry("%1/%2 kB");
+                listItem /*<< driveEntry.IconId()*/
+                        << SimpleDriveEntry.arg(driveEntry.driveLetter())
+                                           .arg(driveEntry.mediaTypeString())
+                        << ExtendedDriveEntry.arg(QString::number(driveEntry.volumeInfoFree()/1024))
+                                             .arg(QString::number(driveEntry.volumeInfoSize()/1024));
+
+            }
+            return listItem;
+        }
+    case Qt::DecorationRole: {
+            if (mEngineWrapper) {
+                QIcon icon;
+                //TODO Drive ico has to be provided, for some reason it is not visible
+                icon = mFileIconProvider->icon(QFileIconProvider::Drive);
+                return QVariant(icon);
+            }
+        }
+    }
+    return QVariant();
+}
+
+/**
+  \reimp
+  */
+QVariant FbDriveModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+    Q_UNUSED(section);
+    Q_UNUSED(orientation);
+    Q_UNUSED(role);
+
+    // TODO, implement or remove
+    return QVariant();
+}
+
+
+FbDriveEntry FbDriveModel::driveEntry(const QModelIndex &index) const
+{
+    return mEngineWrapper->getDriveEntry(index);
+}
+
+QString FbDriveModel::driveLetter(const QModelIndex &index) const
+{
+    QString diskLetter;
+    if (index.row() >= 0 && index.row() < mEngineWrapper->itemCount()) {
+        FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(index));
+        diskLetter = driveEntry.driveLetter();
+    }
+    return diskLetter;
+}
+
+QString FbDriveModel::mediaTypeString(const QModelIndex &index) const
+{
+    QString mediaTypeString;
+    if (index.row() >= 0 && index.row() < mEngineWrapper->itemCount()) {
+        FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(index));
+        mediaTypeString = driveEntry.mediaTypeString();
+    }
+    return mediaTypeString;
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbdriveview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1354 @@
+/*
+* 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 "fbdriveview.h"
+#include "fbsettingsview.h"
+#include "fbeditorview.h"
+#include "fbsearchview.h"
+#include "enginewrapper.h"
+#include "notifications.h"
+#include "fbdrivemodel.h"
+#include "filebrowsersortfilterproxymodel.h"
+#include "fbdrivelistviewitem.h"
+#include "fbpropertiesdialog.h"
+
+#include <HbMenu>
+#include <HbPopup>
+#include <HbView>
+#include <HbMessageBox>
+#include <HbAction>
+#include <HbLabel>
+#include <HbListView>
+#include <HbListViewItem>
+#include <HbListWidget>
+#include <HbLineEdit>
+#include <HbAbstractViewItem>
+#include <HbSelectionDialog>
+#include <HbValidator>
+#include <HbInputDialog>
+
+#include <QString>
+#include <QGraphicsLinearLayout>
+#include <QItemSelection>
+#include <QDebug>
+//TODO check if needed to do this way
+#include <FB.hrh>
+
+// ---------------------------------------------------------------------------
+
+FbDriveView::FbDriveView() :
+    mEngineWrapper(0),
+    mListView(0),
+    mNaviPane(0),
+    mMainLayout(0),
+    mFbDriveModel(0),
+    mOptionMenuActions(),
+    mContextMenuActions(),
+    mContextMenu(0),
+    mLocationChanged(false),
+    mRemoveFileAfterCopied(false),
+//    mClipBoardInUse(false),
+    mFolderContentChanged(false),
+    mCurrentIndex(),
+    mOldPassword(),
+    mPanicCategory(),
+    mAbsoluteFilePath(),
+    mOverwriteOptions(),
+    mModelIndex(),
+    mNewFileName(),
+    mProceed(false),
+    mEraseMBR(false)
+{
+    setTitle("File Browser");
+
+    createMenu();
+    createContextMenu();
+}
+
+// ---------------------------------------------------------------------------	
+
+void FbDriveView::init(EngineWrapper *engineWrapper)
+{
+    mEngineWrapper = engineWrapper;
+
+    mListView = new HbListView(this);
+    mListView->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
+
+    mListView->setItemPrototype(new FbDriveListViewItem(mListView));
+
+    mFbDriveModel = new FbDriveModel(mEngineWrapper);
+    if (!mListView->model()) {
+        mEngineWrapper->refreshView();
+        mListView->setModel(mFbDriveModel);
+    }
+
+    //mListView->setRootIndex(mFileSystemModel->index(startPath));
+    //mListView->setRootIndex(model->index());
+
+//    mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
+
+    connect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
+    connect(mListView, SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
+            this, SLOT(onLongPressed(HbAbstractViewItem*, QPointF)));
+
+    mNaviPane = new HbLabel(this);
+    mNaviPane->setPlainText(QString(" ")); // TODO get from settings or default
+    //mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
+    HbFontSpec fontSpec(HbFontSpec::PrimarySmall);
+    mNaviPane->setFontSpec(fontSpec);
+
+    // Create layout and add list view and naviPane into layout:
+    mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mMainLayout->addItem(mNaviPane);
+    mMainLayout->addItem(mListView);
+    setLayout(mMainLayout);
+}
+
+// ---------------------------------------------------------------------------
+
+FbDriveView::~FbDriveView()
+{  
+//    if (mEngineWrapper) {
+//        delete mEngineWrapper;
+//    }
+    if (mContextMenu) {
+        mContextMenu->deleteLater();
+    }
+
+    delete mFbDriveModel;
+    delete mListView;
+}
+
+/**
+  Initial setup for options menu.
+  Dynamic menu update during the runtime is performed by updateOptionMenu() which
+  to menu's aboutToShow() signal.
+  */
+void FbDriveView::createMenu()
+{
+    createFileMenu();
+    createEditMenu();
+    createViewMenu();
+    createToolsMenu();
+
+    createSettingsMenuItem();
+    createAboutMenuItem();
+    createExitMenuItem();
+
+    // menu dynamic update
+    connect(menu(), SIGNAL(aboutToShow()), this, SLOT(updateOptionMenu()));
+}
+
+/**
+  Initial setup for File submenu
+  */
+void FbDriveView::createFileMenu()
+{
+    mOptionMenuActions.mFileMenu = menu()->addMenu("File");
+
+    mOptionMenuActions.mFileSearch = mOptionMenuActions.mFileMenu->addAction("Search...", this, SLOT(fileSearch()));
+}
+
+/**
+  Initial setup for Edit submenu
+  */
+void FbDriveView::createEditMenu()
+{
+    mOptionMenuActions.mEditMenu = menu()->addMenu("Edit");
+
+    mOptionMenuActions.mEditSnapShotToE = mOptionMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
+    mOptionMenuActions.mEditSnapShotToE->setVisible(false);
+}
+
+/**
+  Initial setup for View submenu
+  */
+void FbDriveView::createViewMenu()
+{
+    mOptionMenuActions.mViewMenu = menu()->addMenu("View");
+    //mOptionMenuActions.mViewMenu->menuAction()->setVisible(false);
+
+    //mOptionMenuActions.mViewFilterEntries = mOptionMenuActions.mViewMenu->addAction("Filter entries", this, SLOT(viewFilterEntries()));
+    mOptionMenuActions.mViewRefresh = mOptionMenuActions.mViewMenu->addAction("Refresh", this, SLOT(viewRefresh()));
+}
+
+/**
+  Initial setup for Tools submenu
+  */
+void FbDriveView::createToolsMenu()
+{
+    mOptionMenuActions.mToolsMenu = menu()->addMenu("Tools");
+
+    mOptionMenuActions.mToolsAllAppsToTextFile = mOptionMenuActions.mToolsMenu->addAction("All apps to a text file", this, SLOT(toolsAllAppsToTextFile()));
+    mOptionMenuActions.mToolsAllAppsToTextFile->setVisible(false);
+    mOptionMenuActions.mToolsAllFilesToTextFile = mOptionMenuActions.mToolsMenu->addAction("All files to a text file", this, SLOT(toolsAllFilesToTextFile()));
+    //mOptionMenuActions.mToolsAllFilesToTextFile->setVisible(false);
+
+//    mOptionMenuActions.mToolsAvkonIconCacheMenu = mOptionMenuActions.mToolsMenu->addMenu("Avkon icon cache");
+//    mOptionMenuActions.mToolsAvkonIconCacheMenu->menuAction()->setVisible(false);
+//    mOptionMenuActions.mToolsAvkonIconCacheEnable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Enable", this, SLOT(toolsAvkonIconCacheEnable()));
+//    mOptionMenuActions.mToolsAvkonIconCacheDisable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Clear and disable", this, SLOT(toolsAvkonIconCacheDisable()));
+
+    mOptionMenuActions.mToolsDisableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Disable extended errors", this, SLOT(toolsDisableExtendedErrors()));
+    mOptionMenuActions.mToolsDumpMsgStoreWalk = mOptionMenuActions.mToolsMenu->addAction("Dump msg. store walk", this, SLOT(toolsDumpMsgStoreWalk()));
+    mOptionMenuActions.mToolsDumpMsgStoreWalk->setVisible(false);
+    mOptionMenuActions.mToolsEditDataTypes = mOptionMenuActions.mToolsMenu->addAction("Edit data types", this, SLOT(toolsEditDataTypes()));
+    mOptionMenuActions.mToolsEditDataTypes->setVisible(false);
+    mOptionMenuActions.mToolsEnableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Enable extended errors", this, SLOT(toolsEnableExtendedErrors()));
+
+    mOptionMenuActions.mToolsErrorSimulateMenu = mOptionMenuActions.mToolsMenu->addMenu("Error simulate");
+    mOptionMenuActions.mToolsErrorSimulateLeave = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Leave", this, SLOT(toolsErrorSimulateLeave()));
+    mOptionMenuActions.mToolsErrorSimulatePanic = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Panic", this, SLOT(toolsErrorSimulatePanic()));
+    mOptionMenuActions.mToolsErrorSimulatePanic->setVisible(false);
+    mOptionMenuActions.mToolsErrorSimulateException = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Exception", this, SLOT(toolsErrorSimulateException()));
+
+//    mOptionMenuActions.mLocalConnectivityMenu = mOptionMenuActions.mToolsMenu->addMenu("Local connectivity");
+//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared = mOptionMenuActions.mLocalConnectivityMenu->addAction("Activate infrared", this, SLOT(toolsLocalConnectivityActivateInfrared()));
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch BT UI", this, SLOT(toolsLocalConnectivityLaunchBTUI()));
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch USB UI", this, SLOT(toolsLocalConnectivityLaunchUSBUI()));
+
+    mOptionMenuActions.mToolsMessageAttachmentsMenu = mOptionMenuActions.mToolsMenu->addMenu("Message attachments");
+    mOptionMenuActions.mToolsMessageAttachmentsMenu->menuAction()->setVisible(false);
+    mOptionMenuActions.mToolsMessageInbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Inbox", this, SLOT(toolsMessageInbox()));
+    mOptionMenuActions.mToolsMessageDrafts = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Drafts", this, SLOT(toolsMessageDrafts()));
+    mOptionMenuActions.mToolsMessageSentItems = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Sent items", this, SLOT(toolsMessageSentItems()));
+    mOptionMenuActions.mToolsMessageOutbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Outbox", this, SLOT(toolsMessageOutbox()));
+
+    mOptionMenuActions.mToolsMemoryInfo = mOptionMenuActions.mToolsMenu->addAction("Memory info", this, SLOT(toolsMemoryInfo()));
+    mOptionMenuActions.mToolsMemoryInfo->setVisible(false);
+
+    mOptionMenuActions.mToolsSecureBackupMenu = mOptionMenuActions.mToolsMenu->addMenu("Secure backup");
+    mOptionMenuActions.mToolsSecureBackupMenu->menuAction()->setVisible(false);
+    mOptionMenuActions.mToolsSecureBackStart = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start backup", this, SLOT(toolsSecureBackStart()));
+    mOptionMenuActions.mToolsSecureBackRestore = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start restore", this, SLOT(toolsSecureBackRestore()));
+    mOptionMenuActions.mToolsSecureBackStop = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Stop", this, SLOT(toolsSecureBackStop()));
+
+    mOptionMenuActions.mToolsSetDebugMask = mOptionMenuActions.mToolsMenu->addAction("Set debug mask", this, SLOT(toolsSetDebugMaskQuestion()));
+    mOptionMenuActions.mToolsShowOpenFilesHere = mOptionMenuActions.mToolsMenu->addAction("Show open files here", this, SLOT(toolsShowOpenFilesHere()));
+    mOptionMenuActions.mToolsShowOpenFilesHere->setVisible(false);
+}
+
+/**
+  Creates Setting menu item in option menu
+  */
+void FbDriveView::createSettingsMenuItem()
+{
+    mOptionMenuActions.mSetting = menu()->addAction("Settings...");
+    connect(mOptionMenuActions.mSetting, SIGNAL(triggered()), this, SIGNAL(aboutToShowSettingsView()));
+}
+
+
+/**
+  Creates About menu item in option menu
+  */
+void FbDriveView::createAboutMenuItem()
+{
+    // about note
+    mOptionMenuActions.mAbout = menu()->addAction("About");
+    connect(mOptionMenuActions.mAbout, SIGNAL(triggered()), this, SLOT(about()));
+}
+
+/**
+  Creates Exit menu item in option menu
+  */
+void FbDriveView::createExitMenuItem()
+{
+    // application exit
+    mOptionMenuActions.mExit = menu()->addAction("Exit");
+    connect(mOptionMenuActions.mExit, SIGNAL(triggered()), qApp, SLOT(quit()));
+}
+
+/**
+  update menu: disk admin available only in device root view. edit available only in folder view
+  when file or folder content exist in current folder, or clipboard has copied item.
+  file and view menus updated every time regarding the folder content.
+  tools, settings, about, exit always available.
+  If there's remove and add operations at same time, always remove first
+  to keep to the correct menu items order.
+  */
+void FbDriveView::updateOptionMenu()
+{
+    bool isFileItemListEmpty = mFbDriveModel->rowCount() == 0;
+//    bool isDriveListViewActive = true; //mEngineWrapper->isDriveListViewActive();
+    bool isNormalModeActive = true;       //iModel->FileUtils()->IsNormalModeActive();
+//    bool isCurrentDriveReadOnly = mEngineWrapper->isCurrentDriveReadOnly();   //iModel->FileUtils()->IsCurrentDriveReadOnly();
+//    bool isCurrentItemDirectory = mEngineWrapper->getFileEntry(currentItemIndex()).isDir();
+    // bool currentSelected = true;    //iContainer->ListBox()->View()->ItemIsSelected(iContainer->ListBox()->View()->CurrentItemIndex());
+//    bool isAllSelected = mListView->selectionModel()->selection().count() == mFbDriveModel->rowCount();
+    //bool isNoneSelected = mListView->selectionModel()->selection().count() != 0;
+//    bool hasSelectedItems = mListView->selectionModel()->selection().count() != 0;
+    //bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
+    bool isClipBoardEmpty = !mEngineWrapper->isClipBoardListInUse();
+    bool showSnapShot = false;           //iModel->FileUtils()->DriveSnapShotPossible();
+
+    bool showEditMenu(true);
+    if (!showSnapShot || isFileItemListEmpty && isClipBoardEmpty)
+        showEditMenu = false;
+    else
+        showEditMenu = true;
+
+    mOptionMenuActions.mEditMenu->menuAction()->setVisible(showEditMenu);
+
+    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileOpen, isFileItemListEmpty || isDriveListViewActive || isCurrentItemDirectory);
+
+    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileView, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive);
+    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileEdit, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive);
+    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileSendTo, isFileItemListEmpty || driveListActive || isCurrentItemDirectory);
+
+    // TODO mOptionMenuActions.mFileCompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive));
+    // TODO mOptionMenuActions.mFileDecompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory || isDriveListViewActive));
+
+    // TODO mOptionMenuActions.mEditSnapShotToE->setVisible(isDriveListViewActive);
+
+    // TODO mOptionMenuActions.mViewSort->setVisible(!(!isNormalModeActive || isDriveListViewActive || isFileItemListEmpty));
+    // TODO mOptionMenuActions.mViewOrder->setVisible(!(!isNormalModeActive || isDriveListViewActive || isFileItemListEmpty));
+    mOptionMenuActions.mViewRefresh->setVisible(isNormalModeActive);
+    //mOptionMenuActions.mViewFilterEntries->setVisible(!isFileItemListEmpty);
+
+    // TODO R_FILEBROWSER_VIEW_SORT_SUBMENU
+    // aMenuPane->SetItemButtonState(iModel->FileUtils()->SortMode(), EEikMenuItemSymbolOn);
+
+    // TODO R_FILEBROWSER_VIEW_ORDER_SUBMENU
+    // aMenuPane->SetItemButtonState(iModel->FileUtils()->OrderMode(), EEikMenuItemSymbolOn);
+
+    // aResourceId == R_FILEBROWSER_TOOLS_SUBMENU
+    bool noExtendedErrorsAllowed = mEngineWrapper->ErrRdFileExists();
+    mOptionMenuActions.mToolsDisableExtendedErrors->setVisible(noExtendedErrorsAllowed);
+    mOptionMenuActions.mToolsEnableExtendedErrors->setVisible(!noExtendedErrorsAllowed);
+
+//    bool infraRedAllowed = mEngineWrapper->FileExists(KIRAppPath);
+//    bool bluetoothAllowed = mEngineWrapper->FileExists(KBTAppPath);
+//    bool usbAllowed = mEngineWrapper->FileExists(KUSBAppPath);
+//
+//    bool noLocalCon = !infraRedAllowed && !bluetoothAllowed && !usbAllowed;
+//    mOptionMenuActions.mToolsLocalConnectivityMenu->menuAction()->setVisible(!noLocalCon);
+//
+//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared->setVisible(infraRedAllowed);
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI->setVisible(bluetoothAllowed);
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI->setVisible(usbAllowed);
+}
+
+void FbDriveView::createContextMenu()
+{
+    mContextMenu = new HbMenu();
+    connect(mContextMenu, SIGNAL(aboutToShow()), this, SLOT(updateContextMenu()));
+
+    createFileContextMenu();
+    createEditContextMenu();
+    createViewContextMenu();
+    createDiskAdminContextMenu();
+}
+
+
+void FbDriveView::createFileContextMenu()
+{
+    mContextMenuActions.mFileProperties = mContextMenu->addAction("Properties", this, SLOT(fileProperties()));
+    mContextMenuActions.mFileSearch = mContextMenu->addAction("Search...", this, SLOT(fileSearch()));
+}
+
+void FbDriveView::createEditContextMenu()
+{
+//    mContextMenuActions.mEditMenu = mContextMenu->addMenu("Edit");
+
+    //mContextMenuActions.mEditSnapShotToE = mContextMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
+//    mContextMenuActions.mEditSnapShotToE->setVisible(false);
+//    mContextMenuActions.mEditCut = mContextMenuActions.mEditMenu->addAction("Cut", this, SLOT(editCut()));
+//    mContextMenuActions.mEditCopy = mContextMenuActions.mEditMenu->addAction("Copy", this, SLOT(editCopy()));
+//    mContextMenuActions.mEditPaste = mContextMenuActions.mEditMenu->addAction("Paste", this, SLOT(editPaste()));
+//    mContextMenuActions.mEditCopyToFolder = mContextMenuActions.mEditMenu->addAction("Copy to folder...", this, SLOT(editCopyToFolder()));
+//    mContextMenuActions.mEditMoveToFolder = mContextMenuActions.mEditMenu->addAction("Move to folder...", this, SLOT(editMoveToFolder()));
+}
+
+void FbDriveView::createViewContextMenu()
+{
+
+}
+
+/**
+  Initial setup for Disk Admin submenu
+  */
+void FbDriveView::createDiskAdminContextMenu()
+{
+    mContextMenuActions.mDiskAdminMenu = mContextMenu->addMenu("Disk admin");
+    //mContextMenuActions.mDiskAdminMenu->menuAction()->setVisible(false);
+
+    mContextMenuActions.mDiskAdminSetDrivePassword = mContextMenuActions.mDiskAdminMenu->addAction("Set drive password", this, SLOT(diskAdminSetDrivePassword()));
+    mContextMenuActions.mDiskAdminUnlockDrive = mContextMenuActions.mDiskAdminMenu->addAction("Unlock drive", this, SLOT(diskAdminUnlockDrive()));
+    mContextMenuActions.mDiskAdminClearDrivePassword = mContextMenuActions.mDiskAdminMenu->addAction("Clear drive password", this, SLOT(diskAdminClearDrivePassword()));
+    mContextMenuActions.mDiskAdminEraseDrivePassword = mContextMenuActions.mDiskAdminMenu->addAction("Erase drive password", this, SLOT(diskAdminEraseDrivePassword()));
+
+    mContextMenuActions.mDiskAdminFormatDrive = mContextMenuActions.mDiskAdminMenu->addAction("Format drive", this, SLOT(diskAdminFormatDrive()));
+    mContextMenuActions.mDiskAdminFormatDrive->setVisible(false);
+    mContextMenuActions.mDiskAdminQuickFormatDrive = mContextMenuActions.mDiskAdminMenu->addAction("Quick format drive", this, SLOT(diskAdminQuickFormatDrive()));
+    mContextMenuActions.mDiskAdminQuickFormatDrive->setVisible(false);
+
+    mContextMenuActions.mDiskAdminCheckDisk = mContextMenuActions.mDiskAdminMenu->addAction("Check disk", this, SLOT(diskAdminCheckDisk()));
+    mContextMenuActions.mDiskAdminScanDrive = mContextMenuActions.mDiskAdminMenu->addAction("Scan drive", this, SLOT(diskAdminScanDrive()));
+    mContextMenuActions.mDiskAdminSetDriveName = mContextMenuActions.mDiskAdminMenu->addAction("Set drive name", this, SLOT(diskAdminSetDriveName()));
+    mContextMenuActions.mDiskAdminSetDriveVolumeLabel = mContextMenuActions.mDiskAdminMenu->addAction("Set drive volume label", this, SLOT(diskAdminSetDriveVolumeLabel()));
+    mContextMenuActions.mDiskAdminEjectDrive = mContextMenuActions.mDiskAdminMenu->addAction("Eject drive", this, SLOT(diskAdminEjectDrive()));
+    mContextMenuActions.mDiskAdminDismountDrive = mContextMenuActions.mDiskAdminMenu->addAction("Dismount drive", this, SLOT(diskAdminDismountDrive()));
+    mContextMenuActions.mDiskAdminEraseMBR = mContextMenuActions.mDiskAdminMenu->addAction("Erase MBR", this, SLOT(diskAdminEraseMBR()));
+    mContextMenuActions.mDiskAdminPartitionDrive = mContextMenuActions.mDiskAdminMenu->addAction("Partition drive", this, SLOT(diskAdminPartitionDrive()));
+}
+
+void FbDriveView::updateContextMenu()
+{
+    bool isFileItemListEmpty = mFbDriveModel->rowCount() == 0;
+    mContextMenuActions.mFileProperties->setVisible(!isFileItemListEmpty);
+}
+
+// ---------------------------------------------------------------------------
+
+void FbDriveView::onLongPressed(HbAbstractViewItem *listViewItem, QPointF coords)
+{
+    mCurrentIndex = listViewItem->modelIndex();
+
+    mContextMenu->setPreferredPos(coords);
+    mContextMenu->show();
+}
+
+/**
+  Refresh FileBrowser view
+  */
+void FbDriveView::refreshList()
+{
+    mEngineWrapper->refreshView();
+    mListView->reset();
+
+    TListingMode listingMode = mEngineWrapper->listingMode();
+    if (listingMode == ENormalEntries)
+        mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
+    else if (listingMode == ESearchResults)
+        mNaviPane->setPlainText(QString(tr("Search results")));
+    else if (listingMode == EOpenFiles)
+        mNaviPane->setPlainText(QString(tr("Open files")));
+    else if (listingMode == EMsgAttachmentsInbox)
+        mNaviPane->setPlainText(QString(tr("Attachments in Inbox")));
+    else if (listingMode == EMsgAttachmentsDrafts)
+        mNaviPane->setPlainText(QString(tr("Attachments in Drafts")));
+    else if (listingMode == EMsgAttachmentsSentItems)
+        mNaviPane->setPlainText(QString(tr("Attachments in Sent Items")));
+    else if (listingMode == EMsgAttachmentsOutbox)
+        mNaviPane->setPlainText(QString(tr("Attachments in Outbox")));
+}
+
+// ---------------------------------------------------------------------------
+/**
+  Show a list dialog
+  \param List aList of item to select item from.
+  \param Title text titleText of a dialog heading widget
+  \return None
+  */
+void FbDriveView::openListDialog(const QStringList& items, const QString &titleText, QObject* receiver, const char* member)
+{
+    // Create a list and some simple content for it
+    HbSelectionDialog *dlg = new HbSelectionDialog();
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    // Set items to be popup's content
+    dlg->setStringItems(items);
+    dlg->setSelectionMode(HbAbstractItemView::SingleSelection);
+
+    HbLabel *title = new HbLabel(dlg);
+    title->setPlainText(titleText);
+    dlg->setHeadingWidget(title);
+
+    // Launch popup and handle the user response:
+    dlg->open(receiver, member);
+}
+
+void FbDriveView::storeSelectedItemsOrCurrentItem()
+{
+    QItemSelectionModel *selectionIndexes = mListView->selectionModel();
+
+    // by default use selected items
+    if (selectionIndexes) {
+        if (selectionIndexes->hasSelection()) {
+            mSelectionIndexes = mListView->selectionModel()->selectedIndexes();
+        } else { // or if none selected, use the current item index
+            mSelectionIndexes.clear();
+            mSelectionIndexes.append(mCurrentIndex);
+//            QModelIndex currentIndex = currentItemIndex();
+//            if (mFbDriveModel->rowCount(currentItemIndex) > currentItemIndex && currentItemIndex >= 0)
+//            {
+//                modelIndexList.append(currentIndex);
+//            }
+        }
+    }
+//    mClipBoardInUse = true;
+}
+
+// ---------------------------------------------------------------------------
+
+QModelIndex FbDriveView::currentItemIndex()
+{
+    return mCurrentIndex;//mListView->selectionModel()->currentIndex();
+}
+
+// ---------------------------------------------------------------------------
+// operations in File Menu
+// ---------------------------------------------------------------------------
+
+void FbDriveView::fileOpenDrive()
+{
+    // TODO make a separate function to be called from here and fileOpenDirectory()
+    mLocationChanged = true;
+    // get selected drive or directory from list view model and open it:
+    //if (mListView->selectionModel()->hasSelection()) {
+//    if (mListView->selectionModel()->selection().count() != 0) {
+//        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->moveDownToDirectory(mCurrentIndex);
+        mListView->setRootIndex(mCurrentIndex);
+        refreshList();
+//    } else {
+//        Notifications::showErrorNote("not selected item!");
+//    }
+}
+
+void FbDriveView::fileSearch()
+{
+    QString searchPath;
+    HbAction *contextrMenuAction = static_cast<HbAction *>(sender());
+    if (contextrMenuAction
+        && contextrMenuAction->text().compare(QString("Search..."), Qt::CaseInsensitive) == 0
+        && contextrMenuAction == mContextMenuActions.mFileSearch) {
+        FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(currentItemIndex()));
+        searchPath = driveEntry.driveLetter() + QString(":\\");
+    } else {
+        searchPath = mEngineWrapper->currentPath();
+    }
+    emit aboutToShowSearchView(searchPath);
+}
+
+/**
+  Show file properties
+  */
+void FbDriveView::fileProperties()
+{
+    const QString MediaTypeText("Media");
+    const QString AttributesText("Atts");
+    const QString VolumeNameText("Name");
+    const QString UniqueIdText("ID");
+    const QString NumberOfFilesText("Files");
+    const QString UsedText("Used");
+    const QString FreeText("Free");
+    const QString SizeText("Size");
+
+    QModelIndex currentIndex = currentItemIndex();
+    QVector<QPair<QString, QString> > properties;
+    QString titleText;
+    bool showDialog(false);
+
+    if (currentIndex.row() >= 0 && currentIndex.row() < mEngineWrapper->itemCount()) {
+        // it is a drive entry
+        FbDriveEntry driveEntry(mEngineWrapper->getDriveEntry(currentIndex));
+
+        // set title
+        titleText = driveEntry.driveLetter() + (QString(":\\"));
+
+        // media type
+        properties.append(qMakePair(MediaTypeText, driveEntry.mediaTypeString()));
+
+        // attributes
+        QString attributes = driveEntry.attributesString(); // TODO should return QStringList
+        QStringList attributesList = attributes.split(" + ");
+        for(int i(0), ie(attributesList.count()); i < ie; ++i) {
+            properties.append(qMakePair(AttributesText, attributesList[i]));
+        }
+
+        // volume name
+        if (driveEntry.volumeInfoNameString().length()) {
+            properties.append(qMakePair(VolumeNameText, driveEntry.volumeInfoNameString()));
+        }
+
+        // unique id
+        QString uniqueId("0x");
+        uniqueId.append(QString::number(driveEntry.volumeInfoUniqueId(), 16).toUpper());
+        properties.append(qMakePair(UniqueIdText, uniqueId));
+
+        // number of files
+        if (mEngineWrapper->settings().showSubDirectoryInfo()) {
+            QString driveRoot = driveEntry.driveLetter() + (QString(":\\"));
+            int allFilesCount = mEngineWrapper->getFilesCount(driveRoot);
+            properties.append(qMakePair(NumberOfFilesText, QString::number(allFilesCount)));
+        }
+
+        // used
+        QLocale loc;
+        qint64 used = driveEntry.volumeInfoSize() - driveEntry.volumeInfoFree();
+        QString usedSize = loc.toString(used).append(QString(" B"));
+        properties.append(qMakePair(UsedText, usedSize));
+
+        // free
+        QString freeSize = loc.toString(driveEntry.volumeInfoFree()).append(QString(" B"));
+        properties.append(qMakePair(FreeText, freeSize));
+
+        // size
+        QString totalSize = loc.toString(driveEntry.volumeInfoSize()).append(QString(" B"));
+        properties.append(qMakePair(SizeText, totalSize));
+
+        showDialog = true;
+    }
+
+    if (showDialog) {
+        FbPropertiesDialog *dialog = new FbPropertiesDialog();
+        dialog->setTitle(titleText);
+
+        // Set listwidget to be popup's content
+        dialog->setProperties(properties);
+        // Launch popup and handle the user response:
+        dialog->open();
+    }
+}
+
+// edit menu
+void FbDriveView::editSnapShotToE()
+{
+
+}
+
+// ---------------------------------------------------------------------------
+// view menu
+// ---------------------------------------------------------------------------
+
+/**
+  Refresh view
+  */
+void FbDriveView::viewRefresh()
+{
+    refreshList();
+}
+
+// ---------------------------------------------------------------------------
+// disk admin menu
+// ---------------------------------------------------------------------------
+
+/**
+  Open old password for the selected drive dialog.
+  */
+void FbDriveView::diskAdminSetDrivePassword()
+{
+    QModelIndex currentIndex = currentItemIndex();
+    // check if the drive has a password
+    if (mEngineWrapper->hasDrivePassword(currentIndex)) {
+        QString heading = QString("Existing password");
+        HbInputDialog::queryText(heading, this, SLOT(diskAdminSetDrivePasswordNew(HbAction*)), QString(), scene());
+    } else {
+        QString heading = QString("New password");
+        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDrivePassword(HbAction*)), mOldPassword, scene());
+    }
+}
+
+/**
+   Open new password for the selected drive dialog.
+  */
+void FbDriveView::diskAdminSetDrivePasswordNew(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        mOldPassword = dlg->value().toString();
+        QString heading = QString("New password");
+        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDrivePassword(HbAction*)), mOldPassword, scene());
+    }
+}
+
+/**
+   Set password for the selected drive.
+  */
+void FbDriveView::doDiskAdminSetDrivePassword(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString newPassword = dlg->value().toString();
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminSetDrivePassword(currentIndex, mOldPassword, newPassword);
+        refreshList();
+        mOldPassword = QString();
+        newPassword = QString();
+    }
+}
+
+/**
+  Open Unlock the selected drive dialog.
+  */
+void FbDriveView::diskAdminUnlockDrive()
+{
+    QModelIndex currentIndex = currentItemIndex();
+    // check if the drive is locked
+    if (mEngineWrapper->isDriveLocked(currentIndex)) {
+        QString heading = QString("Existing password");
+        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminUnlockDrive(HbAction*)), QString(), scene());
+    } else {
+        Notifications::showInformationNote(QString("This drive is not locked"));
+    }
+}
+
+/**
+  Unlock the selected drive.
+  */
+void FbDriveView::doDiskAdminUnlockDrive(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString oldPassword = dlg->value().toString();
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminUnlockDrive(currentIndex, oldPassword);
+        refreshList();
+    }
+}
+
+/**
+  Open clear password of the selected drive dialog.
+  */
+void FbDriveView::diskAdminClearDrivePassword()
+{
+    QModelIndex currentIndex = currentItemIndex();
+    // check if the drive has a password
+    if (mEngineWrapper->hasDrivePassword(currentIndex)) {
+        QString heading = QString("Existing password");
+        HbInputDialog::queryText(heading, this, SLOT(doDiskAdminClearDrivePassword(HbAction*)), QString(), scene());
+    } else {
+        Notifications::showInformationNote(QString("This drive has no password"));
+    }
+}
+
+/**
+  Clear password of the selected drive.
+  */
+void FbDriveView::doDiskAdminClearDrivePassword(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString oldPassword = dlg->value().toString();
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminClearDrivePassword(currentIndex, oldPassword);
+        refreshList();
+    }
+}
+
+
+/**
+  Question for erase password of the selected drive
+  */
+void FbDriveView::diskAdminEraseDrivePassword()
+{
+    // check if the drive has a password
+    QModelIndex currentIndex = currentItemIndex();
+    if (mEngineWrapper->hasDrivePassword(currentIndex)) {
+        HbMessageBox::question(QString("Are you sure? All data can be lost!"),
+                               this,
+                               SLOT(doDiskAdminEraseDrivePassword(int)),
+                               HbMessageBox::Yes | HbMessageBox::No);
+    } else {
+        Notifications::showInformationNote(QString("This drive has no password"));
+    }
+}
+
+/**
+  Erase password of the selected drive
+  */
+void FbDriveView::doDiskAdminEraseDrivePassword(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminEraseDrivePassword(currentIndex);
+        refreshList();
+    }
+}
+
+/**
+  Performs format on the selected drive
+  */
+void FbDriveView::diskAdminFormatDrive()
+{
+    HbMessageBox::question(QString("Are you sure? All data will be lost!"),
+                           this,
+                           SLOT(doDiskAdminFormatDrive(int)),
+                           HbMessageBox::Yes | HbMessageBox::No);
+}
+
+/**
+  Performs format on the selected drive
+  */
+void FbDriveView::doDiskAdminFormatDrive(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminFormatDrive(currentIndex, false);
+    }
+}
+
+/**
+  Performs quick format on the selected drive
+  */
+void FbDriveView::diskAdminQuickFormatDrive()
+{
+    HbMessageBox::question(QString("Are you sure? All data will be lost!"),
+                           this,
+                           SLOT(doDiskAdminQuickFormatDrive(int)),
+                           HbMessageBox::Yes | HbMessageBox::No);
+}
+
+/**
+  Performs quick format on the selected drive
+  */
+void FbDriveView::doDiskAdminQuickFormatDrive(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminFormatDrive(currentIndex, true);
+    }
+}
+
+/**
+    Checks the disk integrity on the selected drive
+  */
+void FbDriveView::diskAdminCheckDisk()
+{
+    QModelIndex currentIndex = currentItemIndex();
+    mEngineWrapper->DiskAdminCheckDisk(currentIndex);
+}
+
+/**
+  Checks the selected drive for errors and corrects them
+  */
+void FbDriveView::diskAdminScanDrive()
+{
+    HbMessageBox::question(QString("This finds errors on disk and corrects them. Proceed?"),
+                           this,
+                           SLOT(doDiskAdminScanDrive(int)),
+                           HbMessageBox::Yes | HbMessageBox::No);
+}
+
+/**
+  Checks the selected drive for errors and corrects them
+  */
+void FbDriveView::doDiskAdminScanDrive(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminScanDrive(currentIndex);
+        refreshList();
+    }
+}
+
+/**
+  Open drive name dialog
+  */
+void FbDriveView::diskAdminSetDriveName()
+{
+    QString driveName;
+
+    // get existing drive name
+    QModelIndex currentIndex = currentItemIndex();
+    mEngineWrapper->GetDriveName(currentIndex, driveName);
+
+    QString heading = QString("New name");
+    HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDriveName(HbAction*)), driveName, scene());
+}
+
+/**
+  Set drive name.
+  */
+void FbDriveView::doDiskAdminSetDriveName(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString driveName = dlg->value().toString();
+
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminSetDriveName(currentIndex, driveName);
+
+        refreshList();
+    }
+}
+
+/**
+  Open drive volume label dialog
+  */
+void FbDriveView::diskAdminSetDriveVolumeLabel()
+{
+    QString volumeLabel;
+
+    // get existing drive name
+    QModelIndex currentIndex = currentItemIndex();
+    mEngineWrapper->GetDriveVolumeLabel(currentIndex, volumeLabel);
+
+    QString heading = QString("New volume label");
+    HbInputDialog::queryText(heading, this, SLOT(doDiskAdminSetDriveVolumeLabel(HbAction*)), volumeLabel, scene());
+}
+
+/**
+  Set drive volume label.
+  */
+void FbDriveView::doDiskAdminSetDriveVolumeLabel(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString volumeLabel = dlg->value().toString();
+
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminSetDriveVolumeLabel(currentIndex, volumeLabel);
+
+        refreshList();
+    }
+}
+
+/**
+  Eject the selected drive
+  */
+void FbDriveView::diskAdminEjectDrive()
+{
+    QModelIndex currentIndex = currentItemIndex();
+    mEngineWrapper->DiskAdminEjectDrive(currentIndex);
+    refreshList();
+}
+
+/**
+  Dismount the selected drive
+  */
+void FbDriveView::diskAdminDismountDrive()
+{
+    HbMessageBox::question(QString("Are you sure you know what are you doing?"),
+                           this,
+                           SLOT(doDiskAdminDismountDrive(int)),
+                           HbMessageBox::Yes | HbMessageBox::No);
+}
+
+void FbDriveView::doDiskAdminDismountDrive(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminDismountDrive(currentIndex);
+        refreshList();
+    }
+}
+
+/**
+  Erase Master Boot Record of the selected drive
+  */
+void FbDriveView::diskAdminEraseMBR()
+{
+    // TODO What to do with FB LITE macros?
+    HbMessageBox::question(QString("Are you sure? Your media driver must support this!"),
+                           this,
+                           SLOT(doDiskAdminEraseMBR(int)),
+                           HbMessageBox::Yes | HbMessageBox::No);
+}
+
+void FbDriveView::doDiskAdminEraseMBR(int action)
+{
+    // TODO What to do with FB LITE macros?
+    if (action == HbMessageBox::Yes) {
+        HbMessageBox::question(QString("Are you really sure you know what are you doing ?!?"),
+                               this,
+                               SLOT(doDiskAdminReallyEraseMBR(int)),
+                               HbMessageBox::Yes | HbMessageBox::No);
+    }
+}
+
+void FbDriveView::doDiskAdminReallyEraseMBR(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        // warn if the selected drive is not detected as removable
+        if (mEngineWrapper->isDriveRemovable(currentIndex)) {
+            mEngineWrapper->DiskAdminEraseMBR(currentIndex);
+            refreshList();
+        } else {
+            HbMessageBox::question(QString("Selected drive is not removable, really continue?"),
+                                   this,
+                                   SLOT(doDiskAdminNotRemovableReallyEraseMBR(int)),
+                                   HbMessageBox::Yes | HbMessageBox::No);
+        }
+    }
+}
+
+void FbDriveView::doDiskAdminNotRemovableReallyEraseMBR(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        mEngineWrapper->DiskAdminEraseMBR(currentIndex);
+        refreshList();
+    }
+
+}
+
+/**
+  Partition the selected drive
+  */
+void FbDriveView::diskAdminPartitionDrive()
+{
+    HbMessageBox::question(QString("Are you sure? Your media driver must support this!"),
+                           this,
+                           SLOT(diskAdminPartitionDriveProceed(int)),
+                           HbMessageBox::Yes | HbMessageBox::No);
+}
+
+/**
+  Partition the selected drive if user is sure
+  */
+void FbDriveView::diskAdminPartitionDriveProceed(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        HbMessageBox::question(QString("Are you really sure you know what are you doing ?!?"),
+                               this,
+                               SLOT(diskAdminPartitionDriveReallyProceed(int)),
+                               HbMessageBox::Yes | HbMessageBox::No);
+    }
+}
+
+/**
+  Partition the selected drive if user is really sure
+  */
+void FbDriveView::diskAdminPartitionDriveReallyProceed(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        QModelIndex currentIndex = currentItemIndex();
+        mEraseMBR = false;
+        // warn if the selected drive is not detected as removable
+        mProceed = false;
+        if (mEngineWrapper->isDriveRemovable(currentIndex)) {
+            mProceed = true;
+        } else {
+            HbMessageBox::question(QString("Selected drive is not removable, really continue?"),
+                                   this,
+                                   SLOT(diskAdminPartitionDriveIsNotRemovable(int)),
+                                   HbMessageBox::Yes | HbMessageBox::No);
+        }
+
+        if (mProceed) {
+            // query if erase mbr
+            mEraseMBR = false;
+
+            HbMessageBox::question(QString("Erase MBR first (normally needed)?"),
+                                   this,
+                                   SLOT(diskAdminPartitionDriveEraseMbr(int)),
+                                   HbMessageBox::Yes | HbMessageBox::No);
+
+            // TODO use HbListDialog
+            QStringList list;
+            list << "1" << "2" << "3" << "4";
+            openListDialog(list, QString("Partitions?"), this, SLOT(diskAdminPartitionDriveGetCount(HbAction*)));
+        }
+    }
+}
+
+/**
+  Store result of user query about proceeding when drive is not removable.
+  */
+void FbDriveView::diskAdminPartitionDriveIsNotRemovable(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        mProceed = true;
+    } else {
+        mProceed = false;
+    }
+}
+
+/**
+  Store result of user query about erase MBR
+  */
+void FbDriveView::diskAdminPartitionDriveEraseMbr(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        mEraseMBR = true;
+    }
+}
+
+/**
+  Partition the selected drive
+  */
+void FbDriveView::diskAdminPartitionDriveGetCount(HbAction* action)
+{
+    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
+    if(!action && dlg && dlg->selectedItems().count()){
+        int selectionIndex = dlg->selectedItems().at(0).toInt();
+        QModelIndex currentIndex = currentItemIndex();
+        int amountOfPartitions = selectionIndex + 1;
+        mEngineWrapper->DiskAdminPartitionDrive(currentIndex, mEraseMBR, amountOfPartitions);
+        refreshList();
+    }
+}
+
+// ---------------------------------------------------------------------------
+// tools menu
+// ---------------------------------------------------------------------------
+void FbDriveView::toolsAllAppsToTextFile()
+{
+
+}
+
+/**
+  Write all files to text file
+  */
+void FbDriveView::toolsAllFilesToTextFile()
+{
+    mEngineWrapper->toolsWriteAllFiles();
+}
+
+//void FbDriveView::toolsAvkonIconCacheEnable()
+//{
+//
+//}
+//void FbDriveView::toolsAvkonIconCacheDisable()
+//{
+//
+//}
+
+/**
+  Disable extended errors
+  */
+void FbDriveView::toolsDisableExtendedErrors()
+{
+    mEngineWrapper->ToolsSetErrRd(false);
+}
+
+void FbDriveView::toolsDumpMsgStoreWalk()
+{
+
+}
+void FbDriveView::toolsEditDataTypes()
+{
+
+}
+
+/**
+  Enable extended errors
+  */
+void FbDriveView::toolsEnableExtendedErrors()
+{
+    mEngineWrapper->ToolsSetErrRd(true);
+}
+
+/**
+  Open simulate leave dialog
+  */
+void FbDriveView::toolsErrorSimulateLeave()
+{
+    int leaveCode = -6;
+    QString heading = QString("Leave code");
+    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulateLeave(HbAction*)), QString::number(leaveCode), scene());
+}
+
+
+/**
+  Simulate leave.
+  */
+void FbDriveView::doToolsErrorSimulateLeave(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        bool ok;
+        int leaveCode = dlg->value().toString().toInt(&ok);
+        if (leaveCode != 0 || ok) {
+            mEngineWrapper->ToolsErrorSimulateLeave(leaveCode);
+        }
+    }
+}
+
+/**
+  Open simulate panic dialog.
+  */
+void FbDriveView::toolsErrorSimulatePanic()
+{
+    mPanicCategory = QString ("Test Category");
+    QString heading = QString("Panic category");
+    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulatePanicCode(HbAction*)), mPanicCategory, scene());
+}
+
+/**
+  Simulate panic.
+  */
+void FbDriveView::doToolsErrorSimulatePanicCode(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        mPanicCategory = dlg->value().toString();
+        int panicCode(555);
+        QString heading = QString("Panic code");
+        HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulatePanic(HbAction*)), panicCode, scene());
+    }
+}
+
+/**
+  Simulate panic.
+  */
+void FbDriveView::doToolsErrorSimulatePanic(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        bool ok;
+        int panicCode = dlg->value().toInt(&ok);
+        if (panicCode != 0 || ok) {
+            mEngineWrapper->ToolsErrorSimulatePanic(mPanicCategory, panicCode);
+        }
+    }
+}
+
+/**
+  Open simulate exception dialog.
+  */
+void FbDriveView::toolsErrorSimulateException()
+{
+    int exceptionCode = 0;
+    QString heading = QString("Exception code");
+    HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulateException(HbAction*)), exceptionCode, scene());
+}
+
+/**
+  Simulate exception.
+  */
+void FbDriveView::doToolsErrorSimulateException(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        bool ok;
+        int exceptionCode = dlg->value().toInt(&ok);
+        if (exceptionCode != 0 || ok) {
+            mEngineWrapper->ToolsErrorSimulateException(exceptionCode);
+        }
+    }
+}
+
+//    void FbDriveView::toolsLocalConnectivityActivateInfrared()
+//{
+//
+//}
+//    void FbDriveView::toolsLocalConnectivityLaunchBTUI()
+//{
+//
+//}
+//    void FbDriveView::toolsLocalConnectivityLaunchUSBUI()
+//{
+//
+//}
+void FbDriveView::toolsMessageInbox()
+{
+
+}
+void FbDriveView::toolsMessageDrafts()
+{
+
+}
+void FbDriveView::toolsMessageSentItems()
+{
+
+}
+void FbDriveView::toolsMessageOutbox()
+{
+
+}
+void FbDriveView::toolsMemoryInfo()
+{
+
+}
+void FbDriveView::toolsSecureBackStart()
+{
+
+}
+void FbDriveView::toolsSecureBackRestore()
+{
+
+}
+void FbDriveView::toolsSecureBackStop()
+{
+
+}
+
+/**
+  Open debug mask dialog
+  */
+void FbDriveView::toolsSetDebugMaskQuestion()
+{
+    quint32 dbgMask = mEngineWrapper->getDebugMask();
+    QString dbgMaskText = QString("0x").append(QString::number(dbgMask, 16));
+    QString heading = QString("Kernel debug mask in hex format");
+    HbInputDialog::queryText(heading, this, SLOT(toolsSetDebugMask(HbAction*)), dbgMaskText, scene());
+}
+
+/**
+  Set debug mask
+  */
+void FbDriveView::toolsSetDebugMask(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString dbgMaskText = dlg->value().toString();
+        if (dbgMaskText.length() > 2 && dbgMaskText[0]=='0' && dbgMaskText[1]=='x') {
+            bool ok;
+            quint32 dbgMask = dbgMaskText.toUInt(&ok, 16);
+            if (dbgMask != 0 || ok) {
+                mEngineWrapper->toolsSetDebugMask(dbgMask);
+                Notifications::showConfirmationNote(QString("Changed"));
+            } else {
+                Notifications::showErrorNote(QString("Cannot convert value"));
+            }
+        } else {
+            Notifications::showErrorNote(QString("Not in hex format"));
+        }
+    }
+}
+
+void FbDriveView::toolsShowOpenFilesHere()
+{
+
+}
+
+// ---------------------------------------------------------------------------
+// main menu items
+// ---------------------------------------------------------------------------
+
+/**
+  Show about note
+  */
+void FbDriveView::about()
+{
+    Notifications::showAboutNote();
+}
+
+// ---------------------------------------------------------------------------
+// End of operations
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+
+/**
+  Item is selected from list when selection mode is activated from menu
+  */
+void FbDriveView::selectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/)
+{
+    //QItemSelectionModel *selectionModel = mListView->selectionModel();
+}
+
+/**
+  An item is clicked from navigation item list. Navigation item list contains
+  drive-, folder- or file items. Opens selected drive, folder or file popup menu
+  */
+void FbDriveView::activated(const QModelIndex& index)
+{
+    if (mFbDriveModel) {
+//        if (mEngineWrapper->isDriveListViewActive()) {
+            mEngineWrapper->moveDownToDirectory(index);
+            //emit aboutToShowFileView(QString(mEngineWrapper->currentPath()));
+            emit aboutToShowFileView();
+            //refreshList();
+//        }
+    }
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbeditorview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,144 @@
+/*
+* 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 "fbeditorview.h"
+
+#include <HbView>
+#include <HbApplication>
+#include <HbAction>
+#include <HbMenu>
+#include <HbTextEdit>
+#include <hbpushbutton.h>
+
+#include <QGraphicsLinearLayout>
+#include <QFile>
+#include <QFileInfo>
+#include <QTextStream>
+#include <QByteArray>
+#include <QByteRef>
+
+FbEditorView::FbEditorView() :
+    mTextEdit(0),
+    mFileHex(false),
+    mFlagReadOnly(),
+    mFileName(),
+    mFileContent(),
+    mToTextAction(0),
+    mToHexAction(0),
+    mExitAction(0)
+{
+    // Override back navigation action
+    HbAction *backNaviAction = new HbAction(Hb::BackNaviAction, this);
+    connect(backNaviAction, SIGNAL(triggered()), this, SLOT(backButtonClicked()));
+    setNavigationAction(backNaviAction);
+
+    createMenu();
+
+    // text editor
+//    mTextEdit = new QTextEdit();
+//    QGraphicsLinearLayout *editorLayout = new QGraphicsLinearLayout(Qt::Vertical);
+//    QGraphicsProxyWidget *editorWidget = new QGraphicsProxyWidget();
+//    editorWidget->setWidget(mTextEdit);
+//    editorLayout->addItem(editorWidget);
+//    setLayout(editorLayout);
+
+    mTextEdit = new HbTextEdit();
+    mTextEdit->setAlignment(Qt::AlignTop);
+    QGraphicsLinearLayout *editorLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
+    editorLayout->addItem(mTextEdit);
+    setLayout(editorLayout);
+}
+
+FbEditorView::~FbEditorView()
+{
+//    delete mTextEdit;
+//    delete mToTextAction;
+//    delete mToHexAction;
+//    delete mExitAction;
+}
+
+void FbEditorView::open(const QString& fileName, bool flagReadOnly)
+{
+    mFlagReadOnly = flagReadOnly;
+
+    if (!fileName.isEmpty()) {
+        mTextEdit->setReadOnly(mFlagReadOnly);
+        loadFile(fileName);
+    }
+    else {
+        // not valid file name
+    }
+}
+
+void FbEditorView::loadFile(const QString &fileName)
+{
+    mFileName = fileName;
+    QFile file(fileName);
+    QFileInfo baseName(fileName);
+    setTitle(baseName.fileName());
+
+    if (!file.open(QFile::ReadOnly | QFile::Text)) {
+        // note: cannot be opened. readonly or not text
+        return;
+    }
+    QTextStream in(&file);
+    in.setAutoDetectUnicode(false);
+
+    mFileContent = in.readAll();
+    file.close();
+    displayInText();
+}
+
+void FbEditorView::displayInText()
+{
+    mFileHex = false;
+    QByteArray asciiContent = mFileContent.toAscii();
+    mTextEdit->setPlainText(QString(asciiContent));
+}
+
+void FbEditorView::displayInHex()
+{
+    QByteArray asciiContent = mFileContent.toAscii().toHex();
+    QString textInHex = QString(asciiContent);
+    mTextEdit->setPlainText(textInHex);
+    mFileHex = true;
+}
+
+void FbEditorView::createMenu()
+{
+    mToTextAction = menu()->addAction("View as text");
+    connect(mToTextAction, SIGNAL(triggered()), this, SLOT(displayInText()));
+    mToHexAction = menu()->addAction("View as hex");
+    connect(mToHexAction, SIGNAL(triggered()), this, SLOT(displayInHex()));
+//    mExitAction = menu()->addAction("Exit");
+//    connect(mExitAction, SIGNAL(triggered()), this, SLOT(backButtonClicked()));
+
+    // update the menus before showing it:
+    connect(menu(), SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
+}
+
+void FbEditorView::updateMenu()
+{
+    mToTextAction->setVisible(mFileHex);
+    mToHexAction->setVisible(!mFileHex);
+}	
+
+void FbEditorView::backButtonClicked()
+{
+    emit finished(false);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbfileentry.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,215 @@
+/*
+* 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 "fbfileentry.h"
+
+#include <HbExtendedLocale>
+
+// ---------------------------------------------------------------------------
+
+FbFileEntry::FbFileEntry(TFileEntry &aFileEntry)
+: mFileEntry(aFileEntry)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+FbFileEntry::~FbFileEntry()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+QString FbFileEntry::fullName()
+{
+    return QString::fromUtf16(mFileEntry.iFullName.Ptr(), mFileEntry.iFullName.Length());
+}
+
+// ---------------------------------------------------------------------------
+
+QString FbFileEntry::path()
+{
+    return QString::fromUtf16(mFileEntry.iPath.Ptr(), mFileEntry.iPath.Length());
+}
+
+// ---------------------------------------------------------------------------
+
+int FbFileEntry::attributes()
+{
+    return mFileEntry.iEntry.iAtt;
+}
+
+QString FbFileEntry::attributesString()
+{
+    QString attributesString;
+    if (mFileEntry.iEntry.IsArchive()) {
+        attributesString.append(archiveTextShort());
+    } else {
+        attributesString.append(noAttributeTextShort());
+    }
+    if (mFileEntry.iEntry.IsHidden()) {
+        attributesString.append(hiddenTextShort());
+    } else {
+        attributesString.append(noAttributeTextShort());
+    }
+    if (mFileEntry.iEntry.IsReadOnly()) {
+        attributesString.append(readOnlyTextShort());
+    } else {
+        attributesString.append(noAttributeTextShort());
+    }
+    if (mFileEntry.iEntry.IsSystem()) {
+        attributesString.append(systemTextShort());
+    } else {
+        attributesString.append(noAttributeTextShort());
+    }
+
+    return attributesString;
+}
+
+// ---------------------------------------------------------------------------
+
+int FbFileEntry::size()
+{
+    return mFileEntry.iEntry.iSize;
+}
+
+// ---------------------------------------------------------------------------
+
+QString FbFileEntry::sizeString()
+{
+    QString sizeString;
+    if (size() < 1024) {
+        sizeString.append(QString::number(size()));
+        sizeString.append(" B");
+    } else if (size() < 1024*1024) {
+        qreal sizeKB = static_cast<qreal>(size() / 1024);
+        sizeString.append( QString::number(sizeKB, 'f',1));
+        sizeString.append(" kB");
+    } else {
+        qreal sizeMB = static_cast<qreal>(size() / (1024*1024));
+        sizeString.append( QString::number(sizeMB, 'f',1));
+        sizeString.append(" MB");
+    }
+    return sizeString;
+}
+
+// ---------------------------------------------------------------------------
+
+//QDateTime FbFileEntry::modified()
+//{
+//    QDateTime modified;
+//    TTime time1Jan1970UTC = TTime(_L("19700101:000000.000000"));
+//    TTimeIntervalSeconds intervalSeconds;
+//
+//    TTime entryModified = mFileEntry.iEntry.iModified;
+//
+//    TInt err = /*mFileEntry.iEntry.iModified*/ entryModified.SecondsFrom(time1Jan1970UTC, intervalSeconds);
+//    if (err == KErrNone) {
+//        quint32 secsSince1Jan1970UTC = intervalSeconds.Int();
+//        modified = QDateTime::fromTime_t(secsSince1Jan1970UTC);
+//        qDebug() << "QDateTime:: " << modified.toString();
+//        modified.setTimeSpec(Qt::LocalTime);
+//        qDebug() << "QDateTime:: " << modified.toString() << modified.toLocalTime().toString();
+//    }
+//    return modified;
+//}
+
+// ---------------------------------------------------------------------------
+
+QString FbFileEntry::modifiedDateTimeString(const QString aDateTimeFormat)
+{
+    // TODO use HbExtendedLocale to convert date and time
+//    QDateTime modifiedInLocalTime = modified();//.toLocalTime();
+//    HbExtendedLocale locale = HbExtendedLocale::system();
+//    QString date = locale.format(modifiedInLocalTime.date(), r_qtn_date_usual);
+//    QString time = locale.format(modifiedInLocalTime.time(), r_qtn_time_usual);
+//
+//    return date + " " + time;
+    QString modifiedString;
+    TTime entryModified = mFileEntry.iEntry.iModified;
+    RTz Tz;
+    TInt err = Tz.Connect();
+    if ( err == KErrNone && Tz.ConvertToLocalTime( entryModified ) == KErrNone )
+    {
+        entryModified = mFileEntry.iEntry.iModified;
+    }
+    TBuf<128> extraData;
+    const TFileName dateTimeFormat = TFileName(aDateTimeFormat.utf16());
+    entryModified.FormatL(extraData, dateTimeFormat);
+    modifiedString = QString::fromUtf16(extraData.Ptr(), extraData.Length());
+    Tz.Close();
+
+    return modifiedString;
+}
+
+QString FbFileEntry::modifiedString()
+{
+    const QString KCurrentDate("%D%M%*Y%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B");
+    return modifiedDateTimeString(KCurrentDate);
+}
+
+// ---------------------------------------------------------------------------
+
+//int FbFileEntry::Uid(int id)
+//{
+//    return id;//mFileEntry.iEntry.iType[id];
+//}
+
+// ---------------------------------------------------------------------------
+
+bool FbFileEntry::isDir()
+{
+    return mFileEntry.iEntry.IsDir();
+}
+
+// ---------------------------------------------------------------------------
+
+
+QString FbFileEntry::name()
+{
+    return QString::fromUtf16(mFileEntry.iEntry.iName.Ptr(), mFileEntry.iEntry.iName.Length());
+}
+
+// ---------------------------------------------------------------------------
+
+int FbFileEntry::dirEntries()
+{
+    return mFileEntry.iDirEntries;
+}
+
+// ---------------------------------------------------------------------------
+
+QString FbFileEntry::dirEntriesString()
+{
+    QString dirEntriesString;
+    dirEntriesString.append(QString::number(dirEntries()));
+    if (dirEntries() == 1) {
+        dirEntriesString.append(" entry");
+    } else {
+        dirEntriesString.append(" entries");
+    }
+    return dirEntriesString;
+}
+
+// ---------------------------------------------------------------------------
+
+int FbFileEntry::iconId()
+{
+    return mFileEntry.iIconId;
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbfilelistviewitem.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "fbfilelistviewitem.h"
+
+#include <QString>
+#include <QStringList>
+#include <QGraphicsLinearLayout>
+#include <QRectF>
+#include <QPainter>
+
+#include <hblabel.h>
+#include <hbcheckbox.h>
+#include <hbabstractitemview.h>
+
+FbFileListViewItem::FbFileListViewItem(QGraphicsItem *parent) :
+    HbListViewItem(parent),
+    hLayout(0),
+    mDiskNameLabel(0),
+    mSizeLabel(0),
+    mFreeLabel(0),
+    mIconLabel(0)
+{
+}
+
+FbFileListViewItem::~FbFileListViewItem()
+{
+}
+
+void FbFileListViewItem::polish(HbStyleParameters &params)
+{
+    Q_UNUSED(params);
+}
+
+bool FbFileListViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+    Q_UNUSED(index);
+    return true;
+}
+
+
+HbAbstractViewItem *FbFileListViewItem::createItem()
+{
+    return new FbFileListViewItem(*this);
+}
+
+void FbFileListViewItem::updateChildItems()
+{
+    if(!hLayout) {
+        init();
+    }
+
+    // Qt::DisplayRole
+    QVariant displayRole = modelIndex().data(Qt::DisplayRole);
+    QString diskName("default");
+    QStringList stringList;
+    if (displayRole.isValid()) {
+        if (displayRole.canConvert<QString>()) {                // EFileViewModeSimple
+            stringList.append(displayRole.toString());
+        } else if (displayRole.canConvert<QStringList>()) {     // EFileViewModeExtended
+            stringList = displayRole.toStringList();
+        }
+        if (stringList.count() > 0)
+            diskName = stringList[0]; //modelIndex().data( Qt::UserRole ).toString();
+
+        mDiskNameLabel->setPlainText(diskName/*displayString*/);
+    }
+
+//    mSizeLabel->setPlainText( hbTrId ( "Size: " ) /*+ FmUtils::formatStorageSize( driverInfo.size() )*/ );
+//    mFreeLabel->setPlainText( hbTrId ( "Free: " ) /*+ FmUtils::formatStorageSize( driverInfo.freeSize() )*/ );
+    if (stringList.count() > 1)
+        mSizeLabel->setPlainText( stringList[1] );
+
+    //mStorageSizeDiagram->setFreeSizePercentage();
+    //mFreeLabel->setPlainText( stringList[2] );
+
+    //    mCheckBox->setCheckState( checkState() );
+
+    // Qt::DecorationRole
+    QVariant decorationRole = modelIndex().data(Qt::DecorationRole);
+    if (decorationRole.isValid()) {
+        QIcon icon = qvariant_cast<QIcon>(decorationRole);
+//    if( icon.isNull() ) {
+//        QFileIconProvider fileIconProvider;
+//        icon = fileIconProvider.icon(QFileIconProvider::Drive);
+//    }
+    mIconLabel->setIcon(HbIcon(icon));
+    }
+}
+
+void FbFileListViewItem::setCheckedState(int state)
+{
+    HbAbstractViewItem::setCheckState(static_cast<Qt::CheckState>(state));
+}
+
+void FbFileListViewItem::init()
+{
+    hLayout = new QGraphicsLinearLayout();
+
+    hLayout->setOrientation( Qt::Horizontal );
+    hLayout->addItem(layout());
+
+    mIconLabel = new HbLabel();
+    hLayout->addItem( mIconLabel );
+    hLayout->setAlignment( mIconLabel, Qt::AlignTop );
+    hLayout->setStretchFactor( mIconLabel, 0 );
+
+//    mStorageSizeDiagram = new FbDriveStorageSizeDiagram(this);
+//    hLayout->addItem( mStorageSizeDiagram );
+//    hLayout->setAlignment( mIconLabel, Qt::AlignTop );
+//    hLayout->setStretchFactor( mStorageSizeDiagram, 0 );
+
+    QGraphicsLinearLayout *vLayout = new QGraphicsLinearLayout();
+    vLayout->setOrientation( Qt::Vertical );
+
+    mDiskNameLabel = new HbLabel();
+    //HbFontSpec fontSpecPrimary(HbFontSpec::Primary);
+    //fontSpecPrimary.setTextHeight(18.0);
+    //mDiskNameLabel->setFontSpec( fontSpecPrimary );
+    vLayout->addItem( mDiskNameLabel );
+    vLayout->setAlignment( mDiskNameLabel, Qt::AlignLeft );
+
+    mSizeLabel = new HbLabel();
+    //HbFontSpec fontSpecSecondary(HbFontSpec::Secondary);
+    //fontSpecSecondary.setTextHeight(18.0);
+    //mSizeLabel->setFontSpec(fontSpecSecondary);
+    vLayout->addItem( mSizeLabel );
+    vLayout->setAlignment(mSizeLabel, Qt::AlignLeft);
+
+//    mFreeLabel = new HbLabel();
+//    mFreeLabel->setFontSpec( HbFontSpec( HbFontSpec::Secondary ) );
+//    vLayout->addItem( mFreeLabel );
+//    vLayout->setAlignment( mFreeLabel, Qt::AlignLeft );
+
+    HbWidget *labelsWidget = new HbWidget();
+    labelsWidget->setLayout(vLayout);
+
+    hLayout->setAlignment( labelsWidget, Qt::AlignLeft );
+
+    hLayout->addItem( labelsWidget );
+    hLayout->setStretchFactor( labelsWidget, 1 );
+
+//    this->setMaximumHeight(80);
+
+    setLayout( hLayout );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbfilemodel.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "fbfilemodel.h"
+#include "enginewrapper.h"
+#include "fbfileentry.h"
+#include "filebrowsersettings.h"
+#include "FB.hrh"
+
+#include <QModelIndex>
+#include <QFileIconProvider>
+
+/**
+  Constructs a file browser custom system model with the given \a engineWrapper and \a parent.
+  */
+FbFileModel::FbFileModel(EngineWrapper *engineWrapper, QObject *parent) :
+    QAbstractListModel(parent),
+    mEngineWrapper(engineWrapper),
+    mFileIconProvider(0)
+{
+    mFileIconProvider = new QFileIconProvider();
+}
+
+/**
+  Destroys this file browser custom system model.
+  */
+FbFileModel::~FbFileModel()
+{  
+    if (mFileIconProvider) {
+        delete mFileIconProvider;
+    }
+}
+
+/**
+  \reimp
+  */
+int FbFileModel::rowCount(const QModelIndex &parent) const
+{
+    Q_UNUSED(parent);
+    return mEngineWrapper->itemCount();
+}
+
+/**
+  \reimp
+  */
+QVariant FbFileModel::data(const QModelIndex &index, int role) const
+{
+    if (!index.isValid() || index.model() != this)
+        return QVariant();
+
+    switch (role) {
+    case Qt::EditRole:
+    case Qt::DisplayRole: {
+            QStringList listItem;
+            FbFileEntry fileEntry(mEngineWrapper->getFileEntry(index));
+            if (mEngineWrapper->settings().fileViewMode() == EFileViewModeSimple)
+            {
+                listItem /*<< fileEntry.IconId()*/
+                        << fileEntry.name();
+            } else if (mEngineWrapper->settings().fileViewMode() == EFileViewModeExtended) {
+                QString extraData;
+                extraData.append(fileEntry.modifiedString());
+                if (fileEntry.isDir() && fileEntry.dirEntries() >= 0) {
+                    extraData.append(" - ");
+                    extraData.append(fileEntry.dirEntriesString());
+                } else if (!fileEntry.isDir()) {
+                    extraData.append(" - ");
+                    extraData.append(fileEntry.sizeString());
+                }
+                listItem /*<< fileEntry.IconId()*/
+                        << fileEntry.name() << extraData << fileEntry.attributesString();
+            }
+            return listItem;
+        }
+    case Qt::DecorationRole: {
+            if (mEngineWrapper) {
+                QIcon icon;
+                    FbFileEntry fileEntry(mEngineWrapper->getFileEntry(index));
+                    if (fileEntry.isDir()) {
+                        icon = mFileIconProvider->icon(QFileIconProvider::Folder);
+                    } else {
+                        icon = mFileIconProvider->icon(QFileIconProvider::File);
+                    }
+//                }
+                return QVariant(icon);
+            }
+        }
+    }
+
+    return QVariant();
+}
+
+/**
+  * Move down to directory selected by index \a index
+  */
+void FbFileModel::moveDownToDirectory(const QModelIndex &index)
+{
+    beginResetModel();
+    mEngineWrapper->moveDownToDirectory(index);
+    endResetModel();
+}
+
+/**
+  * Move to directory one level up
+  */
+void FbFileModel::moveUpOneLevel()
+{
+    beginResetModel();
+    mEngineWrapper->moveUpOneLevel();
+    endResetModel();
+}
+
+/**
+  \reimp
+  */
+QVariant FbFileModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+    Q_UNUSED(section)
+    Q_UNUSED(orientation)
+    Q_UNUSED(role)
+
+    // TODO, implement or remove
+    return QVariant();
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbfileview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1759 @@
+/*
+* 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 "fbfileview.h"
+#include "fbsettingsview.h"
+#include "fbeditorview.h"
+#include "fbsearchview.h"
+#include "enginewrapper.h"
+#include "notifications.h"
+#include "fbfolderselectiondialog.h"
+#include "fbfilemodel.h"
+#include "filebrowsersortfilterproxymodel.h"
+//#include "fbfilelistviewitem.h"
+#include "fbpropertiesdialog.h"
+
+#include <HbMenu>
+#include <HbPopup>
+#include <HbView>
+#include <HbMessageBox>
+#include <HbAction>
+#include <HbLabel>
+#include <HbListView>
+#include <HbListViewItem>
+#include <HbListWidget>
+#include <HbLineEdit>
+#include <HbAbstractViewItem>
+#include <HbSelectionDialog>
+#include <HbValidator>
+#include <HbInputDialog>
+#include <HbToolBar>
+#include <HbToolBarExtension>
+#include <HbSearchPanel>
+#include <HbMainWindow>
+
+#include <QString>
+#include <QGraphicsLinearLayout>
+#include <QItemSelection>
+
+#include <QDebug>
+//TODO check if needed to do this way
+#include <FB.hrh>
+
+// ---------------------------------------------------------------------------
+
+FbFileView::FbFileView() :
+    mEngineWrapper(0),
+    mListView(0),
+    mToolBar(0),
+    mNaviPane(0),
+    mSearchPanel(0),
+    mMainLayout(0),
+    mFbFileModel(0),
+    mSortFilterProxyModel(0),
+    mOptionMenuActions(),
+    mContextMenuActions(),
+    mContextMenu(0),
+    mToolbarBackAction(0),
+    mToolbarFilterAction(0),
+    mToolbarSelectionModeAction(0),
+    mToolbarPasteAction(0),
+    mSelectionModeOnIcon(),
+    mSelectionModeOffIcon(),
+    mItemHighlighted(false),
+    mLocationChanged(false),
+    mRemoveFileAfterCopied(false),
+//    mClipBoardInUse(false),
+    mCurrentIndex(),
+    mOldPassword(),
+    mPanicCategory(),
+    mAbsoluteFilePath(),
+    mOverwriteOptions(),
+    mTargetDir(),
+    mModelIndex(),
+    mNewFileName(),
+    mProceed(false),
+    mEraseMBR(false)
+{
+    setTitle("File Browser");
+
+    createMenu();
+    createContextMenu();
+    createSearchPanel();
+    createToolBar();
+}
+
+// ---------------------------------------------------------------------------	
+
+void FbFileView::init(EngineWrapper *engineWrapper)
+{
+    mEngineWrapper = engineWrapper;
+
+    mListView = new HbListView(this);
+    mListView->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
+
+//    mListView->setItemPrototype(new FbDiskListViewItem(mListView));
+
+    mFbFileModel = new FbFileModel(mEngineWrapper);
+    if (!mListView->model()) {
+        mEngineWrapper->refreshView();
+        mListView->setModel(mFbFileModel);
+    }
+    mListView->setRootIndex(QModelIndex());
+
+    //setItemVisible(Hb::ToolBarItem, !mEngineWrapper->isDriveListViewActive());
+//    mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
+
+    connect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
+    connect(mListView, SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
+            this, SLOT(onLongPressed(HbAbstractViewItem*, QPointF)));
+    connect(mEngineWrapper, SIGNAL(fileSystemDataChanged()), this, SLOT(refreshList()));
+
+    mNaviPane = new HbLabel(this);
+    mNaviPane->setPlainText(QString(" ")); // TODO get from settings or default
+    //mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
+    HbFontSpec fontSpec(HbFontSpec::PrimarySmall);
+    mNaviPane->setFontSpec(fontSpec);
+
+    // Create layout and add list view and toolbar into layout:
+    mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mMainLayout->addItem(mNaviPane);
+    mMainLayout->addItem(mListView);
+    setLayout(mMainLayout);
+}
+
+// ---------------------------------------------------------------------------
+
+FbFileView::~FbFileView()
+{  
+    if (mContextMenu) {
+        mContextMenu->deleteLater();
+    }
+    if (mSortFilterProxyModel) {
+        delete mSortFilterProxyModel;
+    }
+    delete mFbFileModel;
+    delete mListView;
+    delete mToolBar;
+}
+
+/**
+  Initial setup for options menu.
+  Dynamic menu update during the runtime is performed by updateOptionMenu() which
+  to menu's aboutToShow() signal.
+  */
+void FbFileView::createMenu()
+{
+    createFileMenu();
+    createEditMenu();
+    createViewMenu();
+    createToolsMenu();
+
+    createSelectionMenuItem();
+    createSettingsMenuItem();
+    createAboutMenuItem();
+    createExitMenuItem();
+
+    // menu dynamic update
+    connect(menu(), SIGNAL(aboutToShow()), this, SLOT(updateOptionMenu()));
+}
+
+/**
+  Initial setup for File submenu
+  */
+void FbFileView::createFileMenu()
+{
+    mOptionMenuActions.mFileMenu = menu()->addMenu("File");
+
+    mOptionMenuActions.mFileBackMoveUp = mOptionMenuActions.mFileMenu->addAction("Back/Move up", this, SLOT(fileBackMoveUp()));
+    mOptionMenuActions.mFileSearch = mOptionMenuActions.mFileMenu->addAction("Search...", this, SLOT(fileSearch()));
+
+    mOptionMenuActions.mFileNewMenu = mOptionMenuActions.mFileMenu->addMenu("New");
+    mOptionMenuActions.mFileNewFile = mOptionMenuActions.mFileNewMenu->addAction("File", this, SLOT(fileNewFile()));
+    mOptionMenuActions.mFileNewDirectory = mOptionMenuActions.mFileNewMenu->addAction("Directory", this, SLOT(fileNewDirectory()));
+
+    mOptionMenuActions.mFileDelete = mOptionMenuActions.mFileMenu->addAction("Delete", this, SLOT(fileDelete()));
+    mOptionMenuActions.mFileRename = mOptionMenuActions.mFileMenu->addAction("Rename", this, SLOT(fileRename()));
+    mOptionMenuActions.mFileTouch = mOptionMenuActions.mFileMenu->addAction("Touch", this, SLOT(fileTouch()));
+
+    mOptionMenuActions.mFileSetAttributes = mOptionMenuActions.mFileMenu->addAction("Set attributes...", this, SLOT(fileSetAttributes()));
+}
+
+/**
+  Initial setup for Edit submenu
+  */
+void FbFileView::createEditMenu()
+{
+    mOptionMenuActions.mEditMenu = menu()->addMenu("Edit");
+
+    mOptionMenuActions.mEditSnapShotToE = mOptionMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
+    mOptionMenuActions.mEditSnapShotToE->setVisible(false);
+    mOptionMenuActions.mEditCut = mOptionMenuActions.mEditMenu->addAction("Cut", this, SLOT(editCut()));
+    mOptionMenuActions.mEditCopy = mOptionMenuActions.mEditMenu->addAction("Copy", this, SLOT(editCopy()));
+    mOptionMenuActions.mEditPaste = mOptionMenuActions.mEditMenu->addAction("Paste", this, SLOT(editPaste()));
+
+    mOptionMenuActions.mEditCopyToFolder = mOptionMenuActions.mEditMenu->addAction("Copy to folder...", this, SLOT(editCopyToFolder()));
+    mOptionMenuActions.mEditMoveToFolder = mOptionMenuActions.mEditMenu->addAction("Move to folder...", this, SLOT(editMoveToFolder()));
+
+    mOptionMenuActions.mEditSelect = mOptionMenuActions.mEditMenu->addAction("Select", this, SLOT(editSelect()));
+    mOptionMenuActions.mEditUnselect = mOptionMenuActions.mEditMenu->addAction("Unselect", this, SLOT(editUnselect()));
+    mOptionMenuActions.mEditSelectAll = mOptionMenuActions.mEditMenu->addAction("Select all", this, SLOT(editSelectAll()));
+    mOptionMenuActions.mEditUnselectAll = mOptionMenuActions.mEditMenu->addAction("Unselect all", this, SLOT(editUnselectAll()));
+}
+
+/**
+  Initial setup for View submenu
+  */
+void FbFileView::createViewMenu()
+{
+    mOptionMenuActions.mViewMenu = menu()->addMenu("View");
+    //mOptionMenuActions.mViewMenu->menuAction()->setVisible(false);
+
+    mOptionMenuActions.mViewFilterEntries = mOptionMenuActions.mViewMenu->addAction("Filter entries", this, SLOT(viewFilterEntries()));
+    mOptionMenuActions.mViewRefresh = mOptionMenuActions.mViewMenu->addAction("Refresh", this, SLOT(viewRefresh()));
+}
+
+/**
+  Initial setup for Tools submenu
+  */
+void FbFileView::createToolsMenu()
+{
+    mOptionMenuActions.mToolsMenu = menu()->addMenu("Tools");
+
+    mOptionMenuActions.mToolsAllAppsToTextFile = mOptionMenuActions.mToolsMenu->addAction("All apps to a text file", this, SLOT(toolsAllAppsToTextFile()));
+    mOptionMenuActions.mToolsAllAppsToTextFile->setVisible(false);
+    mOptionMenuActions.mToolsAllFilesToTextFile = mOptionMenuActions.mToolsMenu->addAction("All files to a text file", this, SLOT(toolsAllFilesToTextFile()));
+    //mOptionMenuActions.mToolsAllFilesToTextFile->setVisible(false);
+
+//    mOptionMenuActions.mToolsAvkonIconCacheMenu = mOptionMenuActions.mToolsMenu->addMenu("Avkon icon cache");
+//    mOptionMenuActions.mToolsAvkonIconCacheMenu->menuAction()->setVisible(false);
+//    mOptionMenuActions.mToolsAvkonIconCacheEnable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Enable", this, SLOT(toolsAvkonIconCacheEnable()));
+//    mOptionMenuActions.mToolsAvkonIconCacheDisable = mOptionMenuActions.mToolsAvkonIconCacheMenu->addAction("Clear and disable", this, SLOT(toolsAvkonIconCacheDisable()));
+
+    mOptionMenuActions.mToolsDisableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Disable extended errors", this, SLOT(toolsDisableExtendedErrors()));
+    mOptionMenuActions.mToolsDumpMsgStoreWalk = mOptionMenuActions.mToolsMenu->addAction("Dump msg. store walk", this, SLOT(toolsDumpMsgStoreWalk()));
+    mOptionMenuActions.mToolsDumpMsgStoreWalk->setVisible(false);
+    mOptionMenuActions.mToolsEditDataTypes = mOptionMenuActions.mToolsMenu->addAction("Edit data types", this, SLOT(toolsEditDataTypes()));
+    mOptionMenuActions.mToolsEditDataTypes->setVisible(false);
+    mOptionMenuActions.mToolsEnableExtendedErrors = mOptionMenuActions.mToolsMenu->addAction("Enable extended errors", this, SLOT(toolsEnableExtendedErrors()));
+
+    mOptionMenuActions.mToolsErrorSimulateMenu = mOptionMenuActions.mToolsMenu->addMenu("Error simulate");
+    mOptionMenuActions.mToolsErrorSimulateLeave = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Leave", this, SLOT(toolsErrorSimulateLeave()));
+    mOptionMenuActions.mToolsErrorSimulatePanic = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Panic", this, SLOT(toolsErrorSimulatePanic()));
+    mOptionMenuActions.mToolsErrorSimulatePanic->setVisible(false);
+    mOptionMenuActions.mToolsErrorSimulateException = mOptionMenuActions.mToolsErrorSimulateMenu->addAction("Exception", this, SLOT(toolsErrorSimulateException()));
+
+//    mOptionMenuActions.mLocalConnectivityMenu = mOptionMenuActions.mToolsMenu->addMenu("Local connectivity");
+//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared = mOptionMenuActions.mLocalConnectivityMenu->addAction("Activate infrared", this, SLOT(toolsLocalConnectivityActivateInfrared()));
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch BT UI", this, SLOT(toolsLocalConnectivityLaunchBTUI()));
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI = mOptionMenuActions.mLocalConnectivityMenu->addAction("Launch USB UI", this, SLOT(toolsLocalConnectivityLaunchUSBUI()));
+
+    mOptionMenuActions.mToolsMessageAttachmentsMenu = mOptionMenuActions.mToolsMenu->addMenu("Message attachments");
+    mOptionMenuActions.mToolsMessageAttachmentsMenu->menuAction()->setVisible(false);
+    mOptionMenuActions.mToolsMessageInbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Inbox", this, SLOT(toolsMessageInbox()));
+    mOptionMenuActions.mToolsMessageDrafts = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Drafts", this, SLOT(toolsMessageDrafts()));
+    mOptionMenuActions.mToolsMessageSentItems = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Sent items", this, SLOT(toolsMessageSentItems()));
+    mOptionMenuActions.mToolsMessageOutbox = mOptionMenuActions.mToolsMessageAttachmentsMenu->addAction("Outbox", this, SLOT(toolsMessageOutbox()));
+
+    mOptionMenuActions.mToolsMemoryInfo = mOptionMenuActions.mToolsMenu->addAction("Memory info", this, SLOT(toolsMemoryInfo()));
+    mOptionMenuActions.mToolsMemoryInfo->setVisible(false);
+
+    mOptionMenuActions.mToolsSecureBackupMenu = mOptionMenuActions.mToolsMenu->addMenu("Secure backup");
+    mOptionMenuActions.mToolsSecureBackupMenu->menuAction()->setVisible(false);
+    mOptionMenuActions.mToolsSecureBackStart = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start backup", this, SLOT(toolsSecureBackStart()));
+    mOptionMenuActions.mToolsSecureBackRestore = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Start restore", this, SLOT(toolsSecureBackRestore()));
+    mOptionMenuActions.mToolsSecureBackStop = mOptionMenuActions.mToolsSecureBackupMenu->addAction("Stop", this, SLOT(toolsSecureBackStop()));
+
+    mOptionMenuActions.mToolsSetDebugMask = mOptionMenuActions.mToolsMenu->addAction("Set debug mask", this, SLOT(toolsSetDebugMaskQuestion()));
+    mOptionMenuActions.mToolsShowOpenFilesHere = mOptionMenuActions.mToolsMenu->addAction("Show open files here", this, SLOT(toolsShowOpenFilesHere()));
+    mOptionMenuActions.mToolsShowOpenFilesHere->setVisible(false);
+}
+
+/**
+  Creates Selection mode menu item in option menu
+  */
+void FbFileView::createSelectionMenuItem()
+{
+    if (!mOptionMenuActions.mSelection) {
+        mOptionMenuActions.mSelection = menu()->addAction("Selection mode");
+        mOptionMenuActions.mSelection->setToolTip("Selection mode");
+        mOptionMenuActions.mSelection->setCheckable(true);
+        connect(mOptionMenuActions.mSelection, SIGNAL(triggered()), this, SLOT(selectionModeChanged()));
+    }
+}
+
+/**
+  Creates Setting menu item in option menu
+  */
+void FbFileView::createSettingsMenuItem()
+{
+    mOptionMenuActions.mSetting = menu()->addAction("Settings...");
+    connect(mOptionMenuActions.mSetting, SIGNAL(triggered()), this, SIGNAL(aboutToShowSettingsView()));
+}
+
+
+/**
+  Creates About menu item in option menu
+  */
+void FbFileView::createAboutMenuItem()
+{
+    // about note
+    mOptionMenuActions.mAbout = menu()->addAction("About");
+    connect(mOptionMenuActions.mAbout, SIGNAL(triggered()), this, SLOT(about()));
+}
+
+/**
+  Creates Exit menu item in option menu
+  */
+void FbFileView::createExitMenuItem()
+{
+    // application exit
+    mOptionMenuActions.mExit = menu()->addAction("Exit");
+    connect(mOptionMenuActions.mExit, SIGNAL(triggered()), qApp, SLOT(quit()));
+}
+
+/**
+  update menu: disk admin available only in device root view. edit available only in folder view
+  when file or folder content exist in current folder, or clipboard has copied item.
+  file and view menus updated every time regarding the folder content.
+  tools, settings, about, exit always available.
+  If there's remove and add operations at same time, always remove first
+  to keep to the correct menu items order.
+  */
+void FbFileView::updateOptionMenu()
+{
+    bool isFileItemListEmpty = mFbFileModel->rowCount() == 0;
+    bool isNormalModeActive = true;       //iModel->FileUtils()->IsNormalModeActive();
+    bool isCurrentDriveReadOnly = mEngineWrapper->isCurrentDriveReadOnly();   //iModel->FileUtils()->IsCurrentDriveReadOnly();
+    // bool isCurrentItemDirectory = mEngineWrapper->getFileEntry(currentItemIndex()).isDir();
+    // bool currentSelected = true;    //iContainer->ListBox()->View()->ItemIsSelected(iContainer->ListBox()->View()->CurrentItemIndex());
+    bool isAllSelected = mListView->selectionModel()->selection().count() == mFbFileModel->rowCount();
+    //bool isNoneSelected = mListView->selectionModel()->selection().count() != 0;
+    bool hasSelectedItems = mListView->selectionModel()->selection().count() != 0;
+    bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
+    bool isClipBoardEmpty = !mEngineWrapper->isClipBoardListInUse();
+    //bool showSnapShot = false;           //iModel->FileUtils()->DriveSnapShotPossible();
+
+    bool showEditMenu(true);
+    if (isFileItemListEmpty && isClipBoardEmpty)
+        showEditMenu = false;
+    else
+        showEditMenu = true;
+
+    mOptionMenuActions.mEditMenu->menuAction()->setVisible(showEditMenu);
+
+    //mOptionMenuActions.mFileBackMoveUp->setVisible( !isDriveListViewActive);
+
+    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileView, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory);
+    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileEdit, isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory);
+    //aMenuPane->SetItemDimmed(EFileBrowserCmdFileSendTo, isFileItemListEmpty || driveListActive || isCurrentItemDirectory);
+
+    mOptionMenuActions.mFileNewMenu->menuAction()->setVisible(!isCurrentDriveReadOnly);
+    mOptionMenuActions.mFileDelete->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems/*isSelectionMode*/);
+    mOptionMenuActions.mFileRename->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems /*&& !isSelectionMode*/);
+    mOptionMenuActions.mFileTouch->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems);
+
+    mOptionMenuActions.mFileSetAttributes->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && hasSelectedItems);
+    // TODO mOptionMenuActions.mFileCompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory));
+    // TODO mOptionMenuActions.mFileDecompress->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty || !hasSelectedItems || isCurrentItemDirectory));
+
+    mOptionMenuActions.mEditMenu->menuAction()->setVisible( (!isSelectionMode && !isClipBoardEmpty && !isCurrentDriveReadOnly)
+                                                            || (isSelectionMode));
+    mOptionMenuActions.mEditCut->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && isSelectionMode && hasSelectedItems);
+    mOptionMenuActions.mEditCopy->setVisible(!isFileItemListEmpty && isSelectionMode && hasSelectedItems);
+    mOptionMenuActions.mEditPaste->setVisible(!isClipBoardEmpty && !isCurrentDriveReadOnly);
+    mOptionMenuActions.mEditCopyToFolder->setVisible(!isFileItemListEmpty && isSelectionMode && hasSelectedItems);
+    mOptionMenuActions.mEditMoveToFolder->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && isSelectionMode && hasSelectedItems);
+
+    mOptionMenuActions.mEditSelect->setVisible(false/*!currentSelected && !isFileItemListEmpty*/);
+    mOptionMenuActions.mEditUnselect->setVisible(false/*currentSelected && !isFileItemListEmpty*/);
+    mOptionMenuActions.mEditSelectAll->setVisible(!isFileItemListEmpty && isSelectionMode && !isAllSelected);
+    mOptionMenuActions.mEditUnselectAll->setVisible(!isFileItemListEmpty && hasSelectedItems);
+
+    // TODO mOptionMenuActions.mViewSort->setVisible(!(!isNormalModeActive || isFileItemListEmpty));
+    // TODO mOptionMenuActions.mViewOrder->setVisible(!(!isNormalModeActive  || isFileItemListEmpty));
+    mOptionMenuActions.mViewRefresh->setVisible(isNormalModeActive);
+    mOptionMenuActions.mViewFilterEntries->setVisible(!isFileItemListEmpty);
+
+    // TODO R_FILEBROWSER_VIEW_SORT_SUBMENU
+    // aMenuPane->SetItemButtonState(iModel->FileUtils()->SortMode(), EEikMenuItemSymbolOn);
+
+    // TODO R_FILEBROWSER_VIEW_ORDER_SUBMENU
+    // aMenuPane->SetItemButtonState(iModel->FileUtils()->OrderMode(), EEikMenuItemSymbolOn);
+
+    // aResourceId == R_FILEBROWSER_TOOLS_SUBMENU
+    bool noExtendedErrorsAllowed = mEngineWrapper->ErrRdFileExists();
+    mOptionMenuActions.mToolsDisableExtendedErrors->setVisible(noExtendedErrorsAllowed);
+    mOptionMenuActions.mToolsEnableExtendedErrors->setVisible(!noExtendedErrorsAllowed);
+
+//    bool infraRedAllowed = mEngineWrapper->FileExists(KIRAppPath);
+//    bool bluetoothAllowed = mEngineWrapper->FileExists(KBTAppPath);
+//    bool usbAllowed = mEngineWrapper->FileExists(KUSBAppPath);
+//
+//    bool noLocalCon = !infraRedAllowed && !bluetoothAllowed && !usbAllowed;
+//    mOptionMenuActions.mToolsLocalConnectivityMenu->menuAction()->setVisible(!noLocalCon);
+//
+//    mOptionMenuActions.mToolsLocalConnectivityActivateInfrared->setVisible(infraRedAllowed);
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchBTUI->setVisible(bluetoothAllowed);
+//    mOptionMenuActions.mToolsLocalConnectivityLaunchUSBUI->setVisible(usbAllowed);
+}
+
+void FbFileView::createContextMenu()
+{
+    mContextMenu = new HbMenu();
+    connect(mContextMenu, SIGNAL(aboutToShow()), this, SLOT(updateContextMenu()));
+
+    createFileContextMenu();
+    createEditContextMenu();
+    createViewContextMenu();
+}
+
+
+void FbFileView::createFileContextMenu()
+{
+    mContextMenuActions.mFileMenu = mContextMenu->addMenu("File");
+
+    //mContextMenuActions.mFileBackMoveUp = mContextMenuActions.mFileMenu->addAction("Back/Move up (<-)", this, SLOT(fileBackMoveUp()));
+//    mContextMenuActions.mFileOpenDirectory = mContextMenuActions.mFileMenu->addAction("Open directory (->)", this, SLOT(fileOpenDirectory()));
+    mContextMenuActions.mFileOpenDirectory = mContextMenu->addAction("Open directory (->)", this, SLOT(fileOpenDirectory()));
+    mContextMenuActions.mSearch = mContextMenu->addAction("Search...", this, SLOT(fileSearch()));
+    mContextMenuActions.mFileSearch = mContextMenuActions.mFileMenu->addAction("Search...", this, SLOT(fileSearch()));
+
+    mContextMenuActions.mFileDelete = mContextMenuActions.mFileMenu->addAction("Delete", this, SLOT(fileDelete()));
+    mContextMenuActions.mFileRename = mContextMenuActions.mFileMenu->addAction("Rename", this, SLOT(fileRename()));
+    mContextMenuActions.mFileTouch = mContextMenuActions.mFileMenu->addAction("Touch", this, SLOT(fileTouch()));
+    mContextMenuActions.mFileProperties = mContextMenuActions.mFileMenu->addAction("Properties", this, SLOT(fileProperties()));
+
+    mContextMenuActions.mFileChecksumsMenu = mContextMenuActions.mFileMenu->addMenu("Checksums");
+    mContextMenuActions.mFileChecksumsMD5 = mContextMenuActions.mFileChecksumsMenu->addAction("MD5", this, SLOT(fileChecksumsMD5()));
+    mContextMenuActions.mFileChecksumsMD2 = mContextMenuActions.mFileChecksumsMenu->addAction("MD2", this, SLOT(fileChecksumsMD2()));
+    mContextMenuActions.mFileChecksumsSHA1 = mContextMenuActions.mFileChecksumsMenu->addAction("SHA-1", this, SLOT(fileChecksumsSHA1()));
+
+    mContextMenuActions.mFileSetAttributes = mContextMenuActions.mFileMenu->addAction("Set attributes...", this, SLOT(fileSetAttributes()));
+}
+
+void FbFileView::createEditContextMenu()
+{
+    mContextMenuActions.mEditMenu = mContextMenu->addMenu("Edit");
+
+    //mContextMenuActions.mEditSnapShotToE = mContextMenuActions.mEditMenu->addAction("Snap shot to E:", this, SLOT(editSnapShotToE()));
+//    mContextMenuActions.mEditSnapShotToE->setVisible(false);
+    mContextMenuActions.mEditCut = mContextMenuActions.mEditMenu->addAction("Cut", this, SLOT(editCut()));
+    mContextMenuActions.mEditCopy = mContextMenuActions.mEditMenu->addAction("Copy", this, SLOT(editCopy()));
+    mContextMenuActions.mEditPaste = mContextMenuActions.mEditMenu->addAction("Paste", this, SLOT(editPaste()));
+
+    mContextMenuActions.mEditCopyToFolder = mContextMenuActions.mEditMenu->addAction("Copy to folder...", this, SLOT(editCopyToFolder()));
+    mContextMenuActions.mEditMoveToFolder = mContextMenuActions.mEditMenu->addAction("Move to folder...", this, SLOT(editMoveToFolder()));
+}
+
+void FbFileView::createViewContextMenu()
+{
+
+}
+
+void FbFileView::updateContextMenu()
+{
+    bool isFileItemListEmpty = mFbFileModel->rowCount() == 0;
+//    bool isNormalModeActive = true;       //iModel->FileUtils()->IsNormalModeActive();
+    bool isCurrentDriveReadOnly = mEngineWrapper->isCurrentDriveReadOnly();
+    bool isCurrentItemDirectory = mEngineWrapper->getFileEntry(currentItemIndex()).isDir();
+    bool hasSelectedItems = mListView->selectionModel()->selection().count() != 0;
+    bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
+    bool isClipBoardEmpty = !mEngineWrapper->isClipBoardListInUse();
+
+    mContextMenuActions.mFileOpenDirectory->setVisible(!isFileItemListEmpty && isCurrentItemDirectory && isSelectionMode);
+    mContextMenuActions.mSearch->setVisible(!isFileItemListEmpty && isSelectionMode && isCurrentItemDirectory);
+    mContextMenuActions.mFileSearch->setVisible(!isFileItemListEmpty && !isSelectionMode && isCurrentItemDirectory);
+    // File submenu
+    //mContextMenuActions.mFileBackMoveUp->setVisible();
+    mContextMenuActions.mFileMenu->menuAction()->setVisible(!isSelectionMode);
+
+    mContextMenuActions.mFileDelete->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly);
+    mContextMenuActions.mFileRename->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly && !isSelectionMode);
+    mContextMenuActions.mFileTouch->setVisible(!isFileItemListEmpty && !isCurrentDriveReadOnly);
+    mContextMenuActions.mFileProperties->setVisible(!isFileItemListEmpty && !isSelectionMode);
+
+    mContextMenuActions.mFileChecksumsMenu->menuAction()->setVisible(!isFileItemListEmpty && !isSelectionMode && !isCurrentItemDirectory);
+
+    // Edit submenu
+    mContextMenuActions.mEditMenu->menuAction()->setVisible(!isSelectionMode);
+    mContextMenuActions.mEditCut->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty));
+    mContextMenuActions.mEditCopy->setVisible(!(isFileItemListEmpty));
+    mContextMenuActions.mEditPaste->setVisible(!isClipBoardEmpty && !isCurrentDriveReadOnly);
+    mContextMenuActions.mEditCopyToFolder->setVisible(!isFileItemListEmpty);
+    mContextMenuActions.mEditMoveToFolder->setVisible(!(isCurrentDriveReadOnly || isFileItemListEmpty));
+}
+
+// ---------------------------------------------------------------------------
+
+void FbFileView::onLongPressed(HbAbstractViewItem *listViewItem, QPointF coords)
+{
+    QModelIndex proxyIndex = listViewItem->modelIndex();
+    //map to source model if needed
+    if (mSortFilterProxyModel) {
+        mCurrentIndex = mSortFilterProxyModel->mapToSource(proxyIndex);
+    } else {
+        mCurrentIndex = proxyIndex;
+    }
+
+    mContextMenu->setPreferredPos(coords);
+    mContextMenu->show();
+}
+
+/**
+  Create a file browser search panel
+  */
+void FbFileView::createSearchPanel()
+{
+    // Create search panel widget
+    mSearchPanel = new HbSearchPanel(this);
+    mSearchPanel->setPlaceholderText(QString("Type filter criteria"));
+    mSearchPanel->setProgressive(false);
+    connect(mSearchPanel, SIGNAL(criteriaChanged(const QString &)), this, SLOT(filterCriteriaChanged(const QString &)));
+    connect(mSearchPanel, SIGNAL(exitClicked()), this, SLOT(clearFilterCriteria()));
+    mSearchPanel->hide();
+}
+
+/**
+  Create a file browser tool bar
+  */
+void FbFileView::createToolBar()
+{
+    mToolBar = toolBar();
+
+    connect(mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)),  this, SLOT(setOrientation(Qt::Orientation)));
+
+    // Back button
+    mToolbarBackAction = new HbAction(mToolBar);
+    mToolbarBackAction->setToolTip("Back");
+    HbIcon backIcon(QString(":/qtg_mono_filebrowser_parent_folder.svg"));
+    backIcon.setFlags(backIcon.flags() | HbIcon::Colorized);
+    mToolbarBackAction->setIcon(backIcon);
+    connect(mToolbarBackAction, SIGNAL(triggered()), this, SLOT(fileBackMoveUp()));
+    mToolBar->addAction(mToolbarBackAction);
+
+    // Filter button
+    mToolbarFilterAction = new HbAction(mToolBar);
+    mToolbarFilterAction->setToolTip("Filter");
+    HbIcon searchIcon(QString(":/qtg_mono_filebrowser_search.svg"));
+    searchIcon.setFlags(searchIcon.flags() | HbIcon::Colorized);
+    mToolbarFilterAction->setIcon(searchIcon);
+    connect(mToolbarFilterAction, SIGNAL(triggered()), this, SLOT(viewFilterEntries()));
+    mToolBar->addAction(mToolbarFilterAction);
+
+    // Selection Mode button
+    mToolbarSelectionModeAction = new HbAction(mToolBar);
+    mOptionMenuActions.mSelection->setToolTip("Selection mode");
+    connect(mToolbarSelectionModeAction, SIGNAL(triggered()), this, SLOT(selectionModeButtonTriggered()));
+
+    mSelectionModeOnIcon.setIconName (QString(":/qtg_mono_filebrowser_selection_mode.svg"));
+    mSelectionModeOnIcon.setFlags(mSelectionModeOnIcon.flags() | HbIcon::Colorized);
+
+    mSelectionModeOffIcon.setIconName(QString(":/qtg_mono_filebrowser_selection_mode_off.svg"));
+    mSelectionModeOffIcon.setFlags(mSelectionModeOffIcon.flags() | HbIcon::Colorized);
+
+    mToolbarSelectionModeAction->setIcon(mSelectionModeOnIcon);
+
+    mToolBar->addAction(mToolbarSelectionModeAction);
+
+    // Paste button
+    mToolbarPasteAction = new HbAction(mToolBar);
+    mToolbarPasteAction->setToolTip("Paste");
+    HbIcon pasteIcon(QString(":/qtg_mono_filebrowser_paste.svg"));
+    pasteIcon.setFlags(pasteIcon.flags() | HbIcon::Colorized);
+    mToolbarPasteAction->setIcon(pasteIcon);
+    connect(mToolbarPasteAction, SIGNAL(triggered()), this, SLOT(editPaste()));
+    mToolBar->addAction(mToolbarPasteAction);
+    mToolbarPasteAction->setEnabled(false);
+}
+
+/**
+  * Change toolbar orientation
+  */
+void FbFileView::setOrientation(Qt::Orientation orientation)
+{
+    if (orientation == Qt::Horizontal) {
+        mToolBar->setOrientation(Qt::Vertical);
+    } else {
+        mToolBar->setOrientation(Qt::Horizontal);
+    }
+}
+
+/**
+  Refresh FileBrowser view
+  */
+void FbFileView::refreshList()
+{
+    editUnselectAll();
+    mEngineWrapper->refreshView();
+    if (!mToolbarFilterAction->isEnabled()) {
+        clearFilterCriteria();
+    }
+    mListView->reset();
+
+    if (mListView->model() && mListView->model()->rowCount() > 0) {
+        QModelIndex firstIndex = mListView->model()->index(0, 0);
+        mListView->scrollTo(firstIndex);
+    }
+
+    mToolbarPasteAction->setEnabled(mEngineWrapper->isClipBoardListInUse());
+
+    TListingMode listingMode = mEngineWrapper->listingMode();
+    if (listingMode == ENormalEntries)
+        mNaviPane->setPlainText(QString(mEngineWrapper->currentPath()));
+    else if (listingMode == ESearchResults)
+        mNaviPane->setPlainText(QString(tr("Search results")));
+    else if (listingMode == EOpenFiles)
+        mNaviPane->setPlainText(QString(tr("Open files")));
+    else if (listingMode == EMsgAttachmentsInbox)
+        mNaviPane->setPlainText(QString(tr("Attachments in Inbox")));
+    else if (listingMode == EMsgAttachmentsDrafts)
+        mNaviPane->setPlainText(QString(tr("Attachments in Drafts")));
+    else if (listingMode == EMsgAttachmentsSentItems)
+        mNaviPane->setPlainText(QString(tr("Attachments in Sent Items")));
+    else if (listingMode == EMsgAttachmentsOutbox)
+        mNaviPane->setPlainText(QString(tr("Attachments in Outbox")));
+}
+
+// ---------------------------------------------------------------------------	
+
+void FbFileView::fileOpen(HbAction *action)
+{
+//    Q_UNUSED(action);
+    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
+    if(!action && dlg && dlg->selectedItems().count()){
+        int selectionIndex = dlg->selectedItems().at(0).toInt();
+
+        if (selectionIndex == 0) {
+            // open editor view
+            emit aboutToShowEditorView(mAbsoluteFilePath, true);
+        } else if (selectionIndex == 1) {
+            // AppArc
+            mEngineWrapper->openAppArc(mAbsoluteFilePath);
+        } else {
+            // DocHandler
+            mEngineWrapper->openDocHandler(mAbsoluteFilePath, true);
+        }
+    }
+}
+
+/**
+  Open overwrite dialog
+  */
+void FbFileView::fileOverwriteDialog(/*QObject *receiver, const char *member*/)
+{
+    mOverwriteOptions = OverwriteOptions();
+    // open user-dialog to select: view as text/hex,  open w/AppArc or open w/DocH. embed
+    QStringList list;
+    list << QString("Overwrite all")
+         << QString("Skip all existing")
+         << QString("Gen. unique filenames")
+         << QString("Query postfix");
+    openListDialog(list, QString("Overwrite?"), this, SLOT(fileOverwrite(HbAction *)));
+}
+
+/**
+  File overwrite
+  */
+void FbFileView::fileOverwrite(HbAction *action)
+{
+    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
+    if(!action && dlg && dlg->selectedItems().count()) {
+        mOverwriteOptions.queryIndex = dlg->selectedItems().at(0).toInt();
+        if (mOverwriteOptions.queryIndex == EFileActionQueryPostFix) {
+            QString heading = QString("Postfix");
+            HbInputDialog::queryText(heading,
+                                     this, SLOT(fileOverwritePostfix(HbAction *)),
+                                     QString(), scene());
+        } else if (mOverwriteOptions.queryIndex == EFileActionSkipAllExisting) {
+            mOverwriteOptions.overWriteFlags = 0;
+            emit overwriteOptionSelected();
+        } else {
+            emit overwriteOptionSelected();
+        }
+    } else {
+        mOverwriteOptions.doFileOperations = false;
+        emit overwriteOptionSelected();
+    }
+}
+
+/**
+  File overwrite postfix query dialog
+  */
+void FbFileView::fileOverwritePostfix(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        mOverwriteOptions.postFix = dlg->value().toString();
+    } else {
+        mOverwriteOptions.doFileOperations = false;
+    }
+    emit overwriteOptionSelected();
+}
+
+/**
+  Show a list dialog
+  \param List \a items of item to select item from.
+  \param Title text \a titleText of a dialog heading widget
+  \param Receiver \a receiver execute slot on
+  \param Slot \a executed when dialog has been closed
+  \return None
+  */
+void FbFileView::openListDialog(const QStringList& items, const QString &titleText,
+                                QObject *receiver, const char *member)
+{
+    // Create a list and some simple content for it
+    HbSelectionDialog *dlg = new HbSelectionDialog();
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    // Set items to be popup's content
+    dlg->setStringItems(items);
+    dlg->setSelectionMode(HbAbstractItemView::SingleSelection);
+
+    HbLabel *title = new HbLabel(dlg);
+    title->setPlainText(titleText);
+    dlg->setHeadingWidget(title);
+    // Launch popup and handle the user response:
+    dlg->open(receiver, member);
+}
+
+/**
+  Stores selection or current index mapped to source model
+  */
+void FbFileView::storeSelectedItemsOrCurrentItem()
+{
+    QItemSelectionModel *selectionIndexes = mListView->selectionModel();
+
+    // by default use selected items
+    if (selectionIndexes) {
+        bool isSelectionMode = mOptionMenuActions.mSelection && mOptionMenuActions.mSelection->isChecked();
+        if (isSelectionMode) {
+            if (selectionIndexes->hasSelection()) {
+                QItemSelection itemSelection = mListView->selectionModel()->selection();
+                //map to source model if needed
+                if (mSortFilterProxyModel) {
+                    mSelectionIndexes = mSortFilterProxyModel->mapSelectionToSource(itemSelection).indexes();
+                } else {
+                    mSelectionIndexes = itemSelection.indexes();
+                }
+            } else { // or if none selected, clear selection
+                mSelectionIndexes.clear();
+            }
+        } else { // or if none selected, use the current item index
+            mSelectionIndexes.clear();
+            QModelIndex currentIndex = currentItemIndex();  //alreade mapped to source model
+            mSelectionIndexes.append(currentIndex);
+        }
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+QModelIndex FbFileView::currentItemIndex()
+{
+    return mCurrentIndex;
+}
+
+// ---------------------------------------------------------------------------
+// operations in File Menu
+// ---------------------------------------------------------------------------
+
+/**
+  Move back/up in folder browsing history
+  */
+void FbFileView::fileBackMoveUp()
+{
+    mLocationChanged = true;
+    mFbFileModel->moveUpOneLevel();
+    //mListView->setRootIndex(currentItemIndex());
+    refreshList();
+    if (mEngineWrapper->isDriveListViewActive()) {
+        emit aboutToShowDriveView();
+    }
+}
+
+void FbFileView::fileOpenDirectory()
+{
+    mLocationChanged = true;
+    mFbFileModel->moveDownToDirectory(currentItemIndex());
+
+    refreshList();
+}
+
+void FbFileView::fileSearch()
+{
+    QString searchPath;
+    HbAction *contextrMenuAction = static_cast<HbAction *>(sender());
+    if (contextrMenuAction
+        && (contextrMenuAction == mContextMenuActions.mSearch
+            || contextrMenuAction == mContextMenuActions.mFileSearch)
+        && mEngineWrapper->getFileEntry(currentItemIndex()).isDir()) {
+        searchPath = mEngineWrapper->currentPath()
+                     + mEngineWrapper->getFileEntry(currentItemIndex()).name()
+                     + QString("\\");
+    } else {
+        searchPath = mEngineWrapper->currentPath();
+    }
+
+    emit aboutToShowSearchView(searchPath);
+}
+
+/**
+  Open new file dialog
+  */
+void FbFileView::fileNewFile()
+{
+    QString heading = QString("Enter filename");
+    HbInputDialog::queryText(heading, this, SLOT(doFileNewFile(HbAction*)), QString(), scene());
+}
+
+/**
+  Create a new file in current directory with a name queried from user
+  */
+void FbFileView::doFileNewFile(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString newFileName = dlg->value().toString();
+        mEngineWrapper->createNewFile(newFileName);
+        refreshList();
+    }
+}
+
+/**
+  Open new directory dialog
+  */
+void FbFileView::fileNewDirectory()
+{
+    QString heading = QString("Enter directory name");
+    HbInputDialog::queryText(heading, this, SLOT(doFileNewDirectory(HbAction*)), QString(), scene());
+}
+
+/**
+  Create a new directory in current directory with a name queried from user
+  */
+void FbFileView::doFileNewDirectory(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString newDirectoryName = dlg->value().toString();
+        mEngineWrapper->createNewDirectory(newDirectoryName);
+        refreshList();
+    }
+}
+
+/**
+  Question for Delete actually selected files
+  */
+void FbFileView::fileDelete()
+{
+    storeSelectedItemsOrCurrentItem();
+    const QString messageFormat = "Delete %1 entries?";
+    QString message = messageFormat.arg(mSelectionIndexes.count());
+    HbMessageBox::question(message, this, SLOT(doFileDelete(int)), HbMessageBox::Yes | HbMessageBox::No);
+}
+
+/**
+  Delete actually selected files
+  */
+void FbFileView::doFileDelete(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        mEngineWrapper->deleteItems(mSelectionIndexes);
+        mEngineWrapper->startExecutingCommands(QString("Deleting"));
+    }
+}
+
+/**
+  Open rename dialog for actually selected files
+  */
+void FbFileView::fileRename()
+{
+    storeSelectedItemsOrCurrentItem();
+    mEngineWrapper->setCurrentSelection(mSelectionIndexes);
+
+    for (int i(0), ie(mSelectionIndexes.count()); i < ie; ++i ) {
+        mProceed = (i == ie-1); // if the last item
+        mModelIndex = mSelectionIndexes.at(i);
+        FbFileEntry entry = mEngineWrapper->getFileEntry(mModelIndex);
+
+        QString heading = QString("Enter new name");
+        HbInputDialog::queryText(heading, this, SLOT(doFileRename(HbAction*)), entry.name(), scene());
+    }
+}
+
+/**
+  Rename actually selected files
+  */
+void FbFileView::doFileRename(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        mNewFileName = dlg->value().toString();
+
+        if (mEngineWrapper->targetExists(mModelIndex, mNewFileName)) {
+            const QString messageTemplate = QString("%1 already exists, overwrite?");
+            QString message = messageTemplate.arg(mNewFileName);
+            HbMessageBox::question(message, this, SLOT(doFileRenameFileExist(int)), HbMessageBox::Yes | HbMessageBox::No);
+        } else {
+            proceedFileRename();
+        }
+    }
+}
+
+/**
+  Rename actually selected files
+  */
+void FbFileView::doFileRenameFileExist(int action)
+{
+    if (action == HbMessageBox::Yes) {
+        proceedFileRename();
+    }
+}
+
+
+void FbFileView::proceedFileRename()
+{
+    mEngineWrapper->rename(mModelIndex, mNewFileName);
+    if (mProceed) {
+        mEngineWrapper->startExecutingCommands(QString("Renaming"));
+        refreshList();
+    }
+}
+
+/**
+  Touch actually selected files
+  */
+void FbFileView::fileTouch()
+{
+    storeSelectedItemsOrCurrentItem();
+    mEngineWrapper->setCurrentSelection(mSelectionIndexes);
+
+    if (mEngineWrapper->selectionHasDirs()) {
+        const QString message = "Recurse touch for all selected dirs?";
+        HbMessageBox::question(message, this, SLOT(doFileTouch(int)), HbMessageBox::Yes | HbMessageBox::No);
+    } else {
+        proceedFileTouch(false);
+    }
+}
+
+/**
+  Touch actually selected files
+  */
+void FbFileView::doFileTouch(int action)
+{
+    bool recurse = false;
+    if (action == HbMessageBox::Yes) {
+        recurse = true;
+        }
+    proceedFileTouch(recurse);
+}
+
+void FbFileView::proceedFileTouch(bool recurse)
+{
+    mEngineWrapper->touch(recurse);
+    mEngineWrapper->startExecutingCommands(QString("Touching"));
+    refreshList();
+}
+
+void FbFileView::fileChecksumsMD5()
+{
+    fileChecksums(EFileChecksumsMD5);
+}
+
+void FbFileView::fileChecksumsMD2()
+{
+    fileChecksums(EFileChecksumsMD2);
+}
+
+void FbFileView::fileChecksumsSHA1()
+{
+    fileChecksums(EFileChecksumsSHA1);
+}
+
+void FbFileView::fileChecksums(TFileBrowserCmdFileChecksums checksumType)
+{
+    mEngineWrapper->showFileCheckSums(currentItemIndex(), checksumType);
+}
+
+/**
+  Show file properties
+  */
+void FbFileView::fileProperties()
+{
+    const QString PropertiesEntryFormat("%1\t%2");
+    const QString PropertiesEntryTabbedFormat("\t%1");
+    const QString PropertiesEntrySizeFormat("%1\t%2 B");
+    const QString DateFormat("%D%M%Y%/0%1%/1%2%/2%3%/3");
+    const QString TimeFormat("%-B%:0%J%:1%T%:2%S%:3%+B");
+
+    const QString AttributesText("Atts");
+    const QString NumberOfEntriesText("Entries");
+    const QString NumberOfFilesText("Files");
+    const QString SizeText("Size");
+    const QString PathText("Path");
+    const QString DateText("Date");
+    const QString TimeText("Time");
+    const QString MimeTypeText("Mime");
+    const QString OpensWithText("Opens");
+
+    QModelIndex currentIndex = currentItemIndex();
+    QVector<QPair<QString, QString> > properties;
+    QString titleText;
+    bool showDialog(false);
+
+    if (currentIndex.row() >= 0 && currentIndex.row() < mEngineWrapper->itemCount()) {
+        // it is a file or a directory entry
+        FbFileEntry fileEntry(mEngineWrapper->getFileEntry(currentIndex));
+
+        // set title
+        titleText.append(fileEntry.name());
+
+        // path
+        properties.append(qMakePair(PathText, fileEntry.path()));
+
+        // date
+        properties.append(qMakePair(DateText, fileEntry.modifiedDateTimeString(DateFormat)));
+
+        // time
+        properties.append(qMakePair(TimeText, fileEntry.modifiedDateTimeString(TimeFormat)));
+
+        if (!fileEntry.isDir()) {
+            // size
+            QLocale loc;
+            QString fileSize = loc.toString(fileEntry.size());
+
+            //QString fileSize = QString::number(fileEntry.size());
+            properties.append(qMakePair(SizeText, fileSize));
+        } else if (fileEntry.isDir()
+                   && mEngineWrapper->settings().showSubDirectoryInfo()) {
+
+            QString fullPath;
+            fullPath.append(fileEntry.path())
+                    .append(fileEntry.name())
+                    .append(QString("\\"));
+
+            // number of entries
+            int entriesCount = mEngineWrapper->getEntriesCount(fullPath);
+            if (entriesCount >= 0) {
+                properties.append(qMakePair(NumberOfEntriesText, QString::number(entriesCount)));
+            }
+
+            // number of files
+            qint64 size(0);
+            int allFilesCount = mEngineWrapper->getFilesCountAndSize(fullPath, size);
+            properties.append(qMakePair(NumberOfFilesText, QString::number(allFilesCount)));
+
+            // size
+            QLocale loc;
+            QString folderSize = loc.toString(size);
+            properties.append(qMakePair(SizeText, folderSize));
+        }
+
+        // attributes
+        QStringList attributesValues;
+        if (fileEntry.isArchive())
+            attributesValues.append(fileEntry.archiveText());
+        if (fileEntry.isHidden())
+            attributesValues.append(fileEntry.hiddenText());
+        if (fileEntry.isReadOnly())
+            attributesValues.append(fileEntry.readOnlyText());
+        if (fileEntry.isSystem())
+            attributesValues.append(fileEntry.systemText());
+        if (attributesValues.isEmpty())
+            attributesValues.append(fileEntry.noAttributeText());
+
+        for (int i(0), ie(attributesValues.count()); i < ie; ++i) {
+            properties.append(qMakePair(AttributesText, attributesValues.at(i)));
+        }
+
+        if (!fileEntry.isDir()) {
+            // mime type
+            QString fullPath = fileEntry.path();
+            fullPath.append(fileEntry.name());
+            QString mimeType = mEngineWrapper->getMimeType(fullPath);
+            if (!mimeType.isEmpty()) {
+                properties.append(qMakePair(MimeTypeText, mimeType));
+            }
+
+            // opens with
+            QString openWith = mEngineWrapper->getOpenWith(fullPath);
+            if (!openWith.isEmpty()) {
+                properties.append(qMakePair(OpensWithText, openWith));
+            }
+        }
+        showDialog = true;
+    }
+
+    if (showDialog) {
+        FbPropertiesDialog *dialog = new FbPropertiesDialog();
+        dialog->setTitle(titleText);
+
+        // Set listwidget to be popup's content
+        dialog->setProperties(properties);
+        // Launch popup and handle the user response:
+        dialog->open();
+    }
+}
+
+void FbFileView::fileSetAttributes()
+{
+    storeSelectedItemsOrCurrentItem();
+    mEngineWrapper->setCurrentSelection(mSelectionIndexes);
+
+    QString attributesViewTitle("Multiple entries");
+
+    quint32 setAttributesMask(0);
+    quint32 clearAttributesMask(0);
+    bool recurse(false);
+
+    // set default masks if only one file selected
+    if (mSelectionIndexes.count() == 1)
+        {
+        mModelIndex = mSelectionIndexes.at(0);
+        FbFileEntry fileEntry = mEngineWrapper->getFileEntry(mModelIndex);
+
+        attributesViewTitle = fileEntry.name();
+
+        if (fileEntry.isArchive())
+            setAttributesMask |= KEntryAttArchive;
+        else
+            clearAttributesMask |= KEntryAttArchive;
+
+        if (fileEntry.isHidden())
+            setAttributesMask |= KEntryAttHidden;
+        else
+            clearAttributesMask |= KEntryAttHidden;
+
+        if (fileEntry.isReadOnly())
+            setAttributesMask |= KEntryAttReadOnly;
+        else
+            clearAttributesMask |= KEntryAttReadOnly;
+
+        if (fileEntry.isSystem())
+            setAttributesMask |= KEntryAttSystem;
+        else
+            clearAttributesMask |= KEntryAttSystem;
+        }
+
+    emit aboutToShowAttributesView(attributesViewTitle, setAttributesMask, clearAttributesMask, recurse);
+}
+
+// edit menu
+void FbFileView::editSnapShotToE()
+{
+
+}
+
+/**
+  Set selected files into clipboard.
+  Selected item will be removed after paste operation.
+  */
+void FbFileView::editCut()
+{
+    storeSelectedItemsOrCurrentItem();
+
+    // Store indices to clipboard
+    mClipboardIndexes.clear();
+    for (int i = 0; i < mSelectionIndexes.size(); ++i) {
+        mClipboardIndexes.append(mSelectionIndexes.at(i));
+    }
+
+    mEngineWrapper->clipboardCut(mClipboardIndexes);
+    mEngineWrapper->setCurrentSelection(mClipboardIndexes);
+
+    int operations = mClipboardIndexes.count();
+    const QString message = QString ("%1 entries cut to clipboard");
+    QString noteMsg = message.arg(operations);
+
+    mToolbarPasteAction->setEnabled(true);
+    Notifications::showInformationNote(noteMsg);
+}
+
+/**
+  Set selected files into clipboard.
+  Selected item will not be removed after paste operation.
+  */
+void FbFileView::editCopy()
+{
+    storeSelectedItemsOrCurrentItem();
+
+    // Store indices to clipboard
+    mClipboardIndexes.clear();
+    for (int i = 0; i < mSelectionIndexes.size(); ++i) {
+        mClipboardIndexes.append(mSelectionIndexes.at(i));
+    }
+
+    mEngineWrapper->clipboardCopy(mClipboardIndexes);
+    mEngineWrapper->setCurrentSelection(mClipboardIndexes);
+
+    int operations = mClipboardIndexes.count();
+
+    const QString message = QString ("%1 entries copied to clipboard");
+    QString noteMsg = message.arg(operations);
+
+    mToolbarPasteAction->setEnabled(true);
+    Notifications::showInformationNote(noteMsg);
+}
+
+/**
+  Moves or copies file selection stored in clipboard to a actual directory.
+  Removing files depend on previous operation, i.e. Cut or Copy
+  */
+void FbFileView::editPaste()
+{
+    bool someEntryExists(false);
+
+    someEntryExists = mEngineWrapper->isDestinationEntriesExists(mClipboardIndexes, mEngineWrapper->currentPath());
+    if (someEntryExists) {
+        connect(this, SIGNAL(overwriteOptionSelected()), this, SLOT(doEditPaste()));
+        fileOverwriteDialog();
+    } else {
+        doEditPaste();
+    }
+}
+
+void FbFileView::doEditPaste()
+{
+    mEngineWrapper->clipboardPaste(mOverwriteOptions);
+    mEngineWrapper->startExecutingCommands(mEngineWrapper->getClipBoardMode() == EClipBoardModeCut ?
+                                           QString("Moving") : QString("Copying") );
+    disconnect(this, SIGNAL(overwriteOptionSelected()), this, SLOT(doEditPaste()));
+}
+
+/**
+  Open copy to folder new filename dialog
+  */
+void FbFileView::editCopyToFolder()
+{
+    QString heading = QString("Enter new name");
+    FbCopyToFolderSelectionDialog *folderSelectionDialog = new FbCopyToFolderSelectionDialog();
+    folderSelectionDialog->open(this, SLOT(doEditCopyToFolder(int)));
+}
+
+/**
+  Copies current file selection to a queried directory.
+  */
+void FbFileView::doEditCopyToFolder(int action)
+{
+    FbCopyToFolderSelectionDialog *dlg = qobject_cast<FbCopyToFolderSelectionDialog*>(sender());
+    if (dlg && action == HbDialog::Accepted) {
+        mTargetDir = dlg->selectedFolder();
+
+        bool someEntryExists(false);
+
+        // TODO Set entry items here
+        storeSelectedItemsOrCurrentItem();
+        mEngineWrapper->setCurrentSelection(mSelectionIndexes);
+
+        someEntryExists = mEngineWrapper->isDestinationEntriesExists(mSelectionIndexes, mTargetDir);
+        if (someEntryExists) {
+            connect(this, SIGNAL(overwriteOptionSelected()), this, SLOT(doEditCopy()));
+            fileOverwriteDialog();
+        } else {
+            doEditCopy();
+        }
+    }
+}
+
+void FbFileView::doEditCopy()
+{
+    mEngineWrapper->copyToFolder(mTargetDir, mOverwriteOptions, false);
+    mEngineWrapper->startExecutingCommands(QString("Copying"));
+    disconnect(this, SIGNAL(overwriteOptionSelected()), this, SLOT(doEditCopy()));
+}
+
+/**
+  Open move to folder new filename dialog.
+  */
+void FbFileView::editMoveToFolder()
+{
+    QString heading = QString("Enter new name");
+    FbMoveToFolderSelectionDialog *folderSelectionDialog = new FbMoveToFolderSelectionDialog();
+    folderSelectionDialog->open(this, SLOT(doEditMoveToFolder(int)));
+}
+
+/**
+  Moves current file selection to a queried directory.
+  */
+void FbFileView::doEditMoveToFolder(int action)
+{
+    FbMoveToFolderSelectionDialog *dlg = qobject_cast<FbMoveToFolderSelectionDialog*>(sender());
+    if (dlg && action == HbDialog::Accepted) {
+        mTargetDir = dlg->selectedFolder();
+
+        bool someEntryExists(false);
+
+        // TODO Set entry items here
+        storeSelectedItemsOrCurrentItem();
+        mEngineWrapper->setCurrentSelection(mSelectionIndexes);
+
+        someEntryExists = mEngineWrapper->isDestinationEntriesExists(mSelectionIndexes, mTargetDir);
+        if (someEntryExists) {
+            connect(this, SIGNAL(overwriteOptionSelected()), this, SLOT(doEditMove()));
+            fileOverwriteDialog();
+        } else {
+            doEditMove();
+        }
+    }
+}
+
+void FbFileView::doEditMove()
+{
+    mEngineWrapper->copyToFolder(mTargetDir, mOverwriteOptions, true);
+    mEngineWrapper->startExecutingCommands(QString("Moving"));
+    disconnect(this, SIGNAL(overwriteOptionSelected()), this, SLOT(doEditMove()));
+}
+
+/**
+  Select current file
+  */
+void FbFileView::editSelect()
+{
+    QItemSelectionModel *selectionModel = mListView->selectionModel();
+    if (selectionModel) {
+        selectionModel->select(selectionModel->currentIndex(), QItemSelectionModel::SelectCurrent);
+        selectionModel->select(selectionModel->currentIndex(), QItemSelectionModel::Select);
+        refreshList();
+    }
+}
+
+/**
+  Unselect current file
+  */
+void FbFileView::editUnselect()
+{
+    QItemSelectionModel *selectionModel = mListView->selectionModel();
+    if (selectionModel) {
+        selectionModel->select(selectionModel->currentIndex(), QItemSelectionModel::Deselect);
+//        itemHighlighted(selectionModel->currentIndex());
+    }
+}
+
+/**
+  Select all files
+  */
+void FbFileView::editSelectAll()
+{
+    QItemSelectionModel *selectionModel = mListView->selectionModel();
+    if (selectionModel) {
+
+        //if (mFileBrowserModel->rowCount() > 0) {
+        if (mListView->model() && mListView->model()->rowCount() > 0) {
+            QModelIndex firstIndex = mListView->model()->index(0, 0);
+            QModelIndex lastIndex = mListView->model()->index( (mListView->model()->rowCount() - 1), 0);
+
+            QItemSelection itemSelection(firstIndex, lastIndex);
+            selectionModel->select(itemSelection, QItemSelectionModel::SelectCurrent);
+        }
+    }
+}
+
+/**
+  Unselect all files
+  */
+void FbFileView::editUnselectAll()
+{
+    QItemSelectionModel *selectionModel = mListView->selectionModel();
+    if (selectionModel) {
+        selectionModel->clearSelection();
+    }
+}
+
+// ---------------------------------------------------------------------------
+// view menu
+// ---------------------------------------------------------------------------
+/**
+  * Open the search panel
+  */
+void FbFileView::viewFilterEntries()
+{
+    if (mToolbarFilterAction) {
+        mToolbarFilterAction->setEnabled(false);
+    }
+
+    if (mMainLayout && mSearchPanel) {
+        mMainLayout->addItem(mSearchPanel);
+        mSearchPanel->show();
+    }
+}
+
+/**
+  Set filter criteria to proxy model
+  */
+void FbFileView::filterCriteriaChanged(const QString &criteria)
+{
+    if (!mSortFilterProxyModel) {
+        mSortFilterProxyModel = new FileBrowserSortFilterProxyModel(this);
+        mSortFilterProxyModel->setSourceModel(mFbFileModel);
+        mSortFilterProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
+        mListView->setModel(mSortFilterProxyModel);
+
+    }
+    mSortFilterProxyModel->setFilterCriteria(criteria);
+
+    setTitle(criteria);
+    if (criteria.isEmpty()) {
+        setTitle("File Browser");
+    }
+}
+
+/**
+  Set filter criteria to proxy model
+  */
+void FbFileView::clearFilterCriteria()
+{
+    if (mToolbarFilterAction) {
+        mToolbarFilterAction->setEnabled(true);
+    }
+
+    if (mSortFilterProxyModel) {
+        mListView->setModel(mFbFileModel);
+        mSortFilterProxyModel->deleteLater();
+        mSortFilterProxyModel = 0;
+    }
+
+    if (mMainLayout && mSearchPanel) {
+        mSearchPanel->setCriteria(QString(""));
+        mMainLayout->removeItem(mSearchPanel);
+        mSearchPanel->hide();
+        refreshList();
+    }
+    setTitle("File Browser");
+}
+
+/**
+  Refresh view
+  */
+void FbFileView::viewRefresh()
+{
+    refreshList();
+}
+
+// ---------------------------------------------------------------------------
+// tools menu
+// ---------------------------------------------------------------------------
+void FbFileView::toolsAllAppsToTextFile()
+{
+
+}
+
+/**
+  Write all files to text file
+  */
+void FbFileView::toolsAllFilesToTextFile()
+{
+    mEngineWrapper->toolsWriteAllFiles();
+}
+
+//void FbFileView::toolsAvkonIconCacheEnable()
+//{
+//
+//}
+//void FbFileView::toolsAvkonIconCacheDisable()
+//{
+//
+//}
+
+/**
+  Disable extended errors
+  */
+void FbFileView::toolsDisableExtendedErrors()
+{
+    mEngineWrapper->ToolsSetErrRd(false);
+}
+
+void FbFileView::toolsDumpMsgStoreWalk()
+{
+
+}
+void FbFileView::toolsEditDataTypes()
+{
+
+}
+
+/**
+  Enable extended errors
+  */
+void FbFileView::toolsEnableExtendedErrors()
+{
+    mEngineWrapper->ToolsSetErrRd(true);
+}
+
+/**
+  Open simulate leave dialog
+  */
+void FbFileView::toolsErrorSimulateLeave()
+{
+    int leaveCode = -6;
+    QString heading = QString("Leave code");
+    //HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulateLeave(HbAction*)), leaveCode, scene());
+    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulateLeave(HbAction*)), QString::number(leaveCode), scene());
+}
+
+
+/**
+  Simulate leave.
+  */
+void FbFileView::doToolsErrorSimulateLeave(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        bool ok;
+        int leaveCode = dlg->value().toString().toInt(&ok);
+        if (leaveCode != 0 || ok) {
+            mEngineWrapper->ToolsErrorSimulateLeave(leaveCode);
+        }
+    }
+}
+
+/**
+  Open simulate panic dialog.
+  */
+void FbFileView::toolsErrorSimulatePanic()
+{
+    mPanicCategory = QString ("Test Category");
+    QString heading = QString("Panic category");
+    HbInputDialog::queryText(heading, this, SLOT(doToolsErrorSimulatePanicCode(HbAction*)), mPanicCategory, scene());
+}
+
+/**
+  Simulate panic.
+  */
+void FbFileView::doToolsErrorSimulatePanicCode(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        mPanicCategory = dlg->value().toString();
+        int panicCode(555);
+        QString heading = QString("Panic code");
+        HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulatePanic(HbAction*)), panicCode, scene());
+    }
+}
+
+/**
+  Simulate panic.
+  */
+void FbFileView::doToolsErrorSimulatePanic(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        bool ok;
+        int panicCode = dlg->value().toInt(&ok);
+        if (panicCode != 0 || ok) {
+            mEngineWrapper->ToolsErrorSimulatePanic(mPanicCategory, panicCode);
+        }
+    }
+}
+
+/**
+  Open simulate exception dialog.
+  */
+void FbFileView::toolsErrorSimulateException()
+{
+    int exceptionCode = 0;
+    QString heading = QString("Exception code");
+    HbInputDialog::queryInt(heading, this, SLOT(doToolsErrorSimulateException(HbAction*)), exceptionCode, scene());
+}
+
+/**
+  Simulate exception.
+  */
+void FbFileView::doToolsErrorSimulateException(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        bool ok;
+        int exceptionCode = dlg->value().toInt(&ok);
+        if (exceptionCode != 0 || ok) {
+            mEngineWrapper->ToolsErrorSimulateException(exceptionCode);
+        }
+    }
+}
+
+//    void FbFileView::toolsLocalConnectivityActivateInfrared()
+//{
+//
+//}
+//    void FbFileView::toolsLocalConnectivityLaunchBTUI()
+//{
+//
+//}
+//    void FbFileView::toolsLocalConnectivityLaunchUSBUI()
+//{
+//
+//}
+void FbFileView::toolsMessageInbox()
+{
+
+}
+void FbFileView::toolsMessageDrafts()
+{
+
+}
+void FbFileView::toolsMessageSentItems()
+{
+
+}
+void FbFileView::toolsMessageOutbox()
+{
+
+}
+void FbFileView::toolsMemoryInfo()
+{
+
+}
+void FbFileView::toolsSecureBackStart()
+{
+
+}
+void FbFileView::toolsSecureBackRestore()
+{
+
+}
+void FbFileView::toolsSecureBackStop()
+{
+
+}
+
+/**
+  Open debug mask dialog
+  */
+void FbFileView::toolsSetDebugMaskQuestion()
+{
+    quint32 dbgMask = mEngineWrapper->getDebugMask();
+    QString dbgMaskText = QString("0x").append(QString::number(dbgMask, 16));
+    QString heading = QString("Kernel debug mask in hex format");
+    HbInputDialog::queryText(heading, this, SLOT(toolsSetDebugMask(HbAction*)), dbgMaskText, scene());
+}
+
+/**
+  Set debug mask
+  */
+void FbFileView::toolsSetDebugMask(HbAction *action)
+{
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if (dlg && action && action->text().compare(QString("Ok"), Qt::CaseInsensitive) == 0) {
+        QString dbgMaskText = dlg->value().toString();
+        if (dbgMaskText.length() > 2 && dbgMaskText[0]=='0' && dbgMaskText[1]=='x') {
+            bool ok;
+            quint32 dbgMask = dbgMaskText.toUInt(&ok, 16);
+            if (dbgMask != 0 || ok) {
+                mEngineWrapper->toolsSetDebugMask(dbgMask);
+                Notifications::showConfirmationNote(QString("Changed"));
+            } else {
+                Notifications::showErrorNote(QString("Cannot convert value"));
+            }
+        } else {
+            Notifications::showErrorNote(QString("Not in hex format"));
+        }
+    }
+}
+
+void FbFileView::toolsShowOpenFilesHere()
+{
+
+}
+
+// ---------------------------------------------------------------------------
+// main menu items
+// ---------------------------------------------------------------------------
+void FbFileView::selectionModeChanged()
+{
+    if (mOptionMenuActions.mSelection->isChecked()) {
+        activateSelectionMode();
+        mToolbarSelectionModeAction->setIcon(mSelectionModeOffIcon);
+    } else {
+        deActivateSelectionMode();
+        mToolbarSelectionModeAction->setIcon(mSelectionModeOnIcon);
+    }
+}
+
+void FbFileView::selectionModeButtonTriggered()
+{
+    if (mOptionMenuActions.mSelection->isChecked()) {
+        mOptionMenuActions.mSelection->setChecked(false);
+    } else {
+        mOptionMenuActions.mSelection->setChecked(true);
+    }
+    selectionModeChanged();
+}
+
+/**
+  Show about note
+  */
+void FbFileView::about()
+{
+    Notifications::showAboutNote();
+}
+
+// ---------------------------------------------------------------------------
+// End of operations
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+
+/**
+  An item is clicked from navigation item list. Navigation item list contains
+  drive-, folder- or file items. Opens selected drive, folder or file popup menu
+  */
+void FbFileView::activated(const QModelIndex& index)
+{
+    if (mFbFileModel) {
+        //map to source model
+        QModelIndex activatedIndex = index;
+        if (mSortFilterProxyModel) {
+            activatedIndex = mSortFilterProxyModel->mapToSource(index);
+        }
+
+        if (mEngineWrapper->getFileEntry(activatedIndex).isDir()) {
+            // populate new content of changed navigation view.
+            mFbFileModel->moveDownToDirectory(activatedIndex);
+            refreshList();
+        } else {  // file item
+            // mSelectedFilePath = filePath;
+            FbFileEntry fileEntry = mEngineWrapper->getFileEntry(activatedIndex);
+            mAbsoluteFilePath = fileEntry.path() + fileEntry.name();
+
+            // open user-dialog to select: view as text/hex,  open w/AppArc or open w/DocH. embed
+            QStringList list;
+            list << QString("View as text/hex")
+                 << QString("Open w/ AppArc")
+                 << QString("Open w/ DocH. embed");
+            openListDialog(list, QString("Open file"), this, SLOT(fileOpen(HbAction *)));
+        }
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void FbFileView::activateSelectionMode()
+{
+    QString path;
+    disconnect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
+    mListView->setSelectionMode(HbListView::MultiSelection);
+}
+
+// ---------------------------------------------------------------------------
+
+void FbFileView::deActivateSelectionMode()
+{
+    mListView->setSelectionMode(HbListView::NoSelection);
+    connect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex)));
+    editUnselectAll();
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbfolderselectiondialog.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,244 @@
+/*
+* 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 "fbfolderselectiondialog.h"
+#include "fbfolderselectorwrapper.h"
+
+#include <HbListWidget>
+#include <HbAction>
+#include <HbListWidgetItem>
+#include <HbLabel>
+#include <HbPushButton>
+
+#include <QGraphicsLinearLayout>
+#include <QFileInfo>
+#include <QFileIconProvider>
+
+/**
+  * Constructor
+  */
+FbFolderSelectionDialog::FbFolderSelectionDialog(QGraphicsItem *parent) :
+        HbDialog(parent),
+        mTitle(0),
+        mCurrentPath(0),
+        mFolderList(0),
+        mFolderSelectorWrapper(0),
+        mFileIconProvider(0)
+{
+    init();
+}
+
+/**
+  * Destructor
+  */
+FbFolderSelectionDialog::~FbFolderSelectionDialog()
+{
+    if (mFileIconProvider)
+        delete mFileIconProvider;
+}
+
+/**
+  * Provide currenntly selected folder
+  * \return current folder
+  */
+QString FbFolderSelectionDialog::selectedFolder()
+{
+    return mFolderSelectorWrapper->currentPath();
+}
+
+/**
+  * Initialize folder selection dialog
+  */
+void FbFolderSelectionDialog::init()
+{
+    setAttribute(Qt::WA_DeleteOnClose);
+
+    mFileIconProvider = new QFileIconProvider();
+
+    createHeading();
+    createList();
+    createToolBar();
+}
+
+/**
+  * Create dialog heading widget
+  */
+void FbFolderSelectionDialog::createHeading()
+{
+    HbWidget *headingWidget = new HbWidget(this);
+    QGraphicsLinearLayout *headingLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+    headingWidget->setLayout(headingLayout);
+
+    QGraphicsLinearLayout *titleLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mTitle = new HbLabel(this);
+    mCurrentPath = new HbLabel(this);
+    mCurrentPath->setPlainText(" ");
+    mCurrentPath->setElideMode(Qt::ElideMiddle);
+    titleLayout->addItem(mTitle);
+    titleLayout->setAlignment( mTitle, Qt::AlignLeft);
+    titleLayout->addItem(mCurrentPath);
+    titleLayout->setAlignment( mCurrentPath, Qt::AlignLeft);
+
+    HbPushButton *moveUpButton = new HbPushButton(headingWidget);
+    moveUpButton->setIcon(HbIcon(QString(":/qtg_indi_status_back.svg")));
+    connect(moveUpButton, SIGNAL(pressed()),
+            this, SLOT(moveUpPressed()));
+
+    headingLayout->addItem(titleLayout);
+    headingLayout->addItem(moveUpButton);
+    headingLayout->setAlignment(moveUpButton, Qt::AlignRight);
+
+    setHeadingWidget(headingWidget);
+}
+
+/**
+  * Create dialog content widget as a list of files
+  */
+void FbFolderSelectionDialog::createList()
+{
+    mFolderList = new HbListWidget(this);
+    mFolderSelectorWrapper = new FbFolderSelectorWrapper();
+    mFolderSelectorWrapper->init();
+
+    refreshView();
+
+    setContentWidget(mFolderList);
+    connect(mFolderList, SIGNAL(activated(HbListWidgetItem *)),
+            this, SLOT(activated(HbListWidgetItem *)));
+
+    connect(mFolderSelectorWrapper, SIGNAL(FolderSelectionChanged()),
+            this, SLOT(refreshView()));
+}
+
+/**
+  * Create dialog toolbar
+  */
+void FbFolderSelectionDialog::createToolBar()
+{
+    HbAction *acceptAction = new HbAction(this);
+    acceptAction->setEnabled(false);
+    connect(acceptAction, SIGNAL(triggered()),
+            this, SLOT(acceptTriggered()));
+    addAction(acceptAction);
+
+    HbAction *rejectAction = new HbAction(QString("Cancel"), this);
+    addAction(rejectAction);
+}
+
+/**
+  * Refresh list widget content
+  */
+void FbFolderSelectionDialog::refreshView()
+{
+    mFolderList->clear();
+    QIcon icon;
+    mCurrentPath->setPlainText(mFolderSelectorWrapper->currentPath());
+    if (mFolderSelectorWrapper->isDriveListViewActive())
+    {
+        const QString KSimpleDriveEntry("%d\t%c: <%S>\t\t");
+        //TODO icon = mFileIconProvider->icon(QFileIconProvider::Drive);
+        icon = mFileIconProvider->icon(QFileIconProvider::File);
+
+        for (TInt i=0; i<mFolderSelectorWrapper->itemCount(); i++) {
+            FbDriveEntry driveEntry = mFolderSelectorWrapper->getDriveEntry(i);
+
+            const QString SimpleDriveEntry("%1: <%2>");
+            QString diskName = SimpleDriveEntry.arg(driveEntry.driveLetter()).arg(driveEntry.mediaTypeString());
+
+            mFolderList->addItem(icon, diskName);
+        }
+
+        if (actions().count() > 1) {
+            actions().at(0)->setEnabled(false);
+        }
+    } else {
+        const QString SimpleFileEntry("%1");
+        icon = mFileIconProvider->icon(QFileIconProvider::Folder);
+
+        for (TInt i=0; i<mFolderSelectorWrapper->itemCount(); i++) {
+            FbFileEntry fileEntry = mFolderSelectorWrapper->getFileEntry(i);
+
+            QString fileName = SimpleFileEntry.arg(fileEntry.name()); ///*<< fileEntry.IconId()*/
+
+            mFolderList->addItem(icon, fileName);
+        }
+
+        if (actions().count() > 1) {
+            actions().at(0)->setEnabled(true);
+        }
+    }
+}
+
+/**
+  * Slot called when list item is activated
+  */
+void FbFolderSelectionDialog::activated(HbListWidgetItem * item)
+{
+    int row = mFolderList->row(item);
+    if (mFolderSelectorWrapper->isDriveListViewActive()) {
+        mFolderSelectorWrapper->moveDownToDirectory(row);
+    } else if (row >= 0) {
+        mFolderSelectorWrapper->moveDownToDirectory(row);
+    }
+}
+
+/**
+  * Slot handling the move up button to move up one leve in directory hierarchy
+  */
+void FbFolderSelectionDialog::moveUpPressed()
+{
+    mFolderSelectorWrapper->moveUpOneLevel();
+}
+
+void FbFolderSelectionDialog::acceptTriggered()
+{
+    accept();
+}
+
+// ---------------------------------------------------------------------------
+
+/**
+  * Constructor
+  */
+FbCopyToFolderSelectionDialog::FbCopyToFolderSelectionDialog(QGraphicsItem *parent) :
+        FbFolderSelectionDialog(parent)
+{
+    if (headingWidget()) {
+        mTitle->setPlainText(QString("Copy to"));
+    }
+    if (actions().count() > 1) {
+        actions().at(0)->setText(QString("Copy here"));
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+/**
+  * Constructor
+  */
+FbMoveToFolderSelectionDialog::FbMoveToFolderSelectionDialog(QGraphicsItem *parent) :
+        FbFolderSelectionDialog(parent)
+{
+    if (headingWidget()) {
+        mTitle->setPlainText(QString("Move to"));
+    }
+    if (actions().count() > 1) {
+        actions().at(0)->setText(QString("Move here"));
+    }
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbfolderselectorwrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,134 @@
+/*
+* 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 "fbfolderselectorwrapper.h"
+#include "FBFolderSelector.h"
+
+#include <QString>
+
+// ---------------------------------------------------------------------------
+
+/**
+ * Constructor
+ */
+FbFolderSelectorWrapper::FbFolderSelectorWrapper()
+    : mDestinationFolderSelector(0)
+{
+}
+
+/**
+ * Destructor
+ */
+FbFolderSelectorWrapper::~FbFolderSelectorWrapper()
+{
+    if (mDestinationFolderSelector)
+        delete mDestinationFolderSelector;
+}
+
+/**
+ * Initializes Engine Wrapper
+ * @return true if engine was started successfully
+ */
+bool FbFolderSelectorWrapper::init()
+{
+    TFileName destinationFolder;
+
+    TRAPD(err, mDestinationFolderSelector = CFileBrowserFolderSelector::NewL(destinationFolder, this));
+    if (err != KErrNone) {
+        return false;
+    } else {
+        //TRAP_IGNORE(mEngine->ActivateEngineL());
+        //mSettings = FileBrowserSettings(&mEngine->Settings());
+        return true;
+    }
+}
+
+/**
+  * Return current path
+  */
+QString FbFolderSelectorWrapper::currentPath() const
+{
+    return QString::fromUtf16(mDestinationFolderSelector->CurrentPath().Ptr(),
+                              mDestinationFolderSelector->CurrentPath().Length());
+}
+
+/**
+  * Return whether drive list view is active
+  */
+bool FbFolderSelectorWrapper::isDriveListViewActive() const
+{
+    return mDestinationFolderSelector->IsDriveListViewActive();
+}
+
+/**
+  * Returns number of either drives or files depending on current view
+  */
+int FbFolderSelectorWrapper::itemCount() const
+{
+    if (isDriveListViewActive()) {
+        return mDestinationFolderSelector->DriveEntryList()->Count();
+    } else {
+        return mDestinationFolderSelector->FileEntryList()->Count();
+    }
+}
+
+/**
+  * Returns drive entry for given \a index
+  */
+FbDriveEntry FbFolderSelectorWrapper::getDriveEntry(const int index) const
+{
+    TDriveEntry driveEntry;
+    if (mDestinationFolderSelector->DriveEntryList()->Count() > index && index >= 0) {
+        driveEntry = mDestinationFolderSelector->DriveEntryList()->At(index);
+    }
+    return FbDriveEntry(driveEntry);
+}
+
+/**
+  * Returns file entry for given \a index
+  */
+FbFileEntry FbFolderSelectorWrapper::getFileEntry(const int index) const
+{
+    TFileEntry fileEntry;
+    if (mDestinationFolderSelector->FileEntryList()->Count() > index && index >= 0) {
+        fileEntry = mDestinationFolderSelector->FileEntryList()->At(index);
+    }
+    return FbFileEntry(fileEntry);
+}
+
+/**
+  * Move down to selected item by \a index
+  */
+void FbFolderSelectorWrapper::moveDownToDirectory(int index)
+{
+    mDestinationFolderSelector->MoveDownToDirectoryL(index);
+}
+
+/**
+  * Move up from folder
+  */
+void FbFolderSelectorWrapper::moveUpOneLevel()
+{
+    mDestinationFolderSelector->MoveUpOneLevelL();
+}
+
+void FbFolderSelectorWrapper::InformFolderSelectionChanged()
+{
+    emit FolderSelectionChanged();
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbmainwindow.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <HbApplication>
+#include <HbMainWindow>
+
+#include "fbmainwindow.h"
+#include "enginewrapper.h"
+#include "fbfileview.h"
+#include "fbdriveview.h"
+#include "fbsettingsview.h"
+#include "fbeditorview.h"
+#include "fbsearchview.h"
+#include "fbattributesview.h"
+#include "notifications.h"
+
+#include <QWidget>
+
+FbMainWindow::FbMainWindow(QWidget *parent)
+    : HbMainWindow(parent),
+    mEngineWrapper(0),
+    mDriveView(0),
+    mFileView(0),
+    mSettingsView(0),
+    mEditorView(0),
+    mSearchView(0),
+    mAttributesView(0),
+    mPreviousView(0)
+{
+}
+
+FbMainWindow::~FbMainWindow ()
+{
+    if (mEngineWrapper) {
+        delete mEngineWrapper;
+    }
+}
+
+void FbMainWindow::init()
+{
+    // Create Engine Wrapper and initialize it
+    mEngineWrapper = new EngineWrapper();
+    int error = mEngineWrapper->init();
+    Q_ASSERT_X(error == 1, "FileBrowser", "Engine initialization failed");
+
+    // Create drive view
+    mDriveView = new FbDriveView();
+    connect(mDriveView, SIGNAL(aboutToShowSettingsView()), this, SLOT(openSettingsView()));
+    connect(mDriveView, SIGNAL(aboutToShowFileView()), this, SLOT(openFileView()));
+    mDriveView->init(mEngineWrapper);
+    addView(mDriveView);
+
+    // Create file view
+    mFileView = new FbFileView();
+    connect(mFileView, SIGNAL(aboutToShowSettingsView()), this, SLOT(openSettingsView()));
+    connect(mFileView, SIGNAL(aboutToShowDriveView()), this, SLOT(openDriveView()));
+    mFileView->init(mEngineWrapper);
+    addView(mFileView);
+
+    // Create settings view
+    mSettingsView = new FbSettingsView(*mEngineWrapper);
+    connect(mSettingsView, SIGNAL(finished(bool)), this, SLOT(openPreviousBrowserView()));
+    addView(mSettingsView);
+
+    // Create editor view
+    mEditorView = new FbEditorView();
+    connect(mFileView, SIGNAL(aboutToShowEditorView(const QString &, bool)), this, SLOT(openEditorView(const QString &, bool)));
+    connect(mEditorView, SIGNAL(finished(bool)), this, SLOT(openFileView()));
+    addView(mEditorView);
+
+    // Create Search view
+    connect(mDriveView, SIGNAL(aboutToShowSearchView(QString)), this, SLOT(openSearchView(QString)));
+    connect(mFileView, SIGNAL(aboutToShowSearchView(QString)), this, SLOT(openSearchView(QString)));
+
+    // Create Attributes view
+    connect(mFileView, SIGNAL(aboutToShowAttributesView(const QString &, quint32 &, quint32 &, bool &)),
+            this, SLOT(openAttributesView(const QString &, quint32 &, quint32 &, bool &)));
+
+    // Show ApplicationView at startup
+    setCurrentView(mDriveView);
+    mPreviousView = mDriveView;
+
+    // Show HbMainWindow
+    show();
+}
+
+
+void FbMainWindow::openPreviousBrowserView()
+{
+    mDriveView->refreshList();
+    mFileView->refreshList();
+    setCurrentView(mPreviousView);
+}
+
+void FbMainWindow::openFileBrowserView(bool accepted)
+{
+    mDriveView->refreshList();
+    mFileView->refreshList();
+    if (accepted) {
+        setCurrentView(mFileView);
+    } else {
+        setCurrentView(mPreviousView);
+    }
+}
+
+void FbMainWindow::openDriveView()
+{
+    mDriveView->refreshList();
+    setCurrentView(mDriveView);
+    mPreviousView = mDriveView;
+}
+
+void FbMainWindow::openFileView()
+{
+    mDriveView->refreshList();
+    mFileView->refreshList();
+    setCurrentView(mFileView);
+    mPreviousView = mFileView;
+}
+
+void FbMainWindow::openSettingsView()
+{
+    mSettingsView->initDataForm();
+    setCurrentView(mSettingsView);
+}
+
+void FbMainWindow::openEditorView(const QString &fileName, bool flagReadOnly)
+{
+    mEditorView->open(fileName, flagReadOnly);
+    setCurrentView(mEditorView);
+}
+
+void FbMainWindow::openSearchView(const QString &path)
+{
+    if (!mSearchView) {
+        mSearchView = new FbSearchView();
+        connect(mSearchView, SIGNAL(finished(bool)), this, SLOT(closeSearchView(bool)));
+        mSearchView->open(mEngineWrapper->getFileSearchAttributes(), path);
+        addView(mSearchView);
+        setCurrentView(mSearchView);
+    }
+}
+
+void FbMainWindow::closeSearchView(bool accepted)
+{
+    if (accepted) {
+        mSearchView->startFileSearch(mEngineWrapper);
+    }
+
+    removeView(mSearchView);
+    mSearchView->deleteLater();
+    mSearchView = 0;
+    openFileView();
+}
+
+void FbMainWindow::openAttributesView(const QString &attributesViewTitle,
+                                      quint32 &setAttributesMask,
+                                      quint32 &clearAttributesMask,
+                                      bool &recurse)
+{
+    if (!mAttributesView) {
+        // Create attributes view
+        mAttributesView = new FbAttributesView(setAttributesMask, clearAttributesMask, recurse);
+        connect(mAttributesView, SIGNAL(finished(bool)), this, SLOT(closeAttributesView(bool)));
+        mAttributesView->setTitle(attributesViewTitle);
+        addView(mAttributesView);
+        setCurrentView(mAttributesView);
+    }
+}
+
+void FbMainWindow::closeAttributesView(bool accepted)
+{
+    if (accepted) {
+        mEngineWrapper->setAttributes(mAttributesView->setAttributesMask(), mAttributesView->clearAttributesMask(), mAttributesView->recurse());
+    }
+    openFileView();
+    removeView(mAttributesView);
+    mAttributesView->deleteLater();
+    mAttributesView = 0;
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbpropertiesdialog.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,128 @@
+/*
+* 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 "fbpropertiesdialog.h"
+
+#include <HbListWidget>
+#include <HbAction>
+#include <HbLabel>
+#include <HbMarqueeItem>
+#include <HbColorScheme>
+
+#include <QSizePolicy>
+#include <QGraphicsGridLayout>
+
+/**
+  * Constructor
+  */
+FbPropertiesDialog::FbPropertiesDialog(QGraphicsItem *parent) :
+        HbDialog(parent),
+        mTitle(0),
+        mGridLayout(0)
+{
+    setAttribute(Qt::WA_DeleteOnClose);
+    setDismissPolicy(HbPopup::TapOutside);
+    setTimeout(HbPopup::NoTimeout);
+
+    createHeading();
+    createContentWidget();
+    createToolBar();
+}
+
+/**
+  * Destructor
+  */
+FbPropertiesDialog::~FbPropertiesDialog()
+{
+}
+
+/**
+  * Set \a title into heading widget label
+  */
+void FbPropertiesDialog::setTitle(const QString &title)
+{
+    mTitle->setText(title);
+}
+
+/**
+  * Fill content list with property list \a propertyList
+  */
+void FbPropertiesDialog::setProperties(const QVector<QPair<QString, QString> > &properties)
+{
+    QString previousProperty("");
+    QPair<QString, QString> propertyPair;
+    HbLabel *propertyNameLabel;
+    HbLabel *propertyValueLabel;
+    for (int i(0), ie(properties.count()); i < ie; ++i)
+    {
+        propertyPair = properties.at(i);
+        propertyNameLabel = new HbLabel();
+        if (propertyPair.first != previousProperty) {
+            propertyNameLabel->setPlainText(propertyPair.first);
+            propertyNameLabel->setElideMode(Qt::ElideNone);
+            propertyNameLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+        }
+        mGridLayout->addItem(propertyNameLabel, i, 0);
+        previousProperty = propertyPair.first;
+
+        propertyValueLabel = new HbLabel();
+        propertyValueLabel->setPlainText(propertyPair.second);
+        propertyValueLabel->setTextWrapping(Hb::TextWrapAnywhere);
+        mGridLayout->addItem(propertyValueLabel, i, 1);
+    }
+}
+
+/**
+  * Create dialog heading widget
+  */
+void FbPropertiesDialog::createHeading()
+{
+    mTitle = new HbMarqueeItem(this);
+    mTitle->setLoopCount(1);
+    connect(this, SIGNAL(aboutToShow()), mTitle, SLOT(startAnimation()));
+
+    // TODO later check if this is needed, default color is magenta, even if black theme used
+    QColor col = HbColorScheme::color("qtc_textedit_normal");
+    if (col.isValid()) {
+       mTitle->setTextColor(col);
+    }
+
+    setHeadingWidget(mTitle);
+}
+
+/**
+  * Create dialog content widget as a grid
+  */
+void FbPropertiesDialog::createContentWidget()
+{
+    mGridLayout = new QGraphicsGridLayout();
+
+    QGraphicsWidget *contentWidget = new QGraphicsWidget;
+    contentWidget->setLayout(mGridLayout);
+    setContentWidget(contentWidget);
+}
+
+/**
+  * Create dialog toolbar
+  */
+void FbPropertiesDialog::createToolBar()
+{
+    HbAction *rejectAction = new HbAction(QString("Cancel"), this);
+    addAction(rejectAction);
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbsearchview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,207 @@
+/*
+* 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 "fbsearchview.h"
+#include "enginewrapper.h"
+#include "notifications.h"
+
+#include <HbView>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormModelItem>
+#include <HbAction>
+#include <HbListWidget>
+#include <HbListWidgetItem>
+#include <HbDialog>
+#include <HbToolBar>
+#include <HbProgressDialog>
+
+#include <QtGui>
+#include <QDir>
+#include <QFileInfo>
+
+const QStringList RECURSEMODES = (QStringList() << "Non-recursive" << "Recursive");
+const QString AcceptActionText = "Search";
+const QString RejectActionText = "Cancel";
+
+
+FbSearchView::FbSearchView(QGraphicsItem *parent)
+    : HbView(parent),
+    mAttributes(),
+    mResults(),
+    mForm(0),
+    mSearchFileNameItem(0),
+    mWildCardItem(0),
+    mHasString(0),
+    mRecurse(0),
+    mMinSize(0),
+    mMaxSize(0),
+    mMinDate(0),
+    mMaxDate(0),
+    mPath(),
+    mProgressDialog(0)
+{
+    // Set title and add this view to main window
+    setTitle("Search");
+
+    // Override back navigation action
+    HbAction *leaveViewAction = new HbAction(Hb::BackNaviAction, this);
+    connect(leaveViewAction, SIGNAL(triggered()), this, SLOT(reject()));
+    setNavigationAction(leaveViewAction);
+
+    initDataForm();
+    createToolbar();
+}
+
+FbSearchView::~FbSearchView()
+{
+}
+
+void FbSearchView::initDataForm() {
+    mForm = new HbDataForm(/*HbFormView::ModeEdit,*/ this);
+    HbDataFormModel *model = new HbDataFormModel();
+
+    mSearchFileNameItem = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
+    mSearchFileNameItem->setLabel("Search dir: ");
+
+    mWildCardItem = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
+    mWildCardItem->setLabel("Wildcards: ");
+
+    mHasString = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
+    mHasString->setLabel("Has string: ");
+
+    mRecurse = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem);
+    mRecurse->setLabel("Recurse: ");
+    mRecurse->setContentWidgetData("items", RECURSEMODES);
+
+    mMinSize = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
+    mMinSize->setLabel("Min size: ");
+
+    mMaxSize = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
+    mMaxSize->setLabel("Max size: ");
+
+    mMinDate = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
+    mMinDate->setLabel("Min date: ");
+    mMinDate->setContentWidgetData("text", "01/01/1980");
+
+    mMaxDate = new HbDataFormModelItem(HbDataFormModelItem::TextItem);
+    mMaxDate->setLabel("Max date: ");
+    mMaxDate->setContentWidgetData("text", "31/12/2060");
+
+    model->appendDataFormItem(mSearchFileNameItem);
+    model->appendDataFormItem(mWildCardItem);
+    model->appendDataFormItem(mHasString);
+    model->appendDataFormItem(mRecurse);
+    model->appendDataFormItem(mMinSize);
+    model->appendDataFormItem(mMaxSize);
+    model->appendDataFormItem(mMinDate);
+    model->appendDataFormItem(mMaxDate);
+    mForm->setModel(model);
+
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
+    layout->addItem(mForm);
+    setLayout(layout);
+}
+
+void FbSearchView::createToolbar()
+{
+    HbToolBar *toolBar = new HbToolBar(this);
+    HbAction *acceptAction = new HbAction(AcceptActionText);
+    connect(acceptAction, SIGNAL(triggered()), this, SLOT(accept()));
+    toolBar->addAction(acceptAction);
+
+    HbAction *rejectAction = new HbAction(RejectActionText);
+    connect(rejectAction, SIGNAL(triggered()), this, SLOT(reject()));
+    toolBar->addAction(rejectAction);
+
+    setToolBar(toolBar);
+}
+
+void FbSearchView::loadAttributes()
+{
+    // set data:
+    mSearchFileNameItem->setContentWidgetData("text", mPath);
+//    mSearchFileNameItem->setContentWidgetData("text", mAttributes.mSearchDir);
+    if (!mAttributes.mDefaultWildCard) {
+        mWildCardItem->setContentWidgetData("text", mAttributes.mWildCards);
+    }
+    mHasString->setContentWidgetData("text", mAttributes.mTextInFile);
+
+    mRecurse->setContentWidgetData("selected", mAttributes.mRecurse);
+
+    mMinSize->setContentWidgetData("text", mAttributes.mMinSize);
+    mMaxSize->setContentWidgetData("text", mAttributes.mMaxSize);
+
+    mMinDate->setContentWidgetData("text", mAttributes.mMinDate);
+    mMaxDate->setContentWidgetData("text", mAttributes.mMaxDate);
+}
+
+/**
+ * Reads form items and saves values of them into member variable mAttributes
+ */
+void FbSearchView::readFormItems()
+{
+    mAttributes.mSearchDir  = mSearchFileNameItem->contentWidgetData("text").toString();
+
+    mAttributes.mDefaultWildCard = false;
+    QString wildCard = mWildCardItem->contentWidgetData("text").toString();
+    if (wildCard.trimmed().isEmpty()) {
+        wildCard = QString("*");
+        mAttributes.mDefaultWildCard = true;
+    }
+    mAttributes.mWildCards  = wildCard;
+    mAttributes.mTextInFile = mHasString->contentWidgetData("text").toString();
+    mAttributes.mMinSize    = mMinSize->contentWidgetData("text").toInt();
+    mAttributes.mMaxSize    = mMaxSize->contentWidgetData("text").toInt();
+    mAttributes.mMinDate    = mMinDate->contentWidgetData("text").toDate();
+    mAttributes.mMaxDate    = mMaxDate->contentWidgetData("text").toDate();
+    mAttributes.mRecurse    = mRecurse->contentWidgetData("selected").toBool();
+}
+
+void FbSearchView::open(const SearchAttributes &searchAttributes, const QString &path)
+{   
+    mPath = path;
+    // get settings from engine;
+    mAttributes = searchAttributes;
+    // load file search attribute values from FB engine:
+    loadAttributes();
+}
+
+void FbSearchView::startFileSearch(EngineWrapper *engineWrapper)
+{
+    // save form data values and set them as search attributes into FB engine. 
+    readFormItems();
+    engineWrapper->setFileSearchAttributes(mAttributes);
+    
+    bool err = engineWrapper->searchFiles();
+
+    // show results of file search:
+    mResults = engineWrapper->getSearchResults();
+
+    QString noteMsg("%1 entries found");
+    Notifications::showInformationNote(noteMsg.arg(engineWrapper->itemCount()));
+}
+
+void FbSearchView::accept()
+{
+    emit finished(true);
+}
+
+void FbSearchView::reject()
+{
+    emit finished(false);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/fbsettingsview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,243 @@
+/*
+* 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 "fbsettingsview.h"
+#include "enginewrapper.h"
+#include "filebrowsersettings.h"
+
+#include <HbView>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormModelItem>
+#include <HbAction>
+#include <HbToolBar>
+
+#include <QGraphicsLinearLayout>
+
+const QStringList DisplayModeModes = (QStringList() << "Full screen" << "Normal");
+const QStringList FileViewModes = (QStringList() << "Simple" << "Extended");
+const QStringList Modes = (QStringList() << "Yes" << "No");
+const QString YesText = QString("Yes");
+const QString NoText = QString("No");
+const QString acceptActionText = "OK";
+const QString rejectActionText = "Cancel";
+
+FbSettingsView::FbSettingsView(EngineWrapper &engineWrapper) :
+    mEngineWrapper(engineWrapper),
+    mForm(0),
+    mDisplayModeItem(0),
+    mFileViewItem(0),
+    mShowDirectoryInfoItem(0),
+    mShowAssociatedIconsItem(0),
+    mRememberFolderOnExitItem(0),
+    mRememberLastFolderItem(0),
+    mShowToolbarItem(0),
+    mSupportNetDrivesItem(0),
+    mBypassPlatformSecurityItem(0),
+    mUnlockFilesViaSBItem(0),
+    mIgnoreProtectionAttributesItem(0),
+    mNoROAttributeCopyFromZItem(0)
+{
+    setTitle("Settings");
+
+    // Override back navigation action
+    HbAction *leaveViewAction = new HbAction(Hb::BackNaviAction, this);
+    connect(leaveViewAction, SIGNAL(triggered()), this, SLOT(reject()));
+    setNavigationAction(leaveViewAction);
+
+    initDataForm();
+    createToolbar();
+}
+
+FbSettingsView::~FbSettingsView()
+{
+}
+
+void FbSettingsView::initDataForm()
+{
+    mForm = new HbDataForm(this);
+    HbDataFormModel *model = new HbDataFormModel();
+
+//    connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
+//            this, SLOT(toggleChange(QModelIndex, QModelIndex)));
+
+
+    // TODO to be done
+//    mDisplayModeItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem);
+//    mDisplayModeItem->setLabel("Display mode: ");
+//    mDisplayModeItem->setContentWidgetData("items", DisplayModeModes);
+//
+//    mFileViewItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem);
+//    mFileViewItem->setLabel("File view: ");
+//    mFileViewItem->setContentWidgetData("items", FileViewModes);
+//
+//    mShowDirectoryInfoItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+//    mShowDirectoryInfoItem->setLabel("Show directory info: ");
+//    mShowDirectoryInfoItem->setContentWidgetData(QString("text"), YesText);
+//    mShowDirectoryInfoItem->setContentWidgetData(QString("additionalText"), NoText);
+//
+//    mShowAssociatedIconsItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+//    mShowAssociatedIconsItem->setLabel("Show associated icons: ");
+//    mShowAssociatedIconsItem->setContentWidgetData(QString("text"), YesText);
+//    mShowAssociatedIconsItem->setContentWidgetData(QString("additionalText"), NoText);
+//
+//    mRememberFolderOnExitItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+//    mRememberFolderOnExitItem->setLabel("Remember folder on exit: ");
+//    mRememberFolderOnExitItem->setContentWidgetData(QString("text"), YesText);
+//    mRememberFolderOnExitItem->setContentWidgetData(QString("additionalText"), NoText);
+//
+//    mRememberLastFolderItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+//    mRememberLastFolderItem->setLabel("Remember last folder: ");
+//    mRememberLastFolderItem->setContentWidgetData(QString("text"), YesText);
+//    mRememberLastFolderItem->setContentWidgetData(QString("additionalText"), NoText);
+//
+//    mShowToolbarItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+//    mShowToolbarItem->setLabel("Show toolbar: ");
+//    mShowToolbarItem->setContentWidgetData(QString("text"), YesText);
+//    mShowToolbarItem->setContentWidgetData(QString("additionalText"), NoText);
+
+    mSupportNetDrivesItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+    mSupportNetDrivesItem->setLabel("Support net drives: ");
+    mSupportNetDrivesItem->setContentWidgetData(QString("text"), YesText);
+    mSupportNetDrivesItem->setContentWidgetData(QString("additionalText"), NoText);
+
+    mBypassPlatformSecurityItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+    mBypassPlatformSecurityItem->setLabel("Bypass plat.security: ");
+    mBypassPlatformSecurityItem->setContentWidgetData(QString("text"), YesText);
+    mBypassPlatformSecurityItem->setContentWidgetData(QString("additionalText"), NoText);
+
+    mUnlockFilesViaSBItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+    mUnlockFilesViaSBItem->setLabel("Unlock files via SB: ");
+    mUnlockFilesViaSBItem->setContentWidgetData(QString("text"), YesText);
+    mUnlockFilesViaSBItem->setContentWidgetData(QString("additionalText"), NoText);
+
+    mIgnoreProtectionAttributesItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+    mIgnoreProtectionAttributesItem->setLabel("Ign. protection atts: ");
+    mIgnoreProtectionAttributesItem->setContentWidgetData(QString("text"), YesText);
+    mIgnoreProtectionAttributesItem->setContentWidgetData(QString("additionalText"), NoText);
+
+    mNoROAttributeCopyFromZItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
+    mNoROAttributeCopyFromZItem->setLabel("No RO-att copy from Z: ");
+    mNoROAttributeCopyFromZItem->setContentWidgetData(QString("text"), YesText);
+    mNoROAttributeCopyFromZItem->setContentWidgetData(QString("additionalText"), NoText);
+
+    // load file search attribute values from FB engine:
+    loadSettings(mEngineWrapper.settings());
+
+//    model->appendDataFormItem(mDisplayModeItem);
+//    model->appendDataFormItem(mFileViewItem);
+//    model->appendDataFormItem(mShowDirectoryInfoItem);
+//    model->appendDataFormItem(mShowAssociatedIconsItem);
+//    model->appendDataFormItem(mRememberFolderOnExitItem);
+//    model->appendDataFormItem(mRememberLastFolderItem);
+//    model->appendDataFormItem(mShowToolbarItem);
+
+    model->appendDataFormItem(mSupportNetDrivesItem);
+    model->appendDataFormItem(mBypassPlatformSecurityItem);
+    model->appendDataFormItem(mUnlockFilesViaSBItem);
+    model->appendDataFormItem(mIgnoreProtectionAttributesItem);
+    model->appendDataFormItem(mNoROAttributeCopyFromZItem);
+
+    mForm->setModel(model);
+
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
+    layout->addItem(mForm);
+    setLayout(layout);
+}
+
+void FbSettingsView::createToolbar()
+{
+    HbToolBar *toolBar = new HbToolBar(this);
+    HbAction *acceptAction = new HbAction(acceptActionText);
+    connect(acceptAction, SIGNAL(triggered()), this, SLOT(accept()));
+    toolBar->addAction(acceptAction);
+
+    HbAction *rejectAction = new HbAction(rejectActionText);
+    connect(rejectAction, SIGNAL(triggered()), this, SLOT(reject()));
+    toolBar->addAction(rejectAction);
+
+    setToolBar(toolBar);
+}
+
+/**
+  Set form item values from settings \a settings.
+ */
+void FbSettingsView::loadSettings(const FileBrowserSettings &settings)
+{
+//    mDisplayModeItem->setContentWidgetData("text", settings.displayMode());
+//    mFileViewItem->setContentWidgetData("text", settings.fileViewMode());
+//    mShowDirectoryInfoItem->setContentWidgetData("text", settings.showSubDirectoryInfo());
+//    mShowAssociatedIconsItem->setContentWidgetData("text", settings.showAssociatedIcons());
+//    mRememberFolderOnExitItem->setContentWidgetData("text", settings.rememberFolderSelection());
+//    mRememberLastFolderItem->setContentWidgetData("text", settings.rememberLastPath());
+//    mShowToolbarItem->setContentWidgetData("text", settings.enableToolbar());
+
+    mSupportNetDrivesItem->setContentWidgetData("text", settings.supportNetworkDrives() ? YesText : NoText);
+    mSupportNetDrivesItem->setContentWidgetData("additionalText", !settings.supportNetworkDrives() ? YesText : NoText);
+
+    mBypassPlatformSecurityItem->setContentWidgetData("text", settings.bypassPlatformSecurity() ? YesText : NoText);
+    mBypassPlatformSecurityItem->setContentWidgetData("additionalText", !settings.bypassPlatformSecurity() ? YesText : NoText);
+
+    mUnlockFilesViaSBItem->setContentWidgetData("text", settings.removeFileLocks() ? YesText : NoText);
+    mUnlockFilesViaSBItem->setContentWidgetData("additionalText", !settings.removeFileLocks() ? YesText : NoText);
+
+    mIgnoreProtectionAttributesItem->setContentWidgetData("text", settings.ignoreProtectionsAttributes() ? YesText : NoText);
+    mIgnoreProtectionAttributesItem->setContentWidgetData("additionalText", !settings.ignoreProtectionsAttributes() ? YesText : NoText);
+
+    mNoROAttributeCopyFromZItem->setContentWidgetData("text", settings.removeROMWriteProrection() ? YesText : NoText);
+    mNoROAttributeCopyFromZItem->setContentWidgetData("additionalText", !settings.removeROMWriteProrection() ? YesText : NoText);
+}
+
+/**
+  Store form item data into \a settings
+ */
+void FbSettingsView::saveSettings(FileBrowserSettings &settings)
+{
+//    settings.setDisplayMode(mDisplayModeItem->contentWidgetData("text").toInt());
+//    settings.setFileViewMode(mFileViewItem->contentWidgetData("text").toInt());
+//    settings.setShowSubDirectoryInfo(mShowDirectoryInfoItem->contentWidgetData("text").toBool());
+//    settings.setShowAssociatedIcons(mShowAssociatedIconsItem->contentWidgetData("text").toBool());
+//    settings.setRememberLastPath(mRememberFolderOnExitItem->contentWidgetData("text").toBool());
+//    //settings.setLastPath(mRememberLastFolderItem->contentWidgetData("text").toString());
+//    settings.setRememberFolderSelection(mRememberLastFolderItem->contentWidgetData("text").toBool());
+//    settings.setEnableToolbar(mShowToolbarItem->contentWidgetData("text").toBool());
+
+    settings.setSupportNetworkDrives(mSupportNetDrivesItem->contentWidgetData("text").toString() == YesText);
+    settings.setBypassPlatformSecurity(mBypassPlatformSecurityItem->contentWidgetData("text").toString() == YesText);
+    settings.setRemoveFileLocks(mUnlockFilesViaSBItem->contentWidgetData("text").toString() == YesText);
+    settings.setIgnoreProtectionsAttributes(mIgnoreProtectionAttributesItem->contentWidgetData("text").toString() == YesText);
+    settings.setRemoveROMWriteProrection(mNoROAttributeCopyFromZItem->contentWidgetData("text").toString() == YesText);
+}
+
+void FbSettingsView::constructMenu()
+{
+    
+}
+
+void FbSettingsView::accept()
+{
+    saveSettings(mEngineWrapper.settings());
+    mEngineWrapper.saveSettings();
+    emit finished(true);
+}
+
+void FbSettingsView::reject()
+{
+    emit finished(false);
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/filebrowser.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* 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 <HbApplication>
+#include <HbMainWindow>
+
+#include "fbmainwindow.h"
+
+
+int main(int argc, char *argv[])
+{
+    HbApplication app(argc, argv);
+    FbMainWindow window;
+    window.init();
+    int result = app.exec();
+
+    return result;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/filebrowsersortfilterproxymodel.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* 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 "filebrowsersortfilterproxymodel.h"
+
+#include <QString>
+#include <QStringList>
+
+FileBrowserSortFilterProxyModel::FileBrowserSortFilterProxyModel(QObject *parent)
+    : QSortFilterProxyModel(parent)
+{
+}
+
+bool FileBrowserSortFilterProxyModel::filterAcceptsRow(int sourceRow,
+                                                       const QModelIndex &sourceParent) const
+{
+    QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
+
+    QVariant displayRole = index.data(Qt::DisplayRole);
+    QStringList stringList;
+    if (displayRole.isValid()) {
+        if (displayRole.canConvert<QString>()) {
+            stringList.append(displayRole.toString());
+        } else if (displayRole.canConvert<QStringList>()) {
+            stringList = displayRole.toStringList();
+        }
+        QString itemName = stringList.at(0);
+        //QString criteria = filterRegExp().pattern();
+        QString criteria = filterCriteria();
+        if (!criteria.isEmpty()) {
+            bool contains = itemName.contains(criteria, Qt::CaseInsensitive);
+            return contains;
+        } else {
+            //invalidateFilter();
+            return true;
+        }
+    }
+    return true;
+}
+
+void FileBrowserSortFilterProxyModel::setFilterCriteria(const QString &criteria)
+{
+    mFilterCriteria = criteria;
+    invalidate();
+}
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/src/notifications.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* 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 "notifications.h"
+
+#include <HbLabel>
+#include <HbProgressDialog>
+#include <HbMessageBox>
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout)
+{
+    HbMessageBox *messageBox = new HbMessageBox(type);
+    messageBox->setText(text);
+    if (label.length()) {
+        HbLabel *header = new HbLabel(label, messageBox);
+        messageBox->setHeadingWidget(header);
+    }
+    messageBox->setAttribute(Qt::WA_DeleteOnClose);
+    messageBox->setTimeout(timeout);
+    messageBox->open();
+}
+
+void Notifications::showAboutNote()
+{
+    showMessageBox(HbMessageBox::MessageTypeInformation,
+                   "Version 5.3.0 - 24th September 2010. Copyright © 2010 Nokia Corporation"
+                        "and/or its subsidiary(-ies). All rights reserved."
+                        "Licensed under Eclipse Public License v1.0.",
+                   "About File Browser"
+        );
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showInformationNote(const QString &text, const QString &title)
+{
+    showMessageBox(HbMessageBox::MessageTypeInformation, text, title, 3000);
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showErrorNote(const QString &text, bool noTimeout)
+{
+    showMessageBox(HbMessageBox::MessageTypeWarning, text, "",
+                   noTimeout ? HbPopup::NoTimeout : 3000 /*HbPopup::StandardTimeout*/);
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showConfirmationNote(const QString &text, bool noTimeout)
+{
+    showMessageBox(HbMessageBox::MessageTypeInformation, text, "",
+                   noTimeout ? HbPopup::NoTimeout : 3000 /*HbPopup::ConfirmationNoteTimeout*/);
+}
+
+// ---------------------------------------------------------------------------
+
+bool Notifications::showConfirmationQuery(const QString &aText)
+{
+    Q_UNUSED(aText);
+    return false; //HbMessageBox::question(aText);
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/ui.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,132 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+TEMPLATE = app
+TARGET = FileBrowser
+DEPENDPATH += .
+INCLUDEPATH += ./inc
+load(hb.prf)
+symbian:CONFIG -= symbian_i18n
+
+HEADERS += ./inc/menuaction.h \
+           ./inc/enginewrapper.h \
+           ./inc/fbmainwindow.h \
+           ./inc/fbdrivelistviewitem.h \
+           ./inc/fbdrivemodel.h \
+           ./inc/fbdriveentry.h \
+           ./inc/fbdriveview.h \
+           ./inc/fbfilelistviewitem.h \
+           ./inc/fbfilemodel.h \
+           ./inc/fbfileentry.h \
+           ./inc/fbfileview.h \
+           ./inc/filebrowsersortfilterproxymodel.h \
+           ./inc/filebrowsersettings.h \
+           ./inc/fbsettingsview.h \
+           ./inc/fbeditorview.h \
+           ./inc/fbsearchview.h \
+           ./inc/fbattributesview.h \
+           ./inc/fbfolderselectiondialog.h \
+           ./inc/fbfolderselectorwrapper.h \
+           ./inc/fbpropertiesdialog.h \
+           ./inc/notifications.h
+SOURCES += ./src/filebrowser.cpp \
+           ./src/enginewrapper.cpp \
+           ./src/fbmainwindow.cpp \
+           ./src/fbdrivelistviewitem.cpp \
+           ./src/fbdrivemodel.cpp \
+           ./src/fbdriveentry.cpp \
+           ./src/fbdriveview.cpp \
+           ./src/fbfilelistviewitem.cpp \
+           ./src/fbfilemodel.cpp \
+           ./src/fbfileentry.cpp \
+           ./src/fbfileview.cpp \
+           ./src/filebrowsersortfilterproxymodel.cpp \
+           ./src/fbsettingsview.cpp \
+           ./src/fbeditorview.cpp \
+           ./src/fbsearchview.cpp \
+           ./src/fbattributesview.cpp \
+           ./src/fbfolderselectiondialog.cpp \
+           ./src/fbfolderselectorwrapper.cpp \
+           ./src/fbpropertiesdialog.cpp \
+           ./src/notifications.cpp
+RESOURCES += ./ui.qrc
+
+symbian {
+    INCLUDEPATH += ../
+    LIBS += -leikcore \
+            -lcommonengine \
+            -ltzclient \
+            -lapmime \
+            -lcommonui \
+            -leuser \
+            -lapparc \
+            -lcone \
+            -lws32 \
+            -lfbscli \
+            -lImageConversion \
+            -lPlatformEnv \
+            -lapgrfx \
+            -lefsrv \
+            -lbafl \
+            -lCentralRepository \
+            -lmediaclientaudio \
+            -lestor \
+            -lgdi \
+            -legul \
+            -lmsgs \
+            -lezlib \
+            -lcdlengine \
+            -lremconcoreapi \
+            -lremconinterfacebase \
+            -lsbeclient \
+            -lhash \
+            -letext \
+            -lcharconv \
+        #ifndef FILEBROWSER_LITE
+            -lfilebrowserfileopclient
+        #endif"
+
+    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+    HEADERS += ../engine/engine.h \
+               ../engine/FBFileUtils.h \
+               ../engine/FBFileOps.h \
+               ../engine/FB.hrh \
+               ../engine/FBStd.h \
+               ../engine/FBTraces.h \
+               ../engine/FBFolderSelector.h \
+            #ifndef FILEBROWSER_LITE
+               ../fileopclient/inc/FBFileOpClient.h
+            #endif
+    SOURCES += ../engine/engine.cpp \
+               ../engine/FBFileUtils.cpp \
+               ../engine/FBFileOps.cpp \
+               ../engine/FBFolderSelector.cpp
+    RSS_RULES += "group_name = \"RnD Tools\";"
+    
+    MMP_RULES -= PAGED
+  	MMP_RULES *= UNPAGEDDATA
+  	MMP_RULES += SMPSAFE
+  
+    TARGET.CAPABILITY = NetworkServices LocalServices CAP_APPLICATION AllFiles DiskAdmin
+    TARGET.UID3 = 0xE85157B0
+    TARGET.VID = 0x101FB657 // Nokia
+    TARGET.EPOCHEAPSIZE  = 0x20000 0x4000000  // Min 128Kb, Max 64Mb
+    ICON = ../icons/qgn_menu_filebrowser.svg
+} else {
+    error("Only Symbian supported!")
+}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/filebrowser/ui/ui.qrc	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,10 @@
+<RCC>
+    <qresource prefix="/">
+        <file alias="qtg_mono_filebrowser_parent_folder.svg" >../icons/qtg_mono_filebrowser_parent_folder.svg</file>
+        <file alias="qtg_mono_filebrowser_search.svg" >../icons/qtg_mono_filebrowser_search.svg</file>
+        <file alias="qtg_mono_filebrowser_selection_mode.svg" >../icons/qtg_mono_filebrowser_selection_mode.svg</file>
+        <file alias="qtg_mono_filebrowser_selection_mode_off.svg" >../icons/qtg_mono_filebrowser_selection_mode_off.svg</file>
+        <file alias="qtg_mono_filebrowser_paste.svg" >../icons/qtg_mono_filebrowser_paste.svg</file>
+        <file alias="qtg_indi_status_back.svg" >../icons/qtg_indi_status_back.svg</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/ReleaseNotes_Launcher.txt	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,135 @@
+===============================================================================
+
+RELEASE NOTES - LAUNCHER v4.0.1
+RELEASED 21st May 2010 
+
+SUPPORTS S60 3.0+
+
+===============================================================================
+
+Product Description:
+====================
+Launcher is a testing utility application aimed to help test the launching of
+applications installed in the system, both on user side disk drives and on
+ROM. Launcher tests if an application can be launched and then, if the launch
+has failed, reports the possible reason for the failure. It is a very useful
+application when checking the build as the user can instantly see if the
+applications work. Launcher can also be used when testing binary
+compatibility issues because it can reveal any DLL files missing from the
+device.
+
+Main Features:
+==============
+- Show a list of installed applications in all drives
+- Launch selected applications and read their statuses from threads
+- In case of a failure, report thread's exit type, reason and category
+- Show missing DLL files required by the binary to be launched
+- Show problems on the UI and print all cases to a log file
+- Generate a list of DLLs in the device to a file
+- Analyse binary compatibility of system DLLs comparing them to a user
+  given reference data. Report any binary compatibility issues or missing
+  DLL files.
+
+===============================================================================
+
+What's New in v4.0.1
+====================
+- Feature: Orbit UI improvements
+- Fix: Launching DLL analysis not starting
+
+===============================================================================
+
+Installation Notes:
+===================
+Launcher is typically preinstalled on ROM. If not, it can be added to the
+ROM with the .iby file. Alternatively, a .sis file can be found under the sis-
+directory, but the user needs to sign it with their own developer certificate.
+In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
+internal\sis directory.
+
+When signing with own developer certificate, the following capabilities are
+needed:
+  PowerMgmt
+  ReadDeviceData
+  WriteDeviceData
+  AllFiles
+  ReadUserData
+  WriteUserData
+
+When building Launcher against S60 3.0 or 3.1, you may need to patch your SDK
+environment first with some fixes. For more information, please refer to the
+instructions under the "envpatcher" directory.
+  
+===============================================================================
+
+System Requirements:
+====================
+Basic Requirements:
+- Any S60 3.x device or emulator environment
+
+===============================================================================
+
+Compatibility Issues:
+=====================
+N/A
+
+===============================================================================
+
+Known Issues:
+=============
+
+Fails in a test despite the application is working correctly
+------------------------------------------------------------
+- Some application may exit immediately after a launch. This can be
+  normal behavior and should be checked manually. Such application is, for example, 
+  irapp.exe.
+  
+Binary compatibility check support
+----------------------------------
+- Currently, only uncompressed and deflate compressed ELF binaries are
+  supported. This means that for example WINSCW is not supported.
+
+===============================================================================
+
+Version History:
+================
+3.7.0 - 29th May 2009
+- Feature: Binary compatiblity check for DLLs, which checks UID1, UID2, UID3, SID
+and capability values of system DLLs against an XML-formatted input file.
+- Fix: Launcher panics when comparing a large DLL list against system DLLs.
+- Fix: Launcher panics when application launching is cancelled.
+
+Version 3.6.3 - 14th March 2008
+-------------------------------
+- Change: Removed unnecessary capabilities
+
+Version 3.6.2 - 6th November 2007
+--------------------------------
+- Fix: Applications can be selected/unselected on a touch UI
+- Fix: Scroll bar in the output view can be scrolled on a touch UI
+
+Version 3.6.1 - 9th October 2007
+--------------------------------
+- Fix: Layout in out tab in mirrored mode
+- Fix: Codescanner high warnings
+
+Version 3.6.0 - 25th January 2007
+---------------------------------
+- Fix: Re-fix problems when reading import section from binaries
+- Fix: Output screen for larger resolutions
+- Fix: Stopping of launching
+
+Version 3.5.0 - 4th December 2006
+---------------------------------
+- Fix: Problems when reading import section from binaries
+- Change: Marquee used for items in the application list view
+
+===============================================================================
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+This component and the accompanying materials are made available
+under the terms of "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/e32image.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* 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 __LAUNCHERE32IMAGE_H__
+#define __LAUNCHERE32IMAGE_H__
+
+#include <e32base.h>
+#include <badesca.h>
+#include <eikenv.h>
+#include <e32ldr_private.h>
+
+class E32ImageHeader;
+class E32ImportSection;
+class E32RelocSection;
+class CEikonEnv;
+
+
+NONSHARABLE_CLASS(E32ImageReader) : public CBase, public TProcessCreateInfo
+	{
+public:
+	static E32ImageReader* NewLC();
+	~E32ImageReader();
+
+public:
+    CDesCArray* ListOfDLLsL(const TDesC& aFullPathToE32Image);
+
+private:
+	E32ImageReader();
+	void ConstructL();
+    TInt LoadData();
+    static TUint8* MemoryMove(TAny* aDestination, const TAny* aSource, TInt aNumberofBytes);
+    TInt LoadFile(TUint32 aCompression);
+    TInt LoadFileNoCompress();
+    void LoadFileInflateL();
+    TInt Read(TText8* aDest, TInt aSize);
+    TInt Read(TInt aPos, TText8* aDest, TInt aSize);
+    TInt ReadImportData();
+
+private:
+	CEikonEnv*      iEnv;
+
+public:
+	E32ImageHeader* iHeader;
+	E32ImportSection* iImportSection;
+	E32RelocSection* iCodeRelocSection;
+	E32RelocSection* iDataRelocSection;
+	TUint32* iImportData;
+	TUint8* iRestOfFileData;
+	TUint32 iRestOfFileSize;
+	TUint32 iConversionOffset;
+	RFile iFile;
+	TUint32 iCodeDelta;
+	TUint32 iDataDelta;
+	TUint32 iExportDirLoad;
+	TBool isDll;
+	TBool iAlreadyLoaded;
+	TAny* iCloseCodeSeg;
+	TInt iCurrentImportCount;
+	TInt iNextImportPos;
+	TUint32* iCurrentImportList;
+	TUint8 iCurrentImportListSorted;
+	TUint8 iExportDirLoadAllocated;
+	TUint8 iPadding1;
+	TUint8 iPadding2;
+	};
+
+#endif // __LAUNCHERE32IMAGE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/e32imageheaders.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,540 @@
+/*
+* 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 __LAUNCHERE32IMAGEHEADERS_H__
+#define __LAUNCHERE32IMAGEHEADERS_H__
+
+#include <e32uid.h>
+
+// from e32Huffman.h
+
+/** @file
+    @internalTechnology
+*/
+
+/** Bit output stream.
+    Good for writing bit streams for packed, compressed or huffman data algorithms.
+
+    This class must be derived from and OverflowL() reimplemented if the bitstream data
+    cannot be generated into a single memory buffer.
+*/
+class TBitOutput
+    {
+public:
+    IMPORT_C TBitOutput();
+    IMPORT_C TBitOutput(TUint8* aBuf,TInt aSize);
+    inline void Set(TUint8* aBuf,TInt aSize);
+    inline const TUint8* Ptr() const;
+    inline TInt BufferedBits() const;
+//
+    IMPORT_C void WriteL(TUint aValue, TInt aLength);
+    IMPORT_C void HuffmanL(TUint aHuffCode);
+    IMPORT_C void PadL(TUint aPadding);
+private:
+    void DoWriteL(TUint aBits, TInt aSize);
+    virtual void OverflowL();
+private:
+    TUint iCode;        // code in production
+    TInt iBits;
+    TUint8* iPtr;
+    TUint8* iEnd;
+    };
+
+/** Set the memory buffer to use for output
+
+    Data will be written to this buffer until it is full, at which point OverflowL() will
+    be called. This should handle the data and then can Set() again to reset the buffer
+    for further output.
+    
+    @param aBuf The buffer for output
+    @param aSize The size of the buffer in bytes
+*/
+inline void TBitOutput::Set(TUint8* aBuf,TInt aSize)
+    {iPtr=aBuf;iEnd=aBuf+aSize;}
+    
+/** Get the current write position in the output buffer
+
+    In conjunction with the address of the buffer, which should be known to the
+    caller, this describes the data in the bitstream.
+*/
+inline const TUint8* TBitOutput::Ptr() const
+    {return iPtr;}
+    
+/** Get the number of bits that are buffered
+
+    This reports the number of bits that have not yet been written into the
+    output buffer. It will always lie in the range 0..7. Use PadL() to
+    pad the data out to the next byte and write it to the buffer.
+*/
+inline TInt TBitOutput::BufferedBits() const
+    {return iBits+8;}
+
+/** Bit input stream. Good for reading bit streams for packed, compressed or huffman
+    data algorithms.
+*/
+class TBitInput
+    {
+public:
+    IMPORT_C TBitInput();
+    IMPORT_C TBitInput(const TUint8* aPtr, TInt aLength, TInt aOffset=0);
+    IMPORT_C void Set(const TUint8* aPtr, TInt aLength, TInt aOffset=0);
+//
+    IMPORT_C TUint ReadL();
+    IMPORT_C TUint ReadL(TInt aSize);
+    IMPORT_C TUint HuffmanL(const TUint32* aTree);
+private:
+    virtual void UnderflowL();
+private:
+    TInt iCount;
+    TUint iBits;
+    TInt iRemain;
+    const TUint32* iPtr;
+    };
+
+
+/** Huffman code toolkit.
+
+    This class builds a huffman encoding from a frequency table and builds
+    a decoding tree from a code-lengths table
+
+    The encoding generated is based on the rule that given two symbols s1 and s2, with 
+    code length l1 and l2, and huffman codes h1 and h2:
+
+        if l1<l2 then h1<h2 when compared lexicographically
+        if l1==l2 and s1<s2 then h1<h2 ditto
+
+    This allows the encoding to be stored compactly as a table of code lengths
+*/
+class Huffman
+    {
+public:
+    enum {KMaxCodeLength=27};
+    enum {KMetaCodes=KMaxCodeLength+1};
+    enum {KMaxCodes=0x8000};
+public:
+    IMPORT_C static void HuffmanL(const TUint32 aFrequency[],TInt aNumCodes,TUint32 aHuffman[]);
+    IMPORT_C static void Encoding(const TUint32 aHuffman[],TInt aNumCodes,TUint32 aEncodeTable[]);
+    IMPORT_C static void Decoding(const TUint32 aHuffman[],TInt aNumCodes,TUint32 aDecodeTree[],TInt aSymbolBase=0);
+    IMPORT_C static TBool IsValid(const TUint32 aHuffman[],TInt aNumCodes);
+//
+    IMPORT_C static void ExternalizeL(TBitOutput& aOutput,const TUint32 aHuffman[],TInt aNumCodes);
+    IMPORT_C static void InternalizeL(TBitInput& aInput,TUint32 aHuffman[],TInt aNumCodes);
+    };
+
+// end e32Huffman.h
+
+enum TCpu
+	{
+	ECpuUnknown=0, ECpuX86=0x1000, ECpuArmV4=0x2000, ECpuArmV5=0x2001, ECpuArmV6=0x2002, ECpuMCore=0x4000
+	};
+	
+const TInt KOrdinalBase=1;
+const TUint KImageDll				= 0x00000001u;
+const TUint KImageNoCallEntryPoint	= 0x00000002u;
+const TUint KImageFixedAddressExe	= 0x00000004u;
+const TUint KImageOldJFlag			= 0x00000008u;	// so we can run binaries built with pre 2.00 tools (hdrfmt=0)
+const TUint KImageOldElfFlag		= 0x00000010u;	// so we can run binaries built with pre 2.00 tools (hdrfmt=0)
+const TUint KImageABIMask			= 0x00000018u;	// only if hdr fmt not zero
+const TInt	KImageABIShift			= 3;
+const TUint	KImageABI_GCC98r2		= 0x00000000u;	// for ARM
+const TUint	KImageABI_EABI			= 0x00000008u;	// for ARM
+const TUint KImageEptMask			= 0x000000e0u;	// entry point type
+const TInt	KImageEptShift			= 5;
+const TUint KImageEpt_Eka1			= 0x00000000u;
+const TUint KImageEpt_Eka2			= 0x00000020u;
+const TUint KImageHdrFmtMask		= 0x0f000000u;
+const TInt	KImageHdrFmtShift		= 24;
+const TUint KImageHdrFmt_Original	= 0x00000000u;	// without compression support
+const TUint KImageHdrFmt_J			= 0x01000000u;	// with compression support
+const TUint KImageHdrFmt_V			= 0x02000000u;	// with versioning support
+const TUint KImageImpFmtMask		= 0xf0000000u;
+const TInt	KImageImpFmtShift		= 28;
+const TUint KImageImpFmt_PE			= 0x00000000u;	// PE-derived imports
+const TUint KImageImpFmt_ELF		= 0x10000000u;	// ELF-derived imports
+const TUint KImageImpFmt_PE2		= 0x20000000u;	// PE-derived imports without redundant copy of import ordinals
+const TUint KImageHWFloatMask		= 0x00f00000u;
+const TInt	KImageHWFloatShift		= 20;
+const TUint	KImageHWFloat_None		= EFpTypeNone << KImageHWFloatShift; // No hardware floating point used
+const TUint KImageHWFloat_VFPv2		= EFpTypeVFPv2 << KImageHWFloatShift; // ARM VFPv2 floating point used
+
+const TUint KMyFormatNotCompressed=0;
+const TUint KMyUidCompressionDeflate=0x101F7AFC;
+
+const TUint32 KImageCrcInitialiser	= 0xc90fdaa2u;
+/*
+const TUint16 KReservedRelocType        = (TUint16)0x0000;
+const TUint16 KTextRelocType            = (TUint16)0x1000;
+const TUint16 KDataRelocType            = (TUint16)0x2000;
+const TUint16 KInferredRelocType        = (TUint16)0x3000;
+*/
+class RFile;
+class E32ImageHeader
+	{
+public:
+	inline static TUint ABIFromFlags(TUint aFlags)
+		{
+		if (aFlags&KImageHdrFmtMask)
+			return aFlags & KImageABIMask;
+		if (aFlags&KImageOldElfFlag)
+			return KImageABI_EABI;
+		return KImageABI_GCC98r2;
+		}
+	inline static TUint EptFromFlags(TUint aFlags)
+		{
+		if (aFlags&KImageHdrFmtMask)
+			return aFlags & KImageEptMask;
+		if (aFlags&KImageOldJFlag)
+			return KImageEpt_Eka2;
+		return KImageEpt_Eka1;
+		}
+	inline static TUint HdrFmtFromFlags(TUint aFlags)
+		{
+		if (aFlags&KImageHdrFmtMask)
+			return aFlags & KImageHdrFmtMask;
+		if (aFlags&KImageOldJFlag)
+			return KImageHdrFmt_J;
+		return KImageHdrFmt_Original;
+		}
+	inline static TUint ImpFmtFromFlags(TUint aFlags)
+		{
+		if (aFlags&KImageHdrFmtMask)
+			return aFlags & KImageImpFmtMask;
+		if (aFlags&KImageOldElfFlag)
+			return KImageImpFmt_ELF;
+		return KImageImpFmt_PE;
+		}
+	inline TUint32 CompressionType() const
+		{
+		if (HdrFmtFromFlags(iFlags) >= KImageHdrFmt_J)
+			return iCompressionType;
+		return 0;
+		}
+	inline TUint32 ModuleVersion() const
+		{
+		if ((iFlags & KImageHdrFmtMask) >= KImageHdrFmt_V)
+			return iModuleVersion;
+		return 0x00000000u;
+		}
+	inline TInt TotalSize() const;
+	inline TInt UncompressedFileSize() const;
+	inline TUint HeaderFormat() const
+		{ return HdrFmtFromFlags(iFlags); }
+	inline TUint EntryPointFormat() const
+		{ return EptFromFlags(iFlags); }
+	inline TUint ImportFormat() const
+		{ return ImpFmtFromFlags(iFlags); }
+	inline TUint ABI() const
+		{ return ABIFromFlags(iFlags); }
+	inline void GetSecurityInfo(SSecurityInfo& aInfo) const;
+	inline TCpu CpuIdentifier() const;
+	inline TProcessPriority ProcessPriority() const;
+	inline TUint32 ExceptionDescriptor() const;
+	TInt IntegrityCheck(TInt aFileSize);
+	static TInt New(E32ImageHeader*& aHdr, RFile& aFile);
+public:
+	TUint32	iUid1;
+	TUint32	iUid2;
+	TUint32	iUid3;
+	TUint32 iUidChecksum;
+	TUint iSignature;			// 'EPOC'
+	TUint32	iHeaderCrc;			// CRC-32 of entire header
+	TUint32 iModuleVersion;		// Version number for this executable (used in link resolution)
+	TUint32 iCompressionType;	// Type of compression used (UID or 0 for none)
+	TVersion iToolsVersion;		// Version of PETRAN/ELFTRAN which generated this file
+	TUint32 iTimeLo;
+	TUint32 iTimeHi;
+	TUint iFlags;				// 0 = exe, 1 = dll, 2 = fixed address exe
+	TInt iCodeSize;				// size of code, import address table, constant data and export dir
+	TInt iDataSize;				// size of initialised data
+	TInt iHeapSizeMin;
+	TInt iHeapSizeMax;
+	TInt iStackSize;
+	TInt iBssSize;
+	TUint iEntryPoint;			// offset into code of entry point
+	TUint iCodeBase;			// where the code is linked for	
+	TUint iDataBase;			// where the data is linked for
+	TInt iDllRefTableCount;		// filling this in enables E32ROM to leave space for it
+	TUint iExportDirOffset;		// offset into the file of the export address table
+	TInt iExportDirCount;
+	TInt iTextSize;				// size of just the text section, also doubles as the offset for the iat w.r.t. the code section
+	TUint iCodeOffset;			// file offset to code section, also doubles as header size
+	TUint iDataOffset;			// file offset to data section
+	TUint iImportOffset;		// file offset to import section
+	TUint iCodeRelocOffset;		// relocations for code and const
+	TUint iDataRelocOffset;		// relocations for data
+	TUint16 iProcessPriority;	// executables priority
+	TUint16 iCpuIdentifier;		// 0x1000 = X86, 0x2000 = ARM
+	};
+
+class E32ImageHeaderComp : public E32ImageHeader
+	{
+public:
+	TUint32 iUncompressedSize;	// Uncompressed size of file
+								// For J format this is file size - sizeof(E32ImageHeader)
+								//  and this is included as part of the compressed data :-(
+								// For other formats this is file size - total header size
+	};
+
+class E32ImageHeaderV : public E32ImageHeaderComp
+	{
+public:
+	SSecurityInfo iS;
+
+	// Use iSpare1 as offset to Exception Descriptor
+	TUint32 iExceptionDescriptor;   // Offset in bytes from start of code section to Exception Descriptor, bit 0 set if valid
+	TUint32 iSpare2;
+	TUint16	iExportDescSize;	// size of bitmap section
+	TUint8	iExportDescType;	// type of description of holes in export table
+	TUint8	iExportDesc[1];		// description of holes in export table - extend
+	};
+
+// export description type
+const TUint	KImageHdr_ExpD_NoHoles			=0x00;	// no holes, all exports present
+const TUint	KImageHdr_ExpD_FullBitmap		=0x01;	// full bitmap present
+const TUint	KImageHdr_ExpD_SparseBitmap8	=0x02;	// sparse bitmap present, granularity 8
+const TUint	KImageHdr_ExpD_Xip				=0xff;	// XIP file
+
+
+inline TInt E32ImageHeader::TotalSize() const
+	{
+	if (HeaderFormat() == KImageHdrFmt_J && iCompressionType != 0)
+		return sizeof(E32ImageHeaderComp);
+	return iCodeOffset;
+	}
+
+inline TInt E32ImageHeader::UncompressedFileSize() const
+	{
+	TUint hdrfmt = HeaderFormat();
+	if (hdrfmt == KImageHdrFmt_Original || iCompressionType == 0)
+		return -1;			// not compressed
+	else if (hdrfmt == KImageHdrFmt_J)
+		return ((E32ImageHeaderComp*)this)->iUncompressedSize + sizeof(E32ImageHeader);
+	else
+		return ((E32ImageHeaderComp*)this)->iUncompressedSize + iCodeOffset;
+	}
+
+extern const SSecurityInfo KDefaultSecurityInfo;
+inline void E32ImageHeader::GetSecurityInfo(SSecurityInfo& aInfo) const
+	{
+	if (HeaderFormat() >= KImageHdrFmt_V)
+		aInfo = ((E32ImageHeaderV*)this)->iS;
+	else
+		aInfo = KDefaultSecurityInfo;
+	}
+
+inline TCpu E32ImageHeader::CpuIdentifier() const
+	{
+	if (HeaderFormat() >= KImageHdrFmt_V)
+		return (TCpu)iCpuIdentifier;
+	return (TCpu)iHeaderCrc;
+	}
+
+inline TProcessPriority E32ImageHeader::ProcessPriority() const
+	{
+	if (HeaderFormat() >= KImageHdrFmt_V)
+		return (TProcessPriority)iProcessPriority;
+	return *(const TProcessPriority*)&iProcessPriority;
+	}
+
+inline TUint32 E32ImageHeader::ExceptionDescriptor() const
+	{
+	if (HeaderFormat() >= KImageHdrFmt_V)
+		{
+		TUint32 xd = ((E32ImageHeaderV*)this)->iExceptionDescriptor;
+		if ((xd & 1) && (xd != 0xffffffffu))
+			return (xd & ~1);
+		}
+	return 0;
+	}
+
+class E32ImportBlock
+	{
+public:
+	inline const E32ImportBlock* NextBlock(TUint aImpFmt) const;
+	inline TInt Size(TUint aImpFmt) const;
+	inline const TUint* Imports() const;	// import list if present
+public:
+	TUint32	iOffsetOfDllName;	// offset of name of dll importing from
+	TInt	iNumberOfImports;	// no of imports from this dll
+//	TUint	iImport[iNumberOfImports];	// list of imported ordinals, omitted in PE2 import format
+	};
+
+inline TInt E32ImportBlock::Size(TUint aImpFmt) const
+	{
+	TInt r = sizeof(E32ImportBlock);
+	if (aImpFmt!=KImageImpFmt_PE2)
+		r += iNumberOfImports * sizeof(TUint);
+	return r;
+	}
+
+inline const E32ImportBlock* E32ImportBlock::NextBlock(TUint aImpFmt) const
+	{
+	const E32ImportBlock* next = this + 1;
+	if (aImpFmt!=KImageImpFmt_PE2)
+		next = (const E32ImportBlock*)( (TUint8*)next + iNumberOfImports * sizeof(TUint) );
+	return next;
+	}
+
+inline const TUint* E32ImportBlock::Imports() const
+	{
+	return (const TUint*)(this + 1);
+	}
+
+class E32ImportSection
+	{
+public:
+	TInt iSize;					// size of this section
+//	E32ImportBlock[iDllRefTableCount];
+	};
+
+class E32RelocSection
+	{
+public:
+	TInt iSize;					// size of this relocation section
+	TInt iNumberOfRelocs;		// number of relocations in this section
+	};
+
+
+typedef TUint8* (*TMemoryMoveFunction)(TAny* aTrg,const TAny* aSrc,TInt aLength);
+
+const TInt KDeflateLengthMag=8;
+const TInt KDeflateDistanceMag=12;
+const TInt KDeflateMinLength=3;
+const TInt KDeflateMaxLength=KDeflateMinLength-1 + (1<<KDeflateLengthMag);
+const TInt KDeflateMaxDistance=(1<<KDeflateDistanceMag);
+const TInt KDeflateDistCodeBase=0x200;
+const TUint KDeflateHashMultiplier=0xAC4B9B19u;
+const TInt KDeflateHashShift=24;
+const TInt KInflateWindowSize=0x8000;
+
+
+class TEncoding
+	{
+public:
+	enum {ELiterals=256,ELengths=(KDeflateLengthMag-1)*4,ESpecials=1,EDistances=(KDeflateDistanceMag-1)*4};
+	enum {ELitLens=ELiterals+ELengths+ESpecials};
+	enum {EEos=ELiterals+ELengths};
+public:
+	TUint32 iLitLen[ELitLens];
+	TUint32 iDistance[EDistances];
+	};
+
+const TInt KDeflationCodes=TEncoding::ELitLens+TEncoding::EDistances;
+
+NONSHARABLE_CLASS(CInflater) : public CBase
+	{
+public:
+	enum {EBufSize = 0x800, ESafetyZone=8};
+public:
+	static CInflater* NewLC(TBitInput& aInput);
+	~CInflater();
+	TInt ReadL(TUint8* aBuffer,TInt aLength, TMemoryMoveFunction aMemMovefn);
+	TInt SkipL(TInt aLength);
+private:
+	CInflater(TBitInput& aInput);
+	void ConstructL();
+	void InitL();
+	TInt InflateL();
+private:
+	TBitInput* iBits;
+	const TUint8* iRptr;			
+	TInt iLen;
+	const TUint8* iAvail;		
+	const TUint8* iLimit;
+	TEncoding* iEncoding;
+	TUint8* iOut;				
+	};
+
+void DeflateL(const TUint8* aBuf, TInt aLength, TBitOutput& aOutput);
+
+	
+NONSHARABLE_CLASS(TFileInput) : public TBitInput
+	{
+ 	enum {KBufSize=KInflateWindowSize};
+public:
+	TFileInput(RFile& aFile);
+	void Cancel();
+private:
+	void UnderflowL();
+private:
+	RFile& iFile;
+	TRequestStatus iStat;
+	TUint8* iReadBuf;
+	TPtr8 iPtr;
+	TUint8 iBuf1[KBufSize];
+	TUint8 iBuf2[KBufSize];
+	};
+
+class TFileNameInfo
+	{
+public:
+	enum
+    	{
+    	EIncludeDrive=1,
+    	EIncludePath=2,
+    	EIncludeBase=4,
+    	EIncludeVer=8,
+    	EForceVer=16,
+    	EIncludeUid=32,
+    	EForceUid=64,
+    	EIncludeExt=128,
+    	EIncludeDrivePath=EIncludeDrive|EIncludePath,
+    	EIncludeBaseExt=EIncludeBase|EIncludeExt,
+    	EIncludeDrivePathBaseExt=EIncludeDrive|EIncludePath|EIncludeBase|EIncludeExt,
+    	};
+	enum
+		{
+		EAllowUid=1,
+		EAllowPlaceholder=2,
+		EAllowDecimalVersion=4,
+		};
+public:
+	TFileNameInfo();
+	TInt Set(const TDesC8& aFileName, TUint aFlags);
+	void Dump() const;
+public:
+	inline TInt DriveLen() const {return iPathPos;}
+	inline TInt PathLen() const {return iBasePos-iPathPos;}
+	inline TInt BaseLen() const {return iVerPos-iBasePos;}
+	inline TInt VerLen() const {return iUidPos-iVerPos;}
+	inline TInt UidLen() const {return iExtPos-iUidPos;}
+	inline TInt ExtLen() const {return iLen-iExtPos;}
+	inline TPtrC8 Drive() const {return TPtrC8(iName, iPathPos);}
+	inline TPtrC8 Path() const {return TPtrC8(iName+iPathPos, iBasePos-iPathPos);}
+	inline TPtrC8 DriveAndPath() const {return TPtrC8(iName, iBasePos);}
+	inline TPtrC8 Base() const {return TPtrC8(iName+iBasePos, iVerPos-iBasePos);}
+	inline TPtrC8 VerStr() const {return TPtrC8(iName+iVerPos, iUidPos-iVerPos);}
+	inline TPtrC8 UidStr() const {return TPtrC8(iName+iUidPos, iExtPos-iUidPos);}
+	inline TPtrC8 Ext() const {return TPtrC8(iName+iExtPos, iLen-iExtPos);}
+	inline TUint32 Version() const {return iVersion;}
+	inline TUint32 Uid() const {return iUid;}
+	void GetName(TDes8& aName, TUint aFlags) const;
+public:
+	const TText8* iName;
+	TInt iPathPos;
+	TInt iBasePos;
+	TInt iVerPos;
+	TInt iUidPos;
+	TInt iExtPos;
+	TInt iLen;
+	TUint32 iVersion;
+	TUint32 iUid;
+	};
+
+
+#endif // __LAUNCHERE32IMAGEHEADERS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/launcherdllelement.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,134 @@
+/*
+* 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 LAUNCHERDLLELEMENT_H_
+#define LAUNCHERDLLELEMENT_H_
+
+#include <e32base.h>
+
+typedef TBuf8<8> TDllIdValue;
+
+class CLauncherDLLElement : public CBase
+    {
+public:
+    
+    enum TDifference
+        {
+        EDifference_UID1,      // UID1 is different
+        EDifference_UID2,      // UID1 is different
+        EDifference_UID3,      // UID1 is different
+        EDifference_SID,       // SID is different
+        EDifference_Capability // Capabilities are different
+        };
+    
+    virtual ~CLauncherDLLElement();
+    static CLauncherDLLElement* NewL();
+    static CLauncherDLLElement* NewLC(); 
+    
+    /*
+     * Compares DLL elements.
+     * @return ETrue if differencies exist, EFalse otherwise.     
+     * @param aReferenceElement Reference DLL-element for comparison
+     * @param aDifferenceList Differencies are added to this list.
+     */
+    TBool CompareL(const CLauncherDLLElement& aReferenceElement, RArray<TDifference>& aDifferenceList) const;
+    
+    /*
+     * Returns DLL name
+     * @return DLL name
+     */
+    TFileName Name() const;    
+    /*
+     * Sets DLL name
+     * @param aName DLL name
+     */
+    void SetNameL(const TFileName& aName);
+    
+    /*
+     * Returns DLL UID1
+     * @return UID1 object
+     */
+    TUid UID1() const;
+    
+    /*
+     * Sets DLL UID1 
+     * @param aUID1 UID1 object
+     */
+    void SetUID1L(TUid aUID1);
+    
+    /*
+     * Returns DLL UID2
+     * @return UID2 object
+     */
+    TUid UID2() const;
+        
+    /*
+     * Sets DLL UID2 
+     * @param aUID2 UID2 object
+     */
+    void SetUID2L(TUid aUID2);
+        
+    /*
+     * Returns DLL UID3
+     * @return UID3 object
+     */
+    TUid UID3() const;
+    
+    /*
+     * Sets DLL UID3
+     * @param aUID3 UID3 object
+     */
+    void SetUID3L(TUid aUID3);
+    
+    /*
+     * Returns DLL SID
+     * @return SID object
+     */
+    TUid SID() const;
+    
+    /*
+     * Sets DLL SID
+     * @param aSID SID object
+     */
+    void SetSIDL(TUid aSID);
+    
+    /*
+     * Returns DLL capability
+     * @return capability value
+     */    
+    TUint32 Capability() const;
+    
+    /*
+     * Sets DLL capability
+     * @param aCapability capability value
+     */
+    void SetCapabilityL(TUint32 aCapability);
+    
+protected:
+    CLauncherDLLElement();
+    virtual void ConstructL();
+    
+private:
+    TFileName   iName;
+    TUid iUID1;
+    TUid iUID2;
+    TUid iUID3;
+    TUid iSID;
+    TUint32 iCapability;
+    };
+
+#endif /* LAUNCHERDLLELEMENT_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/launcherdllparser.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* 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 LAUNCHERDLLPARSER_H_
+#define LAUNCHERDLLPARSER_H_
+
+#include <e32base.h>
+#include <f32file.h>
+#include "launcherdllelement.h"
+
+#define UID1_OFFSET 0x00
+#define UID2_OFFSET 0x04
+#define UID3_OFFSET 0x08
+#define SID_OFFSET_ROM 0x44
+#define SID_OFFSET_ROFS 0x80
+#define CAPABILITY_OFFSET_ROM 0x4c
+#define CAPABILITY_OFFSET_ROFS 0x88
+
+class CLauncherDLLParser : public CBase
+    {
+public:
+
+    virtual ~CLauncherDLLParser();
+    static CLauncherDLLParser* NewL();
+    static CLauncherDLLParser* NewLC();
+    
+    /**
+     * Reads data from the given DLL-file and sets parsed data to given object.
+     * @param aFileSession Reference to an open file session     
+     * @param aFile Reference to the DLL file object
+     * @param aElement Reference to the element, which will contain the parsed data
+     */
+    void ParseL( RFs& aFileSession, RFile& aFile, CLauncherDLLElement& aElement );
+    
+private:
+
+    CLauncherDLLParser();
+    void ConstructL();
+    
+    /**
+     * Reads 32-bit unsigned integer from the given file.
+     * @return 32-bit unsigned integer value.
+     * @param aFile File handle.
+     */
+    TUint32 ReadUint32L( RFile& aFile );
+    };
+
+#endif /* LAUNCHERDLLPARSER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/launcherengine.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,274 @@
+/*
+* 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 LAUNCHERENGINE_H
+#define LAUNCHERENGINE_H
+
+#include <e32base.h>
+#include <apgcli.h>
+#include <w32std.h>
+#include <e32std.h>
+#include <e32hal.h>
+
+#include "launcherparserobserver.h"
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+class CEikonEnv;
+class CAppThreadChecker;
+class CAppRunningChecker;
+class CLauncherXMLParser;
+class CLauncherDLLParser;
+
+
+// INFERFACE FOR COMMUNICATION WITH UI
+
+class MLauncherUI
+{
+public:
+    /**
+     * Method for writing text to output window.
+     * @param aText A text to be written.
+     * @return None.
+     */
+    virtual void PrintText(const TDesC& aText) = 0;
+
+    /**
+     * Shows info message with text
+     * @param aText An text to be shown in message.
+     * @return None.
+     */
+    virtual void ShowInfoMessage(const TDesC& aText) = 0;
+    
+    /**
+     * Shows error message with error text
+     * @param aText An error text to be shown in message.
+     * @return None.
+     */
+    virtual void ShowErrorMessage(const TDesC& aText) = 0;
+    
+    /**
+     * Shows progress bar with text
+     * @param aText A text to be shown at top of the progress bar.
+     * @param aMinimum A minimum progress bar value.
+     * @param aMaximum A maximum progress bar value.
+     * @return None.
+     */
+    virtual void ShowProgressBar(const TDesC& aText, TInt aMinimum, TInt aMaximum ) = 0;
+
+    /**
+     * Sets progress bar value
+     * @param aValue A value between min and max value of the progress bar range
+     * @return None.
+     */
+    virtual void SetProgressBarValue(TInt aValue) = 0;
+
+    /**
+     * Hides progress bar
+     * @return None.
+     */
+    virtual void HideProgressBar() = 0;
+
+    /**
+     * Shows wait dialog with text
+     * @param aText A text to be shown at top of the wait bar.
+     * @return None.
+     */
+    virtual void ShowWaitDialog(const TDesC& aText) = 0;
+
+    /**
+     * Hides wait dialog
+     * @return None.
+     */
+    virtual void HideWaitDialog() = 0;
+    
+    /**
+     * Changes focus to output view
+     * @return None.
+     */
+    virtual void ChangeFocusToOutputView() = 0;
+    
+};
+
+// CLASS DECLARATION
+
+class CLauncherEngine: public CActive, public MLauncherParserObserver
+{
+
+public:
+    static CLauncherEngine* NewL(MLauncherUI *aLauncherUI);
+    ~CLauncherEngine();
+    CDesCArray* ListOfAllAppsL();
+    void StartAppLaunchingL(const CArrayFix<TInt>* aSelectedApps, TBool aAutoClose);
+    void CheckIfAppIsRunningL();
+    void CheckWhyThreadDiedL();
+    void StopLaunchingL();
+    TBool LogFileExists();
+    TBool BCLogFileExists();
+    
+    TInt DeleteLogFile();
+    TInt DeleteBCLogFile();
+    
+    void AnalyseDLLsL( const TDesC& aFileName );
+    
+    void ElementParsedL(const CLauncherDLLElement& aDllElement);
+    void DocumentParsedL(TInt aErrorCode);
+    void ParsingProgressedL(TInt aBytes);
+    TInt ReadLineFromFileL(RFile& aFile, TDes& aReadBuf);
+    
+    const TDesC& RequiredDllsFilePath() const { return iRequiredDllsFilePath; };
+    
+    void CancelBCAnalysis();
+    
+private:
+    CLauncherEngine();
+    void ConstructL(MLauncherUI *aLauncherUI);
+    
+    void RunL();
+    void DoCancel();
+        
+    TInt FindFiles(const TDesC& aFileName, const TDesC& aPath);
+    void IssueLaunch();
+    void WriteInitialStuffToTheLogL(const TDesC& aOwnData, RFile& aFile);
+    void CheckForMoreAppsL();
+    void LaunchApplicationL();
+    void DoLaunchApplicationL();
+    CDesCArray* DependencyCheckForE32ImageL();
+
+    /**
+     * Performs binary compatibility analysis based on reference data given
+     * in XML-file.
+     */
+    void DoBCAnalysisL();
+    
+    /**
+     * Compares given DLL list to system DLLs
+     */
+    void DoCompareDLLListsL();
+    
+private:
+
+    MLauncherUI *iLauncherUI;
+    
+    RTimer          iTimer;
+    CEikonEnv*      iEnv;
+    RApaLsSession   iLs;
+    RWsSession      iWs;
+    HBufC8*         iLogWriteBuf;    
+    RFile           iLogFile;
+    RFile           iBCLogFile;  
+    TFileName       iLogFilePath;
+    TFileName       iBCLogFilePath;
+    TFileName       iSystemDllsFilePath;
+    TFileName       iRequiredDllsFilePath;        
+        
+    CDesCArray*     iAppsArray;
+    CDesCArray*     iAllAppsArray;
+    CDesCArray*     iSystemDllArray;
+//  CDesCArray*     iRequiredDllArray;
+
+    TBool           iLaunchingIsActive;
+    TBool           iDLLAnalysisIsActive;
+    TBool           iSkipHiddenAndEmbedOnly;
+    TBool           iAutoClose;
+    TInt            iAppLaunchCounter;
+    TInt            iFailedCases;
+    TInt            iOkCases;
+    TInt            iSkippedCases;
+    TInt            iTotalNumberOfCases;
+
+    TUid            iCurrentAppUid;
+    TThreadId       iCurrentAppThreadId;
+    TBuf<128>       iCurrentAppNameAndExt;
+    RThread         iCurrentAppThread;
+//
+    CAppThreadChecker*          iAppThreadChecker;
+    CAppRunningChecker*         iAppRunningChecker;
+
+    CLauncherXMLParser*     iXMLParser;
+    CLauncherDLLParser*     iDLLParser;
+    CLauncherDLLElement*    iDLLElement;
+    
+    TInt                iFoundBCIssues;
+    HBufC*              iBCIssuesBigBuffer;
+
+        
+public:
+    inline TBool SkipHiddenAndEmbedOnly()              { return iSkipHiddenAndEmbedOnly; };
+    inline void SetSkipHiddenAndEmbedOnly(TBool aSkip) { iSkipHiddenAndEmbedOnly = aSkip; };
+    inline const TDesC& LogFilePath() { return iLogFilePath; }
+    inline const TDesC& BCLogFilePath() { return iBCLogFilePath; }
+    inline const TDesC& SystemDllsFilePath() { return iSystemDllsFilePath; }
+};
+
+
+
+class CAppRunningChecker : public CActive
+    {
+public:
+    static CAppRunningChecker* NewL(CLauncherEngine* aLauncherEngine);
+    ~CAppRunningChecker();
+
+    void StartTesting();
+
+private:
+    CAppRunningChecker();
+    void ConstructL(CLauncherEngine* aLauncherEngine);
+
+    void RunL();
+    void DoCancel();
+
+private:
+    RTimer iTimer;
+    CEikonEnv* iEnv;
+    CLauncherEngine* iLauncherEngine;
+    };
+
+class CAppThreadChecker : public CActive
+    {
+public:
+    static CAppThreadChecker* NewL(CLauncherEngine* aLauncherEngine);
+    ~CAppThreadChecker();
+
+    void ActivateChecking();
+    void CheckIfAppIsRunningL();
+
+private:
+    CAppThreadChecker();
+    void ConstructL(CLauncherEngine* aLauncherEngine);
+
+    void RunL();
+    void DoCancel();
+
+private:
+    CEikonEnv* iEnv;
+    CLauncherEngine* iLauncherEngine;
+    };
+
+
+#endif //LAUNCHERENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/launcherparserobserver.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef LAUNCHERPARSEROBSERVER_H_
+#define LAUNCHERPARSEROBSERVER_H_
+
+class CLauncherDLLElement;
+
+class MLauncherParserObserver
+{
+public:
+    
+    /**
+     * This method is called when parser has parsed next DLL element     
+     * @param aDllElement Parsed DLL element.     
+     */    
+    virtual void ElementParsedL(const CLauncherDLLElement& aDllElement) = 0;
+    
+    /**
+     * This method is called when the parsing is completed. If parsing was
+     * stopped due to an error, an error code is given in parameter.
+     * @param aErrorCode KErrNone if document was parsed successfully.
+     */
+    virtual void DocumentParsedL(TInt aErrorCode) = 0;
+    
+    /**
+     * Parser calls this function during parsing to indicate the amount of
+     * bytes parsed from the given file.
+     * @param aBytes Amount of data (in bytes) parsed. Amount is incremental.
+     */
+    virtual void ParsingProgressedL(TInt aBytes) = 0;
+    
+};
+
+#endif /* LAUNCHERPARSEROBSERVER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/launchertraces.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* 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 __LAUNCHER_TRACES_H__
+#define __LAUNCHER_TRACES_H__
+
+#include <e32def.h>
+
+
+// ---------------------------------------------------------------------------
+// You change these logging method values below! Recompile the application to take changes effect.
+
+    // logging methods
+    // 0 = No logging
+    // 1 = Flogger
+    // 2 = RDebug
+    // 3 = Flogger and RDebug
+    
+    #ifndef _DEBUG
+        
+        // Logging method for UREL builds:
+        #define LAUNCHER_LOGGING_METHOD  2
+
+    #else
+
+        // Logging method for UDEB builds:
+        #define LAUNCHER_LOGGING_METHOD  0
+
+    #endif    
+    
+
+
+// ---------------------------------------------------------------------------
+// Do not make any changes to lines below...
+
+    #if LAUNCHER_LOGGING_METHOD == 1 || LAUNCHER_LOGGING_METHOD == 3
+
+        #include <flogger.h>
+        _LIT(KLogFolder,"Launcher");
+        _LIT(KLogFile,"Launcher_Trace.txt");
+
+    #endif
+
+    #if LAUNCHER_LOGGING_METHOD == 2 || LAUNCHER_LOGGING_METHOD == 3
+
+        #include <e32debug.h>
+
+    #endif
+
+
+    #if LAUNCHER_LOGGING_METHOD == 0
+    
+        #define LOGTEXT(AAA)
+        #define LOGSTRING(AAA)
+        #define LOGSTRING2(AAA,BBB)
+        #define LOGSTRING3(AAA,BBB,CCC)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD)
+    
+    
+    #elif LAUNCHER_LOGGING_METHOD == 1
+    
+        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+   
+    #elif LAUNCHER_LOGGING_METHOD == 2
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
+    
+    #elif LAUNCHER_LOGGING_METHOD == 3
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+
+    #endif
+
+// ---------------------------------------------------------------------------
+
+#endif // __LAUNCHER_TRACES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/inc/launcherxmlparser.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* 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 LAUNCHERXMLPARSER_H_
+#define LAUNCHERXMLPARSER_H_
+
+#include <e32base.h>
+#include <xml/contenthandler.h>
+#include <xml/parser.h>
+#include "launcherdllelement.h"
+#include "launcherparserobserver.h"
+
+using namespace Xml;
+
+const TUint KXMLBufferSize = 1024;
+
+class CLauncherDLLElement;
+
+/**
+ * Parses DLL data from the given XML-file
+ */
+class CLauncherXMLParser : public CActive, public MContentHandler
+{
+public:
+
+    virtual ~CLauncherXMLParser();
+    static CLauncherXMLParser* NewL(RFs& aFs);
+    static CLauncherXMLParser* NewLC(RFs& aFs);
+    
+    /**
+     * Parses the given XML-file and notifies the observer.
+     * @param aFilePath XML-file's path
+     * @param aObserver Pointer to the observer instance.
+     */
+    void ParseL(const TDesC& aFilePath, MLauncherParserObserver* aObserver);
+        
+protected:
+    
+    // from CActive    
+    void DoCancel();    
+    void RunL();
+    
+private:
+
+    CLauncherXMLParser(RFs& aFs);
+    void ConstructL();
+    
+    /**
+     * Tells whether the current XML element is a sub-element of the 'dll'-element.
+     * @return ETrue if the current XML-element is sub-element of the 'dll'-element.
+     */
+    TBool IsDataElement();
+
+    /**
+     * Deletes current data buffer and zeroes the pointer.
+     */
+    void ClearXMLDataBuffer();
+    
+    /**
+     * Converts 8-bit descriptor to 32-bit unsigned integer
+     * @return Converted 32-bit unsigned integer value.
+     * @param aStr 8-bit descriptor to be converted.
+     */
+    TUint32 ConvertDes8ToUint32L(const TDesC8& aStr);
+                
+public:
+    // From MContentHandler:    
+    void OnStartDocumentL(const RDocumentParameters &aDocParam, TInt aErrorCode);
+    void OnEndDocumentL(TInt aErrorCode);
+    void OnStartElementL(   const RTagInfo& aElement, 
+                            const RAttributeArray& aAttributes, 
+                            TInt aErrorCode);
+    void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
+    void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
+    void OnStartPrefixMappingL( const RString& aPrefix, 
+                                const RString& aUri, 
+                                TInt aErrorCode);
+    void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+    void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+    void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
+    void OnProcessingInstructionL(  const TDesC8& aTarget, 
+                                    const TDesC8& aData, 
+                                    TInt aErrorCode);
+    void OnError(TInt aErrorCode);
+    TAny* GetExtendedInterface(const TInt32 aUid);    
+    
+private:
+    CParser* iParser;  // XML parser
+    RFs& iFileSession;
+    RFile iFile; // XML file 
+    TBuf8<KXMLBufferSize> iXMLDataBuffer;
+    MLauncherParserObserver* iObserver;
+    CLauncherDLLElement* iCurrentDllElement;
+    TBuf8<KMaxFileName> iCurrentContent;
+    TBuf8<KMaxName> iCurrentElementName;
+    TBool iIgnoreError;
+    TInt  iParsedBytes;
+};
+
+#endif /* LAUNCHERXMLPARSER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/src/e32image.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,846 @@
+/*
+* 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 "e32image.h"
+#include "e32imageheaders.h"
+#include "launchertraces.h"
+
+
+const TInt KMaxHeaderSize = sizeof(E32ImageHeaderV) + 65536/8;
+
+SCapabilitySet AllCapabilities;
+SCapabilitySet DisabledCapabilities;
+
+// ---------------------------------------------------------------------------
+
+E32ImageReader* E32ImageReader::NewLC()
+    {
+    E32ImageReader* self = new(ELeave) E32ImageReader;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+E32ImageReader::E32ImageReader()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+
+void E32ImageReader::ConstructL()
+    {
+    LOGSTRING("Launcher: E32ImageReader::ConstructL");
+
+    iEnv = CEikonEnv::Static();
+    }
+
+// ---------------------------------------------------------------------------
+
+CDesCArray* E32ImageReader::ListOfDLLsL(const TDesC& aFullPathToE32Image)
+    {
+    LOGSTRING("Launcher: E32ImageReader::ListOfDLLsL");
+
+    // open the file for reading
+    User::LeaveIfError( iFile.Open(iEnv->FsSession(), aFullPathToE32Image, EFileRead) );
+    CleanupClosePushL(iFile);
+    
+    // get local copies of capability sets
+    TCapabilitySet caps;
+    caps.SetAllSupported();
+    AllCapabilities=*(SCapabilitySet*)&caps;
+    caps.SetDisabled();
+    DisabledCapabilities=*(SCapabilitySet*)&caps;
+
+    // read the header of the image
+    User::LeaveIfError( E32ImageHeader::New(iHeader, iFile) );
+
+    // set stuff
+    iHeapSizeMin = iHeader->iHeapSizeMin;
+    iHeapSizeMax = iHeader->iHeapSizeMax;
+    iStackSize = iHeader->iStackSize;
+    iPriority = iHeader->ProcessPriority();
+    iDepCount = iHeader->iDllRefTableCount;
+    iExportDirCount = iHeader->iExportDirCount;
+    iExportDir = iHeader->iExportDirOffset-iHeader->iCodeOffset;
+    iTextSize = iHeader->iTextSize;
+    iCodeSize = iHeader->iCodeSize;
+    iDataSize = iHeader->iDataSize;
+    iBssSize = iHeader->iBssSize;
+    iTotalDataSize = iDataSize+iBssSize;
+    iFileEntryPoint = iHeader->iEntryPoint;
+    iEntryPtVeneer = 0;
+    iExceptionDescriptor = iHeader->ExceptionDescriptor();
+    if (iHeader->iExportDirOffset)
+        iExportDirLoad=iExportDir;
+    
+    // allocate data for the code area
+    iCodeLoadAddress = (TUint32)User::Alloc(iCodeSize);
+    
+    // load data from the binary
+    User::LeaveIfError( LoadData() );
+
+    // create an array for the dll names from the import list
+    CDesCArray* dllArray = new(ELeave) CDesCArrayFlat(100);
+    CleanupStack::PushL(dllArray);
+
+    // get the dll names from the import section
+    E32ImportSection* importSection = (E32ImportSection *)iImportData;
+    E32ImportBlock* block;
+    if(importSection)
+        block = (E32ImportBlock*)(importSection+1);
+    else
+        block = NULL;
+    iNextImportPos = 0;
+
+    // loop through all import data blocks
+    for (TInt i=0; i<iDepCount; i++)
+        {
+        // get a pointer to the dll name
+        TPtrC8 dllname = (const TText8*)((TUint32)iImportData + block->iOffsetOfDllName);
+        TBuf8<KMaxKernelName> rootname;
+        if (dllname.Length() > KMaxKernelName)
+            User::Leave( KErrNotSupported );
+        
+        // parse the filename
+        TFileNameInfo fni;
+        User::LeaveIfError( fni.Set(dllname, TFileNameInfo::EAllowUid) );
+        fni.GetName(rootname, TFileNameInfo::EIncludeBaseExt);
+
+        // append the name to the dll name array
+        TFileName dllName16;
+        dllName16.Copy(rootname);
+        dllArray->AppendL(dllName16);
+
+        // get the next block
+        TUint impfmt = iHeader->ImportFormat();
+        block = (E32ImportBlock*)block->NextBlock(impfmt);
+        }
+
+    CleanupStack::Pop();  //dllArray
+    CleanupStack::PopAndDestroy(); //iFile
+
+    // free memory
+    delete iHeader;
+    iHeader = NULL;
+    delete iImportSection;
+    iImportSection = NULL;
+    delete iCodeRelocSection;
+    iCodeRelocSection = NULL;
+    delete iDataRelocSection;
+    iDataRelocSection = NULL;
+    
+    User::Free((TAny*)iCodeLoadAddress);
+    User::Free(iRestOfFileData);
+    User::Free(iCurrentImportList);
+    if (iExportDirLoadAllocated)
+        User::Free((TAny*)iExportDirLoad);
+
+    return dllArray;
+    }
+
+// ---------------------------------------------------------------------------
+
+E32ImageReader::~E32ImageReader()
+    {
+    LOGSTRING("Launcher: E32ImageReader::~E32ImageReader");
+    }
+
+
+// ---------------------------------------------------------------------------
+
+TInt FileRead(RFile& aFile, TUint8* aDest, TInt aSize)
+    {
+    TPtr8 p(aDest,aSize,aSize);
+    return aFile.Read(p,aSize);
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt E32ImageHeader::New(E32ImageHeader*& aHdr, RFile& aFile)
+    {
+    LOGSTRING("Launcher: E32ImageHeader::New");
+
+    E32ImageHeader* h = NULL;
+    TInt hdrsz = 0;
+    TInt filesize;
+    TInt r = aFile.Size(filesize);
+    if (r!=KErrNone)
+        return r;
+    E32ImageHeader bh;
+    r = FileRead(aFile, (TUint8*)&bh, sizeof(E32ImageHeader));
+    if (r==KErrNone)
+        {
+        hdrsz = bh.TotalSize();
+        if ( (TUint(hdrsz) > TUint(KMaxHeaderSize)) || (TUint(hdrsz) < TUint(sizeof(bh))) )
+            return KErrCorrupt;
+        }
+    h = (E32ImageHeader*)User::Alloc(hdrsz);
+    if (!h)
+        return KErrNoMemory;
+    wordmove(h, &bh, sizeof(E32ImageHeader));
+    if (hdrsz > (TInt)sizeof(E32ImageHeader))
+        r = FileRead(aFile, (TUint8*)(h + 1), hdrsz - sizeof(E32ImageHeader));
+    if (r==KErrNone)
+        r = h->IntegrityCheck(filesize);
+    if (r==KErrNone)
+        {
+        if (h->HeaderFormat() >= KImageHdrFmt_V)
+            {
+            // Overide capabilities in image
+            for(TInt i=0; i<SCapabilitySet::ENCapW; i++)
+                {
+                ((E32ImageHeaderV*)h)->iS.iCaps[i] |= DisabledCapabilities[i];
+                ((E32ImageHeaderV*)h)->iS.iCaps[i] &= AllCapabilities[i];
+                }
+            }
+        aHdr = h;
+        }
+    else
+        {
+        delete h;
+        aHdr = NULL;
+        }
+    return r;
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt E32ImageHeader::IntegrityCheck(TInt aFileSize)
+    {
+    LOGSTRING("Launcher: E32ImageHeader::IntegrityCheck");
+    
+    TInt hdrsz = TotalSize();
+    TUint hdrfmt = HeaderFormat();
+    TUidType uids = *(const TUidType*)&iUid1;
+    E32ImageHeaderV* v = NULL;
+    TCheckedUid chkuid(uids);
+    const TUint32* pChkUid = (const TUint32*)&chkuid;
+
+    if (pChkUid[3] != iUidChecksum)
+        return KErrCorrupt;    
+
+    if (hdrfmt == KImageHdrFmt_V)
+        {
+        TUint32 supplied_crc = iHeaderCrc;
+        iHeaderCrc = KImageCrcInitialiser;
+        TUint32 crc = 0;
+        Mem::Crc32(crc, this, hdrsz);
+        iHeaderCrc = supplied_crc;
+        if (crc != supplied_crc)
+            return KErrCorrupt;    
+        v = (E32ImageHeaderV*)this;
+        TUint total_eds = v->iExportDescSize + sizeof(v->iExportDescSize) + sizeof(v->iExportDescType);
+        total_eds = (total_eds + 3) &~ 3;
+        if (total_eds + (TUint)_FOFF(E32ImageHeaderV, iExportDescSize) != (TUint)hdrsz)
+            return KErrCorrupt;
+        if (TUint(v->iExportDescType) > KImageHdr_ExpD_SparseBitmap8)
+            return KErrNotSupported;
+        }
+    else if (hdrfmt >= KImageHdrFmt_V)
+        return KErrNotSupported; 
+
+    TCpu cpu = CpuIdentifier();
+    TUint abi = ABI();
+    TUint impfmt = ImportFormat();
+    TUint compression = CompressionType();
+
+    TUint uncompressed_size = compression ? UncompressedFileSize() : (TUint)aFileSize;
+
+    if (iSignature != 0x434f5045) // 'EPOC'
+        return KErrCorrupt;
+    if (iCodeSize<0)
+        return KErrCorrupt;
+    if (iDataSize<0)
+        return KErrCorrupt;
+    if (iHeapSizeMin<0)
+        return KErrCorrupt;
+    if (iHeapSizeMax<iHeapSizeMin)
+        return KErrCorrupt;
+    if (iStackSize<0)
+        return KErrCorrupt;
+    if (iBssSize<0)
+        return KErrCorrupt;
+    if (iDllRefTableCount<0)
+        return KErrCorrupt;
+    if (iExportDirOffset >= uncompressed_size)
+        return KErrCorrupt;
+    if (TUint(iExportDirCount)>65535)
+        return KErrCorrupt;
+    if (iTextSize<0)
+        return KErrCorrupt;
+    if (iCodeSize<iTextSize)
+        return KErrCorrupt;
+    if (iCodeOffset >= uncompressed_size)
+        return KErrCorrupt;
+    if (iDataOffset >= uncompressed_size)
+        return KErrCorrupt;
+    if (iImportOffset >= uncompressed_size)
+        return KErrCorrupt;
+    if (iCodeRelocOffset >= uncompressed_size)
+        return KErrCorrupt;
+    if (iDataRelocOffset >= uncompressed_size)
+        return KErrCorrupt;
+    if (TUint(iCodeSize+iDataSize) > uncompressed_size)
+        return KErrCorrupt;
+
+    if (abi>KImageABI_EABI)
+        return KErrNotSupported;
+    if (impfmt>KImageImpFmt_PE2)
+        return KErrNotSupported;
+    if (iUid1 != (TUint32)KExecutableImageUidValue && iUid1 != (TUint32)KDynamicLibraryUidValue)
+        return KErrNotSupported;
+    TUint32 mv = ModuleVersion();
+    if (mv >= 0x80000000u || (mv & 0x0000ffffu) > 0x8000u)
+        return KErrNotSupported;
+
+    return KErrNone;
+    }
+// ---------------------------------------------------------------------------
+
+TInt E32ImageReader::LoadData()
+    {
+    LOGSTRING("Launcher: E32ImageReader::LoadData");
+
+    TInt remainder;
+    iFile.Size(remainder);
+    
+    remainder -= iHeader->TotalSize();
+    TUint32 compression = iHeader->CompressionType();
+    if (compression != KMyFormatNotCompressed)
+        {
+        remainder = iHeader->UncompressedFileSize() - iHeader->iCodeOffset;
+        }
+
+    remainder -= iHeader->iCodeSize;
+    
+    if (remainder > 0)
+        {
+        iRestOfFileData = (TUint8*)User::Alloc(remainder);
+        if (iRestOfFileData)
+            iRestOfFileSize=remainder;
+        else
+            return KErrNoMemory;
+        }
+
+    iConversionOffset = iHeader->iCodeOffset + iHeader->iCodeSize;
+
+    TInt r = LoadFile(compression);
+    if (r !=KErrNone)
+        return r;
+
+
+    TUint8* source=NULL;
+    if (iHeader->iImportOffset)
+        {
+        TUint bufferOffset=iHeader->iImportOffset-iConversionOffset;
+        
+        if(bufferOffset>iRestOfFileSize || bufferOffset+sizeof(E32ImportSection)>iRestOfFileSize)
+            return KErrCorrupt;
+        
+        source=iRestOfFileData+bufferOffset;
+        
+        iImportSection = new E32ImportSection;
+        
+        if (iImportSection)
+            Mem::Move((TText8*)iImportSection, source, sizeof(E32ImportSection));
+        else
+            return KErrNoMemory;
+        }
+
+    iCodeDelta = iCodeRunAddress-iHeader->iCodeBase;
+    iDataDelta = iDataRunAddress-iHeader->iDataBase;
+
+    if (r==KErrNone)
+        r = ReadImportData();
+
+    return r;
+    }
+
+// ---------------------------------------------------------------------------
+
+TUint8* E32ImageReader::MemoryMove(TAny* aDestination, const TAny* aSource, TInt aNumberofBytes)
+    {
+    return Mem::Move(aDestination, aSource, aNumberofBytes);
+    }
+
+// ---------------------------------------------------------------------------
+
+GLDEF_C TInt svRelocateExports(TAny* aPtr)
+    {
+    E32ImageReader* pI=(E32ImageReader*)aPtr;
+    TUint32* destExport=(TUint32*)pI->iExportDirLoad;
+    TInt i=pI->iExportDirCount;
+    TUint32 codeBase=pI->iCodeRunAddress;
+    while (i-->0)
+        *destExport+++=codeBase;
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt E32ImageReader::LoadFile(TUint32 aCompression)
+    {
+    LOGSTRING("Launcher: E32ImageReader::LoadFile");
+
+    TInt r(KErrNone);
+
+    if (aCompression == KMyFormatNotCompressed)
+        r=LoadFileNoCompress();
+    
+    else if (aCompression == KMyUidCompressionDeflate)
+        {
+        TRAP(r, LoadFileInflateL());
+        }
+    
+    else
+        r = KErrNotSupported;
+    
+    return r;
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt E32ImageReader::LoadFileNoCompress()
+    {
+    LOGSTRING("Launcher: E32ImageReader::LoadFileNoCompress");
+
+    TInt r(KErrNone);
+
+    if (iHeader->iCodeSize)
+        {
+        r = Read(iHeader->iCodeOffset, (TText8*)iCodeLoadAddress, iCodeSize);
+        }
+
+    if (r != KErrNone)
+        {
+        return r;
+        }
+
+    if (iRestOfFileSize)
+        {
+        r = Read(iConversionOffset, (TText8*)iRestOfFileData, iRestOfFileSize);
+        }
+    
+    return r;
+    }
+
+// ---------------------------------------------------------------------------
+
+void FileCleanup(TAny* aPtr)
+    {
+    TFileInput* f=(TFileInput*)aPtr;
+    f->Cancel();
+    delete f;
+    }
+
+// ---------------------------------------------------------------------------
+
+void E32ImageReader::LoadFileInflateL()
+    {
+    LOGSTRING("Launcher: E32ImageReader::LoadFileInflateL");
+
+    TInt pos = iHeader->TotalSize();
+    User::LeaveIfError(iFile.Seek(ESeekStart,pos));
+
+    TFileInput* file = new (ELeave) TFileInput(iFile);
+    CleanupStack::PushL(TCleanupItem(&FileCleanup,file));
+    CInflater* inflater = CInflater::NewLC(*file);
+    
+    if (iHeader->iCodeSize)
+        {
+        TInt count = inflater->ReadL((TUint8*)iCodeLoadAddress, iCodeSize, &MemoryMove);
+        
+        if(count!=iCodeSize)
+            User::Leave(KErrCorrupt);
+        }
+
+    if (iRestOfFileSize)
+        {
+        TUint32 count = inflater->ReadL(iRestOfFileData, iRestOfFileSize, &Mem::Move);
+        
+        if(count!=iRestOfFileSize)
+            User::Leave(KErrCorrupt);
+        }
+    
+    CleanupStack::PopAndDestroy(2,file);
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt E32ImageReader::Read(TText8* aDest, TInt aSize)
+    {
+    TPtr8 p(aDest,aSize,aSize);
+    return iFile.Read(p,aSize);
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt E32ImageReader::Read(TInt aPos, TText8* aDest, TInt aSize)
+    {
+    TPtr8 p(aDest,aSize,aSize);
+    if (aPos<0)
+        return KErrCorrupt;
+    return iFile.Read(aPos,p,aSize);
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt E32ImageReader::ReadImportData()
+    {
+    LOGSTRING("Launcher: E32ImageReader::ReadImportData");
+
+    if (!iHeader->iImportOffset)
+        return KErrNone;
+    
+    TUint32 bufferOffset = iHeader->iImportOffset-iConversionOffset;
+    
+    if(bufferOffset>iRestOfFileSize || bufferOffset+iImportSection->iSize>iRestOfFileSize)
+        return KErrCorrupt;
+    
+    iImportData = (TUint32*)(iRestOfFileData+bufferOffset);
+    
+    E32ImportSection* s = (E32ImportSection*)iImportData;
+    E32ImportBlock* b = (E32ImportBlock*)(s + 1);
+    TUint impfmt = iHeader->ImportFormat();
+    TInt i;
+    TInt n = 0;
+    
+    for (i=0; i<iDepCount; ++i)
+        {
+        if (b->iNumberOfImports > n)
+            n = b->iNumberOfImports;
+        b = (E32ImportBlock*)b->NextBlock(impfmt);
+        }
+    
+    iCurrentImportList = (TUint32*)User::Alloc(n * sizeof(TUint32));
+    
+    if (!iCurrentImportList)
+        return KErrNoMemory;
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+
+inline CInflater::CInflater(TBitInput& aInput)
+    :iBits(&aInput),iEncoding(0),iOut(0)
+    {}
+
+// ---------------------------------------------------------------------------
+
+void CInflater::ConstructL()
+    {
+    iEncoding=new(ELeave) TEncoding;
+    InitL();
+    iLen=0;
+    iOut=new(ELeave) TUint8[KDeflateMaxDistance];
+    iAvail=iLimit=iOut;
+    }
+
+// ---------------------------------------------------------------------------
+
+CInflater* CInflater::NewLC(TBitInput& aInput)
+    {
+    CInflater* self=new(ELeave) CInflater(aInput);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CInflater::~CInflater()
+    {
+    delete iEncoding;
+    delete [] iOut;
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CInflater::ReadL(TUint8* aBuffer,TInt aLength, TMemoryMoveFunction aMemMovefn)
+    {
+    TInt tfr=0;
+    for (;;)
+        {
+        TInt len=Min(aLength,iLimit-iAvail);
+        if (len && aBuffer)
+            {
+            aMemMovefn(aBuffer,iAvail,len);
+            aBuffer+=len;
+            }
+        aLength-=len;
+        iAvail+=len;
+        tfr+=len;
+        if (aLength==0)
+            return tfr;
+        len=InflateL();
+        if (len==0)
+            return tfr;
+        iAvail=iOut;
+        iLimit=iAvail+len;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CInflater::SkipL(TInt aLength)
+    {
+    return ReadL(0,aLength,Mem::Move);
+    }
+
+// ---------------------------------------------------------------------------
+
+void CInflater::InitL()
+    {
+    Huffman::InternalizeL(*iBits,iEncoding->iLitLen,KDeflationCodes);
+
+    if (!Huffman::IsValid(iEncoding->iLitLen,TEncoding::ELitLens) ||
+        !Huffman::IsValid(iEncoding->iDistance,TEncoding::EDistances))
+        User::Leave(KErrCorrupt);
+
+    Huffman::Decoding(iEncoding->iLitLen,TEncoding::ELitLens,iEncoding->iLitLen);
+    Huffman::Decoding(iEncoding->iDistance,TEncoding::EDistances,iEncoding->iDistance,KDeflateDistCodeBase);
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CInflater::InflateL()
+    {
+    TUint8* out=iOut;
+    TUint8* const end=out+KDeflateMaxDistance;
+    const TUint32* tree=iEncoding->iLitLen;
+    if (iLen<0)    // EOF
+        return 0;
+    if (iLen>0)
+        goto useHistory;
+
+    while (out<end)
+        {
+        // get a huffman code
+        {
+        TInt val=iBits->HuffmanL(tree)-TEncoding::ELiterals;
+        if (val<0)
+            {
+            *out++=TUint8(val);
+            continue;        
+            }
+        if (val==TEncoding::EEos-TEncoding::ELiterals)
+            {    
+            iLen=-1;
+            break;
+            }
+        
+        TInt code=val&0xff;
+        if (code>=8)
+            {    
+            TInt xtra=(code>>2)-1;
+            code-=xtra<<2;
+            code<<=xtra;
+            code|=iBits->ReadL(xtra);
+            }
+        if (val<KDeflateDistCodeBase-TEncoding::ELiterals)
+            {
+            iLen=code+KDeflateMinLength;
+            tree=iEncoding->iDistance;
+            continue;        
+            }
+        
+        iRptr=out-(code+1);
+        if (iRptr+KDeflateMaxDistance<end)
+            iRptr+=KDeflateMaxDistance;
+        }
+useHistory:
+        TInt tfr=Min(end-out,iLen);
+        iLen-=tfr;
+        const TUint8* from=iRptr;
+        do
+            {
+            *out++=*from++;
+            if (from==end)
+                from-=KDeflateMaxDistance;
+            } while (--tfr!=0);
+        iRptr=from;
+        tree=iEncoding->iLitLen;
+        };
+    
+    return out-iOut;
+    }
+
+// ---------------------------------------------------------------------------
+
+TFileInput::TFileInput(RFile& aFile)
+    :iFile(aFile),iReadBuf(iBuf1),iPtr(iBuf1,KBufSize)
+    {
+    aFile.Read(iPtr,iStat);
+    }
+
+// ---------------------------------------------------------------------------
+
+void TFileInput::Cancel()
+    {
+    if (iReadBuf)
+        User::WaitForRequest(iStat);
+    }
+
+// ---------------------------------------------------------------------------
+
+void TFileInput::UnderflowL()
+    {
+    TUint8* b=iReadBuf;
+    ASSERT(b!=NULL);
+    User::WaitForRequest(iStat);
+    iReadBuf=0;
+    User::LeaveIfError(iStat.Int());
+    if(iPtr.Length()==0)
+        User::Leave(KErrCorrupt);
+    Set(b,iPtr.Length()*8);
+    
+    b = b==iBuf1 ? iBuf2 : iBuf1;
+    iPtr.Set(b,0,KBufSize);
+    iFile.Read(iPtr,iStat);
+    iReadBuf=b;
+    }
+
+// ---------------------------------------------------------------------------
+
+TFileNameInfo::TFileNameInfo()
+    {
+    memclr(this, sizeof(TFileNameInfo));
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt TFileNameInfo::Set(const TDesC8& aFileName, TUint aFlags)
+    {
+    iUid = 0;
+    iVersion = 0;
+    iPathPos = 0;
+    iName = aFileName.Ptr();
+    iLen = aFileName.Length();
+    iExtPos = aFileName.LocateReverse('.');
+    if (iExtPos<0)
+        iExtPos = iLen;
+    TInt osq = aFileName.LocateReverse('[');
+    TInt csq = aFileName.LocateReverse(']');
+    if (!(aFlags & EAllowUid) && (osq>=0 || csq>=0))
+        {
+        return KErrBadName;
+        }
+    if (osq>=iExtPos || csq>=iExtPos)
+        {
+        return KErrBadName;
+        }
+    TInt p = iExtPos;
+    if ((aFlags & EAllowUid) && p>=10 && iName[p-1]==']' && iName[p-10]=='[')
+        {
+        TPtrC8 uidstr(iName + p - 9, 8);
+        TLex8 uidlex(uidstr);
+        TUint32 uid = 0;
+        TInt r = uidlex.Val(uid, EHex);
+        if (r==KErrNone && uidlex.Eos())
+            iUid = uid, p -= 10;
+        }
+    iUidPos = p;
+    TInt ob = aFileName.LocateReverse('{');
+    TInt cb = aFileName.LocateReverse('}');
+    if (ob>=iUidPos || cb>=iUidPos)
+        {
+        return KErrBadName;
+        }
+    if (ob>=0 && cb>=0 && p-1==cb)
+        {
+        TPtrC8 p8(iName, p);
+        TInt d = p8.LocateReverse('.');
+        TPtrC8 verstr(iName+ob+1, p-ob-2);
+        TLex8 verlex(verstr);
+        if (ob==p-10 && d<ob)
+            {
+            TUint32 ver = 0;
+            TInt r = verlex.Val(ver, EHex);
+            if (r==KErrNone && verlex.Eos())
+                iVersion = ver, p = ob;
+            }
+        else if (d>ob && p-1>d && (aFlags & EAllowDecimalVersion))
+            {
+            TUint32 maj = 0;
+            TUint32 min = 0;
+            TInt r = verlex.Val(maj, EDecimal);
+            TUint c = (TUint)verlex.Get();
+            TInt r2 = verlex.Val(min, EDecimal);
+            if (r==KErrNone && c=='.' && r2==KErrNone && verlex.Eos() && maj<32768 && min<32768)
+                iVersion = (maj << 16) | min, p = ob;
+            }
+        }
+    iVerPos = p;
+    if (iLen>=2 && iName[1]==':')
+        {
+        TUint c = iName[0];
+        if (c!='?' || !(aFlags & EAllowPlaceholder))
+            {
+            c |= 0x20;
+            if (c<'a' || c>'z')
+                {
+                return KErrBadName;
+                }
+            }
+        iPathPos = 2;
+        }
+    TPtrC8 pathp(iName+iPathPos, iVerPos-iPathPos);
+    if (pathp.Locate('[')>=0 || pathp.Locate(']')>=0 || pathp.Locate('{')>=0 || pathp.Locate('}')>=0 || pathp.Locate(':')>=0)
+        {
+        return KErrBadName;
+        }
+    iBasePos = pathp.LocateReverse('\\') + 1 + iPathPos;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+
+void TFileNameInfo::GetName(TDes8& aName, TUint aFlags) const
+    {
+    if (aFlags & EIncludeDrive)
+        aName.Append(Drive());
+    if (aFlags & EIncludePath)
+        {
+        if (PathLen() && iName[iPathPos]!='\\')
+            aName.Append('\\');
+        aName.Append(Path());
+        }
+    if (aFlags & EIncludeBase)
+        aName.Append(Base());
+    if ((aFlags & EForceVer) || ((aFlags & EIncludeVer) && VerLen()) )
+        {
+        aName.Append('{');
+        aName.AppendNumFixedWidth(iVersion, EHex, 8);
+        aName.Append('}');        
+        }
+    if ((aFlags & EForceUid) || ((aFlags & EIncludeUid) && UidLen()) )
+        {
+        aName.Append('[');
+        aName.AppendNumFixedWidth(iUid, EHex, 8);
+        aName.Append(']');
+        }
+    if (aFlags & EIncludeExt)
+        aName.Append(Ext());
+    }
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/src/launcherdllelement.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,191 @@
+/*
+* 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 "launcherdllelement.h"
+#include "launchertraces.h"
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLElement::~CLauncherDLLElement()
+    {
+    LOGSTRING("Launcher: CLauncherDLLElement::~CLauncherDLLElement");    
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLElement::CLauncherDLLElement()
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLElement* CLauncherDLLElement::NewL()
+    {
+    LOGSTRING("Launcher: CLauncherDLLElement::NewL");
+    CLauncherDLLElement* self = CLauncherDLLElement::NewLC();    
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLElement* CLauncherDLLElement::NewLC()
+    {
+    LOGSTRING("Launcher: CLauncherDLLElement::NewLC");
+    CLauncherDLLElement* self = new (ELeave) CLauncherDLLElement;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLElement::ConstructL()
+    {
+    
+    }
+
+// ---------------------------------------------------------------------------
+   
+TBool CLauncherDLLElement::CompareL(const CLauncherDLLElement& aReferenceElement, RArray<TDifference>& aDifferenceList) const
+    {
+    LOGSTRING2("Launcher: CLauncherDLLElement::CompareL - DLLName: %S", &iName);
+    if( iName != aReferenceElement.Name())
+        {
+        LOGSTRING("Launcher: CLauncherDLLElement::CompareL: ERROR - DLL names don't match.");
+        User::Leave(KErrArgument);
+        }
+    
+    TBool diff = EFalse;
+            
+    if( iUID1 != aReferenceElement.UID1()) 
+        {
+        diff = ETrue;
+        aDifferenceList.AppendL(this->EDifference_UID1);      
+        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID1s differs: %x vs. %x", iUID1, aReferenceElement.UID1());  
+        }
+    if( iUID2!= aReferenceElement.UID2()) 
+        {
+        diff = ETrue;
+        aDifferenceList.AppendL(this->EDifference_UID2);        
+        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID2s differs: %x vs. %x", iUID2, aReferenceElement.UID2());  
+        }
+    if( iUID3 != aReferenceElement.UID3()) 
+        {
+        diff = ETrue;
+        aDifferenceList.AppendL(this->EDifference_UID3);        
+        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID3s differs: %x vs. %x", iUID3, aReferenceElement.UID3());  
+        }
+    if( iSID != aReferenceElement.SID()) 
+        {
+        diff = ETrue;
+        aDifferenceList.AppendL(this->EDifference_SID);        
+        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - SIDs differs: %x vs. %x", iSID, aReferenceElement.SID());  
+        }
+    if( iCapability != aReferenceElement.Capability()) 
+        {
+        diff = ETrue;
+        aDifferenceList.AppendL(this->EDifference_Capability);        
+        LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - Capabilities differs: %x vs. %x", iCapability, aReferenceElement.Capability());  
+        }
+    
+    return diff;
+    }
+
+// ---------------------------------------------------------------------------
+
+TFileName CLauncherDLLElement::Name() const
+    {
+    return iName;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLElement::SetNameL(const TFileName& aName)
+    {    
+    iName.Copy(aName); 
+    }
+
+// ---------------------------------------------------------------------------
+
+TUid CLauncherDLLElement::UID1() const
+    {
+    return iUID1;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLElement::SetUID1L(TUid aUID1)
+    {
+    iUID1.iUid = aUID1.iUid;
+    }
+
+// ---------------------------------------------------------------------------
+
+TUid CLauncherDLLElement::UID2() const
+    {
+    return iUID2;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLElement::SetUID2L(TUid aUID2)
+    {    
+    iUID2 = aUID2;
+    }
+
+// ---------------------------------------------------------------------------
+
+TUid CLauncherDLLElement::UID3() const
+    {    
+    return iUID3;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLElement::SetUID3L(TUid aUID3)
+    {    
+    iUID3 = aUID3;
+    }
+
+// ---------------------------------------------------------------------------
+
+TUid CLauncherDLLElement::SID() const
+    {   
+    return iSID;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLElement::SetSIDL(TUid aSID)
+    {    
+    iSID = aSID;
+    }
+
+// ---------------------------------------------------------------------------
+
+TUint32 CLauncherDLLElement::Capability() const
+    {
+    return iCapability;    
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLElement::SetCapabilityL(TUint32 aCapability)
+    {
+    iCapability = aCapability; 
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/src/launcherdllparser.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* 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 "launcherdllparser.h"
+#include "launchertraces.h"
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLParser::~CLauncherDLLParser()
+    {
+    LOGSTRING("Launcher: CLauncherDLLParser::~CLauncherDLLParser");
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLParser::CLauncherDLLParser()
+    {
+    LOGSTRING("Launcher: CLauncherDLLParser::CLauncherDLLParser");
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLParser* CLauncherDLLParser::NewL()
+    {
+    LOGSTRING("Launcher: CLauncherDLLParser::NewL");
+    CLauncherDLLParser* self = CLauncherDLLParser::NewLC();    
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherDLLParser* CLauncherDLLParser::NewLC()
+    {
+    LOGSTRING("Launcher: CLauncherDLLParser::NewLC");
+    CLauncherDLLParser* self = new (ELeave) CLauncherDLLParser;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLParser::ConstructL()
+    {
+    
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherDLLParser::ParseL( RFs& aFileSession, RFile& aFile, CLauncherDLLElement& aElement )
+    {
+    TFileName dllName;
+    TFileName fullName;
+    TUid tmpUID;
+    TInt offset = 0;
+        
+    aFile.Name(dllName);
+    aFile.FullName(fullName);
+    aElement.SetNameL(dllName);
+    
+    TBool isFileInRom = aFileSession.IsFileInRom(fullName) != 0;
+    
+    /**
+     * Read UID1
+     */
+    offset = UID1_OFFSET;
+    aFile.Seek(ESeekStart, offset); // Set file position   
+    tmpUID.iUid = ReadUint32L(aFile);    
+    aElement.SetUID1L(tmpUID);    
+    
+    /**
+     * Read UID2
+     */
+    offset = UID2_OFFSET;
+    aFile.Seek(ESeekStart, offset); // Set file position
+    tmpUID.iUid = ReadUint32L(aFile);    
+    aElement.SetUID2L(tmpUID);
+        
+    /**
+     * Read UID3
+     */
+    offset = UID3_OFFSET;
+    aFile.Seek(ESeekStart, offset); // Set file position
+    tmpUID.iUid = ReadUint32L(aFile);    
+    aElement.SetUID3L(tmpUID);
+        
+    /**
+     * Read SID
+     */
+    if( isFileInRom )
+        offset = SID_OFFSET_ROM;
+    else
+        offset = SID_OFFSET_ROFS;
+    aFile.Seek(ESeekStart, offset); // Set file position
+    tmpUID.iUid = ReadUint32L(aFile);    
+    aElement.SetSIDL(tmpUID);
+    
+    /**
+     * Read Capability
+     */
+    if( isFileInRom )
+        offset = CAPABILITY_OFFSET_ROM;
+    else
+        offset = CAPABILITY_OFFSET_ROFS;
+    aFile.Seek(ESeekStart, offset); // Set file position
+    TUint32 tmpVal = ReadUint32L(aFile);
+    aElement.SetCapabilityL(tmpVal);    
+    }
+
+// ---------------------------------------------------------------------------
+
+TUint32 CLauncherDLLParser::ReadUint32L( RFile& aFile )
+    {
+    TBuf8<4> tempBuf;    
+    User::LeaveIfError(aFile.Read(tempBuf, 4));
+    const TUint8* ptr = tempBuf.Ptr();    
+    return TUint32(ptr[0] | (ptr[1]<<8) | (ptr[2]<<16) | (ptr[3]<<24));    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/src/launcherengine.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1665 @@
+/*
+* 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 <coemain.h>
+#include <eikenv.h>
+#include <pathinfo.h> 
+#include <apgtask.h>
+#include <bautils.h>
+ 
+#include "launchertraces.h"
+#include "e32image.h"
+#include "launcherxmlparser.h"
+#include "launcherdllparser.h"
+#include "launcherengine.h"
+
+_LIT(KLogFileName, "LauncherLog.txt");
+_LIT(KBCLogFileName, "LauncherBCLog.txt");
+_LIT(KSystemDllsFileName, "SystemDlls.txt");
+_LIT(KRequiredDllsFileName, "RequiredDlls.xml");
+_LIT(KDotXML,".xml");
+_LIT(KDotLauncherXML,".launcherxml");
+
+_LIT(KFileSeparator, "\t");
+_LIT(KFileNewLine, "\r\n");
+
+_LIT(KNewLine, "\n");
+
+const TInt KMaxAppsArraySize=250;
+const TInt KMaxDllArraySize=5000;
+const TInt KLauncherLogBufferSize = 4096;
+
+// After this many issues, issues are buffered and printed 
+// in the end of analysis
+const TInt KBigBufferUsageThreshold=10;
+
+// Buffer allocation unit
+const TInt KBigBufferAllocBytes=1024;
+
+// ---------------------------------------------------------------------------
+
+CLauncherEngine* CLauncherEngine::NewL(MLauncherUI *aLauncherUI)
+    {
+    CLauncherEngine* self = new(ELeave) CLauncherEngine;
+    CleanupStack::PushL(self);
+    self->ConstructL(aLauncherUI);
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherEngine::CLauncherEngine() : CActive(EActivePriorityIpcEventsHigh)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+
+template <typename T>
+void AppendLogBufferL(const TDesC& aText, T*& aBuf, TInt aIncreaseStep = KLauncherLogBufferSize)
+    {
+    if( aBuf == 0 )
+        {
+        aBuf = T::NewL(aIncreaseStep);
+        }
+    
+    TInt currentMaxLength = aBuf->Des().MaxLength();
+    if( aBuf->Des().Length() + aText.Length() > currentMaxLength )
+        {
+        TInt increaseSize = Max(aText.Length(), aIncreaseStep);                
+        aBuf = aBuf->ReAllocL(aBuf->Des().MaxLength() + increaseSize );
+        }
+    aBuf->Des().Append(aText);        
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::ConstructL(MLauncherUI *aLauncherUI)
+    {
+    LOGSTRING("Launcher: CLauncherEngine::ConstructL");
+    
+    User::LeaveIfNull( aLauncherUI );
+    
+    iLauncherUI = aLauncherUI;
+    
+
+    iEnv = CEikonEnv::Static();
+    iLaunchingIsActive = EFalse;
+    iDLLAnalysisIsActive = EFalse;
+    iSkipHiddenAndEmbedOnly = ETrue;
+
+    User::LeaveIfError(iTimer.CreateLocal());
+
+    User::LeaveIfError(iLs.Connect());
+    User::LeaveIfError(iWs.Connect());
+
+    iAppThreadChecker = CAppThreadChecker::NewL(this);
+    iAppRunningChecker = CAppRunningChecker::NewL(this);
+
+    iAllAppsArray = new(ELeave) CDesCArrayFlat(KMaxAppsArraySize);
+    iAppsArray = new(ELeave) CDesCArrayFlat(KMaxAppsArraySize);
+    iSystemDllArray = new(ELeave) CDesCArrayFlat(KMaxDllArraySize);
+
+    iLogWriteBuf = HBufC8::NewL(KLauncherLogBufferSize);
+
+    iLogFilePath = PathInfo::PhoneMemoryRootPath();
+    iLogFilePath.Append( KLogFileName );
+    
+    iBCLogFilePath = PathInfo::PhoneMemoryRootPath();
+    iBCLogFilePath.Append( KBCLogFileName );
+
+    iSystemDllsFilePath = PathInfo::PhoneMemoryRootPath();
+    iSystemDllsFilePath.Append( KSystemDllsFileName );
+
+    iRequiredDllsFilePath = PathInfo::PhoneMemoryRootPath();
+    iRequiredDllsFilePath.Append( KRequiredDllsFileName );
+            
+    iDLLParser = CLauncherDLLParser::NewL();
+
+    CActiveScheduler::Add(this);
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherEngine::~CLauncherEngine()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::~CLauncherEngine");
+
+    Cancel();
+
+    // close the log
+    iLogFile.Close();
+    iBCLogFile.Close();
+    if (iLogWriteBuf)
+        delete iLogWriteBuf;
+
+    if (iAppRunningChecker)
+        delete iAppRunningChecker;
+    
+    if (iAppThreadChecker)
+        delete iAppThreadChecker;
+
+    if (iSystemDllArray)
+        {
+        iSystemDllArray->Reset();
+        delete iSystemDllArray;
+        }
+
+    if (iAppsArray)
+        {
+        iAppsArray->Reset();
+        delete iAppsArray;
+        }
+
+    
+    if (iAllAppsArray)
+        {
+        iAllAppsArray->Reset();
+        delete iAllAppsArray;
+        }
+    
+    delete iXMLParser;
+   // delete iDLLParser;
+    //delete iDLLElement;
+    delete iBCIssuesBigBuffer;            
+    
+    iWs.Close();
+    iLs.Close();
+    iTimer.Close();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::DoCancel()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::DoCancel");
+    
+    if( iXMLParser )
+        {
+        iXMLParser->Cancel();
+        }
+    iTimer.Cancel();
+    
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::RunL()
+    {
+    
+    LOGSTRING("Launcher: CLauncherEngine::RunL");  
+    TInt err = iStatus.Int();
+    User::LeaveIfError(err);
+    
+    // write full app path to the log file
+    WriteInitialStuffToTheLogL(iAppsArray->MdcaPoint(iAppLaunchCounter), iLogFile);
+
+    // get the uid of the current app
+    iCurrentAppUid = KNullUid;
+    TApaAppInfo appInfo;
+    iLs.GetAllApps();
+    while (iLs.GetNextApp(appInfo) == KErrNone)
+        {
+        if (appInfo.iFullName.CompareF( iAppsArray->MdcaPoint(iAppLaunchCounter) ) == 0)
+            {
+            iCurrentAppUid = appInfo.iUid;
+            break;
+            }
+        }
+
+    if (iCurrentAppUid == KNullUid)
+        {        
+        iLogWriteBuf->Des().Append(_L("[WARN: App has no UID] "));
+        }
+
+    // parse the filename
+    TParse nameParser;
+    nameParser.SetNoWild(iAppsArray->MdcaPoint(iAppLaunchCounter), NULL, NULL);
+    iCurrentAppNameAndExt.Copy(nameParser.Drive());
+    iCurrentAppNameAndExt.Append(nameParser.NameAndExt());
+
+    // do not try to launch these apps
+    if (iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\Launcher.")) != KErrNotFound
+        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\Phone.")) != KErrNotFound
+        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\Startup.")) != KErrNotFound  
+        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\SplashScreen.")) != KErrNotFound  
+        || iAppsArray->MdcaPoint(iAppLaunchCounter).FindF(_L("\\eshell.")) != KErrNotFound)  
+        {
+
+        iLauncherUI->PrintText(iCurrentAppNameAndExt);
+        iLauncherUI->PrintText(_L(": SKIPPED automatically\n"));
+        
+        iLogWriteBuf->Des().Append(_L("[SKIPPED automatically] "));
+        iLogWriteBuf->Des().Append(KFileNewLine);
+        iLogFile.Write(iLogWriteBuf->Des());
+
+        iSkippedCases++;
+        CheckForMoreAppsL();
+        }
+
+    else
+        {
+
+        // dependency check not needed if the app is in the ROM/ROFS, because they'll be checked automatically
+        // when the rom image is built
+        
+        if (iCurrentAppNameAndExt[0] != 'Z' && iCurrentAppNameAndExt[0] != 'z')
+            {
+
+            if (iCurrentAppNameAndExt[2] == '[')  // this is quite likely a Java application, no dependency test needed 
+                {
+                iLogWriteBuf->Des().Append(_L("[Dependency check not done] "));
+                }
+            else
+                {  // otherwise check depencies
+            
+                #ifdef __WINS__
+                
+                    // emulator not supported
+
+                #else
+
+                    // ELF binaries
+
+                    CDesCArray* missingDllArray = NULL;
+
+                    TRAPD(err, missingDllArray = DependencyCheckForE32ImageL());
+
+                    // some error happened while processing the E32 image
+                    if (err != KErrNone)
+                        {
+
+                        iLauncherUI->PrintText(iCurrentAppNameAndExt);
+                        iLauncherUI->PrintText(_L(": unable to read import table!\n"));
+                        
+                        iLogWriteBuf->Des().Append(_L("[Unable to read import table!] "));
+                        }
+
+                    // print missing dependencies
+                    else if (err==KErrNone && missingDllArray)
+                        {
+                        if (missingDllArray->MdcaCount() > 0)
+                            {
+                            iLauncherUI->PrintText(iCurrentAppNameAndExt);
+                            iLauncherUI->PrintText(_L(": missing dependencies: "));
+                            
+                            iLogWriteBuf->Des().Append(_L("[Missing dependencies: "));
+
+                            for (TInt k=0; k<missingDllArray->MdcaCount(); k++)
+                                {
+                                iLauncherUI->PrintText(missingDllArray->MdcaPoint(k));
+                                iLauncherUI->PrintText(_L(" "));
+                                
+                                iLogWriteBuf->Des().Append(missingDllArray->MdcaPoint(k));
+                                iLogWriteBuf->Des().Append(_L(" "));
+                                }
+
+                            iLauncherUI->PrintText(_L("\n"));
+
+                            iLogWriteBuf->Des().Append(_L("] "));
+                            }
+                        }
+
+                    if (missingDllArray)
+                        delete missingDllArray;
+
+                #endif
+
+                }  // if '['
+            }  // if 'Z'
+
+
+
+        // check if the app is already running
+        TApaTaskList taskList(iWs);
+        TApaTask thisTask = taskList.FindApp(iCurrentAppUid);
+        if (thisTask.Exists())
+            {
+            iLogWriteBuf->Des().Append(_L(" [OK: App already running]"));
+            iLogWriteBuf->Des().Append(KFileNewLine);
+            iLogFile.Write(iLogWriteBuf->Des());
+
+            iOkCases++;
+            CheckForMoreAppsL();
+            }
+        
+        else
+            {
+            // check the program's capabilities
+            TApaAppCapabilityBuf buf;
+            iLs.GetAppCapability(buf, iCurrentAppUid);
+            TApaAppCapability cap = buf();
+
+            // if it's embeddable only, don't launch if setting is enabled
+            if (cap.iEmbeddability == TApaAppCapability::EEmbeddableOnly && SkipHiddenAndEmbedOnly())  
+                {
+              
+                iLauncherUI->PrintText(iCurrentAppNameAndExt);
+                iLauncherUI->PrintText(_L(": SKIPPED: embeddable only\n"));
+
+                iLogWriteBuf->Des().Append(_L("[SKIPPED: embeddable only] "));
+                iLogWriteBuf->Des().Append(KFileNewLine);
+                iLogFile.Write(iLogWriteBuf->Des());
+
+                iSkippedCases++;
+                CheckForMoreAppsL();
+                }
+        
+            // if it's hidden, don't launch if setting is enabled
+            else if (cap.iAppIsHidden && SkipHiddenAndEmbedOnly())  
+                {
+                
+                iLauncherUI->PrintText(iCurrentAppNameAndExt);
+                iLauncherUI->PrintText(_L(": SKIPPED: hidden\n"));
+                
+                iLogWriteBuf->Des().Append(_L("[SKIPPED: hidden] "));
+                iLogWriteBuf->Des().Append(KFileNewLine);
+                iLogFile.Write(iLogWriteBuf->Des());
+
+                iSkippedCases++;
+                CheckForMoreAppsL();
+                }
+
+            // otherwise do the normal launch test
+            else
+                {
+                LaunchApplicationL();
+                }
+            
+            } //if (thisTask.Exists())
+        
+        } //if (iAppsArray->MdcaPoint(iAppLaunchCounter).FindF
+        
+    }
+
+// ---------------------------------------------------------------------------
+
+CDesCArray* CLauncherEngine::ListOfAllAppsL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::ListOfAllAppsL");
+
+    // find all DLLs from the system
+    iSystemDllArray->Reset();
+    TRAP_IGNORE( FindFiles(_L("*.dll"), _L("\\sys\\bin\\")) );
+
+    // write the list of DLLs to a file
+    RFile dllFile;
+    if (dllFile.Replace(iEnv->FsSession(), iSystemDllsFilePath, EFileWrite) == KErrNone)
+        {
+        TBuf8<KMaxFileName> dllName;
+
+        for (TInt i=0; i<iSystemDllArray->MdcaCount(); i++)
+            {
+            dllName.Copy( iSystemDllArray->MdcaPoint(i) );
+            dllName.Append( KFileNewLine );
+
+            dllFile.Write( dllName );
+            }
+
+        dllFile.Close();
+        }
+
+    // reset the apps list
+    iAllAppsArray->Reset();
+
+    // search all apps
+    TApaAppInfo appInfo;
+    iLs.GetAllApps();
+
+    while (iLs.GetNextApp(appInfo) == KErrNone)
+        {
+        iAllAppsArray->AppendL(appInfo.iFullName);
+        }
+
+
+    // remove launcher.app / launcher.exe from the list
+    for (TInt i=0; i<iAllAppsArray->MdcaCount(); i++)
+        {
+        if (iAllAppsArray->MdcaPoint(i).FindF(_L("\\Launcher.")) != KErrNotFound)
+            {
+            iAllAppsArray->Delete(i);
+            iAllAppsArray->Compress();
+            break;
+            }
+        }
+
+    // sort the elements
+    iAllAppsArray->Sort();
+
+    return iAllAppsArray;
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CLauncherEngine::FindFiles(const TDesC& aFileName, const TDesC& aPath)
+    {
+    TFindFile fileFinder(iEnv->FsSession());
+    CDir* fileList; 
+    TInt err = fileFinder.FindWildByDir(aFileName, aPath, fileList);
+
+    while (err == KErrNone)
+        {
+        for (TInt i=0; i<fileList->Count(); i++)
+            {
+            TParse fullentry;
+            fullentry.Set((*fileList)[i].iName, &fileFinder.File(), NULL);
+
+            TRAP(err, iSystemDllArray->AppendL(fullentry.NameAndExt())); 
+            }
+
+        delete fileList;
+        err = fileFinder.FindWild(fileList);
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+
+
+void CLauncherEngine::StartAppLaunchingL(const CArrayFix<TInt>* aSelectedApps, TBool aAutoClose)
+    {
+    LOGSTRING("Launcher: CLauncherEngine::StartAppLaunchingL");
+
+    // check that we have something to launch
+    if (aSelectedApps->Count() <= 0)
+        {
+        _LIT(message, "Nothing selected");
+        iLauncherUI->ShowErrorMessage(message);
+        }
+    else
+        {
+        // update the list of applications to be tested
+        iAppsArray->Reset();
+
+        TInt ref(0);
+        TKeyArrayFix key(0, ECmpTUint16);
+        TInt index(0);
+
+        for (TInt i=0; i<iAllAppsArray->MdcaCount(); i++)
+            {
+            ref = i;
+
+            // if the application is selected, append it to the apps array
+            if (aSelectedApps->Find(ref, key, index) == 0)  
+                {
+                iAppsArray->AppendL(iAllAppsArray->MdcaPoint(i));
+                }
+            }
+
+
+        // to make sure that our algorithm works correctly
+        if (iAppsArray->MdcaCount() != aSelectedApps->Count())
+            {
+            _LIT(message, "Something went wrong...");
+            iLauncherUI->ShowErrorMessage(message);
+            }
+
+        
+        // init
+        Cancel();
+        iLaunchingIsActive = ETrue;
+        iAutoClose = aAutoClose;
+        iAppLaunchCounter = 0;
+        iFailedCases = 0;
+        iOkCases = 0;
+        iSkippedCases = 0;
+        iTotalNumberOfCases = iAppsArray->MdcaCount();
+        iCurrentAppUid = KNullUid;
+
+        // open the log file for writing
+        if (iLogFile.Open(iEnv->FsSession(), iLogFilePath, EFileWrite) != KErrNone)
+            {
+            iEnv->FsSession().MkDirAll(iLogFilePath);
+            iLogFile.Replace(iEnv->FsSession(), iLogFilePath, EFileWrite);
+            }
+        else
+            {
+            // file opens correctly, seek to the end
+            TInt fileSize=0;
+            iLogFile.Size(fileSize);
+            iLogFile.Seek(ESeekCurrent, fileSize);
+            }
+
+        // change focus to output view!!
+        iLauncherUI->ChangeFocusToOutputView();
+
+        //text to log
+        iLauncherUI->PrintText(_L("New test started.\n"));
+
+        // start the first launch!
+        IssueLaunch();
+
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::IssueLaunch()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::IssueLaunch");
+
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("Timing error?"), 100));
+
+    // this should keep the backlight on
+    User::ResetInactivityTime();
+
+    iDLLAnalysisIsActive = EFalse;
+    // some delay
+    iTimer.After(iStatus, 1000000);    
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::WriteInitialStuffToTheLogL(const TDesC& aOwnData, RFile& aFile)
+    {
+    LOGSTRING("Launcher: CLauncherEngine::WriteInitialStuffToTheLog");
+
+    TTime time;
+    time.HomeTime();
+    TBuf<32> currentTime;
+    TBuf<32> currentDate;
+
+    // current date            
+    _LIT(KCurrentDate,"%D%M%Y%/0%1%/1%2%/2%3%/3");
+    time.FormatL(currentDate, KCurrentDate);    
+    iLogWriteBuf->Des().Copy(currentDate);    
+    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
+
+    // current time
+    _LIT(KCurrentTime,"%-B%:0%J%:1%T%:2%S%:3%+B");
+    time.FormatL(currentTime, KCurrentTime);    
+    AppendLogBufferL(currentTime, iLogWriteBuf);
+    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
+
+    // available RAM memory
+    TMemoryInfoV1Buf memory;
+    UserHal::MemoryInfo(memory);
+    iLogWriteBuf->Des().AppendNum(memory().iFreeRamInBytes);  
+    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
+
+    // own data, eg. application name
+    AppendLogBufferL(aOwnData, iLogWriteBuf);
+    AppendLogBufferL(KFileSeparator(), iLogWriteBuf);
+    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);    
+
+    // write the buffer to the file
+    aFile.Write(iLogWriteBuf->Des()); 
+
+    // clear the buffer
+    iLogWriteBuf->Des().Copy(_L(""));
+    }
+
+// ---------------------------------------------------------------------------
+
+
+void CLauncherEngine::CheckForMoreAppsL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::CheckForMoreAppsL");
+
+    // make sure the launcher app is in the foreground
+    TApaTaskList taskList(iWs);
+    TUid launcherAppUid;
+    launcherAppUid.iUid = 0x101FB74F;
+    TApaTask launcherTask = taskList.FindApp(launcherAppUid);
+    launcherTask.BringToForeground();
+
+
+    // check if we have more test to be executed
+    if ( iAppLaunchCounter >= iTotalNumberOfCases-1 )
+        {
+        
+        // all done, show stats
+        TBuf<200> message;
+        message.Append( _L("Done: ") );
+        message.AppendNum( iOkCases );
+        message.Append( _L(" ok, ") );
+        message.AppendNum( iFailedCases );
+        message.Append( _L(" failed, ") );
+        message.AppendNum( iSkippedCases );
+        message.Append( _L(" skipped.") );
+
+        // print the message to the output screen
+        iLauncherUI->PrintText(message);
+        iLauncherUI->PrintText(_L("\n\n"));
+        
+        //write same stuff to the log
+        WriteInitialStuffToTheLogL(message, iLogFile);
+        iLogWriteBuf->Des().Copy(KFileNewLine);
+        iLogWriteBuf->Des().Append(KFileNewLine);        
+        iLogFile.Write(iLogWriteBuf->Des());
+
+        // close the log
+        iLogFile.Close();
+
+        iLaunchingIsActive = EFalse;
+
+        // all apps launched
+        _LIT(KAllDoneMessage, "All apps launched");
+        iLauncherUI->ShowInfoMessage(KAllDoneMessage);
+        }
+    else
+        {
+        // more apps to be launched, maintain requests
+        iAppLaunchCounter++;
+        IssueLaunch();
+        }
+  
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::LaunchApplicationL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::LaunchApplication");
+    LOGSTRING3("Launcher: Trying to launch %S, UID: %d", &iCurrentAppNameAndExt, iCurrentAppUid.iUid);
+
+    TRAPD(err, DoLaunchApplicationL());
+    
+    if (err!=KErrNone)
+        {
+        iLogWriteBuf->Des().Append(_L("[FAIL: Cannot launch the app] "));        
+       
+        iLauncherUI->PrintText(iCurrentAppNameAndExt);
+        iLauncherUI->PrintText(_L(": cannot launch\n"));
+        
+        // write the buffer to the log
+        iLogWriteBuf->Des().Append(KFileNewLine);        
+        iLogFile.Write(iLogWriteBuf->Des());
+
+        // this application isn't even launchable, go to next one
+        iFailedCases++;
+        CheckForMoreAppsL();        
+        }
+    
+    }
+// ---------------------------------------------------------------------------
+
+
+void CLauncherEngine::DoLaunchApplicationL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::DoLaunchApplicationL");
+
+    // create a new handle
+    RThread newThreadHandle;
+    iCurrentAppThread = newThreadHandle;
+
+
+    // Find the task with uid3
+    TApaTaskList tasklist(iWs);
+    TApaTask task=tasklist.FindApp(iCurrentAppUid);
+
+    if (task.Exists())
+        // Task exists, bring it to foreground
+        {
+        task.BringToForeground();
+        }
+    else
+        // Task doesn't exist, launch a new instance of an application
+        {
+        TApaAppInfo appInfo;
+        User::LeaveIfError(iLs.GetAppInfo(appInfo, iCurrentAppUid));
+        TApaAppCapabilityBuf capBuf;
+        User::LeaveIfError(iLs.GetAppCapability(capBuf, iCurrentAppUid));
+        TApaAppCapability& caps = capBuf();
+
+        CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
+        cmdLine->SetExecutableNameL(appInfo.iFullName);
+
+        if ( caps.iLaunchInBackground )
+            // Apps capability defines that the app is launched in background
+            {
+            cmdLine->SetCommandL(EApaCommandBackground);
+            }
+        else
+            {
+            cmdLine->SetCommandL(EApaCommandRun);
+            }
+
+        // start the app
+        User::LeaveIfError(iLs.StartApp(*cmdLine, iCurrentAppThreadId));
+
+        // activate thread checker active object
+        iAppThreadChecker->ActivateChecking();
+
+        // now open a handle to the thread and register death notifier
+        TInt err = iCurrentAppThread.Open(iCurrentAppThreadId);
+        if (err == KErrNone)
+            iCurrentAppThread.Logon(iAppThreadChecker->iStatus);
+        else
+            {
+            iCurrentAppThread.Close();
+            TRequestStatus* status = &iAppThreadChecker->iStatus;
+            User::RequestComplete(status, KErrNone);
+            iAppThreadChecker->Cancel();
+            User::Leave(err);                
+            }
+
+        CleanupStack::PopAndDestroy(); // cmdLine
+        }
+
+    // the application is now running, start a check to see if it's still alive
+    iAppRunningChecker->StartTesting(); 
+
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::CheckIfAppIsRunningL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::CheckIfAppIsRunningL");
+
+    // cancel the death notifier since it isn't needed anymore
+    if( iCurrentAppThread.Handle() != 0 )
+        {
+        iCurrentAppThread.LogonCancel(iAppThreadChecker->iStatus);
+        }
+
+    // cancel checkers
+    iAppThreadChecker->Cancel();
+    iAppRunningChecker->Cancel(); 
+
+
+
+    // check from the window server if the app is running
+    TApaTaskList taskList(iWs);
+    TApaTask thisTask = taskList.FindApp(iCurrentAppUid);
+
+    if( !thisTask.Exists() ) // application not running -> FAIL
+        {
+        // check from the thread why it quit
+        CheckWhyThreadDiedL();
+
+        // --> CheckForMoreApps() and all the other stuff called from CheckWhyThreadDied() !
+
+        }
+    else
+        {
+        // app is running!
+        iOkCases++;
+
+        // close handle to the thread        
+        iCurrentAppThread.Close();
+
+
+        iLogWriteBuf->Des().Append(_L(" [OK]"));
+        iLogWriteBuf->Des().Append(KFileNewLine);        
+        iLogFile.Write(iLogWriteBuf->Des());
+
+
+        // close the running application if needed
+        if (iAutoClose)
+            {
+            // since the application is still open, let's close it
+            thisTask.EndTask();
+            //User::After(1000);
+            //thisTask.SendSystemEvent(EApaSystemEventShutdown);
+            //thisTask.KillTask();
+            //User::After(1000);
+            }
+
+        // this app is done now, move to the next one!
+        CheckForMoreAppsL();
+                
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::CheckWhyThreadDiedL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::CheckWhyThreadDiedL");
+
+    // cancel the death notifier since it isn't needed anymore
+    if( iCurrentAppThread.Handle() != 0 )
+        {
+        iCurrentAppThread.LogonCancel(iAppThreadChecker->iStatus);
+        }
+
+    // make sure all checkers are cancelled
+    iAppRunningChecker->Cancel(); 
+    iAppThreadChecker->Cancel(); 
+
+    TBuf<256> outputText;
+    outputText.Append(_L("App.Closed. "));
+
+
+    if (iCurrentAppThread.ExitType() == EExitKill)
+        {
+        outputText.Append(_L("\"EExitKill\""));
+        }
+    else if (iCurrentAppThread.ExitType() == EExitTerminate)
+        {
+        outputText.Append(_L("\"EExitTerminate\""));
+        }
+    else if (iCurrentAppThread.ExitType() == EExitPanic)
+        {
+        outputText.Append(_L("\"EExitPanic\""));
+        }
+    else if (iCurrentAppThread.ExitType() == EExitPending)
+        {
+        outputText.Append(_L("\"EExitPending\""));
+        }
+    else // unknown reason
+        {
+        outputText.Append(_L("\"Exit_Unknown_Reason\""));
+        }        
+    
+    outputText.Append(_L(" code:"));
+    TInt exitReason = iCurrentAppThread.ExitReason();
+    outputText.AppendNum(exitReason);
+    outputText.Append(_L(" \""));
+
+    TPtrC exitCategory = iCurrentAppThread.ExitCategory();
+    outputText.Append(exitCategory);
+
+    outputText.Append(_L("\""));
+
+
+    // print to screen
+    iLauncherUI->PrintText(iCurrentAppNameAndExt);
+    iLauncherUI->PrintText(_L(": "));
+    iLauncherUI->PrintText(outputText);
+    iLauncherUI->PrintText(_L("\n"));
+    
+    // write to the log also
+    iLogWriteBuf->Des().Append(_L(" [FAIL: "));
+    iLogWriteBuf->Des().Append(outputText);
+    iLogWriteBuf->Des().Append(_L("]"));
+    iLogWriteBuf->Des().Append(KFileNewLine);
+    
+    iLogFile.Write(iLogWriteBuf->Des());
+
+    // close handle to the thread
+    //iCurrentAppThread.Close();    <-- not safe the close the handle because of the "App.Closed" dialog
+    //                                  somehow takes ownership of the thread or something
+
+    // nothing to do anymore, move to the next app
+    iFailedCases++;
+    CheckForMoreAppsL();
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+
+CDesCArray* CLauncherEngine::DependencyCheckForE32ImageL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::DependencyCheckForE32ImageL");
+
+    // create an empty array for the missing dll names
+    CDesCArray* missingDllArray = new(ELeave) CDesCArrayFlat(100);
+    CleanupStack::PushL(missingDllArray);
+
+    // get a list of DLLs from the E32 image file
+    E32ImageReader* reader = E32ImageReader::NewLC();
+    CDesCArray* dllArray = reader->ListOfDLLsL( iAppsArray->MdcaPoint(iAppLaunchCounter) );
+    CleanupStack::PopAndDestroy(); // reader
+    CleanupStack::PushL(dllArray);
+
+    // compare system DLL and image DLL arrays
+    TInt pos(0);
+    for (TInt j=0; j<dllArray->MdcaCount(); j++)
+        {
+        if (iSystemDllArray->Find(dllArray->MdcaPoint(j), pos, ECmpFolded) != 0)  
+            {
+            // DLL not found, append the name to the list of missing DLLs
+            missingDllArray->AppendL(dllArray->MdcaPoint(j));  
+            }
+        }
+
+    CleanupStack::PopAndDestroy(); // dllArray
+    CleanupStack::Pop();  // missingDllArray
+
+    LOGSTRING("Launcher: CLauncherEngine::DependencyCheckForE32ImageL returns");
+
+    return missingDllArray;
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CLauncherEngine::DeleteLogFile()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::DeleteLogFile");
+    return BaflUtils::DeleteFile(iEnv->FsSession(), iLogFilePath);
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::StopLaunchingL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::StopLaunchingL");
+    if(iLaunchingIsActive)
+        {
+        //write to the log
+        WriteInitialStuffToTheLogL(_L("Cancelled by the user !!! "), iLogFile);
+        iLogWriteBuf->Des().Copy(KFileNewLine);
+        iLogWriteBuf->Des().Append(KFileNewLine);
+        iLogFile.Write(iLogWriteBuf->Des());
+    
+        // close the log
+        iLogFile.Close();
+    
+        // print to the screen
+        iLauncherUI->PrintText(_L("Launching cancelled.\n\n"));
+    
+        // cancel all active objects
+        if( iCurrentAppThread.Handle() != 0 )
+            {
+            iCurrentAppThread.LogonCancel(iAppThreadChecker->iStatus);
+            }
+        Cancel();
+        iAppRunningChecker->Cancel(); 
+        iAppThreadChecker->Cancel(); 
+        
+        iLaunchingIsActive = EFalse;
+    
+        _LIT(KMessage, "Launching cancelled");
+        iLauncherUI->ShowInfoMessage(KMessage);
+
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+TBool CLauncherEngine::LogFileExists()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::LogFileExists");
+    return BaflUtils::FileExists(iEnv->FsSession(), iLogFilePath);
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CLauncherEngine::DeleteBCLogFile()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::DeleteBCLogFile");
+    return BaflUtils::DeleteFile(iEnv->FsSession(), iBCLogFilePath);
+    }
+
+
+// ---------------------------------------------------------------------------
+
+TBool CLauncherEngine::BCLogFileExists()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::BCLogFileExists");
+    return BaflUtils::FileExists(iEnv->FsSession(), iBCLogFilePath);
+    }
+
+// ---------------------------------------------------------------------------
+void CLauncherEngine::AnalyseDLLsL( const TDesC& aFileName )
+    {
+    LOGSTRING("Launcher: CLauncherEngine::AnalyseDLLsL");
+    _LIT(KStartSeparator, "******************************");
+    _LIT(KStartingAnalysis, "Starting BC Analysis for DLLs.");    
+    _LIT(KInputFileSelected, "Input file selected: ");
+    
+    // Reset found issues counter and buffer
+    iFoundBCIssues = 0;    
+    delete iBCIssuesBigBuffer;
+    iBCIssuesBigBuffer = 0;
+    
+    // Reset log writing buffer:
+    iLogWriteBuf->Des().Zero();
+                
+    if( IsActive() )
+        {
+        Cancel();
+        }   
+    
+    iRequiredDllsFilePath = aFileName;
+    
+    if( BaflUtils::FileExists(iEnv->FsSession(), iRequiredDllsFilePath) == EFalse )
+        {
+        LOGSTRING2("Launcher: CLauncherEngine::AnalyseDLLsL - can't find input file: %S", &iRequiredDllsFilePath);
+        User::Leave( KErrNotFound );
+        }
+    
+    // open the log file for writing
+    if (iBCLogFile.Open(iEnv->FsSession(), iBCLogFilePath, EFileWrite) != KErrNone)
+        {
+        iEnv->FsSession().MkDirAll(iLogFilePath);
+        User::LeaveIfError( iBCLogFile.Replace(iEnv->FsSession(), iBCLogFilePath, EFileWrite) );
+        }
+    else
+        {
+        // file opens correctly, seek to the end
+        TInt fileSize=0;
+        iBCLogFile.Size(fileSize);
+        iBCLogFile.Seek(ESeekCurrent, fileSize);
+        }
+    
+    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+    AppendLogBufferL(KStartSeparator(), iLogWriteBuf);
+    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+    iBCLogFile.Write(iLogWriteBuf->Des());
+    iLogWriteBuf->Des().Zero();
+    
+    // Resolve file type. Should we use XML parsing or just compare DLL list
+    TBool xmlParsing =
+        KDotXML().Compare(iRequiredDllsFilePath.Right(KDotXML().Length())) == 0 ||
+        KDotLauncherXML().Compare(iRequiredDllsFilePath.Right(KDotLauncherXML().Length())) == 0;
+    
+    // Log analysis starting time and selected input file:
+    WriteInitialStuffToTheLogL(KStartingAnalysis, iBCLogFile);    
+    AppendLogBufferL(KInputFileSelected(), iLogWriteBuf);
+    AppendLogBufferL(iRequiredDllsFilePath, iLogWriteBuf);
+    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+    iBCLogFile.Write(iLogWriteBuf->Des());
+    iLogWriteBuf->Des().Zero();
+    
+    if( xmlParsing )
+        {
+        iLauncherUI->ChangeFocusToOutputView();
+        DoBCAnalysisL();
+        }
+    else
+        {
+        DoCompareDLLListsL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::DoBCAnalysisL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::DoBCAnalysisL");
+    if( iXMLParser == 0 )
+        {
+        iXMLParser = CLauncherXMLParser::NewL(iEnv->FsSession());
+        }
+    
+    TEntry entry;
+    User::LeaveIfError(iEnv->FsSession().Entry(iRequiredDllsFilePath, entry));
+    TInt fileSize = entry.iSize;
+    
+    _LIT(KAnalysing,"Analysing DLLs");
+    iLauncherUI->ShowProgressBar(KAnalysing, 0, fileSize);
+    iDLLAnalysisIsActive = ETrue;
+    
+    iXMLParser->ParseL(iRequiredDllsFilePath, this);
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::CancelBCAnalysis()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::CancelBCAnalysis");
+    if( iXMLParser )
+        {
+        iXMLParser->Cancel();
+        }
+    iLauncherUI->PrintText(_L("\nAnalysis cancelled.\n\n"));
+    WriteInitialStuffToTheLogL(_L("Analysis cancelled by user"), iBCLogFile);
+    iLogWriteBuf->Des().Zero();
+    iBCLogFile.Close();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::DoCompareDLLListsL()
+    {
+    LOGSTRING("Launcher: CLauncherEngine::DoCompareDLLListsL");
+    
+    RFile file;
+    CleanupClosePushL(file);
+        
+    // Show progress bar 
+    _LIT(KAnalysing,"Analysing DLLs");
+    iLauncherUI->ShowWaitDialog(KAnalysing);
+
+    if(file.Open(iEnv->FsSession(), iRequiredDllsFilePath, EFileRead) != KErrNone)
+        {
+        // Hide wait dialog  
+        iLauncherUI->HideWaitDialog();
+        
+        iLauncherUI->ChangeFocusToOutputView();
+
+        TBuf<200> msg;
+
+        
+        msg.Format(_L("Unable to open %S for reading!\n\n"), &iRequiredDllsFilePath);
+        iLauncherUI->PrintText( msg );
+        }
+    else
+        {
+        
+        CDesCArray* requiredDllArray = new(ELeave) CDesCArrayFlat(KMaxDllArraySize);
+        CleanupStack::PushL(requiredDllArray);
+
+        // read all lines the text file
+        TFileName dllName;
+        TInt i(0);
+        while( ReadLineFromFileL(file, dllName) == KErrNone && i<KMaxDllArraySize )
+            {
+            dllName.TrimAll();
+
+            if (dllName.Length() > 1)
+                requiredDllArray->AppendL(dllName);
+            
+            i++;
+            }
+
+        if (requiredDllArray->MdcaCount() == 0)
+            {
+            // Hide wait dialog  
+            iLauncherUI->HideWaitDialog();
+            
+            iLauncherUI->ChangeFocusToOutputView();
+
+            TBuf<200> msg;
+            msg.Format(_L("File %S is empty!\n\n"), &iRequiredDllsFilePath);
+            iLauncherUI->PrintText( msg );
+            }
+        else
+            {
+            // compare the arrays and print any missing items
+            CDesCArray* missingDllArray = new(ELeave) CDesCArrayFlat(KMaxDllArraySize);
+            CleanupStack::PushL(missingDllArray);
+
+            TInt pos(0);
+            for (TInt j=0; j<requiredDllArray->MdcaCount(); j++)
+                {
+                if (iSystemDllArray->Find(requiredDllArray->MdcaPoint(j), pos, ECmpFolded) != 0)  
+                    {
+                    // DLL not found, append the name to the list of missing DLLs
+                    missingDllArray->AppendL(requiredDllArray->MdcaPoint(j));  
+                    }
+                }
+
+            
+            if (missingDllArray->MdcaCount() == 0)
+                {
+                _LIT(KMessage, "No missing files found");
+                AppendLogBufferL(KMessage(), iLogWriteBuf);
+                iLauncherUI->ShowInfoMessage(KMessage);
+                }
+            else
+                {
+                iLauncherUI->ChangeFocusToOutputView();
+                _LIT(KMissingFiles, "Missing files:\n");
+
+                //iLauncherUI->PrintText( KMissingFiles );
+                AppendLogBufferL(KMissingFiles(), iBCIssuesBigBuffer, KBigBufferAllocBytes);
+                
+                AppendLogBufferL(KMissingFiles(), iLogWriteBuf);
+                
+                for (TInt i=0; i<missingDllArray->MdcaCount(); i++)
+                    {
+                    //iLauncherUI->PrintText( missingDllArray->MdcaPoint(i) );
+                    AppendLogBufferL(missingDllArray->MdcaPoint(i), iBCIssuesBigBuffer, KBigBufferAllocBytes);
+                    //iLauncherUI->PrintText( _L("\n") );         
+                    AppendLogBufferL(KNewLine(), iBCIssuesBigBuffer, KBigBufferAllocBytes);
+                    
+                    AppendLogBufferL(missingDllArray->MdcaPoint(i), iLogWriteBuf);
+                    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+                    }
+                AppendLogBufferL(KNewLine(), iBCIssuesBigBuffer, KBigBufferAllocBytes);
+                iLauncherUI->PrintText( iBCIssuesBigBuffer->Des() );
+                }
+            
+            // Hide wait dialog  
+            iLauncherUI->HideWaitDialog();
+            
+            CleanupStack::PopAndDestroy(); // missingDllArray            
+            }
+
+        CleanupStack::PopAndDestroy(); // requiredDllArray
+        }
+
+    CleanupStack::PopAndDestroy(); //file
+    iBCLogFile.Write(iLogWriteBuf->Des());
+    iLogWriteBuf->Des().Zero();
+    iBCLogFile.Close();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::ParsingProgressedL(TInt aBytes)
+    {
+    LOGSTRING2("Launcher: CLauncherEngine::ParsingProgressedL - Bytes: %d", aBytes);
+    iLauncherUI->SetProgressBarValue(aBytes);
+    }
+
+// ---------------------------------------------------------------------------
+
+
+void CLauncherEngine::ElementParsedL(const CLauncherDLLElement& aDllElement)
+    {
+    LOGSTRING("Launcher: CLauncherEngine::ElementParsedL");
+    User::ResetInactivityTime();
+
+    _LIT(KIndent, "    ");
+    _LIT(KIssuesFound, "Binary compatibility issues found:"); 
+    _LIT(KDLLMissing,"DLL is missing");
+    _LIT(KUID1Changed,"UID1 changed");
+    _LIT(KUID2Changed,"UID2 changed");
+    _LIT(KUID3Changed,"UID3 changed");
+    _LIT(KSIDChanged,"SID changed");
+    _LIT(KCapabilityChanged,"Capability changed");
+    
+    if( iDLLElement == 0 )
+        {
+        iDLLElement = CLauncherDLLElement::NewL();
+        }
+    
+    TFindFile fileFinder(iEnv->FsSession());
+    _LIT(KDLLPath, "\\sys\\bin\\");
+    TInt err = fileFinder.FindByPath(aDllElement.Name(), &KDLLPath); 
+    
+    TBuf<256> issueStr;
+    
+    if( err == KErrNotFound )
+        {
+        if( iFoundBCIssues++ == 0 )
+            {                        
+            iLauncherUI->PrintText( KIssuesFound );
+            iLauncherUI->PrintText( KNewLine );            
+            AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+            AppendLogBufferL(KIssuesFound(), iLogWriteBuf);
+            AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+            }
+        issueStr.Copy(aDllElement.Name());
+        issueStr.Append(KNewLine);
+        issueStr.Append(KIndent);
+        issueStr.Append(KDLLMissing);
+        issueStr.Append(KNewLine);
+                
+        AppendLogBufferL(issueStr, iLogWriteBuf);
+        
+        TFileName dllName = aDllElement.Name();
+        LOGSTRING2("Launcher: DLL not found: %S", &dllName);
+        if( iFoundBCIssues > KBigBufferUsageThreshold )
+            {
+            if( iBCIssuesBigBuffer == 0)
+                {
+                iBCIssuesBigBuffer = HBufC::NewL(KBigBufferAllocBytes);
+                }
+            TInt maxSize = iBCIssuesBigBuffer->Des().Length() + issueStr.Length();
+            if( maxSize >= iBCIssuesBigBuffer->Des().MaxLength())
+                {
+                iBCIssuesBigBuffer = iBCIssuesBigBuffer->ReAllocL(maxSize + KBigBufferAllocBytes );                
+                }
+            TPtr ptr(iBCIssuesBigBuffer->Des());
+            ptr += issueStr;            
+            }
+        else
+            {
+            iLauncherUI->PrintText( issueStr);
+            }
+        }
+    else if( err == KErrNone)
+        {
+        // File is found, so let's try to open it:
+        RFile dllFile;
+        CleanupClosePushL(dllFile);        
+        if( dllFile.Open(iEnv->FsSession(), fileFinder.File(), EFileRead) == KErrNone )
+            {
+            // Parse DLL:
+            iDLLParser->ParseL(iEnv->FsSession(), dllFile, *iDLLElement);
+            CleanupStack::PopAndDestroy(); // dllFile            
+            RArray<CLauncherDLLElement::TDifference> diffs;
+            CleanupClosePushL(diffs);
+                        
+            // Compare DLLs:              
+            if( iDLLElement->CompareL(aDllElement, diffs))
+                {                
+                if( iFoundBCIssues++ == 0 )
+                    {
+                    iLauncherUI->PrintText( KIssuesFound );
+                    iLauncherUI->PrintText( KNewLine );                   
+                    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+                    AppendLogBufferL(KIssuesFound(), iLogWriteBuf);
+                    AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+                    }
+                // Differencies found:
+                for( TInt i = 0; i < diffs.Count(); ++i )
+                    {                
+                    // Print DLL name:
+                    if( i == 0 )
+                        {
+                        issueStr.Copy(aDllElement.Name());
+                        issueStr.Append(KNewLine);
+                        }
+                    
+                    // Print differencies:
+                    issueStr.Append(KIndent);
+                    switch(diffs[i])
+                        {
+                        case CLauncherDLLElement::EDifference_UID1:
+                            issueStr.Append(KUID1Changed);
+                            break;
+                        case CLauncherDLLElement::EDifference_UID2:
+                            issueStr.Append( KUID2Changed );
+                            break;
+                        case CLauncherDLLElement::EDifference_UID3:
+                            issueStr.Append( KUID3Changed );
+                            break;
+                        case CLauncherDLLElement::EDifference_SID:
+                            issueStr.Append( KSIDChanged );
+                            break;
+                        case CLauncherDLLElement::EDifference_Capability:
+                            issueStr.Append( KCapabilityChanged );
+                            break;
+                        }
+                    issueStr.Append( KNewLine );                    
+                    }
+                AppendLogBufferL(issueStr, iLogWriteBuf);
+                if( iFoundBCIssues > KBigBufferUsageThreshold )
+                    {
+                    // To improve performance, don't print issues to output anymore.
+                    // Instead, store the issues in buffer and print them when analysis is done.
+                    if( iBCIssuesBigBuffer == 0)
+                        {
+                        iBCIssuesBigBuffer = HBufC::NewL(KBigBufferAllocBytes);
+                        }
+                    TInt maxSize = iBCIssuesBigBuffer->Des().Length() + issueStr.Length();
+                    if( maxSize >= iBCIssuesBigBuffer->Des().MaxLength())
+                        {
+                        TInt increaseSize = Max(issueStr.Length(), KBigBufferAllocBytes);
+                        iBCIssuesBigBuffer = iBCIssuesBigBuffer->ReAllocL(maxSize + increaseSize );                            
+                        }
+                    TPtr ptr(iBCIssuesBigBuffer->Des());
+                    ptr += issueStr;
+                    }
+                else
+                    {
+                    iLauncherUI->PrintText( issueStr);
+                    }
+                }
+            CleanupStack::Pop(); // diffs
+            diffs.Close();            
+            }
+        else
+            {
+            CleanupStack::PopAndDestroy(); // dllFile
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+void CLauncherEngine::DocumentParsedL(TInt aErrorCode)
+    {            
+    LOGSTRING2("Launcher: CLauncherEngine::DocumentParsedL (Error code: %d)", aErrorCode);
+        
+    iDLLAnalysisIsActive = EFalse;
+    _LIT(KParseError, "Parse error: ");
+    _LIT(KNoIssues, "No binary compatibility issues found");
+    
+    if( IsActive() )
+        {
+        Cancel();
+        }
+     
+    //hide progress bar 
+    iLauncherUI->HideProgressBar();
+
+    if( aErrorCode != KErrNone )
+        {
+        TBuf<16> errorCodeString;
+        errorCodeString.AppendNum(aErrorCode);
+        iLauncherUI->PrintText( KNewLine );
+        iLauncherUI->PrintText( KParseError );
+        iLauncherUI->PrintText( errorCodeString );
+        iLauncherUI->PrintText( KNewLine );        
+        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+        AppendLogBufferL(KParseError(), iLogWriteBuf);
+        AppendLogBufferL(errorCodeString, iLogWriteBuf);
+        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+        }
+    else if(iFoundBCIssues == 0)
+        {
+        iLauncherUI->PrintText( KNoIssues );
+        iLauncherUI->PrintText( KNewLine );        
+        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+        AppendLogBufferL(KNoIssues(), iLogWriteBuf);
+        AppendLogBufferL(KFileNewLine(), iLogWriteBuf);
+        }
+    else if( iBCIssuesBigBuffer && iBCIssuesBigBuffer->Des().Length() > 0 )
+        {
+        iLauncherUI->PrintText(iBCIssuesBigBuffer->Des());
+        delete iBCIssuesBigBuffer;
+        iBCIssuesBigBuffer = 0;
+        }
+    if( iLogWriteBuf->Length() > 0 && iBCLogFile.SubSessionHandle() != 0)
+        {
+        iBCLogFile.Write(iLogWriteBuf->Des());
+        }
+    WriteInitialStuffToTheLogL(_L("Analysis ready"), iBCLogFile);
+    iLogWriteBuf->Des().Zero();
+    iBCLogFile.Close();
+    }
+
+// ---------------------------------------------------------------------------
+
+TInt CLauncherEngine::ReadLineFromFileL(RFile& aFile, TDes& aReadBuf)
+    {
+    LOGSTRING("Launcher: CLauncherEngine::ReadLineFromFile");
+
+    _LIT8(KImcvCRLF, "\r\n");
+    TInt err(KErrNone);
+
+    HBufC8* tempLine = HBufC8::NewLC(1000);
+    TPtr8 buffer = tempLine->Des();
+
+    // clear the target buffer
+    aReadBuf.Zero();
+
+    // get the current file position
+    TInt filePos(0);
+    aFile.Seek(ESeekCurrent, filePos);
+
+    // read the buffer
+    err = aFile.Read(buffer);
+
+    // check if it's the end of file
+    TInt s = buffer.Length();
+    if (s == 0)
+        err = KErrEof;
+
+    if (err == KErrNone)
+        {
+        // copy to the lfcr and then set the file pointer to the point after that
+        TInt pos = buffer.Find(KImcvCRLF);
+        if (pos != -1)
+            {
+            TFileName tempBuf;
+            buffer.SetLength(pos);
+            tempBuf.Copy(buffer);
+            aReadBuf.Justify(tempBuf, pos, ELeft, ' ');
+            filePos += (pos+2);
+
+            // set the file pointer back to after the lfcr
+            aFile.Seek(ESeekStart, filePos);
+            }
+        
+        // else fill the whole buffer
+        else
+            {
+            aReadBuf.Copy(buffer);
+            }
+        }
+
+    CleanupStack::PopAndDestroy(); // tempLine
+    return err;
+    }
+
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+
+
+//////////////////////////////////////////////////////////////////////////////////////
+
+// ---------------------------------------------------------------------------
+
+CAppThreadChecker* CAppThreadChecker::NewL(CLauncherEngine* aLauncherEngine)
+    {
+    LOGSTRING("Launcher: CAppThreadChecker::NewL");
+
+    CAppThreadChecker* self = new(ELeave) CAppThreadChecker;
+    CleanupStack::PushL(self);
+    self->ConstructL(aLauncherEngine);
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CAppThreadChecker::CAppThreadChecker() : CActive(EActivePriorityIpcEventsHigh)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppThreadChecker::ConstructL(CLauncherEngine* aLauncherEngine)
+    {
+    LOGSTRING("Launcher: CAppThreadChecker::ConstructL");
+
+    iEnv = CEikonEnv::Static();
+
+    iLauncherEngine = aLauncherEngine;
+
+    CActiveScheduler::Add(this);
+    }
+
+// ---------------------------------------------------------------------------
+
+CAppThreadChecker::~CAppThreadChecker()
+    {
+    LOGSTRING("Launcher: CAppThreadChecker::~CAppThreadChecker");
+
+    Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppThreadChecker::ActivateChecking()
+    {
+    LOGSTRING("Launcher: CAppThreadChecker::ActivateChecking");
+
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("Thread Checker"), 300));
+
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppThreadChecker::RunL()
+    {
+    LOGSTRING("Launcher: CAppThreadChecker::RunL");
+
+    // check the state of the thread
+    iLauncherEngine->CheckWhyThreadDiedL();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppThreadChecker::DoCancel()
+    {
+    LOGSTRING("Launcher: CAppThreadChecker::DoCancel");
+    }
+
+// ---------------------------------------------------------------------------
+
+
+
+// ---------------------------------------------------------------------------
+
+//////////////////////////////////////////////////////////////////////////////////////
+
+// ---------------------------------------------------------------------------
+
+CAppRunningChecker* CAppRunningChecker::NewL(CLauncherEngine* aLauncherEngine)
+    {
+    LOGSTRING("Launcher: CAppRunningChecker::NewL");
+
+    CAppRunningChecker* self = new(ELeave) CAppRunningChecker;
+    CleanupStack::PushL(self);
+    self->ConstructL(aLauncherEngine);
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CAppRunningChecker::CAppRunningChecker() : CActive(EActivePriorityIpcEventsHigh)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppRunningChecker::ConstructL(CLauncherEngine* aLauncherEngine)
+    {
+    LOGSTRING("Launcher: CAppRunningChecker::ConstructL");
+
+    iEnv = CEikonEnv::Static();
+    User::LeaveIfError(iTimer.CreateLocal());
+
+    iLauncherEngine = aLauncherEngine;
+
+    CActiveScheduler::Add(this);
+    }
+
+// ---------------------------------------------------------------------------
+
+CAppRunningChecker::~CAppRunningChecker()
+    {
+    LOGSTRING("Launcher: CAppRunningChecker::~CAppRunningChecker");
+
+    Cancel();
+
+    iTimer.Close();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppRunningChecker::StartTesting()
+    {
+    LOGSTRING("Launcher: CAppRunningChecker::StartTesting");
+
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("Running Checker"), 200));
+
+    // async delay of seven seconds
+    iTimer.After(iStatus, 7000000);    
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppRunningChecker::RunL()
+    {
+    LOGSTRING("Launcher: CAppRunningChecker::RunL");
+
+    // check if the application is running
+    iLauncherEngine->CheckIfAppIsRunningL();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CAppRunningChecker::DoCancel()
+    {
+    LOGSTRING("Launcher: CAppRunningChecker::DoCancel");
+    iTimer.Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/engine/src/launcherxmlparser.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,430 @@
+/*
+* 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 <f32file.h>
+#include <xml/documentparameters.h>
+#include "launcherxmlparser.h"
+#include "launchertraces.h"
+
+_LIT8(KXmlMimeType, "text/xml");
+
+/**
+ * XML element names
+ */
+_LIT8(KDll, "dll");
+_LIT8(KDllName, "dllname");
+_LIT8(KUID1, "uid1");
+_LIT8(KUID2, "uid2");
+_LIT8(KUID3, "uid3");
+_LIT8(KSID, "sid");
+_LIT8(KCapability, "capability");
+
+// ---------------------------------------------------------------------------
+
+CLauncherXMLParser::CLauncherXMLParser(RFs& aFs)
+:
+CActive( EPriorityIdle ),
+iParser(0),
+iFileSession(aFs),
+iParsedBytes(0)
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::ConstructL()
+    {
+    LOGSTRING("Launcher: CLauncherXMLParser::ConstructL");
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherXMLParser* CLauncherXMLParser::NewL(RFs& aFs)
+    {
+    LOGSTRING("Launcher: CLauncherXMLParser::NewL");
+    CLauncherXMLParser* self = CLauncherXMLParser::NewLC(aFs);    
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherXMLParser* CLauncherXMLParser::NewLC(RFs& aFs)
+    {
+    LOGSTRING("Launcher: CLauncherXMLParser::NewLC");
+    CLauncherXMLParser* self = new (ELeave) CLauncherXMLParser(aFs);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherXMLParser::~CLauncherXMLParser()
+    {
+    LOGSTRING("Launcher: CLauncherXMLParser::~CLauncherXMLParser");
+    Cancel();
+    delete iParser;
+    delete iCurrentDllElement;    
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::ClearXMLDataBuffer()
+    {
+    iXMLDataBuffer.Zero();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::DoCancel()
+    {
+    LOGSTRING("Launcher: CLauncherXMLParser::DoCancel");
+    iIgnoreError = ETrue;
+    if( iParser )
+        {
+        TRAP_IGNORE(iParser->ParseEndL());
+        }
+    iFile.Close();
+    ClearXMLDataBuffer();
+    }
+
+// ---------------------------------------------------------------------------
+// Gives current buffer content to parser for processing. Then reads
+// next part of the file in the buffer and waits for next scheduled run.
+
+void CLauncherXMLParser::RunL()
+    {
+    TInt err = iStatus.Int();
+    LOGSTRING2("Launcher: CLauncherXMLParser::RunL - iStatus: %d", err);
+    if( err != KErrNone )
+        {
+        iObserver->DocumentParsedL(err); // Observer should cancel parsing        
+        iFile.Close();
+        ClearXMLDataBuffer();
+        }
+    else
+        {        
+        iParsedBytes += iXMLDataBuffer.Length();
+        iObserver->ParsingProgressedL(iParsedBytes);
+        // Check if the end of the file is reached:
+        if( iXMLDataBuffer.Length() > 0)
+            {
+            // Parse the data in buffer 
+            LOGSTRING("Launcher: CLauncherXMLParser::RunL: Starting XML parsing");
+            if( iParser )
+                {
+                iParser->ParseL( iXMLDataBuffer );
+                }
+            else
+                {
+                LOGSTRING("CLauncherXMLParser::RunL - Error: NULL parser");
+                User::Leave(KErrGeneral);
+                }
+            // Read new data from XML file to buffer:
+            iFile.Read( iXMLDataBuffer, KXMLBufferSize, iStatus );
+            SetActive();
+            }
+        else
+            {
+            // End of the file reached. Stop parsing and close the file:
+            LOGSTRING("Launcher: CLauncherXMLParser::RunL: Data parsed. Stopping");
+            if( iParser )
+                {
+                iParser->ParseEndL();
+                }
+            iFile.Close();
+            ClearXMLDataBuffer();
+            }    
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::ParseL(const TDesC& aFilePath, MLauncherParserObserver* aObserver)
+    {
+    LOGSTRING2("Launcher: CLauncherXMLParser::ParseL: %S", &aFilePath);
+    iIgnoreError = EFalse;
+    iParsedBytes = 0;
+    if ( IsActive() )
+        {
+        Cancel();
+        }
+    
+    if( aObserver == 0 )
+        {
+        LOGSTRING("Launcher: CLauncherXMLParser::ParseL: Error: Observer is a NULL pointer.");
+        User::Leave(KErrArgument);
+        }
+    
+    // Open the XML-file
+    TInt err = iFile.Open( iFileSession, aFilePath, EFileRead );
+    User::LeaveIfError( err );
+    
+    // Create and start XML-parser:
+    delete iParser;
+    iParser = 0;
+    iParser = CParser::NewL(KXmlMimeType, *this);        
+        
+    // Set observer:
+    iObserver = aObserver;
+    
+    // Initialize the buffer and read first part of the XML-file:
+    ClearXMLDataBuffer();
+    iFile.Read( iXMLDataBuffer, KXMLBufferSize, iStatus );
+    SetActive();   
+    iParser->ParseBeginL(); // Reset the parser to xml-filetype
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnStartDocumentL(const Xml::RDocumentParameters& /*aDocParam*/, TInt aErrorCode)
+    {    
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnStartDocumentL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnEndDocumentL(TInt aErrorCode)
+    {    
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnEndDocumentL (Error code: %d)", aErrorCode);    
+    iObserver->DocumentParsedL(aErrorCode);
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnStartPrefixMappingL( const RString& /*aPrefix*/, 
+                                                const RString& /*aUri*/, 
+                                                TInt aErrorCode)
+    {    
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnStartPrefixMappingL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Launcer: CLauncherXMLParser::OnEndPrefixMappingL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnIgnorableWhiteSpaceL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
+    {
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnSkippedEntityL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnProcessingInstructionL(  const TDesC8& /*aTarget*/, 
+                                    const TDesC8& /*aData*/, 
+                                    TInt aErrorCode)
+    {
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnProcessingInstructionL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnError(TInt aErrorCode)
+    {
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnError: %d", aErrorCode);    
+    if( iIgnoreError == EFalse )
+        {        
+        TRAP_IGNORE(iObserver->DocumentParsedL(aErrorCode));
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+TAny* CLauncherXMLParser::GetExtendedInterface(const TInt32 aUid)
+    {
+    (void)aUid;
+    LOGSTRING2("Launcher: CLauncherXMLParser::GetExtendedInterface (UID: %d)", aUid);
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnStartElementL(   const RTagInfo& aElement,
+                                            const RAttributeArray& /*aAttributes*/,
+                                            TInt aErrorCode)
+    {
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnStartElementL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    else
+        {
+        // Save XML-element name:
+        iCurrentElementName = aElement.LocalName().DesC();
+    
+        // If this is 'dll'-element, initialize new DLL element instance:
+        if( iCurrentDllElement == 0 && iCurrentElementName == KDll )
+            {
+            iCurrentDllElement = CLauncherDLLElement::NewL();
+            }
+        // Clear contents buffer:
+        iCurrentContent.Zero();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherXMLParser::OnEndElementL(const RTagInfo& aElement, TInt aErrorCode)
+    {   
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnEndElementL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    else
+        {
+        // Save XML-element's name:        
+        iCurrentElementName = aElement.LocalName().DesC();    
+        TUid tmpUID;
+
+        if( IsDataElement() )
+            {        
+            // Check that we have a pointer to parent DLL element
+            if( iCurrentDllElement == 0 )
+                {
+                LOGSTRING("Launcher: CLauncherXMLParser: Error in parsing xml (parent DLL element missing).");
+                User::Leave(KErrGeneral);
+                }
+            // DLL name
+            if( iCurrentElementName == KDllName )
+                {
+                TFileName dllName;
+                dllName.Copy(iCurrentContent);
+                iCurrentDllElement->SetNameL(dllName);
+                }
+            // UID1
+            else if( iCurrentElementName == KUID1 )
+                {
+                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
+                iCurrentDllElement->SetUID1L(tmpUID);
+                }
+            // UID2
+            else if( iCurrentElementName == KUID2 )
+                {
+                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
+                iCurrentDllElement->SetUID2L(tmpUID);
+                }
+            // UID3
+            else if( iCurrentElementName == KUID3 )
+                {
+                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
+                iCurrentDllElement->SetUID3L(tmpUID);
+                }
+            // SID
+            else if( iCurrentElementName == KSID )
+                {
+                tmpUID.iUid = ConvertDes8ToUint32L(iCurrentContent);
+                iCurrentDllElement->SetSIDL(tmpUID);
+                }
+            // Capability
+            else if( iCurrentElementName == KCapability )
+                {            
+                iCurrentDllElement->SetCapabilityL(ConvertDes8ToUint32L(iCurrentContent));
+                }
+            }
+        else if( iCurrentElementName == KDll )
+            {
+            // DLL element parsed, give current DLL object to observer:
+            iObserver->ElementParsedL(*iCurrentDllElement);
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+TBool CLauncherXMLParser::IsDataElement()
+    {
+    if( iCurrentElementName == KDllName ||
+        iCurrentElementName == KUID1 ||
+        iCurrentElementName == KUID2 ||
+        iCurrentElementName == KUID3 ||
+        iCurrentElementName == KSID ||
+        iCurrentElementName == KCapability )
+        {
+        return ETrue;
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// Reads content of an xml-element.
+
+void CLauncherXMLParser::OnContentL(const TDesC8& aBytes, TInt aErrorCode)
+    {
+    LOGSTRING2("Launcher: CLauncherXMLParser::OnContentL (Error code: %d)", aErrorCode);
+    if( aErrorCode != KErrNone )
+        {
+        iObserver->DocumentParsedL(aErrorCode);
+        }
+    else if( iCurrentElementName.Length() == 0)
+        {
+        LOGSTRING("Launcher: CLauncherXMLParser: Error in parsing xml (element name missing).");
+        User::Leave(KErrGeneral);
+        }
+    iCurrentContent.Append(aBytes);
+    }
+
+// ---------------------------------------------------------------------------
+
+TUint32 CLauncherXMLParser::ConvertDes8ToUint32L(const TDesC8& aStr)
+    {
+    LOGSTRING("Launcher: CLauncherXMLParser::ConvertDes8ToUintL");
+    TUint32 uintVal = 0;
+    TLex8 lex(aStr);
+    TInt errorCode=lex.Val(uintVal, EHex);
+    User::LeaveIfError(errorCode);
+    return uintVal;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/icons/check.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg2425"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   sodipodi:docname="littlecheck.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs2427">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 32 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="64 : 32 : 1"
+       inkscape:persp3d-origin="32 : 21.333333 : 1"
+       id="perspective2433" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.5"
+     inkscape:cx="41.434135"
+     inkscape:cy="30.383938"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1680"
+     inkscape:window-height="960"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4" />
+  <metadata
+     id="metadata2430">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       style="opacity:1"
+       id="g2392"
+       inkscape:label="Taso 1"
+       transform="translate(142.14286,-114.28572)">
+      <path
+         id="path2380"
+         d="M 88.571429,669.50504 C 157.14286,706.6479 165.71429,755.21933 165.71429,755.21933 L 260,755.21933 L 377.14286,498.07647 L 297.14286,520.93361 L 220,683.79075 L 137.14286,615.21933 L 88.571429,669.50504 z"
+         style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         id="path2382"
+         d="M 166.13825,753.72414 C 160.59283,734.93105 150.56818,718.85592 134.09168,702.33551 C 122.39811,690.61077 109.94955,681.0295 95.667678,672.7617 C 92.528095,670.9442 90.022074,669.29624 90.098744,669.09959 C 90.391504,668.34866 136.88523,616.64733 137.26775,616.64733 C 137.48928,616.64733 156.25397,632.01906 178.96703,650.80675 L 220.26352,684.96615 L 221.01814,683.36302 C 221.43318,682.48128 238.8474,645.7167 259.71641,601.66393 L 297.66005,521.56799 L 336.5681,510.41987 C 357.96753,504.2884 375.52719,499.31453 375.58957,499.3668 C 375.65196,499.41909 349.60366,556.8017 317.70448,626.88374 L 259.70597,754.3056 L 213.01297,754.32277 C 176.07199,754.33635 166.282,754.21133 166.13824,753.72414 L 166.13825,753.72414 z"
+         style="fill:#808080;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <g
+       style="opacity:1"
+       id="g2438"
+       inkscape:label="Taso 1"
+       transform="matrix(0.2179694,0,0,0.244371,-19.028457,-120.49825)">
+      <path
+         id="path2440"
+         d="M 88.571429,669.50504 C 157.14286,706.6479 165.71429,755.21933 165.71429,755.21933 L 260,755.21933 L 377.14286,498.07647 L 297.14286,520.93361 L 220,683.79075 L 137.14286,615.21933 L 88.571429,669.50504 z"
+         style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         id="path2442"
+         d="M 166.13825,753.72414 C 160.59283,734.93105 150.56818,718.85592 134.09168,702.33551 C 122.39811,690.61077 109.94955,681.0295 95.667678,672.7617 C 92.528095,670.9442 90.022074,669.29624 90.098744,669.09959 C 90.391504,668.34866 136.88523,616.64733 137.26775,616.64733 C 137.48928,616.64733 156.25397,632.01906 178.96703,650.80675 L 220.26352,684.96615 L 221.01814,683.36302 C 221.43318,682.48128 238.8474,645.7167 259.71641,601.66393 L 297.66005,521.56799 L 336.5681,510.41987 C 357.96753,504.2884 375.52719,499.31453 375.58957,499.3668 C 375.65196,499.41909 349.60366,556.8017 317.70448,626.88374 L 259.70597,754.3056 L 213.01297,754.32277 C 176.07199,754.33635 166.282,754.21133 166.13824,753.72414 L 166.13825,753.72414 z"
+         style="fill:#808080;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/icons/qgn_menu_launcher.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,113 @@
+<?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 88">
+	<defs>
+		<linearGradient id="linearGradient17394" x1="0%" y1="0%" x2="100%"
+			y2="66.6667%" spreadMethod="pad" gradientUnits="objectBoundingBox">
+			<stop id="stop17396" style="stop-opacity:1;stop-color:rgb(242,255,86)"
+				offset="0"/>
+			<stop id="stop17398" style="stop-opacity:1;stop-color:rgb(212,230,7)"
+				offset="1"/>
+		</linearGradient>
+		<linearGradient id="linearGradient17400_1" x1="36.5869" y1="-20.085"
+			x2="117.956" y2="59.4589" xlink:href="#linearGradient17394"
+			gradientUnits="userSpaceOnUse"
+			gradientTransform="matrix(0.53761 0 0 0.926099 1.6227 25.866)">
+		</linearGradient>
+		<linearGradient x1="36.5869" y1="-20.085" x2="117.956" y2="59.4589"
+			xlink:href="#linearGradient17394" gradientUnits="userSpaceOnUse"
+			gradientTransform="matrix(0.53761 0 0 0.926099 1.6227 25.866)">
+		</linearGradient>
+	</defs>
+	<g>
+		<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="30.5986"
+			y1="26.9722" x2="53.4647" y2="54.4606">
+			<stop offset="0" style="stop-opacity:0;stop-color:rgb(255,128,128)"/>
+			<stop offset="1" style="stop-opacity:0;stop-color:rgb(8,66,150)"/>
+		</linearGradient>
+		<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="37.7549"
+			y1="20.2007" x2="60.648" y2="20.2007">
+			<stop offset="0" style="stop-color:rgb(0,92,254)"/>
+			<stop offset="1" style="stop-color:rgb(0,92,230)"/>
+		</linearGradient>
+		<path
+			d="M21.184 21.318 C31.419 9.612 43.98 7.844 53.009 9.984 C62.034 12.124 71.898 19.381
+				72.456 31.2 C67.843 23.4 57.101 19.847 50.403 21.056 C43.972 22.217 38.445
+				25.849 36.84 28.571 C31.699 30.642 23.047 27.536 21.184 21.318 z"
+			 style="fill:url(#XMLID_8_)"/>
+		<polygon points="59.157,31.968 66.832,43.086 78.696,41.706 70.564,31.787"
+			 style="fill:rgb(255,0,0)"/>
+		<radialGradient id="XMLID_10_" cx="-48.0791" cy="39.3374" r="10.3877"
+			fx="-48.0791" fy="39.3374"
+			gradientTransform="matrix(1.0025 0.1408 -0.2587 0.9612 82.2902 3.6922)"
+			gradientUnits="userSpaceOnUse">
+			<stop offset="0" style="stop-color:rgb(194,249,143)"/>
+			<stop offset="1" style="stop-color:rgb(23,139,0)"/>
+		</radialGradient>
+		<path
+			d="M31.926 40.793 C30.315 46.775 23.949 50.912 17.711 50.035 C11.472 49.159 7.714 43.602
+				9.325 37.62 C10.934 31.635 17.301 27.494 23.542 28.368 C29.778 29.244 33.534
+				34.808 31.926 40.793 z"
+			 style="fill:url(#XMLID_10_)"/>
+		<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="37.165"
+			y1="24.022" x2="59.6654" y2="24.022">
+			<stop offset="0" style="stop-color:rgb(81,140,247)"/>
+			<stop offset="1" style="stop-color:rgb(51,102,204)"/>
+		</linearGradient>
+		<path
+			d="M29.906 28.778 C34.77 22.174 43.702 16.404 52.82 16.87 C61.941 17.335 70.128 24.313
+				72.456 31.2 C67.245 24.313 59.706 20.871 53.194 20.965 C47.69 21.043 40.539
+				24.128 36.84 28.571 C34.77 29.432 30.536 29.147 29.906 28.778 z"
+			 style="fill:url(#XMLID_12_)"/>
+		<path id="path19050"
+			d="M40.8495 45.7047 L45.6374 42.2346 L41.7423 36.4286 L43.6873 42.0156 z"
+			 style="stroke-opacity:1;stroke-miterlimit:4;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0;
+			fill-rule:evenodd;fill:rgb(255,0,0)"
+			transform="matrix(1 0 0 1 0 0) translate(-10.5 -11) translate(45.717 45.6311) scale(1.22417 1.22417) translate(-45.717 -45.6311) translate(40.563 41.1383) scale(0.876322 1) translate(-40.563 -41.1383) translate(46.0671 41.1383) scale(1.16936 1) translate(-46.0671 -41.1383) translate(46.0671 35.7119) scale(0.879308 0.962365) translate(-46.0671 -35.7119) translate(46.0671 46.5647) scale(1.10981 0.986965) translate(-46.0671 -46.5647) translate(40.563 41.1383) scale(0.950529 1) translate(-40.563 -41.1383)"
+			/>
+		<path id="path17526"
+			d="M47.4959 34.1139 L42.1697 41.213 L48.3432 46.4067 L44.6166 41.0903 z"
+			 style="stroke-opacity:1;stroke-miterlimit:4;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0;
+			fill-rule:evenodd;fill:rgb(255,0,0)"
+			transform="matrix(1 0 0 1 0 0) translate(5 -1) translate(48.5099 40.0936) scale(0.860598 1) translate(-48.5099 -40.0936) translate(41.3364 40.0936) scale(1.16198 1) translate(-41.3364 -40.0936)"
+			/>
+		<path id="path18288"
+			d="M45.0758 39.3423 L41.8151 46.0623 L43.0468 39.5597 L40.012 34.2418 z"
+			 style="stroke-opacity:1;stroke-miterlimit:4;stroke-linejoin:miter;stroke-linecap:butt;stroke-width:0;
+			fill-rule:evenodd;fill:rgb(255,0,0)"
+			transform="matrix(1 0 0 1 0 0) translate(-10.3333 9.83333) translate(39.1149 40.4273) scale(0.857902 1) translate(-39.1149 -40.4273) translate(46.1523 47.7134) scale(1.08282 0.908502) translate(-46.1523 -47.7134)"
+			/>
+		<path id="path16634"
+			d="M22.0745 5.81657 L37.3876 30.5355 L27.8687 39.6137 L37.3876 49.4575 L30.9727 61.5982
+				L66.2549 82.3796 L48.0447 60.0669 L56.3221 50.5512 L44.5268 40.7074 L53.6319
+				28.2386 z"
+			 style="fill-opacity:1;fill-rule:evenodd;stroke-linecap:butt;stroke-linejoin:miter;stroke-width:0.705606px;
+			stroke:rgb(0,0,0);fill:url(#linearGradient17394)"
+			transform="matrix(1 0 0 1 0 0)"/>
+		<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="49.4912"
+			y1="61.1475" x2="28.1645" y2="61.1475">
+			<stop offset="0" style="stop-color:rgb(0,86,228)"/>
+			<stop offset="1" style="stop-color:rgb(0,67,206)"/>
+		</linearGradient>
+		<path
+			d="M11.744 50.158 C12.907 61.196 21.379 70.149 33.682 71.877 C45.074 73.476 57.106 67.547
+				64.156 58.925 L54.005 62.075 L48.376 52.774 C38.759 60.212 17.646 66.188
+				11.744 50.158 z"
+			 style="fill:url(#XMLID_9_)"/>
+		<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="49.1025"
+			y1="59.4443" x2="20.5393" y2="59.4443">
+			<stop offset="0" style="stop-color:rgb(99,147,244)"/>
+			<stop offset="1" style="stop-color:rgb(72,133,254)"/>
+		</linearGradient>
+		<polygon points="47.515,51.789 54.005,62.075 64.156,58.925 57.456,49.496"
+			 style="fill:rgb(77,136,255)"/>
+		<path
+			d="M54.005 62.075 C42.815 72.325 14.88 74.004 11.602 49.722 C16.285 59.661 35.918 64.892
+				47.763 51.583 z"
+			 style="fill:url(#XMLID_11_)"/>
+		<polygon points="58.778,54.839 69.851,53.393 78.73,41.72 66.832,43.086"
+			 style="fill:rgb(153,0,0)"/>
+		<polygon points="58.778,54.839 51.896,44.684 59.119,31.944 67.085,43.071"
+			 style="fill:rgb(255,102,153)"/>
+	</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/inc/applicationview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef APPLICATIONVIEW_H
+#define APPLICATIONVIEW_H
+
+#include <hbview.h>
+
+class HbAction;
+class HbDocumentLoader;
+class HbListWidget;
+class CommonActions;
+class EngineWrapper;
+
+class ApplicationView : public HbView
+{
+    Q_OBJECT
+    
+public:
+    
+    /**
+     * Constructor
+     */
+    ApplicationView();
+    
+    /**
+     * Destructor
+     */
+    ~ApplicationView();
+
+    /**
+     * Created Application View
+     */
+    static ApplicationView* create(HbDocumentLoader &loader,
+                        CommonActions *commonActions, 
+                        EngineWrapper *engine);
+    
+    /**
+     * Setter for engine
+     */
+    void setEngine(EngineWrapper *engine);
+    
+private slots:
+
+    
+    /**
+     * Refreshed application list
+     */
+    void refreshAppList();
+    
+    /**
+     * Launches selected applications
+     */
+    void launchSelectedApplications();
+    
+    /**
+     * Launches and closes selected applications
+     */
+    void launchAndCloseSelectedApplications();
+    
+    /**
+     * Selects all list items
+     */
+    void selectAllItems();
+    
+    /**
+     * unselects all items
+     */
+    void unselectAllItems();
+    
+    /**
+     * Changes launch options so that hidden applications are skipped
+     */
+    void launchOptionsSkipHidden();
+    
+    /**
+     * Changes launch options so that hidden applications are not skipped
+     */
+    void launchOptionsDontSkipHidden();
+    
+    /**
+     * Opens output view
+     */
+    void openOutputView();
+
+
+private:
+    
+    /**
+     * Initializes view
+     */
+    void init(HbDocumentLoader &loader, CommonActions *commonActions);
+    
+    /**
+     * connects signals and slots
+     */
+    void connectSignalsAndSlots();
+    
+    /**
+     * Loads all UI items from xml file
+     */
+    void loadItemsFromXml(HbDocumentLoader &loader);
+  
+private slots:
+
+    
+private:
+    EngineWrapper *mEngine;
+    
+    //UI components:
+    HbListWidget *mApplicationList;
+    
+    //Actions:
+    HbAction *mActionRefresh;
+    HbAction *mActionLaunchApps;
+    HbAction *mActionLaunchAndCloseApps;
+    HbAction *mActionSkipHidden;
+    HbAction *mActionDontSkipHidden;
+    HbAction *mActionSelectAll;
+    HbAction *mActionUnselectAll;
+    HbAction *mActionOpenOutputView;
+
+
+};
+
+#endif // APPLICATIONVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/inc/commonActions.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef COMMONACTIONS_H
+#define COMMONACTIONS_H
+
+#include <qobject.h>
+
+class EngineWrapper;
+class HbAction;
+class HbMenu;
+class HbApplication;
+
+class CommonActions : public QObject
+{
+    Q_OBJECT
+public:
+    
+    /**
+     * Constructor
+     */
+    CommonActions(EngineWrapper *engine, HbApplication *application);
+    
+    /**
+     * Destructor
+     */
+    ~CommonActions();
+    
+    /**
+     * Adds all actions to menu that is given as parameter
+     */
+    void addActionsToMenu(HbMenu *menu);
+    
+public slots:
+
+    /**
+     * Shows about box
+     */
+    void showAbout();
+    
+    /**
+     * Stops launching applications
+     */
+    void stopLaunch();
+    
+    /**
+     * Sends DLL info
+     */
+    void sendDllInfo();
+    
+    /**
+     * Compares DLL infos
+     */
+    void compareDllInfo();
+    
+    /**
+     * Sends log
+     */
+    void sendLog();
+    
+    /**
+     * Deletes log
+     */
+    void deleteLog();
+    
+    /**
+     * Exits launcher
+     */
+    void exit();
+
+private:
+    void connectSignalsAndSlots();
+    
+private:
+    EngineWrapper *mEngine;
+    
+    HbApplication *mApplication;
+    
+    //Actions:
+
+    HbAction *mActionStopLaunch;
+    HbAction *mActionSendDllInfo;
+    HbAction *mActionCompareDllInfo;
+    HbAction *mActionSendLog;
+    HbAction *mActionDeleteLog;
+    HbAction *mActionAbout;
+    HbAction *mActionExit;
+    
+};
+    
+#endif //COMMONACTIONS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/inc/enginewrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,170 @@
+/*
+* 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 ENGINEWRAPPER_H
+#define ENGINEWRAPPER_H
+
+#include <qstringlist.h>
+#include <qabstractitemmodel.h>
+#include <qlist.h>
+#include <coecntrl.h>
+
+#include "launcherengine.h"
+
+class HbProgressDialog;
+class HbDeviceProgressDialog;
+class HbAction;
+
+class LauncherMainWindow;
+
+
+class EngineWrapper : public QObject, public MLauncherUI
+{
+    Q_OBJECT
+    
+public:
+    
+    /**
+     * Constructor
+     */
+    EngineWrapper(LauncherMainWindow* mainWindow);
+    
+    /**
+     * Destructor
+     */
+    ~EngineWrapper();
+    
+    /**
+     * Initializes Engine Wrapper
+     * @return true if engine was started successfully
+     */
+    bool init();
+    
+public:
+    // functions that are called from UI
+    
+    /**
+     * Fetches list of applications from engine
+     */
+    bool listOfAllApps(QStringList &allAppsQStringList);
+    
+    /**
+     * Starts launching applications that are given as parameter
+     */
+    bool startAppLaunching(const QModelIndexList &list, bool autoClose);
+    
+    /**
+     * Sets engine to skip hidden applications when launching
+     */
+    void setSkipHiddenAndEmbedOnly(bool skip);
+    
+    /**
+     * Stops launching applications
+     */
+    bool stopLaunching();
+    
+    /**
+     * Sends log
+     */
+    bool sendLog();
+    
+    /**
+     * Deletes log
+     */
+    bool deleteLog();
+    
+    /**
+     * Compares dll
+     */
+    void compareDlls();
+    
+    /**
+     * Sends list of dlls
+     */
+    bool sendListOfDlls();
+    
+public:
+    // From MLauncherUIEngine
+    // functions that are called from Engine
+    
+    /**
+     * Shows error message with error text
+     */
+    virtual void ShowErrorMessage(const TDesC& aText);
+    
+    /**
+     * Shows information message with info text
+     */
+    virtual void ShowInfoMessage(const TDesC& aText);
+
+    /**
+     * Shows progress bar with text
+     */
+    virtual void ShowProgressBar(const TDesC& aText, TInt aMinimum = 0, TInt aMaximum = 0 );
+
+    /**
+     * Sets progress bar value
+     */
+    virtual void SetProgressBarValue(TInt aValue);
+
+    /**
+     * Hides progress bar
+     */
+    virtual void HideProgressBar();
+
+    /**
+     * Shows wait dialog with text
+     */
+    virtual void ShowWaitDialog(const TDesC& aText);
+
+    /**
+     * Hides wait dialog
+     */
+    virtual void HideWaitDialog();
+
+    /**
+     * Changes focus to output view
+     */
+    virtual void ChangeFocusToOutputView();
+    
+    /**
+     * Prints text to output views log
+     */
+    virtual void PrintText(const TDesC& aText);
+    
+public slots:
+    void doCompareDlls(HbAction*);
+    void CancelDllBCanalysis();
+    
+private:
+    
+    /**
+     * Allocate CArrayFix and copy QList to it
+     */
+    CArrayFix<TInt>* QModelIndexListToCArrayFixL(const QModelIndexList& qlist);
+    
+private:
+    CLauncherEngine *mEngine;
+    LauncherMainWindow *mMainWindow;
+    HbProgressDialog* mProgressDialog;
+    HbDeviceProgressDialog* mWaitDialog;
+};
+
+
+
+
+#endif //ENGINEWRAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/inc/launchermainwindow.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* 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 LauncherMainWindow_H_
+#define LauncherMainWindow_H_
+
+#include <hbmainwindow.h>
+#include <hbview.h>
+
+class HbApplication;
+class ApplicationView;
+class OutputView;
+class EngineWrapper;
+class CommonActions;
+
+class LauncherMainWindow : public HbMainWindow
+    {
+public:
+    
+    LauncherMainWindow ( QWidget *parent = 0 );
+    virtual ~LauncherMainWindow ();
+    
+    int init( HbApplication &app );
+    
+    void openApplicationView();
+    void openOutputView();
+    /**
+     * Prints text into output
+     */
+    void printText(const QString &text);
+    
+private: //data
+    EngineWrapper* mEngineWrapper;
+    ApplicationView* mApplicationView;
+    OutputView* mOutputView;
+    CommonActions* mCommonActions;
+    };
+
+#endif /* LauncherMainWindow_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/inc/notifications.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* 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 NOTIFICATIONS_H_
+#define NOTIFICATIONS_H_
+
+#include <hbmessagebox.h>
+#include <hbdeviceprogressdialog.h>
+
+
+class Notifications
+    {
+public:
+
+    /**
+     * shows message box of the specified type with text and label
+     */
+    static void showMessageBox(
+        HbMessageBox::MessageBoxType type, 
+        const QString &text, 
+        const QString &label, 
+        int timeout = HbPopup::NoTimeout
+        );
+    
+    /**
+     * shows about box
+     */
+    static void about();
+
+    /**
+     * shows information type message box
+     */
+    static void showInformationNote(const QString &text);
+
+    /**
+     * shows warning type message box
+     */
+    static void showErrorNote(const QString &text);
+    
+     /**
+     * shows progressbar
+     */
+    static HbDeviceProgressDialog* showWaitDialog(const QString &text);
+
+    
+    };
+
+
+
+#endif // NOTIFICATIONS_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/inc/outputview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef OUTPUTVIEW_H
+#define OUTPUTVIEW_H
+
+#include <hbview.h>
+
+class HbDocumentLoader;
+class HbAction;
+class HbTextEdit;
+class CommonActions;
+
+class OutputView : public HbView
+{
+    Q_OBJECT
+    
+public:
+    /**
+     * Constructor
+     */
+    OutputView();
+    
+    /**
+     * Destructor
+     */
+    ~OutputView();
+    
+    /**
+     * Creates output view and adds it into main window
+     */
+    static OutputView* create(HbDocumentLoader &loader, CommonActions *commonActions);
+    
+    /**
+     * Prints text into output
+     */
+    void printText(const QString &text);
+    
+private slots:
+
+    /**
+     * Clears output
+     */
+    void clearOutput();
+    
+    /**
+     * Opens application view
+     */
+    void openApplicationView();
+    
+private:
+    
+    /**
+     * Initializes view
+     */
+    void init(HbDocumentLoader &loader, CommonActions *commonActions);
+    
+    /**
+     * Loads all output view's ui components from xml-file
+     */
+    void loadItemsFromXml(HbDocumentLoader &loader);
+    
+    /**
+     * connects signals and slots to each other
+     */
+    void connectSignalsAndSlots();
+    
+
+private:
+    
+    // Actions
+    HbAction *mActionClear;
+    HbAction *mActionOpenApplicationView;  
+
+    HbTextEdit *mTextOutput;
+    
+};
+
+#endif // OUTPUTVIEW
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/launcher.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,68 @@
+TEMPLATE = app
+TARGET = Launcher
+load(hb.prf)
+symbian:CONFIG -= symbian_i18n
+DEPENDPATH += src
+DEPENDPATH += inc
+INCLUDEPATH += inc
+
+HEADERS += launchermainwindow.h applicationview.h enginewrapper.h notifications.h  outputview.h commonActions.h
+SOURCES += main.cpp launchermainwindow.cpp applicationview.cpp enginewrapper.cpp notifications.cpp  outputview.cpp commonActions.cpp
+RESOURCES += launcher.qrc
+
+symbian: {
+
+        BLD_INF_RULES.prj_exports += "./rom/Launcher.iby                CORE_IBY_EXPORT_PATH(tools,Launcher.iby)"
+        BLD_INF_RULES.prj_exports += "./rom/backup_registration.xml     Z:/private/101fb74f/backup_registration.xml"
+
+        launcher_stub_sis_mk = \
+        "$${LITERAL_HASH}if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__S60_32__)" \
+        "   $${LITERAL_HASH}ifdef MARM" \
+        "       gnumakefile .sis/launcher_stub_sis.mk" \
+        "   $${LITERAL_HASH}endif" \
+        "$${LITERAL_HASH}endif"
+        BLD_INF_RULES.prj_mmpfiles += launcher_stub_sis_mk
+        
+        launcher_buildstubsis_extension = \
+        "$${LITERAL_HASH}if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)" \
+        "   $${LITERAL_HASH}ifdef MARM" \
+        "       START EXTENSION app-services/buildstubsis" \
+        "       OPTION SRCDIR sis" \
+        "       OPTION SISNAME Launcher_stub" \
+        "       END" \
+        "   $${LITERAL_HASH}endif" \
+        "$${LITERAL_HASH}endif"
+        BLD_INF_RULES.prj_extensions += launcher_buildstubsis_extension
+        
+        INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+                     
+        DEPENDPATH += engine/inc
+        DEPENDPATH += engine/src
+        INCLUDEPATH += engine/inc
+        
+        HEADERS += launcherengine.h launchertraces.h e32image.h e32imageheaders.h launcherxmlparser.h launcherdllelement.h launcherparserobserver.h launcherdllparser.h
+		SOURCES += launcherengine.cpp e32image.cpp launcherxmlparser.cpp launcherdllelement.cpp launcherdllparser.cpp
+		
+		RSS_RULES += "group_name = \"RnD Tools\"";
+		
+		LIBS += -lapgrfx -lPlatformEnv -lxqutils -lxmlframework -lbafl -lshareui -lws32 -lapparc -lefsrv -lcone
+
+
+        TARGET.CAPABILITY = ReadUserData ReadDeviceData WriteUserData WriteDeviceData PowerMgmt AllFiles
+        
+        TARGET.UID2 = 0x100039CE
+        TARGET.UID3 = 0x101FB74F
+        TARGET.SID = 0x101FB74F
+        TARGET.VID = 0x101FB657 // Nokia
+	
+        TARGET.EPOCHEAPSIZE = 0x20000 0x2000000  // Min 128Kb, Max 32Mb
+
+        ICON = ./icons/qgn_menu_launcher.svg 
+        
+        MMP_RULES -= PAGED
+  			MMP_RULES *= UNPAGEDDATA
+  			MMP_RULES += SMPSAFE
+
+} else {
+    error("Only Symbian supported!")
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/launcher.qrc	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,9 @@
+<RCC>
+    <qresource prefix="/xml" >
+        <file alias="applicationview.xml" >src/applicationview.xml</file>
+        <file alias="outputview.xml" >src/outputview.xml</file>
+    </qresource>
+    <qresource prefix="/gfx" >
+        <file alias="launcher.svg" >icons/qgn_menu_launcher.svg</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/rom/Launcher.iby	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* 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 __LAUNCHER_IBY__
+#define __LAUNCHER_IBY__
+
+S60_APP_EXE(Launcher)
+S60_APP_RESOURCE(Launcher)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,Launcher)
+data=ZPRIVATE\10003a3f\import\APPS\Launcher_reg.RSC Private\10003a3f\import\Apps\Launcher_reg.rsc
+
+//#ifdef S60_UPGRADABLE_APP_REG_RSC
+//  S60_UPGRADABLE_APP_REG_RSC(Launcher)
+//#else
+//  S60_APP_AIF_RSC(Launcher)
+//#endif
+
+data=ZPRIVATE\101FB74F\backup_registration.xml        	private\101FB74F\backup_registration.xml
+data=ZSYSTEM\Install\Launcher_stub.sis                  \system\install\Launcher_stub.sis
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/rom/backup_registration.xml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <passive_backup>
+    <include_directory name="\"/>
+  </passive_backup>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/sis/Launcher_S60-5x.pkg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,43 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+; Language - standard language definitions
+&EN
+
+; Standard SIS file header
+#{"Launcher"},(0x101FB74F),4,0,0,TYPE=SA
+
+;Supports S60 v 5.0
+[0x1028315F], 0, 0, 0, {"S60ProductID"}
+
+;Supports S60 v 5.1
+[0x10283160], 0, 0, 0, {"S60ProductID"}
+
+;Supports S60 v 5.2
+[0x20022E6D], 0, 0, 0, {"S60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; normal stuff:
+"\epoc32\release\armv5\urel\launcher.exe"-"!:\sys\bin\launcher.exe"
+"\epoc32\data\z\resource\apps\launcher.mif"-"!:\resource\apps\launcher.mif"
+"\epoc32\data\z\resource\apps\launcher.rsc"-"!:\resource\apps\launcher.rsc"
+"\epoc32\data\z\private\10003a3f\import\apps\launcher_reg.rsc"-"!:\private\10003a3f\import\apps\launcher_reg.rsc"
+"..\group\backup_registration.xml"-"!:\private\101fb74f\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/sis/Launcher_stub.pkg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+; Language - standard language definitions
+&EN
+
+; Standard SIS file header
+#{"Launcher"},(0x101FB74F),4,0,0
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; normal stuff:
+""-"z:\sys\bin\Launcher.exe"
+""-"z:\Resource\Apps\Launcher.mif"
+""-"z:\Resource\Apps\Launcher.rsc"
+""-"z:\private\10003a3f\import\apps\Launcher_reg.rsc"
+""-"z:\private\101FB74F\backup_registration.xml"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/sis/launcher_stub_sis.mk	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,56 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:  
+#
+
+
+TARGETDIR=$(EPOCROOT)EPOC32\Data\Z\System\Install
+
+SISNAME=Launcher_stub
+PKGNAME=Launcher_stub
+
+$(TARGETDIR) :
+	@perl -S emkdir.pl "$(TARGETDIR)"
+
+do_nothing :
+	rem do_nothing
+
+SISFILE=$(TARGETDIR)\$(SISNAME).sis
+
+$(SISFILE) : .\$(PKGNAME).pkg
+	makesis -s $? $@ 
+
+
+
+MAKMAKE : do_nothing
+
+RESOURCE : do_nothing
+
+SAVESPACE : do_nothing
+
+BLD : do_nothing
+
+FREEZE : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+FINAL : $(TARGETDIR) $(SISFILE)
+
+CLEAN : 
+	@if exist $(SISFILE) erase $(SISFILE)
+
+RELEASABLES : 
+	@echo $(SISFILE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/applicationview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,299 @@
+/*
+* 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 <hbdocumentloader.h>
+#include <hblistwidget.h>
+#include <qstandarditemmodel.h>
+#include <hbaction.h>
+#include <hbmenu.h>
+#include <qlist.h>
+
+#include "applicationview.h"
+#include "launchermainwindow.h"
+#include "enginewrapper.h"
+#include "notifications.h"
+#include "commonActions.h"
+#include "outputview.h"
+
+
+
+
+// xml definition of view
+const char *APPLICATIONVIEW_XML = ":/xml/applicationview.xml";
+
+// name of the application view object in the xml file.
+const char *APPLICATIONVIEW = "applicationview";
+const char *LISTVIEW = "applicationList";
+const char *ACTIONREFRESH = "actionRefresh";
+const char *ACTIONLAUNCHAPPS = "actionLaunchApps";
+const char *ACTIONLAUNCHANDCLOSEAPPS = "actionLaunchAppsAndClose";
+const char *ACTIONSELECT = "actionSelectAll";
+const char *ACTIONUNSELECT = "actionUnselectAll";
+const char *ACTIONOPENOUTPUTVIEW = "actionOpenOutputView";
+const char *ACTIONSKIPHIDDEN = "actionSkipHidden";
+const char *ACTIONDONTSKIPHIDDEN = "actionDontSkipHidden";
+
+// ---------------------------------------------------------------------------
+
+ApplicationView* ApplicationView::create(HbDocumentLoader &loader, CommonActions *commonActions, EngineWrapper *engine)
+{
+    
+    // Load xml-file
+    bool ok = false;
+    qDebug("QTLauncher::load xml");
+    loader.load(APPLICATIONVIEW_XML, &ok);
+    
+    // Load Application View:
+    QGraphicsWidget *widget = loader.findWidget(APPLICATIONVIEW);
+    Q_ASSERT_X(ok && (widget != 0), "Launcher", "Invalid launcher.xml file");
+    ApplicationView *applicationView = qobject_cast<ApplicationView *>(widget);
+      
+    // Set enginewrappers pointer to applicationview and initialize it
+    applicationView->setEngine(engine);
+    applicationView->init(loader, commonActions);
+    
+    return applicationView;    
+}
+
+// ---------------------------------------------------------------------------
+
+ApplicationView::ApplicationView()  
+    :   mEngine(0),
+        mActionRefresh(0),
+        mActionLaunchApps(0),
+        mActionLaunchAndCloseApps(0),
+        mActionSkipHidden(0),
+        mActionDontSkipHidden(0),
+        mActionSelectAll(0),
+        mActionUnselectAll(0),
+        mActionOpenOutputView(0)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::setEngine(EngineWrapper *engine)
+{
+    mEngine = engine;
+}
+
+// ---------------------------------------------------------------------------
+
+ApplicationView::~ApplicationView()
+{
+    if(mActionRefresh)
+        mActionRefresh->deleteLater();
+    if(mActionLaunchApps)
+        mActionLaunchApps->deleteLater();
+    if(mActionLaunchAndCloseApps)
+        mActionLaunchAndCloseApps->deleteLater();
+    if(mActionSkipHidden)
+        mActionSkipHidden->deleteLater();
+    if(mActionDontSkipHidden)
+        mActionDontSkipHidden->deleteLater();
+    if(mActionSelectAll)
+        mActionSelectAll->deleteLater();
+    if(mActionUnselectAll)
+        mActionUnselectAll->deleteLater();
+    if(mActionOpenOutputView)
+        mActionOpenOutputView->deleteLater();
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::init(HbDocumentLoader &loader, CommonActions *commonActions)
+{
+    // Load items from xml file
+    loadItemsFromXml(loader);
+    
+    // Set actions checkable and select "Skip hidden & embed"
+    mActionSkipHidden->setCheckable(true);
+    mActionSkipHidden->setChecked(true);
+    mActionDontSkipHidden->setCheckable(true);
+    
+    commonActions->addActionsToMenu(menu());
+    
+    // Set list widget settings
+    mApplicationList->setClampingStyle(HbScrollArea::BounceBackClamping);
+    mApplicationList->setSelectionMode(HbAbstractItemView::MultiSelection);
+    
+    // Refresh application list
+    refreshAppList();
+    
+    // Connect signals and slots
+    connectSignalsAndSlots();
+   
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::refreshAppList()
+{
+    // Clear list
+
+    mApplicationList->clear();
+    QStringList apps;
+
+    // show wait dialog
+    QObject *dialog =  static_cast<QObject*>(Notifications::showWaitDialog("Initializing"));
+
+    // Get application list from engine
+    if(!mEngine->listOfAllApps(apps)) {
+        Notifications::showErrorNote("Unable to refresh list");
+    }
+    
+    // Format values to list widget
+    int i = 0;
+    while(i < apps.size()) {
+        mApplicationList->addItem(/*HbIcon(":/gfx/check.svg"),*/apps.at(i));
+        i++;
+    }
+    mApplicationList->selectAll();
+    
+    // remove the wait dialog
+    delete dialog;
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::connectSignalsAndSlots()
+{
+    // Actions
+    connect(mActionRefresh, SIGNAL(triggered()), this, SLOT(refreshAppList()));
+    connect(mActionLaunchApps, SIGNAL(triggered()), this, SLOT(launchSelectedApplications()));
+    connect(mActionLaunchAndCloseApps, SIGNAL(triggered()), this, SLOT(launchAndCloseSelectedApplications()));
+    connect(mActionSelectAll, SIGNAL(triggered()), this, SLOT(selectAllItems()));
+    connect(mActionUnselectAll, SIGNAL(triggered()), this, SLOT(unselectAllItems()));
+    connect(mActionSkipHidden, SIGNAL(triggered()), this, SLOT(launchOptionsSkipHidden()));
+    connect(mActionDontSkipHidden, SIGNAL(triggered()), this, SLOT(launchOptionsDontSkipHidden()));
+    connect(mActionOpenOutputView, SIGNAL(triggered()), this, SLOT(openOutputView()));
+}
+
+// ---------------------------------------------------------------------------
+
+
+void ApplicationView::loadItemsFromXml(HbDocumentLoader &loader)
+{
+    
+    // List widget:
+    QGraphicsWidget *widget = loader.findWidget(LISTVIEW);
+    Q_ASSERT_X((widget != 0), "Launcher", "Invalid launcher.xml file");
+    mApplicationList = qobject_cast<HbListWidget *>(widget);
+    
+    /* ACTIONS: */
+    //refresh
+    QObject *object= loader.findObject(ACTIONREFRESH);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionRefresh = qobject_cast<HbAction *>(object);
+    
+    // launch applications
+    object= loader.findObject(ACTIONLAUNCHAPPS);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionLaunchApps = qobject_cast<HbAction *>(object);
+
+    // launch and close
+    object= loader.findObject(ACTIONLAUNCHANDCLOSEAPPS);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionLaunchAndCloseApps = qobject_cast<HbAction *>(object);
+    
+    // select all applications
+    object= loader.findObject(ACTIONSELECT);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionSelectAll = qobject_cast<HbAction *>(object);
+    
+    // unselect all applications
+    object= loader.findObject(ACTIONUNSELECT);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionUnselectAll = qobject_cast<HbAction *>(object);
+    
+    // open output view
+    object= loader.findObject(ACTIONOPENOUTPUTVIEW);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionOpenOutputView = qobject_cast<HbAction *>(object);
+    
+    // skip hidden
+    object= loader.findObject(ACTIONSKIPHIDDEN);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionSkipHidden = qobject_cast<HbAction *>(object);
+    
+    // do not skip hidden
+    object= loader.findObject(ACTIONDONTSKIPHIDDEN);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionDontSkipHidden = qobject_cast<HbAction *>(object);
+    
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::launchSelectedApplications()
+{
+    QModelIndexList list = mApplicationList->selectionModel()->selectedIndexes();
+    mEngine->startAppLaunching(list, false);
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::launchAndCloseSelectedApplications()
+{
+    QModelIndexList list = mApplicationList->selectionModel()->selectedIndexes();
+    mEngine->startAppLaunching(list, true);
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::selectAllItems()
+{
+    mApplicationList->selectAll();
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::unselectAllItems()
+{
+    mApplicationList->clearSelection();
+}
+// ---------------------------------------------------------------------------
+
+void ApplicationView::launchOptionsSkipHidden()
+{
+    mActionSkipHidden->setChecked(true);
+    mActionDontSkipHidden->setChecked(false);
+    mEngine->setSkipHiddenAndEmbedOnly(true);
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::launchOptionsDontSkipHidden()
+{
+    mActionSkipHidden->setChecked(false);
+    mActionDontSkipHidden->setChecked(true);
+    mEngine->setSkipHiddenAndEmbedOnly(false);
+}
+
+// ---------------------------------------------------------------------------
+
+void ApplicationView::openOutputView()
+{
+    qDebug("OpenOutputView");
+    LauncherMainWindow *pMainWindow = static_cast< LauncherMainWindow * >( mainWindow() );
+    if( pMainWindow )
+        {
+        pMainWindow->openOutputView();
+        }
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/applicationview.xml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.2">
+    <object name="actionLaunchApps" type="HbAction">
+        <string name="iconText" value="LaunchApps"/>
+        <string name="text" value="Launch selected"/>
+        <string name="toolTip" value="LaunchApps"/>
+    </object>
+    <object name="actionLaunchAppsAndClose" type="HbAction">
+        <string name="iconText" value="LaunchAppsAndClose"/>
+        <string name="text" value="Launch and close selected"/>
+        <string name="toolTip" value="LaunchAppsAndClose"/>
+    </object>
+    <object name="actionRefresh" type="HbAction">
+        <string name="iconText" value="RefreshList"/>
+        <string name="text" value="Refresh list"/>
+        <string name="toolTip" value="RefreshList"/>
+    </object>
+    <object name="actionSelectAll" type="HbAction">
+        <string name="iconText" value="Select/Unselect"/>
+        <string name="text" value="Select all"/>
+        <string name="toolTip" value="Select/Unselect"/>
+    </object>
+    <object name="actionUnselectAll" type="HbAction">
+        <string name="iconText" value="Unselect All"/>
+        <string name="text" value="Unselect all"/>
+        <string name="toolTip" value="Unselect All"/>
+    </object>
+    <object name="actionSkipHidden" type="HbAction">
+        <string name="iconText" value="Skip hidden &amp; embed"/>
+        <string name="text" value="Skip hidden &amp; embed"/>
+        <string name="toolTip" value="Skip hidden &amp; embed"/>
+    </object>
+    <object name="actionDontSkipHidden" type="HbAction">
+        <string name="iconText" value="Do not skip any entries"/>
+        <string name="text" value="Do not skip any entries"/>
+        <string name="toolTip" value="Do not skip any entries"/>
+    </object>
+    <object name="actionOpenOutputView" type="HbAction">
+        <string name="iconText" value="Open output view"/>
+        <string name="text" value="Open output view"/>
+        <string name="toolTip" value="Open output view"/>
+    </object>
+    <widget name="applicationview" type="ApplicationView">
+        <widget name="applicationContent" role="HbView:widget" type="HbWidget">
+            <widget name="applicationList" type="HbListWidget">
+                <sizehint height="320.0" type="PREFERRED" width="240.0"/>
+                <zvalue value="278529.0001"/>
+            </widget>
+            <layout type="anchor" widget="applicationContent">
+                <anchoritem dst="applicationList" dstEdge="LEFT" spacing="0.0" src="" srcEdge="LEFT"/>
+                <anchoritem dst="applicationList" dstEdge="TOP" spacing="0.0" src="" srcEdge="TOP"/>
+                <anchoritem dst="applicationList" dstEdge="RIGHT" spacing="0.0" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="applicationList" dstEdge="BOTTOM" spacing="0.0" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+        <widget name="viewMenu" role="HbView:menu" type="HbMenu">
+            <ref object="actionLaunchAppsAndClose" role="HbMenu:addAction"/>
+            <ref object="actionLaunchApps" role="HbMenu:addAction"/>
+            <widget name="menuLaunchOptions" role="HbMenu:menu" type="HbMenu">
+                <ref object="actionSkipHidden" role="HbMenu:addAction"/>
+                <ref object="actionDontSkipHidden" role="HbMenu:addAction"/>
+                <string name="title" value="Launch options"/>
+            </widget>
+            <ref object="actionRefresh" role="HbMenu:addAction"/>
+            <ref object="actionSelectAll" role="HbMenu:addAction"/>
+            <ref object="actionUnselectAll" role="HbMenu:addAction"/>
+        </widget>
+        <widget name="viewToobar" role="HbView:toolBar" type="HbToolBar">
+            <ref object="actionOpenOutputView" role="HbToolBar:addAction"/>
+        </widget>
+        <string name="title" value="Applications"/>
+    </widget>
+    <metadata display="QHD portrait" unit="px"/>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/commonActions.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,143 @@
+/*
+* 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 <hbapplication.h>
+#include <hbinstance.h>
+
+#include "hbaction.h"
+#include "hbmenu.h"
+#include "commonActions.h"
+#include "notifications.h"
+#include "enginewrapper.h"
+
+// ---------------------------------------------------------------------------
+
+CommonActions::CommonActions(EngineWrapper *engine, HbApplication *application)
+    : mEngine(engine), mApplication(application)
+{
+
+    
+    mActionStopLaunch = new HbAction("Stop launch", this);
+    mActionSendLog = new HbAction("Send log", this);
+    mActionDeleteLog = new HbAction("Delete log", this);
+    mActionSendDllInfo = new HbAction("Send list of DLLs", this);
+    mActionCompareDllInfo = new HbAction("Dll BC analysis", this);
+    mActionAbout = new HbAction("About", this);
+    mActionExit = new HbAction("Exit", this);
+
+
+    connectSignalsAndSlots();
+}
+
+// ---------------------------------------------------------------------------
+
+CommonActions::~CommonActions()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::showAbout()
+{
+    Notifications::about();
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::exit()
+{
+    mApplication->exit();
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::sendDllInfo()
+{
+    if (!mEngine->sendListOfDlls()) {
+        Notifications::showErrorNote("Unable to send list");
+    }
+
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::compareDllInfo()
+{
+    mEngine->compareDlls();
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::sendLog()
+{
+    if (!mEngine->sendLog()) {
+        Notifications::showErrorNote("Unable to send log");
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::deleteLog()
+{
+    if (mEngine->deleteLog()) {
+        QString text = "Log file(s) deleted";
+        Notifications::showInformationNote(text);
+    }
+    else {
+        QString text = "Unable to delete";
+        Notifications::showErrorNote(text);
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::stopLaunch()
+{
+    if (!mEngine->stopLaunching()) {
+        Notifications::showErrorNote("Unable to stop launching");
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::addActionsToMenu(HbMenu *menu)
+{
+    menu->addAction(mActionStopLaunch);
+    menu->addAction(mActionSendLog);
+    menu->addAction(mActionDeleteLog);
+    HbMenu *menuDllInfo = menu->addMenu("Dll Info");
+    menuDllInfo->addAction(mActionSendDllInfo);
+    menuDllInfo->addAction(mActionCompareDllInfo);
+    menu->addAction(mActionAbout);
+    menu->addAction(mActionExit);
+}
+
+// ---------------------------------------------------------------------------
+
+void CommonActions::connectSignalsAndSlots()
+{
+    connect(mActionStopLaunch, SIGNAL(triggered()), this, SLOT(stopLaunch()));
+    connect(mActionSendDllInfo, SIGNAL(triggered()), this, SLOT(sendDllInfo()));
+    connect(mActionCompareDllInfo, SIGNAL(triggered()), this, SLOT(compareDllInfo()));
+    connect(mActionSendLog, SIGNAL(triggered()), this, SLOT(sendLog()));
+    connect(mActionDeleteLog, SIGNAL(triggered()), this, SLOT(deleteLog()));
+    connect(mActionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
+    connect(mActionExit, SIGNAL(triggered()), this, SLOT( exit() ) );
+}
+
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/enginewrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,355 @@
+/*
+* 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 <xqconversions.h>
+#include <hbinputdialog.h>
+#include <bautils.h>
+#include <shareuidialog.h>
+#include <eikenv.h>
+#include <hbprogressdialog.h>
+#include <hbaction.h>
+#include <QDebug>
+
+#include "launchermainwindow.h"
+#include "notifications.h"
+#include "enginewrapper.h"
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::EngineWrapper(LauncherMainWindow* mainWindow)
+: mEngine(0), 
+  mMainWindow(mainWindow),
+  mProgressDialog(0),
+  mWaitDialog(0)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::~EngineWrapper()
+{
+    if (mEngine != NULL) {
+        delete mEngine;
+        mEngine = NULL;
+    }
+    if (mProgressDialog != NULL) {
+        delete mProgressDialog;
+        mProgressDialog = NULL;
+    }
+    if (mWaitDialog != NULL) {
+        delete mWaitDialog;
+        mWaitDialog = NULL;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::init()
+{
+    
+    // construct engine
+    TRAPD(error, mEngine = CLauncherEngine::NewL(this));
+    if (error != KErrNone) {
+        return false;
+    }
+    
+    return true;
+   
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::listOfAllApps(QStringList &allAppsQStringList){
+    
+    // Get application CDesCArray list from engine
+    CDesCArray* allAppsCDescArray = 0;
+    TRAPD(error, allAppsCDescArray = mEngine->ListOfAllAppsL());
+    if(error != KErrNone) {
+        return false;
+    }
+        
+    //convert CDesCArray to QStringList
+    for (int i = 0; i < allAppsCDescArray->Count(); i++) {
+        allAppsQStringList.append(QString::fromUtf16(
+                allAppsCDescArray->MdcaPoint(i).Ptr(),
+                allAppsCDescArray->MdcaPoint(i).Length()));
+    }
+    return true;
+}
+
+// ---------------------------------------------------------------------------
+bool EngineWrapper::startAppLaunching(const QModelIndexList &qList, bool autoClose) 
+{
+    
+    // check if used has not selected any files
+    if (qList.size() == 0) {
+        Notifications::showErrorNote("Nothing selected");
+        return false;
+    }
+
+    bool retval(true);
+    CArrayFix<TInt>* pArrayFix = NULL;
+    try{
+        // Create CArrayFix for application numbers that are launched and Qlist into CArrayFix
+        QT_TRAP_THROWING( pArrayFix = QModelIndexListToCArrayFixL(qList) );
+        
+        // Start launching applications
+        QT_TRAP_THROWING(mEngine->StartAppLaunchingL(pArrayFix, autoClose ? ETrue : EFalse));
+    }
+    catch (const std::exception &e){
+        qDebug() << "EngineWrapper::startAppLaunching - exception: " << e.what();
+        retval = false;
+    }
+    
+    if(pArrayFix)
+        delete pArrayFix;
+    
+    return retval;
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::stopLaunching()
+{
+    TRAPD(error, mEngine->StopLaunchingL());
+    if (error != KErrNone) {
+        return false;
+    }
+    else {
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::sendLog()
+{
+    ShareUi dialog;
+    QList<QVariant> fileList;
+
+    if( mEngine->LogFileExists() )
+        {
+        const TDesC& logFilePath = mEngine->LogFilePath();
+        fileList.append( QString::fromUtf16( logFilePath.Ptr(), logFilePath.Length() ) );
+        }
+    if( mEngine->BCLogFileExists() )
+        {
+        const TDesC& BCLogFilePath = mEngine->BCLogFilePath();
+        fileList.append( QString::fromUtf16( BCLogFilePath.Ptr(), BCLogFilePath.Length() ) );
+        }
+    
+    if( !fileList.empty()){
+        dialog.init(fileList,true);   
+        return true;
+    }
+    else{
+        return false;
+    }
+    
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::deleteLog()
+{
+    // if log file exists delete it.
+    if (mEngine->LogFileExists()) {
+        if (mEngine->DeleteLogFile() != KErrNone) {
+            return false;
+        }
+    }
+    
+    //if BC log file exists, delete it.
+    if (mEngine->BCLogFileExists()) {
+        if (mEngine->DeleteBCLogFile() != KErrNone) {
+            return false;
+        }
+    }
+    
+    return true;
+
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::sendListOfDlls()
+{
+    const TDesC& systemDllsFilePath = mEngine->SystemDllsFilePath();
+    
+    if ( BaflUtils::FileExists( CEikonEnv::Static()->FsSession(), systemDllsFilePath) ){
+        ShareUi dialog;
+        QList<QVariant> fileList;
+        fileList.append( QString::fromUtf16( systemDllsFilePath.Ptr(), systemDllsFilePath.Length() ) );
+        dialog.init(fileList,true); 
+        return true;
+    }
+    else{
+        Notifications::showErrorNote("DLL list does not exist");
+        return false;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::doCompareDlls(HbAction* action)
+    {
+    HbInputDialog *dlg = static_cast<HbInputDialog*>(sender());
+    if( action && !action->text().compare("ok", Qt::CaseInsensitive) )
+        {
+        TFileName fileName( dlg->value().toString().utf16() );
+        TRAPD(error,  mEngine->AnalyseDLLsL( fileName ) );
+        if( error != KErrNone )
+            { 
+            HideWaitDialog();
+            HideProgressBar();
+            Notifications::showErrorNote( QString("Error in analyse: %1").arg( error ) );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::compareDlls()
+{
+    const TDesC& requiredDllsFileName = mEngine->RequiredDllsFilePath();
+    QString fileName = QString::fromUtf16( requiredDllsFileName.Ptr(), requiredDllsFileName.Length() );
+    HbInputDialog::getText( "Select input file for BC analysis:", this, SLOT(doCompareDlls(HbAction*)), fileName );
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::ShowProgressBar(const TDesC& descText, TInt minimum, TInt maximum)
+{
+    QString qStringText = XQConversions::s60DescToQString(descText);
+   
+    if(mProgressDialog){
+        delete mProgressDialog;
+        mProgressDialog = NULL;
+    }
+    mProgressDialog = new HbProgressDialog( HbProgressDialog::ProgressDialog );
+    
+    if( maximum > 0 )
+        mProgressDialog->setRange(minimum, maximum);
+    //iProgressDialog->setAutoClose(true);
+    mProgressDialog->setText(qStringText);
+    connect(mProgressDialog, SIGNAL(cancelled()), this, SLOT(CancelDllBCanalysis()));
+    mProgressDialog->show();
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::SetProgressBarValue(TInt value)
+{
+    if (mProgressDialog && value > 0 ){
+        mProgressDialog->setProgressValue(value);
+    }
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::HideProgressBar()
+{
+    if (mProgressDialog != NULL) {
+        disconnect(mProgressDialog, SIGNAL(cancelled), this, SLOT(CancelDllBCanalysis()));
+        delete mProgressDialog;
+        mProgressDialog = NULL;
+    }
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::CancelDllBCanalysis()
+{
+    mEngine->CancelBCAnalysis();
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::ShowWaitDialog(const TDesC& descText)
+{
+    QString qStringText = XQConversions::s60DescToQString(descText);
+   
+    if(mWaitDialog){
+        delete mWaitDialog;
+        mWaitDialog = NULL;
+    }
+    mWaitDialog = Notifications::showWaitDialog(qStringText);
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::HideWaitDialog()
+{
+    if (mWaitDialog != NULL) {
+        delete mWaitDialog;
+        mWaitDialog = NULL;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::setSkipHiddenAndEmbedOnly(bool skip)
+{
+    if(skip) {
+        mEngine->SetSkipHiddenAndEmbedOnly(ETrue);
+    }
+    else {
+        mEngine->SetSkipHiddenAndEmbedOnly(EFalse);
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ChangeFocusToOutputView()
+{
+    mMainWindow->openOutputView();
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::PrintText(const TDesC& descText)
+{
+    
+    // Convert the descriptor to QString
+    QString qStringText = XQConversions::s60DescToQString(descText);
+    mMainWindow->printText(qStringText);
+}
+
+// ---------------------------------------------------------------------------
+
+CArrayFix<TInt>* EngineWrapper::QModelIndexListToCArrayFixL(const QModelIndexList& qlist)
+{
+    CArrayFix<TInt>* pArrayFix = new (ELeave) CArrayFixFlat<TInt>( qlist.size() );
+    CleanupStack::PushL(pArrayFix);
+    for (int j = 0; j < qlist.size(); j++) {
+        pArrayFix->AppendL(qlist.at(j).row());
+    }
+    CleanupStack::Pop(pArrayFix);
+    return pArrayFix;
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowErrorMessage(const TDesC& descText)
+{
+    QString qStringText = XQConversions::s60DescToQString(descText);
+    Notifications::showErrorNote(qStringText);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowInfoMessage(const TDesC& descText)
+{
+    QString qStringText = XQConversions::s60DescToQString(descText);
+    Notifications::showInformationNote(qStringText);
+}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/launchermainwindow.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* 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 <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbdocumentloader.h>
+
+#include "enginewrapper.h"
+#include "commonActions.h"
+#include "applicationview.h"
+#include "outputview.h"
+#include "launchermainwindow.h"
+
+// Here we create custom document loader to be able to use custom views in XML.
+class LauncherDocumentLoader : public HbDocumentLoader
+{
+public:
+    virtual QObject *createObject(const QString& type, const QString &name);
+};
+
+QObject *LauncherDocumentLoader::createObject(const QString& type, const QString &name)
+{
+    // Application view
+    if (type == ApplicationView::staticMetaObject.className()) {
+        QObject *object = new ApplicationView;
+        object->setObjectName(name);
+        return object;
+    }
+    
+    // Output view
+    else if (type == OutputView::staticMetaObject.className()) {
+        QObject *object = new OutputView;
+        object->setObjectName(name);
+        return object;
+    }
+    
+    return HbDocumentLoader::createObject(type, name);
+}
+
+
+LauncherMainWindow::LauncherMainWindow( QWidget *parent ) : HbMainWindow( parent )
+    ,mEngineWrapper(0)
+    ,mApplicationView(0)
+    ,mOutputView(0)
+    ,mCommonActions(0)
+    {
+    }
+
+LauncherMainWindow::~LauncherMainWindow ()
+    {
+    if(mCommonActions)
+        delete mCommonActions;
+    if(mEngineWrapper)
+        delete mEngineWrapper;
+    }
+
+int LauncherMainWindow::init( HbApplication &app )
+    {
+    
+    // Create Engine Wrapper and initialize it
+    mEngineWrapper = new EngineWrapper(this);
+    if (!mEngineWrapper->init()) {
+        return EXIT_FAILURE;
+    }
+    
+    // Create common actions class for actions that are used in all views of Launcher        
+    mCommonActions = new CommonActions(mEngineWrapper, &app);
+
+    // Create document loader
+    LauncherDocumentLoader loader;
+    
+    // Create application view
+    mApplicationView = ApplicationView::create(loader, mCommonActions, mEngineWrapper);
+    // Add view to main window
+    addView(mApplicationView);
+
+    loader.reset();
+    
+    // Create output view
+    mOutputView = OutputView::create(loader, mCommonActions);
+    // Add view to main window
+    addView(mOutputView);
+    
+    // Show ApplicationView at startup
+    setCurrentView(mApplicationView);
+    
+    // Show HbMainWindow
+    show();
+
+    return 0;// no errors
+    }
+
+void LauncherMainWindow::openApplicationView()
+    {
+    setCurrentView(mApplicationView);
+    }
+
+void LauncherMainWindow::openOutputView()
+    {
+    setCurrentView(mOutputView);
+    }
+
+void LauncherMainWindow::printText(const QString &text)
+    {
+    mOutputView->printText(text);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/main.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* 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 <hbapplication.h>
+#include <launchermainwindow.h>
+
+
+int main(int argc, char *argv[])
+{
+
+    // Create application, main window.
+    HbApplication app(argc, argv);
+    // Create main window
+    LauncherMainWindow mainWindow;
+    // init main window
+    int error = mainWindow.init(app);
+    if(error)
+        return error;
+    // enter event loop
+    return app.exec();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/notifications.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <hblabel.h>
+#include <hbdeviceprogressdialog.h>
+#include <hbmessagebox.h>
+
+
+#include "notifications.h"
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout )
+{
+    HbMessageBox *messageBox = new HbMessageBox(type);
+    messageBox->setText(text);
+    if(label.length())
+        {
+        HbLabel *header = new HbLabel(label, messageBox);
+        messageBox->setHeadingWidget(header);
+        }
+    messageBox->setAttribute(Qt::WA_DeleteOnClose);
+    messageBox->setTimeout(timeout);
+    messageBox->open();
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::about()
+{
+    Notifications::showMessageBox( 
+        HbMessageBox::MessageTypeInformation, 
+        "Version 4.0.1 - 21st May 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.", 
+        "About Launcher"
+        );
+}
+
+// ---------------------------------------------------------------------------
+
+HbDeviceProgressDialog* Notifications::showWaitDialog(const QString &text)
+{
+    HbDeviceProgressDialog *note = new HbDeviceProgressDialog( HbProgressDialog::WaitDialog );
+    note->setText( text );
+    note->setAction(0);
+    note->show();
+    return note;
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showInformationNote(const QString &text)
+{
+    Notifications::showMessageBox( 
+        HbMessageBox::MessageTypeInformation,
+        text, 
+        "", // no label
+        3000
+        );
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showErrorNote(const QString &text)
+{
+    Notifications::showMessageBox( 
+        HbMessageBox::MessageTypeWarning,
+        text, 
+        "", // no label
+        3000
+        );
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/outputview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,159 @@
+/*
+* 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 <hbdocumentloader.h>
+#include <launchermainwindow.h>
+#include <hbaction.h>
+#include <hbmenu.h>
+#include <hbtextedit.h>
+
+#include "enginewrapper.h"
+#include "commonActions.h"
+#include "outputview.h"
+
+// xml definition of view
+const char *OUTPUTVIEW_XML = ":/xml/outputview.xml";
+
+// name of the output view object in the xml file.
+const char *OUTPUTVIEW = "outputview";
+const char *ACTIONCLEAR = "actionClearWindow";
+const char *TEXTOUTPUT = "textEdit";
+const char *ACTIONOPENAPPLICATIONVIEW = "actionOpenApplicationView";
+
+// ---------------------------------------------------------------------------
+
+
+OutputView::OutputView():
+    mActionClear(0),
+    mActionOpenApplicationView(0),
+    mTextOutput(0)
+{
+
+}
+
+// ---------------------------------------------------------------------------
+
+OutputView::~OutputView()
+{
+    if(mActionClear)
+        mActionClear->deleteLater();
+    if(mActionOpenApplicationView)
+        mActionOpenApplicationView->deleteLater();
+}
+
+
+// ---------------------------------------------------------------------------
+
+OutputView* OutputView::create(HbDocumentLoader &loader, 
+                        CommonActions *commonActions)
+{
+    // Load application view from xml-file
+    bool ok = false;
+    loader.load(OUTPUTVIEW_XML, &ok);
+    
+    // Output View:
+    QGraphicsWidget *widget = loader.findWidget(OUTPUTVIEW);
+    Q_ASSERT_X(ok && (widget != 0), "Launcher", "Invalid launcher.xml file");
+    OutputView *outputView = qobject_cast<OutputView *>(widget);
+    
+    // initialize view
+    outputView->init(loader, commonActions);
+    
+    return outputView;
+}
+
+// ---------------------------------------------------------------------------
+
+
+void OutputView::loadItemsFromXml(HbDocumentLoader &loader)
+{
+
+    // List widget:
+    QGraphicsWidget *widget = loader.findWidget(TEXTOUTPUT);
+    Q_ASSERT_X((widget != 0), "Launcher", "Invalid launcher.xml file");
+    mTextOutput = qobject_cast<HbTextEdit *>(widget);
+
+    // clear action:
+    QObject *object= loader.findObject(ACTIONCLEAR);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionClear = qobject_cast<HbAction *>(object);
+    
+    // open output view
+    object= loader.findObject(ACTIONOPENAPPLICATIONVIEW);
+    Q_ASSERT_X((object != 0), "Launcher", "Invalid launcher.xml file");
+    mActionOpenApplicationView = qobject_cast<HbAction *>(object);
+
+}
+
+// ---------------------------------------------------------------------------
+
+
+void OutputView::init(HbDocumentLoader &loader, CommonActions *commonActions)
+{
+    loadItemsFromXml(loader);
+    connectSignalsAndSlots();
+
+    // set text edit components settings
+    mTextOutput->setPlainText("Ready.\n\n");
+    mTextOutput->setReadOnly(true);
+    mTextOutput->setCursorVisibility( Hb::TextCursorHidden );
+    mTextOutput->setAttribute(Qt::WA_InputMethodEnabled, false);
+    
+    // add actions to menu
+    commonActions->addActionsToMenu(menu());
+
+}
+
+// ---------------------------------------------------------------------------
+
+void OutputView::connectSignalsAndSlots()
+{
+    // Clear action
+    connect(mActionClear, SIGNAL(triggered()), this, SLOT(clearOutput()));
+    connect(mActionOpenApplicationView, SIGNAL(triggered()), this, SLOT(openApplicationView()));
+}
+
+// ---------------------------------------------------------------------------
+
+void OutputView::clearOutput()
+{
+    mTextOutput->setPlainText("");
+}
+
+// ---------------------------------------------------------------------------
+
+void OutputView::printText(const QString &text)
+{
+    QString newText = mTextOutput->toPlainText() + text;
+    mTextOutput->setPlainText(newText);
+    mTextOutput->setCursorPosition(newText.length()-1);
+}
+
+// ---------------------------------------------------------------------------
+
+void OutputView::openApplicationView()
+{
+    qDebug("openApplicationView");
+    LauncherMainWindow *pMainWindow = static_cast< LauncherMainWindow * >( mainWindow() );
+    if( pMainWindow )
+        {
+        pMainWindow->openApplicationView();
+        }
+}
+
+// ---------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/launcher/src/outputview.xml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.2">
+    <object name="actionClearWindow" type="HbAction">
+        <string name="iconText" value="Clear window"/>
+    </object>
+    <object name="actionOpenApplicationView" type="HbAction">
+        <string name="iconText" value="Open application view"/>
+        <string name="text" value="Open application view"/>
+        <string name="toolTip" value="Open application view"/>
+    </object>
+    <widget name="outputview" type="OutputView">
+        <widget name="OutputContent" role="HbView:widget" type="HbWidget">
+            <widget name="textEdit" type="HbTextEdit">
+                <string name="plainText" value="Text"/>
+                <sizehint height="5.970149423688901un" type="PREFERRED" width="22.388060338833377un"/>
+            </widget>
+            <layout type="anchor" widget="OutputContent">
+                <anchoritem dst="textEdit" dstEdge="LEFT" spacing="0.0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="textEdit" dstEdge="TOP" spacing="0.0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="textEdit" dstEdge="RIGHT" spacing="0.0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="textEdit" dstEdge="BOTTOM" spacing="0.0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+        <widget name="viewMenu" role="HbView:menu" type="HbMenu">
+            <ref object="actionClearWindow" role="HbMenu:addAction"/>
+        </widget>
+        <widget name="viewToobar" role="HbView:toolBar" type="HbToolBar">
+            <ref object="actionOpenApplicationView" role="HbToolBar:addAction"/>
+        </widget>
+        <string name="title" value="Output"/>
+    </widget>
+    <metadata display="QHD portrait" unit="un"/>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen.hrh	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,190 @@
+/*
+* 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 LOADGEN_HRH
+#define LOADGEN_HRH
+
+enum TLoadGenCommandIds
+    {
+    ELoadGenCmdNewLoad,    
+    ELoadGenCmdNewLoadCPULoad,    
+    ELoadGenCmdNewLoadEatMemory,    
+    ELoadGenCmdNewLoadPhoneCall,    
+    ELoadGenCmdNewLoadNetConn,    
+    ELoadGenCmdNewLoadKeyPress,    
+    ELoadGenCmdNewLoadMessages,
+    ELoadGenCmdNewLoadApplications,
+    ELoadGenCmdNewLoadPhotoCaptures,
+    ELoadGenCmdNewLoadBluetooth,
+    ELoadGenCmdNewLoadPointerEvent,
+    ELoadGenStopAll,
+    ELoadGenSuspendAll,
+    ELoadGenResumeAll,
+
+    ELoadGenCmdLaunchPerfMon,
+    ELoadGenCmdAbout,
+
+    ELoadGenCmdSettingsChange,
+    ELoadGenCmdSettingsExit,
+    ELoadGenCmdSettingsBack,
+
+    ELoadGenSettingItemList
+    };
+
+enum TEditorFormItemIds
+    {
+    ELoadGenCPULoadQueryPriority = 1000,
+    ELoadGenCPULoadQueryMode,
+    ELoadGenCPULoadQueryType,
+    ELoadGenCPULoadQueryLength,
+    ELoadGenCPULoadQueryIdle,
+    ELoadGenCPULoadQueryVariance,
+    ELoadGenCPULoadQueryCpu,
+
+    ELoadGenMemoryEatQueryPriority,
+    ELoadGenMemoryEatQuerySource,
+    ELoadGenMemoryEatQueryType,
+    ELoadGenMemoryEatQueryBuffer,
+    ELoadGenMemoryEatQueryIdle,
+    ELoadGenMemoryEatQueryAmount,
+    ELoadGenMemoryEatQueryRandomMin,
+    ELoadGenMemoryEatQueryRandomMax,
+    ELoadGenMemoryEatQueryVariance,
+    
+    ELoadGenPhoneCallQueryPriority,
+    ELoadGenPhoneCallQueryDestination,
+    ELoadGenPhoneCallQueryLength,
+    ELoadGenPhoneCallQueryIdle,
+    ELoadGenPhoneCallQueryVariance,
+    
+    ELoadGenNetConnQueryPriority,
+    ELoadGenNetConnQueryDestination,
+    ELoadGenNetConnQueryIdle,
+    ELoadGenNetConnQueryVariance,
+   
+    ELoadGenKeyPressQueryPriority,
+    ELoadGenKeyPressQueryHeartBeat,
+    ELoadGenKeyPressQueryVariance,
+        
+    ELoadGenMessagesQueryPriority,        
+    ELoadGenMessagesQueryType,            // Message type
+    ELoadGenMessagesQueryDestination,     // Phone number
+    ELoadGenMessagesQueryAmount,          // Messages
+    ELoadGenMessagesQueryLength,          // Message length
+    ELoadGenMessagesQueryMessage,         // Message
+    ELoadGenMessagesQueryIdle,            // idle period 
+    ELoadGenMessagesQueryVariance,
+
+    ELoadGenApplicationsQueryPriority,
+    ELoadGenApplicationsLaunchingInterval,
+    ELoadGenApplicationsKeyPressQueryHeartBeat,
+    ELoadGenApplicationsMaxOpen,
+    ELoadGenApplicationsKeyPressType,
+    ELoadGenApplicationsQueryVariance,
+    
+    ELoadGenPhotoCaptureQueryPriority,
+    ELoadGenPhotoCaptureQueryDevice,    
+    ELoadGenPhotoCaptureQueryIdle,
+    ELoadGenPhotoCaptureQueryVariance,
+           
+    ELoadGenBluetoothQueryPriority,
+    ELoadGenBluetoothQueryIdle,
+    ELoadGenBluetoothQueryVariance,
+    
+    ELoadGenPointerEventQueryPriority,
+    ELoadGenPointerEventQueryHeartBeat,
+    ELoadGenPointerEventQueryVariance
+    };
+
+enum TItemActionMenuTypes
+    {
+    EItemActionMenuTypeStop = 0,
+    EItemActionMenuTypeSuspendResume,    
+    EItemActionMenuTypeEdit    
+    };
+
+enum TThreadPriorityTypes
+    {
+    EThreadPriorityTypeMuchLess = 0,    
+    EThreadPriorityTypeLess,    
+    EThreadPriorityTypeNormal,    
+    EThreadPriorityTypeMore,    
+    EThreadPriorityTypeMuchMore,    
+    EThreadPriorityTypeRealTime,    
+    EThreadPriorityTypeAbsoluteVeryLow,    
+    EThreadPriorityTypeAbsoluteLow,    
+    EThreadPriorityTypeAbsoluteBackground,    
+    EThreadPriorityTypeAbsoluteForeground,    
+    EThreadPriorityTypeAbsoluteHigh
+    };
+
+enum TCpuLoadMode
+    {
+    ECpuLoadModeYielding = 0,
+    ECpuLoadModeBlocking    
+    };
+                    
+enum TCpuLoadTypes
+    {
+    ECpuLoadTypeContinuous = 0,
+    ECpuLoadTypePeriodic    
+    };
+
+enum TMemoryEatTypes
+    {
+    EMemoryEatTypeMemoryToEat = 0,
+    EMemoryEatTypeMemoryToBeLeft,
+    EMemoryEatTypeWavy
+    };        
+
+enum TMemoryEatSourceTypes
+    {
+    EMemoryEatSourceTypeRAM = 0,
+    EMemoryEatSourceTypeDriveC,
+    EMemoryEatSourceTypeDriveD,
+    EMemoryEatSourceTypeDriveE,
+    EMemoryEatSourceTypeDriveF,
+    EMemoryEatSourceTypeDriveG,
+    EMemoryEatSourceTypeDriveH,
+    EMemoryEatSourceTypeDriveI,
+    EMemoryEatSourceTypeDriveJ,
+    EMemoryEatSourceTypeDriveK,
+    EMemoryEatSourceTypeDriveL,
+    EMemoryEatSourceTypeDriveM,
+    EMemoryEatSourceTypeDriveN
+    };
+
+enum TMessageTypes
+    {
+    EMessageTypeSMS = 0,
+    EMessageTypeMMS
+    };      
+
+enum TApplicationsKeyPressTypes
+    {
+    EApplicationsKeyPressTypeNone = 0,
+    EApplicationsKeyPressTypeArrows
+    };      
+
+enum TApplicationsEventTypes
+    {
+    EApplicationsCloseApplication = 0,
+    EApplicationsLaunchApplication
+    };      
+
+#endif      // LOADGEN_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_applications.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,197 @@
+/*
+* 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 LOADGEN_APPLICATIONS_H
+#define LOADGEN_APPLICATIONS_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <w32std.h>
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+class CLauncherEngine;
+
+// CLASS DECLARATIONS
+
+class CAppLauncher : public CLoadBase
+    {
+public:
+    static CAppLauncher* NewL( TApplicationsAttributes& aAttributes,
+                                TInt aReferenceNumber );
+    virtual ~CAppLauncher();
+        
+private: // Constructors
+    CAppLauncher( TApplicationsAttributes& aAttributes, 
+                    TInt aReferenceNumber );
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TApplicationsAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TApplicationsAttributes& aAttributes) { iAttributes = aAttributes; }
+	
+
+public:  // New static methods
+    static TInt ThreadFunction( TAny* aThreadArg );
+
+private:  // New static methods
+    static void GenerateLoad( TApplicationsAttributes& aAttributes );
+
+private: // Data
+    TApplicationsAttributes         iAttributes;    
+    RThread                         iThread;
+    };
+
+// Class to start launching applications in given period 
+
+// CLASS DECLARATIONS
+class CAppLauncherManager : public CActive
+    {
+public:
+    static CAppLauncherManager* NewL( TApplicationsAttributes& aAttributes );
+    ~CAppLauncherManager();
+
+private:
+    CAppLauncherManager( TApplicationsAttributes& aAttributes );
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+private:
+    static TInt PeriodicTimerCallBack( TAny* aAny );
+    void SimulateEventL();
+
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+
+private:
+    TApplicationsAttributes&    iAttributes;    
+    CPeriodic*                  iPeriodicTimer;
+    RWsSession                  iWsSession;
+    CLauncherEngine*            iLauncherEngine;
+    TInt                        iAppEventType;
+    }; 
+
+// A class where applicationg launching and ending is implemented 
+#include <aknappui.h>
+#include <apgcli.h>
+
+// FORWARD DECLARATIONS
+class CAppKeyPressManager;
+
+// CLASS DECLARATIONS
+class CLauncherEngine : public CBase
+    {
+public:
+    static CLauncherEngine* NewL( TApplicationsAttributes& aAttributes );
+    ~CLauncherEngine();
+
+public:
+    void StartAppLaunchingL();
+    void StopApplication( TBool aRandomApplication );
+    
+    
+private:
+    CLauncherEngine( TApplicationsAttributes& aAttributes );
+    void ConstructL();
+    TBool LaunchApplicationL();
+    void DoLaunchApplicationL();
+
+public:    
+    inline TInt AppLaunchCounter() { return iAppLaunchCounter; }
+    
+private:
+    RTimer          iTimer;
+    RApaLsSession   iLs;
+    RWsSession      iWs;
+    TInt            iAppLaunchCounter;
+    TUid            iCurrentAppUid;
+    TThreadId       iCurrentAppThreadId;
+    TBuf<128>       iCurrentAppNameAndExt;
+    RThread         iCurrentAppThread;
+    TInt            iParallelApplicationsCounter;
+    TApplicationsAttributes&    iAttributes;
+
+    CAppKeyPressManager* iAppKeyPressManager;
+    };
+
+
+// A class where key presses can be added to application
+#include <e32cmn.h>
+// FORWARD DECLARATIONS
+class CApplicationKeyPresses;
+// CLASS DECLARATIONS
+class CAppKeyPressManager : public CBase
+    {
+public:
+    static CAppKeyPressManager* NewL( TApplicationsAttributes& aAttributes );
+    ~CAppKeyPressManager();
+    void AddNewApplicationUidToKeyEventsL( TUid aUid );
+    TUid KillApplication( TBool aRandomApplication );
+    
+private:
+    CAppKeyPressManager( TApplicationsAttributes& aAttributes );
+    void ConstructL();
+
+private:
+    RPointerArray<CApplicationKeyPresses> iKeyPresses;
+    TApplicationsAttributes& iAttributes;    
+    }; 
+
+// A class which sends key press events to application
+// CLASS DECLARATIONS
+class CApplicationKeyPresses : public CBase
+    {
+public:
+    static CApplicationKeyPresses* NewL( TUid aUid, 
+                                            TApplicationsAttributes& aAttributes );
+    ~CApplicationKeyPresses();
+    
+private:
+    CApplicationKeyPresses( TUid aUid, TApplicationsAttributes& aAttributes );
+    void ConstructL();
+
+private:
+    static TInt PeriodicTimerCallBack( TAny* aAny );
+    void SimulateKeyEvent();
+
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+
+private:
+    TUid                        iUid;
+    TApplicationsAttributes&    iAttributes;
+    CPeriodic*                  iPeriodicTimer;
+    RWsSession                  iWsSession;
+public:
+    inline TUid ApplicationUid() { return iUid; };    
+    }; 
+
+#endif // LOADGEN_APPLICATIONS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_bluetooth.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef LOADGEN_BLUETOOTH_H
+#define LOADGEN_BLUETOOTH_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <centralrepository.h>
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+#include <es_sock.h>
+#include <bt_sock.h>
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATIONS
+
+class CBluetooth : public CLoadBase
+    {
+public:
+    static CBluetooth* NewL(TBluetoothAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CBluetooth();
+        
+private: // Constructors
+    CBluetooth(TBluetoothAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TBluetoothAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TBluetoothAttributes& aAttributes) { iAttributes = aAttributes; }
+    
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+    
+private:  // New static methods
+    static void GenerateLoad(TBluetoothAttributes& aAttributes);    
+    void InitializeBluetoothL();
+    TBool SetBTPowerState(TBool aState);
+    
+private: // Data
+           
+    TBluetoothAttributes    iAttributes;    
+    RThread                 iThread; 
+    };
+ 
+
+
+ 
+class CBTManager : public CActive//, public MBTPowerManagerObserver
+    {
+    public:
+        
+        static CBTManager* NewL(TBluetoothAttributes& aAttrs);
+        virtual ~CBTManager();
+ 
+    private:
+        
+        CBTManager( TBluetoothAttributes& aAttrs);
+        void ConstructL();
+        TInt StartBTDeviceDiscovery();
+ 
+    private:
+            
+        static TInt PeriodicTimerCallBack(TAny* aAny);        
+    public:
+                                                        
+        /**
+         * From CActive:
+         */
+        void RunL();
+        void DoCancel();       
+
+    private:
+        
+        CPeriodic*              iPeriodicTimer;
+        TBluetoothAttributes&   iAttributes;  
+        CRepository*            iBTPowerStateCRepo;
+        RSocketServ             iSocketServerHnd;
+        RHostResolver           iHostResolver;        
+        TNameEntry              iBTNameEntry;        
+    };
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_cpuload.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* 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 LOADGEN_CPULOAD_H
+#define LOADGEN_CPULOAD_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+
+
+
+// CLASS DECLARATIONS
+
+class CCPULoad : public CLoadBase
+    {
+public:
+    static CCPULoad* NewL(TCPULoadAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CCPULoad();
+        
+private: // Constructors
+    CCPULoad(TCPULoadAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TCPULoadAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TCPULoadAttributes& aAttributes) { iAttributes = aAttributes; }
+
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+
+private:  // New static methods
+    static void GenerateLoad(TCPULoadAttributes& aAttributes);
+    static void DoHeaveStuff(TInt aMode);
+
+private: // Data
+    TCPULoadAttributes      iAttributes;    
+    RThread                 iThread;
+    };
+ 
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_httpreceiver.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,183 @@
+
+
+#ifndef CHTTPReceiver_H
+#define CHTTPReceiver_H
+
+#include <http.h>
+#include <mhttpdatasupplier.h>
+#include <mhttptransactioncallback.h>
+#include <es_sock.h>
+#include <chttpformencoder.h> 
+
+// CONSTANTS
+// None.
+
+// MACROS
+#ifdef _DEBUG
+#define TRACE( text )         RDebug::Printf( text );
+#define TRACE2( text, arg )   RDebug::Printf( text, arg );
+#else
+#define TRACE( text )
+#define TRACE2( text, arg )
+#endif
+
+// DATA TYPES
+// None.
+
+// FUNCTION PROTOTYPES
+// None.
+
+// FORWARD DECLARATIONS
+// None.
+
+class MHTTPRecvObserver
+    {
+    public:
+       
+        /**
+        * Callback for HTTP response received.
+        * @param aStatus Status code.
+        * @return None.
+        */
+        virtual void HTTPFileReceived( TInt aStatus ) = 0;        
+    };
+
+// CLASS DECLARATION
+
+class CHTTPReceiver
+        : public CBase,
+          public MHTTPTransactionCallback
+    {
+    public: // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CHTTPReceiver* NewL( MHTTPRecvObserver& aObserver );
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CHTTPReceiver* NewLC( MHTTPRecvObserver& aObserver );        
+        
+        /**
+        * Destructor.
+        */        
+        virtual ~CHTTPReceiver();
+      
+        /**
+        * Cancels the current HTTP transaction.
+        */   
+        void CancelTransaction();
+
+        /**
+        * Opens a connection to destination aUri and sends data using HTTP GET. 
+        * Callbacks via MHTTPRecvObserver::HTTPFileReceived
+        * Leaves with KErrNotReady If network is not available
+        * @param aUri Destination URL, if http scheme not specified, prepends scheme.       
+        */                                 
+        void SendHTTPGetL( const TDesC8& aUri );
+        
+    protected: // Constructors and destructor
+
+        /**
+        * C++ default constructor.
+        */
+        CHTTPReceiver( MHTTPRecvObserver& aObserver );
+
+        /**
+        * Symbian 2nd phase constructor.
+        */
+        void ConstructL();
+      
+        /**
+        * Sets HTTP header fields.
+        * @param aHeaders HTTP headers.
+        * @param aHdrField Header field to set.
+        * @param aHdrValue Header field value.
+        */   
+        void SetHeaderL(RHTTPHeaders aHeaders, TInt aHdrField,
+						const TDesC8& aHdrValue);
+
+		//From MHTTPTransactionCallback
+        /**
+        * Called by HTTP framework when HTTP events occur.
+        * @param aTransaction The transaction that the event has occurred on.
+        * @param aEvent The event that has occurred.
+        */           
+		void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
+		
+        /**
+        * Called when RunL leaves from a transaction event.
+        * @param aError The leave code that RunL left with.
+        * @param aTransaction The transaction that was being processed.
+        * @param aEvent The event that was being processed.
+        * @return KErrNone.
+        */   
+		TInt MHFRunError(	TInt aError,
+						RHTTPTransaction aTransaction,
+						const THTTPEvent& aEvent);
+						
+		/**
+        * Starts HTTP connection.
+        */   
+       	void SetupConnectionL();
+        
+        /**
+        * Utility:Checks for http uri scheme and prepends if not exists to the url
+        * @param aUri UriParser.
+        * @param aURL URL to check for.
+        * @return None 
+        */
+        void CheckForHTTPSchemeL(TUriParser8& aUri, const TDesC8& aURL);
+
+        /**
+        * Utility: finish receiving, call calback HTTPFileReceived()
+        * @param aError to be signaled
+        * @return None 
+        */
+        void Finalize();
+        
+    private:
+      	
+        // Request uri, might need to prepend http scheme.
+        HBufC8*					iUrl;
+        
+        // RSocketServ object.
+	    RSocketServ 			iSocketServ;
+        
+        // RConnection object.
+	    RConnection 			iConnection;
+	    
+	    // HTTP session.
+		RHTTPSession			iSession;
+		
+		// HTTP transaction used for request.
+		RHTTPTransaction		iTransaction;
+	
+		// Observer to notify.
+		MHTTPRecvObserver&	    iObserver;	
+
+		// ETrue if transaction in progress.
+		TBool					iRunning;	
+		
+		// ETrue if connection set up done.
+		TBool 					iConnectionSetupDone;                        
+		
+		// Response Status 
+		TInt                    iResponseStatus;
+		
+#ifdef _DEBUG
+		// Http response body written to file
+		RFile 					iResponseFile;
+		
+		// RFs to be used for writing to iResponseFile
+		RFs                     iFs;
+#endif
+		
+};
+    
+#endif
+
+// CHTTPReceiver_H
+// End of File	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_keypress.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* 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 LOADGEN_KEYPRESS_H
+#define LOADGEN_KEYPRESS_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <w32std.h>
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+
+
+
+// CLASS DECLARATIONS
+
+class CKeyPress : public CLoadBase
+    {
+public:
+    static CKeyPress* NewL(TKeyPressAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CKeyPress();
+        
+private: // Constructors
+    CKeyPress(TKeyPressAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TKeyPressAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TKeyPressAttributes& aAttributes) { iAttributes = aAttributes; }
+
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+
+private:  // New static methods
+    static void GenerateLoad(TKeyPressAttributes& aAttributes);
+
+private: // Data
+    TKeyPressAttributes         iAttributes;    
+    RThread                     iThread;
+    };
+
+
+class CKeyPressManager : public CActive
+    {
+public:
+    static CKeyPressManager* NewL(TKeyPressAttributes& aAttributes);
+    ~CKeyPressManager();
+
+private:
+    CKeyPressManager(TKeyPressAttributes& aAttributes);
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+private:
+    static TInt PeriodicTimerCallBack(TAny* aAny);
+    void SimulateKeyEvent();
+
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+
+private:
+    TKeyPressAttributes&    iAttributes;    
+    CPeriodic*              iPeriodicTimer;
+    RWsSession              iWsSession;
+    }; 
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_loadattributes.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,167 @@
+/*
+* 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 LOADGEN_LOADATTRIBUTES_H
+#define LOADGEN_LOADATTRIBUTES_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <badesca.h> // CDesCArray
+
+const TInt KCPUSelection_FreeScheduling = -1;
+const TInt KCPUSelection_AllCPUs        = 999;
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATIONS
+class TCPULoadAttributes
+    {
+public:
+    TUint iId;        
+    TUint iPriority;        
+    TUint iMode;        
+    TUint iType;        
+    TUint iLength;        
+    TUint iIdle;        
+    TUint iRandomVariance;
+    // iCpu defines in which CPU the load thread should be executed in 
+    // (in SMP environments). 0 = CPU0, 1 = CPU1 etc. Negative value means 
+    // that CPU is undefined. When CPU is undefined, Scheduler can schedule
+    // the load thread freely to any CPU as it pleases.
+    TInt  iCpu;
+    // Defines how many CPUs the running system has.
+    TUint iCpuCount;
+    };
+
+class TMemoryEatAttributes
+    {
+public:
+    TUint iId;        
+    TUint iPriority;        
+    TUint iSource;        
+    TUint iType;
+    TUint iBuffer;
+    TUint iIdle;
+    TInt64 iAmount;
+    TInt64 iRandomMin;
+    TInt64 iRandomMax;
+    TBuf<64> iAmountDes;
+    TBuf<64> iRandomMinDes;
+    TBuf<64> iRandomMaxDes;
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    }; 
+
+class TPhoneCallAttributes
+    {
+public:
+    TUint iId;        
+    TUint iPriority;        
+    TBuf<128> iDestination;
+    TUint iLength;        
+    TUint iIdle;        
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    };
+
+class TNetConnAttributes
+    {
+public:
+    TUint iId;        
+    TUint iPriority;        
+    TBuf<128> iDestination;
+    TUint iIdle;        
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    };
+
+class TKeyPressAttributes
+    {
+public:
+    TUint iId;        
+    TUint iPriority;        
+    TUint iHeartBeat;        
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    };
+
+class TPointerEventAttributes
+    {
+public:
+    TUint iId;        
+    TUint iPriority;        
+    TUint iHeartBeat;        
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    };
+
+class TMessageAttributes
+    {
+public:
+    TUint iId;
+    TInt iMessageType;
+    TBuf<128> iDestination;
+    TUint iPriority; 
+    TUint iAmount;
+    TInt iLength;    
+    TUint iIdle;    
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    };
+
+class TApplicationsAttributes
+    {
+public:
+    TUint iId;        
+    TUint iPriority;
+    TUint iLaunchingInterval;
+    TUint iKeyPressType;
+    TUint iMaxOpen;
+    TUint iHeartBeat;
+    TUint iRandomVariance;
+    CDesCArray* iAppsArray;
+    TRequestStatus* iDeathStatus;
+    };
+
+
+class TPhotoCaptureAttributes
+    {
+public:
+    TUint iId;    
+    TInt iPriority;
+    TInt iCameraCount;
+    TInt iCamera;
+    TUint iIdle;    
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    };
+
+class TBluetoothAttributes
+    {
+public:
+    TUint iId;    
+    TInt iPriority;    
+    TUint iIdle;    
+    TUint iRandomVariance;        
+    TRequestStatus* iDeathStatus;
+    TBool iBluetoothSupported;
+    };
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_loadbase.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* 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 LOADGEN_LOADBASE_H
+#define LOADGEN_LOADBASE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+#include "loadgen_loadbase.h"
+
+
+// FORWARD DECLARATIONS
+
+
+
+// CLASS DECLARATIONS
+
+class CLoadBase : public CBase
+    {
+public:
+    enum TLoadState
+        {
+        ELoadStateInvalid = -1,
+        ELoadStateConstructed,
+        ELoadStateRunning,
+        ELoadStateSuspended,
+        ELoadStateClosed
+        };
+        
+protected: // Constructors
+    CLoadBase();
+    void ConstructL();
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TInt State() { return iState; }
+    inline TInt Type() { return iType; }
+
+protected: // Data
+    TInt iState;
+    TInt iType;
+    };
+ 
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_memoryeat.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef LOADGEN_MEMORYEAT_H
+#define LOADGEN_MEMORYEAT_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <f32file.h>
+#include <e32hal.h>
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+
+
+
+// CLASS DECLARATIONS
+
+class CMemoryEat : public CLoadBase
+    {
+public:
+    static CMemoryEat* NewL(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CMemoryEat();
+        
+private: // Constructors
+    CMemoryEat(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TMemoryEatAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TMemoryEatAttributes& aAttributes) { iAttributes = aAttributes; }
+
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+private:
+    static void GenerateLoad(TMemoryEatAttributes& aAttributes);
+
+private: // Data
+    TMemoryEatAttributes    iAttributes;    
+    RThread                 iThread;
+    };
+
+
+class CMemoryEatManager : public CActive
+    {
+public:
+    static CMemoryEatManager* NewL(TMemoryEatAttributes& aAttributes);
+    ~CMemoryEatManager();
+
+private:
+    CMemoryEatManager(TMemoryEatAttributes& aAttributes);
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+private:
+    static TInt PeriodicTimerCallBack(TAny* aAny);
+    void InitMemoryEatL();
+    void DestroyMemoryEat();
+    void EatMemoryL();
+    void DoEatMemoryL( TInt64 aNewSize );
+    void HandleEatMemoryL( TInt64 aNewSize );
+    void AllocMemoryL( TInt64 aNewSize );
+    void FreeMemoryL( TInt64 aNewSize );
+    TInt64 ReadFreeMemory();
+    
+
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+
+private:
+    TMemoryEatAttributes&   iAttributes;    
+    CPeriodic*              iPeriodicTimer;
+    RChunk                  iEatChunk;
+    RFile                   iEatFile;
+    RFs                     iFs;
+    TBool                   iWavyEatMoreMemory;
+    TInt     iFilesCounter;
+    };
+     
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_messages.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,422 @@
+/*
+* 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 LOADGEN_MESSAGES_H
+#define LOADGEN_MESSAGES_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+class CSmsHandler;
+class CMmsHandler;
+
+const TInt EMaxMessageLength = 512;
+
+// CLASS DECLARATIONS
+
+class CMessages : public CLoadBase
+    {
+public:
+    static CMessages* NewL( TMessageAttributes& aAttributes, TInt aReferenceNumber );
+    virtual ~CMessages();
+        
+private: // Constructors
+    CMessages( TMessageAttributes& aAttributes, TInt aReferenceNumber );
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TMessageAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TMessageAttributes& aAttributes) { iAttributes = aAttributes; }
+
+public:  // New static methods
+    static TInt ThreadFunction( TAny* aThreadArg );
+
+private:  // New static methods
+    static void GenerateLoad( TMessageAttributes& aAttributes );
+
+private: // Data
+    TMessageAttributes            iAttributes;    
+    RThread                     iThread;
+
+    };
+
+
+class CMessageManager : public CActive
+    { 
+private:
+    enum TState
+        {
+        EStateIdle = 0,
+        EStateSend,
+        EStateSending        
+        };
+public:
+    static CMessageManager* NewL( TMessageAttributes& aAttributes );
+    virtual ~CMessageManager();
+
+
+private:
+    CMessageManager( TMessageAttributes& aAttributes );
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+private:
+    static TInt PeriodicTimerCallBack( TAny* aAny );
+    void HandleMessageSending();
+    void DoDial();
+    void DoHangup();
+    void CreateMessage();    
+
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+    void HandleStatus( TInt aErr );
+
+private:
+    TMessageAttributes&                   iAttributes;
+    CPeriodic*                          iPeriodicTimer;
+    TInt                                iState;
+    CSmsHandler*                        iSmsHandler;
+    CMmsHandler*                        iMmsHandler;
+    TInt                                iMessageCounter;
+    HBufC*                                iMessage;
+    }; 
+
+//  INCLUDES
+#include <e32base.h>
+#include <msvapi.h>
+#include <mtuireg.h>
+#include <txtrich.h>
+// CONSTANTS
+const TInt KBfrLength = 20;
+const TInt KTelephoneNumberMaxLength = 100;
+ 
+// FORWARD DECLARATIONS
+class CSmsAppUi;
+class CClientMtmRegistry;
+class CSmsClientMtm;
+ 
+// CLASS DECLARATION
+/**
+* CSmsHandler application engine class.
+* Takes care of sending and receiveing SMS messages using the SMS client MTM.
+* Interacts with the application UI class.
+*/
+class CSmsHandler : public CActive, public MMsvSessionObserver
+    {
+    public: // Constructors and destructor
+ 
+        /**
+        * NewL.
+        * Two-phased constructor.
+        * @param aSmsAppUi Pointer to AppUi instance.
+        * @return Pointer to the created instance of CSmsHandler.
+        */
+        static CSmsHandler* NewL( CMessageManager& aManager );
+ 
+        /**
+        * NewLC.
+        * Two-phased constructor.
+        * @param aSmsAppUi Pointer to AppUi instance.
+        * @return Pointer to the created instance of CSmsHandler.
+        */
+        static CSmsHandler* NewLC( CMessageManager& aManager );
+ 
+        /**
+        * ~CSmsHandler
+        * Destructor.
+        */
+        virtual ~CSmsHandler();
+ 
+    public: // New functions
+        /**
+        * SendL.
+        * Starts the process of creating and sending an SMS message.
+        * @param aRecipientNumber The number of the recipent.
+        * @param aMessageText The message text.
+        * @return ETrue if successful, EFalse if not.
+        */
+       TBool SendL( const TDesC& aRecipientNumber,
+                    const TDesC& aMessageText );
+ 
+    public: // Functions from base classes
+ 
+        /**
+        * From MMsvSessionObserver, HandleSessionEventL.
+        * Handles notifications of events from the Message Server.
+        * @param aEvent The event that has taken place
+        * @param aArg1 Event type-specific argument value
+        * @param aArg2 Event type-specific argument value
+        * @param aArg3 Event type-specific argument value
+        */
+        void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1,
+                                  TAny* aArg2, TAny* aArg3 );
+ 
+    protected: // Functions from base classes
+ 
+        /**
+        * From CActive, DoCancel.
+        * Cancels any outstanding requests.
+        */
+        void DoCancel();
+ 
+        /**
+        * From CActive, RunL.
+        * Handles an active object’s request completion event.
+        */
+        void RunL();
+ 
+    private: // Constructors
+ 
+        /**
+        * CSmsHandler.
+        * C++ default constructor.
+        * @param aSmsAppUi Pointer to AppUi instance.
+        */
+        CSmsHandler( CMessageManager& aManager );
+ 
+        /**
+        * ConstructL.
+        * 2nd phase constructor.
+        */
+        void ConstructL();
+ 
+    private: // New functions
+ 
+        /**
+        * AccessMtmL.
+        * Access the MTM Registry and create an SMS specific Client MTM instance.
+        */
+        void AccessMtmL();
+ 
+        /**
+        * CreateMsgL.
+        * Create an SMS message.
+        * @return ETrue if successful, EFalse is unsuccessful.
+        */
+        TBool CreateMsgL();
+ 
+        /**
+        * ScheduleL.
+        * Schedule an SMS message for sending.
+        */
+        void ScheduleL();
+ 
+        /**
+        * ValidateL.
+        * Validate an SMS message.
+        * @return ETrue if successful, EFalse is unsuccessful.
+        */
+        TBool ValidateL();
+ 
+    private: // Enumeration
+ 
+        /**
+        * TState, enumeration for the state of the handler, used by RunL().
+        */
+        enum TState
+            {
+            EWaitingForMoving = 1,
+            EWaitingForScheduling
+            };
+ 
+    private: // Data
+ 
+        /**
+        * iState, the state of the handler.
+        */
+        TState iState;
+ 
+        /**
+        * iSession, the contact database.
+        * Owned by CSmsHandler object.
+        */
+        CMsvSession* iSession;
+ 
+        /**
+        * iMtmRegistry, client MTM registry.
+        * Owned by CSmsHandler object.
+        */
+        CClientMtmRegistry* iMtmRegistry;
+ 
+        /**
+        * iSmsMtm, SMS specific Client MTM.
+        * Owned by CSmsHandler object.
+        */
+        CSmsClientMtm* iSmsMtm;
+ 
+        /**
+        * iOperation, the current message server operation.
+        * Owned by CSmsHandler object.
+        */
+        CMsvOperation* iOperation;
+ 
+        /**
+        * iRecipientNumber, telephone number of the recipient.
+        */
+        TBuf<KTelephoneNumberMaxLength> iRecipientNumber;
+ 
+        /**
+        * iMessageText, SMS message text.
+        */
+        TBuf<EMaxMessageLength> iMessageText;
+
+ 
+        /**
+        * iSmsAppUi, application UI
+        * Not owned by CSmsHandler object.
+        */
+        CSmsAppUi* iSmsAppUi;
+ 
+        /**
+        * iMtmUiRegistry, User Interface MTM Registry.
+        * Owned by CSmsHandler object.
+        */
+        CMtmUiRegistry* iMtmUiRegistry;
+        
+        CMessageManager& iManager;
+ 
+    };
+
+
+// INCLUDES
+#include <msvapi.h>                         // for MMsvSessionObserver 
+#include <mmsclient.h>                      // for CMmsClientMtm
+#include <coecntrl.h>
+
+// Forward declarations
+class CClientMtmRegistry;
+class CMsvSession;
+
+//
+// Container class to draw text on screen
+//
+class CMmsHandler : public CBase, public MMsvSessionObserver
+    {
+public: // Constructors and destructor
+
+    /**
+    * NewL.
+    * Two-phased constructor.
+    * @param aSmsAppUi Pointer to AppUi instance.
+    * @return Pointer to the created instance of CSmsHandler.
+    */
+    static CMmsHandler* NewL( CMessageManager& aManager );
+
+    /**
+    * NewLC.
+    * Two-phased constructor.
+    * @param aSmsAppUi Pointer to AppUi instance.
+    * @return Pointer to the created instance of CSmsHandler.
+    */
+    static CMmsHandler* NewLC( CMessageManager& aManager );
+
+    /**
+    * ~CSmsHandler
+    * Destructor.
+    */
+    virtual ~CMmsHandler();
+
+private: // Constructors
+
+    /**
+    * CSmsHandler.
+    * C++ default constructor.
+    * @param aSmsAppUi Pointer to AppUi instance.
+    */
+    CMmsHandler( CMessageManager& aManager );
+
+    /**
+    * ConstructL.
+    * 2nd phase constructor.
+    */
+    void ConstructL();
+
+public: // New functions
+    
+    /*
+     * Creates client MTM registry when session is ready for use. 
+     * This completes model construction and is called after 'server
+     * ready' event is received after async opening of CMsvSession.
+     */ 
+    void CompleteConstructL();
+       
+    /*
+     * CMmsHandler::CreateNewMessageL()
+     * Creates a new message server entry and set up default values.
+     * In case the attachment file does not found method return EFalse
+     * otherwise ETrue.
+     * There are differenses how to add attachment file between 2nd and 3rd edition.
+     */  
+     TBool CreateMsgL();
+
+    /**
+     * Send the message.
+     * Return values: ETrue or EFalse
+     */
+    TBool SendMessageL();
+        
+     /**
+      * SendL.
+      * Starts the process of creating and sending an SMS message.
+      * @param aRecipientNumber The number of the recipent.
+      * @param aMessageText The message text.
+      * @return ETrue if successful, EFalse if not.
+      */
+     TBool SendL( const TDesC& aRecipientNumber,
+                 const TDesC& aMessageText );     
+           
+private:    
+    // from MMsvSessionObserver
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
+  
+    void SetMessageBodyL();
+
+private:
+
+    CMsvSession* iSession;          // Client session on the message server
+    CMmsClientMtm* iMmsMtm;         // Message Type Module (MMS)
+    CClientMtmRegistry* iMtmReg;    // Mtm client registry for creating new mtms
+
+    /**
+    * iRecipientNumber, telephone number of the recipient.
+    */
+    TBuf<KTelephoneNumberMaxLength> iRecipientNumber;
+
+    /**
+    * iMessageText, SMS message text.
+    */
+    TBuf<EMaxMessageLength> iMessageText;
+    
+    CMessageManager& iManager;
+    
+    };
+#endif // LOADGEN_MESSAGES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_netconn.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* 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 LOADGEN_NETCONN_H
+#define LOADGEN_NETCONN_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "loadgen_httpreceiver.h"
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+class CNetConnManager;
+
+
+// CLASS DECLARATIONS
+
+class CNetConn : public CLoadBase
+    {
+public:
+    static CNetConn* NewL(TNetConnAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CNetConn();
+        
+private: // Constructors
+    CNetConn(TNetConnAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TNetConnAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TNetConnAttributes& aAttributes) { iAttributes = aAttributes; }
+
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+
+private:  // New static methods
+    static void GenerateLoad(TNetConnAttributes& aAttributes);
+
+private: // Data
+    TNetConnAttributes          iAttributes;    
+    RThread                     iThread;
+    };
+
+
+class CNetConnManager : public CActive, public MHTTPRecvObserver
+    {
+public:
+    static CNetConnManager* NewL(TNetConnAttributes& aAttributes);
+    ~CNetConnManager();
+
+private:
+    CNetConnManager(TNetConnAttributes& aAttributes);
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+private:
+    static TInt PeriodicTimerCallBack(TAny* aAny);
+    void StartDownloadL();
+
+private: // MHTTPRecvObserver
+    void HTTPFileReceived( TInt aStatus );
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+
+private:
+    TNetConnAttributes&     iAttributes;    
+    CPeriodic*              iPeriodicTimer;
+    CHTTPReceiver*          iHTTPReceiver;
+    }; 
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_phonecall.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* 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 LOADGEN_PHONECALL_H
+#define LOADGEN_PHONECALL_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <etel3rdparty.h>
+
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+class CPhoneCallManager;
+class CDialer;
+
+
+// CLASS DECLARATIONS
+
+class CPhoneCall : public CLoadBase
+    {
+public:
+    static CPhoneCall* NewL(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CPhoneCall();
+        
+private: // Constructors
+    CPhoneCall(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TPhoneCallAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TPhoneCallAttributes& aAttributes) { iAttributes = aAttributes; }
+	
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+
+private:  // New static methods
+    static void GenerateLoad(TPhoneCallAttributes& aAttributes);
+
+private: // Data
+    TPhoneCallAttributes        iAttributes;    
+    RThread                     iThread;
+    };
+
+    
+
+class CPhoneCallManager : public CActive
+    { 
+private:
+    enum TState
+        {
+        EStateIdle = 0,
+        EStateCall
+        };
+public:
+    static CPhoneCallManager* NewL(TPhoneCallAttributes& aAttributes);
+    ~CPhoneCallManager();
+
+private:
+    CPhoneCallManager(TPhoneCallAttributes& aAttributes);
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+private:
+    static TInt PeriodicTimerCallBack(TAny* aAny);
+    void HandleCalls();
+    void DoDial();
+    void DoHangup();
+
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+    void HandleStatus(TInt aErr);
+
+private:
+    TPhoneCallAttributes&               iAttributes;
+    CDialer*                            iDialer;   
+    CPeriodic*                          iPeriodicTimer;
+    TInt                                iState;
+    }; 
+
+
+class CDialer : public CActive
+    { 
+public:
+    static CDialer* NewL(CPhoneCallManager& aManager);
+    ~CDialer();
+
+private:
+    CDialer(CPhoneCallManager& aManager);
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+public:
+    void Dial(const TDesC& aDestination);
+    void Hangup();
+
+private:
+    CPhoneCallManager&                  iManager;
+    CTelephony*                         iTelephony;
+    CTelephony::TCallId                 iCallId;
+    CTelephony::TCallParamsV1           iCallParams;
+    CTelephony::TCallParamsV1Pckg       iCallParamsPckg;
+    };
+        
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_photocapture.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef LOADGEN_PHOTOCAPTURE_H
+#define LOADGEN_PHOTOCAPTURE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <ecam.h>  // CCamera, MCameraObserver
+
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+class CCameraManager;
+
+
+// CLASS DECLARATIONS
+
+class CPhotoCapture : public CLoadBase
+    {
+public:
+    static CPhotoCapture* NewL(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CPhotoCapture();
+        
+private: // Constructors
+    CPhotoCapture(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TPhotoCaptureAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TPhotoCaptureAttributes& aAttributes) { iAttributes = aAttributes; }
+
+
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+    //static void SetImagesReady(TInt aImages);
+    //static TInt ImagesReady();
+
+private:  // New static methods
+    static void GenerateLoad(TPhotoCaptureAttributes& aAttributes);
+    static void DoHeaveStuff(TInt aMode);
+
+private: // Data
+    TPhotoCaptureAttributes iAttributes;    
+    RThread                 iThread;
+    //static TInt             iImagesReady;
+    };
+ 
+
+
+ 
+class CCameraManager : public CActive, public MCameraObserver
+    {
+    public:
+        
+        static CCameraManager* NewL(TPhotoCaptureAttributes& aAttrs);        
+        virtual ~CCameraManager();
+ 
+    private:
+        
+        CCameraManager(TPhotoCaptureAttributes& aAttrs);
+        void ConstructL();
+ 
+    private:
+        /**
+         * From MCameraObserver:
+         */         
+        virtual void ReserveComplete(TInt aError);
+        virtual void PowerOnComplete(TInt aError);
+        virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
+        virtual void ImageReady(CFbsBitmap* aBitmap,
+                HBufC8* aData, TInt aError);
+        virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,
+                TInt aError);
+    
+        static TInt PeriodicTimerCallBack(TAny* aAny);
+    public:
+        
+        /**
+         * Reserves the camera.
+         */
+        void ReserveCameraL();
+        
+        /**
+         * Takes a picture.
+         */
+        void CapturePhotoL();
+        
+        TInt NumberOfPictures();
+                                        
+        /**
+         * From CActive:
+         */
+        void RunL();
+        void DoCancel();
+ 
+    private:
+        
+        enum TState
+            {
+            ENotReady,
+            ECameraReserved,
+            EIdle,
+            ECapture
+            };
+
+        CPeriodic*                  iPeriodicTimer;
+        TPhotoCaptureAttributes&    iAttributes;
+        CCamera*                    iCamera;
+        TState                      iState;
+        TInt                        iNumOfPics;
+        TCameraInfo                 iCameraInfo;
+        TInt                        iCurrentCamera;
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_pointerevent.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* 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 LOADGEN_POINTEREVENT_H
+#define LOADGEN_POINTEREVENT_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <w32std.h>
+#include <e32svr.h>
+#include "loadgen_loadbase.h"
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+
+
+
+// CLASS DECLARATIONS
+
+class CPointerEvent : public CLoadBase
+    {
+public:
+    static CPointerEvent* NewL(TPointerEventAttributes& aAttributes, TInt aReferenceNumber);
+    virtual ~CPointerEvent();
+        
+private: // Constructors
+    CPointerEvent(TPointerEventAttributes& aAttributes, TInt aReferenceNumber);
+    void ConstructL();  
+
+public:  // New methods
+    virtual void Resume();
+    virtual void Suspend();
+    virtual void SetPriority();
+    virtual void Close();
+    virtual TPtrC Description();
+    inline TPointerEventAttributes& Attributes() { return iAttributes; }
+	inline void SetAttributes(const TPointerEventAttributes& aAttributes) { iAttributes = aAttributes; }
+
+public:  // New static methods
+    static TInt ThreadFunction(TAny* aThreadArg);
+
+private:  // New static methods
+    static void GenerateLoad(TPointerEventAttributes& aAttributes);
+
+private: // Data
+    TPointerEventAttributes         iAttributes;    
+    RThread                     iThread;
+    };
+
+
+class CPointerEventManager : public CActive
+    {
+public:
+    static CPointerEventManager* NewL(TPointerEventAttributes& aAttributes);
+    ~CPointerEventManager();
+
+private:
+    CPointerEventManager(TPointerEventAttributes& aAttributes);
+    void ConstructL();
+
+private:
+    void RunL();
+    void DoCancel();
+
+private:
+    static TInt PeriodicTimerCallBack(TAny* aAny);
+    void SimulatePointerEvent();
+
+public:
+    inline CPeriodic* PeriodicTimer() { return iPeriodicTimer; }
+
+private:
+    TPointerEventAttributes&    iAttributes;    
+    CPeriodic*                  iPeriodicTimer;
+    //RWsSession                  iWsSession;
+    }; 
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_std.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* 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 LOADGEN_STD_H
+#define LOADGEN_STD_H
+
+
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_traces.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+
+#ifndef __LOADGEN_TRACES_H__
+#define __LOADGEN_TRACES_H__
+
+#include <e32def.h>
+
+
+// ---------------------------------------------------------------------------
+// You change these logging method values below! Recompile the application to take changes effect.
+
+    // logging methods
+    // 0 = No logging
+    // 1 = Flogger
+    // 2 = RDebug
+    // 3 = Flogger and RDebug
+    
+    #ifndef _DEBUG
+        
+        // Logging method for UREL builds:
+        #define LOADGEN_LOGGING_METHOD  3
+
+    #else
+
+        // Logging method for UDEB builds:
+        #define LOADGEN_LOGGING_METHOD  3
+
+    #endif    
+    
+
+
+// ---------------------------------------------------------------------------
+// Do not make any changes to lines below...
+
+    #if LOADGEN_LOGGING_METHOD == 1 || LOADGEN_LOGGING_METHOD == 3
+
+        #include <flogger.h>
+        _LIT(KLogFolder,"loadgen");
+        _LIT(KLogFile,"loadgen_trace.txt");
+
+    #endif
+
+    #if LOADGEN_LOGGING_METHOD == 2 || LOADGEN_LOGGING_METHOD == 3
+
+        #include <e32debug.h>
+
+    #endif
+
+
+    #if LOADGEN_LOGGING_METHOD == 0
+    
+        #define LOGTEXT(AAA)
+        #define LOGSTRING(AAA)
+        #define LOGSTRING2(AAA,BBB)
+        #define LOGSTRING3(AAA,BBB,CCC)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD)
+    
+    
+    #elif LOADGEN_LOGGING_METHOD == 1
+    
+        #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+   
+    #elif LOADGEN_LOGGING_METHOD == 2
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0)
+    
+    #elif LOADGEN_LOGGING_METHOD == 3
+    
+        #define LOGTEXT(AAA)                RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA)
+        #define LOGSTRING(AAA)              do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0)
+        #define LOGSTRING2(AAA,BBB)         do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0)
+        #define LOGSTRING3(AAA,BBB,CCC)     do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0)
+        #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0)
+
+    #endif
+
+// ---------------------------------------------------------------------------
+
+#endif // __LOADGEN_TRACES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/inc/loadgen_utils.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* 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 LOADGEN_UTILS_H
+#define LOADGEN_UTILS_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+const TUint KHalFunction_EKernelHalNumLogicalCpus = 16; //EKernelHalNumLogicalCpus
+const TUint KHalFunction_EKernelHalLockThreadToCpu = 19; //EKernelHalLockThreadToCpu
+
+class CLoadGenUtils {
+
+public:
+		static TThreadPriority SettingItemToThreadPriority(TInt aIndex);
+		static void SettingItemToThreadDescription(TInt aIndex, TDes& aBuf);
+		static void SettingItemToSourceDescription(TInt aIndex, TDes& aBuf);
+		static TInt MilliSecondsToMicroSeconds(TInt aMilliSeconds, TInt aRandomVariance=0);
+		static TInt RandomNumber(TInt aMin, TInt aMax);
+		static TSize ScreenSize();
+
+private:
+          /* Desctructor pure Virtual -> static class cannot be instantiated or inherited */
+		virtual ~CLoadGenUtils()=0;	
+	    static TInt64 iRandomNumberSeed;
+
+};
+
+#endif		  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_applications.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,683 @@
+/*
+* 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 FILES
+#include "loadgen_applications.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+
+#include <e32math.h>
+#include "loadgen_traces.h"
+
+_LIT(KThreadName, "Applications %d");
+
+const TInt KDefaultStartDelay = 500;
+const TInt KThreadNameLength = 64;
+const TInt KDescriptorBufSize = 256;
+const TInt KPriorityBufSize = 16;
+const TInt KScanCodeStart = 32;
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CAppLauncher* CAppLauncher::NewL( TApplicationsAttributes& aAttributes, TInt aReferenceNumber )
+    {
+    CAppLauncher* self = new(ELeave) CAppLauncher( aAttributes, aReferenceNumber );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CAppLauncher::~CAppLauncher()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CAppLauncher::CAppLauncher(  
+           TApplicationsAttributes& aAttributes, TInt aReferenceNumber ) : 
+           iAttributes( aAttributes )
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CAppLauncher::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadApplications;
+    
+    TBuf<KThreadNameLength> threadName;
+    threadName.Format( KThreadName, iAttributes.iId );
+    
+    // create a thread
+    User::LeaveIfError( iThread.Create( threadName, ThreadFunction, 
+                                        KDefaultStackSize*2, KMinHeapSize, 
+                                        KKilo * KMinHeapSize, (TAny*) &iAttributes ) );
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CAppLauncher::ThreadFunction( TAny* aThreadArg )
+    {
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install( pS );
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad( *( ( TApplicationsAttributes* ) aThreadArg ) );
+
+    delete pS;
+    delete pC;
+    
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CAppLauncher::GenerateLoad( TApplicationsAttributes& aAttributes )
+    {
+    CAppLauncherManager* appLauncherManager = NULL;
+    TRAPD( err, appLauncherManager = CAppLauncherManager::NewL( aAttributes ) );
+    if ( err == KErrNone ) 
+        {
+        CActiveScheduler::Start();
+        }
+    delete appLauncherManager;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CAppLauncher::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CAppLauncher::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CAppLauncher::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority( CLoadGenUtils::SettingItemToThreadPriority( iAttributes.iPriority ) );
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CAppLauncher::Close()
+    {
+    CLoadBase::Close();
+    
+    if ( iThread.ExitReason() == 0 ) // check if the thread is still alive
+        {
+        // signal the thread that it needs to close
+        iThread.RequestComplete( iAttributes.iDeathStatus, KErrCancel );
+
+        // wait the thread to die
+        TRequestStatus waiter;
+        iThread.Logon( waiter );
+        User::WaitForRequest( waiter );
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CAppLauncher::Description()
+    {
+    TBuf<KDescriptorBufSize> buf;
+    TBuf<KPriorityBufSize> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription( iAttributes.iPriority, prioBuf );
+    
+    _LIT(KAppLauncherEntry, "[%d] Appls prio=%S max apps=%d heartbeat=%dms random=%d%%");
+    buf.Format( KAppLauncherEntry, iAttributes.iId, &prioBuf, iAttributes.iMaxOpen, 
+                iAttributes.iHeartBeat, iAttributes.iRandomVariance );
+   
+    return TPtrC( buf );
+    }               
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CAppLauncherManager* CAppLauncherManager::NewL( TApplicationsAttributes& aAttributes )
+    {
+    CAppLauncherManager* self = new(ELeave) CAppLauncherManager(aAttributes);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CAppLauncherManager::CAppLauncherManager( TApplicationsAttributes& aAttributes ) :
+            CActive( EPriorityStandard ), iAttributes( aAttributes )
+    {
+    iAppEventType = EApplicationsLaunchApplication;
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CAppLauncherManager::~CAppLauncherManager()
+    {
+    if ( iPeriodicTimer )
+        {
+        iPeriodicTimer->Cancel();
+        delete iPeriodicTimer;
+        }
+    delete iLauncherEngine;
+    Cancel();
+    
+    iWsSession.Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CAppLauncherManager::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    
+    // create instance to application launcher
+    iLauncherEngine = CLauncherEngine::NewL( iAttributes );
+    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+    
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    
+    // init
+    User::LeaveIfError( iWsSession.Connect() );
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    iPeriodicTimer->Start( KDefaultStartDelay, 
+                           CLoadGenUtils::MilliSecondsToMicroSeconds( 
+                               iAttributes.iLaunchingInterval, iAttributes.iRandomVariance ),
+                           TCallBack( PeriodicTimerCallBack, this ) );
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CAppLauncherManager::RunL()
+    {
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CAppLauncherManager::DoCancel()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CAppLauncherManager::PeriodicTimerCallBack( TAny* aAny )
+    {
+    CAppLauncherManager* self = static_cast<CAppLauncherManager*>( aAny );
+
+    TRAPD( err, self->SimulateEventL() );
+    if ( KErrNone != err )
+        {
+        return err;
+        }
+    return KErrNone;
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CAppLauncherManager::SimulateEventL()
+    {    
+    // Randomly start new applications.
+    // After maximum applications launched stop one application.
+    // And after that start launching again.
+    if ( iAppEventType == EApplicationsLaunchApplication && 
+         iAttributes.iMaxOpen == iLauncherEngine->AppLaunchCounter() )
+        {
+        iAppEventType = EApplicationsCloseApplication;
+        }
+    if ( iAppEventType == EApplicationsCloseApplication && 
+         iAttributes.iMaxOpen -1 == iLauncherEngine->AppLaunchCounter() )
+        {
+        iAppEventType = EApplicationsLaunchApplication;
+        }
+    
+    // Launch or stop
+    if ( iAppEventType == EApplicationsLaunchApplication )
+        {
+        iLauncherEngine->StartAppLaunchingL();
+        }  
+    else
+        {
+        iLauncherEngine->StopApplication( ETrue );
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+#include <avkon.hrh>
+#include <e32std.h>
+#include <w32std.h>
+#include <apgtask.h>
+#include <bautils.h>
+#include <s32file.h>
+#include <apgwgnam.h> 
+
+// ---------------------------------------------------------------------------
+
+CLauncherEngine* CLauncherEngine::NewL( TApplicationsAttributes& aAttributes )
+    {
+    CLauncherEngine* self = new(ELeave) CLauncherEngine( aAttributes );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherEngine::CLauncherEngine( TApplicationsAttributes& aAttributes ) : 
+                        iAttributes( aAttributes )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::ConstructL()
+    {
+    LOGSTRING("LoadGen: CLauncherEngine::ConstructL");
+    iAppKeyPressManager = CAppKeyPressManager::NewL( iAttributes );
+    iAppLaunchCounter = 0;
+    User::LeaveIfError( iTimer.CreateLocal() );
+
+    User::LeaveIfError( iLs.Connect() );
+    User::LeaveIfError( iWs.Connect() );
+
+    }
+
+// ---------------------------------------------------------------------------
+
+CLauncherEngine::~CLauncherEngine()
+    {
+    LOGSTRING("LoadGen: CLauncherEngine::~CLauncherEngine");
+    StopApplication( EFalse );
+    iWs.Close();
+    iLs.Close();
+    iTimer.Close();
+    delete iAppKeyPressManager;
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::StartAppLaunchingL()
+    {
+    LOGSTRING("LoadGen: CLauncherEngine::StartAppLaunchingL");
+    if ( iAppLaunchCounter == iAttributes.iMaxOpen )
+        {
+        return;
+        }
+
+    // start launching
+    TBool launched( EFalse );
+    while ( !launched )
+        {
+        launched = LaunchApplicationL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+TBool CLauncherEngine::LaunchApplicationL()
+    {
+    LOGSTRING("LoadGen: CLauncherEngine::LaunchApplicationL");
+    TBool result( EFalse );
+    // get the uid of the current app
+    iCurrentAppUid = KNullUid;
+    TApaAppInfo appInfo;
+    
+    // get application list size
+    TInt appsListSize = iAttributes.iAppsArray->MdcaCount();
+    // get random application number in the list
+    TInt appTolaunch = CLoadGenUtils::RandomNumber( 0,  appsListSize - 1 );
+    // get file name of the application to be launched
+    TFileName launchFileName = iAttributes.iAppsArray->MdcaPoint( appTolaunch );
+    iLs.GetAllApps();
+    while ( iLs.GetNextApp( appInfo ) == KErrNone )
+        {
+        // get file name in  current appInfo
+        TFileName appFileName = appInfo.iFullName;
+        // get AppUid
+        if ( appFileName.CompareF( launchFileName ) == 0 )
+            {
+            iCurrentAppUid = appInfo.iUid;
+            break;
+            }
+        }
+
+    if ( iCurrentAppUid != KNullUid )
+        {        
+        // parse the filename
+        TParse nameParser;
+        nameParser.SetNoWild( iAttributes.iAppsArray->MdcaPoint( appTolaunch ), NULL, NULL );
+        iCurrentAppNameAndExt.Copy( nameParser.Drive() );
+        iCurrentAppNameAndExt.Append( nameParser.NameAndExt() );
+           
+        // do not try to launch these apps
+        if ( iCurrentAppUid != KNullUid &&
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch).FindF(_L("\\loadgen.")) == KErrNotFound &&
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\Phone." ) ) == KErrNotFound &&
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch).FindF( _L("\\Startup.") ) == KErrNotFound &&  
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\SplashScreen.") ) == KErrNotFound &&  
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\cameraapp.") ) == KErrNotFound &&
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\eshell.") ) == KErrNotFound &&
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\ConnTest.") ) == KErrNotFound &&
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\Launcher.") ) == KErrNotFound &&
+              
+#ifdef __WINS__
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\DebugAgent.") ) == KErrNotFound &&
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\redirect.") ) == KErrNotFound &&              
+#endif              
+              iAttributes.iAppsArray->MdcaPoint( appTolaunch ).FindF( _L("\\VoiceRecorder.") ) == KErrNotFound )            
+            {
+        
+            // check if the app is already running
+            TApaTaskList taskList( iWs );
+            TApaTask thisTask = taskList.FindApp( iCurrentAppUid );
+            if ( !thisTask.Exists( ))
+                {
+                // check the program's capabilities
+                TApaAppCapabilityBuf buf;
+                iLs.GetAppCapability( buf, iCurrentAppUid );
+                TApaAppCapability cap = buf();
+        
+                // if it's embeddable only, don't launch if setting is enabled
+                // if it's hidden, don't launch if setting is enabled
+                if ( cap.iEmbeddability != TApaAppCapability::EEmbeddableOnly &&
+                     !cap.iAppIsHidden )
+                    {
+                    LOGSTRING2("launchFileName = %S", &launchFileName);
+                    
+                    DoLaunchApplicationL();
+                    result = ETrue;
+                    }            
+                } 
+            }
+        }
+    return result;
+    }
+
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::DoLaunchApplicationL()
+    {
+    LOGSTRING("LoadGen: CLauncherEngine::DoLaunchApplicationL");
+
+    // Find the task with uid3
+    TApaTaskList tasklist( iWs );
+    TApaTask task=tasklist.FindApp( iCurrentAppUid );
+
+    if ( !task.Exists() )
+        // Task doesn't exist, launch a new instance of an application
+        {
+        TApaAppInfo appInfo;
+        User::LeaveIfError( iLs.GetAppInfo( appInfo, iCurrentAppUid ) );
+
+        CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
+        cmdLine->SetExecutableNameL( appInfo.iFullName );
+
+        // app is launched in background
+        cmdLine->SetCommandL( EApaCommandBackground );       
+
+        // start the app
+        User::LeaveIfError( iLs.StartApp( *cmdLine ) );
+        iAppKeyPressManager->AddNewApplicationUidToKeyEventsL( iCurrentAppUid );
+        iAppLaunchCounter++;
+
+        CleanupStack::PopAndDestroy( cmdLine );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void CLauncherEngine::StopApplication( TBool aRandomApplication )
+    {
+    LOGSTRING("LoadGen: CLauncherEngine::StopApplication");
+
+    // remove key pressing instance
+    TUid appToDelete = iAppKeyPressManager->KillApplication( aRandomApplication );
+    if ( appToDelete != KNullUid )
+        {
+        TApaTaskList taskList( iWs );
+        TApaTask thisTask = taskList.FindApp( appToDelete );
+    
+        if ( thisTask.Exists() )
+            {
+            // since the application is still open, let's close it
+            thisTask.EndTask();
+            }
+        iAppLaunchCounter--;
+        }
+    
+    // return if only one application requested
+    if ( aRandomApplication )
+        {
+        return;
+        }
+    
+    // remove all launched applications because load is requested to be closed
+    while ( appToDelete != KNullUid )
+        {
+        appToDelete = iAppKeyPressManager->KillApplication( aRandomApplication );
+            
+        if ( appToDelete != KNullUid )
+            {
+            TApaTaskList taskList( iWs );
+            TApaTask thisTask = taskList.FindApp( appToDelete );
+        
+            if ( thisTask.Exists() )
+                {
+                // since the application is still open, let's close it
+                thisTask.EndTask();
+                }
+            iAppLaunchCounter--;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CAppKeyPressManager* CAppKeyPressManager::NewL( TApplicationsAttributes& aAttributes )
+    {
+    LOGSTRING("LoadGen: CAppKeyPressManager::NewL");
+    CAppKeyPressManager* self = new(ELeave) CAppKeyPressManager( aAttributes );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CAppKeyPressManager::CAppKeyPressManager( TApplicationsAttributes& aAttributes ) :
+                                            iAttributes( aAttributes )
+    {
+    LOGSTRING("LoadGen: CAppKeyPressManager::CAppKeyPressManager");
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CAppKeyPressManager::~CAppKeyPressManager()
+    {
+    LOGSTRING("LoadGen: CAppKeyPressManager::~CAppKeyPressManager");
+    if ( iKeyPresses.Count() != 0 )
+        {
+        iKeyPresses.ResetAndDestroy();
+        }
+
+    iKeyPresses.Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CAppKeyPressManager::ConstructL()
+    {
+    LOGSTRING("LoadGen: CAppKeyPressManager::ConstructL");
+    }
+    
+   
+// --------------------------------------------------------------------------------------------
+void CAppKeyPressManager::AddNewApplicationUidToKeyEventsL( TUid aUid )
+    {
+    LOGSTRING("LoadGen: CAppKeyPressManager::AddNewApplicationUidToKeyEventsL");
+    CApplicationKeyPresses* applicationKP = CApplicationKeyPresses::NewL( aUid,
+                                                                    iAttributes );
+    CleanupStack::PushL( applicationKP );
+    User::LeaveIfError( iKeyPresses.Append( applicationKP ) );
+    CleanupStack::Pop( applicationKP );
+    }
+
+// --------------------------------------------------------------------------------------------
+TUid CAppKeyPressManager::KillApplication( TBool aRandomApplication )
+    {
+    TUid applicationUid = KNullUid;
+    TInt appToDelete = iKeyPresses.Count() - 1 ;
+    // remove the newest application if not random 
+    if ( aRandomApplication )
+        {
+         appToDelete = CLoadGenUtils::RandomNumber( 0, iKeyPresses.Count() - 1 );
+        }
+    if ( iKeyPresses.Count() )
+        {
+        // get random application and delete it
+        
+        applicationUid = iKeyPresses[appToDelete]->ApplicationUid();
+        delete iKeyPresses[appToDelete];
+        iKeyPresses.Remove( appToDelete );
+        }
+    return applicationUid;
+    }
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CApplicationKeyPresses* CApplicationKeyPresses::NewL( TUid aUid, TApplicationsAttributes&  
+        aAttributes )
+    {
+    LOGSTRING("LoadGen: CApplicationKeyPresses::NewL");
+    CApplicationKeyPresses* self = new(ELeave) CApplicationKeyPresses( aUid, aAttributes );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CApplicationKeyPresses::CApplicationKeyPresses( TUid aUid, 
+                                                        TApplicationsAttributes& aAttributes ) :
+                                                iUid( aUid ), iAttributes( aAttributes ) 
+    {
+    LOGSTRING("LoadGen: CApplicationKeyPresses::CApplicationKeyPresses");
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CApplicationKeyPresses::~CApplicationKeyPresses()
+    {
+    LOGSTRING("LoadGen: CApplicationKeyPresses::~CApplicationKeyPresses");
+    if ( iPeriodicTimer )
+        {
+        iPeriodicTimer->Cancel();
+        delete iPeriodicTimer;
+        }
+    
+    iWsSession.Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CApplicationKeyPresses::ConstructL()
+    {
+    LOGSTRING("LoadGen: CApplicationKeyPresses::ConstructL");
+    // init
+    User::LeaveIfError( iWsSession.Connect() );
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    if ( iAttributes.iKeyPressType )
+        {
+        iPeriodicTimer->Start( KDefaultStartDelay,
+                               CLoadGenUtils::MilliSecondsToMicroSeconds( 
+                                       iAttributes.iHeartBeat,
+                                       iAttributes.iRandomVariance ),
+                                TCallBack( PeriodicTimerCallBack, this ) );
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TInt CApplicationKeyPresses::PeriodicTimerCallBack( TAny* aAny )
+    {
+    CApplicationKeyPresses* self = static_cast<CApplicationKeyPresses*>( aAny );
+    self->SimulateKeyEvent();
+    return KErrNone;
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CApplicationKeyPresses::SimulateKeyEvent()
+    {
+    LOGSTRING("LoadGen: CApplicationKeyPresses::SimulateKeyEvent");
+    // for arrow key events
+    
+    TInt wgId(0);
+    CApaWindowGroupName::FindByAppUid( iUid, iWsSession, wgId );
+    // generate a random arrow key event
+    TWsEvent event;
+    event.SetType( EEventKey );
+    event.Key()->iCode = CLoadGenUtils::RandomNumber( EKeyLeftArrow, EKeyDownArrow );
+    event.Key()->iScanCode = event.Key()->iCode - KScanCodeStart;
+    event.Key()->iModifiers = 0;
+    event.Key()->iRepeats = 0;
+    iWsSession.SendEventToWindowGroup( wgId, event );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_bluetooth.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,339 @@
+/*
+* 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 FILES
+#include "loadgen_bluetooth.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include "loadgen_traces.h"
+#include <loadgen.rsg>
+#include <e32hal.h>
+#include <u32hal.h>
+#include <e32math.h>
+#include <eikenv.h>
+#include <btserversdkcrkeys.h>
+#include <btnotifierapi.h>
+#include <btpm.h>
+
+_LIT(KThreadName, "Bluetooth %d");
+_LIT(KBTLinkManagerStr, "BTLinkManager");
+
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+   
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CBluetooth* CBluetooth::NewL(TBluetoothAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CBluetooth* self = new(ELeave) CBluetooth(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    TRAPD(err, self->ConstructL());
+    if( err != KErrNone )
+        {
+        User::Leave(err);
+        }
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CBluetooth::~CBluetooth()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CBluetooth::CBluetooth(TBluetoothAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CBluetooth::ConstructL()
+    {    
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadBluetooth;
+    
+    InitializeBluetoothL();
+                        
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+            
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    iState = ELoadStateConstructed;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CBluetooth::ThreadFunction(TAny* aThreadArg)
+    {
+    TInt err = KErrNone;
+    
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad(*((TBluetoothAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CBluetooth::GenerateLoad(TBluetoothAttributes& aAttributes)
+    {    
+    CBTManager* btManager = 0;
+    TRAPD(err, btManager = CBTManager::NewL(aAttributes));
+    if (err == KErrNone) CActiveScheduler::Start();
+    delete btManager;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CBluetooth::Resume()
+    {    
+    CLoadBase::Resume();    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CBluetooth::Suspend()
+    {
+    CLoadBase::Suspend();    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CBluetooth::SetPriority()
+    {
+    CLoadBase::SetPriority();    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CBluetooth::Close()
+    {
+    LOGSTRING2("LoadGen: CBluetooth::~CBluetooth() - State: %d", iState);
+    if( iState != ELoadStateInvalid )
+        {
+        CLoadBase::Close();        
+        // kill the thread immediately
+        iThread.Kill(0);
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+TPtrC CBluetooth::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+        
+    _LIT(KBluetoothEntry, "[%d] Bluetooth prio=%S idle=%dms random=%d%%");
+    buf.Format(KBluetoothEntry, iAttributes.iId, &prioBuf, iAttributes.iIdle, iAttributes.iRandomVariance);
+       
+    return TPtrC(buf);
+    }
+
+// --------------------------------------------------------------------------------------------
+void CBluetooth::InitializeBluetoothL()
+    {
+    // Create central repository for checking and setting bluetooth power state    
+    CRepository* btPowerStateCRepo = CRepository::NewL(KCRUidBluetoothPowerState);
+    
+    // Check if the BT is already turned on:    
+    TInt btPowerState = 0;
+    btPowerStateCRepo->Get(KBTPowerState, btPowerState);
+    delete btPowerStateCRepo;
+    btPowerStateCRepo = 0;
+        
+    if(btPowerState == EBTPowerOff)
+        {
+        // Switch bt power on:
+        if (SetBTPowerState(ETrue) == EFalse)
+            {
+            LOGSTRING("LoadGen: Bluetooth could not be switched on");
+            User::Leave(KErrNotReady);
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+TBool CBluetooth::SetBTPowerState(TBool aState)
+    {    
+    // Ask user to turn on the bluetooth device:
+    RNotifier btPowerNotifier;
+    TInt errCode = btPowerNotifier.Connect();
+    
+    TBool retVal = errCode == KErrNone;
+    
+    if( errCode == KErrNone )
+        {
+        TPckgBuf<TBool> powerRequest(aState);
+        TPckgBuf<TBool> powerReply(EFalse);
+        TRequestStatus powerRequestStatus;
+        btPowerNotifier.StartNotifierAndGetResponse(powerRequestStatus, 
+                                                KPowerModeSettingNotifierUid, 
+                                                powerRequest, 
+                                                powerReply);
+        User::WaitForRequest(powerRequestStatus);
+        btPowerNotifier.CancelNotifier(KPowerModeSettingNotifierUid);
+        btPowerNotifier.Close();  
+        if( powerReply() == EFalse )
+            {
+            LOGSTRING("LoadGen: Bluetooth activating cancelled.");
+            }
+        retVal = powerReply();
+        }
+    
+    return retVal; 
+    }
+
+// --------------------------------------------------------------------------------------------
+CBTManager* CBTManager::NewL(   TBluetoothAttributes& aAttrs)
+    {
+    CBTManager* self = new (ELeave) CBTManager( aAttrs);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+ 
+// --------------------------------------------------------------------------------------------
+CBTManager::~CBTManager()
+    {    
+    if (iPeriodicTimer)
+        {
+        iPeriodicTimer->Cancel();
+        delete iPeriodicTimer;
+        }    
+    iHostResolver.Close();        
+    Cancel();
+    }
+ 
+// --------------------------------------------------------------------------------------------
+CBTManager::CBTManager( TBluetoothAttributes& aAttrs) 
+: 
+CActive(EPriorityStandard),
+iAttributes(aAttrs)
+    {    
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CBTManager::ConstructL()
+    {
+    // Socket server session initiation:
+    User::LeaveIfError(iSocketServerHnd.Connect());    
+
+    CActiveScheduler::Add(this);
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+        
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+
+// --------------------------------------------------------------------------------------------
+void CBTManager::DoCancel()
+    {
+    LOGSTRING("LoadGen: CBTManager::DoCancel()");    
+    }
+
+// --------------------------------------------------------------------------------------------
+void CBTManager::RunL()
+    {    
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();    
+    }
+
+// --------------------------------------------------------------------------------------------
+TInt CBTManager::StartBTDeviceDiscovery()
+    {
+    TInt retVal = KErrNone; 
+    RThread myThread;
+           
+    // Initialize host resolver      
+    iHostResolver.Close();        
+    TProtocolDesc protocolInfo;
+    retVal = iSocketServerHnd.FindProtocol(KBTLinkManagerStr(), protocolInfo);
+    if( retVal == KErrNone )
+        {
+        retVal = iHostResolver.Open(iSocketServerHnd, protocolInfo.iAddrFamily, protocolInfo.iProtocol);        
+        }
+    
+    if( retVal == KErrNone )
+        {
+        TInquirySockAddr socketAddress;
+        socketAddress.SetIAC( KGIAC );
+        socketAddress.SetAction(KHostResInquiry|KHostResName|KHostResIgnoreCache);
+        retVal = iHostResolver.GetByAddress(socketAddress, iBTNameEntry);        
+        // Loop all discovered devices:
+        while( retVal == KErrNone )        
+            {
+            LOGSTRING3("LoadGen: Thread %S found device: %S", &(myThread.Name()), &(iBTNameEntry().iName) );
+            // Get next device
+            retVal = iHostResolver.Next(iBTNameEntry);            
+            }
+        }
+    
+    // KErrEof is returned when no more devices to loop
+    if( retVal == KErrEof )
+        {
+        retVal = KErrNone;
+        }
+            
+    iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
+                        iAttributes.iRandomVariance ), KDefaultPeriod, 
+                        TCallBack( PeriodicTimerCallBack, this ) );
+
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CBTManager::PeriodicTimerCallBack(TAny* aAny)
+    {        
+    CBTManager* self = static_cast<CBTManager*>( aAny );
+    self->iPeriodicTimer->Cancel();
+    // Perform device discovery:
+    self->StartBTDeviceDiscovery();
+    return KErrNone;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_cpuload.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,270 @@
+/*
+* 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 FILES
+#include "loadgen_cpuload.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+#include <e32hal.h>
+#include <u32hal.h>
+#include <e32math.h>
+#include <e32svr.h>
+
+_LIT(KThreadName, "CPULoad %d");
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CCPULoad* CCPULoad::NewL(TCPULoadAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CCPULoad* self = new(ELeave) CCPULoad(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CCPULoad::~CCPULoad()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CCPULoad::CCPULoad(TCPULoadAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CCPULoad::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadCPULoad;
+    
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+    
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CCPULoad::ThreadFunction(TAny* aThreadArg)
+    {
+    TCPULoadAttributes* threadArg = (TCPULoadAttributes*)aThreadArg;
+    TInt err = KErrNone;
+
+    // if a cpu is defined, tie this thread to the given cpu (SMP environment)
+    if (threadArg->iCpu >= 0 && threadArg->iCpu != KCPUSelection_AllCPUs )
+        {
+        UserSvr::HalFunction(EHalGroupKernel, KHalFunction_EKernelHalLockThreadToCpu, (TAny*) threadArg->iCpu, 0);
+        }
+    
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad(*((TCPULoadAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CCPULoad::GenerateLoad(TCPULoadAttributes& aAttributes)
+    {
+    for (;;)
+        {   
+        if (aAttributes.iType == ECpuLoadTypeContinuous)
+            {
+            // do constantly heave stuff
+            DoHeaveStuff(aAttributes.iMode);
+            }
+
+        else if (aAttributes.iType == ECpuLoadTypePeriodic)
+            {
+            // do periodically heave stuff
+            TTime startTime;
+            startTime.HomeTime(); // get start time
+
+            TTime currentTime;
+            TTimeIntervalMicroSeconds interval;
+            TInt processPeriod; 
+			#ifdef QT_SUPPORT
+				
+			#else
+				processPeriod = CLoadGenUtils::MilliSecondsToMicroSeconds(aAttributes.iLength, aAttributes.iRandomVariance);
+			#endif
+            do
+                {
+                // do heave stuff
+                DoHeaveStuff(aAttributes.iMode);
+
+                currentTime.HomeTime();
+                interval = currentTime.MicroSecondsFrom(startTime);                
+                }
+            while (interval.Int64() < processPeriod);       
+
+
+            // now wait
+            User::After( CLoadGenUtils::MilliSecondsToMicroSeconds(aAttributes.iIdle, aAttributes.iRandomVariance) );
+            }   
+
+        else
+            {
+            User::Panic(_L("Unk.type"), 888);
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CCPULoad::DoHeaveStuff(TInt aMode)
+    {
+    TTime now;
+    now.HomeTime();
+    TInt64 seed = now.Int64();
+    
+    TReal random = Math::FRand(seed);
+    
+    TReal target(10);
+    TReal source(10);
+    
+    target += random;
+    
+    Math::Cos(target, source);
+    
+    source = source / 1.0382873;
+    source -= 32.24343;
+    source += 132.24343;
+    source *= random;
+    
+    // yield trick
+    if (aMode == ECpuLoadModeYielding)
+        {
+        // sleep randomly
+        if (User::TickCount() % 50 == 0)
+            User::AfterHighRes(1);            
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CCPULoad::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CCPULoad::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CCPULoad::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CCPULoad::Close()
+    {
+    CLoadBase::Close();
+
+    // kill the thread immediately
+    iThread.Kill(0);   
+
+    iThread.Close();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CCPULoad::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+    
+    if (iAttributes.iType == ECpuLoadTypeContinuous)
+        {
+        if (iAttributes.iMode == ECpuLoadModeYielding)
+            {
+            _LIT(KCPULoadEntryContinuous, "[%d] CPULoad prio=%S mode=yielding type=cont");
+            buf.Format(KCPULoadEntryContinuous, iAttributes.iId, &prioBuf);
+            }
+        else if (iAttributes.iMode == ECpuLoadModeBlocking)
+            {
+            _LIT(KCPULoadEntryContinuous, "[%d] CPULoad prio=%S mode=blocking type=cont");
+            buf.Format(KCPULoadEntryContinuous, iAttributes.iId, &prioBuf);
+            }
+        }
+    
+    else if (iAttributes.iType == ECpuLoadTypePeriodic)
+        {
+        if (iAttributes.iMode == ECpuLoadModeYielding)
+            {
+            _LIT(KCPULoadEntryPeriodic, "[%d] CPULoad prio=%S mode=yielding type=period peak=%dms idle=%dms random=%d%%");
+            buf.Format(KCPULoadEntryPeriodic, iAttributes.iId, &prioBuf, iAttributes.iLength, iAttributes.iIdle, iAttributes.iRandomVariance);
+            }        
+        else if (iAttributes.iMode == ECpuLoadModeBlocking)
+            {
+            _LIT(KCPULoadEntryPeriodic, "[%d] CPULoad prio=%S mode=blocking type=period peak=%dms idle=%dms random=%d%%");
+            buf.Format(KCPULoadEntryPeriodic, iAttributes.iId, &prioBuf, iAttributes.iLength, iAttributes.iIdle, iAttributes.iRandomVariance);
+            }        
+        }
+    
+    // if we are running a load in a specific cpu, add the "name" of the
+    // cpu to the description. (SMP environment)
+    if (iAttributes.iCpu >= 0 && iAttributes.iCpu != KCPUSelection_AllCPUs)
+        {
+        TBuf<15> cpu;
+        _LIT(KCPU, " CPU%d");
+        cpu.Format(KCPU, iAttributes.iCpu);
+        buf.Append(cpu);
+        }
+    
+    return TPtrC(buf);
+    }               
+
+// --------------------------------------------------------------------------------------------
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_httpreceiver.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,353 @@
+
+#include <commdb.h>
+#include <commdbconnpref.h>
+#include "loadgen_httpreceiver.h"
+
+// CONSTANTS
+_LIT8( KHttpScheme, "http" );
+_LIT8( KSchemeAddon, "://" );
+// This client accepts all content types.
+_LIT8(KAccept, "*/*");
+
+CHTTPReceiver* CHTTPReceiver::NewL( MHTTPRecvObserver& aObserver )
+	{
+	CHTTPReceiver* self = CHTTPReceiver::NewLC( aObserver );
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+CHTTPReceiver* CHTTPReceiver::NewLC( MHTTPRecvObserver& aObserver )
+	{
+	CHTTPReceiver* self = new (ELeave)CHTTPReceiver( aObserver );
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	return self;
+	}
+
+CHTTPReceiver::CHTTPReceiver( MHTTPRecvObserver& aObserver ) :
+	iObserver(aObserver), iRunning(EFalse), iConnectionSetupDone(EFalse)
+	{
+	}
+
+void CHTTPReceiver::ConstructL()
+	{
+#ifdef _DEBUG
+    User::LeaveIfError( iFs.Connect() );
+#endif
+	}
+
+CHTTPReceiver::~CHTTPReceiver()
+	{
+	TRACE( "Entry: CHTTPReceiver::~CHTTPReceiver" );
+
+	CancelTransaction();
+
+	TRAP_IGNORE( iSession.DisconnectL() );
+	iSession.Close();
+	iConnection.Stop();
+	iConnection.Close();
+	iSocketServ.Close();
+    
+	TRACE( "Entry: CHTTPReceiver::~CHTTPReceiver - delete iUrl" );
+	delete iUrl;
+
+#ifdef _DEBUG
+	iFs.Close();
+#endif
+	TRACE( "Exit: CHTTPReceiver::~CHTTPReceiver" );
+	}
+
+void CHTTPReceiver::CancelTransaction()
+	{
+	if ( !iRunning)
+		return;
+
+	TRACE( "Entry: CHTTPReceiver::CancelTransaction" );
+
+	if ( iRunning)
+		{
+		iTransaction.Close();
+		iRunning = EFalse;
+		}
+
+	TRACE( "Exit: CHTTPReceiver::CancelTransaction" );
+	}
+
+// ----------------------------------------------------------------------------
+// CHTTPReceiver::SendHTTPGetL()
+//
+// Start a new HTTP GET transaction.
+// ----------------------------------------------------------------------------
+void CHTTPReceiver::SendHTTPGetL( const TDesC8& aURL )
+	{
+	TRACE( "Entry: CHTTPReceiver::SendHTTPGetL" );
+	
+	iResponseStatus = KErrGeneral;
+	
+#ifdef _DEBUG
+    iResponseFile.Replace( iFs, _L("C:\\Data\\loadgen.htm"), EFileWrite );
+#endif
+    
+	SetupConnectionL();	
+	
+	// Parse string to URI (as defined in RFC2396)
+	TUriParser8 uri;
+	
+	CheckForHTTPSchemeL(uri, aURL);
+
+	RStringF method = iSession.StringPool().StringF(HTTP::EGET, RHTTPSession::GetTable());
+	CleanupClosePushL( method );
+
+	iTransaction = iSession.OpenTransactionL(uri, *this, method);
+
+	// Set headers for request: accepted content type
+	RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
+	SetHeaderL(hdr, HTTP::EAccept, KAccept);
+
+	iTransaction.SubmitL();
+
+	iRunning = ETrue;
+	CleanupStack::PopAndDestroy();
+	TRACE( "Exit: CHTTPReceiver::SendHTTPGetL" );
+	return;
+	}
+
+void CHTTPReceiver::CheckForHTTPSchemeL(TUriParser8& aUri, const TDesC8& aURL)
+	{
+	if( iUrl )
+	    {
+	    delete iUrl;
+	    iUrl = NULL;
+	    }
+	
+	iUrl = aURL.AllocL();
+	aUri.Parse( *iUrl );
+
+	TPtrC8 scheme( aUri.Extract (EUriScheme) );
+
+	// unsupported or no scheme in url.
+	// Insert 'http://' to the beginning of it.
+	if ( scheme != KHttpScheme )
+		{
+		HBufC8* tempBuf = HBufC8::NewL( KHttpScheme().Length() + KSchemeAddon().Length() + aURL.Length() );
+		CleanupStack::PushL( tempBuf );
+		tempBuf->Des().Append( KHttpScheme );
+		tempBuf->Des().Append( KSchemeAddon );
+		tempBuf->Des().Append( aURL );
+
+		if( iUrl )
+		    {
+            delete iUrl;
+            iUrl = NULL;
+		    }
+		iUrl = tempBuf;
+		aUri.Parse( *iUrl );
+		CleanupStack::PopAndDestroy( tempBuf );
+		}
+	}
+
+// Used to set header value to HTTP request
+void CHTTPReceiver::SetHeaderL (RHTTPHeaders aHeaders, TInt aHdrField, const TDesC8& aHdrValue)
+	{
+	RStringF valStr = iSession.StringPool().OpenFStringL (aHdrValue);
+	CleanupClosePushL (valStr);
+	THTTPHdrVal val(valStr);
+	aHeaders.SetFieldL (iSession.StringPool().StringF (aHdrField, RHTTPSession::GetTable ()), val);
+	CleanupStack::PopAndDestroy (); // valStr
+	}
+
+// Inherited from MHTTPTransactionCallback
+// Called by framework to pass transaction events.
+// ----------------------------------------------------------------------------
+void CHTTPReceiver::MHFRunL( RHTTPTransaction aTransaction,	const THTTPEvent& aEvent )
+	{
+	TRACE( "Entry: CHTTPReceiver::MHFRunL" );
+	TRACE2( "Entry: CHTTPReceiver::MHFRunL <%d>", aEvent.iStatus );
+
+	// state check
+	if ( !iRunning )
+		{
+		TRACE( "Exit1: CHTTPReceiver::MHFRunL: recv in wrong state" );
+		return;
+		}
+
+	switch ( aEvent.iStatus )
+		{
+	case THTTPEvent::EGotResponseHeaders:
+		{
+		TRACE( "Entry: CHTTPReceiver::MHFRunL EGotResponseHeaders" );
+		// Get HTTP status code from header (e.g. 200)
+		RHTTPResponse resp = aTransaction.Response();
+		iResponseStatus = resp.StatusCode();
+		}
+		break;
+
+	case THTTPEvent::EGotResponseBodyData:
+		{
+		// Get the body data supplier
+		TRACE( "Entry: CHTTPReceiver::MHFRunL EGotResponseBodyData" );
+		MHTTPDataSupplier* body = aTransaction.Response().Body ();
+		TPtrC8 dataChunk;
+		body->GetNextDataPart ( dataChunk );
+#ifdef _DEBUG
+		if ( dataChunk.Length() )
+		    {
+			iResponseFile.Write( dataChunk );
+		    }
+#endif
+		body->ReleaseData ();
+		}
+		break;
+
+	case THTTPEvent::EResponseComplete:
+		{
+		// Indicates that header & body of response is completely received.
+		// Notify Observer
+		TRACE( "Entry: CHTTPReceiver::MHFRunL EResponseComplete" );
+		}
+		break;
+
+	case THTTPEvent::ESucceeded:
+		{
+		// Transaction can be closed now. It's not needed anymore.
+		TRACE( "Entry: CHTTPReceiver::MHFRunL ESucceeded" );
+		Finalize();
+		}
+		break;
+
+	case THTTPEvent::EFailed:
+		{
+		TRACE( "Entry: CHTTPReceiver::MHFRunL EFailed" );
+		iResponseStatus = KErrGeneral;
+		Finalize();
+		}
+		break;
+
+	default:
+		TRACE( "Entry: CHTTPReceiver::MHFRunL EDefault" );
+		break;
+		}
+	}
+
+// Called by framework when *leave* occurs in handling of transaction event.
+// These errors must be handled, or otherwise HTTP-CORE 6 panic is thrown.
+// ----------------------------------------------------------------------------
+TInt CHTTPReceiver::MHFRunError ( TInt aError, RHTTPTransaction /*aTransaction*/, const THTTPEvent& /*aEvent*/ )
+	{
+	TRACE( "Entry: CHTTPReceiver::MHFRunError" );
+	iResponseStatus = aError;
+	Finalize();
+
+	TRACE( "Exit: CHTTPReceiver::MHFRunError" );
+	return KErrNone;
+	}
+
+void CHTTPReceiver::SetupConnectionL ()
+	{
+	TRACE( "Entry: CHTTPReceiver::StartConnectionL" );
+
+	// check if conncetion is already open
+	if ( iRunning )
+		{
+		return;
+		}
+
+	if ( iConnectionSetupDone )
+	    {
+		return;
+	    }
+
+	iConnectionSetupDone = ETrue;
+	
+	// open HTTP session
+	iSession.OpenL();
+
+	// open socket server
+	TInt result = iSocketServ.Connect();
+	if ( result == KErrNone)
+		{
+		// open connection
+		result = iConnection.Open(iSocketServ);
+		if ( result == KErrNone)
+			{
+			// set overrides
+			TCommDbConnPref pref;
+			pref.SetDialogPreference (ECommDbDialogPrefPrompt);
+			//pref.SetDirection (ECommDbConnectionDirectionOutgoing);
+			//pref.SetIapId (accessPoint);
+
+			// start with overrides
+			result = iConnection.Start(pref);
+
+			if ( result == KErrNone)
+				{
+				// get connection info from iSession
+				RHTTPConnectionInfo connInfo = iSession.ConnectionInfo ();
+				RStringPool pool = iSession.StringPool ();
+
+				// set socket server
+				connInfo.SetPropertyL (pool.StringF (HTTP::EHttpSocketServ,
+						RHTTPSession::GetTable () ),
+						THTTPHdrVal( iSocketServ.Handle () ) );
+
+				// attach to connection
+				TInt connectionPtr= REINTERPRET_CAST( TInt,
+						&iConnection );
+
+				connInfo.SetPropertyL (pool.StringF (
+						HTTP::EHttpSocketConnection,
+						RHTTPSession::GetTable () ),
+						THTTPHdrVal (connectionPtr) );
+
+#if defined(__WINSCW__) || defined(__WINS__) // if Emulator
+				_LIT8(KProxyAddr, "192.168.0.252:4040");
+				TBufC8<30> proxyAddr(KProxyAddr);
+
+				RStringF prxAddr = iSession.StringPool().OpenFStringL (proxyAddr);
+				CleanupClosePushL (prxAddr);
+				THTTPHdrVal prxUsage(iSession.StringPool().StringF (HTTP::EUseProxy,
+						RHTTPSession::GetTable ()));
+				iSession.ConnectionInfo().SetPropertyL (iSession.StringPool().StringF (HTTP::EProxyUsage,
+						RHTTPSession::GetTable ()), prxUsage);
+				iSession.ConnectionInfo().SetPropertyL (iSession.StringPool().StringF (HTTP::EProxyAddress,
+						RHTTPSession::GetTable ()), prxAddr);
+				CleanupStack::PopAndDestroy (); // prxAddr	
+#endif 
+
+				}
+			else
+				{
+				TRACE2( "CHTTPReceiver:: connection start: <%d>", result );
+				}
+			}
+		else
+			{
+			TRACE2( "CHTTPReceiver:: connection open: <%d>", result );
+			}
+		}
+	else
+		{
+		TRACE2( "CHTTPReceiver:: connection to socket server: <%d>", result );		
+		}
+
+	User::LeaveIfError( result );
+	
+	TRACE( "Exit: CHTTPReceiver::StartConnectionL" );
+	}
+
+// ----------------------------------------------------------------------------
+// CHTTPReceiver::Finalize
+// 
+// ----------------------------------------------------------------------------
+//
+void CHTTPReceiver::Finalize()
+    {
+    TRACE( "Exit: CHTTPReceiver::Finalize" );
+#ifdef _DEBUG
+    iResponseFile.Close();
+#endif
+    iTransaction.Close();
+    iRunning = EFalse;
+    iObserver.HTTPFileReceived( iResponseStatus );
+    TRACE( "Exit: CHTTPReceiver::Finalize" );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_keypress.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,257 @@
+/*
+* 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 FILES
+#include "loadgen_keypress.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+
+#include <e32math.h>
+
+_LIT(KThreadName, "KeyPress %d");
+
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CKeyPress* CKeyPress::NewL(TKeyPressAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CKeyPress* self = new(ELeave) CKeyPress(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CKeyPress::~CKeyPress()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CKeyPress::CKeyPress(TKeyPressAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CKeyPress::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadKeyPress;
+    
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+    
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CKeyPress::ThreadFunction(TAny* aThreadArg)
+    {
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad(*((TKeyPressAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+    
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CKeyPress::GenerateLoad(TKeyPressAttributes& aAttributes)
+    {
+    CKeyPressManager* keyPressManager = NULL;
+    TRAPD(err, keyPressManager = CKeyPressManager::NewL(aAttributes));
+    if (err == KErrNone) CActiveScheduler::Start();
+    delete keyPressManager;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CKeyPress::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CKeyPress::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CKeyPress::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CKeyPress::Close()
+    {
+    CLoadBase::Close();
+    
+    if (iThread.ExitReason() == 0) // check if the thread is still alive
+        {
+        // signal the thread that it needs to close
+        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
+
+        // wait the thread to die
+        TRequestStatus waiter;
+        iThread.Logon(waiter);
+        User::WaitForRequest(waiter);
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CKeyPress::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+    
+    _LIT(KKeyPressEntry, "[%d] KeyPress prio=%S heartbeat=%dms random=%d%%");
+    buf.Format(KKeyPressEntry, iAttributes.iId, &prioBuf, iAttributes.iHeartBeat, iAttributes.iRandomVariance);
+   
+    return TPtrC(buf);
+    }               
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CKeyPressManager* CKeyPressManager::NewL(TKeyPressAttributes& aAttributes)
+    {
+    CKeyPressManager* self = new(ELeave) CKeyPressManager(aAttributes);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CKeyPressManager::CKeyPressManager(TKeyPressAttributes& aAttributes) :
+    CActive(EPriorityStandard), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CKeyPressManager::~CKeyPressManager()
+    {
+    Cancel();
+    
+    iWsSession.Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CKeyPressManager::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+    
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    
+    // init
+    User::LeaveIfError( iWsSession.Connect() );
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CKeyPressManager::RunL()
+    {
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CKeyPressManager::DoCancel()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CKeyPressManager::PeriodicTimerCallBack(TAny* aAny)
+    {
+    CKeyPressManager* self = static_cast<CKeyPressManager*>( aAny );
+
+    self->iPeriodicTimer->Cancel();
+    self->SimulateKeyEvent();
+
+    return KErrNone;
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CKeyPressManager::SimulateKeyEvent()
+    {
+    // generate a random key event from a to z
+    TKeyEvent keyEvent;
+    keyEvent.iCode = CLoadGenUtils::RandomNumber('a','z');
+    keyEvent.iScanCode = keyEvent.iCode - 32;
+    keyEvent.iModifiers = 0;
+    keyEvent.iRepeats = 0;
+    
+    iWsSession.SimulateKeyEvent(keyEvent);
+    iWsSession.Flush();
+    
+    // call timer
+    iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iHeartBeat, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_loadbase.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* 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 FILES
+#include "loadgen_loadbase.h"
+#include "loadgen.hrh"
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CLoadBase::CLoadBase()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadBase::ConstructL()
+    {
+    iState = ELoadStateInvalid;
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadBase::Resume()
+    {
+    iState = ELoadStateRunning;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadBase::Suspend()
+    {
+    iState = ELoadStateSuspended;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadBase::SetPriority()
+    {
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadBase::Close()
+    {
+    iState = ELoadStateClosed;
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CLoadBase::Description()
+    {
+    return TPtrC(KNullDesC);
+    }               
+               
+// --------------------------------------------------------------------------------------------
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_memoryeat.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,603 @@
+/*
+* 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 FILES
+#include "loadgen_memoryeat.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include "loadgen_traces.h"
+#include <loadgen.rsg>
+
+#include <e32math.h>
+
+_LIT(KThreadName, "MemEat %d");
+_LIT(KChunkName, "LoadGen %d");
+_LIT(KFilePath, "%c:\\system\\temp\\LoadGen-%d_%d.$$$");
+
+// currently can only handle 2GB
+const TInt64 KMaxEatSize = 2147483647;
+
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CMemoryEat* CMemoryEat::NewL(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CMemoryEat* self = new(ELeave) CMemoryEat(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CMemoryEat::~CMemoryEat()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CMemoryEat::CMemoryEat(TMemoryEatAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEat::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadEatMemory;
+    
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+    
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 32*1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CMemoryEat::ThreadFunction(TAny* aThreadArg)
+    {
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start memory eat, pass pointer to arguments
+    GenerateLoad(*((TMemoryEatAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEat::GenerateLoad(TMemoryEatAttributes& aAttributes)
+    {
+    CMemoryEatManager* memoryEatManager = NULL;
+    TRAPD(err, memoryEatManager = CMemoryEatManager::NewL(aAttributes));
+    if (err == KErrNone) CActiveScheduler::Start();
+    delete memoryEatManager;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEat::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEat::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEat::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEat::Close()
+    {
+    CLoadBase::Close();
+    
+    if (iThread.ExitReason() == 0) // check if the thread is still alive
+        {
+        // signal the thread that it needs to close
+        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
+
+        // wait the thread to die
+        TRequestStatus waiter;
+        iThread.Logon(waiter);
+        User::WaitForRequest(waiter);
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CMemoryEat::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+    TBuf<16> srcBuf;
+    CLoadGenUtils::SettingItemToSourceDescription(iAttributes.iSource, srcBuf);
+    
+    if (iAttributes.iType == EMemoryEatTypeMemoryToEat)
+        {
+        _LIT(KMemoryEatEntryMemoryToEat, "[%d] MemEat src=%S prio=%S type=MemToEat amount=%LDB buf=%dB idle=%dms");
+        
+        buf.Format(KMemoryEatEntryMemoryToEat, iAttributes.iId, &srcBuf, &prioBuf, iAttributes.iAmount, iAttributes.iBuffer, iAttributes.iIdle);
+        }
+    else if (iAttributes.iType == EMemoryEatTypeMemoryToBeLeft)
+        {
+        _LIT(KMemoryEatEntryMemoryToBeLeft, "[%d] MemEat src=%S prio=%S type=MemToBeLeft amount=%LDB buf=%dB idle=%dms");
+        
+        buf.Format(KMemoryEatEntryMemoryToBeLeft, iAttributes.iId, &srcBuf, &prioBuf, iAttributes.iAmount, iAttributes.iBuffer, iAttributes.iIdle);
+        }        
+
+    else if (iAttributes.iType == EMemoryEatTypeWavy)
+        {
+        _LIT(KMemoryEatEntryRandom, "[%d] MemEat src=%S prio=%S type=Random min=%LDB max=%LDB buf=%dB idle=%dms");
+        
+        buf.Format(KMemoryEatEntryRandom, iAttributes.iId, &srcBuf, &prioBuf, iAttributes.iRandomMin, iAttributes.iRandomMax, iAttributes.iBuffer, iAttributes.iIdle);
+        } 
+            
+    return TPtrC(buf);
+    }               
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CMemoryEatManager* CMemoryEatManager::NewL(TMemoryEatAttributes& aAttributes)
+    {
+    CMemoryEatManager* self = new(ELeave) CMemoryEatManager(aAttributes);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CMemoryEatManager::CMemoryEatManager(TMemoryEatAttributes& aAttributes) :
+    CActive(EPriorityStandard), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CMemoryEatManager::~CMemoryEatManager()
+    {
+    Cancel();
+    DestroyMemoryEat();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CMemoryEatManager::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+    
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    
+    // init
+    InitMemoryEatL();
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CMemoryEatManager::RunL()
+    {
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CMemoryEatManager::DoCancel()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CMemoryEatManager::PeriodicTimerCallBack(TAny* aAny)
+    {
+    TInt result = KErrNone;
+    CMemoryEatManager* self = static_cast<CMemoryEatManager*>( aAny );
+
+    self->iPeriodicTimer->Cancel();
+    TRAP( result, self->EatMemoryL() );
+
+    return result;
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CMemoryEatManager::InitMemoryEatL()
+    {
+    // create a chunk for RAM
+    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
+        {
+        TBuf<64> chunkName;
+        chunkName.Format(KChunkName, iAttributes.iId);
+        
+        // set max size of the chunk to be size of the RAM memory
+        TMemoryInfoV1Buf ramMemory;
+        UserHal::MemoryInfo(ramMemory);
+    
+        User::LeaveIfError( iEatChunk.CreateGlobal(chunkName, 0, ramMemory().iMaxFreeRamInBytes-1, EOwnerThread) );
+        }
+    
+    // create a temporary file to disk
+    else
+        {
+        // connect to RFs
+        User::LeaveIfError( iFs.Connect() );
+        
+        iFilesCounter = 0;
+        
+        TFileName eatFileName;
+        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, 1 );
+
+        iFs.MkDirAll( eatFileName );
+        User::LeaveIfError( iEatFile.Replace( iFs, eatFileName, EFileWrite ) );
+        iFilesCounter++;        
+        } 
+    
+    iWavyEatMoreMemory = ETrue;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEatManager::DestroyMemoryEat()
+    {
+    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
+        {
+        iEatChunk.Adjust(0);
+        iEatChunk.Close();
+        }
+    else
+        {
+        // close current file
+        
+        iEatFile.Flush();
+        iEatFile.Close();
+
+        // delete created files
+        for ( TInt k = 1; k <= iFilesCounter; k++ )
+            {            
+            TFileName eatFileName;
+            eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, k );
+            iFs.Delete( eatFileName );
+            }
+        iFs.Close();
+        } 
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CMemoryEatManager::EatMemoryL()
+    {
+    // get current sizes
+    TInt64 eatSizeNow(0);
+    TInt sizeNow(0);
+    TInt64 freeSystemMemory(0);
+
+    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
+        {
+        eatSizeNow = iEatChunk.Size(); // get current chunk size
+        }
+    else
+        {
+        User::LeaveIfError( iEatFile.Size( sizeNow ) );
+        if ( iFilesCounter > 1)
+            {
+            eatSizeNow += sizeNow + ( ( iFilesCounter - 1 ) * KMaxEatSize );
+        	}
+        else
+            { 
+            eatSizeNow = sizeNow ; 
+            }
+        }
+    LOGSTRING2("Loadgen:EatMemoryL eatSizeNow = %d", eatSizeNow );
+    
+    freeSystemMemory = ReadFreeMemory();
+    
+    // eat until specific amount of memory at most amount of buffer at a time  
+    if (iAttributes.iType == EMemoryEatTypeMemoryToEat)
+        {
+        // grow partial buffer to match exact amount 
+        if ( ( iAttributes.iAmount - eatSizeNow >= 0 && 
+               iAttributes.iAmount - eatSizeNow < iAttributes.iBuffer ) )
+            {
+               DoEatMemoryL( eatSizeNow + ( iAttributes.iAmount - eatSizeNow ) );
+            }
+        
+        // grow full buffer
+        else if ( eatSizeNow < iAttributes.iAmount )
+            {
+            DoEatMemoryL( eatSizeNow + iAttributes.iBuffer );
+            }
+        // shrink partial buffer to match exact amount
+        else if (eatSizeNow - iAttributes.iAmount >= 0 && eatSizeNow - iAttributes.iAmount < iAttributes.iBuffer)
+            {
+            DoEatMemoryL(eatSizeNow - (eatSizeNow - iAttributes.iAmount));
+            }                
+        
+        // shrink full buffer
+        else if (eatSizeNow > iAttributes.iAmount)
+            {
+            DoEatMemoryL(eatSizeNow - iAttributes.iBuffer);
+            }                
+        }
+
+    
+    // eat until specific amount of free memory has been reached at most amount of buffer at a time
+    else if (iAttributes.iType == EMemoryEatTypeMemoryToBeLeft)
+        {
+        // grow partial buffer to match exact amount
+        if (freeSystemMemory - iAttributes.iAmount >= 0 && freeSystemMemory - iAttributes.iAmount < iAttributes.iBuffer)
+            {
+            DoEatMemoryL(eatSizeNow + (freeSystemMemory - iAttributes.iAmount));
+            }
+
+        // grow full buffer
+        else if (freeSystemMemory > iAttributes.iAmount)
+            {
+            DoEatMemoryL(eatSizeNow + iAttributes.iBuffer);
+            }
+
+        // shrink partial buffer to match exact amount
+        if (iAttributes.iAmount - freeSystemMemory >= 0 && iAttributes.iAmount - freeSystemMemory < iAttributes.iBuffer)
+            {
+            DoEatMemoryL(eatSizeNow - (iAttributes.iAmount - freeSystemMemory));
+            }
+
+        // shrink full buffer
+        else if (freeSystemMemory < iAttributes.iAmount)
+            {
+            DoEatMemoryL(eatSizeNow - iAttributes.iBuffer);
+            }
+        }        
+        
+    // wavy memory eat
+    else if (iAttributes.iType == EMemoryEatTypeWavy)
+        {
+        // grow to max value if not under it
+        if (freeSystemMemory > iAttributes.iRandomMax)
+            {
+            DoEatMemoryL(eatSizeNow + (freeSystemMemory - iAttributes.iRandomMax) + iAttributes.iBuffer);
+            iWavyEatMoreMemory = ETrue; // change direction
+            }
+        
+        // shrink to min value if not below it
+        else if (freeSystemMemory < iAttributes.iRandomMin)
+            {
+            DoEatMemoryL(eatSizeNow - (iAttributes.iRandomMin - freeSystemMemory) - iAttributes.iBuffer);
+            iWavyEatMoreMemory = EFalse; // change direction
+            }                
+        
+        // grow or shrink
+        else
+            {
+            if (iWavyEatMoreMemory)
+                {
+                // grow partial buffer to match exact amount
+                if (freeSystemMemory - iAttributes.iRandomMin >= 0 && freeSystemMemory - iAttributes.iRandomMin < iAttributes.iBuffer)
+                    {
+                    DoEatMemoryL(eatSizeNow + (freeSystemMemory - iAttributes.iRandomMin));
+                    iWavyEatMoreMemory = EFalse; // change direction since limit reached
+                    }
+                
+                // grow full buffer
+                else
+                    {
+                    DoEatMemoryL(eatSizeNow + iAttributes.iBuffer);
+                    }
+                }
+
+            else // shrink
+                {
+                // shrink partial buffer to match exact amount
+                if (iAttributes.iRandomMax - freeSystemMemory >= 0 && iAttributes.iRandomMax - freeSystemMemory < iAttributes.iBuffer)
+                    {
+                    DoEatMemoryL(eatSizeNow - (iAttributes.iRandomMax - freeSystemMemory));
+                    iWavyEatMoreMemory = ETrue; // change direction since limit reached
+                    }                
+                
+                // shrink full buffer
+                else
+                    {
+                    DoEatMemoryL(eatSizeNow - iAttributes.iBuffer);
+                    }                 
+                }
+            }
+        }
+        
+
+    // call timer
+    iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iIdle, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CMemoryEatManager::DoEatMemoryL( TInt64 aNewSize )
+    {
+    // check that new size is in valid range
+    if (aNewSize < 0)
+        {
+        aNewSize = 0;
+        }
+    LOGSTRING2("Loadgen::DoEatMemoryL aNewSize = %ld", aNewSize );
+    // set new size
+    if (iAttributes.iSource == EMemoryEatSourceTypeRAM)
+        {
+        TInt err = iEatChunk.Adjust( aNewSize );
+        }
+    else
+        {
+        HandleEatMemoryL( aNewSize );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMemoryEatManager::HandleEatMemoryL( TInt64 aNewSize )
+    {
+    // current size = open file size + full files sizes
+    TInt currentFileSize = 0;        
+    User::LeaveIfError( iEatFile.Size( currentFileSize ) );    
+    TInt64 currentSize = currentFileSize + ( ( iFilesCounter - 1 ) * KMaxEatSize );
+    
+    if ( aNewSize > currentSize ) // increasing
+        {
+        AllocMemoryL( aNewSize );
+        }
+    else if ( aNewSize < currentSize )//decreasing
+        {
+        FreeMemoryL( aNewSize );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+void CMemoryEatManager::AllocMemoryL( TInt64 aNewSize )
+    {
+    LOGSTRING("Loadgen: CMemoryEatManager::AllocMemoryL =>");
+    // size of the file that remains open
+    TInt64 sizeLeft = aNewSize % KMaxEatSize;
+    // amount of the files that is needed
+    TInt64 filesNeeded = aNewSize / KMaxEatSize; 
+    if ( sizeLeft > 0 )
+        {
+        filesNeeded++;
+        }
+
+    if ( filesNeeded > iFilesCounter )
+        {
+        // update current file size to 2 GB
+        User::LeaveIfError( iEatFile.SetSize( KMaxEatSize ) );
+        // close current file
+        iEatFile.Flush();
+        iEatFile.Close();
+        
+        // open new file
+        TFileName eatFileName;
+        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, ++iFilesCounter );
+        
+        iFs.MkDirAll( eatFileName );
+        User::LeaveIfError( iEatFile.Replace( iFs, eatFileName, EFileWrite ) );
+        
+        }
+    User::LeaveIfError( iEatFile.SetSize( sizeLeft ) );
+    LOGSTRING("Loadgen: CMemoryEatManager::AllocMemoryL <=");
+    }
+
+// --------------------------------------------------------------------------------------------
+void CMemoryEatManager::FreeMemoryL( TInt64 aNewSize )    
+    {
+    LOGSTRING("Loadgen: CMemoryEatManager::FreeMemoryL =>");
+    // size of the file that remains open
+    TInt sizeLeft = aNewSize % KMaxEatSize;
+        
+    LOGSTRING2("Loadgen: sizeLeft = %d ",  sizeLeft );
+    // amount of the files that is needed
+    TInt filesNeeded = aNewSize / KMaxEatSize; 
+  
+    if ( filesNeeded == 0 )
+            {
+            filesNeeded = 1;
+            }
+
+    if ( iFilesCounter > 1 && filesNeeded < iFilesCounter )
+        {
+        TFileName eatFileName;
+
+        // close current open file 
+        iEatFile.Flush();
+        iEatFile.Close();
+        // remove file
+        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, iFilesCounter-- );
+        iFs.Delete( eatFileName );
+        
+        // remove files not needed
+        while ( iFilesCounter > filesNeeded )
+            {
+            eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, iFilesCounter-- );
+            iFs.Delete( eatFileName );
+            }
+
+        // open new file
+        eatFileName.Format( KFilePath, 'B'+iAttributes.iSource, iAttributes.iId, iFilesCounter );
+        User::LeaveIfError( iEatFile.Open( iFs, eatFileName, EFileWrite ) );
+        }
+    User::LeaveIfError( iEatFile.SetSize( sizeLeft ) );
+    LOGSTRING("Loadgen: CMemoryEatManager::FreeMemoryL <=");
+    }
+
+// --------------------------------------------------------------------------------------------
+TInt64 CMemoryEatManager::ReadFreeMemory()    
+    {
+    if ( iAttributes.iSource == EMemoryEatSourceTypeRAM )
+        {   
+        TMemoryInfoV1Buf ramMemory;
+        UserHal::MemoryInfo( ramMemory ); // get available RAM
+        return (TInt64)ramMemory().iFreeRamInBytes;
+        }
+    else
+        {   
+        TVolumeInfo volumeInfo;
+        iFs.Volume( volumeInfo, iAttributes.iSource + 1 ); // get available disk      
+        return volumeInfo.iFree;
+        }
+    }
+// --------------------------------------------------------------------------------------------
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_messages.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,990 @@
+/*
+* 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 FILES
+#include "loadgen_messages.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+#include <e32math.h>
+
+_LIT(KThreadName, "Messages %d");
+_LIT(KMessageSMS, "A test message from LoadGen S60 RnD tool. ");
+_LIT( KMessageSMSType, "SMS" );
+_LIT( KMessageMMSType, "MMS" );
+
+const TInt KTestMessageLength = 42;
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CMessages* CMessages::NewL( TMessageAttributes& aAttributes, TInt aReferenceNumber )
+    {
+    CMessages* self = new(ELeave) CMessages( aAttributes, aReferenceNumber );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CMessages::~CMessages()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CMessages::CMessages( TMessageAttributes& aAttributes, 
+                       TInt aReferenceNumber ) 
+                            : iAttributes( aAttributes )
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMessages::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadMessages;
+    
+    TBuf<64> threadName;
+    threadName.Format( KThreadName, iAttributes.iId );
+    
+    // create a thread
+    User::LeaveIfError( iThread.Create( threadName, 
+                                        ThreadFunction, 
+                                        KDefaultStackSize * 2, 
+                                        KMinHeapSize, 
+                                        1024 * KMinHeapSize, 
+                                        (TAny*) &iAttributes ) );
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CMessages::ThreadFunction(TAny* aThreadArg)
+    {
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install( pS );
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad( *( ( TMessageAttributes* ) aThreadArg ) );
+
+    delete pS;
+    delete pC;
+    
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMessages::GenerateLoad( TMessageAttributes& aAttributes )
+    {
+    CMessageManager* messagesManager = NULL;
+    TRAPD( err, messagesManager = CMessageManager::NewL( aAttributes ) );
+
+    if ( err == KErrNone )
+        {
+        CActiveScheduler::Start();
+        }
+    delete messagesManager;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMessages::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMessages::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMessages::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority( CLoadGenUtils::SettingItemToThreadPriority( iAttributes.iPriority ) );
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CMessages::Close()
+    {
+    CLoadBase::Close();
+
+    if ( iThread.ExitReason() == 0 ) // check if the thread is still alive
+        {
+        // signal the thread that it needs to close
+        iThread.RequestComplete( iAttributes.iDeathStatus, KErrCancel );
+
+        // wait the thread to die
+        TRequestStatus waiter;
+        iThread.Logon( waiter );
+        User::WaitForRequest( waiter );
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CMessages::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    TBuf<3> typeBuf;
+    CLoadGenUtils::SettingItemToThreadDescription( iAttributes.iPriority, prioBuf );
+    if ( iAttributes.iMessageType == EMessageTypeSMS )
+        {
+        typeBuf.Copy( KMessageSMSType );
+        }
+    else
+        {
+        typeBuf.Copy( KMessageMMSType );
+        }
+    _LIT(KMessagesEntry, "[%d] Type=%S prio=%S dest=%S idle=%dms random=%d%%");
+    buf.Format( KMessagesEntry,  iAttributes.iId, &typeBuf, &prioBuf, &iAttributes.iDestination, 
+                iAttributes.iIdle, iAttributes.iRandomVariance );
+    
+    return TPtrC( buf );
+    }               
+// --------------------------------------------------------------------------------------------
+
+CMessageManager* CMessageManager::NewL( TMessageAttributes& aAttributes )
+    {
+    CMessageManager* self = new(ELeave) CMessageManager( aAttributes );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+CMessageManager::CMessageManager( TMessageAttributes& aAttributes ) :
+    CActive( EPriorityStandard ), iAttributes( aAttributes ), iState( EStateIdle )
+    {
+    iMessageCounter = 0;
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CMessageManager::~CMessageManager()
+    {
+    Cancel();
+    delete iMessage;
+    if ( iPeriodicTimer )
+        {
+        iPeriodicTimer->Cancel();
+        delete iPeriodicTimer;
+        }
+    if ( iAttributes.iMessageType == EMessageTypeSMS && iSmsHandler )
+        {
+        delete iSmsHandler;
+        }
+    else if ( iMmsHandler )
+        {
+        delete iMmsHandler;
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CMessageManager::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+    
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    if ( iAttributes.iAmount > 0 )
+        {
+        iState = EStateSend;
+        }
+    iMessage = HBufC::NewL( iAttributes.iLength );
+    CreateMessage();
+
+    // init SMS sender ao
+    if ( iAttributes.iMessageType == EMessageTypeSMS )
+        {
+        iSmsHandler = CSmsHandler::NewL( *this );
+        }
+    else
+        {
+        iMmsHandler = CMmsHandler::NewL( *this );
+        }
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    iPeriodicTimer->Start( KDefaultStart, KDefaultPeriod, 
+                        TCallBack( PeriodicTimerCallBack, this ) );
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CMessageManager::RunL()
+    {
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CMessageManager::DoCancel()
+    {
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TInt CMessageManager::PeriodicTimerCallBack(TAny* aAny)
+    {
+    CMessageManager* self = static_cast<CMessageManager*>( aAny );
+
+    self->iPeriodicTimer->Cancel();
+    self->HandleMessageSending();
+
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMessageManager::CreateMessage()
+    {
+    // Message body
+    TBuf<KTestMessageLength> mToYou( KMessageSMS );
+    TPtr ptr = iMessage->Des();
+
+    // Take as many characters as user requested to create the message
+    for ( TInt j = 0; j < iAttributes.iLength; j++ )
+          {
+           for ( TInt k = 0; k < KTestMessageLength;  k++ )
+               {
+               ptr.Append( mToYou[k] );
+               j++;
+               if ( j == iAttributes.iLength )
+                   {
+                   break;
+                   }
+               }        
+           }
+    }
+
+
+// --------------------------------------------------------------------------------------------
+
+void CMessageManager::HandleMessageSending()
+    {
+    if ( iState == EStateSend && iAttributes.iDestination.Length() <= KTelephoneNumberMaxLength )
+        {
+        TBool err( KErrNone );        
+
+        // make a new call
+        iState = EStateSending;
+ 
+        iMessageCounter++;
+        if ( iAttributes.iMessageType == EMessageTypeSMS )
+            {
+            TRAP( err, iSmsHandler->SendL( iAttributes.iDestination, *iMessage ) );
+            if ( !err )
+                {
+                iState = EStateIdle;
+                iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
+                            iAttributes.iRandomVariance ), KDefaultPeriod, 
+                            TCallBack( PeriodicTimerCallBack, this ) );
+
+                }
+            }
+        else
+            {
+            TRAP( err, iMmsHandler->SendL( iAttributes.iDestination, *iMessage ) );            
+            if ( err )
+                {
+                HandleStatus( EStateIdle );
+                }
+            }
+        }
+    else
+        {
+        iState = EStateIdle;
+        iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
+                    iAttributes.iRandomVariance ), KDefaultPeriod, 
+                    TCallBack( PeriodicTimerCallBack, this ) );
+
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CMessageManager::HandleStatus( TInt /*aErr*/ )
+    {
+    // timer after wait
+    if ( iMessageCounter < iAttributes.iAmount )
+        {
+        iState = EStateSend;
+        iPeriodicTimer->Cancel();
+        iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
+                    iAttributes.iRandomVariance ), KDefaultPeriod, 
+                    TCallBack( PeriodicTimerCallBack, this ) );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+// INCLUDE FILES
+#include <eikenv.h>
+#include <coemain.h>
+#include <e32std.h>
+#include <msvids.h>
+#include <msvstd.h>
+#include <smsclnt.h>
+#include <smut.h>
+#include <mtclreg.h>
+#include <txtrich.h>
+#include <smscmds.h>
+#include <mtmuibas.h>
+#include <mtmdef.h>
+#include <StringLoader.h>
+#include "smutset.h"
+#include "smuthdr.h"
+ 
+ 
+ 
+// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// CSmsHandler::CSmsHandler()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CSmsHandler::CSmsHandler( CMessageManager& aManager )
+    : CActive( CActive::EPriorityStandard ), iManager( aManager )
+    {
+    CActiveScheduler::Add( this );
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CSmsHandler::ConstructL()
+    {
+    // Session to message server is opened asynchronously.
+    iSession = CMsvSession::OpenAsyncL( *this );
+ 
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CSmsHandler* CSmsHandler::NewL( CMessageManager& aManager  )
+    {
+    CSmsHandler* self = NewLC( aManager );
+    CleanupStack::Pop( self );
+    return self;
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CSmsHandler* CSmsHandler::NewLC(  CMessageManager& aManager )
+    {
+    CSmsHandler* self = new ( ELeave ) CSmsHandler( aManager );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+ 
+// ----------------------------------------------------------
+// CSmsHandler::~CSmsHandler()
+// Destructor.
+// ----------------------------------------------------------
+//
+CSmsHandler::~CSmsHandler()
+    {
+    Cancel();           // cancel any outstanding request
+ 
+    delete iOperation;
+    delete iMtmUiRegistry;
+    delete iSmsMtm;
+    delete iMtmRegistry;
+    delete iSession;    // session must be deleted last
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::DoCancel()
+// Cancels a request.
+// -----------------------------------------------------------------------------
+//
+void CSmsHandler::DoCancel()
+    {
+    if ( iOperation )
+        {
+        iOperation->Cancel();
+        }
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::RunL()
+// Handles request completion events.
+// -----------------------------------------------------------------------------
+//
+void CSmsHandler::RunL()
+    {
+    User::LeaveIfError( iStatus != KErrNone );
+ 
+    // Determine the current operations progress.
+    // ProgressL returns an 8 bit descriptor.
+    TBufC8<KMsvProgressBufferLength> progress( iOperation->ProgressL() );
+    _LIT8( KCompare, "KErrNone" );
+    User::LeaveIfError( !progress.Compare( KCompare ) );
+ 
+    // The pointer to the current CMsvOperation object is no longer needed.
+    delete iOperation;
+    iOperation = NULL;
+ 
+    // Determine which request has finished.
+    switch ( iState )
+        {
+        case EWaitingForMoving:
+            // Once a message is moved to Outbox it is scheduled for sending.
+            ScheduleL();
+            break;
+ 
+        case EWaitingForScheduling:
+            {
+            TMsvEntry entry( iSmsMtm->Entry().Entry() );
+            TInt state( entry.SendingState() );
+ 
+            if ( state == KMsvSendStateWaiting || state == KMsvSendStateScheduled)
+                {
+                // notify the observer that status has changed
+                iManager.HandleStatus( iStatus.Int() );
+                }
+            break;
+            }
+ 
+        default:
+            break;
+        }
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::HandleSessionEventL()
+// Handles notifications of events from the Message Server.
+// -----------------------------------------------------------------------------
+//
+void CSmsHandler::HandleSessionEventL( TMsvSessionEvent aEvent,
+                                      TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
+    {
+    switch ( aEvent )
+        {
+        // Session to server established
+        case EMsvServerReady:
+            {
+            TMsvId serviceId( KUidMsgTypeSMS.iUid ); // SMS service id
+ 
+            // Determine if the event was succesful.
+            // ServiceProgress inserts TBuf8 value in progress.
+            TBuf8<KBfrLength> progress;
+            iSession->ServiceProgress( serviceId, progress );
+            _LIT8( KCompare, "KErrNone" );
+ 
+            if ( progress.Compare( KCompare ) )
+                {
+                // Check that MtmRegistry has not already been accessed.
+                if ( !iMtmRegistry )
+                    {
+                    AccessMtmL();
+                    }
+                }
+            break;
+            }
+ 
+        // All other events are ignored.
+        default:
+            break;
+        }
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::AccessMtmL()
+// Access the MTM Registry and create a SMS specific Client MTM instance.
+// -----------------------------------------------------------------------------
+//
+void CSmsHandler::AccessMtmL()
+    {
+    // Create an MTM Registry object.
+    iMtmRegistry = CClientMtmRegistry::NewL( *iSession );
+ 
+    // Create an SMS Client MTM object.
+    iSmsMtm = STATIC_CAST( CSmsClientMtm*, iMtmRegistry->NewMtmL( KUidMsgTypeSMS ) );
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::SendL()
+// Starts the process of creating and sending an SMS message.
+// -----------------------------------------------------------------------------
+//
+TBool CSmsHandler::SendL( const TDesC& aRecipientNumber,
+                            const TDesC& aMessageText )
+    {
+    iRecipientNumber = aRecipientNumber;
+    iMessageText = aMessageText;
+ 
+    if ( CreateMsgL() )
+        {
+        return ETrue;
+        }
+ 
+    return EFalse;
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::CreateMsgL()
+// Create an SMS message.
+// -----------------------------------------------------------------------------
+//
+TBool CSmsHandler::CreateMsgL()
+    {
+	if(!iSmsMtm)
+		{
+		return EFalse;
+		}
+    // Current entry is the Draft folder.
+    iSmsMtm->SwitchCurrentEntryL( KMsvDraftEntryId );
+ 
+    // Create a new SMS message entry as a child of the current context.
+    iSmsMtm->CreateMessageL( KUidMsgTypeSMS.iUid );
+ 
+    CMsvEntry& serverEntry = iSmsMtm->Entry();
+    TMsvEntry entry( serverEntry.Entry() );
+ 
+    CRichText& body = iSmsMtm->Body();   // the body of the message
+    body.Reset();
+    // Insert the message text gotten as input from user.
+    body.InsertL( 0, iMessageText );
+ 
+    // Message will be sent immediately.
+    entry.SetSendingState( KMsvSendStateWaiting );
+ 
+    entry.iDate.UniversalTime(); // insert current time //Solution for HomeTime()
+
+    // Set the SMS message settings for the message.
+    CSmsHeader& header = iSmsMtm->SmsHeader();
+    CSmsSettings* settings = CSmsSettings::NewL();
+    CleanupStack::PushL( settings );
+ 
+    settings->CopyL( iSmsMtm->ServiceSettings() );    // restore settings
+    settings->SetDelivery( ESmsDeliveryImmediately ); // to be delivered immediately
+    settings->SetDeliveryReport(ETrue);
+    header.SetSmsSettingsL( *settings );              // new settings
+ 
+    // Let's check if there is a service center address.
+    if ( header.Message().ServiceCenterAddress().Length() == 0 )
+        {
+        // No, there isn't. We assume there is at least one service center
+        // number set and use the default service center number.
+        CSmsSettings* serviceSettings = &( iSmsMtm->ServiceSettings() );
+ 
+        // Check if number of service center addresses in the list is null.
+ 
+        //Changed for 3rd Edition specially
+        if ( !serviceSettings->ServiceCenterCount() )
+            {
+            CleanupStack::PopAndDestroy( settings ); 
+            return EFalse;     // quit creating the message
+            }
+ 
+        else
+            {
+            //Changed for 3rd Edition specially            
+            CSmsNumber* smsCenter= CSmsNumber::NewL();
+            CleanupStack::PushL(smsCenter);
+            smsCenter->SetAddressL((serviceSettings->GetServiceCenter( 
+                            serviceSettings->DefaultServiceCenter())).Address());
+            header.Message().SetServiceCenterAddressL( smsCenter->Address() );
+            CleanupStack::PopAndDestroy(smsCenter);
+            }
+        }
+ 
+    CleanupStack::PopAndDestroy( settings );
+ 
+    // Recipient number is displayed also as the recipient alias.
+    entry.iDetails.Set( iRecipientNumber );
+    // Add addressee.
+    iSmsMtm->AddAddresseeL( iRecipientNumber, entry.iDetails );
+ 
+    // Validate message.
+    if ( !ValidateL() )
+        {
+        return EFalse;
+        }
+ 
+    entry.SetVisible( ETrue );          // set message as visible
+    entry.SetInPreparation( EFalse );   // set together with the visibility flag
+    serverEntry.ChangeL( entry );       // commit changes        
+    iSmsMtm->SaveMessageL();            // save message
+ 
+    TMsvSelectionOrdering selection;
+    CMsvEntry* parentEntry = CMsvEntry::NewL( iSmsMtm->Session(), KMsvDraftEntryId, selection );
+    CleanupStack::PushL( parentEntry );
+ 
+    // Move message to Outbox.
+    iOperation =parentEntry->MoveL( entry.Id(), KMsvGlobalOutBoxIndexEntryId, iStatus );
+ 
+    CleanupStack::PopAndDestroy( parentEntry );
+ 
+    iState = EWaitingForMoving;
+    SetActive();
+ 
+    return ETrue;
+  }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::ValidateL()
+// Validate an SMS message.
+// -----------------------------------------------------------------------------
+//
+TBool CSmsHandler::ValidateL()
+    {
+	if( !iSmsMtm )
+		{
+		return EFalse;
+		}
+    // Empty part list to hold the result.
+    TMsvPartList result( KMsvMessagePartNone );
+ 
+    // Validate message body.
+    result = iSmsMtm->ValidateMessage( KMsvMessagePartBody );
+ 
+    if ( result != KMsvMessagePartNone )
+        {
+        return EFalse;
+        }
+ 
+    // Validate recipient.
+    result = iSmsMtm->ValidateMessage( KMsvMessagePartRecipient );
+ 
+    if ( result != KMsvMessagePartNone )
+        {
+        return EFalse;
+        }
+ 
+    return ETrue;
+    }
+ 
+// -----------------------------------------------------------------------------
+// CSmsHandler::ScheduleL()
+// Schedule an SMS message for sending.
+// -----------------------------------------------------------------------------
+//
+void CSmsHandler::ScheduleL()
+    {
+	if( !iSmsMtm )
+		{
+		return;
+		}
+    CMsvEntrySelection* selection = new ( ELeave ) CMsvEntrySelection;
+    CleanupStack::PushL( selection );
+    selection->AppendL( iSmsMtm->Entry().EntryId() ); // add message to selection
+ 
+    // Add entry to task scheduler.
+    TBuf8<1> dummyParams;   // dummy parameters needed for InvokeAsyncFunctionL
+    iOperation = iSmsMtm->InvokeAsyncFunctionL( ESmsMtmCommandScheduleCopy,
+                          *selection, dummyParams, iStatus );
+ 
+    CleanupStack::PopAndDestroy( selection );
+ 
+    iState = EWaitingForScheduling;
+    SetActive();
+    }
+ 
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+
+
+// INCLUDE FILES
+#include <mtclreg.h>                  // for CClientMtmRegistry 
+#include <msvids.h>                   // for Message type IDs
+#include <mmsclient.h>                // for CMmsClientMtm
+#include <AknQueryDialog.h>           // for CAknTextQueryDialog
+#include <f32file.h>                
+#include <coeutils.h>                  // Check the file exist
+
+#include <cmsvmimeheaders.h>        //Attachemt mimeheader
+#include <mmsvattachmentmanager.h>    //Attachment manager
+
+// -----------------------------------------------------------------------------
+// CMmsHandler::CSmsHandler()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CMmsHandler::CMmsHandler( CMessageManager& aManager ) : iManager( aManager )
+    {
+    }
+ 
+// -----------------------------------------------------------------------------
+// CMmsHandler::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CMmsHandler::ConstructL()
+    {
+    // Session to message server is opened asynchronously.
+    iSession = CMsvSession::OpenAsyncL( *this );
+ 
+    }
+ 
+// -----------------------------------------------------------------------------
+// CMmsHandler::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CMmsHandler* CMmsHandler::NewL( CMessageManager& aManager  )
+    {
+    CMmsHandler* self = NewLC( aManager );
+    CleanupStack::Pop( self );
+    return self;
+    }
+ 
+// -----------------------------------------------------------------------------
+// CMmsHandler::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CMmsHandler* CMmsHandler::NewLC(  CMessageManager& aManager )
+    {
+    CMmsHandler* self = new ( ELeave ) CMmsHandler( aManager );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+ 
+// ----------------------------------------------------------
+// CMmsHandler::~CSmsHandler()
+// Destructor.
+// ----------------------------------------------------------
+//
+CMmsHandler::~CMmsHandler()
+    {
+    delete iMmsMtm;
+    delete iMtmReg;
+    delete iSession;    // session must be deleted last (and constructed first)
+    }
+
+/*
+-----------------------------------------------------------------------------
+    CMmsHandler::CompleteConstructL()
+    Creates client MTM registry when session is ready for use. 
+    This completes model construction and is called after 'server
+    ready' event is received after async opening of CMsvSession.
+-----------------------------------------------------------------------------
+*/
+void CMmsHandler::CompleteConstructL()
+    {
+    // We get a MtmClientRegistry from our session
+    // this registry is used to instantiate new mtms.
+    iMtmReg = CClientMtmRegistry::NewL( *iSession );
+    iMmsMtm = (CMmsClientMtm*)iMtmReg->NewMtmL( KUidMsgTypeMultimedia );
+    }
+   
+/*
+-----------------------------------------------------------------------------
+    CMmsHandler::HandleSessionEventL()
+
+    Receives session events from observer and calls event handling functions. 
+    Note that if additional session event handlers are defined 
+    in the session, they are called before this function (as this is the
+    main session observer).
+    The type of event is indicated by the value of aEvent. The 
+    interpretation of the TAny arguments depends on this type. 
+-----------------------------------------------------------------------------
+*/
+void CMmsHandler::HandleSessionEventL(TMsvSessionEvent aEvent, 
+                                        TAny* /*aArg1*/, 
+                                        TAny* /*aArg2*/, 
+                                        TAny* /*aArg3*/)
+    {
+    switch ( aEvent )
+        {
+        // This event tells us that the session has been opened
+        case EMsvServerReady:
+            {
+            CompleteConstructL();       // Construct the mtm registry & MMS mtm
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CSmsHandler::SendL()
+// Starts the process of creating and sending an SMS message.
+// -----------------------------------------------------------------------------
+//
+TBool CMmsHandler::SendL( const TDesC& aRecipientNumber,
+                            const TDesC& aMessageText )
+    {
+    TInt result( EFalse );
+    
+    iRecipientNumber = aRecipientNumber;
+    iMessageText = aMessageText;
+ 
+    if ( CreateMsgL() )
+        {
+        if ( SendMessageL() )
+            {
+            result = ETrue;
+            }
+        }
+ 
+    return result;
+    }
+
+/*
+-----------------------------------------------------------------------------
+    CMmsHandler::CreateMsgL()
+    Creates a new message server entry and set up default values.
+    In case the attachment file does not found method return EFalse
+    otherwise ETrue.
+    There are differenses how to add attachment file between 2nd and 3rd edition. 
+-----------------------------------------------------------------------------
+*/
+TBool CMmsHandler::CreateMsgL()
+    {
+
+    // - CMsvEntry accesses and acts upon a particular Message Server entry.
+    // - NewL() does not create a new entry, but simply a new object to access an existing entry.
+    // - It takes in as parameters the client's message server session,
+    //   ID of the entry to access and initial sorting order of the children of the entry. 
+    CMsvEntry* entry = CMsvEntry::NewL( *iSession, 
+                                        KMsvGlobalOutBoxIndexEntryId, 
+                                        TMsvSelectionOrdering() );
+    CleanupStack::PushL( entry );
+
+    // Set context to the parent folder (Outbox)
+    iMmsMtm->SwitchCurrentEntryL( entry->EntryId() );
+    
+    // Create new message in the parent folder (Outbox) and set it as the current context.
+    iMmsMtm->CreateMessageL( iMmsMtm->DefaultServiceL() );
+
+    CleanupStack::PopAndDestroy( entry ); 
+    
+    // Setting recipients
+    // use this to add the "To" recipients.
+    iMmsMtm->AddAddresseeL( iRecipientNumber );
+    
+    //Setting message subject
+    _LIT(KMessageSubject, "MMS Message");
+    iMmsMtm->SetSubjectL( KMessageSubject );
+    
+    // add message text
+    SetMessageBodyL();
+   
+    TMsvEntry ent = iMmsMtm->Entry().Entry();
+    // Set InPreparation to false
+    ent.SetInPreparation( EFalse );
+    ent.SetVisible( ETrue );            // mark as visible, after this the message can be seen in Outbox and, after sending, in Sent folder.
+  
+    iMmsMtm->Entry().ChangeL( ent );    // Commit changes
+    
+    //Save the changes
+    iMmsMtm->SaveMessageL();
+    
+    return ETrue;
+    }
+
+//---------------------------------------------------------------------------------
+void CMmsHandler::SetMessageBodyL()
+    {
+    _LIT (KFilenameText, "msg.txt");
+    CMsvStore* store = iMmsMtm->Entry().EditStoreL();
+    CleanupStack::PushL( store );
+
+    TMsvAttachmentId attachmentId = KMsvNullIndexEntryId;
+
+    iMmsMtm->CreateTextAttachmentL ( *store,
+                                     attachmentId,
+                                     iMessageText,
+                                     KFilenameText );
+
+    store->CommitL();
+
+    CleanupStack::PopAndDestroy( store );
+    }
+
+/* 
+-----------------------------------------------------------------------------
+    CMmsHandler::SendMessageL()
+    Sends the message.
+    Return values: ETrue or EFalse
+-----------------------------------------------------------------------------
+*/
+TBool CMmsHandler::SendMessageL()
+    {
+
+    // Start sending the message via the Server MTM to the MMS server
+    CMsvOperationWait* wait = CMsvOperationWait::NewLC();
+    wait->iStatus = KRequestPending;
+    CMsvOperation* op = NULL;
+       op = iMmsMtm->SendL( wait->iStatus );
+    wait->Start();
+    CleanupStack::PushL( op );
+    CActiveScheduler::Start();
+
+    // The following is to ignore the completion of other active objects. It is not
+    // needed if the app has a command absorbing control.
+    while( wait->iStatus == KRequestPending )
+        {
+        CActiveScheduler::Start();
+        }
+
+    iManager.HandleStatus( wait->iStatus.Int() );
+    CleanupStack::PopAndDestroy(2); // op, wait
+    
+    return ETrue;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_netconn.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,271 @@
+/*
+* 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 FILES
+#include "loadgen_netconn.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+
+#include <e32math.h>
+#include <commdb.h>
+
+_LIT(KThreadName, "NetConn %d");
+
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CNetConn* CNetConn::NewL(TNetConnAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CNetConn* self = new(ELeave) CNetConn(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CNetConn::~CNetConn()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CNetConn::CNetConn(TNetConnAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CNetConn::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadNetConn;
+
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+    
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, 1024*KMinHeapSize, 16*1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CNetConn::ThreadFunction(TAny* aThreadArg)
+    {
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad(*((TNetConnAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+    
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CNetConn::GenerateLoad(TNetConnAttributes& aAttributes)
+    {
+    CNetConnManager* netConnManager = NULL;
+    TRAPD(err, netConnManager = CNetConnManager::NewL(aAttributes));
+    if (err == KErrNone) CActiveScheduler::Start();
+    delete netConnManager;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CNetConn::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CNetConn::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CNetConn::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CNetConn::Close()
+    {
+    CLoadBase::Close();
+
+    if (iThread.ExitReason() == 0) // check if the thread is still alive
+        {
+        // signal the thread that it needs to close
+        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
+
+        // wait the thread to die
+        TRequestStatus waiter;
+        iThread.Logon(waiter);
+        User::WaitForRequest(waiter);
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CNetConn::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+    
+    _LIT(KNetConnEntry, "[%d] NetConn prio=%S dest=%S idle=%dms random=%d%%");
+    buf.Format(KNetConnEntry, iAttributes.iId, &prioBuf, &iAttributes.iDestination, iAttributes.iIdle, iAttributes.iRandomVariance);
+   
+    return TPtrC(buf);
+    }
+                   
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CNetConnManager* CNetConnManager::NewL(TNetConnAttributes& aAttributes)
+    {
+    CNetConnManager* self = new(ELeave) CNetConnManager(aAttributes);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CNetConnManager::CNetConnManager(TNetConnAttributes& aAttributes) :
+    CActive(EPriorityStandard), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CNetConnManager::~CNetConnManager()
+    {
+    Cancel();
+
+    delete iHTTPReceiver;
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CNetConnManager::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+    
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    
+    iHTTPReceiver = CHTTPReceiver::NewL( *this );
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CNetConnManager::RunL()
+    {
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CNetConnManager::DoCancel()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CNetConnManager::PeriodicTimerCallBack(TAny* aAny)
+    {
+    CNetConnManager* self = static_cast<CNetConnManager*>( aAny );
+
+    self->iPeriodicTimer->Cancel();
+    TRAPD(err,self->StartDownloadL());
+
+    return err;
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CNetConnManager::StartDownloadL()
+    {
+
+    // create new download    
+    TBuf8<256> url;
+    url.Copy(iAttributes.iDestination);
+    
+    iHTTPReceiver->SendHTTPGetL( url );
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CNetConnManager::HTTPFileReceived( TInt aStatus )
+    {
+    switch ( aStatus )
+        {
+        case 200:
+            {
+            // assume that the download has finished in this stage
+            iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iIdle, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+            break;
+            }
+
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_phonecall.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,353 @@
+/*
+* 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 FILES
+#include "loadgen_phonecall.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+
+#include <e32math.h>
+
+_LIT(KThreadName, "PhoneCall %d");
+
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CPhoneCall* CPhoneCall::NewL(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CPhoneCall* self = new(ELeave) CPhoneCall(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPhoneCall::~CPhoneCall()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPhoneCall::CPhoneCall(TPhoneCallAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCall::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadPhoneCall;
+    
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+    
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CPhoneCall::ThreadFunction(TAny* aThreadArg)
+    {
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad(*((TPhoneCallAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+    
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCall::GenerateLoad(TPhoneCallAttributes& aAttributes)
+    {
+    CPhoneCallManager* phoneCallManager = NULL;
+    TRAPD(err, phoneCallManager = CPhoneCallManager::NewL(aAttributes));
+    if (err == KErrNone) CActiveScheduler::Start();
+    delete phoneCallManager;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCall::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCall::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCall::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCall::Close()
+    {
+    CLoadBase::Close();
+
+    if (iThread.ExitReason() == 0) // check if the thread is still alive
+        {
+        // signal the thread that it needs to close
+        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
+
+        // wait the thread to die
+        TRequestStatus waiter;
+        iThread.Logon(waiter);
+        User::WaitForRequest(waiter);
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CPhoneCall::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+    
+    _LIT(KPhoneCallEntry, "[%d] PhoneCall prio=%S dest=%S length=%dms idle=%dms random=%d%%");
+    buf.Format(KPhoneCallEntry, iAttributes.iId, &prioBuf, &iAttributes.iDestination, iAttributes.iLength, iAttributes.iIdle, iAttributes.iRandomVariance);
+   
+    return TPtrC(buf);
+    }               
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CPhoneCallManager* CPhoneCallManager::NewL(TPhoneCallAttributes& aAttributes)
+    {
+    CPhoneCallManager* self = new(ELeave) CPhoneCallManager(aAttributes);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPhoneCallManager::CPhoneCallManager(TPhoneCallAttributes& aAttributes) :
+    CActive(EPriorityStandard), iAttributes(aAttributes), iState(EStateIdle)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CPhoneCallManager::~CPhoneCallManager()
+    {
+    Cancel();
+    
+    if (iPeriodicTimer)
+        {
+        iPeriodicTimer->Cancel();
+        delete iPeriodicTimer;
+        }
+        
+    delete iDialer;
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CPhoneCallManager::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+    
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+
+    // init dialer ao
+    iDialer = CDialer::NewL(*this);
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CPhoneCallManager::RunL()
+    {
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CPhoneCallManager::DoCancel()
+    {
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TInt CPhoneCallManager::PeriodicTimerCallBack(TAny* aAny)
+    {
+    CPhoneCallManager* self = static_cast<CPhoneCallManager*>( aAny );
+
+    self->iPeriodicTimer->Cancel();
+    self->HandleCalls();
+
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCallManager::HandleCalls()
+    {
+    if (iState == EStateIdle)
+        {
+        // make a new call
+        iState = EStateCall;
+        iDialer->Dial(iAttributes.iDestination);
+        }
+    
+    else if (iState == EStateCall)
+        {
+        // hangup existing call
+        iState = EStateIdle;
+        iDialer->Hangup();
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhoneCallManager::HandleStatus(TInt /*aErr*/)
+    {
+    // call timer after wait
+    if (iState == EStateCall)
+        {
+        iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iLength, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+        }
+
+    else if (iState == EStateIdle)
+        {
+        iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iIdle, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+        }        
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CDialer* CDialer::NewL(CPhoneCallManager& aManager)
+    {
+    CDialer* self = new(ELeave) CDialer(aManager);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CDialer::CDialer(CPhoneCallManager& aManager) :
+    CActive(EPriorityStandard), iManager(aManager), iCallParamsPckg(iCallParams)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CDialer::~CDialer()
+    {
+    Cancel();
+    delete iTelephony;
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CDialer::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    
+    // init telephony object
+    iTelephony = CTelephony::NewL();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CDialer::RunL()
+    {
+    // notify the observer that status has changed
+    iManager.HandleStatus(iStatus.Int());
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CDialer::DoCancel()
+    {
+    iTelephony->CancelAsync(CTelephony::EDialNewCallCancel);
+    iTelephony->CancelAsync(CTelephony::EHangupCancel);
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+void CDialer::Dial(const TDesC& aDestination)
+    {
+    CTelephony::TTelNumber telNumber(aDestination);
+    iCallParams.iIdRestrict = CTelephony::ESendMyId;
+    iTelephony->DialNewCall(iStatus, iCallParamsPckg, telNumber, iCallId);
+    SetActive();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CDialer::Hangup()
+    {
+    iTelephony->Hangup(iStatus, iCallId);
+    SetActive();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+    
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_photocapture.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,389 @@
+/*
+* 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 FILES
+#include "loadgen_photocapture.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include "loadgen_traces.h"
+#include <loadgen.rsg>
+#include <e32hal.h>
+#include <u32hal.h>
+#include <e32math.h>
+#include <eikenv.h>
+
+_LIT(KThreadName, "PhotoCapture %d");
+
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+
+//TInt CPhotoCapture::iImagesReady = 0;
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CPhotoCapture* CPhotoCapture::NewL(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CPhotoCapture* self = new(ELeave) CPhotoCapture(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPhotoCapture::~CPhotoCapture()
+    {    
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPhotoCapture::CPhotoCapture(TPhotoCaptureAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {    
+    iAttributes.iId = aReferenceNumber;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhotoCapture::ConstructL()
+    {    
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadPhotoCaptures;
+    
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+    
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CPhotoCapture::ThreadFunction(TAny* aThreadArg)
+    {
+    TInt err = KErrNone;
+    
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad(*((TPhotoCaptureAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+    
+    return err;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhotoCapture::GenerateLoad(TPhotoCaptureAttributes& aAttributes)
+    {    
+    CCameraManager* cameraManager = 0;
+    TRAPD(err, cameraManager = CCameraManager::NewL(aAttributes));
+    if (err == KErrNone) CActiveScheduler::Start();
+    delete cameraManager;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhotoCapture::Resume()
+    {    
+    CLoadBase::Resume();    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhotoCapture::Suspend()
+    {    
+    CLoadBase::Suspend();    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPhotoCapture::SetPriority()
+    {    
+    CLoadBase::SetPriority();    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CPhotoCapture::Close()
+    {    
+    CLoadBase::Close();
+
+    // kill the thread immediately
+    iThread.Kill(0);   
+
+    iThread.Close();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CPhotoCapture::Description()
+    {    
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+        
+    _LIT(KPhotoCaptureEntry, "[%d] PhotoCapture camera=%d prio=%S idle=%dms random=%d%%");
+    buf.Format(KPhotoCaptureEntry, iAttributes.iId, iAttributes.iCamera, &prioBuf, iAttributes.iIdle, iAttributes.iRandomVariance);
+       
+    return TPtrC(buf);
+    }               
+
+// --------------------------------------------------------------------------------------------
+
+
+// --------------------------------------------------------------------------------------------
+CCameraManager* CCameraManager::NewL(TPhotoCaptureAttributes& aAttrs)
+    {
+    CCameraManager* self = new (ELeave) CCameraManager(aAttrs);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+ 
+// --------------------------------------------------------------------------------------------
+CCameraManager::~CCameraManager()
+    {    
+    delete iCamera;
+    if (iPeriodicTimer)
+        {
+        iPeriodicTimer->Cancel();
+        delete iPeriodicTimer;
+        }
+    }
+ 
+// --------------------------------------------------------------------------------------------
+CCameraManager::CCameraManager(TPhotoCaptureAttributes& aAttrs) 
+: 
+CActive(EPriorityStandard),
+iAttributes(aAttrs)
+    {        
+    iState = ENotReady;
+    iNumOfPics = 0;
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CCameraManager::ConstructL()
+    {   
+    CActiveScheduler::Add(this);    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+        
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+
+// --------------------------------------------------------------------------------------------
+void CCameraManager::DoCancel()
+    {    
+    }
+
+// --------------------------------------------------------------------------------------------
+void CCameraManager::RunL()
+    {    
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CCameraManager::ReserveCameraL()
+    {
+    LOGSTRING2("LoadGen: CCameraManager::ReserveCameraL() - Using Camera %d", iAttributes.iCamera);
+    if( iCamera )
+        {
+        iCamera->Release();
+        }
+    delete iCamera;
+    iCamera = 0;
+    TRAPD( err, iCamera = CCamera::NewL(*this, iAttributes.iCamera));
+    iCurrentCamera = iAttributes.iCamera;
+    if(err != KErrNone)
+        {
+        LOGSTRING2("LoadGen: CCamera::NewL leaves with error: %d", err);
+        User::Leave(err);
+        }
+    iCamera->CameraInfo(iCameraInfo);
+    iCamera->Reserve();    
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CCameraManager::ReserveComplete(TInt aError)
+    {
+    if( aError != KErrNone )
+        LOGSTRING2("LoadGen: CCameraManager::ReserveComplete() - Error: %d", aError);
+    
+    if( aError == KErrNone )
+        {
+        iState = ECameraReserved;
+        iCamera->PowerOn();
+        }
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CCameraManager::PowerOnComplete(TInt aError)
+    {
+    if( aError != KErrNone )
+        {
+        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - Error: %d", aError);
+        return;
+        }
+
+    // Define image format, try JPEG images first:
+    CCamera::TFormat format = CCamera::EFormatExif;
+
+    if(iCameraInfo.iImageFormatsSupported & CCamera::EFormatExif)
+        {
+        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - EXIF JPEG supported");
+        format = CCamera::EFormatExif;
+        }
+    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatJpeg )
+        {
+        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - JFIF JPEG supported");
+        format = CCamera::EFormatJpeg;
+        }
+    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor4K )
+        {
+        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - Bitmap 4K Color supported");
+        format = CCamera::EFormatFbsBitmapColor4K;
+        }
+    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor64K )
+        {
+        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - Bitmap 64K Color supported");
+        format = CCamera::EFormatFbsBitmapColor64K;
+        }
+    else if( iCameraInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor16M )
+        {
+        LOGSTRING("LoadGen: CCameraManager::PowerOnComplete() - Bitmap 16M Color supported");
+        format = CCamera::EFormatFbsBitmapColor16M;
+        }
+    else
+        {
+        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - JPEGs not supported, trying \"User defined\" (Supported formats: %d)", iCameraInfo.iImageFormatsSupported);
+        format = CCamera::EFormatUserDefined;
+        }
+    const TInt KImageSizeIndex = 0;  // Largest image size
+    TRAPD( err, iCamera->PrepareImageCaptureL(format, KImageSizeIndex));
+    if( err != KErrNone )
+        {
+        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - Error while preparing camera: %d", err);        
+        }
+    // Camera ready:
+    iState = EIdle;
+    // Take photo:
+    TRAP(err, CapturePhotoL());
+    if( err != KErrNone )
+        {
+        LOGSTRING2("LoadGen: CCameraManager::PowerOnComplete() - Photo capture error: %d", err);
+        }
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CCameraManager::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+void CCameraManager::ImageReady(CFbsBitmap* aBitmap, HBufC8* aData, TInt aError)
+    {    
+    if( aError != KErrNone )
+        {
+        LOGSTRING2("LoadGen: CCameraManager::ImageReady() - Error: %d", aError);
+        }    
+    else
+        {
+        iNumOfPics++;    
+        LOGSTRING2("LoadGen: CCameraManager::ImageReady() - Images successfully captured: %d", iNumOfPics);
+        }
+    delete aBitmap;
+    delete aData;
+    iState = EIdle;
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CCameraManager::FrameBufferReady(MFrameBuffer* /*aFrameBuffer*/, TInt aError)
+    {
+    if( aError != KErrNone )
+        LOGSTRING2("LoadGen: CCameraManager::FrameBufferReady() - Error: %d", aError);
+    }
+ 
+// --------------------------------------------------------------------------------------------
+void CCameraManager::CapturePhotoL()
+    {    
+    // Camera Manager must be in idle state when taking a photo
+    if( iState == ENotReady )
+        {
+        // Not ready, camera must be reserved:
+        ReserveCameraL();
+        }
+    else if (iState == EIdle)
+        {
+        if( iCurrentCamera != iAttributes.iCamera )
+            {
+            LOGSTRING3("LoadGen: CCameraManager::CapturePhotoL() - Switching from Camera %d to Camera %d", iCurrentCamera, iAttributes.iCamera);
+            ReserveCameraL();
+            }
+        else
+            {
+            iState = ECapture;
+            if( iCameraInfo.iFlashModesSupported & CCamera::EFlashForced)
+                {
+                iCamera->SetFlashL(CCamera::EFlashForced);
+                }
+            iCamera->CaptureImage();
+            iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
+                iAttributes.iRandomVariance ), KDefaultPeriod, 
+                TCallBack( PeriodicTimerCallBack, this ) );
+            }
+        }
+    else
+        {
+        iPeriodicTimer->Start( CLoadGenUtils::MilliSecondsToMicroSeconds( iAttributes.iIdle,
+                                    iAttributes.iRandomVariance ), KDefaultPeriod, 
+                                    TCallBack( PeriodicTimerCallBack, this ) );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CCameraManager::PeriodicTimerCallBack(TAny* aAny)
+    {
+    CCameraManager* self = static_cast<CCameraManager*>( aAny );
+    self->iPeriodicTimer->Cancel();
+    TRAP_IGNORE(self->CapturePhotoL());   
+    return KErrNone;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_pointerevent.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,271 @@
+/*
+* 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 FILES
+#include "loadgen_pointerevent.h"
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+
+#include <e32math.h>
+
+_LIT(KThreadName, "PointerEvent %d");
+
+const TInt KDefaultStart = 50;
+const TInt KDefaultPeriod = 5000000;
+    
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CPointerEvent* CPointerEvent::NewL(TPointerEventAttributes& aAttributes, TInt aReferenceNumber)
+    {
+    CPointerEvent* self = new(ELeave) CPointerEvent(aAttributes, aReferenceNumber);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPointerEvent::~CPointerEvent()
+    {
+    Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPointerEvent::CPointerEvent(TPointerEventAttributes& aAttributes, TInt aReferenceNumber) : iAttributes(aAttributes)
+    {
+    iAttributes.iId = aReferenceNumber;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPointerEvent::ConstructL()
+    {
+    CLoadBase::ConstructL();
+    
+    iType = ELoadGenCmdNewLoadPointerEvent;
+    
+    TBuf<64> threadName;
+    threadName.Format(KThreadName, iAttributes.iId);
+    
+    // create a thread
+    User::LeaveIfError(iThread.Create(threadName, ThreadFunction, KDefaultStackSize*2, KMinHeapSize, 1024*KMinHeapSize, (TAny*) &iAttributes ));
+    
+    // set priority of the thread
+    SetPriority();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CPointerEvent::ThreadFunction(TAny* aThreadArg)
+    {
+    CTrapCleanup* pC = CTrapCleanup::New();
+    CActiveScheduler* pS = new CActiveScheduler;
+    CActiveScheduler::Install(pS);
+
+    // start generating load, pass pointer to arguments
+    GenerateLoad(*((TPointerEventAttributes*) aThreadArg));
+
+    delete pS;
+    delete pC;
+    
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPointerEvent::GenerateLoad(TPointerEventAttributes& aAttributes)
+    {
+    CPointerEventManager* pointerEventManager = NULL;
+    TRAPD(err, pointerEventManager = CPointerEventManager::NewL(aAttributes));
+    if (err == KErrNone) CActiveScheduler::Start();
+    delete pointerEventManager;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPointerEvent::Resume()
+    {
+    CLoadBase::Resume();
+    
+    iThread.Resume();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPointerEvent::Suspend()
+    {
+    CLoadBase::Suspend();
+    
+    iThread.Suspend();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CPointerEvent::SetPriority()
+    {
+    CLoadBase::SetPriority();
+    
+    iThread.SetPriority(CLoadGenUtils::SettingItemToThreadPriority(iAttributes.iPriority));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CPointerEvent::Close()
+    {
+    CLoadBase::Close();
+    
+    if (iThread.ExitReason() == 0) // check if the thread is still alive
+        {
+        // signal the thread that it needs to close
+        iThread.RequestComplete(iAttributes.iDeathStatus, KErrCancel);
+
+        // wait the thread to die
+        TRequestStatus waiter;
+        iThread.Logon(waiter);
+        User::WaitForRequest(waiter);
+        iThread.Close();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TPtrC CPointerEvent::Description()
+    {
+    TBuf<256> buf;
+    TBuf<16> prioBuf;
+    CLoadGenUtils::SettingItemToThreadDescription(iAttributes.iPriority, prioBuf);
+    
+    _LIT(KPointerEventEntry, "[%d] PointerEvent prio=%S heartbeat=%dms random=%d%%");
+    buf.Format(KPointerEventEntry, iAttributes.iId, &prioBuf, iAttributes.iHeartBeat, iAttributes.iRandomVariance);
+   
+    return TPtrC(buf);
+    }               
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CPointerEventManager* CPointerEventManager::NewL(TPointerEventAttributes& aAttributes)
+    {
+    CPointerEventManager* self = new(ELeave) CPointerEventManager(aAttributes);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CPointerEventManager::CPointerEventManager(TPointerEventAttributes& aAttributes) :
+    CActive(EPriorityStandard), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+CPointerEventManager::~CPointerEventManager()
+    {
+    Cancel();    
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CPointerEventManager::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    
+    // set the status as pending
+    iStatus = KRequestPending;
+    SetActive();
+    
+    // set the death status pointer point to the request status of this ao
+    iAttributes.iDeathStatus = &iStatus;
+    
+    // init    
+    
+    // start timer    
+    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iPeriodicTimer->Start(KDefaultStart, KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CPointerEventManager::RunL()
+    {
+    // request status has completed by the main thread meaning that we need to stop now
+    CActiveScheduler::Stop();
+    }
+
+// --------------------------------------------------------------------------------------------
+ 
+void CPointerEventManager::DoCancel()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CPointerEventManager::PeriodicTimerCallBack(TAny* aAny)
+    {
+    CPointerEventManager* self = static_cast<CPointerEventManager*>( aAny );
+
+    self->iPeriodicTimer->Cancel();
+    self->SimulatePointerEvent();
+
+    return KErrNone;
+    }
+    
+// --------------------------------------------------------------------------------------------
+ 
+void CPointerEventManager::SimulatePointerEvent()
+    {
+    // Check the screen size and select pointer event position
+    // randomly
+    TSize screenSize = CLoadGenUtils::ScreenSize();
+        
+    TInt x1 = CLoadGenUtils::RandomNumber(0, screenSize.iWidth);
+    TInt y1 = CLoadGenUtils::RandomNumber(0, screenSize.iHeight);
+    
+    // Generate "Pointer down" event:
+    TRawEvent eventPointerDown;    
+    eventPointerDown.Set(TRawEvent::EButton1Down, x1, y1);
+    UserSvr::AddEvent(eventPointerDown);
+    
+    // Get new random position for "Move pointer" and 
+    // "Pointer up" events
+    TInt x2 = CLoadGenUtils::RandomNumber(0, screenSize.iWidth);
+    TInt y2 = CLoadGenUtils::RandomNumber(0, screenSize.iHeight);
+    
+    // Generate "Move pointer" event:
+    TRawEvent eventMovePointer;
+    eventMovePointer.Set(TRawEvent::EPointerMove, x2, y2);
+    UserSvr::AddEvent(eventMovePointer);
+    
+    // Generate "Pointer up" event:
+    TRawEvent eventPointerUp;
+    eventPointerUp.Set(TRawEvent::EButton1Up, x2, y2);
+    UserSvr::AddEvent(eventPointerUp);
+    
+    // call timer
+    iPeriodicTimer->Start(CLoadGenUtils::MilliSecondsToMicroSeconds(iAttributes.iHeartBeat, iAttributes.iRandomVariance), KDefaultPeriod, TCallBack(PeriodicTimerCallBack, this));
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/engine/src/loadgen_utils.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,266 @@
+/*
+* 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 FILES
+#include <e32math.h> 
+#include <u32hal.h>
+#include <hal.h> 
+
+#include "loadgen_utils.h"
+#include "loadgen.hrh"
+
+inline TInt64 INIT_SEED()
+{
+    TTime now; 
+    now.HomeTime(); 
+    return now.Int64();
+}
+
+TInt64 CLoadGenUtils::iRandomNumberSeed = INIT_SEED();
+
+TThreadPriority CLoadGenUtils::SettingItemToThreadPriority(TInt aIndex)
+    {
+    TThreadPriority threadPriority = EPriorityNull;
+    
+    switch ( aIndex )
+        {
+        case EThreadPriorityTypeMuchLess:
+            {
+            threadPriority = EPriorityMuchLess; break;
+            }
+        case EThreadPriorityTypeLess:
+            {
+            threadPriority = EPriorityLess; break;
+            }
+        case EThreadPriorityTypeNormal:
+            {
+            threadPriority = EPriorityNormal; break;
+            }
+        case EThreadPriorityTypeMore:
+            {
+            threadPriority = EPriorityMore; break;
+            }
+        case EThreadPriorityTypeMuchMore:
+            {
+            threadPriority = EPriorityMuchMore; break;
+            }
+        case EThreadPriorityTypeRealTime:
+            {
+            threadPriority = EPriorityRealTime; break;
+            }
+        case EThreadPriorityTypeAbsoluteVeryLow:
+            {
+            threadPriority = EPriorityAbsoluteVeryLow; break;
+            }
+        case EThreadPriorityTypeAbsoluteLow:
+            {
+            threadPriority = EPriorityAbsoluteLow; break;
+            }
+        case EThreadPriorityTypeAbsoluteBackground:
+            {
+            threadPriority = EPriorityAbsoluteBackground; break;
+            }
+        case EThreadPriorityTypeAbsoluteForeground:
+            {
+            threadPriority = EPriorityAbsoluteForeground; break;
+            }
+        case EThreadPriorityTypeAbsoluteHigh:
+            {
+            threadPriority = EPriorityAbsoluteHigh; break;
+            }
+
+        default:
+            {
+            User::Panic(_L("Wrong tp index"), 276);
+            break;
+            }
+        }
+
+    return threadPriority;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenUtils::SettingItemToThreadDescription(TInt aIndex, TDes& aBuf)
+    {
+    switch ( aIndex )
+        {
+        case EThreadPriorityTypeMuchLess:
+            {
+            aBuf.Append(_L("ML(-20)")); break;
+            }
+        case EThreadPriorityTypeLess:
+            {
+            aBuf.Append(_L("L(-10)")); break;
+            }
+        case EThreadPriorityTypeNormal:
+            {
+            aBuf.Append(_L("NO(0)")); break;
+            }
+        case EThreadPriorityTypeMore:
+            {
+            aBuf.Append(_L("M(10)")); break;
+            }
+        case EThreadPriorityTypeMuchMore:
+            {
+            aBuf.Append(_L("MM(20)")); break;
+            }
+        case EThreadPriorityTypeRealTime:
+            {
+            aBuf.Append(_L("RL(30)")); break;
+            }
+        case EThreadPriorityTypeAbsoluteVeryLow:
+            {
+            aBuf.Append(_L("AVL(100)")); break;
+            }
+        case EThreadPriorityTypeAbsoluteLow:
+            {
+            aBuf.Append(_L("AL(200)")); break;
+            }
+        case EThreadPriorityTypeAbsoluteBackground:
+            {
+            aBuf.Append(_L("ABG(300)")); break;
+            }
+        case EThreadPriorityTypeAbsoluteForeground:
+            {
+            aBuf.Append(_L("AFG(400)")); break;
+            }
+        case EThreadPriorityTypeAbsoluteHigh:
+            {
+            aBuf.Append(_L("AH(500)")); break;
+            }
+
+        default:
+            {
+            User::Panic(_L("Wrong td index"), 277);
+            break;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenUtils::SettingItemToSourceDescription(TInt aIndex, TDes& aBuf)
+    {
+    switch ( aIndex )
+        {
+        case EMemoryEatSourceTypeRAM:
+            {
+            aBuf.Append(_L("RAM")); break;
+            }
+        case EMemoryEatSourceTypeDriveC:
+            {
+            aBuf.Append(_L("C:")); break;
+            }
+        case EMemoryEatSourceTypeDriveD:
+            {
+            aBuf.Append(_L("D:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveE:
+            {
+            aBuf.Append(_L("E:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveF:
+            {
+            aBuf.Append(_L("F:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveG:
+            {
+            aBuf.Append(_L("G:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveH:
+            {
+            aBuf.Append(_L("H:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveI:
+            {
+            aBuf.Append(_L("I:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveJ:
+            {
+            aBuf.Append(_L("J:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveK:
+            {
+            aBuf.Append(_L("K:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveL:
+            {
+            aBuf.Append(_L("L:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveM:
+            {
+            aBuf.Append(_L("M:")); break;
+            }            
+        case EMemoryEatSourceTypeDriveN:
+            {
+            aBuf.Append(_L("N:")); break;
+            }            
+
+        default:
+            {
+            User::Panic(_L("Wrong src index"), 278);
+            break;
+            }
+        }
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TInt CLoadGenUtils::MilliSecondsToMicroSeconds(TInt aMilliSeconds, TInt aRandomVariance)
+    {
+    __ASSERT_ALWAYS(aRandomVariance >= 0 && aRandomVariance <= 100, User::Panic(_L("Inv.var."), 180));
+    __ASSERT_ALWAYS(aMilliSeconds >=0, User::Panic(_L("Inv.ms."), 181));
+    
+    // if no variance defined, just do a quick conversion
+    if (aRandomVariance == 0 || aMilliSeconds == 0)
+        return aMilliSeconds * 1000;
+    
+    // otherwise calculate difference
+    TInt diff = 1000 * aMilliSeconds / 2 * aRandomVariance / 100;  
+    
+    return RandomNumber(aMilliSeconds*1000-diff, aMilliSeconds*1000+diff);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CLoadGenUtils::RandomNumber(TInt aMin, TInt aMax)
+    {
+    TInt range = (aMax > aMin ? aMax - aMin : aMin - aMax) + 1;
+    TInt random = (TInt) (range * Math::FRand(iRandomNumberSeed));
+    
+    random = (random % range) + aMin;
+
+    if (random > aMax)
+        random = aMax;
+    else if (random < aMin)
+        random = aMin;
+    
+    return random;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TSize CLoadGenUtils::ScreenSize()
+    {    
+    TInt x = 0;
+    TInt y = 0;
+    HAL::Get(HALData::EDisplayXPixels, x);
+    HAL::Get(HALData::EDisplayYPixels, y);
+    return TSize(x, y);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/envpatcher/EnvPatcher.pl	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,498 @@
+#
+# 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: 
+# Environment Patcher - Patches older S60 SDKs for supporting
+# tricks in newer platforms
+#
+
+
+require v5.6.1;	
+
+use File::Copy;
+use strict;
+
+# check amount of commandline options is valid
+if (@ARGV != 1)
+{
+    print "Usage: EnvPatcher <EPOCROOT>\n";
+    exit 1;
+}
+
+
+# get epocroot and convert, convert \ -> /
+(my $epocroot = $ARGV[0]) =~ s{\\}{/}g;
+
+# remove any trailing forward slashes
+$epocroot =~ s/\/$//;
+
+
+# create variables for paths
+my $e32toolsdir = $epocroot."/epoc32/tools";
+my $e32includedir = $epocroot."/epoc32/include";
+my $e32includeoemdir = $e32includedir."/oem";
+my $platformpathspath = $e32includedir."/platform_paths.hrh";
+my $domainplatformpathspath = $e32includedir."/domain/osextensions/platform_paths.hrh";
+my $mmppmpath = $e32toolsdir."/mmp.pm";
+my $pathutlpmpath = $e32toolsdir."/pathutl.pm";
+my $prepfilepmpath = $e32toolsdir."/prepfile.pm";
+
+# variables for hacked content
+my $dependshack = "\t\t\tif (/^DEPENDS\$/o) {\r\n\t\t\t\tnext LINE;  # Ignore DEPENDS keyword, not needed by ABLD\r\n\t\t\t}\r\n";
+my $forwardslashhack = "\t\t# EnvPatcher forwardslash hack begins\r\n\t\t\$_=~s{/}{\\\\}g;   # convert all forward slashes to backslashes\r\n\t\t# EnvPatcher forwardslash hack ends\r\n\r\n";
+my $coreibyexportsupport = "\r\n// Following definition is used for exporting tools and stubs IBY files to\r\n// Core image.\r\n#define CORE_IBY_EXPORT_PATH(path,exported)  /epoc32/rom/include/##exported\r\n";
+
+
+# check epoc32\tools exists
+unless (-d $e32toolsdir)
+{
+    print "$e32toolsdir not found, please check valid epocroot has been given!\n";
+    exit 1;
+}
+
+# check epoc32\include exists
+unless (-d $e32includedir)
+{
+    print "$e32includedir not found, please check valid epocroot has been given!\n";
+    exit 1;
+}
+
+
+# create epoc32\include\oem if it does not exist
+unless (-d $e32includeoemdir)
+{
+    mkdir $e32includeoemdir or die;
+    print "Missing directory $e32includeoemdir created succesfully.\n";
+}
+
+
+# check if epoc32\include\domain\osextensions\platform_paths.hrh exists
+if (-e $domainplatformpathspath)
+{
+    # show an error if the file does not have any platform macros
+    unless (string_exists_in_file($domainplatformpathspath, "OS_LAYER_SYSTEMINCLUDE"))
+    {
+        print "ERROR: $domainplatformpathspath does not have SF macros.\n";
+        print "Please check your environment, if you have S60 3.2 OEM or newer, please get the latest version!\n";
+        exit 2;
+    }
+}
+
+
+# check if epoc32\include\platform_paths.hrh exists
+if (-e $platformpathspath)
+{
+    print "$platformpathspath already exists, not checking it.\n";    
+}
+else
+{
+    # create the file missing file
+    create_default_platform_paths_hrh();
+    print "Missing file $platformpathspath created succesfully.\n";    
+}
+
+
+# check if CORE_IBY_EXPORT_PATH macro exist in the platform_paths.hrh
+unless (string_exists_in_file($platformpathspath, "CORE_IBY_EXPORT_PATH"))
+{
+    # read content of the platform_paths.hrh
+    my @filecontent = read_file_to_array($platformpathspath);  
+
+    my $match_found = 0;
+    my $i = 0;
+    my $match_found_pos = 0;
+    
+    # find the position where the include guards start (this should be a safe position)
+    foreach (@filecontent)
+    {
+        if ($_ =~ /#define PLATFORM_PATHS_HRH/)
+        {
+            $match_found = 1;
+            $match_found_pos = $i;
+            last;
+        } 
+
+        $i++;
+    }
+    
+    if ($match_found)
+    {
+        # insert the patched content to the file
+        splice(@filecontent, $match_found_pos+1, 0, $coreibyexportsupport);
+        
+        # write the modified array to the file
+        write_file_from_array($platformpathspath, @filecontent);
+    
+        print "Platform_paths.hrh updated to support CORE_IBY_EXPORT_PATH macro.\n";
+    }
+    else
+    {
+        print "WARNING: $platformpathspath is corrupted or not supported!\n";    
+    }
+}
+ 
+    
+# check if epoc32\tools\mmp.pm exists
+if (-e $mmppmpath)
+{
+    # check if DEPENDS keyword already exists in the file
+    if (string_exists_in_file($mmppmpath, "DEPENDS"))
+    {
+        print "The SDK has already been patched with DEPENDS keyword hack.\n";        
+    }
+    else
+    {
+        # read content of the mmp.pm file
+        my @filecontent = read_file_to_array($mmppmpath);
+        
+        my $match_found = 0;
+        my $i = 0;
+        my $match_found_pos = 0;
+        
+        # loop through the array to find the correct place
+        foreach (@filecontent)
+        {
+            if ($_ =~ /Unrecognised Resource Keyword/)
+            {
+                $match_found = 1;
+                $match_found_pos = $i;
+                last;
+            } 
+
+            $i++;
+        }
+        
+        if ($match_found)
+        {
+            # insert the patched content to the file
+            splice(@filecontent, $match_found_pos-1, 0, $dependshack);
+            
+            # write the modified array to the file
+            write_file_from_array($mmppmpath, @filecontent);
+        
+            print "Mmp.pm patched with DEPENDS keyword hack.\n";
+        }
+        else
+        {
+            print "ERROR: Unable to find correct place from $mmppmpath for patching!\n";
+            print "Your SDK environment probably is not supported by this script!\n";
+            exit(2);    
+        }
+    }
+}
+else
+{
+    print "WARNING: $mmppmpath not found, this environment is not supported!\n";
+}
+
+
+# check if epoc32\tools\pathutl.pm exists
+if (-e $pathutlpmpath)
+{
+    # check if "sub Path_Norm" already exists in the pathutil.pm file
+    # if it does not exists, then we need to patch prepfile.pm
+    if (string_exists_in_file($pathutlpmpath, "sub Path_Norm"))
+    {
+        print "The SDK is non Symbian OS 9.1, no need to add forward slash hack.\n";        
+    }
+    else
+    {
+        # check if prepfile.pm has already been patched
+        if (string_exists_in_file($prepfilepmpath, "EnvPatcher forwardslash hack"))
+        {        
+            print "The SDK has already been patched with forwardslash hack.\n";         
+        }
+        else
+        {    
+            # read content of the prepfile.pm file
+            my @filecontent = read_file_to_array($prepfilepmpath);  
+    
+            my $match_found = 0;
+            my $i = 0;
+            my $match_found_pos = 0;
+            
+            # loop through the array to find the correct place
+            foreach (@filecontent)
+            {
+                if ($_ =~ /# skip blank lines/)
+                {
+                    $match_found = 1;
+                    $match_found_pos = $i;
+                    last;
+                } 
+    
+                $i++;
+            }
+            
+            if ($match_found)
+            {
+                # insert the patched content to the file
+                splice(@filecontent, $match_found_pos+6, 0, $forwardslashhack);
+                
+                # write the modified array to the file
+                write_file_from_array($prepfilepmpath, @filecontent);
+            
+                print "Prepfile.pm patched with forward slash hack.\n";
+            }
+            else
+            {
+                print "ERROR: Unable to find correct place from $prepfilepmpath for patching!\n";
+                print "Your SDK environment probably is not supported by this script!\n";
+                exit(2);    
+            }
+        }
+    }    
+}
+else
+{
+    print "WARNING: $pathutlpmpath not found, this environment is not supported!\n";
+}
+ 
+ 
+ 
+# checks if string exists in the file    
+sub string_exists_in_file
+{
+    my $filepath = $_[0];
+    my $findstring = $_[1];
+    my $match_found = 0;     
+
+    open(FILE, "<", $filepath) or die "Failed to open $filepath for reading!";
+
+    # loop through the file for occurances
+    while (<FILE>)
+    {
+        if ($_ =~ /$findstring/)
+        {
+            $match_found = 1;
+            last;
+        } 
+    }
+
+    close FILE;
+    
+    return $match_found;
+}
+
+
+# reads lines from a file to an array    
+sub read_file_to_array
+{
+    my $filepath = $_[0];
+
+    open(FILE, "<", $filepath) or die "Failed to open $filepath for reading!";
+    my @data = <FILE>;
+    close FILE;
+    
+    return(@data);
+}
+
+
+# writes lines from an array to a file
+sub write_file_from_array
+{
+    my ($filepath, @data) = @_;
+    
+    # take a backup of the file
+    copy ($filepath, $filepath."EnvPatcher") or die "Cannot take backup of $filepath to $filepath.EnvPatcher";
+        
+    open(FILE, ">", $filepath) or die "Failed to open $filepath for writing!";
+
+    # write the array to file
+    foreach my $line (@data)
+    {
+        print FILE "$line";
+    }
+
+    close FILE;
+}
+
+sub create_default_platform_paths_hrh
+{
+    # the file does not exist, so create the missing file
+    open(FILE, ">", $platformpathspath) or die "Failed to open $platformpathspath for writing!\n";
+    
+    print FILE <<ENDOFTHEFILE;
+#ifndef PLATFORM_PATHS_HRH
+#define PLATFORM_PATHS_HRH
+
+/**
+* ---------------------------------------
+* Location, where the applications layer specific public headers should be exported
+* See usage on top of this hrh-file.
+* ---------------------------------------
+*/
+#define APP_LAYER_SDK_EXPORT_PATH(exported) /epoc32/include/##exported
+#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported
+
+/**
+* ---------------------------------------
+* Location, where the applications layer specific platform headers should be exported
+* See usage on top of this hrh-file.
+* ---------------------------------------
+*/
+#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) /epoc32/include/##exported
+#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/##exported
+
+/**
+* ---------------------------------------
+* Location, where the middleware layer specific public headers should be exported
+* See usage on top of this hrh-file.
+* ---------------------------------------
+*/
+#define MW_LAYER_SDK_EXPORT_PATH(exported) /epoc32/include/##exported
+#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported
+
+/**
+* ---------------------------------------
+* Location, where the middleware layer specific platform headers should be exported
+* ---------------------------------------
+*/
+#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) /epoc32/include/##exported
+#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/##exported
+
+/**
+* ---------------------------------------
+* Location, where the os layer specific public headers should be exported
+* ---------------------------------------
+*/
+#define  OSEXT_LAYER_SDK_EXPORT_PATH(exported) /epoc32/include/##exported
+#define  OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported
+
+/**
+* ---------------------------------------
+* Location, where the os specific platform headers should be exported
+* ---------------------------------------
+*/
+#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) /epoc32/include/##exported
+#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/##exported
+
+/**
+* ---------------------------------------
+* Location, where the  cenrep excel sheets should be exported
+* Deprecated: should no longer be used. Kept for compability.
+* ---------------------------------------
+*/
+#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/##exported
+
+/**
+* This define statements defines the SYSTEMINCLUDE-line, which is intended to be 
+* used in the mmp-files that are part of the applications-layer. It includes all 
+* the needed directories from the /epoc32/include, that are valid ones for the 
+* application-layer components. 
+*
+* Applications layer is the last one in the list, since most likely the most of 
+* the headers come from middleware or os-layer  => thus they are first.
+*/
+#define APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include /epoc32/include/oem
+ 
+/**
+* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
+* used in the mmp-files that are part of the middleware-layer. It includes all 
+* the needed directories from the /epoc32/include, that are valid ones for the 
+* middleware-layer components. 
+*/
+#define MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include /epoc32/include/oem
+
+/**
+* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
+* used in the mmp-files that are part of the  osextensions-layer. It includes all
+* the needed directories from the /epoc32/include, that are valid ones for the
+* os-layer components. 
+*/
+#define OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include /epoc32/include/oem
+
+
+// Below statement is Deprecated and the OS_LAYER_SYSTEMINCLUDE-macro has to be
+// used.
+#define OSEXT_LAYER_SYSTEMINCLUDE OS_LAYER_SYSTEMINCLUDE
+
+/**
+* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
+* used in the mmp-files that are part of the os-layer. This is intended 
+* to be only used by those components which need to use in their mmp-file either
+* kern_ext.mmh or nkern_ext.mmh. Reason is that those
+* 2 files already contain the /epoc32/include  as system include path.
+* 
+*/
+#define OS_LAYER_KERNEL_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/oem
+
+
+// Below statement is Deprecated and the OS_LAYER_KERNEL_SYSTEMINCLUDE-macro 
+// has to be used.
+#define OSEXT_LAYER_KERNEL_SYSTEMINCLUDE OS_LAYER_KERNEL_SYSTEMINCLUDE
+
+/**
+****************************************************************************
+* Definitions that also define the paths to the layer specific source directories.
+****************************************************************************
+*/
+/**
+* The below 3 macros define the paths to the layer-specific source dirs.
+* See usage on top of this hrh-file, these are used the same way as 
+* for instance the OS_LAYER_DOMAIN_EXPORT_PATH
+* Deprecated: is not allowed to be using in Symbian Foundation
+*/
+#define APP_LAYER_SOURCE_PATH(rest)    /s60/app/##rest
+#define MW_LAYER_SOURCE_PATH(rest)     /s60/mw/##rest
+#define OSEXT_LAYER_SOURCE_PATH(rest)  /s60/osext/##rest
+
+/**
+****************************************************************************
+* Definitions to export IBY files to different folders where they will be taken 
+* to ROM image
+****************************************************************************
+*/
+// Following definition is used for exporting tools and stubs IBY files to 
+// Core image.
+#define CORE_IBY_EXPORT_PATH(path,exported)  /epoc32/rom/include/##exported
+
+/**
+* ---------------------------------------
+* Macros for Configuration tool migration. 
+* The below macros define the location under epoc32, where the confml 
+* (Configuration Markup Language) and crml (Central Repository Markup Language) 
+* files should be exported.
+* ---------------------------------------
+*/
+#define CONFML_EXPORT_PATH(file,category)           /epoc32/rom/config/confml_data/##category##/##file
+#define CRML_EXPORT_PATH(file,category)             /epoc32/rom/config/confml_data/##category##/##file
+#define GCFML_EXPORT_PATH(file,category)            /epoc32/rom/config/confml_data/##category##/##file
+#define CONFML_CONFIG_EXPORT_PATH(file,category)    /epoc32/rom/config/confml_data/##category##/config/##file
+
+#define APP_LAYER_CONFML(exported) 	                CONFML_EXPORT_PATH(exported,s60)
+#define APP_LAYER_CRML(exported)                    CRML_EXPORT_PATH(exported,s60)
+#define APP_LAYER_GCFML(exported)                   GCFML_EXPORT_PATH(exported,s60)
+#define APP_LAYER_CONFML_CONFIG(exported)           CONFML_CONFIG_EXPORT_PATH(exported,s60)
+                                                    
+#define MW_LAYER_CONFML(exported)                   CONFML_EXPORT_PATH(exported,s60)
+#define MW_LAYER_CRML(exported)                     CRML_EXPORT_PATH(exported,s60)
+#define MW_LAYER_GCFML(exported)                    GCFML_EXPORT_PATH(exported,s60)
+#define MW_LAYER_CONFML_CONFIG(exported)            CONFML_CONFIG_EXPORT_PATH(exported,s60)
+       
+// Deprecate: Use the OS_LAYER_* macros instead of OSEXT_LAYER_*                                             
+#define OSEXT_LAYER_CONFML(exported)                CONFML_EXPORT_PATH(exported,s60)
+#define OSEXT_LAYER_CRML(exported)                  CRML_EXPORT_PATH(exported,s60)
+#define OSEXT_LAYER_GCFML(exported)                 GCFML_EXPORT_PATH(exported,s60)
+#define OSEXT_LAYER_CONFML_CONFIG(exported)         CONFML_CONFIG_EXPORT_PATH(exported,s60)
+#define OS_LAYER_CONFML(exported)                   CONFML_EXPORT_PATH(exported,s60)
+#define OS_LAYER_CRML(exported)                     CRML_EXPORT_PATH(exported,s60)
+#define OS_LAYER_GCFML(exported)                    GCFML_EXPORT_PATH(exported,s60)
+#define OS_LAYER_CONFML_CONFIG(exported)            CONFML_CONFIG_EXPORT_PATH(exported,s60)
+
+#endif  // end of PLATFORM_PATHS_HRH
+
+ENDOFTHEFILE
+
+    close FILE;    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/envpatcher/ReadMe.txt	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,47 @@
+Environment Patcher
+===================
+
+Updated: 9th January 2009
+
+
+Introduction:
+-------------
+This tool can be used to patch your S60 SDK environment so that the tricks and
+macros introduced in the latest SDKs can be used in a public SDK and older
+OEM releases.
+
+This tool can perform the following tasks:
+- Adds support for forward slashes in paths in bld.inf/.mmp files in S60 3.0 
+- Removes an unncessary warning about DEPENDS resource keyword in an .mmp file
+- Creates a missing epoc32\include\platform_paths.hrh file for supporting
+  platform macros introduced since S60 3.2 OEM and Symbian Foundation releases
+- Modifies epoc32\include\platform_paths.hrh for missing macros   
+- Creates a missing epoc32\include\oem directory to suppress a possible warning
+
+
+Usage:
+------
+EnvPatcher.pl <EPOCROOT>
+
+Where EPOCROOT is the path to the root of the SDK, for example:
+  EnvPatcher.pl c:\Symbian\9.1\S60_3rd_MR
+  EnvPatcher.pl z:\
+
+
+Requirements:
+-------------
+- S60 SDK (public or OEM), version 3.0 or newer
+- Perl 5.6.1 or newer
+
+
+
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved.
+
+This material, including documentation and any related computer programs, is
+protected by copyright controlled by Nokia. All rights are reserved. Copying,
+including reproducing, storing, adapting or translating, any or all of this
+material requires the prior written consent of Nokia. This material also
+contains confidential information which may not be disclosed to others without
+the prior written consent of Nokia.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/group/ReleaseNotes_LoadGen.txt	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,140 @@
+===============================================================================
+
+RELEASE NOTES - LOAD GENERATOR v1.6.0
+RELEASED 8th October 2010
+
+SUPPORTS S60 3.0+
+
+===============================================================================
+
+Product Description:
+====================
+LoadGen is an S60 UI application that provides an easy way to generate load
+into a device. You can use LoadGen to simulate the behavior and possible
+problems of a device when put under a heavy load in actual usage scenarios. 
+
+Main Features:
+==============
+- Load types: 
+  - CPU load (yielding or blocking)
+  - Memory eat (RAM and disks)
+  - Phone calls
+  - Network connection
+  - Key press
+  - SMS and MMS sending
+  - Launching applications
+  - Photo captures
+  - Bluetooth device discovery
+  - Touch UI pointer events
+- Each load type can be executed periodically (that is, idle time can be
+  applied after each round)
+- Each started load will be run in a separate thread
+- Each load type can be paused/resumed and stopped
+
+===============================================================================
+
+What's New in v1.6.0
+====================
+- New LoadGen icons 
+- Bug fixes
+
+
+What's New in v1.5.0
+====================
+- Feature: Orbit UI introduced
+
+
+===============================================================================
+
+Installation Notes:
+===================
+LoadGen is typically preinstalled on ROM. If not, it can be added to the
+ROM with the .iby file. Alternatively, the .sis file can be found under the sis-
+directory, but the user need to sign it with their own developer certificate.
+In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
+internal\sis directory.
+
+When signing with own developer certificate, the following capabilities are
+needed:
+  NetworkServices
+  SwEvent
+  ReadUserData
+  WriteUserData
+
+When builing LoadGen against S60 3.0 or 3.1, you may need to patch your SDK
+environment first with some fixes. For more information, please refer to the
+instructions under the "envpatcher" directory.
+
+===============================================================================
+
+System Requirements:
+====================
+Basic Requirements:
+- Any S60 3.x device or emulator environment
+
+===============================================================================
+
+Compatibility Issues:
+=====================
+N/A
+
+===============================================================================
+
+Known Issues:
+=============
+- Launched applications are not always terminated by LoadGen. This occurs with
+  applications that are waiting for user input.
+ 
+===============================================================================
+
+Version History:
+================
+
+Version 1.4.0
+====================
+- Feature: New load: Photo capture.
+- Feature: New load: Bluetooth actions.
+- Feature: New load: Pointer (touch ui) events. 
+
+Version 1.3.0 - 30th June 2009
+==============================
+- Feature: SMP support: CPU can be selected for CPU load.
+
+Version 1.2.1 - 6th March 2009
+==============================
+- Fix: Messages load crashes Load Generator
+
+Version 1.2.0 - 20th February 2009
+==================================
+- Feature: New load: application launch
+- Fix: LoadGen crashes when changing the Type of CPU load
+
+Version 1.1.0 - 12th December 2008
+==================================
+- Feature: SMS and MMS messages can be sent 
+- Fix: It was not possible to eat more memory than 2GB
+
+Version 1.0.1 - 18th March 2008
+===============================
+- Fix: It was possible to edit source type for existing memory eat item
+- Fix: Thread priority was not changed when editing existing item 
+- Fix: Memory eat did not work properly or caused crash in some cases
+- Fix: Editing existing memory eat replaced values with default values
+- Fix: Memory about queries did not have any check for maximum value 
+- Fix: Stopping a crashed load crashed the whole application
+
+
+Version 1.0.0 - 6th March 2008
+------------------------------
+- Initial version
+
+===============================================================================
+
+ 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".
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/group/backup_registration.xml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <passive_backup>
+    <include_directory name="\"/>
+  </passive_backup>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/group/bld.inf	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,32 @@
+// ============================================================================
+// * Makefile for building: group
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-17T13:18:03
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// * Project:  group.pro
+// * Template: subdirs
+// ============================================================================
+
+#define BLD_INF_GROUP_037FC092
+
+
+prj_platforms
+
+WINSCW GCCE ARMV5 ARMV6
+#include "bld_generic.inf"
+#include "../ui/avkon/group/bld.inf"
+
+
+prj_mmpfiles
+
+
+prj_extensions
+
+
+#if defined(WINSCW)
+#endif
+
+START EXTENSION qt/qmake_store_build
+END
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/group/bld_generic.inf	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* 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 <platform_paths.hrh>
+
+
+PRJ_EXPORTS
+../group/backup_registration.xml    Z:/private/20011384/backup_registration.xml
+
+
+
+PRJ_MMPFILES
+#if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__S60_32__)
+  gnumakefile loadgen_icons_aif.mk
+  gnumakefile loadgen_extraicons.mk
+
+  #ifdef MARM
+  gnumakefile loadgen_stub_sis.mk
+  #endif
+#endif
+
+
+#if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && !defined __S60_32__)
+  PRJ_EXTENSIONS
+  START EXTENSION s60/mifconv
+  OPTION TARGETFILE loadgen_aif.mif
+  OPTION SOURCEDIR ../icons
+  OPTION SOURCES -c8,8 qgn_menu_loadgen
+  END
+
+  START EXTENSION s60/mifconv
+  OPTION TARGETFILE loadgen_extraicons.mif
+  OPTION HEADERFILE loadgen_extraicons.mbg
+  OPTION SOURCEDIR ../icons
+  OPTION SOURCES -c8,8 qgn_prob_status_red -c8,8 qgn_prob_status_green
+  END
+
+  #ifdef MARM
+  START EXTENSION app-services/buildstubsis
+  OPTION SRCDIR ../sis
+  OPTION SISNAME LoadGen_stub
+  END
+  #endif  
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/group/group.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,5 @@
+
+
+TEMPLATE = subdirs
+
+BLD_INF_RULES.prj_platforms += "$${LITERAL_HASH}include \"bld_generic.inf\""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/group/loadgen_extraicons.mk	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,60 @@
+#
+# 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: 
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\loadgen_extraicons.mif
+
+HEADERDIR=\epoc32\include
+HEADERFILENAME=$(HEADERDIR)\loadgen_extraicons.mbg
+
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN :
+	@if exist $(ICONTARGETFILENAME) erase $(ICONTARGETFILENAME)
+	@if exist $(HEADERFILENAME) erase $(HEADERFILENAME)
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE : $(ICONTARGETFILENAME)
+
+$(ICONTARGETFILENAME) (HEADERFILENAME) : ..\icons\qgn_prob_status_red.svg ..\icons\qgn_prob_status_green.svg
+	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
+		/c8,8 ..\icons\qgn_prob_status_red.svg \
+		/c8,8 ..\icons\qgn_prob_status_green.svg
+
+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/utilityapps/loadgen/group/loadgen_icons_aif.mk	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,54 @@
+#
+# 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: 
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\loadgen_aif.mif
+
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN :
+	@if exist $(ICONTARGETFILENAME) erase $(ICONTARGETFILENAME)
+	
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE : $(ICONTARGETFILENAME)
+
+$(ICONTARGETFILENAME) : ..\icons\qgn_menu_loadgen.svg
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 ..\icons\qgn_menu_loadgen.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/group/loadgen_stub_sis.mk	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,56 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+
+TARGETDIR=$(EPOCROOT)EPOC32\Data\Z\System\Install
+
+SISNAME=LoadGen_stub
+PKGNAME=LoadGen_stub
+
+$(TARGETDIR) :
+	@perl -S emkdir.pl "$(TARGETDIR)"
+
+do_nothing :
+	rem do_nothing
+
+SISFILE=$(TARGETDIR)\$(SISNAME).sis
+
+$(SISFILE) : ..\sis\$(PKGNAME).pkg
+	makesis -s $? $@ 
+
+
+
+MAKMAKE : do_nothing
+
+RESOURCE : do_nothing
+
+SAVESPACE : do_nothing
+
+BLD : do_nothing
+
+FREEZE : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+FINAL : $(TARGETDIR) $(SISFILE)
+
+CLEAN : 
+	@if exist $(SISFILE) erase $(SISFILE)
+
+RELEASABLES : 
+	@echo $(SISFILE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/LoadGen_application_icon_svgt.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,129 @@
+<?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 version="1.1" baseProfile="tiny"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height="200px"
+	 viewBox="0 0 200 200" xml:space="preserve">
+<path fill="#D9D673" d="M141.751,167.982c-4.106,0-8.448-4.1-11.719-6.215c-10.82,5.131-23.289-8.408-31.409-14.26
+	c-10.926,3.739-23.145,10.161-35.024,8.955c-17.251-1.753-30.771-15.8-38.334-30.479c-13.043-25.316-14.924-75.657,20.861-83.846
+	c0,0,17.712-3.516,26.553-5.252c13.909-2.733,29.053-7.881,42.898-2.54c12.226,4.715,21.803,14.837,27.938,26.201
+	c3.52,6.518,9.569,18.318-1.18,21.329c-9.691,2.715-19.388,5.423-29.074,8.146c0.896,3.529,1.793,7.058,2.686,10.587
+	c4.945-1.653,9.779-4.465,14.707-1.587c5.076,2.967,10.154,5.926,15.229,8.889c6.892,4.024,13.787,8.054,20.683,12.078
+	c6.07,3.544,12.877,7.128,11.721,15.62c4.643,2.395,6.084,6.211,4.322,11.176c-1.35,3.818-6.262,5.238-9.588,6.848
+	c-6.066,2.94-12.129,5.883-18.191,8.826C151.023,164.305,146.197,167.982,141.751,167.982L141.751,167.982"/>
+<path fill="#FFFFFF" d="M141.751,165.441c-3.784,0-8.452-4.592-11.463-6.532c-7.254,3.239-11.136,0.255-16.746-3.784
+	c-4.835-3.484-9.67-6.966-14.504-10.447c-10.032,3.438-21.346,9.407-32.18,9.407c-16.213,0-29.608-12.536-37.376-25.712
+	c-8.628-14.66-12.412-32.687-9.712-49.532C22.169,64,30.756,48.289,46.507,44.664c0,0,17.06-3.395,25.597-5.073
+	c12.849-2.525,27.833-7.762,40.744-3.52c11.475,3.773,20.688,12.729,26.84,22.905c3.367,5.563,11.274,17.844,1.312,20.634
+	c-10.27,2.877-20.541,5.755-30.812,8.634l3.97,15.646c5.341-1.787,10.827-5.234,16.026-2.197c5.006,2.923,10.01,5.842,15.016,8.764
+	c6.515,3.804,13.027,7.609,19.546,11.412c5.976,3.488,12.688,6.654,10.782,15.163c3.94,2.077,6.738,4.45,4.537,9.284
+	c-1.217,2.666-6.189,4.08-8.586,5.242c-5.262,2.545-10.518,5.097-15.773,7.648C151.872,161.064,146.156,165.441,141.751,165.441
+	L141.751,165.441"/>
+<path fill="#CCBF00" d="M107.553,110.214l2.575-1.862l-5.817-21.524l-3.863,0.884L107.553,110.214z"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="57.5371" y1="72.6182" x2="111.166" y2="72.6182" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0.1429" style="stop-color:#CF1920"/>
+	<stop  offset="1" style="stop-color:#FF1F27"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M107.434,109.255l-5.98-21.507l-7.364-1.529L61.476,96.658l8.471,29.887L107.434,109.255z"/>
+<path fill="#E8777E" d="M74.023,142.668l19.373-5.352l0.233-23.412c0.003-0.008,0.011-0.025,0.011-0.025l-8.426-7.218
+	c0,0-11.079-5.198-19.688,1.86C65.522,108.521,74.023,142.668,74.023,142.668z"/>
+<path fill="#E6D700" d="M112.167,108.062l-5.886-22.031l-1.973,0.795l5.921,21.889L112.167,108.062z"/>
+<path id="fine_1_" fill="#CCBF00" d="M92.436,137.346c-5.859,1.547-18.416,1.936-20.486-5.533
+	c-3.159-11.4-9.473-34.198-9.473-34.198l-4.7,1.188l12.686,49.817l24.932-9.145L92.436,137.346"/>
+<path id="fine_2_" fill="#E6D700" d="M76.462,145.618c0,0-5.471,0.782-7.322-4.425c-0.039-0.11-0.082-0.174-0.124-0.207
+	l0.647,10.246l28.772-9.614c-1.021-0.714-2.034-1.433-3.041-2.146L76.462,145.618z"/>
+<path id="fine_5_" fill="#FFFAB3" d="M142.77,72.315c-5.531-15.374-17.502-30.749-34.231-34.365
+	c-9.813-2.122-20.326,1.481-29.944,3.37c-10.509,2.064-30.961,6.101-30.678,6.055C28.044,51.48,21.205,74.692,21.939,92.43
+	c0.814,19.643,9.669,40.968,26.282,52.382c3.722,2.558,7.87,4.556,12.279,5.58c1.524,0.352,9.98,2.086,10.679-0.111
+	c0.007-0.025,0.024-0.045,0.03-0.07c0.007-0.029,0.015-0.059,0.021-0.096c0.015-0.085,0.011-0.182,0.021-0.273
+	c0.001-0.219-0.028-0.48-0.102-0.804c-0.056-0.229-0.719-2.736-1.724-6.515c-0.93-3.51-1.864-7.021-2.8-10.53
+	c-2.945-11.063-5.895-22.129-8.847-33.192c28.674-7.246,35.862-8.426,36.183-11.583c2.183,1.798,4.908,1.269,7.487,0.492
+	l40.101-11.315C141.548,76.395,144.104,76.018,142.77,72.315z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="22.9277" y1="108.9756" x2="85.0061" y2="56.8858" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#FFFBBA"/>
+	<stop  offset="0.4396" style="stop-color:#FFF100"/>
+	<stop  offset="0.7308" style="stop-color:#E6D900"/>
+	<stop  offset="1" style="stop-color:#E8D900"/>
+</linearGradient>
+<path fill="url(#SVGID_2_)" d="M64.459,148.006c-14.229,0-26.367-15.312-32.059-26.752c-6.882-13.831-9.579-30.48-5.915-45.614
+	c3.279-13.546,13.328-26.972,28.692-25.728c15.997,1.295,27.954,16.069,33.984,29.726c2.697,6.88-3.27,8.593-3.27,8.593
+	c-10.598,2.808-21.198,5.612-31.794,8.43c4.226,15.955,8.457,31.909,12.686,47.866C66.784,144.53,67.744,148.006,64.459,148.006"/>
+<path fill="#E6D700" d="M66.958,86.701c-13.161,0-14.521-25.768-0.829-23.448C77.337,63.252,79.428,86.701,66.958,86.701
+	L66.958,86.701"/>
+<path id="opacity80" fill-opacity="0.8" fill="#FFFFFF" d="M28.436,94.299C31.863,74.7,45.84,56.645,65.924,56.501c1.382-0.011-3.396-2.268-3.669-2.353
+	c-2.438-0.758-4.987-1.187-7.544-1.187c-6.157,0-11.965,2.601-16.335,6.884c-4.672,4.58-7.635,10.698-9.326,16.953
+	c-0.422,1.561-3.808,17.767-1.278,18.178C27.993,94.75,28.215,94.525,28.436,94.299"/>
+<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="98.8276" y1="139.5156" x2="98.8276" y2="94.4321" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#FFFBBA"/>
+	<stop  offset="0.6593" style="stop-color:#FFF100"/>
+	<stop  offset="1" style="stop-color:#E6D900"/>
+</linearGradient>
+<path fill="url(#SVGID_3_)" d="M139.65,70.832c-5.643-13.665-16.084-27.453-31.327-30.769c-8.968-1.952-19.125,1.533-27.917,3.122
+	c-4.772,0.86-9.538,1.846-14.332,2.582c-1.148,0.174-5.144,0.93-2.368,2.439c4.115,2.236,7.765,3.919,11.454,6.956
+	c6.975,5.741,12.695,13.128,16.391,21.388c1.942,4.343,4.447,8.693,9.917,7.931l36.593-9.75
+	C138.061,74.73,140.741,72.818,139.65,70.832"/>
+<path id="opacity80_1_" fill-opacity="0.8" fill="#FFFFFF" d="M82.033,51.748l33.658-7.247c-1.062-1.062-5.521-3.135-8.672-3.751
+	c-11.987,2.453-24.536,5.02-30.184,6.03C74.151,47.603,75.839,49.595,82.033,51.748z"/>
+<path fill="#FFFFFF" d="M66.351,81.267c-3.819-3.211-5.688-11.541-0.886-14.785c-10.999-1.757-5.329,22.409,3.856,16.191
+	C68.191,82.487,67.237,82.007,66.351,81.267"/>
+<path fill="#231F20" d="M71.529,79.769c2.157-5.686-5.511-18.788-8.491-10.006C61.305,74.871,68.424,87.952,71.529,79.769"/>
+<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="90.5" y1="53.0269" x2="167.1094" y2="53.0269" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#009345"/>
+	<stop  offset="1" style="stop-color:#00733D"/>
+</linearGradient>
+<path fill="url(#SVGID_4_)" d="M136.635,108.852l-11.167-3.359L93,129l29.934,17.454l46.676-18.349L136.635,108.852z"/>
+<path fill="#00753F" d="M127.236,109.348c0.089-0.022,0.182-0.029,0.273-0.049c0.588-0.117,2.133-0.352,2.315-0.373
+	c1.428-0.171,2.862-0.248,4.303-0.223c0.106,0.004,1.778,0.074,2.507,0.148c0,0-8.34-4.441-8.799-4.723
+	c-1.768-1.084-9.654,1.545-11.449,2.146c-2.967,0.996-5.938,1.99-8.902,2.998l-0.006-0.013c-9.611,3.222-19.227,6.444-28.84,9.671
+	l0.031,0.019c1.144,3.269,23.3,15.769,24.718,14.821c-0.005,0.008-0.008,0.012-0.008,0.016c0.003-0.008,0.008-0.016,0.012-0.02
+	c1.356-1.709,1.649-5.869,2.695-7.998L127.236,109.348z"/>
+<path fill="none" d="M126.52,108.902c-6.086,2.043-12.179,4.07-18.252,6.139l-0.008-0.016l-9.059,3.037l0.044,0.033
+	c0.1,1.133,0.196,2.264,0.296,3.396l6.547,4.279l20.36,13.313v-0.041l26.655-11.228l-0.101-2.586l-25.535-15.739l-0.229-0.146
+	c0.09-0.019,0.183-0.029,0.271-0.048c-0.093,0.019-0.186,0.025-0.273,0.048L126.52,108.902z"/>
+<path fill="#006838" d="M172.932,134.427c0.178-2.438-1.149-5.098-3.267-6.344c-15.581,6.122-46.731,18.37-46.731,18.37l2.399,9.07
+	L172.932,134.427z"/>
+<path fill="#004F2B" d="M169.491,135.73l0.11-1.41l-41.256,16.498l0.025,2.877l-2.131,0.867l-3.835,2.518l0.583,0.268
+	c2.619,0.831,5.216-0.74,7.619-1.742l42.144-19.076l0.161-2.094L169.491,135.73z"/>
+<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="73.8755" y1="40.8813" x2="123.8672" y2="40.8813" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#009345"/>
+	<stop  offset="1" style="stop-color:#00733D"/>
+</linearGradient>
+<path fill="url(#SVGID_5_)" d="M126.241,154.562c0,0,1.118-5.125-3.308-8.109c-0.583-0.394-8.844-5.741-13.265-8.612
+	c-0.015,0.004-0.022,0.009-0.032,0.013c-4.503-2.916-8.988-5.834-13.483-8.756c-3.263-2.117-6.54-4.207-9.781-6.354
+	c-2.408-1.599-4.835-3.22-7.704-3.792c-2.21,0.105-2.772,3.455-1.905,5.152c0.903,1.771,2.869,3.199,4.343,4.453
+	c5.55,4.725,11.536,8.959,17.501,13.133c5.985,4.19,12.041,8.293,18.24,12.162c1.779,1.109,3.566,2.26,5.453,3.182
+	c0.191,0.096,0.381,0.148,0.565,0.191C125.422,157.766,126.241,154.562,126.241,154.562z"/>
+<path fill="#4D4D4D" d="M107.863,123.589l19.604-14.098l-0.95-0.589l-27.316,9.16C99.201,118.062,104.975,121.751,107.863,123.589"
+	/>
+<polygon fill="#666666" points="126.448,139.085 126.448,139.044 126.419,139.055 126.419,135.426 99.245,118.096 99.541,121.492 
+	"/>
+<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="105.3633" y1="56.541" x2="150.5039" y2="56.541" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#4D4D4D"/>
+	<stop  offset="0.3452" style="stop-color:#4A4A4A"/>
+	<stop  offset="0.6024" style="stop-color:#424141"/>
+	<stop  offset="0.8303" style="stop-color:#333031"/>
+	<stop  offset="1" style="stop-color:#231F20"/>
+</linearGradient>
+<path fill="url(#SVGID_6_)" d="M112.637,117.548c-0.736,0.722-1.433,1.479-2.092,2.271c-0.982,1.185-1.882,2.445-2.682,3.771
+	l18.556,11.837v-0.008l26.281-10.331l0.304,0.146l-25.535-15.74c-4.986,1.099-9.503,3.414-13.246,6.613
+	C113.68,116.568,113.146,117.045,112.637,117.548z"/>
+<polygon fill="#333333" points="126.419,135.418 126.419,135.426 126.419,139.055 153.104,127.816 153.004,125.232 152.7,125.087 
+	"/>
+<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="128.0391" y1="30.4849" x2="175.377" y2="30.4849" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#F9D431"/>
+	<stop  offset="1" style="stop-color:#D9B82A"/>
+</linearGradient>
+<path fill="url(#SVGID_7_)" d="M177.529,141.426c-0.396-0.211-8.956-4.771-8.956-4.771l-38.034,15.285l10.969,8.437
+	c0,0,36.268-18.095,36.333-18.376S177.925,141.637,177.529,141.426z"/>
+<path fill="#FFFFFF" d="M136.932,151.561l9.629,5.328c0.539-0.252,1.153-0.541,4.442-1.902l-9.56-5.26L136.932,151.561z"/>
+<path fill="#FFFFFF" d="M146.216,147.741l9.196,4.981c0.572-0.27,1.154-0.544,4.354-1.867l-9.096-4.91L146.216,147.741z"/>
+<path fill="#FFFFFF" d="M155.193,144.123l8.67,4.602c0.56-0.266,1.117-0.531,4.277-1.834l-8.554-4.523L155.193,144.123z"/>
+<path fill="#FFFFFF" d="M163.868,140.697l8.067,4.195c0.555-0.264,1.08-0.511,3.851-1.625l-7.938-4.112L163.868,140.697z"/>
+<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="128.0381" y1="26.7837" x2="175.3652" y2="26.7837" gradientTransform="matrix(1 0 0 -1 2.5 179)">
+	<stop  offset="0" style="stop-color:#FAAF40"/>
+	<stop  offset="1" style="stop-color:#D99837"/>
+</linearGradient>
+<path fill="url(#SVGID_8_)" d="M177.841,141.948c-0.038,0.069-0.082,0.122-0.082,0.122c-4.245,2.021-33.122,15.742-34.772,16.416
+	c-1.774,0.731-2.479-0.11-2.479-0.11l-9.97-6.437v3.621l10.354,6.688c0,0,0.613,0.47,1.586,0.101c0,0,33.756-16.392,34.336-16.646
+	c0.582-0.251,0.696-1.018,0.696-1.018l0.354-2.744L177.841,141.948z"/>
+<rect fill="none" width="200" height="200"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/mono_new_load.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M26,3V2H15v11h11v-1.1h3V3H26z M23.5,10.5h-6V4.4h6V10.5z M28.5,11.25H26v-1.5h2.5V11.25z M28.5,9.25H26v-1.5h2.5V9.25z   M28.5,7.25H26v-1.5h2.5V7.25z M28.5,5.25H26v-1.5h2.5V5.25z"/>
+<path d="M12.75,22.5c0-3.329,1.68-6.271,4.234-8.031L13,14l0.838-11.729C13.085,2.099,12.305,2,11.5,2C5.701,2,1,6.701,1,12.5  C1,18.297,5.701,23,11.5,23c0.431,0,0.854-0.035,1.271-0.086C12.765,22.775,12.75,22.64,12.75,22.5z M8.075,12.324  c-1.482,0-2.688-1.009-2.688-2.25s1.206-2.25,2.688-2.25c0.291,0,0.566,0.049,0.829,0.121C8.157,8.045,7.575,8.777,7.575,9.674  c0,0.966,0.672,1.751,1.5,1.751s1.5-0.785,1.5-1.751c0-0.203-0.036-0.395-0.09-0.577c0.172,0.297,0.278,0.625,0.278,0.977  C10.762,11.315,9.557,12.324,8.075,12.324z"/>
+<path d="M22.5,15c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5,7.5,7.5s7.5-3.357,7.5-7.5S26.643,15,22.5,15z M22.5,28.25  c-3.171,0-5.75-2.579-5.75-5.75c0-3.169,2.579-5.75,5.75-5.75s5.75,2.581,5.75,5.75C28.25,25.671,25.671,28.25,22.5,28.25z"/>
+<rect height="3" width="9" x="18" y="21"/>
+<rect height="9" width="3" x="21" y="18"/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/mono_resume_all.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<polygon points="21.902,14.455 26.924,11.501 10.774,2 10.774,7.908 "/>
+<polygon points="6,27 22.15,17.501 6,8 "/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/mono_stop_all.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect height="4.5" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 47.4991 -4.5621)" width="7.015" x="21.187" y="5.306"/>
+<rect height="4.5" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 29.4933 46.4477)" width="7.945" x="20.393" y="14.866"/>
+<rect height="4.5" transform="matrix(0.707 0.7072 -0.7072 0.707 8.6341 -7.8231)" width="4.056" x="11.731" y="4.259"/>
+<polygon points="21.192,11.843 17.657,8.308 12,13.965 6.343,8.308 2.808,11.843 8.465,17.5 2.808,23.157 6.343,26.692 12,21.035   17.657,26.692 21.192,23.157 15.536,17.5 "/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/mono_suspend_all.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="30px" version="1.1" viewBox="0 0 30 30" width="30px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<rect height="19" width="5" x="6" y="9"/>
+<polygon points="15,21 15,7 17,7 17,3 12,3 12,7 12.75,7 12.75,21 "/>
+<polygon points="23,3 23,7 24,7 24,21 28,21 28,3 "/>
+<rect height="19" width="5" x="17" y="9"/>
+<rect fill="none" height="30" width="30"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/qgn_menu_loadgen.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.0"
+   width="100%"
+   height="100%"
+   viewBox="0 0 88.000488 88.000488"
+   id="svg2384">
+  <defs
+     id="defs2568" />
+  <path
+     d="M 92.562272,40.587092 C 92.562272,40.539915 92.562272,40.492737 92.562272,40.587092 z "
+     style="fill:#deaa87;fill-opacity:1;stroke:none"
+     id="path4589" />
+  <path
+     d="M 59.869601,34.19566 C 61.463087,33.186059 64.570066,32.712826 66.883961,32.335134 C 69.325288,31.936642 71.523774,31.762664 74.044456,31.762664 C 76.43802,31.762664 78.799579,34.270637 80.620419,35.340599 C 81.649767,35.945465 82.958539,39.560266 82.958539,40.77906 C 82.958539,42.460983 81.373013,43.169098 80.620419,44.643229 C 79.961438,45.933997 76.50304,47.39368 75.213515,47.934931 C 74.872539,48.078047 74.531563,48.221165 74.190587,48.364283 C 72.224802,49.189378 70.085492,49.509222 67.90689,49.509222 C 66.640408,49.509222 65.373925,49.509222 64.107444,49.509222 C 63.147628,49.509222 62.494214,49.07987 61.477059,49.07987 C 60.498073,49.07987 59.648418,48.650517 58.554408,48.650517"
+     style="fill:#806600;fill-opacity:1;stroke:none"
+     id="path4603" />
+  <path
+     d="M 58.846672,38.05983 C 58.582814,38.214879 60.464851,36.914891 62.938384,36.914891 C 64.00489,36.914891 64.952424,36.771774 66.007167,36.771774 C 66.649872,36.771774 67.235643,36.485538 68.053021,36.485538 C 68.979759,36.485538 69.831044,36.056186 70.829539,36.056186 C 71.608914,36.056186 72.388287,36.056186 73.16766,36.056186 C 74.014376,36.056186 74.853503,36.003819 75.651913,36.199304 C 76.479983,36.402051 76.745312,36.90981 77.113238,37.630478 C 77.414129,38.219843 77.52268,38.805102 77.697768,39.491003 C 77.858235,40.11963 77.843901,40.723695 77.843901,41.494648 C 77.843901,42.010665 77.202737,42.321165 76.967105,42.782704 C 76.595804,43.509985 76.038323,43.523748 75.213515,43.927643 C 74.425127,44.313704 73.799243,44.166578 73.021527,44.356995 C 72.032407,44.599174 71.384653,44.385805 70.683407,45.072582 C 69.658456,46.076387 67.941862,46.217521 66.591696,46.217521 C 65.706564,46.217521 64.737092,46.360639 63.815178,46.360639 C 63.006586,46.360639 62.208946,46.396718 61.477059,46.217521 C 60.662477,46.018078 59.762202,46.074405 58.992806,46.074405 C 58.034351,46.074405 57.835929,45.94322 57.385348,45.501935 C 57.077939,45.200869 57.239216,43.921154 57.239216,43.355174 C 57.239216,42.651785 57.259075,41.846199 57.385348,41.351529 C 57.563388,40.65406 57.384702,39.922885 57.531481,39.347886 C 57.67107,38.801049 58.246912,38.412262 58.846672,38.05983 z "
+     style="fill:#deaa87;fill-opacity:1;stroke:none"
+     id="path4605" />
+  <path
+     d="M 28.283831,32.335134 C 26.690345,31.325532 23.583365,30.8523 21.26947,30.474608 C 18.828144,30.076116 16.629658,29.902138 14.108976,29.902138 C 11.715412,29.902138 9.353853,32.410111 7.5330128,33.480073 C 6.5036648,34.084939 5.1948929,37.699739 5.1948929,38.918533 C 5.1948929,40.600456 6.7804184,41.30857 7.5330128,42.782703 C 8.1919934,44.073471 11.650392,45.533154 12.939916,46.074405 C 13.280892,46.217521 13.621868,46.360639 13.962845,46.503755 C 15.928629,47.328851 18.06794,47.648694 20.246542,47.648694 C 21.513024,47.648694 22.779506,47.648694 24.045988,47.648694 C 25.005804,47.648694 25.659217,47.219344 26.676373,47.219344 C 27.655358,47.219344 28.505014,46.789991 29.599023,46.789991"
+     style="fill:#806600;fill-opacity:1;stroke:none"
+     id="path4587" />
+  <path
+     d="M 29.306759,36.199303 C 29.570618,36.354353 27.68858,35.054365 25.215048,35.054365 C 24.148542,35.054365 23.201007,34.911247 22.146265,34.911247 C 21.503559,34.911247 20.917788,34.625012 20.10041,34.625012 C 19.173673,34.625012 18.322388,34.19566 17.323893,34.19566 C 16.544518,34.19566 15.765145,34.19566 14.985772,34.19566 C 14.139056,34.19566 13.299929,34.143293 12.501518,34.338777 C 11.673449,34.541524 11.408119,35.049282 11.040193,35.769952 C 10.739302,36.359317 10.630752,36.944575 10.455664,37.630477 C 10.295196,38.259103 10.309531,38.863169 10.309531,39.634121 C 10.309531,40.150139 10.950695,40.460637 11.186327,40.922178 C 11.557628,41.649459 12.115109,41.663222 12.939916,42.067117 C 13.728305,42.453177 14.354188,42.306052 15.131904,42.496468 C 16.121025,42.738648 16.768778,42.525279 17.470024,43.212056 C 18.494976,44.215859 20.211569,44.356995 21.561736,44.356995 C 22.446867,44.356995 23.41634,44.500113 24.338253,44.500113 C 25.146846,44.500113 25.944486,44.536192 26.676373,44.356995 C 27.490954,44.157551 28.39123,44.213878 29.160626,44.213878 C 30.119081,44.213878 30.317502,44.082693 30.768083,43.641408 C 31.075493,43.340342 30.914216,42.060628 30.914216,41.494648 C 30.914216,40.791259 30.894357,39.985673 30.768083,39.491003 C 30.590044,38.793534 30.76873,38.062358 30.621951,37.48736 C 30.482361,36.940522 29.906519,36.551735 29.306759,36.199303 z "
+     style="fill:#deaa87;fill-opacity:1;stroke:none"
+     id="path4595" />
+  <path
+     d="M 44.212275,10.58129 C 44.2345,10.603057 41.002223,9.7502562 38.220842,10.295055 C 34.550458,11.013986 31.881682,10.928739 28.576095,12.871168 C 26.740276,13.949934 25.555975,16.067552 24.630517,17.880278 C 23.686516,19.729326 22.370775,20.941694 21.707867,22.889386 C 21.150289,24.527607 20.392675,26.352057 20.392675,28.041612 C 20.392675,29.520492 20.392675,30.999371 20.392675,32.478251 C 20.392675,33.891206 21.123337,35.160307 21.123337,36.628656 C 21.123337,38.211553 23.834473,38.982567 22.730794,40.063474 C 21.819559,40.955908 20.337894,41.852417 19.515879,42.925822 C 18.07587,44.806219 17.282954,47.030553 16.885494,49.366104 C 16.42949,52.045674 14.839639,54.130522 14.839639,56.808209 C 14.839639,59.013809 14.69247,61.382896 15.131904,63.534727 C 15.609467,65.873277 17.514459,67.94023 19.515879,69.116305 C 21.509135,70.287582 23.212938,71.785399 25.361179,72.837357 C 25.750868,73.02818 26.140553,73.219004 26.53024,73.409828 C 28.496085,74.372468 30.808323,75.745337 32.960072,76.272175 C 33.349757,76.367586 33.739444,76.462998 34.129131,76.558409 C 36.704288,77.188916 38.963263,77.76633 41.58189,78.132701 C 44.262074,78.507685 46.936842,78.663031 49.619179,78.991405 C 52.186124,79.305654 55.603781,78.325754 57.948732,77.560232 C 60.307975,76.790042 62.318179,76.286403 64.086298,74.554767 C 65.79103,72.885206 67.626803,71.516662 69.347069,69.831891 C 71.609737,67.615908 72.977226,65.051402 74.607839,62.389788 C 75.589833,60.7869 74.753972,56.685268 74.753972,54.804565 C 74.753972,52.794861 74.473592,51.536148 73.584912,49.795457 C 72.718469,48.098324 71.871975,46.114219 70.516129,44.786347 C 69.392472,43.685874 67.765549,42.951226 66.716683,41.924 C 66.119702,41.339337 65.688673,40.912225 65.401489,40.349709 C 65.06473,39.690086 67.354427,37.400497 67.73961,36.771773 C 68.601292,35.365269 68.238992,30.940018 67.73961,29.472786 C 67.011887,27.334662 65.980425,25.360955 64.81696,23.461855 C 64.601372,23.109957 64.329851,22.793974 64.086298,22.460034 C 62.633818,20.468517 61.099625,18.574327 59.117792,17.021572 C 57.510912,15.762592 55.737829,14.793991 53.857022,13.872991 C 53.564756,13.729873 53.272491,13.586755 52.980226,13.443638 C 51.89167,12.910591 50.922122,12.150783 50.203708,11.869347 C 49.436956,11.568975 48.831155,11.555024 48.303985,11.296877 C 47.534861,10.92025 46.221225,10.867524 45.381335,10.867524 C 44.816725,10.867524 44.907972,10.853827 44.212275,10.58129 z "
+     style="fill:#806600;stroke:#806600;stroke-width:1.02179408"
+     id="path2594" />
+  <path
+     d="M 43.627744,23.461855 C 43.444601,23.020581 42.753719,22.140055 42.020287,21.601329 C 41.159391,20.968979 40.313262,20.288894 39.243769,20.027038 C 39.048925,19.979332 38.854082,19.931628 38.659238,19.883921 C 37.306569,19.55273 35.96343,19.311451 34.567529,19.311451 C 33.836866,19.311451 33.106203,19.311451 32.375541,19.311451 C 31.220078,19.311451 31.005557,19.365112 30.329685,20.027038 C 29.885249,20.462304 29.167519,20.586004 28.722229,21.458213 C 28.339717,22.20745 28.317984,23.008376 28.137697,23.891208 C 27.9311,24.90289 27.845433,25.987192 27.845433,27.039791 C 27.845433,28.346937 27.6993,29.579009 27.6993,30.90396 C 27.6993,31.921753 28.203232,32.448748 28.429962,33.336955 C 28.594839,33.982851 28.756585,34.978543 29.014494,35.483717 C 29.349387,36.139685 29.401555,36.957456 29.745155,37.630478 C 30.171579,38.465729 30.329685,39.043906 30.329685,39.920357 C 30.329685,41.155941 30.90055,40.076857 29.745155,41.208412 C 29.323234,41.62163 27.743563,42.320839 27.114771,42.782704 C 26.490018,43.2416 26.054675,43.928472 25.507312,44.64323 C 24.895884,45.441646 24.510308,46.309863 24.045988,47.219343 C 23.360082,48.562851 22.983175,50.016697 22.292397,51.369749 C 21.881637,52.174319 21.931541,53.212744 21.707867,54.088979 C 21.440691,55.135636 21.707867,56.585877 21.707867,57.666913 C 21.707867,59.657175 21.770313,61.530666 22.584662,63.391609 C 22.670474,63.587706 22.779505,63.773256 22.876928,63.964079 C 23.485836,65.15677 24.157466,66.407399 25.507312,67.398895 C 26.23025,67.929912 28.464255,68.872127 29.452891,69.259422 C 30.758305,69.770814 31.985095,70.296466 33.106203,71.119949 C 34.36628,72.045507 37.001085,72.486866 38.513107,72.980475 C 40.322996,73.571324 41.842542,73.775741 43.627744,74.125414 C 45.70602,74.532493 47.772786,74.697883 49.911443,74.697883 C 51.896628,74.697883 53.627389,74.628368 55.464479,74.268531 C 57.458354,73.877984 58.506167,72.557757 60.286852,72.12177 C 62.264584,71.637539 63.176162,69.721427 64.524694,68.400718 C 65.663347,67.285559 66.306551,66.63717 67.155081,65.252135 C 68.15914,63.613231 70.07773,62.806122 70.07773,60.815496 C 70.07773,59.770434 70.184863,58.659074 69.931598,57.666913 C 69.621811,56.453331 69.454251,55.18631 69.200935,53.945861 C 68.907434,52.50863 67.892522,50.663013 67.008948,49.509222 C 66.340191,48.635944 65.694813,47.649732 64.963092,46.933108 C 64.331139,46.314194 63.850473,45.557211 63.209503,44.929465 C 62.61449,44.346731 61.282493,43.9076 60.72525,43.498292 C 60.256351,43.153874 59.877458,42.667991 59.556189,42.353353 C 58.726673,41.540951 61.357059,40.875874 62.186575,40.063474 C 62.799019,39.463665 62.401919,37.788698 62.624971,36.914892 C 63.10147,35.048227 63.063369,33.302428 63.063369,31.333313 C 63.063369,29.732748 62.784098,28.359658 62.186575,26.896673 C 62.032008,26.518228 61.894309,26.133381 61.748177,25.751734 C 61.227627,24.39224 60.718004,23.01831 60.14072,21.887564 C 59.974816,21.562604 59.848454,21.219683 59.702322,20.885743 C 59.228729,19.803494 57.880003,19.156571 56.925805,18.595864 C 55.430415,17.717144 54.066297,17.307809 52.395696,17.307809 C 51.404363,17.307809 50.627488,17.243407 49.911443,17.594043 C 49.085643,17.998424 48.661324,17.582024 47.865587,18.166512 C 46.949155,18.839655 46.734143,19.787094 46.111998,20.599508 C 45.582415,21.291051 45.198022,21.637743 44.796804,22.030682 C 44.27166,22.544992 43.849292,22.593953 43.627744,23.461855 z "
+     style="fill:#deaa87;stroke:#806600;stroke-width:1.02179408"
+     id="path2598" />
+  <path
+     d="M 28.084882,56.092622 C 27.999183,56.020034 28.499334,58.973884 28.760751,59.52744 C 29.274724,60.615798 31.180968,61.5774 32.140086,62.389788 C 33.075109,63.181765 34.00683,63.795085 35.350455,64.250314 C 36.284513,64.566777 37.377917,65.287886 38.560824,65.53837 C 40.41885,65.931814 42.104276,66.826426 43.967762,66.826426 C 45.803759,66.826426 47.706322,67.112661 49.543665,67.112661 C 50.756895,67.112661 52.803761,66.018222 53.936802,65.53837 C 55.274656,64.971779 57.295056,64.226417 58.160973,63.248491 C 58.69085,62.65007 59.755702,61.924537 60.357539,61.244849 C 60.941448,60.585408 61.533935,59.819072 62.216176,59.241205 C 62.515065,58.988041 62.435117,57.354477 62.554109,56.951326 C 62.738309,56.32724 62.554109,55.451665 62.554109,54.804565 C 62.554109,53.658453 62.152438,54.4292 61.709274,54.804565 C 61.069544,55.346427 61.346291,56.415476 60.951105,57.084934 C 60.554099,57.757475 60.20877,58.491717 59.681674,59.086993 C 59.176477,59.657538 59.426063,59.786189 58.896068,60.235103 C 58.254907,60.778176 57.269144,61.448265 56.416436,61.809393 C 55.783098,62.077616 55.173285,62.53735 54.530367,62.809631 C 53.544404,63.227194 53.061487,63.348519 52.109963,63.952985 C 51.375595,64.419502 50.722542,64.382337 49.744429,64.382337 C 48.843272,64.382337 47.659051,64.806934 46.757894,64.806934 C 45.744095,64.806934 44.447229,64.240804 43.433427,64.240804 C 42.588592,64.240804 41.74376,63.957739 40.898926,63.957739 C 39.800703,63.957739 39.180675,63.224769 38.222891,62.81914 C 37.306238,62.43093 36.570701,62.119425 35.519422,61.6742 C 34.794779,61.367309 33.683204,61.519938 33.432591,61.095391 C 33.063645,60.470385 32.335877,60.046836 31.770357,59.807335 C 30.863505,59.423276 30.427799,58.229803 29.774551,57.953148 C 29.208861,57.713574 28.957945,57.118353 28.591784,56.808209 C 28.35956,56.611513 28.253851,56.331152 28.084882,56.092622 z "
+     style="fill:#784421;stroke:none"
+     id="path4558" />
+  <path
+     d="M 54.357063,39.011125 C 54.357063,41.3525 52.622178,43.252746 50.484551,43.252746 C 48.346925,43.252746 46.61204,41.3525 46.61204,39.011125 C 46.61204,36.669751 48.346925,34.769506 50.484551,34.769506 C 52.622178,34.769506 54.357063,36.669751 54.357063,39.011125 z "
+     style="fill:#050607;fill-opacity:1;stroke:#07040b;stroke-width:1.06075895;stroke-opacity:1"
+     id="path6786" />
+  <path
+     d="M 43.218553,39.030234 C 43.218553,41.371608 41.483668,43.271854 39.346042,43.271854 C 37.208415,43.271854 35.47353,41.371608 35.47353,39.030234 C 35.47353,36.688859 37.208415,34.788615 39.346042,34.788615 C 41.483668,34.788615 43.218553,36.688859 43.218553,39.030234 z "
+     style="fill:#050607;fill-opacity:1;stroke:#07040b;stroke-width:1.06075895;stroke-opacity:1"
+     id="path7845" />
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/qgn_prob_status_green.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="100%" preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 100 100" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify">
+<switch>
+<foreignObject content="structured text" height="1" requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/" width="1" x="0" y="0"/>
+<g>
+<g>
+<rect fill="none" height="100" width="100"/>
+<radialGradient cx="-213.9155" cy="624.8184" fx="-213.9155" fy="624.8184" gradientTransform="matrix(6.0623 0 0 -6.0623 1346.8223 3837.8408)" gradientUnits="userSpaceOnUse" id="XMLID_40_" r="8.2473">
+<stop offset="0" style="stop-color:#4FFF9B"/>
+<stop offset="1" style="stop-color:#00FF7C"/>
+</radialGradient>
+<circle cx="50" cy="50" fill="url(#XMLID_40_)" r="50"/>
+<radialGradient cx="25.0381" cy="16.4775" fx="25.0381" fy="16.4775" gradientUnits="userSpaceOnUse" id="XMLID_41_" r="18.1317">
+<stop offset="0" style="stop-color:#00FF7C"/>
+<stop offset="1" style="stop-color:#00C024"/>
+</radialGradient>
+<path d="M7.969,31.954c7.5-1.246,28.746-10.007,35-15.623c6.254-5.615-0.977-14.661-2.223-15.277       c-0.685-0.346-5.923,1.039-10.992,3.277c-4.215,1.862-8.277,4.462-9.908,5.754c-1.423,1.108-4.062,3.285-6.346,5.808       c-3.508,3.846-6.408,7.885-6.723,8.5c-0.308,0.639-2.185,4.577-2.185,4.577s0.969,1.877,1.5,2.369       C6.623,31.823,7.969,31.954,7.969,31.954z" fill="url(#XMLID_41_)"/>
+<radialGradient cx="-243.0728" cy="466.7393" fx="-243.0728" fy="466.7393" gradientTransform="matrix(7.6923 0 0 -7.6923 1911.5386 3618.3823)" gradientUnits="userSpaceOnUse" id="XMLID_42_" r="4.2652">
+<stop offset="0" style="stop-color:#00FF7C"/>
+<stop offset="1" style="stop-color:#00C024"/>
+</radialGradient>
+<path d="M52.723,99.877c0,0-0.754-14.877-6.376-16.754c-5.631-1.877-15.631,0.631-20.008-7.5       C21.969,67.5,27.385,59.777,33.746,55c2.5-1.877,11.323-2.1,13.846-1.246C51.254,55,52.861,56.746,55,57.5       c1.785,0.631,5.823,1.2,9.377,0c1.877-0.615,5-1.861,5-4.984c0-1.531-1.646-4.4-4.377-5c-5.623-1.246-5.293,5.616-8.123,5       c-3.154-0.692-9.1-6.254-10.631-6.254c-4.369,0-5.623,6.254-8.746,6.254S33.523,50.8,33.123,50       C32.5,48.754,33.746,46.262,35,45c0.623-0.615,3.246-0.361,3.746-2.492c0.554-2.393-0.077-7.454,0.623-8.746       C43.123,26.877,48.746,22.508,55.092,20c5.361-2.1,10,1.262,10-1.861c0-3.124-6.877-10.008-5.631-13.77       c1.254-3.738,22.785,8.308,25.285,10.815c2.5,2.492,9.454,11.162,10.238,12.8c0.785,1.654,3.516,8.446,4.216,13.446       c0.708,5-1.5,15.731-3.485,16.062c-1.984,0.346-3.746-4.984-5.623-5.615c-9.576-3.185-3.776,4.369-4.377,10.623       C85,70.016,77.5,82.5,75.623,86.254c-1.685,3.354-2.984,8.23-2.984,8.23s-3.746,2.416-10.547,3.984       C56.861,99.793,52.723,99.877,52.723,99.877z" fill="url(#XMLID_42_)"/>
+</g>
+</g>
+</switch>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/icons/qgn_prob_status_red.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="100%" preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 100 100" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify">
+<switch>
+<foreignObject content="structured text" height="1" requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/" width="1" x="0" y="0"/>
+<g>
+<g>
+<rect fill="none" height="100" width="100"/>
+<radialGradient cx="-213.9155" cy="624.8184" fx="-213.9155" fy="624.8184" gradientTransform="matrix(6.0623 0 0 -6.0623 1346.8223 3837.8408)" gradientUnits="userSpaceOnUse" id="XMLID_40_" r="8.2473">
+<stop offset="0" style="stop-color:#FF799B"/>
+<stop offset="1" style="stop-color:#FF437C"/>
+</radialGradient>
+<circle cx="50" cy="50" fill="url(#XMLID_40_)" r="50"/>
+<radialGradient cx="25.0381" cy="16.4775" fx="25.0381" fy="16.4775" gradientUnits="userSpaceOnUse" id="XMLID_41_" r="18.1317">
+<stop offset="0" style="stop-color:#FF437C"/>
+<stop offset="1" style="stop-color:#FF0232"/>
+</radialGradient>
+<path d="M7.969,31.954c7.5-1.246,28.746-10.007,35-15.623c6.254-5.615-0.977-14.661-2.223-15.277       c-0.685-0.346-5.923,1.039-10.992,3.277c-4.215,1.862-8.277,4.462-9.908,5.754c-1.423,1.108-4.062,3.285-6.346,5.808       c-3.508,3.846-6.408,7.885-6.723,8.5c-0.308,0.639-2.185,4.577-2.185,4.577s0.969,1.877,1.5,2.369       C6.623,31.823,7.969,31.954,7.969,31.954z" fill="url(#XMLID_41_)"/>
+<radialGradient cx="-243.0728" cy="466.7393" fx="-243.0728" fy="466.7393" gradientTransform="matrix(7.6923 0 0 -7.6923 1911.5386 3618.3823)" gradientUnits="userSpaceOnUse" id="XMLID_42_" r="4.2652">
+<stop offset="0" style="stop-color:#FF437C"/>
+<stop offset="1" style="stop-color:#FF0232"/>
+</radialGradient>
+<path d="M52.723,99.877c0,0-0.754-14.877-6.376-16.754c-5.631-1.877-15.631,0.631-20.008-7.5       C21.969,67.5,27.385,59.777,33.746,55c2.5-1.877,11.323-2.1,13.846-1.246C51.254,55,52.861,56.746,55,57.5       c1.785,0.631,5.823,1.2,9.377,0c1.877-0.615,5-1.861,5-4.984c0-1.531-1.646-4.4-4.377-5c-5.623-1.246-5.293,5.616-8.123,5       c-3.154-0.692-9.1-6.254-10.631-6.254c-4.369,0-5.623,6.254-8.746,6.254S33.523,50.8,33.123,50       C32.5,48.754,33.746,46.262,35,45c0.623-0.615,3.246-0.361,3.746-2.492c0.554-2.393-0.077-7.454,0.623-8.746       C43.123,26.877,48.746,22.508,55.092,20c5.361-2.1,10,1.262,10-1.861c0-3.124-6.877-10.008-5.631-13.77       c1.254-3.738,22.785,8.308,25.285,10.815c2.5,2.492,9.454,11.162,10.238,12.8c0.785,1.654,3.516,8.446,4.216,13.446       c0.708,5-1.5,15.731-3.485,16.062c-1.984,0.346-3.746-4.984-5.623-5.615c-9.576-3.185-3.776,4.369-4.377,10.623       C85,70.016,77.5,82.5,75.623,86.254c-1.685,3.354-2.984,8.23-2.984,8.23s-3.746,2.416-10.547,3.984       C56.861,99.793,52.723,99.877,52.723,99.877z" fill="url(#XMLID_42_)"/>
+</g>
+</g>
+</switch>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/loadgen.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,24 @@
+#
+# 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
+
+DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT QT_NO_DEBUG
+
+SUBDIRS = group \
+          ui/hb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/sis/LoadGen_S60-30.pkg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,38 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;
+
+; Language - standard language definitions
+&EN
+
+; Standard SIS file header
+#{"LoadGen"},(0x20011384),1,4,0,TYPE=SA
+
+; Supports S60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; normal stuff:
+"\epoc32\RELEASE\armv5\UREL\LoadGen.exe"-"!:\sys\bin\LoadGen.exe"
+"\epoc32\data\z\Resource\apps\LoadGen_aif.mif"-"!:\Resource\Apps\LoadGen_aif.mif"
+"\epoc32\data\z\Resource\apps\LoadGen_ExtraIcons.mif"-"!:\Resource\Apps\LoadGen_ExtraIcons.mif"
+"\epoc32\data\z\Resource\apps\LoadGen.rsc"-"!:\Resource\Apps\LoadGen.rsc"
+"\epoc32\data\z\PRIVATE\10003A3F\APPS\LoadGen_reg.rsc"-"!:\private\10003a3f\import\apps\LoadGen_reg.rsc"
+"..\group\backup_registration.xml"-"!:\private\20011384\backup_registration.xml"
Binary file utilityapps/loadgen/sis/LoadGen_S60-30.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/sis/LoadGen_stub.pkg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,37 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;
+
+
+; Language - standard language definitions
+&EN
+
+; Standard SIS file header
+#{"LoadGen"},(0x20011384),1,0,0
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; normal stuff:
+""-"z:\sys\bin\LoadGen.exe"
+""-"z:\Resource\Apps\LoadGen.mif"
+""-"z:\Resource\Apps\LoadGen_aif.mif"
+""-"z:\Resource\Apps\LoadGen_ExtraIcons.mif"
+""-"z:\Resource\Apps\LoadGen.rsc"
+""-"z:\private\10003a3f\import\apps\LoadGen_reg.rsc"
+""-"z:\private\20011384\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/data/loadgen.rss	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1421 @@
+/*
+* 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: 
+*
+*/
+
+
+
+NAME MATT
+
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <eikon.hrh>
+#include <avkon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <CommonDialogs.hrh>
+#include <CommonDialogs.rh>
+#include <pathconfiguration.hrh>
+#include <data_caging_paths_strings.hrh>
+#include <appinfo.rh>
+
+#include "loadgen.hrh"
+#include "loadgen_std.h"
+
+
+// ---------------------------------------------------------
+//   
+//    Define the resource file signature 
+//    This resource should be empty.
+//
+// ---------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE { }
+
+// ---------------------------------------------------------
+//   
+//    Default Document Name
+//
+// ---------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name { buf=""; }
+
+// ---------------------------------------------------------
+//   
+//    Define default menu and CBA key.
+//
+// ---------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+    {
+    //status_pane = r_loadgen_status_pane;
+    //menubar = r_loadgen_menubar;
+    //cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+    
+//----------------------------------------------------
+//   
+//    r_loadgen_hotkeys
+//
+//----------------------------------------------------
+//
+RESOURCE HOTKEYS r_loadgen_hotkeys
+    {
+    control=
+        {
+        HOTKEY { command=EAknCmdExit; key='e'; }
+        };
+    }
+
+
+//----------------------------------------------------
+//    r_loadgen_view_main
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_loadgen_view_main
+    {
+    hotkeys=r_loadgen_hotkeys;
+    menubar=r_loadgen_menubar_view_main;  
+    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;    
+    }
+
+//----------------------------------------------------
+//    r_loadgen_menubar_view_main
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_loadgen_menubar_view_main
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_loadgen_app_menu; txt="App"; },
+        MENU_TITLE { menu_pane=r_loadgen_view_main_menu; txt="Main"; }
+        };
+    }
+
+//----------------------------------------------------
+//    r_loadgen_view_main_menu
+//----------------------------------------------------
+//
+
+RESOURCE MENU_PANE r_loadgen_view_main_menu
+    {
+    items=
+        {
+        };
+    }
+
+           
+        
+//----------------------------------------------------
+//    r_loadgen_app_menu
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_loadgen_app_menu
+    {
+    items=
+        {
+        MENU_ITEM { command=ELoadGenCmdNewLoad; txt="New load"; cascade=r_loadgen_newload_submenu; },
+        MENU_ITEM { command=ELoadGenStopAll; txt="Stop all"; },
+        MENU_ITEM { command=ELoadGenSuspendAll; txt="Suspend all"; },
+        MENU_ITEM { command=ELoadGenResumeAll; txt="Resume all"; },
+        MENU_ITEM { command=ELoadGenCmdLaunchPerfMon; txt="Launch PerfMon"; },
+        MENU_ITEM { command=ELoadGenCmdAbout; txt="About"; },
+        MENU_ITEM { command=EAknCmdExit; txt="Exit"; }
+        };
+    }
+
+RESOURCE MENU_PANE r_loadgen_newload_submenu
+    {
+    items = 
+        {
+        MENU_ITEM { command=ELoadGenCmdNewLoadCPULoad; txt="CPU load"; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadEatMemory; txt="Eat memory"; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadPhoneCall; txt="Phone calls"; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadMessages; txt="Messages"; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadNetConn; txt="Network conn."; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadKeyPress; txt="Key presses"; },        
+        MENU_ITEM { command=ELoadGenCmdNewLoadApplications; txt="Applications"; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadPhotoCaptures; txt="Photo captures"; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadBluetooth; txt="Bluetooth actions"; },
+        MENU_ITEM { command=ELoadGenCmdNewLoadPointerEvent; txt="Pointer events"; }
+        };
+    }
+    
+//----------------------------------------------------
+//    r_loadgen_settings_dialog
+//    Dialog for setting list
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_loadgen_settings_dialog
+    {
+    flags =
+        EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
+        EEikDialogFlagButtonsRight | EEikDialogFlagCbaButtons |
+        EEikDialogFlagWait | EEikDialogFlagNoTitleBar;
+    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtSettingListBox;
+            id = ELoadGenSettingItemList;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = LISTBOX
+                {
+                flags = EAknListBoxSelectionList;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//    r_loadgen_settings_menubar
+//----------------------------------------------------
+//
+
+RESOURCE MENU_BAR r_loadgen_settings_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_loadgen_settings_menupane;
+            txt = " ";   // dummy
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_loadgen_settings_menupane
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = ELoadGenCmdSettingsChange;
+            txt = "Change";
+            },
+        MENU_ITEM
+            {
+            command = ELoadGenCmdSettingsExit;
+            txt = "Exit";
+            }
+        };
+    }
+
+
+
+  
+// ---------------------------------------------------------
+//   
+//   r_loadgen_about_dialog
+//   About dialog - show version and copyright info etc.
+//
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_loadgen_about_dialog
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+    items=
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            control = AVKON_HEADING
+                {
+                label = "About LoadGen";
+                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtMessageQuery;
+            id = EAknMessageQueryContentId;
+            control = AVKON_MESSAGE_QUERY
+                {
+                message = "Version 1.6.0 - 8th October 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.";
+                };
+            }
+        };
+    }
+
+// ---------------------------------------------------------
+//   r_general_confirmation_query
+// ---------------------------------------------------------
+//
+
+RESOURCE DIALOG r_general_confirmation_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY
+                {
+                layout = EConfirmationQueryLayout;
+                };
+            }
+        };
+    }
+
+// ---------------------------------------------------------
+//   r_general_text_query
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_general_text_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items=
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_DATA_QUERY
+                {
+                layout = EDataLayout;
+                control = EDWIN
+                    {
+                    width = 256;
+                    lines = 3;
+                    maxlength = 256;
+                    };
+                };
+            }
+        };
+    }
+
+// ---------------------------------------------------------
+//   r_general_text_query
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_general_numeric_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control= AVKON_DATA_QUERY
+                {
+                layout = ENumberLayout;
+                control = AVKON_INTEGER_EDWIN
+                    {
+                    min = -999999;
+                    max = 999999;
+                    };
+                };
+            }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   r_item_action_query
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_item_action_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        AVKON_LIST_QUERY_DLG_LINE
+            {
+            control= AVKON_LIST_QUERY_CONTROL
+                {
+                listtype = EAknCtSinglePopupMenuListBox;
+                listbox = AVKON_LIST_QUERY_LIST
+                    {
+                    array_id = r_item_action_query_array;
+                    };
+                heading = "";
+                };
+            }
+        };
+    }
+
+RESOURCE ARRAY r_item_action_query_array
+    {
+    items =
+        {
+        LBUF {txt = "Stop"; },
+        LBUF {txt = "Resume/suspend"; },
+        LBUF {txt = "Edit"; }
+        };
+    }     
+
+
+// ---------------------------------------------------------
+//   r_cpuload_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_cpuload_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_cpuload_form;
+    }
+
+RESOURCE FORM r_cpuload_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenCPULoadQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Load mode";
+            id = ELoadGenCPULoadQueryMode;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_cpuloadmode_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Type";
+            id = ELoadGenCPULoadQueryType;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_cpuloadtype_textarray;
+                active = 0;    
+                };
+            }
+        };
+    }
+
+RESOURCE DLG_LINE r_cpuload_dlg_line_periodic_length
+    {
+    type = EEikCtNumberEditor;
+    prompt = "Length (ms)";
+    id = ELoadGenCPULoadQueryLength;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = NUMBER_EDITOR
+        {
+        min = 0;    
+        max = 999999999;    
+        };
+    }
+
+RESOURCE DLG_LINE r_cpuload_dlg_line_periodic_idle
+    {
+    type = EEikCtNumberEditor;
+    prompt = "Idle (ms)";
+    id = ELoadGenCPULoadQueryIdle;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = NUMBER_EDITOR
+        {
+        min = 0;    
+        max = 999999999;    
+        };
+    }
+
+RESOURCE DLG_LINE r_cpuload_dlg_line_periodic_variance
+    {
+    type = EEikCtNumberEditor;
+    prompt = "Random variance (%)";
+    id = ELoadGenCPULoadQueryVariance;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = NUMBER_EDITOR
+        {
+        min = 0;    
+        max = 100;    
+        };
+    }
+
+RESOURCE DLG_LINE r_cpuload_dlg_line_cpu
+    {
+    type = EAknCtPopupFieldText;
+    prompt = "CPU";
+    id = ELoadGenCPULoadQueryCpu;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = POPUP_FIELD_TEXT
+        {
+        popupfield = POPUP_FIELD
+            {
+            width = 100;
+            };
+        textarray = r_cpuloadcpu_textarray;
+        active = 0;    
+        };
+    }
+
+                
+// ---------------------------------------------------------
+//   r_memoryeat_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_memoryeat_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_memoryeat_form;
+    }
+
+RESOURCE FORM r_memoryeat_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenMemoryEatQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Source";
+            id = ELoadGenMemoryEatQuerySource;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_memoryeatsource_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Type";
+            id = ELoadGenMemoryEatQueryType;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_memoryeattype_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Buffer (B)";
+            id = ELoadGenMemoryEatQueryBuffer;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Idle after buffer (ms)";
+            id = ELoadGenMemoryEatQueryIdle;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Random variance (%)";
+            id = ELoadGenMemoryEatQueryVariance;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            }
+        };
+    }
+
+RESOURCE DLG_LINE r_memoryeat_dlg_line_amount
+    {
+    type = EEikCtEdwin;
+    prompt = "Amount (B)";
+    id = ELoadGenMemoryEatQueryAmount;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = EDWIN
+        {
+        flags = KMultiLineExpandingEditorFlags | EEikEdwinNoLineOrParaBreaks;
+        maxlength = 14;    
+        width = 6;
+        default_input_mode = EAknEditorNumericInputMode;
+        allowed_input_modes = EAknEditorNumericInputMode;    
+        };
+    }
+    
+RESOURCE DLG_LINE r_memoryeat_dlg_line_random_min
+    {
+    type = EEikCtEdwin;
+    prompt = "Min to be left (B)";
+    id = ELoadGenMemoryEatQueryRandomMin;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = EDWIN
+        {
+        flags = KMultiLineExpandingEditorFlags | EEikEdwinNoLineOrParaBreaks;
+        maxlength = 14;    
+        width = 6;
+        default_input_mode = EAknEditorNumericInputMode;
+        allowed_input_modes = EAknEditorNumericInputMode;    
+        };
+    }
+
+RESOURCE DLG_LINE r_memoryeat_dlg_line_random_max
+    {
+    type = EEikCtEdwin;
+    prompt = "Max to be left (B)";
+    id = ELoadGenMemoryEatQueryRandomMax;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = EDWIN
+        {
+        flags = KMultiLineExpandingEditorFlags | EEikEdwinNoLineOrParaBreaks;
+        maxlength = 14;    
+        width = 6;
+        default_input_mode = EAknEditorNumericInputMode;
+        allowed_input_modes = EAknEditorNumericInputMode;    
+        };
+    }
+
+
+
+// ---------------------------------------------------------
+//   r_phonecall_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_phonecall_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_phonecall_form;
+    }
+
+RESOURCE FORM r_phonecall_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenPhoneCallQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtEdwin;
+            prompt = "Phone number";
+            id = ELoadGenPhoneCallQueryDestination;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = EDWIN
+                {
+                width = 255;    
+                maxlength = 255;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Length (ms)";
+            id = ELoadGenPhoneCallQueryLength;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Idle (ms)";
+            id = ELoadGenPhoneCallQueryIdle;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Random variance (%)";
+            id = ELoadGenPhoneCallQueryVariance;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   r_netconn_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_netconn_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_netconn_form;
+    }
+
+RESOURCE FORM r_netconn_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenNetConnQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtEdwin;
+            prompt = "Destination URL";
+            id = ELoadGenNetConnQueryDestination;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = EDWIN
+                {
+                width = 255;    
+                maxlength = 255;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Idle (ms)";
+            id = ELoadGenNetConnQueryIdle;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Random variance (%)";
+            id = ELoadGenNetConnQueryVariance;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   r_keypress_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_keypress_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_keypress_form;
+    }
+
+RESOURCE FORM r_keypress_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenKeyPressQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Heartbeat (ms)";
+            id = ELoadGenKeyPressQueryHeartBeat;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Random variance (%)";
+            id = ELoadGenKeyPressQueryVariance;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            }
+        };
+    }    
+
+// ---------------------------------------------------------
+//   r_pointerevent_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_pointerevent_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_pointerevent_form;
+    }
+
+RESOURCE FORM r_pointerevent_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenPointerEventQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Heartbeat (ms)";
+            id = ELoadGenPointerEventQueryHeartBeat;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Random variance (%)";
+            id = ELoadGenPointerEventQueryVariance;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            }
+        };
+    }
+
+// ---------------------------------------------------------
+//   r_messages_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_messages_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_messages_form;
+    }
+
+RESOURCE FORM r_messages_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenMessagesQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },
+            DLG_LINE
+                {
+                type = EAknCtPopupFieldText;
+                prompt = "Type";
+                id = ELoadGenMessagesQueryType;
+                itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+                control = POPUP_FIELD_TEXT
+                    {
+                    popupfield = POPUP_FIELD
+                        {
+                        width = 100;
+                        };
+                    textarray = r_message_type_textarray;
+                    active = 0;    
+                    };
+                },            
+        DLG_LINE
+            {
+            type = EEikCtEdwin;
+            prompt = "Phone number";
+            id = ELoadGenMessagesQueryDestination;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = EDWIN
+                {
+                width = 255;    
+                maxlength = 255;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Maximum amount of messages";
+            id = ELoadGenMessagesQueryAmount;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 1000;    
+                };
+            },            
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Message length";
+            id = ELoadGenMessagesQueryLength;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 512;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Idle (ms)";
+            id = ELoadGenMessagesQueryIdle;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Random variance (%)";
+            id = ELoadGenMessagesQueryVariance;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            }
+        };
+    }
+
+// ---------------------------------------------------------
+//   r_applicatios_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_applications_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_applications_form;
+    }
+
+RESOURCE FORM r_applications_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Priority";
+            id = ELoadGenApplicationsQueryPriority;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_thread_priority_textarray;
+                active = 0;    
+                };
+            },            
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Max parallel applications";
+            id = ELoadGenApplicationsMaxOpen;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Launching interval (ms)";
+            id = ELoadGenApplicationsLaunchingInterval;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+            
+        DLG_LINE
+            {
+            type = EAknCtPopupFieldText;
+            prompt = "Key press type";
+            id = ELoadGenApplicationsKeyPressType;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = POPUP_FIELD_TEXT
+                {
+                popupfield = POPUP_FIELD
+                    {
+                    width = 100;
+                    };
+                textarray = r_applications_keypress_type_textarray;
+                active = 0;    
+                };
+            },            
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Key press interval (ms)";
+            id = ELoadGenApplicationsKeyPressQueryHeartBeat;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 999999999;    
+                };
+            },
+        DLG_LINE
+            {
+            type = EEikCtNumberEditor;
+            prompt = "Random variance (%)";
+            id = ELoadGenApplicationsQueryVariance;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control = NUMBER_EDITOR
+                {
+                min = 0;    
+                max = 100;    
+                };
+            }
+        };
+    }    
+
+// ---------------------------------------------------------
+//   r_photocapture_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_photocapture_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_photocapture_form;
+    }
+
+RESOURCE FORM r_photocapture_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+                DLG_LINE
+                    {
+                    type = EAknCtPopupFieldText;
+                    prompt = "Priority";
+                    id = ELoadGenPhotoCaptureQueryPriority;
+                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+                    control = POPUP_FIELD_TEXT
+                        {
+                        popupfield = POPUP_FIELD
+                            {
+                            width = 100;
+                            };
+                        textarray = r_thread_priority_textarray;
+                        active = 0;    
+                        };
+                    },
+                DLG_LINE
+                    {
+                    type = EEikCtNumberEditor;
+                    prompt = "Idle (ms)";
+                    id = ELoadGenPhotoCaptureQueryIdle;
+                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+                    control = NUMBER_EDITOR
+                        {
+                        min = 0;    
+                        max = 999999999;    
+                        };
+                    },
+                DLG_LINE
+                    {
+                    type = EEikCtNumberEditor;
+                    prompt = "Random variance (%)";
+                    id = ELoadGenPhotoCaptureQueryVariance;
+                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+                    control = NUMBER_EDITOR
+                        {
+                        min = 0;    
+                        max = 100;    
+                        };
+                    }
+        };
+    }
+
+/*RESOURCE DLG_LINE r_photocapture_dlg_line_periodic_idle
+    {
+    type = EEikCtNumberEditor;
+    prompt = "Idle (ms)";
+    id = ELoadGenPhotoCaptureQueryIdle;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = NUMBER_EDITOR
+        {
+        min = 0;    
+        max = 999999999;    
+        };
+    }
+
+RESOURCE DLG_LINE r_photocapture_dlg_line_periodic_variance
+    {
+    type = EEikCtNumberEditor;
+    prompt = "Random variance (%)";
+    id = ELoadGenPhotoCaptureQueryVariance;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = NUMBER_EDITOR
+        {
+        min = 0;    
+        max = 100;    
+        };
+    }*/
+
+RESOURCE DLG_LINE r_photocapture_dlg_line_device
+    {
+    type = EAknCtPopupFieldText;
+    prompt = "Device";
+    id = ELoadGenPhotoCaptureQueryDevice;
+    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+    control = POPUP_FIELD_TEXT
+        {
+        popupfield = POPUP_FIELD
+            {
+            width = 100;
+            };
+        textarray = r_photocapturedevice_textarray;
+        active = 0;    
+        };
+    }
+
+// ---------------------------------------------------------
+//   r_photocapture_form_dialog
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_bluetooth_form_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    form = r_bluetooth_form;
+    }
+
+RESOURCE FORM r_bluetooth_form
+    {
+    flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
+    items = 
+        {
+                DLG_LINE
+                    {
+                    type = EAknCtPopupFieldText;
+                    prompt = "Priority";
+                    id = ELoadGenBluetoothQueryPriority;
+                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+                    control = POPUP_FIELD_TEXT
+                        {
+                        popupfield = POPUP_FIELD
+                            {
+                            width = 100;
+                            };
+                        textarray = r_thread_priority_textarray;
+                        active = 0;    
+                        };
+                    },
+                DLG_LINE
+                    {
+                    type = EEikCtNumberEditor;
+                    prompt = "Idle (ms)";
+                    id = ELoadGenBluetoothQueryIdle;
+                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+                    control = NUMBER_EDITOR
+                        {
+                        min = 0;    
+                        max = 999999999;    
+                        };
+                    },
+                DLG_LINE
+                    {
+                    type = EEikCtNumberEditor;
+                    prompt = "Random variance (%)";
+                    id = ELoadGenBluetoothQueryVariance;
+                    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+                    control = NUMBER_EDITOR
+                        {
+                        min = 0;    
+                        max = 100;    
+                        };
+                    }
+        };
+    }
+
+// ---------------------------------------------------------
+// Arrays for forms:    
+    
+RESOURCE ARRAY r_thread_priority_textarray
+    {
+    items =
+        {
+        LBUF { txt = "Much less (-20)"; },
+        LBUF { txt = "Less (-10)"; },
+        LBUF { txt = "Normal (0)"; },
+        LBUF { txt = "More (10)"; },
+        LBUF { txt = "Much more (20)"; },
+        LBUF { txt = "Real time (30)"; },
+        LBUF { txt = "Abs. very low (100)"; },
+        LBUF { txt = "Abs. low (200)"; },
+        LBUF { txt = "Abs. backgr. (300)"; },
+        LBUF { txt = "Abs. foregr. (400)"; },
+        LBUF { txt = "Abs. high (500)"; }
+        };
+    } 
+
+RESOURCE ARRAY r_cpuloadmode_textarray
+    {
+    items =
+        {
+        LBUF { txt = "Yielding"; },
+        LBUF { txt = "Blocking"; }
+        };
+    } 
+    
+RESOURCE ARRAY r_cpuloadtype_textarray
+    {
+    items =
+        {
+        LBUF { txt = "Continuous"; },
+        LBUF { txt = "Periodic"; }
+        };
+    }       
+
+RESOURCE ARRAY r_cpuloadcpu_textarray
+    {
+    items =
+        {
+        LBUF { txt = "CPU0"; }
+        };
+    }       
+
+RESOURCE ARRAY r_memoryeatsource_textarray
+    {
+    items =
+        {
+        LBUF { txt = "RAM"; },
+        LBUF { txt = "C:"; },
+        LBUF { txt = "D:"; },
+        LBUF { txt = "E:"; },
+        LBUF { txt = "F:"; },
+        LBUF { txt = "G:"; },
+        LBUF { txt = "H:"; },
+        LBUF { txt = "I:"; },
+        LBUF { txt = "J:"; },
+        LBUF { txt = "K:"; },
+        LBUF { txt = "L:"; },
+        LBUF { txt = "M:"; },
+        LBUF { txt = "N:"; }
+        };
+    }
+    
+RESOURCE ARRAY r_memoryeattype_textarray
+    {
+    items =
+        {
+        LBUF { txt = "Memory to eat"; },
+        LBUF { txt = "Memory to be left"; },
+        LBUF { txt = "Alternate min/max"; }
+        };
+    }
+    
+RESOURCE ARRAY r_message_type_textarray
+    {
+    items =
+        {
+        LBUF { txt = "SMS"; },
+        LBUF { txt = "MMS"; }
+        };
+    } 
+
+RESOURCE ARRAY r_applications_keypress_type_textarray
+    {
+    items =
+        {
+        LBUF { txt = "None"; },
+        LBUF { txt = "Arrow keys"; }
+        };
+    } 
+
+RESOURCE ARRAY r_photocapturedevice_textarray
+    {
+    items =
+        {
+        LBUF { txt = "Camera 1"; }
+        };
+    } 
+
+
+RESOURCE LOCALISABLE_APP_INFO r_loadgen_localisable_app_info
+    {
+    short_caption = "LoadGen";
+    caption_and_icon = 
+    CAPTION_AND_ICON_INFO
+        {
+        caption = "Load Gener.";
+
+        number_of_icons = 1;
+
+        // Note for ROM-based apps it is recommended to add the drive letter
+        // icon_file = "z:"APP_BITMAP_DIR"\\myapp_aif.mif";
+        icon_file = APP_BITMAP_DIR"\\loadgen_aif.mif";
+        };
+    }
+
+
+
+// ---------------------------------------------------------
+//   
+//    RESOURCE LOCALISABLE_APP_INFO
+//
+// ---------------------------------------------------------
+//
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/data/loadgen_reg.rss	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* 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 <loadgen.rsg>
+#include <appinfo.rh>
+#include <data_caging_paths_strings.hrh>
+
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x20011384
+
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "LoadGen";
+    localisable_resource_file = APP_RESOURCE_DIR"\\LoadGen";
+    localisable_resource_id = R_LOADGEN_LOCALISABLE_APP_INFO;
+    group_name = "RnD Tools";    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/group/bld.inf	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* ============================================================================
+*  Name        : bld.inf
+*  Part of     : LoadGen / LoadGenUI
+*  Description : Build information file for project LoadGen
+*  Version     : %version: 1 %
+*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+PRJ_PLATFORMS
+
+WINSCW ARMV5
+
+
+PRJ_EXPORTS
+../rom/loadgen.iby CORE_IBY_EXPORT_PATH(tools,loadgen.iby)
+
+PRJ_MMPFILES
+
+
+loadgen.mmp
+
+
+PRJ_TESTMMPFILES
+
+
+PRJ_TESTEXPORTS
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/group/loadgen.mmp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* 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 <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+
+TARGET            LoadGen.exe
+TARGETTYPE        exe
+EPOCSTACKSIZE     0x5000
+EPOCHEAPSIZE      0x10000 0x1000000  // Min 64Kb, Max 16Mb
+
+UID               0x100039CE 0x20011384
+
+VENDORID          VID_DEFAULT
+CAPABILITY        swevent ReadUserData WriteUserData NetworkServices UserEnvironment CAP_APPLICATION AllFiles
+
+LANG              SC
+
+SMPSAFE
+
+START RESOURCE    ../data/loadgen.rss
+HEADER
+TARGETPATH        APP_RESOURCE_DIR
+END
+
+START RESOURCE    ../data/loadgen_reg.rss
+DEPENDS           loadgen.rsg
+TARGETPATH        /private/10003a3f/apps
+END
+
+APP_LAYER_SYSTEMINCLUDE
+USERINCLUDE		  /epoc32/include/mw/http
+USERINCLUDE       ../inc
+SOURCEPATH        ../src
+
+SOURCE            loadgen_app.cpp
+SOURCE            loadgen_document.cpp 
+SOURCE            loadgen_appui.cpp
+SOURCE            loadgen_model.cpp
+SOURCE            loadgen_mainview.cpp 
+SOURCE            loadgen_maincontainer.cpp 
+SOURCE            loadgen_settingsviewdlg.cpp
+SOURCE            loadgen_editors.cpp
+
+USERINCLUDE       ../../../engine/inc
+SOURCEPATH        ../../../engine/src
+
+
+
+SOURCE            loadgen_loadbase.cpp
+SOURCE            loadgen_cpuload.cpp
+SOURCE            loadgen_memoryeat.cpp
+SOURCE            loadgen_phonecall.cpp
+SOURCE            loadgen_netconn.cpp
+SOURCE            loadgen_keypress.cpp
+SOURCE            loadgen_messages.cpp 
+SOURCE            loadgen_applications.cpp 
+SOURCE 			  loadgen_photocapture.cpp
+SOURCE			  loadgen_bluetooth.cpp 
+SOURCE			  loadgen_pointerevent.cpp
+SOURCE			  loadgen_utils.cpp
+SOURCE			  loadgen_httpreceiver.cpp
+
+LIBRARY           euser.lib
+LIBRARY           commonengine.lib
+LIBRARY           apparc.lib
+LIBRARY           cone.lib 
+LIBRARY           eikcore.lib
+LIBRARY           eikcoctl.lib
+LIBRARY           eikctl.lib
+LIBRARY           eikdlg.lib  
+LIBRARY           avkon.lib 
+LIBRARY           ws32.lib 
+LIBRARY           apgrfx.lib
+LIBRARY           efsrv.lib
+LIBRARY           bafl.lib
+LIBRARY           gdi.lib
+LIBRARY           aknicon.lib
+LIBRARY           aknskins.lib
+LIBRARY           aknskinsrv.lib
+LIBRARY           egul.lib
+LIBRARY           etel3rdparty.lib
+LIBRARY           downloadmgr.lib
+LIBRARY           commdb.lib
+LIBRARY           flogger.lib
+LIBRARY           estor.lib 
+LIBRARY           msgs.lib
+LIBRARY           smcm.lib
+LIBRARY           gsmu.lib
+LIBRARY           etext.lib
+LIBRARY           sendas2.lib
+LIBRARY  		  ecam.lib
+LIBRARY			  featdiscovery.lib 
+LIBRARY			  centralrepository.lib
+LIBRARY           esock.lib
+LIBRARY           bluetooth.lib
+LIBRARY			  hal.lib
+LIBRARY			  http.lib
+LIBRARY			  inetprotutil.lib
+
+UNPAGEDDATA
+SMPSAFE
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_app.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* 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 LOADGEN_APP_H
+#define LOADGEN_APP_H
+
+
+// INCLUDES
+#include <aknapp.h>
+
+// CONSTANTS
+// UID of the application
+const TUid KUidLoadGen = { 0x20011384 };
+
+// CLASS DECLARATION
+
+/**
+* CLoadGenApp application class.
+* Provides factory to create concrete document object.
+* 
+*/
+class CLoadGenApp : public CAknApplication
+    {
+    
+    public: // Functions from base classes
+        /**
+        * From CApaApplication, overridden to enable INI file support.
+        * @return A pointer to the dictionary store
+        */
+    CDictionaryStore* OpenIniFileLC(RFs& aFs) const;
+    private:
+
+        /**
+        * From CApaApplication, creates CLoadGenDocument document object.
+        * @return A pointer to the created document object.
+        */
+        CApaDocument* CreateDocumentL();
+        
+        /**
+        * From CApaApplication, returns application's UID (KUidLoadGen).
+        * @return The value of KUidLoadGen.
+        */
+        TUid AppDllUid() const;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_appui.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* 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 LOADGEN_APPUI_H
+#define LOADGEN_APPUI_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknViewAppUi.h>
+#include <akntabgrp.h>
+#include <aknnavide.h>
+#include "loadgen_std.h"
+
+// FORWARD DECLARATIONS
+class CLoadGenModel;
+class CAknNavigationControlContainer;
+class CAknTabGroup;
+class CAknNavigationDecorator;
+
+
+// CLASS DECLARATIONS
+
+class CLoadGenAppUi : public CAknViewAppUi
+    {
+public: // constructors and destructor
+    void ConstructL();
+    ~CLoadGenAppUi();
+    
+private: // From MEikMenuObserver
+    void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+private:
+    void HandleCommandL(TInt aCommand);
+
+    virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+
+private: //Data
+    CLoadGenModel*                  iModel;
+    CAknNavigationControlContainer* iNaviPane;
+    CAknTabGroup*                   iTabGroup;
+    CAknNavigationDecorator*        iDecoratedTabGroup;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_document.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* 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 LOADGEN_DOCUMENT_H
+#define LOADGEN_DOCUMENT_H
+
+// INCLUDES
+#include <AknDoc.h>
+   
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CEikAppUi;
+class CLoadGenModel;
+
+
+// CLASS DECLARATION
+
+/**
+*  CLoadGenDocument application class.
+*/
+class CLoadGenDocument : public CAknDocument
+    {
+    public: // Constructors and destructor
+        static CLoadGenDocument* NewL(CEikApplication& aApp);
+        virtual ~CLoadGenDocument();
+
+    public: // New functions
+
+    public:// from CEikDocument
+    CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs);
+    protected:  // New functions
+
+    protected:  // Functions from base classes
+
+    private:
+
+        /**
+        * EPOC default constructor.
+        */
+        CLoadGenDocument(CEikApplication& aApp);
+        void ConstructL();
+
+    private:
+
+        /**
+        * From CEikDocument, create CLoadGenAppUi "App UI" object.
+        */
+        CEikAppUi* CreateAppUiL();
+
+    public:
+        inline CLoadGenModel* Model() { return iModel; }
+
+    private:
+        CLoadGenModel* iModel;
+
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_editors.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,339 @@
+/*
+* 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 LOADGEN_EDITORS_H
+#define LOADGEN_EDITORS_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <AknForm.h> 
+
+#include "loadgen_loadattributes.h"
+
+
+// FORWARD DECLARATIONS
+class CAknQueryValueText;
+class CAknQueryValueTextArray;
+
+// CLASS DECLARATIONS
+
+class CLoadGenLoadTypeEditorBase : public CAknForm
+    {
+protected: // Constructors
+    CLoadGenLoadTypeEditorBase(TBool aEditingExisting);
+    void ConstructL(const TDesC& aTitleText);        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+
+protected:  // New methods
+    virtual TBool DoRunQueryLD(TInt aResource);
+    
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+protected:  // New methods
+    void InsertFieldAfterL(TInt aResourceId, TInt aControlId, TInt aPrevControlId);
+    void UpdateFormL();
+
+protected: // Data
+    TBool iEditingExisting;
+    };
+
+
+
+
+class CLoadGenCPULoadEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenCPULoadEditor* NewL(TCPULoadAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenCPULoadEditor();
+
+private: // Constructors
+    CLoadGenCPULoadEditor(TCPULoadAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    void LoadCPUsL();
+    
+private: // Data
+    TCPULoadAttributes&         iAttributes;
+    CAknQueryValueText*         iCpuQueryValText;
+    CAknQueryValueTextArray*    iCpuTextArray;
+    CDesCArray*                 iCPUsArray;
+    };
+
+
+
+
+class CLoadGenMemoryEatEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenMemoryEatEditor* NewL(TMemoryEatAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenMemoryEatEditor();
+
+private: // Constructors
+    CLoadGenMemoryEatEditor(TMemoryEatAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    void UpdateAvailableMemoryL();
+
+private: // Data
+    TMemoryEatAttributes&              iAttributes;
+    }; 
+
+
+
+class CLoadGenPhoneCallEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenPhoneCallEditor* NewL(TPhoneCallAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenPhoneCallEditor();
+
+private: // Constructors
+    CLoadGenPhoneCallEditor(TPhoneCallAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    
+private: // Data
+    TPhoneCallAttributes&              iAttributes;
+    };
+
+
+
+class CLoadGenNetConnEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenNetConnEditor* NewL(TNetConnAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenNetConnEditor();
+
+private: // Constructors
+    CLoadGenNetConnEditor(TNetConnAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    
+private: // Data
+    TNetConnAttributes&              iAttributes;
+    };
+    
+ 
+ 
+
+class CLoadGenKeyPressEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenKeyPressEditor* NewL(TKeyPressAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenKeyPressEditor();
+
+private: // Constructors
+    CLoadGenKeyPressEditor(TKeyPressAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    
+private: // Data
+    TKeyPressAttributes&              iAttributes;
+    };
+
+class CLoadGenPointerEventEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenPointerEventEditor* NewL(TPointerEventAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenPointerEventEditor();
+
+private: // Constructors
+    CLoadGenPointerEventEditor(TPointerEventAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    
+private: // Data
+    TPointerEventAttributes&              iAttributes;
+    };
+
+
+
+class CLoadGenMessagesEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenMessagesEditor* NewL( TMessageAttributes& aAttributes, 
+                                         TBool aEditingExisting = EFalse );
+    virtual ~CLoadGenMessagesEditor();
+
+private: // Constructors
+    CLoadGenMessagesEditor( TMessageAttributes& aAttributes, 
+                            TBool aEditingExisting = EFalse );
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL( TInt aButtonId );    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL( TInt aControlId );
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL( TBool aFormInit = EFalse );
+    
+private: // Data
+    TMessageAttributes&              iAttributes;
+    };
+
+class CLoadGenApplicationsEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenApplicationsEditor* NewL( TApplicationsAttributes& aAttributes, 
+                                         TBool aEditingExisting = EFalse );
+    virtual ~CLoadGenApplicationsEditor();
+
+private: // Constructors
+    CLoadGenApplicationsEditor( TApplicationsAttributes& aAttributes, 
+                            TBool aEditingExisting = EFalse );
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL( TInt aButtonId );    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL( TInt aControlId );
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL( TBool aFormInit = EFalse );
+    
+private: // Data
+    TApplicationsAttributes&              iAttributes;
+    };
+
+class CLoadGenPhotoCaptureEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenPhotoCaptureEditor* NewL(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenPhotoCaptureEditor();
+
+private: // Constructors
+    CLoadGenPhotoCaptureEditor(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    void LoadCamerasL();
+    
+private: // Data
+    TPhotoCaptureAttributes&    iAttributes;
+    CAknQueryValueText*         iCameraQueryValText;
+    CAknQueryValueTextArray*    iCameraTextArray;
+    CDesCArray*                 iCamerasArray;
+    };
+
+class CLoadGenBluetoothEditor : public CLoadGenLoadTypeEditorBase
+    {
+public:
+    static CLoadGenBluetoothEditor* NewL(TBluetoothAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    virtual ~CLoadGenBluetoothEditor();
+
+private: // Constructors
+    CLoadGenBluetoothEditor(TBluetoothAttributes& aAttributes, TBool aEditingExisting=EFalse);
+    void ConstructL();        
+
+protected:  // From CEikDialog
+    TBool OkToExitL(TInt aButtonId);    
+    void PreLayoutDynInitL();
+    void HandleControlStateChangeL(TInt aControlId);
+        
+public:  // New methods
+    virtual TBool RunQueryLD();
+
+private:  // New methods
+    void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
+    
+private: // Data
+    TBluetoothAttributes&              iAttributes;
+    };
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_maincontainer.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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 LOADGEN_VALUESCONTAINER_H
+#define LOADGEN_VALUESCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h> 
+#include <aknlists.h> 
+
+// FORWARD DECLARATIONS
+class CLoadGenModel;
+class CLoadGenCAknSingleGraphicStyleListBox;
+
+// CLASS DECLARATIONS
+
+class CLoadGenMainContainer : public CCoeControl, MCoeControlObserver, MEikListBoxObserver
+    {
+public:
+    void ConstructL(const TRect& aRect);
+    ~CLoadGenMainContainer();
+
+private:
+    void SizeChanged();  
+    TInt CountComponentControls() const;
+    CCoeControl* ComponentControl(TInt aIndex) const;
+    void Draw(const TRect& aRect) const;
+    void HandleResourceChange(TInt aType);
+    void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);  // From MEikListBoxObserver
+    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);  // From MCoeControlObserver
+    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+public:
+    const CArrayFix<TInt>* ListBoxSelectionIndexes();
+    TInt ListBoxSelectionIndexesCount();
+    void SetDefaultTitlePaneTextL();
+    TInt CurrentListBoxItemIndex();
+    void SetListBoxTextArrayL(CDesCArray* aTextArray);
+    inline CLoadGenCAknSingleGraphicStyleListBox* ListBox() { return iListBox; }
+
+private:
+    CLoadGenModel*                              iModel;
+    CLoadGenCAknSingleGraphicStyleListBox*      iListBox;
+    };
+
+class CLoadGenCAknSingleGraphicStyleListBox : public CAknSingleGraphicStyleListBox
+    {
+    void SizeChanged();
+    void SizeChangedL();
+    };
+        
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_mainview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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 LOADGEN_VALUESVIEW_H
+#define LOADGEN_VALUESVIEW_H
+
+// INCLUDES
+#include <aknview.h>
+
+#include "loadgen_std.h"
+
+
+
+// CONSTANTS
+// UID of view
+const TUid KMainViewUID = {1};
+
+
+// FORWARD DECLARATIONS
+class CLoadGenMainContainer;
+class CLoadGenModel;
+
+
+// CLASS DECLARATION
+
+/**
+*  CLoadGenMainView view class.
+* 
+*/
+class CLoadGenMainView : public CAknView
+    {
+    public: // Constructors and destructor
+        void ConstructL();
+        ~CLoadGenMainView();
+
+    public: // Functions from base classes
+        TUid Id() const;
+        void HandleCommandL(TInt aCommand);
+        void HandleClientRectChange();
+
+    private: // From MEikMenuObserver
+        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+
+    private: // From AknView
+        void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
+        void DoDeactivate();
+
+    private: // Data
+        CLoadGenMainContainer*        iContainer;
+        CLoadGenModel*                  iModel;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_model.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* 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 LOADGEN_MODEL_H
+#define LOADGEN_MODEL_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <apgcli.h>
+
+#include "loadgen_loadattributes.h"
+
+// FORWARD DECLARATIONS
+class CLoadGenMainContainer;
+class CLoadGenGraphsContainer;
+class CEikonEnv;
+class CLoadBase;
+
+
+typedef CArrayFixSeg<CLoadBase*> CLoadItemList;
+
+const TUint KMaxCPUs = 4;
+
+// CLASS DECLARATIONS
+
+class TLoadGenSettings
+    {
+public:
+    };
+
+class CLoadGenModel : public CActive
+    {
+private:
+    enum TContainerDrawState
+        {
+        EDrawStateInvalid = -1,
+        EDrawStateMain
+        };
+
+public:
+    static CLoadGenModel* NewL();
+    ~CLoadGenModel();
+    void ActivateModelL();
+    void DeActivateModelL();
+
+private:
+    void RunL();
+    void DoCancel();
+        
+private:
+    CLoadGenModel();
+    void ConstructL();
+    void LoadSettingsL();
+    void EditLoadL(CLoadBase* aItem);
+    void DoStartNewLoadL(TInt aCommand);
+    void AppendToLoadItemListL(CLoadBase* aItem);
+    void DeleteFromLoadItemListL(TInt aIndex);
+    void SuspendOrResumeFromLoadItemListL(TInt aIndex);
+    void DeleteAllLoadItems();
+    void RefreshViewL(TBool aClearSelection=ETrue);
+    CDesCArray* ListOfAllAppsL();    
+    
+public:
+    void StopAllLoadItemsL();
+    void SuspendAllLoadItemsL();
+    void ResumeAllLoadItemsL();
+            
+    TInt LoadItemCount() const;
+    void ShowItemActionMenuL();
+    void StopSelectedOrHighlightedItemsL();
+    void SuspendOrResumeSelectedOrHighlightedItemsL();
+
+    CDesCArray* GenerateListBoxItemTextArrayL();
+    void StartNewLoadL(TInt aCommand);
+    void SaveSettingsL();
+    void SetMainContainer(CLoadGenMainContainer* aContainer);
+    TInt LaunchSettingsDialogL();
+    inline TLoadGenSettings& Settings() { return iSettings; }
+    inline CEikonEnv* EikonEnv() { return iEnv; }
+    inline RApaLsSession& LsSession() { return iLs; }
+    inline CLoadGenMainContainer* MainContainer() { return iMainContainer; }
+    inline TBool LoadItemsExists() { return iLoadItemList->Count() > 0; } 
+
+
+private:
+    RTimer                          iTimer;
+    CLoadGenMainContainer*          iMainContainer;
+    CEikonEnv*                      iEnv;
+    TLoadGenSettings                iSettings;
+    RApaLsSession                   iLs;
+    TInt                            iDrawState;
+    CLoadItemList*                  iLoadItemList;
+    TInt                            iReferenceNumber;
+    TCPULoadAttributes              iCpuLoadAttributes;
+    TMemoryEatAttributes            iMemoryEatAttributes;
+    TPhoneCallAttributes            iPhoneCallAttributes;
+    TNetConnAttributes              iNetConnAttributes;
+    TKeyPressAttributes             iKeyPressAttributes;
+    TMessageAttributes              iMessageAttributes;
+    TApplicationsAttributes			iApplicationsAttributes;
+    TPhotoCaptureAttributes         iPhotoCaptureAttributes;
+    TBluetoothAttributes            iBluetoothAttributes;
+    TPointerEventAttributes         iPointerEventAttributes;
+    static TInt64                   iRandomNumberSeed;
+    };
+ 
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/inc/loadgen_settingsviewdlg.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef LOADGEN_SETTINGSVIEWDLG_H
+#define LOADGEN_SETTINGSVIEWDLG_H
+
+//  INCLUDES
+#include <AknDialog.h>
+#include <eiklbo.h>
+#include <AknTabObserver.h> 
+#include <akntabgrp.h>
+
+//  FORWARD DECLARATIONS
+class CAknSettingItemArray;
+class CAknSettingStyleListBox;
+class CAknNavigationControlContainer;
+class CAknNavigationDecorator;
+class CAknTabGroup; 
+class TLoadGenSettings;
+
+
+//  CLASS DEFINITIONS
+
+class CLoadGenSettingsViewDlg : public CAknDialog, public MEikListBoxObserver, public MAknTabObserver
+    {
+public:
+    static CLoadGenSettingsViewDlg* NewL(TLoadGenSettings& aSettings);
+    virtual ~CLoadGenSettingsViewDlg();
+
+public: // From MEikListBoxObserver
+    void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+
+public: // From MAknTabObserver
+    void TabChangedL(TInt aIndex); 
+
+public: // From CAknDialog
+    void ProcessCommandL(TInt aCommandId);
+
+protected: // From CEikDialog
+    TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
+    void PreLayoutDynInitL();
+    TBool OkToExitL(TInt aButtonId);    
+
+private: // New methods
+    void ShowSettingPageL(TBool aCalledFromMenu);
+    void SetVisibilitiesOfSettingItemsL();
+    void UpdateListBoxL();
+    void AddSettingItemL(TInt aId, TInt aTitleResource, TInt aSettingPageResource, TInt aAssociatedResource, TInt aOrdinal);
+
+private: // Constructors
+    CLoadGenSettingsViewDlg(TLoadGenSettings& aSettings);
+    void ConstructL();        
+
+private: // Data
+    CAknSettingItemArray*               iSettingItemArray;
+    CAknSettingStyleListBox*            iListBox;
+    CAknNavigationControlContainer*     iNaviContainer;
+    CAknNavigationDecorator*            iDecoratedTabGroup;
+    CAknTabGroup*                       iTabGroup;
+    TLoadGenSettings&               iSettings;
+    };
+
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/rom/loadgen.iby	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* 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 __LOADGEN_IBY__
+#define __LOADGEN_IBY__
+
+S60_APP_EXE(LoadGen)
+S60_APP_AIF_ICONS(LoadGen)
+S60_APP_RESOURCE(LoadGen)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,LoadGen_ExtraIcons)
+#ifdef S60_UPGRADABLE_APP_REG_RSC
+  S60_UPGRADABLE_APP_REG_RSC(LoadGen)
+#else
+  S60_APP_AIF_RSC(LoadGen)
+#endif
+
+data=ZPRIVATE\20011384\backup_registration.xml        	private\20011384\backup_registration.xml
+data=ZSYSTEM\Install\LoadGen_stub.sis                   \system\install\LoadGen_stub.sis
+
+#endif // __LOADGEN_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_app.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* 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 FILES
+#include "loadgen_app.h"
+#include "loadgen_document.h"
+
+#include <eikstart.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CLoadGenApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CLoadGenApp::AppDllUid() const
+    {
+    return KUidLoadGen;
+    }
+
+// ---------------------------------------------------------
+// CDictionaryStore* CLoadGenApp::OpenIniFileLC(RFs& aFs) const
+// overrides CAknApplication::OpenIniFileLC to enable INI file support
+// ---------------------------------------------------------
+//
+CDictionaryStore* CLoadGenApp::OpenIniFileLC(RFs& aFs) const
+    {
+    return CEikApplication::OpenIniFileLC(aFs);
+    }
+   
+// ---------------------------------------------------------
+// CLoadGenApp::CreateDocumentL()
+// Creates CLoadGenDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CLoadGenApp::CreateDocumentL()
+    {
+    return CLoadGenDocument::NewL( *this );
+    }
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CLoadGenApp;
+    }
+
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication(NewApplication);
+    }
+   
+
+// End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_appui.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* 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 FILES
+#include "loadgen_appui.h"
+#include "loadgen_mainview.h"
+#include "loadgen.hrh"
+#include "loadgen_model.h"
+#include "loadgen_document.h"
+#include <loadgen.rsg>
+
+#include <avkon.hrh>
+#include <AknQueryDialog.h>
+#include <aknmessagequerydialog.h> 
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+void CLoadGenAppUi::ConstructL()
+    {
+    // disable window server priority control for this application
+    iEikonEnv->WsSession().ComputeMode( RWsSession::EPriorityControlDisabled );
+    
+    // set as system application to prevent getting shut down events 
+    iEikonEnv->SetSystem(ETrue);
+        
+
+    BaseConstructL(EAknEnableSkin);
+
+    iModel = static_cast<CLoadGenDocument*>(reinterpret_cast<CEikAppUi*>(iEikonEnv->AppUi())->Document())->Model();
+
+    CLoadGenMainView* mainView = new(ELeave) CLoadGenMainView;
+    CleanupStack::PushL(mainView);
+    mainView->ConstructL();
+    AddViewL(mainView);           // transfer ownership to CAknViewAppUi
+    CleanupStack::Pop();          // mainView
+    
+    SetDefaultViewL(*mainView);
+
+    // notify the model that everything has been constructed
+    iModel->ActivateModelL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenAppUi::~CLoadGenAppUi()
+    {
+    // notify the model that the application is closing 
+    if (iModel)   
+        TRAP_IGNORE(iModel->DeActivateModelL());
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
+    {
+    if (aResourceId == R_LOADGEN_APP_MENU)
+        {
+        aMenuPane->SetItemDimmed(ELoadGenStopAll, !iModel->LoadItemsExists());
+        aMenuPane->SetItemDimmed(ELoadGenSuspendAll, !iModel->LoadItemsExists());
+        aMenuPane->SetItemDimmed(ELoadGenResumeAll, !iModel->LoadItemsExists());
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TKeyResponse CLoadGenAppUi::HandleKeyEventL(const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/)
+    {
+    return EKeyWasNotConsumed;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenAppUi::HandleCommandL(TInt aCommand)
+    {
+    switch ( aCommand )
+        {
+        case ELoadGenCmdLaunchPerfMon:
+            {
+            // launch Performance Monitor
+            const TUid KUidPerfMon = { 0x20011385 };
+            
+            RWsSession ws;
+            User::LeaveIfError( ws.Connect() );
+            CleanupClosePushL(ws);
+            
+            RApaLsSession ls;
+            User::LeaveIfError( ls.Connect() );
+            CleanupClosePushL(ls);
+            
+            
+            // try to find the task of PerfMon
+            TApaTaskList tasklist(ws);
+            TApaTask task = tasklist.FindApp(KUidPerfMon);
+
+            if (task.Exists())
+                {
+                // task exists, bring it to foreground
+                task.BringToForeground();
+                }
+            else
+                {
+                TApaAppInfo appInfo;
+                User::LeaveIfError(ls.GetAppInfo(appInfo, KUidPerfMon));
+                
+                CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
+                cmdLine->SetExecutableNameL(appInfo.iFullName);
+                cmdLine->SetCommandL(EApaCommandBackground);
+
+                // start the app
+                User::LeaveIfError(ls.StartApp(*cmdLine));
+                
+                CleanupStack::PopAndDestroy(); //cmdLine                
+                }
+            
+            CleanupStack::PopAndDestroy(2); //ws,ls
+            }
+            break;
+            
+        case ELoadGenCmdAbout:
+            {
+            CAknMessageQueryDialog* dialog = new(ELeave) CAknMessageQueryDialog;
+            dialog->ExecuteLD(R_LOADGEN_ABOUT_DIALOG);
+            }
+            break;
+            
+        // a normal way to close an application
+        case EAknCmdExit:
+        case EEikCmdExit:
+        case EAknSoftkeyExit: 
+            {
+            Exit();
+            }
+            break;
+
+        default:
+            break;      
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_document.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* 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 FILES
+#include "loadgen_document.h"
+#include "loadgen_appui.h"
+#include "loadgen_model.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// constructor
+CLoadGenDocument::CLoadGenDocument(CEikApplication& aApp)
+: CAknDocument(aApp)    
+    {
+    }
+
+// ----------------------------------------------------
+
+// destructor
+CLoadGenDocument::~CLoadGenDocument()
+    {
+    delete iModel;
+    }
+
+// ----------------------------------------------------
+
+// EPOC default constructor can leave.
+void CLoadGenDocument::ConstructL()
+    {
+    iModel = CLoadGenModel::NewL();
+    }
+
+// ----------------------------------------------------
+
+// Two-phased constructor.
+CLoadGenDocument* CLoadGenDocument::NewL(CEikApplication& aApp)
+    {
+    CLoadGenDocument* self = new(ELeave) CLoadGenDocument(aApp);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+    
+// ----------------------------------------------------
+// CLoadGenDocument::CreateAppUiL()
+// constructs CLoadGenAppUi
+// ----------------------------------------------------
+//
+CEikAppUi* CLoadGenDocument::CreateAppUiL()
+    {
+    return new (ELeave) CLoadGenAppUi;
+    }
+
+// ----------------------------------------------------
+// CLoadGenDocument::OpenFileL
+// Overrides CAknDocument::OpenFileL to support document file
+// ----------------------------------------------------
+//
+CFileStore* CLoadGenDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs)
+    {
+    return CEikDocument::OpenFileL(aDoOpen, aFilename, aFs);
+    }
+
+// ----------------------------------------------------
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_editors.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1437 @@
+/*
+* 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 FILES
+#include "loadgen_editors.h"
+#include "loadgen_loadattributes.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+
+#include <AknForm.h> 
+#include <eikedwin.h> 
+#include <eikmfne.h>
+#include <AknPopupFieldText.h>
+#include <AknQueryValueText.h>
+#include <eikspane.h> 
+#include <akntitle.h> 
+#include <eikcapc.h>
+#include <e32hal.h> 
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenLoadTypeEditorBase::CLoadGenLoadTypeEditorBase(TBool aEditingExisting):
+    iEditingExisting(aEditingExisting)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenLoadTypeEditorBase::ConstructL(const TDesC& aTitleText)
+    {
+    CAknForm::ConstructL();
+
+    // set title text
+    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
+    CAknTitlePane* tp = static_cast<CAknTitlePane*>( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    tp->SetTextL( aTitleText );
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenLoadTypeEditorBase::PreLayoutDynInitL()
+    {
+    CAknForm::PreLayoutDynInitL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenLoadTypeEditorBase::OkToExitL(TInt /*aButtonId*/)
+    {
+    return ETrue;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(TInt aControlId)
+    {
+    CAknForm::HandleControlStateChangeL(aControlId);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenLoadTypeEditorBase::RunQueryLD()
+    {
+    User::Panic(_L("Unk.form"), 222);
+    
+    return ETrue;
+    }
+               
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenLoadTypeEditorBase::DoRunQueryLD(TInt aResource)
+    {
+    return ExecuteLD(aResource);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenLoadTypeEditorBase::InsertFieldAfterL(TInt aResourceId, TInt aControlId, TInt aPrevControlId)
+    {
+    CCoeControl* prevControl = Control(aPrevControlId);
+    __ASSERT_DEBUG(prevControl, User::Panic(_L("Form.Ctrl.Null"), 111));
+    TInt pos = FindLineIndex(*prevControl);
+    pos = pos + 1;
+    InsertLineL(pos, aResourceId);
+    Line(aControlId)->ActivateL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenLoadTypeEditorBase::UpdateFormL()
+    {
+    UpdatePageL(ETrue);
+    }
+               
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenCPULoadEditor* CLoadGenCPULoadEditor::NewL(TCPULoadAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenCPULoadEditor* self = new(ELeave) CLoadGenCPULoadEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenCPULoadEditor::~CLoadGenCPULoadEditor()
+    {
+    delete iCpuQueryValText;
+    delete iCpuTextArray;
+    delete iCPUsArray;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenCPULoadEditor::CLoadGenCPULoadEditor(TCPULoadAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenCPULoadEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("CPU load"));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenCPULoadEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryPriority));
+    CAknPopupFieldText* edMode = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryMode));
+    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryType));
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
+    edMode->SetCurrentValueIndex(iAttributes.iMode);
+    edType->SetCurrentValueIndex(iAttributes.iType);
+    
+    LoadCPUsL();
+
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenCPULoadEditor::LoadCPUsL()
+    {
+    // if we are running in SMP environment
+    if (iAttributes.iCpuCount > 1)
+        {
+        // insert possibility to select which cpu the load is generated to
+        InsertFieldAfterL(R_CPULOAD_DLG_LINE_CPU, ELoadGenCPULoadQueryCpu, ELoadGenCPULoadQueryType);
+
+        iCPUsArray = new (ELeave) CDesCArrayFlat( 5 );
+        
+        // "Free scheduling" means that no specific cpu is selected. Scheduler desides
+        // which CPUu runs load thread at which time.
+        iCPUsArray->AppendL(_L("Free scheduling"));
+        
+        // add CPUs
+        for (int i = 0; i < iAttributes.iCpuCount; i++) 
+            {
+            TBuf<10> cpu;
+            _LIT(KCPU, "CPU%d");
+            cpu.Format(KCPU, i);
+            iCPUsArray->AppendL(cpu);
+            }
+        
+        // "All CPUs" means that one thread is started for each CPU.
+        iCPUsArray->AppendL(_L("All CPUs"));
+    
+        iCpuTextArray = CAknQueryValueTextArray::NewL();
+        iCpuTextArray->SetArray( *iCPUsArray );  
+        iCpuQueryValText = CAknQueryValueText::NewL();    
+        iCpuQueryValText->SetArrayL( iCpuTextArray );
+        // CPU is not defined, set "Free scheduling" as default selection in query list
+        if (iAttributes.iCpu < 0)
+            {
+            iCpuQueryValText->SetCurrentValueIndex(0);
+            }
+        // "All CPUs" selected. It is last choise in the selection list.
+        else if (iAttributes.iCpu == KCPUSelection_AllCPUs)
+            {
+            iCpuQueryValText->SetCurrentValueIndex(iCpuTextArray->MdcaCount()-1);
+            }
+        // CPU is defined, set the correct CPU as default selection in query list
+        else
+            {
+            // iCpu starts from zero (i.e. CPU0 is first CPU), but index zero
+            // in iCpuQueryValText is "Free scheduling", hence iCpu+1.
+            iCpuQueryValText->SetCurrentValueIndex(iAttributes.iCpu+1);
+            }
+
+        CAknPopupField* popup = static_cast<CAknPopupField*>(Control( ELoadGenCPULoadQueryCpu)); 
+        popup->SetQueryValueL( iCpuQueryValText );
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenCPULoadEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryPriority));
+        CAknPopupFieldText* edMode = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryMode));
+        CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenCPULoadQueryType));
+        CEikNumberEditor* edPeak = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenCPULoadQueryLength));
+        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenCPULoadQueryIdle));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenCPULoadQueryVariance));
+        
+        // we are running in SMP environment
+        if (iAttributes.iCpuCount > 1)
+            {
+            TInt currentValueIndex = iCpuQueryValText->CurrentValueIndex();
+            // user selected a specific CPU in which the load thread should be run in.
+            if (currentValueIndex == 0)
+                {
+                // User selected "Free scheduling"
+                iAttributes.iCpu = KCPUSelection_FreeScheduling;
+                }            
+            else if( currentValueIndex == iCpuTextArray->MdcaCount()-1 )
+                {
+                // User selected "All CPUs", which is the last item in the selection list
+                iAttributes.iCpu = KCPUSelection_AllCPUs;
+                }
+            else
+                {                
+                // iCpu should start from zero (CPU0 is the first cpu)
+                // but zero in currentValueIndex means "Free scheduling". CPU0 in
+                // currentValueIndex is at index 1, hence -1.
+                iAttributes.iCpu = currentValueIndex - 1;
+                }
+            }
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        iAttributes.iMode = edMode->CurrentValueIndex();
+        iAttributes.iType = edType->CurrentValueIndex();
+        if (edPeak) iAttributes.iLength = edPeak->Number();
+        if (edIdle) iAttributes.iIdle = edIdle->Number();
+        if (edVariance) iAttributes.iRandomVariance = edVariance->Number();
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenCPULoadEditor::UpdateVisibilitiesOfFieldsL(TBool aFormInit)
+    {
+    // filter based on selected cpu load type
+    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>( Control( ELoadGenCPULoadQueryType ) );
+
+    if ( !aFormInit && edType->CurrentValueIndex() == ECpuLoadTypeContinuous )
+        {
+        // save values before deleting the items
+        CCoeControl* control = ControlOrNull( ELoadGenCPULoadQueryLength );
+        if ( control )
+            {
+            CEikNumberEditor* edPeak = static_cast<CEikNumberEditor*>( control );
+            iAttributes.iLength = edPeak->Number();
+            DeleteLine( ELoadGenCPULoadQueryLength );
+            control = NULL;
+            }
+        control = ControlOrNull( ELoadGenCPULoadQueryIdle );
+        if ( control )
+            {
+            CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>( control );
+            iAttributes.iIdle = edIdle->Number();
+            DeleteLine( ELoadGenCPULoadQueryIdle );
+            control = NULL;
+            }
+        control = ControlOrNull( ELoadGenCPULoadQueryVariance );
+        if ( control )
+            {
+            CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>( control );
+            iAttributes.iRandomVariance = edVariance->Number();
+            DeleteLine( ELoadGenCPULoadQueryVariance );
+            }
+        }
+    else if ( edType->CurrentValueIndex() == ECpuLoadTypePeriodic )
+        {
+        // insert new fields
+        InsertFieldAfterL(R_CPULOAD_DLG_LINE_PERIODIC_LENGTH, ELoadGenCPULoadQueryLength, ELoadGenCPULoadQueryType);
+        InsertFieldAfterL(R_CPULOAD_DLG_LINE_PERIODIC_IDLE, ELoadGenCPULoadQueryIdle, ELoadGenCPULoadQueryLength);
+        InsertFieldAfterL(R_CPULOAD_DLG_LINE_PERIODIC_VARIANCE, ELoadGenCPULoadQueryVariance, ELoadGenCPULoadQueryIdle);
+        
+        // load values to just created editors
+        CEikNumberEditor* edPeak = static_cast<CEikNumberEditor*>(Control(ELoadGenCPULoadQueryLength));
+        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenCPULoadQueryIdle));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenCPULoadQueryVariance));
+        edPeak->SetNumber(iAttributes.iLength);
+        edIdle->SetNumber(iAttributes.iIdle);
+        edVariance->SetNumber(iAttributes.iRandomVariance);
+        }
+
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenCPULoadEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+
+    // update visibilities of fields    
+    if (aControlId == ELoadGenCPULoadQueryType)
+        {
+        UpdateVisibilitiesOfFieldsL();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenCPULoadEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_CPULOAD_FORM_DIALOG);
+    }
+       
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenMemoryEatEditor* CLoadGenMemoryEatEditor::NewL(TMemoryEatAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenMemoryEatEditor* self = new(ELeave) CLoadGenMemoryEatEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenMemoryEatEditor::~CLoadGenMemoryEatEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenMemoryEatEditor::CLoadGenMemoryEatEditor(TMemoryEatAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMemoryEatEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("Memory eat"));
+    
+    // convert int64 vals to descs
+    iAttributes.iAmountDes.Copy(KNullDesC);
+    iAttributes.iRandomMinDes.Copy(KNullDesC);
+    iAttributes.iRandomMaxDes.Copy(KNullDesC);
+    
+    iAttributes.iAmountDes.AppendNum(iAttributes.iAmount);
+    iAttributes.iRandomMinDes.AppendNum(iAttributes.iRandomMin);
+    iAttributes.iRandomMaxDes.AppendNum(iAttributes.iRandomMax);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMemoryEatEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryPriority));
+    CAknPopupFieldText* edSource = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQuerySource));
+    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryType));
+    CEikNumberEditor* edBuffer = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryBuffer));
+    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryIdle));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryVariance));
+
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
+    edSource->SetCurrentValueIndex(iAttributes.iSource);
+    edType->SetCurrentValueIndex(iAttributes.iType);
+    edBuffer->SetNumber(iAttributes.iBuffer);
+    edIdle->SetNumber(iAttributes.iIdle);
+    edVariance->SetNumber(iAttributes.iRandomVariance);
+            
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    UpdateAvailableMemoryL();
+    
+    // set source as dimmed if editing existing item
+    if (iEditingExisting)
+        {
+        SetLineDimmedNow(ELoadGenMemoryEatQuerySource, ETrue); 
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenMemoryEatEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryPriority));
+        CAknPopupFieldText* edSource = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQuerySource));
+        CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryType));
+        CEikNumberEditor* edBuffer = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryBuffer));
+        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryIdle));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenMemoryEatQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        iAttributes.iSource = edSource->CurrentValueIndex();
+        iAttributes.iType = edType->CurrentValueIndex();
+        iAttributes.iBuffer = edBuffer->Number();
+        iAttributes.iIdle = edIdle->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+
+
+        CEikEdwin* edAmount = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryAmount));
+        CEikEdwin* edRandomMin = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryRandomMin));
+        CEikEdwin* edRandomMax = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryRandomMax));
+
+        // get desc values and convert to int64
+        if (edAmount)
+            {
+            edAmount->GetText(iAttributes.iAmountDes);
+
+            TLex converter;
+            converter.Assign(iAttributes.iAmountDes);
+            User::LeaveIfError(converter.Val(iAttributes.iAmount));
+            }
+
+        if (edRandomMin)
+            {
+            edRandomMin->GetText(iAttributes.iRandomMinDes);
+
+            TLex converter;
+            converter.Assign(iAttributes.iRandomMinDes);
+            User::LeaveIfError(converter.Val(iAttributes.iRandomMin));
+            }
+
+        if (edRandomMax)
+            {
+            edRandomMax->GetText(iAttributes.iRandomMaxDes);
+
+            TLex converter;
+            converter.Assign(iAttributes.iRandomMaxDes);
+            User::LeaveIfError(converter.Val(iAttributes.iRandomMax));
+            
+            // swap min max values if they in wrong order
+            if (iAttributes.iRandomMin > iAttributes.iRandomMax)
+                {
+                TInt64 temp(iAttributes.iRandomMin);
+                iAttributes.iRandomMin = iAttributes.iRandomMax;
+                iAttributes.iRandomMax = temp; 
+                }
+            
+            }                        
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMemoryEatEditor::UpdateVisibilitiesOfFieldsL(TBool aFormInit)
+    {
+    // filter based on selected memory eat type
+    CAknPopupFieldText* edType = static_cast<CAknPopupFieldText*>(Control(ELoadGenMemoryEatQueryType));
+
+    if (!aFormInit && (edType->CurrentValueIndex() == EMemoryEatTypeMemoryToEat || edType->CurrentValueIndex() == EMemoryEatTypeMemoryToBeLeft))
+        {
+        // no need for changes if amount field is already active
+        CEikNumberEditor* edAmount = static_cast<CEikNumberEditor*>(ControlOrNull(ELoadGenMemoryEatQueryAmount));
+        if (edAmount) return;
+        
+        // save values before deleting the items
+        CEikEdwin* edRandomMin = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMin));
+        CEikEdwin* edRandomMax = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMax));
+        edRandomMin->GetText(iAttributes.iRandomMinDes);
+        edRandomMax->GetText(iAttributes.iRandomMaxDes);
+        
+        DeleteLine(ELoadGenMemoryEatQueryRandomMin);
+        DeleteLine(ELoadGenMemoryEatQueryRandomMax);
+        }
+    else if (!aFormInit && edType->CurrentValueIndex() == EMemoryEatTypeWavy)
+        {
+        // save values before deleting the items
+        CEikEdwin* edAmount = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryAmount));
+        edAmount->GetText(iAttributes.iAmountDes);
+        
+        DeleteLine(ELoadGenMemoryEatQueryAmount);
+        }
+    
+    if (edType->CurrentValueIndex() == EMemoryEatTypeMemoryToEat || edType->CurrentValueIndex() == EMemoryEatTypeMemoryToBeLeft)
+        {
+        // insert new fields
+        InsertFieldAfterL(R_MEMORYEAT_DLG_LINE_AMOUNT, ELoadGenMemoryEatQueryAmount, ELoadGenMemoryEatQueryType);
+        
+        // load values to just created editors
+        CEikEdwin* edAmount = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryAmount));
+        edAmount->SetTextL(&iAttributes.iAmountDes);
+        }
+    else if (edType->CurrentValueIndex() == EMemoryEatTypeWavy)
+        {
+        // insert new fields
+        InsertFieldAfterL(R_MEMORYEAT_DLG_LINE_RANDOM_MIN, ELoadGenMemoryEatQueryRandomMin, ELoadGenMemoryEatQueryType);
+        InsertFieldAfterL(R_MEMORYEAT_DLG_LINE_RANDOM_MAX, ELoadGenMemoryEatQueryRandomMax, ELoadGenMemoryEatQueryRandomMin);
+        
+        // load values to just created editors
+        CEikEdwin* edRandomMin = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMin));
+        CEikEdwin* edRandomMax = static_cast<CEikEdwin*>(Control(ELoadGenMemoryEatQueryRandomMax));
+        edRandomMin->SetTextL(&iAttributes.iRandomMinDes);
+        edRandomMax->SetTextL(&iAttributes.iRandomMaxDes);
+        }
+    
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMemoryEatEditor::UpdateAvailableMemoryL()
+    {
+    // this feature is used only when not editing existing load
+    if (!iEditingExisting)
+        {
+        CAknPopupFieldText* edSource = static_cast<CAknPopupFieldText*>(ControlOrNull(ELoadGenMemoryEatQuerySource));
+        CEikEdwin* edAmount = static_cast<CEikEdwin*>(ControlOrNull(ELoadGenMemoryEatQueryAmount));
+        
+        if (edAmount && edSource)
+            {
+            iAttributes.iAmountDes.Copy(KNullDesC);
+
+            if (edSource->CurrentValueIndex() == EMemoryEatSourceTypeRAM)
+                {
+                // RAM
+                TMemoryInfoV1Buf ramMemory;
+                UserHal::MemoryInfo(ramMemory);
+                
+                iAttributes.iAmountDes.AppendNum(ramMemory().iFreeRamInBytes);
+                }
+            else
+                {
+                // get drive
+                TVolumeInfo volumeInfo;
+                if (CEikonEnv::Static()->FsSession().Volume(volumeInfo, edSource->CurrentValueIndex()+1) == KErrNone)
+                    {
+                    iAttributes.iAmountDes.AppendNum(volumeInfo.iFree);
+                    }
+                else
+                    {
+                    iAttributes.iAmountDes.AppendNum(0);
+                    }
+                }
+
+            edAmount->SetTextL(&iAttributes.iAmountDes);
+            }        
+        }
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMemoryEatEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+    
+    // update visibilities of fields    
+    if (aControlId == ELoadGenMemoryEatQueryType)
+        {
+        UpdateVisibilitiesOfFieldsL();
+        }
+    
+    // update memory when source changes
+    else if (aControlId == ELoadGenMemoryEatQuerySource)
+        {
+        UpdateAvailableMemoryL();
+        }
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenMemoryEatEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_MEMORYEAT_FORM_DIALOG);
+    }
+
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPhoneCallEditor* CLoadGenPhoneCallEditor::NewL(TPhoneCallAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenPhoneCallEditor* self = new(ELeave) CLoadGenPhoneCallEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPhoneCallEditor::~CLoadGenPhoneCallEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPhoneCallEditor::CLoadGenPhoneCallEditor(TPhoneCallAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhoneCallEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("Phone calls"));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhoneCallEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+    
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhoneCallQueryPriority));
+    CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenPhoneCallQueryDestination));
+    CEikNumberEditor* edLength = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryLength));
+    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryIdle));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryVariance));
+
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
+    edDestination->SetTextL(&iAttributes.iDestination);   
+    edLength->SetNumber(iAttributes.iLength);   
+    edIdle->SetNumber(iAttributes.iIdle);   
+    edVariance->SetNumber(iAttributes.iRandomVariance);   
+    
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenPhoneCallEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhoneCallQueryPriority));
+        CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenPhoneCallQueryDestination));
+        CEikNumberEditor* edLength = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryLength));
+        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryIdle));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhoneCallQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        edDestination->GetText(iAttributes.iDestination);
+        iAttributes.iLength = edLength->Number();
+        iAttributes.iIdle = edIdle->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhoneCallEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhoneCallEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenPhoneCallEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_PHONECALL_FORM_DIALOG);
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenNetConnEditor* CLoadGenNetConnEditor::NewL(TNetConnAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenNetConnEditor* self = new(ELeave) CLoadGenNetConnEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenNetConnEditor::~CLoadGenNetConnEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenNetConnEditor::CLoadGenNetConnEditor(TNetConnAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenNetConnEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("Network conn."));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenNetConnEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+    
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenNetConnQueryPriority));
+    CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenNetConnQueryDestination));
+    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryIdle));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryVariance));
+
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
+    edDestination->SetTextL(&iAttributes.iDestination);   
+    edIdle->SetNumber(iAttributes.iIdle);   
+    edVariance->SetNumber(iAttributes.iRandomVariance);
+       
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenNetConnEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenNetConnQueryPriority));
+        CEikEdwin* edDestination = static_cast<CEikEdwin*>(Control(ELoadGenNetConnQueryDestination));
+        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryIdle));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenNetConnQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        edDestination->GetText(iAttributes.iDestination);
+        iAttributes.iIdle = edIdle->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenNetConnEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenNetConnEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenNetConnEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_NETCONN_FORM_DIALOG);
+    }
+
+// --------------------------------------------------------------------------------------------
+       
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenKeyPressEditor* CLoadGenKeyPressEditor::NewL(TKeyPressAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenKeyPressEditor* self = new(ELeave) CLoadGenKeyPressEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenKeyPressEditor::~CLoadGenKeyPressEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenKeyPressEditor::CLoadGenKeyPressEditor(TKeyPressAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenKeyPressEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("Key presses"));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenKeyPressEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenKeyPressQueryPriority));
+    CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryHeartBeat));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryVariance));
+
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
+    edHeartBeat->SetNumber(iAttributes.iHeartBeat);
+    edVariance->SetNumber(iAttributes.iRandomVariance);
+
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenKeyPressEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenKeyPressQueryPriority));
+        CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryHeartBeat));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenKeyPressQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        iAttributes.iHeartBeat = edHeartBeat->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenKeyPressEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenKeyPressEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenKeyPressEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_KEYPRESS_FORM_DIALOG);
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenMessagesEditor* CLoadGenMessagesEditor::NewL( TMessageAttributes& aAttributes, 
+                                                      TBool aEditingExisting )
+    {
+    CLoadGenMessagesEditor* self = new(ELeave) CLoadGenMessagesEditor( aAttributes, 
+                                                                        aEditingExisting );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenMessagesEditor::~CLoadGenMessagesEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenMessagesEditor::CLoadGenMessagesEditor( TMessageAttributes& aAttributes, 
+                                                TBool aEditingExisting ) :
+                                            CLoadGenLoadTypeEditorBase( aEditingExisting ), 
+                                            iAttributes( aAttributes )
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMessagesEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL( _L("Messages") );
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMessagesEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+    
+    // load values to static editors
+    CAknPopupFieldText* edPriority = 
+                    static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryPriority ) );
+    CAknPopupFieldText* edType = 
+                    static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryType ) );                    
+    CEikEdwin* edDestination = 
+                    static_cast<CEikEdwin*>( Control( ELoadGenMessagesQueryDestination ) );
+    CEikNumberEditor* edAmount = 
+                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryAmount ) );                
+    CEikNumberEditor* edLength = 
+                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryLength ) );
+    CEikNumberEditor* edIdle = 
+                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryIdle ) );
+    CEikNumberEditor* edVariance = 
+                    static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryVariance ) );
+
+    edPriority->SetCurrentValueIndex( iAttributes.iPriority );
+    edType->SetCurrentValueIndex( iAttributes.iMessageType );
+    edDestination->SetTextL( &iAttributes.iDestination );
+    edAmount->SetNumber( iAttributes.iAmount );
+    edLength->SetNumber( iAttributes.iLength );   
+    edIdle->SetNumber( iAttributes.iIdle );   
+    edVariance->SetNumber( iAttributes.iRandomVariance );   
+       
+    UpdateVisibilitiesOfFieldsL( ETrue );
+    // set type selection as dimmed if editing existing item
+    if (iEditingExisting)
+        {
+        SetLineDimmedNow(ELoadGenMessagesQueryType, ETrue); 
+        }
+    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenMessagesEditor::OkToExitL( TInt aButtonId )
+    {
+    if ( aButtonId == EAknSoftkeyOk )
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = 
+                static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryPriority ) );
+        CAknPopupFieldText* edType = 
+                static_cast<CAknPopupFieldText*>( Control( ELoadGenMessagesQueryType ) );                
+        CEikEdwin* edDestination = 
+                static_cast<CEikEdwin*>( Control( ELoadGenMessagesQueryDestination ) );
+        CEikNumberEditor* edLength = 
+                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryLength ) );
+        CEikNumberEditor* edAmount = 
+                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryAmount ) );                
+        CEikNumberEditor* edIdle = 
+                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryIdle ) );
+        CEikNumberEditor* edVariance =
+                static_cast<CEikNumberEditor*>( Control( ELoadGenMessagesQueryVariance ) );
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        iAttributes.iMessageType = edType->CurrentValueIndex();
+        edDestination->GetText( iAttributes.iDestination );
+        iAttributes.iAmount = edAmount->Number();
+        iAttributes.iLength = edLength->Number();
+        iAttributes.iIdle = edIdle->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMessagesEditor::UpdateVisibilitiesOfFieldsL( TBool /*aFormInit*/ )
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMessagesEditor::HandleControlStateChangeL( TInt aControlId )
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL( aControlId );
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenMessagesEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD( R_MESSAGES_FORM_DIALOG );
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenApplicationsEditor* CLoadGenApplicationsEditor::NewL( TApplicationsAttributes& aAttributes, 
+                                                      TBool aEditingExisting )
+    {
+    CLoadGenApplicationsEditor* self = new(ELeave) CLoadGenApplicationsEditor( aAttributes, 
+                                                                        aEditingExisting );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenApplicationsEditor::~CLoadGenApplicationsEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenApplicationsEditor::CLoadGenApplicationsEditor( TApplicationsAttributes& aAttributes, 
+                                                TBool aEditingExisting ) :
+                                            CLoadGenLoadTypeEditorBase( aEditingExisting ), 
+                                            iAttributes( aAttributes )
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenApplicationsEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL( _L("Applications") );
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenApplicationsEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsQueryPriority));
+    CEikNumberEditor* edLaunchingInterval = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsLaunchingInterval));
+    CAknPopupFieldText* edKeyPressType = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsKeyPressType));
+    CEikNumberEditor* edMaxOpen = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsMaxOpen));
+    CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsKeyPressQueryHeartBeat));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsQueryVariance));
+
+    edPriority->SetCurrentValueIndex( iAttributes.iPriority );
+    edLaunchingInterval->SetNumber( iAttributes.iLaunchingInterval );
+    edKeyPressType->SetCurrentValueIndex( iAttributes.iKeyPressType );
+    edMaxOpen->SetNumber( iAttributes.iMaxOpen );
+    edHeartBeat->SetNumber( iAttributes.iHeartBeat );
+    edVariance->SetNumber( iAttributes.iRandomVariance );
+
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenApplicationsEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsQueryPriority));
+        CEikNumberEditor* edLaunchingInterval = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsLaunchingInterval));
+        CAknPopupFieldText* edKeyPressType = static_cast<CAknPopupFieldText*>(Control(ELoadGenApplicationsKeyPressType));
+        CEikNumberEditor* edMaxOpen = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsMaxOpen));
+        CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsKeyPressQueryHeartBeat));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenApplicationsQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        iAttributes.iLaunchingInterval = edLaunchingInterval->Number();
+        iAttributes.iKeyPressType = edKeyPressType->CurrentValueIndex();
+        iAttributes.iMaxOpen = edMaxOpen->Number();
+        iAttributes.iHeartBeat = edHeartBeat->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+        }
+    
+    return ETrue;
+    }       
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenApplicationsEditor::UpdateVisibilitiesOfFieldsL( TBool /*aFormInit*/ )
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenApplicationsEditor::HandleControlStateChangeL( TInt aControlId )
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL( aControlId );
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenApplicationsEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD( R_APPLICATIONS_FORM_DIALOG );
+    }
+
+// --------------------------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPhotoCaptureEditor* CLoadGenPhotoCaptureEditor::NewL(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenPhotoCaptureEditor* self = new(ELeave) CLoadGenPhotoCaptureEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPhotoCaptureEditor::~CLoadGenPhotoCaptureEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPhotoCaptureEditor::CLoadGenPhotoCaptureEditor(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhotoCaptureEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("Photo captures"));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhotoCaptureEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+    
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhotoCaptureQueryPriority));
+    //CAknPopupFieldText* edDevice = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhotoCaptureQueryDevice));    
+    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryIdle));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryVariance));
+
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
+    //edDevice->SetCurrentValueIndex(0);
+    edIdle->SetNumber(iAttributes.iIdle);   
+    edVariance->SetNumber(iAttributes.iRandomVariance);
+    
+    LoadCamerasL();
+    
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+void CLoadGenPhotoCaptureEditor::LoadCamerasL()
+    {    
+    if (iAttributes.iCameraCount > 0)
+        {
+        // insert possibility to select which cpu the load is generated to
+        InsertFieldAfterL(R_PHOTOCAPTURE_DLG_LINE_DEVICE, ELoadGenPhotoCaptureQueryDevice, ELoadGenPhotoCaptureQueryPriority);
+        
+        iCamerasArray = new (ELeave) CDesCArrayFlat( iAttributes.iCameraCount );   
+        
+        // add Cameras
+        for (int i = 0; i < iAttributes.iCameraCount; i++) 
+            {
+            TBuf<16> cam;
+            _LIT(KCam, "Camera %d");
+            cam.Format(KCam, i);
+            iCamerasArray->AppendL(cam);
+            }    
+       
+        iCameraTextArray = CAknQueryValueTextArray::NewL();
+        iCameraTextArray->SetArray( *iCamerasArray );  
+        iCameraQueryValText = CAknQueryValueText::NewL();    
+        iCameraQueryValText->SetArrayL( iCameraTextArray );
+        if( iAttributes.iCameraCount > 0 )
+            {
+            iCameraQueryValText->SetCurrentValueIndex(iAttributes.iCamera);
+            }
+        CAknPopupField* popup = static_cast<CAknPopupField*>(Control( ELoadGenPhotoCaptureQueryDevice)); 
+        popup->SetQueryValueL( iCameraQueryValText );        
+        }    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenPhotoCaptureEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPhotoCaptureQueryPriority));        
+        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryIdle));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPhotoCaptureQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();        
+        iAttributes.iIdle = edIdle->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+        
+        if (iAttributes.iCameraCount > 1)
+            {
+            iAttributes.iCamera = iCameraQueryValText->CurrentValueIndex();
+            }
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhotoCaptureEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPhotoCaptureEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenPhotoCaptureEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_PHOTOCAPTURE_FORM_DIALOG);
+    }
+
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenBluetoothEditor* CLoadGenBluetoothEditor::NewL(TBluetoothAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenBluetoothEditor* self = new(ELeave) CLoadGenBluetoothEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenBluetoothEditor::~CLoadGenBluetoothEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenBluetoothEditor::CLoadGenBluetoothEditor(TBluetoothAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenBluetoothEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("Bluetooth"));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenBluetoothEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+    
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenBluetoothQueryPriority));        
+    CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryIdle));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryVariance));
+
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);    
+    edIdle->SetNumber(iAttributes.iIdle);   
+    edVariance->SetNumber(iAttributes.iRandomVariance);
+        
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenBluetoothEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenBluetoothQueryPriority));        
+        CEikNumberEditor* edIdle = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryIdle));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenBluetoothQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();        
+        iAttributes.iIdle = edIdle->Number();
+        iAttributes.iRandomVariance = edVariance->Number();                
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenBluetoothEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenBluetoothEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenBluetoothEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_BLUETOOTH_FORM_DIALOG);
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPointerEventEditor* CLoadGenPointerEventEditor::NewL(TPointerEventAttributes& aAttributes, TBool aEditingExisting)
+    {
+    CLoadGenPointerEventEditor* self = new(ELeave) CLoadGenPointerEventEditor(aAttributes, aEditingExisting);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPointerEventEditor::~CLoadGenPointerEventEditor()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenPointerEventEditor::CLoadGenPointerEventEditor(TPointerEventAttributes& aAttributes, TBool aEditingExisting) :
+    CLoadGenLoadTypeEditorBase(aEditingExisting), iAttributes(aAttributes)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPointerEventEditor::ConstructL()
+    {
+    CLoadGenLoadTypeEditorBase::ConstructL(_L("Pointer events"));
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPointerEventEditor::PreLayoutDynInitL()
+    {
+    CLoadGenLoadTypeEditorBase::PreLayoutDynInitL();
+
+    // load values to static editors
+    CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPointerEventQueryPriority));
+    CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryHeartBeat));
+    CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryVariance));
+
+    edPriority->SetCurrentValueIndex(iAttributes.iPriority);
+    edHeartBeat->SetNumber(iAttributes.iHeartBeat);
+    edVariance->SetNumber(iAttributes.iRandomVariance);
+
+    UpdateVisibilitiesOfFieldsL(ETrue);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenPointerEventEditor::OkToExitL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyOk)
+        {
+        // store values from editors
+        CAknPopupFieldText* edPriority = static_cast<CAknPopupFieldText*>(Control(ELoadGenPointerEventQueryPriority));
+        CEikNumberEditor* edHeartBeat = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryHeartBeat));
+        CEikNumberEditor* edVariance = static_cast<CEikNumberEditor*>(Control(ELoadGenPointerEventQueryVariance));
+
+        iAttributes.iPriority = edPriority->CurrentValueIndex();
+        iAttributes.iHeartBeat = edHeartBeat->Number();
+        iAttributes.iRandomVariance = edVariance->Number();
+        }
+    
+    return ETrue;
+    }       
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPointerEventEditor::UpdateVisibilitiesOfFieldsL(TBool /*aFormInit*/)
+    {
+    UpdateFormL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenPointerEventEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+    CLoadGenLoadTypeEditorBase::HandleControlStateChangeL(aControlId);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenPointerEventEditor::RunQueryLD()
+    {
+    return CLoadGenLoadTypeEditorBase::DoRunQueryLD(R_POINTEREVENT_FORM_DIALOG);
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_maincontainer.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,457 @@
+/*
+* 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 FILES
+#include "loadgen_maincontainer.h"
+#include "loadgen.hrh"
+#include "loadgen_document.h"
+#include "loadgen_appui.h"
+#include "loadgen_model.h"
+#include <loadgen_extraicons.mbg>
+
+#include <aknlists.h>
+#include <eikclb.h>
+#include <eikclbd.h>
+#include <aknconsts.h>
+#include <AknUtils.h>
+#include <aknnotewrappers.h>
+#include <AknIconArray.h> 
+#include <f32file.h>
+#include <AknIconUtils.h>
+#include <AknDef.h>
+#include <akntitle.h>
+#include <eikspane.h> 
+
+_LIT(KExtraIconsPath, "\\resource\\apps\\loadgen_extraicons.mif");
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+void CLoadGenMainContainer::ConstructL(const TRect& aRect)
+    {
+    iModel = static_cast<CLoadGenDocument*>(reinterpret_cast<CEikAppUi*>(iEikonEnv->AppUi())->Document())->Model();
+    iModel->SetMainContainer(this);
+
+    CreateWindowL();
+    SetRect(aRect);
+    SetBlank();
+    
+    // init listbox
+    iListBox = new(ELeave) CLoadGenCAknSingleGraphicStyleListBox;
+    iListBox->SetContainerWindowL(*this);
+    iListBox->ConstructL(this, EAknListBoxMarkableList);
+    iListBox->View()->SetListEmptyTextL(_L("No loads activated\n(Select new load from Options to generate new load)"));
+
+    // create icon array and add marking indicator to it
+    CAknIconArray* iconArray = new(ELeave) CAknIconArray(1);
+    CleanupStack::PushL(iconArray);
+    CFbsBitmap* markBitmap = NULL;
+    CFbsBitmap* markBitmapMask = NULL;
+    
+    TRgb defaultColor;
+    defaultColor = iEikonEnv->Color(EColorControlText);
+
+    AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
+            KAknsIIDQgnIndiMarkedAdd,
+            KAknsIIDQsnIconColors,
+            EAknsCIQsnIconColorsCG13,
+            markBitmap,
+            markBitmapMask,
+            AknIconUtils::AvkonIconFileName(),
+            EMbmAvkonQgn_indi_marked_add,
+            EMbmAvkonQgn_indi_marked_add_mask,
+            defaultColor
+            );
+     
+    CGulIcon* markIcon = CGulIcon::NewL(markBitmap, markBitmapMask);
+    iconArray->AppendL(markIcon);                       
+    
+    // append icons from loadgen_extraicons.mif
+    TFileName extraIconsPath;
+    extraIconsPath.Copy(KExtraIconsPath);
+    TParsePtrC parse((CEikonEnv::Static()->EikAppUi()->Application())->AppFullName()); // get path where this app is installed
+    extraIconsPath.Insert(0, parse.Drive()); // drive letter
+    
+    CFbsBitmap* redBitmap = NULL;
+    CFbsBitmap* redBitmapMask = NULL;
+    CFbsBitmap* greenBitmap = NULL;
+    CFbsBitmap* greenBitmapMask = NULL;
+    
+    AknIconUtils::CreateIconL(redBitmap, redBitmapMask, extraIconsPath, EMbmLoadgen_extraiconsQgn_prob_status_red, EMbmLoadgen_extraiconsQgn_prob_status_red_mask);
+    AknIconUtils::CreateIconL(greenBitmap, greenBitmapMask, extraIconsPath, EMbmLoadgen_extraiconsQgn_prob_status_green, EMbmLoadgen_extraiconsQgn_prob_status_green_mask);
+
+    CGulIcon* redIcon = CGulIcon::NewL(redBitmap, redBitmapMask);
+    iconArray->AppendL(redIcon);  
+    
+    CGulIcon* greenIcon = CGulIcon::NewL(greenBitmap, greenBitmapMask);
+    iconArray->AppendL(greenIcon);  
+
+    // set icon array
+    CleanupStack::Pop(); // iconArray
+    iListBox->ItemDrawer()->ColumnData()->SetIconArray(iconArray);
+
+    iListBox->CreateScrollBarFrameL(ETrue);
+    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
+    iListBox->SetListBoxObserver(this);
+    
+    // set size of the listbox
+    TSize outputRectSize;
+    AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRectSize);
+    TRect outputRect(outputRectSize);
+    iListBox->SetRect(outputRect);
+
+    iListBox->ActivateL();    
+    
+    ActivateL();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenMainContainer::~CLoadGenMainContainer()
+    {
+    if (iListBox)
+        delete iListBox;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMainContainer::SizeChanged()
+{
+    TSize outputRectSize;
+    AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRectSize);
+    TRect outputRect(outputRectSize);
+    
+    if (iListBox)
+        iListBox->SetRect(outputRect);
+}
+
+// --------------------------------------------------------------------------------------------
+
+TInt CLoadGenMainContainer::CountComponentControls() const
+    {
+    if (iListBox)
+        return 1;
+    else
+        return 0;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CCoeControl* CLoadGenMainContainer::ComponentControl(TInt /*aIndex*/) const
+    {
+    if (iListBox)
+        return iListBox;
+    else
+        return NULL;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CLoadGenMainContainer::CurrentListBoxItemIndex()
+    {
+    if (iListBox)
+        {
+        return iListBox->CurrentItemIndex();
+        }
+    else
+        return KErrNotFound;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMainContainer::SetListBoxTextArrayL(CDesCArray* aTextArray)
+    {
+    if (iListBox)
+        {    
+        iListBox->Model()->SetItemTextArray(aTextArray);
+        iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
+        iListBox->HandleItemAdditionL();
+        iListBox->UpdateScrollBarsL();
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+const CArrayFix<TInt>* CLoadGenMainContainer::ListBoxSelectionIndexes()
+    {
+    if (iListBox)
+        {
+        const CListBoxView::CSelectionIndexArray* indices = iListBox->SelectionIndexes();
+        return static_cast<const CArrayFix<TInt>*>(indices);
+        }
+    else
+        return NULL;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TInt CLoadGenMainContainer::ListBoxSelectionIndexesCount()
+    {
+    if (iListBox)
+        {
+        return iListBox->SelectionIndexes()->Count();
+        }
+    else
+        return KErrNotFound;
+    }
+                        
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMainContainer::Draw(const TRect& aRect) const
+    {
+    CWindowGc& gc = SystemGc();
+    gc.Clear(aRect);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMainContainer::HandleControlEventL(CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMainContainer::SetDefaultTitlePaneTextL()
+    {
+    _LIT(KTitleText, "Load Gener.");
+
+    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
+    CAknTitlePane* tp = static_cast<CAknTitlePane*>( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    tp->SetTextL( KTitleText );
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TKeyResponse CLoadGenMainContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+    if(aType != EEventKey)
+        return EKeyWasNotConsumed;
+    
+    if (iListBox && iListBox->Model()->NumberOfItems() > 0)
+        {
+        /*
+        if (aKeyEvent.iCode == EKeyBackspace || aKeyEvent.iCode == EKeyDelete)
+            {
+            iModel->StopSelectedOrHighlightedItemsL();
+            return EKeyWasConsumed;
+            }
+        else    
+            {
+            return iListBox->OfferKeyEventL(aKeyEvent, aType);
+            }
+        */
+        TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift) ||
+                                (aKeyEvent.iModifiers & EModifierLeftShift) ||
+                                (aKeyEvent.iModifiers & EModifierRightShift);
+        TBool controlKeyPressed = (aKeyEvent.iModifiers & EModifierCtrl) || 
+                                  (aKeyEvent.iModifiers & EModifierRightCtrl); 
+                                  
+        
+        // handle OK/Enter keys
+        if ((aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && (shiftKeyPressed || controlKeyPressed))
+            {
+            return iListBox->OfferKeyEventL(aKeyEvent, aType); //send to listbox if modifiers
+            }
+
+        // handle OK/Enter keys
+        else if (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter)
+            {
+            iModel->ShowItemActionMenuL();
+            }
+
+        // handle delete key
+        else if (aKeyEvent.iCode == EKeyBackspace || aKeyEvent.iCode == EKeyDelete)
+            {
+            iModel->StopSelectedOrHighlightedItemsL();
+            }
+
+        else
+            return iListBox->OfferKeyEventL(aKeyEvent, aType);
+        }
+    
+    return EKeyWasNotConsumed;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMainContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+    {
+    switch (aEventType)
+        {
+        case EEventEnterKeyPressed:
+        case EEventItemDoubleClicked:
+            {
+            iModel->ShowItemActionMenuL();
+            }
+            break;
+        default:
+            break;
+        }
+    }
+            
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenMainContainer::HandleResourceChange(TInt aType)
+    {
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        TRect mainPaneRect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect);
+        SetRect(mainPaneRect);
+
+        TSize outputRectSize;
+        AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRectSize);
+        TRect outputRect(outputRectSize);
+        iListBox->SetRect(outputRect);
+        }
+    else
+        {
+        CCoeControl::HandleResourceChange(aType);
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenCAknSingleGraphicStyleListBox::SizeChanged()
+    {
+    // call the base class function first
+    CAknSingleGraphicStyleListBox::SizeChanged();
+
+    // customize the list box
+    TRAP_IGNORE(SizeChangedL());
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenCAknSingleGraphicStyleListBox::SizeChangedL()
+    {
+    const TInt KEmptySize = 2;
+    
+    // disable separator line
+    ItemDrawer()->ColumnData()->SetSeparatorLinePosition(ENoLine);
+    
+    // enable marquee
+    ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
+    
+    // set fonts
+    const CFont* font = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont);
+    ItemDrawer()->ColumnData()->SetColumnFontL(0, font);
+    ItemDrawer()->ColumnData()->SetColumnFontL(1, font);
+    ItemDrawer()->ColumnData()->SetColumnFontL(2, font);
+    ItemDrawer()->ColumnData()->SetColumnFontL(3, font);
+
+    // set row height
+    TInt rowHeight = font->HeightInPixels()+5;    
+    TSize itemCellSize = View()->ItemDrawer()->ItemCellSize();
+    itemCellSize.iHeight = rowHeight; 
+    SetItemHeightL(rowHeight);
+    View()->ItemDrawer()->SetItemCellSize(itemCellSize);
+    
+    // set icon sizes
+    TInt normalIconSize = rowHeight * 0.7;
+    TInt markingIconSize = rowHeight * 0.8;
+    ItemDrawer()->ColumnData()->SetSubCellIconSize(0, TSize(normalIconSize,normalIconSize));
+    ItemDrawer()->ColumnData()->SetSubCellIconSize(2, TSize(markingIconSize,markingIconSize));
+    ItemDrawer()->ColumnData()->SetSubCellIconSize(3, TSize(KEmptySize,KEmptySize));
+
+    // set column widths
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(0, normalIconSize + 2*normalIconSize * 0.15);
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(1, itemCellSize.iWidth-KEmptySize-markingIconSize);
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(2, markingIconSize);
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(3, KEmptySize);
+
+    // set baseline for the text
+    ItemDrawer()->ColumnData()->SetColumnBaselinePosL(1, font->HeightInPixels()-font->BaselineOffsetInPixels());
+
+    // set margins
+    TMargins iconMargins;
+    iconMargins.iBottom = 0;
+    iconMargins.iLeft = normalIconSize * 0.15;
+    iconMargins.iRight = normalIconSize * 0.15;
+    iconMargins.iTop = 0;
+
+    TMargins textMargins;
+    textMargins.iBottom = 0;
+    textMargins.iLeft = markingIconSize * 0.15;
+    textMargins.iRight = markingIconSize * 0.15;
+    textMargins.iTop = 0;
+
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(0, iconMargins);
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(1, textMargins);
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(2, iconMargins);
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(3, iconMargins);
+    
+/*
+    const TInt KEmptySize = 2;
+    
+    // enable marquee
+    ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
+    
+    // set fonts
+    const CFont* font = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont);
+    ItemDrawer()->ColumnData()->SetColumnFontL(0, font);
+    ItemDrawer()->ColumnData()->SetColumnFontL(1, font);
+    ItemDrawer()->ColumnData()->SetColumnFontL(2, font);
+    ItemDrawer()->ColumnData()->SetColumnFontL(3, font);
+
+    // set row height
+    TInt rowHeight = font->HeightInPixels()+7;    
+    TSize itemCellSize = View()->ItemDrawer()->ItemCellSize();
+    itemCellSize.iHeight = rowHeight; 
+    SetItemHeightL(rowHeight);
+    View()->ItemDrawer()->SetItemCellSize(itemCellSize);
+
+    // set icon sizes
+    TInt normalIconSize = rowHeight * 0.6;
+    TInt markingIconSize = rowHeight * 0.8;
+    ItemDrawer()->ColumnData()->SetSubCellIconSize(0, TSize(normalIconSize,normalIconSize));
+    ItemDrawer()->ColumnData()->SetSubCellIconSize(2, TSize(markingIconSize,markingIconSize));
+    ItemDrawer()->ColumnData()->SetSubCellIconSize(3, TSize(KEmptySize,KEmptySize));
+
+    // set column widths
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(0, normalIconSize);
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(1, itemCellSize.iWidth-KEmptySize-markingIconSize);
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(2, markingIconSize);
+    ItemDrawer()->ColumnData()->SetColumnWidthPixelL(3, KEmptySize);
+
+    // set baseline for the text
+    ItemDrawer()->ColumnData()->SetColumnBaselinePosL(1, font->HeightInPixels()-font->BaselineOffsetInPixels());
+
+    // set margins
+    TMargins iconMargins;
+    iconMargins.iBottom = 0;
+    iconMargins.iLeft = 0;
+    iconMargins.iRight = 0;
+    iconMargins.iTop = 0;
+
+    TMargins textMargins;
+    textMargins.iBottom = 0;
+    textMargins.iLeft = markingIconSize * 0.15;
+    textMargins.iRight = markingIconSize * 0.15;
+    textMargins.iTop = 0;
+
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(0, iconMargins);
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(1, textMargins);
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(2, iconMargins);
+    ItemDrawer()->ColumnData()->SetColumnMarginsL(3, iconMargins);
+*/
+    }
+
+// --------------------------------------------------------------------------------------------
+        
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_mainview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,175 @@
+/*
+* 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 FILES
+#include "loadgen.hrh"
+#include "loadgen_mainview.h"
+#include "loadgen_maincontainer.h"
+#include "loadgen_document.h" 
+#include "loadgen_model.h"
+#include "loadgen_traces.h"
+#include <loadgen.rsg>
+
+#include <eikenv.h>
+#include <aknViewAppUi.h> 
+#include <aknnotewrappers.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CLoadGenMainView::ConstructL(const TRect& aRect)
+// EPOC two-phased constructor
+// ---------------------------------------------------------
+//
+void CLoadGenMainView::ConstructL()
+    {
+    BaseConstructL( R_LOADGEN_VIEW_MAIN );
+    iModel = static_cast<CLoadGenDocument*>(reinterpret_cast<CEikAppUi*>(iEikonEnv->AppUi())->Document())->Model();
+    }
+
+// ---------------------------------------------------------
+// CLoadGenMainView::~CLoadGenMainView()
+// ---------------------------------------------------------
+//
+CLoadGenMainView::~CLoadGenMainView()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+        iContainer = NULL;
+        }
+    }
+
+// ---------------------------------------------------------
+// TUid CLoadGenMainView::Id()
+// ---------------------------------------------------------
+//
+TUid CLoadGenMainView::Id() const
+    {
+    return KMainViewUID;
+    }
+
+// ---------------------------------------------------------
+// TUid CLoadGenMainView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
+// ---------------------------------------------------------
+//
+void CLoadGenMainView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
+    {
+    AppUi()->DynInitMenuPaneL(aResourceId, aMenuPane);
+    }
+
+  
+// ---------------------------------------------------------
+// CLoadGenMainView::HandleCommandL(TInt aCommand)
+// ---------------------------------------------------------
+//
+void CLoadGenMainView::HandleCommandL(TInt aCommand)
+    {   
+    switch ( aCommand )
+        {
+        case ELoadGenCmdNewLoadCPULoad:
+        case ELoadGenCmdNewLoadEatMemory:
+        case ELoadGenCmdNewLoadPhoneCall:
+        case ELoadGenCmdNewLoadNetConn:
+        case ELoadGenCmdNewLoadKeyPress:
+        case ELoadGenCmdNewLoadMessages:
+        case ELoadGenCmdNewLoadApplications:
+        case ELoadGenCmdNewLoadPhotoCaptures:
+        case ELoadGenCmdNewLoadBluetooth:
+        case ELoadGenCmdNewLoadPointerEvent:
+            {            
+            TRAPD(err, iModel->StartNewLoadL(aCommand));
+            if( err != KErrNone )
+                {
+                LOGSTRING2("LoadGen: Load (command: %d) start failed!", aCommand);
+                _LIT(message, "Load start failed!");
+                CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
+                errorNote->ExecuteLD(message);                
+                }
+            break;
+            }
+        case ELoadGenStopAll:
+            {
+            iModel->StopAllLoadItemsL();
+            break;
+            }
+        case ELoadGenSuspendAll:
+            {
+            iModel->SuspendAllLoadItemsL();
+            break;
+            }
+        case ELoadGenResumeAll:
+            {
+            iModel->ResumeAllLoadItemsL();
+            break;
+            }            
+        default:
+            {
+            AppUi()->HandleCommandL(aCommand);
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CLoadGenMainView::HandleClientRectChange()
+// ---------------------------------------------------------
+//
+void CLoadGenMainView::HandleClientRectChange()
+    {
+    if ( iContainer )
+        {
+        iContainer->SetRect( ClientRect() );
+        }
+    }
+
+// ---------------------------------------------------------
+// CLoadGenMainView::DoActivateL(...)
+// ---------------------------------------------------------
+//
+void CLoadGenMainView::DoActivateL(
+   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+   const TDesC8& /*aCustomMessage*/)
+    {
+    if (!iContainer)
+        {
+        iContainer = new (ELeave) CLoadGenMainContainer;
+        iModel->SetMainContainer(iContainer);
+        iContainer->SetMopParent(this);
+        iContainer->ConstructL( ClientRect() );
+        AppUi()->AddToStackL( *this, iContainer );
+        } 
+   }
+
+// ---------------------------------------------------------
+// CLoadGenMainView::DoDeactivate()
+// ---------------------------------------------------------
+//
+void CLoadGenMainView::DoDeactivate()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+        iContainer = NULL;
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_model.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,910 @@
+/*
+* 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 FILES
+#include "loadgen_cpuload.h"
+#include "loadgen_memoryeat.h"
+#include "loadgen_phonecall.h"
+#include "loadgen_netconn.h"
+#include "loadgen_keypress.h"
+#include "loadgen_pointerevent.h"
+#include "loadgen_messages.h"
+#include "loadgen_applications.h"
+#include "loadgen_photocapture.h"
+#include "loadgen_bluetooth.h"
+#include "loadgen_utils.h"
+
+#include "loadgen_traces.h"
+#include "loadgen_editors.h"
+#include "loadgen_loadattributes.h"
+#include "loadgen_model.h"
+#include "loadgen_app.h"
+#include "loadgen_settingsviewdlg.h"
+#include "loadgen_maincontainer.h"
+#include "loadgen.hrh"
+#include <loadgen.rsg>
+
+#include <coeutils.h>
+#include <bautils.h>
+#include <eikenv.h>
+#include <AknQueryDialog.h>
+#include <e32math.h> 
+#include <u32hal.h>
+#include <hal.h> 
+#include <hal_data.h>
+
+#include <ecam.h>
+#include <aknnotewrappers.h>
+#include <featdiscovery.h>
+
+inline TInt64 INIT_SEED()
+{
+    TTime now; 
+    now.HomeTime(); 
+    return now.Int64();
+}
+
+TInt64 CLoadGenModel::iRandomNumberSeed = INIT_SEED();
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CLoadGenModel* CLoadGenModel::NewL()
+    {
+    CLoadGenModel* self = new(ELeave) CLoadGenModel;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenModel::CLoadGenModel() : CActive(EPriorityStandard)
+    {
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::ConstructL()
+    {
+    iDrawState = EDrawStateInvalid;
+    iReferenceNumber = 0;
+    
+    iEnv = CEikonEnv::Static();
+    User::LeaveIfError(iLs.Connect());
+    
+    iLoadItemList = new(ELeave) CLoadItemList(64);
+
+    User::LeaveIfError(iTimer.CreateLocal());
+    CActiveScheduler::Add(this);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::ActivateModelL()
+    {
+    // load settings
+    //TRAP_IGNORE(LoadSettingsL());
+
+    // set defaults to attributes
+    iCpuLoadAttributes.iId = 0;
+    iCpuLoadAttributes.iPriority = EThreadPriorityTypeNormal;
+    iCpuLoadAttributes.iMode = ECpuLoadModeYielding;
+    iCpuLoadAttributes.iType = ECpuLoadTypePeriodic;
+    iCpuLoadAttributes.iLength = 4000;
+    iCpuLoadAttributes.iIdle = 2000;
+    iCpuLoadAttributes.iRandomVariance = 0;
+    iCpuLoadAttributes.iCpu = KCPUSelection_FreeScheduling; // set CPU as "undefined" (can be >= 0 only in SMP environments)
+    iCpuLoadAttributes.iCpuCount = UserSvr::HalFunction(EHalGroupKernel, KHalFunction_EKernelHalNumLogicalCpus, 0, 0);
+    if( iCpuLoadAttributes.iCpuCount < 1 || iCpuLoadAttributes.iCpuCount > KMaxCPUs )
+        {
+        // HAL may not support this function, so let's use CPU count 1:
+        iCpuLoadAttributes.iCpuCount = 1;
+        }
+    iMemoryEatAttributes.iId = 0;
+    iMemoryEatAttributes.iPriority = EThreadPriorityTypeNormal;
+    iMemoryEatAttributes.iSource = 0;
+    iMemoryEatAttributes.iType = EMemoryEatTypeMemoryToBeLeft;
+    iMemoryEatAttributes.iBuffer = 16*1024;
+    iMemoryEatAttributes.iIdle = 0;
+    iMemoryEatAttributes.iAmount = 0;
+    iMemoryEatAttributes.iRandomMin = 1000000;
+    iMemoryEatAttributes.iRandomMax = 1500000;
+    iMemoryEatAttributes.iAmountDes.Copy(KNullDesC);
+    iMemoryEatAttributes.iRandomMinDes.Copy(KNullDesC);
+    iMemoryEatAttributes.iRandomMaxDes.Copy(KNullDesC);
+    iMemoryEatAttributes.iRandomVariance = 0;
+
+    iPhoneCallAttributes.iId = 0;
+    iPhoneCallAttributes.iPriority = EThreadPriorityTypeNormal;
+    iPhoneCallAttributes.iDestination.Copy(_L("+358"));
+    iPhoneCallAttributes.iLength = 60000;
+    iPhoneCallAttributes.iIdle = 10000;
+    iPhoneCallAttributes.iRandomVariance = 0;
+
+    iNetConnAttributes.iId = 0;
+    iNetConnAttributes.iPriority = EThreadPriorityTypeNormal;
+    iNetConnAttributes.iDestination.Copy(_L("http://www.nokia.com"));
+    iNetConnAttributes.iIdle = 10000;
+    iNetConnAttributes.iRandomVariance = 0;
+
+    iKeyPressAttributes.iId = 0;
+    iKeyPressAttributes.iPriority = EThreadPriorityTypeNormal;
+    iKeyPressAttributes.iHeartBeat = 100;
+    iKeyPressAttributes.iRandomVariance = 0;
+    
+    iPointerEventAttributes.iId = 0;
+    iPointerEventAttributes.iPriority = EThreadPriorityTypeNormal;
+    iPointerEventAttributes.iHeartBeat = 1000;
+    iPointerEventAttributes.iRandomVariance = 0;
+
+    iMessageAttributes.iId = 0;
+    iMessageAttributes.iPriority = EThreadPriorityTypeNormal;
+    iMessageAttributes.iMessageType = EMessageTypeSMS;
+    iMessageAttributes.iDestination.Copy(_L("+358"));
+    iMessageAttributes.iAmount = 5;
+    iMessageAttributes.iLength = 160;
+    iMessageAttributes.iIdle = 15000;
+    iMessageAttributes.iRandomVariance = 0;
+    
+    iApplicationsAttributes.iId = 0;
+    iApplicationsAttributes.iLaunchingInterval = 2000;
+    iApplicationsAttributes.iPriority = EThreadPriorityTypeNormal;
+    iApplicationsAttributes.iKeyPressType = EApplicationsKeyPressTypeNone;
+    iApplicationsAttributes.iMaxOpen = 20;
+    iApplicationsAttributes.iHeartBeat = 50;
+    iApplicationsAttributes.iRandomVariance = 0;
+    
+    iPhotoCaptureAttributes.iId = 0;
+    iPhotoCaptureAttributes.iPriority = EThreadPriorityTypeNormal;
+    iPhotoCaptureAttributes.iIdle = 10000;
+    iPhotoCaptureAttributes.iRandomVariance = 0;        
+    iPhotoCaptureAttributes.iCameraCount = CCamera::CamerasAvailable();
+    if(iPhotoCaptureAttributes.iCameraCount > 0)
+        {
+        iPhotoCaptureAttributes.iCamera = 0; // Main camera
+        }
+    else
+        {
+        iPhotoCaptureAttributes.iCamera = -1;
+        }
+    
+    iBluetoothAttributes.iId = 0;
+    iBluetoothAttributes.iPriority = EThreadPriorityTypeNormal;
+    iBluetoothAttributes.iIdle = 10000;
+    iBluetoothAttributes.iRandomVariance = 0;
+    iBluetoothAttributes.iBluetoothSupported = CFeatureDiscovery::IsFeatureSupportedL(KFeatureIdBt);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::DeActivateModelL()
+    {
+    Cancel();
+    
+    // for a faster exit, send the application to background
+    TApaTask selfTask(iEnv->WsSession());
+    selfTask.SetWgId(iEnv->RootWin().Identifier());
+    selfTask.SendToBackground();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+CLoadGenModel::~CLoadGenModel()
+    {
+    if (iLoadItemList)
+        {
+        DeleteAllLoadItems();
+        delete iLoadItemList;
+        }
+    if ( iApplicationsAttributes.iAppsArray )
+        {
+        delete iApplicationsAttributes.iAppsArray;
+        }
+    iTimer.Close();
+    iLs.Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::DoCancel()
+    {
+    iTimer.Cancel();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::RunL()
+    {
+    // continue    
+    //iTimer.After(iStatus, 400000);
+    //SetActive();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::SetMainContainer(CLoadGenMainContainer* aContainer)
+    {
+    iMainContainer = aContainer;
+    iDrawState = EDrawStateMain;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::StartNewLoadL(TInt aCommand)
+    {
+    // show new load query
+    CLoadGenLoadTypeEditorBase* dlg = NULL;
+
+    switch ( aCommand )
+        {
+        case ELoadGenCmdNewLoadCPULoad:
+            {
+            dlg = CLoadGenCPULoadEditor::NewL(iCpuLoadAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadEatMemory:
+            {
+            dlg = CLoadGenMemoryEatEditor::NewL(iMemoryEatAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadPhoneCall:
+            {
+            dlg = CLoadGenPhoneCallEditor::NewL(iPhoneCallAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadNetConn:
+            {
+            dlg = CLoadGenNetConnEditor::NewL(iNetConnAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadKeyPress:
+            {
+            dlg = CLoadGenKeyPressEditor::NewL(iKeyPressAttributes);
+            break;
+            }               
+        case ELoadGenCmdNewLoadMessages:
+            {
+            dlg = CLoadGenMessagesEditor::NewL( iMessageAttributes );
+            break;
+            }
+        case ELoadGenCmdNewLoadApplications:
+            {
+            dlg = CLoadGenApplicationsEditor::NewL( iApplicationsAttributes );
+            break;
+            }
+        case ELoadGenCmdNewLoadPhotoCaptures:
+            {
+            if( iPhotoCaptureAttributes.iCameraCount > 0 )
+                {
+                dlg = CLoadGenPhotoCaptureEditor::NewL( iPhotoCaptureAttributes );
+                }
+            else
+                {
+                _LIT(message, "Cameras not available");
+                CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
+                errorNote->ExecuteLD(message);
+                return;
+                }
+            break;
+            }
+        case ELoadGenCmdNewLoadBluetooth:
+            {
+            if( iBluetoothAttributes.iBluetoothSupported )
+                {
+                dlg = CLoadGenBluetoothEditor::NewL(iBluetoothAttributes);                
+                }
+            else
+                {
+                _LIT(message, "Bluetooth device not available");
+                CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
+                errorNote->ExecuteLD(message);
+                return;
+                }
+            break;
+            }
+        case ELoadGenCmdNewLoadPointerEvent:
+            {
+            dlg = CLoadGenPointerEventEditor::NewL(iPointerEventAttributes);
+            break;
+            } 
+
+        default:
+            {
+            User::Panic(_L("Wrong new load"), 111);
+            break;
+            }
+        }
+
+    TBool dlgResult = dlg->RunQueryLD();
+
+    // set back title
+    if (iMainContainer)
+        iMainContainer->SetDefaultTitlePaneTextL();
+
+    // start creating new load if dialog accepted
+    if (dlgResult)
+        {
+        DoStartNewLoadL(aCommand);
+        }
+
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::EditLoadL(CLoadBase* aItem)
+    {
+    // suspend current
+    aItem->Suspend();
+    
+    // show new load query
+    CLoadGenLoadTypeEditorBase* dlg = NULL;
+
+    switch ( aItem->Type() )
+        {
+        case ELoadGenCmdNewLoadCPULoad:
+            {
+            dlg = CLoadGenCPULoadEditor::NewL(static_cast<CCPULoad*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadEatMemory:
+            {
+            dlg = CLoadGenMemoryEatEditor::NewL(static_cast<CMemoryEat*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadPhoneCall:
+            {
+            dlg = CLoadGenPhoneCallEditor::NewL(static_cast<CPhoneCall*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadNetConn:
+            {
+            dlg = CLoadGenNetConnEditor::NewL(static_cast<CNetConn*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadKeyPress:
+            {
+            dlg = CLoadGenKeyPressEditor::NewL(static_cast<CKeyPress*>(aItem)->Attributes(), ETrue);
+            break;
+            }       
+        case ELoadGenCmdNewLoadMessages:
+            {
+            dlg = CLoadGenMessagesEditor::NewL(static_cast<CMessages*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadApplications:
+            {
+            dlg = CLoadGenApplicationsEditor::NewL( static_cast<CAppLauncher*>(aItem)->Attributes(), ETrue );
+            break;
+            }
+        case ELoadGenCmdNewLoadPhotoCaptures:
+            {
+            dlg = CLoadGenPhotoCaptureEditor::NewL( static_cast<CPhotoCapture*>(aItem)->Attributes(), ETrue );
+            break;
+            }
+        case ELoadGenCmdNewLoadBluetooth:
+            {
+            dlg = CLoadGenBluetoothEditor::NewL( static_cast<CBluetooth*>(aItem)->Attributes(), ETrue );
+            break;
+            }
+        case ELoadGenCmdNewLoadPointerEvent:
+            {
+            dlg = CLoadGenPointerEventEditor::NewL(static_cast<CPointerEvent*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        default:
+            {
+            User::Panic(_L("Wrong edit load"), 114);
+            break;
+            }
+        }
+
+    TBool dlgResult = dlg->RunQueryLD();
+
+    // set back title
+    if (iMainContainer)
+        iMainContainer->SetDefaultTitlePaneTextL();
+    
+    // change priority of the load item
+    aItem->SetPriority();
+
+    // resume execution the item
+    aItem->Resume();
+    
+    if (dlgResult)
+        RefreshViewL(EFalse);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::DoStartNewLoadL(TInt aCommand)
+    {
+    CLoadBase* item = NULL;
+    
+    switch ( aCommand )
+        {
+        case ELoadGenCmdNewLoadCPULoad:
+            {
+            if( iCpuLoadAttributes.iCpu == KCPUSelection_AllCPUs )
+                {
+                // Call this function recursively for all CPUs:
+                for( TUint i = 0; i < iCpuLoadAttributes.iCpuCount; ++i )
+                    {                    
+                    iCpuLoadAttributes.iCpu = i;
+                    DoStartNewLoadL(aCommand);
+                    }
+                // And finally set user selection back to "All CPUs"
+                iCpuLoadAttributes.iCpu = KCPUSelection_AllCPUs;
+                return;
+                }
+            else
+                {
+                item = CCPULoad::NewL(iCpuLoadAttributes, iReferenceNumber);
+                }
+            break;
+            }
+        case ELoadGenCmdNewLoadEatMemory:
+            {
+            item = CMemoryEat::NewL(iMemoryEatAttributes, iReferenceNumber);
+            break;
+            }
+        case ELoadGenCmdNewLoadPhoneCall:
+            {
+            item = CPhoneCall::NewL(iPhoneCallAttributes, iReferenceNumber);
+            break;
+            }
+        case ELoadGenCmdNewLoadNetConn:
+            {
+            item = CNetConn::NewL(iNetConnAttributes, iReferenceNumber);
+            break;
+            }
+        case ELoadGenCmdNewLoadKeyPress:
+            {
+            item = CKeyPress::NewL(iKeyPressAttributes, iReferenceNumber);
+            break;
+            }        
+        case ELoadGenCmdNewLoadMessages:
+            {
+            item = CMessages::NewL( iMessageAttributes, iReferenceNumber );
+            break;
+            }
+        case ELoadGenCmdNewLoadApplications:
+            {
+            iApplicationsAttributes.iAppsArray = ListOfAllAppsL();
+            item = CAppLauncher::NewL( iApplicationsAttributes, iReferenceNumber );            
+            break;
+            }
+        case ELoadGenCmdNewLoadPhotoCaptures:
+            {
+            item = CPhotoCapture::NewL( iPhotoCaptureAttributes, iReferenceNumber);
+            break;
+            }
+        case ELoadGenCmdNewLoadBluetooth:
+            {
+            item = CBluetooth::NewL( iBluetoothAttributes, iReferenceNumber);            
+            break;
+            }
+        case ELoadGenCmdNewLoadPointerEvent:
+            {
+            item = CPointerEvent::NewL(iPointerEventAttributes, iReferenceNumber);
+            break;
+            }
+            
+        default:
+            {
+            User::Panic(_L("Wrong new load"), 112);
+            break;
+            }
+        }
+    
+    iReferenceNumber++;
+
+    // add item to the array
+    AppendToLoadItemListL(item);
+
+    // update the listbox
+    RefreshViewL(EFalse);
+
+    // set item index to the end
+    iMainContainer->ListBox()->SetCurrentItemIndexAndDraw( iMainContainer->ListBox()->Model()->NumberOfItems()-1 );
+
+    // start the load
+    item->Resume();
+        
+    // refresh again
+    RefreshViewL(EFalse);    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+
+void CLoadGenModel::StopAllLoadItemsL()
+    {
+    DeleteAllLoadItems();
+    
+    RefreshViewL();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::SuspendAllLoadItemsL()
+    {
+    for (TInt i=0; i<LoadItemCount(); i++)
+        {
+        if ( iLoadItemList->At(i) )
+            {
+            iLoadItemList->At(i)->Suspend();
+            }
+        }
+        
+    RefreshViewL();    
+    }
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::ResumeAllLoadItemsL()
+    {
+    for (TInt i=0; i<LoadItemCount(); i++)
+        {
+        if ( iLoadItemList->At(i) )
+            {
+            iLoadItemList->At(i)->Resume();
+            }
+        }
+
+    RefreshViewL();    
+    }    
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::RefreshViewL(TBool aClearSelection)
+    {
+    if (iMainContainer && iDrawState == EDrawStateMain && iMainContainer->ListBox())
+        {
+        // clear selections if any
+        iMainContainer->ListBox()->ClearSelection();
+        
+        // set item index to 0
+        if (aClearSelection)
+            iMainContainer->ListBox()->SetCurrentItemIndex(0); 
+        
+        // set text items
+        iMainContainer->SetListBoxTextArrayL(GenerateListBoxItemTextArrayL());
+        }
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::AppendToLoadItemListL(CLoadBase* aItem)
+    {
+    if (iLoadItemList)
+        iLoadItemList->AppendL( aItem );
+    else
+        User::Leave(KErrNotReady);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::DeleteFromLoadItemListL(TInt aIndex)
+    {
+    if (iLoadItemList)
+        {
+        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
+            {
+            // first call delete on the item
+            if (iLoadItemList->At(aIndex))
+                {                                
+                delete iLoadItemList->At(aIndex);
+                iLoadItemList->At(aIndex) = NULL;
+                }
+            
+            // and them remove the array entry
+            iLoadItemList->Delete(aIndex);
+            iLoadItemList->Compress();
+            }
+        else
+            User::Leave(KErrNotFound);
+        }
+    else
+        User::Leave(KErrNotReady);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::SuspendOrResumeFromLoadItemListL(TInt aIndex)
+    {
+    if (iLoadItemList)
+        {
+        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
+            {
+            if (iLoadItemList->At(aIndex))
+                {
+                if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateRunning)
+                    {
+                    iLoadItemList->At(aIndex)->Suspend();
+                    }
+                else if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateSuspended)
+                    {
+                    iLoadItemList->At(aIndex)->Resume();
+                    }
+                }
+            }
+        else
+            User::Leave(KErrNotFound);
+        }
+    else
+        User::Leave(KErrNotReady);
+    }
+            
+// --------------------------------------------------------------------------------------------
+
+TInt CLoadGenModel::LoadItemCount() const
+    {
+    TInt count(0);
+    
+    if (iLoadItemList)
+        count = iLoadItemList->Count();
+    
+    return count;
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::DeleteAllLoadItems()
+    {
+    // call delete for each entry and free memory allocated for the array
+    for (TInt i=0; i<LoadItemCount(); i++)
+        {
+        if ( iLoadItemList->At(i) )
+            {            
+            delete iLoadItemList->At(i);
+            iLoadItemList->At(i) = NULL;
+            }
+        }
+        
+    iLoadItemList->Reset();    
+    }  
+          
+// --------------------------------------------------------------------------------------------
+
+CDesCArray* CLoadGenModel::GenerateListBoxItemTextArrayL()
+    {
+    CDesCArray* textArray = new(ELeave) CDesCArrayFlat(64);
+    CleanupStack::PushL(textArray);
+
+    _LIT(KEntryTemplateRedIcon,   "1\t%S\t\t");
+    _LIT(KEntryTemplateGreenIcon, "2\t%S\t\t");
+    
+    for (TInt i=0; i<LoadItemCount(); i++)
+        {
+        // add description from each entry
+        TBuf<256> textEntry;
+        TBuf<256> description = iLoadItemList->At(i)->Description();
+        
+        if (iLoadItemList->At(i)->State() == CLoadBase::ELoadStateRunning)
+            textEntry.Format(KEntryTemplateGreenIcon, &description);
+        else
+            textEntry.Format(KEntryTemplateRedIcon, &description);
+        
+        textArray->AppendL(textEntry);
+        }    
+    
+    CleanupStack::Pop(); //textArray
+    return textArray;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::ShowItemActionMenuL()
+    {
+    TInt currentItemIndex = iMainContainer->CurrentListBoxItemIndex();
+    
+    if (LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
+        {
+        // show a query dialog    
+        TInt queryIndex(0);
+        CAknListQueryDialog* listQueryDlg = new(ELeave) CAknListQueryDialog(&queryIndex);
+
+        if (listQueryDlg->ExecuteLD(R_ITEM_ACTION_QUERY))
+            {
+            // stop
+            if (queryIndex == EItemActionMenuTypeStop)
+                {
+                StopSelectedOrHighlightedItemsL();
+                }
+            
+            // suspend or resume
+            else if (queryIndex == EItemActionMenuTypeSuspendResume)
+                {
+                SuspendOrResumeSelectedOrHighlightedItemsL();
+                }
+                           
+            // edit
+            else if (queryIndex == EItemActionMenuTypeEdit)
+                {
+                EditLoadL(iLoadItemList->At(currentItemIndex));
+                }
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::StopSelectedOrHighlightedItemsL()
+    {
+    const CArrayFix<TInt>* selectionIndexes = iMainContainer->ListBoxSelectionIndexes();
+
+    TInt err(KErrNone);
+
+    // by default use selected items
+    if (selectionIndexes && selectionIndexes->Count() > 0)
+        {
+        CAknQueryDialog* query = CAknQueryDialog::NewL();
+        _LIT(KQueryMessage, "Stop %d selections?");
+        TFileName queryMsg;
+        queryMsg.Format(KQueryMessage, selectionIndexes->Count());
+        
+
+        if (query->ExecuteLD(R_GENERAL_CONFIRMATION_QUERY, queryMsg))
+            {
+            TInt deleteIndexCounter(0);
+            TInt ref(0);
+            TKeyArrayFix key(0, ECmpTUint16);
+            TInt index(0);
+            
+            TInt loadCount = LoadItemCount();
+
+            for (TInt i=0; i<loadCount; i++)
+                {
+                ref = i;
+
+                if (selectionIndexes->Find(ref, key, index) == 0)  
+                    {
+                    TRAP(err, DeleteFromLoadItemListL(i-deleteIndexCounter));
+                    deleteIndexCounter++; // amount of indexes decreases after each delete
+                    }
+                }
+            
+            RefreshViewL();
+            User::LeaveIfError(err);
+            }
+        }
+    
+    // or if none selected, use the current item index
+    else
+        {
+        TInt currentItemIndex = iMainContainer->CurrentListBoxItemIndex();
+        
+        if (LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
+            {
+            CAknQueryDialog* query = CAknQueryDialog::NewL();
+           _LIT(KQueryMessage, "Stop hightlighted item?");
+
+            if (query->ExecuteLD(R_GENERAL_CONFIRMATION_QUERY, KQueryMessage))
+                {
+                TRAP(err, DeleteFromLoadItemListL(currentItemIndex));
+                
+                RefreshViewL();
+                User::LeaveIfError(err);
+                }
+            }
+        }  
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::SuspendOrResumeSelectedOrHighlightedItemsL()
+    {
+    const CArrayFix<TInt>* selectionIndexes = iMainContainer->ListBoxSelectionIndexes();
+
+    // by default use selected items
+    if (selectionIndexes && selectionIndexes->Count() > 0)
+        {
+        TInt ref(0);
+        TKeyArrayFix key(0, ECmpTUint16);
+        TInt index(0);
+
+        for (TInt i=0; i<LoadItemCount(); i++)
+            {
+            ref = i;
+
+            if (selectionIndexes->Find(ref, key, index) == 0)  
+                {
+                SuspendOrResumeFromLoadItemListL(i);
+                }
+            }
+        
+        RefreshViewL(EFalse);
+        }
+    
+    // or if none selected, use the current item index
+    else
+        {
+        TInt currentItemIndex = iMainContainer->CurrentListBoxItemIndex();
+        
+        if (LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
+            {
+            SuspendOrResumeFromLoadItemListL(currentItemIndex);
+            
+            RefreshViewL(EFalse);
+            }
+        }  
+    }                                
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::LoadSettingsL()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenModel::SaveSettingsL()
+    {
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TInt CLoadGenModel::LaunchSettingsDialogL()
+    {
+    return 0;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CDesCArray* CLoadGenModel::ListOfAllAppsL()
+    {
+    const TInt KMaxAppsArraySize=250;
+    RApaLsSession ls;
+    CleanupClosePushL(ls);
+
+    User::LeaveIfError( ls.Connect() );
+    CDesCArray* allAppsArray = new(ELeave) CDesCArrayFlat( KMaxAppsArraySize );
+    CleanupStack::PushL( allAppsArray );
+    // reset the apps list
+    allAppsArray->Reset();
+
+    // search all apps
+    TApaAppInfo appInfo;
+    User::LeaveIfError(ls.GetAllApps());
+
+
+    while ( ls.GetNextApp( appInfo ) == KErrNone )
+        {
+        allAppsArray->AppendL( appInfo.iFullName );      
+        }
+    CleanupStack::Pop( allAppsArray );
+    CleanupStack::PopAndDestroy( &ls );
+   
+
+    // remove loadgen.* from the list
+    for ( TInt i = 0; i < allAppsArray->MdcaCount(); i++ )
+        {
+        if ( allAppsArray->MdcaPoint(i).FindF( _L("\\loadgen.") ) != KErrNotFound )
+            {
+            allAppsArray->Delete(i);
+            allAppsArray->Compress();
+            break;
+            }
+        }
+
+    // sort the elements
+    allAppsArray->Sort();
+
+    return allAppsArray; // ownership transferred
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/avkon/src/loadgen_settingsviewdlg.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,323 @@
+/*
+* 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 FILES
+#include "loadgen_settingsviewdlg.h"
+#include "loadgen_model.h"
+#include "loadgen.hrh"
+#include "loadgen_std.h"
+#include <loadgen.rsg>
+
+#include <aknsettingitemlist.h>
+#include <CAknMemorySelectionSettingItem.h> 
+#include <aknlists.h>
+#include <akntitle.h>
+#include <aknnavi.h>
+#include <aknnavide.h>
+#include <StringLoader.h>
+#include <aknnotewrappers.h> 
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CLoadGenSettingsViewDlg* CLoadGenSettingsViewDlg::NewL(TLoadGenSettings& aSettings)
+    {
+    CLoadGenSettingsViewDlg* self = new(ELeave) CLoadGenSettingsViewDlg(aSettings);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenSettingsViewDlg::~CLoadGenSettingsViewDlg()
+    {
+    // restore default navi pane
+    if (iNaviContainer)
+        iNaviContainer->Pop();
+    
+    if (iSettingItemArray)
+        {
+        iSettingItemArray->ResetAndDestroy();
+        delete iSettingItemArray; 
+        }
+    
+    delete iDecoratedTabGroup;   
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CLoadGenSettingsViewDlg::CLoadGenSettingsViewDlg(TLoadGenSettings& aSettings) : iSettings(aSettings)
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::ConstructL()
+    {
+    // construct a menu bar
+    CAknDialog::ConstructL(R_LOADGEN_SETTINGS_MENUBAR);
+   
+    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
+    
+    // set empty navi pane label
+    iNaviContainer = static_cast<CAknNavigationControlContainer*>(sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)));
+    //iNaviContainer->PushDefaultL();
+    
+    // set title text
+    CAknTitlePane* tp = static_cast<CAknTitlePane*>( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    tp->SetTextL( _L("Settings") );
+    
+    // create a tab group
+    iDecoratedTabGroup = iNaviContainer->CreateTabGroupL(this);
+    iTabGroup = static_cast<CAknTabGroup*>(iDecoratedTabGroup->DecoratedControl());
+    iTabGroup->SetTabFixedWidthL(KTabWidthWithTwoLongTabs); 
+    
+    // add tabs
+    //iTabGroup->AddTabL(ETabGeneral, _L("General"));
+    //iTabGroup->AddTabL(ETabScreenShot, _L("Screen shot"));
+    //iTabGroup->SetActiveTabByIndex(ETabGeneral);
+    
+    iNaviContainer->PushL( *iDecoratedTabGroup );
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+    {
+    switch (aEventType)
+        {
+        case EEventEnterKeyPressed:
+        case EEventItemDoubleClicked:
+            ShowSettingPageL(EFalse);
+            break;
+        default:
+            break;
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::TabChangedL(TInt /*aIndex*/)
+    {
+    iListBox->SetCurrentItemIndex(0);
+
+    SetVisibilitiesOfSettingItemsL();   
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::ProcessCommandL(TInt aCommandId)
+    {
+    CAknDialog::ProcessCommandL(aCommandId);
+
+    switch (aCommandId)
+        {
+        case ELoadGenCmdSettingsChange:
+            ShowSettingPageL(ETrue);
+            break;
+        case ELoadGenCmdSettingsExit:
+            TryExitL(EAknCmdExit);
+            break;
+        default:
+            break;
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TKeyResponse CLoadGenSettingsViewDlg::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+    if (iTabGroup == NULL)
+        {
+        return EKeyWasNotConsumed;
+        }
+
+    TInt active = iTabGroup->ActiveTabIndex();
+    TInt count = iTabGroup->TabCount();
+
+    switch ( aKeyEvent.iCode )
+        {
+        case EKeyLeftArrow:
+            if (active > 0)
+                {
+                active--;
+                iTabGroup->SetActiveTabByIndex(active);
+                TabChangedL(active); 
+                }
+            break;
+        
+        case EKeyRightArrow:
+            if((active + 1) < count)
+                {
+                active++;
+                iTabGroup->SetActiveTabByIndex(active);
+                TabChangedL(active); 
+                }
+            break;
+        }
+
+    return CAknDialog::OfferKeyEventL(aKeyEvent, aType);
+    }    
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::PreLayoutDynInitL()
+    {
+    iListBox = static_cast<CAknSettingStyleListBox*>( Control(ELoadGenSettingItemList) );
+    iListBox->SetMopParent(this);
+    iListBox->CreateScrollBarFrameL(ETrue);
+    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
+    iListBox->SetListBoxObserver(this);
+
+    iSettingItemArray = new(ELeave) CAknSettingItemArray(16, EFalse, 0);
+
+    CTextListBoxModel* model = iListBox->Model();
+    model->SetItemTextArray(iSettingItemArray);
+    model->SetOwnershipType(ELbmDoesNotOwnItemArray);
+
+    UpdateListBoxL();    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+TBool CLoadGenSettingsViewDlg::OkToExitL(TInt aButtonId)
+    {
+    return CAknDialog::OkToExitL(aButtonId);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::ShowSettingPageL(TInt aCalledFromMenu)
+    {
+    TInt listIndex = iListBox->CurrentItemIndex();
+    TInt realIndex = iSettingItemArray->ItemIndexFromVisibleIndex(listIndex);
+    CAknSettingItem* item = iSettingItemArray->At(realIndex);
+    item->EditItemL(aCalledFromMenu);
+    item->StoreL();
+    SetVisibilitiesOfSettingItemsL();
+    DrawNow();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::SetVisibilitiesOfSettingItemsL()
+    {
+    if (iSettingItemArray->Count() > 0)
+        {
+/*
+        switch (iTabGroup->ActiveTabIndex())
+            {
+
+            case ETabGeneral:
+                {
+                ((*iSettingItemArray)[ESettingListDisplayModeSelection])->SetHidden(EFalse);
+                ((*iSettingItemArray)[ESettingListFileViewModeSelection])->SetHidden(EFalse);
+                break;
+                }
+            
+            case ETabScreenShot:
+                {
+                ((*iSettingItemArray)[ESettingListDisplayModeSelection])->SetHidden(ETrue);
+                ((*iSettingItemArray)[ESettingListFileViewModeSelection])->SetHidden(ETrue);
+                break;            
+                }
+
+            default:
+                User::Panic(_L("TabIOOB"), 50);
+                break;
+            }
+*/
+        iSettingItemArray->RecalculateVisibleIndicesL();
+        iListBox->HandleItemAdditionL();
+        iListBox->UpdateScrollBarsL();
+        }
+    }   
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::UpdateListBoxL()
+    {
+    iSettingItemArray->ResetAndDestroy();
+
+/* 
+    // create items
+    TInt ordinal(0);
+
+    AddSettingItemL(ESettingListDisplayModeSelection,
+                    R_DISPLAYMODESELECTION_SETTING_TITLE,
+                    R_DISPLAYMODESELECTION_SETTING_PAGE,
+                    R_DISPLAYMODESELECTION_SETTING_TEXTS,
+                    ordinal++);
+                    
+    AddSettingItemL(ESettingListFileViewModeSelection,
+                    R_FILEVIEWMODESELECTION_SETTING_TITLE,
+                    R_FILEVIEWMODESELECTION_SETTING_PAGE,
+                    R_FILEVIEWMODESELECTION_SETTING_TEXTS,
+                    ordinal++); 
+*/                                                              
+    SetVisibilitiesOfSettingItemsL(); 
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CLoadGenSettingsViewDlg::AddSettingItemL(TInt aId,
+                                                 TInt aTitleResource,
+                                                 TInt aSettingPageResource,
+                                                 TInt aAssociatedResource,
+                                                 TInt aOrdinal)
+    {
+    // create a setting item
+    CAknSettingItem* settingItem = NULL;
+    
+    switch (aId)
+        {
+/*
+        case ESettingListDisplayModeSelection:
+            settingItem = new(ELeave) CAknEnumeratedTextPopupSettingItem(aId, iSettings.iDisplayMode);
+            break;
+            
+        case ESettingListFileViewModeSelection:
+            settingItem = new(ELeave) CAknEnumeratedTextPopupSettingItem(aId, iSettings.iFileViewMode);
+            break;
+
+        default:
+            User::Panic(_L("NotSetItem"), 50);
+            break;
+*/
+        }
+        
+    CleanupStack::PushL(settingItem);
+
+    // get title text
+    HBufC* itemTitle = StringLoader::LoadLC(aTitleResource);
+
+    // construct the setting item
+    settingItem->ConstructL(EFalse, aOrdinal, *itemTitle, NULL, aSettingPageResource,
+                            EAknCtPopupSettingList, NULL, aAssociatedResource);
+
+    // append the setting item to settingitem array
+    iSettingItemArray->InsertL(aOrdinal, settingItem);
+
+    CleanupStack::PopAndDestroy(); //itemTitle
+    CleanupStack::Pop(); //settingItem
+    }
+
+// --------------------------------------------------------------------------------------------
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/hb.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,110 @@
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+# Contributors:
+# Description:
+TEMPLATE = app
+TARGET = LoadGen
+DEPENDPATH += .
+INCLUDEPATH += . \
+    /inc
+INCLUDEPATH += ./inc \
+    ../../engine/inc
+load(hb.prf)
+symbian:CONFIG -= symbian_i18n
+HEADERS += inc/mainview.h \
+    inc/settingsview.h \
+    inc/notifications.h \
+	inc/loadgenlistitem.h \
+	inc/loadgenloaditem.h 
+SOURCES += src/main.cpp \
+    src/mainview.cpp \
+    src/settingsview.cpp \
+    src/notifications.cpp \
+	src/loadgenlistitem.cpp \ 
+	src/loadgenloaditem.cpp 
+RESOURCES += loadgen.qrc
+symbian: { 
+    MMP_RULES -= PAGED
+  	MMP_RULES *= UNPAGEDDATA
+  	MMP_RULES += SMPSAFE
+    BLD_INF_RULES.prj_exports += "./rom/loadgen.iby CORE_IBY_EXPORT_PATH(tools,loadgen.iby)"
+    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+    INCLUDEPATH += /epoc32/include/mw/http
+    HEADERS += inc/engine.h \
+        inc/enginewrapper.h
+    SOURCES += src/engine.cpp \
+        src/enginewrapper.cpp \
+        ../../engine/src/loadgen_utils.cpp \
+        ../../engine/src/loadgen_loadbase.cpp \
+        ../../engine/src/loadgen_cpuload.cpp \
+        ../../engine/src/loadgen_memoryeat.cpp \
+        ../../engine/src/loadgen_phonecall.cpp \
+        ../../engine/src/loadgen_keypress.cpp \
+        ../../engine/src/loadgen_messages.cpp \
+        ../../engine/src/loadgen_applications.cpp \
+        ../../engine/src/loadgen_photocapture.cpp \
+        ../../engine/src/loadgen_bluetooth.cpp \
+        ../../engine/src/loadgen_pointerevent.cpp \
+        ../../engine/src/loadgen_netconn.cpp \
+        ../../engine/src/loadgen_httpreceiver.cpp
+    RSS_RULES += "group_name = \"RnD Tools\"";
+    LIBS += -leuser \
+        -lcommonengine \
+        -lapparc \
+        -lcone \
+        -leikcore \
+        -leikcoctl \
+        -leikctl \
+        -leikdlg \
+        -lws32 \
+        -lapgrfx \
+        -lefsrv \
+        -lbafl \
+        -lgdi \
+        -legul \
+        -letel3rdparty \
+        -lcommdb \
+        -lflogger \
+        -lestor \
+        -lmsgs \
+        -lsmcm \
+        -lgsmu \
+        -letext \
+        -lsendas2 \
+        -lecam \
+        -lfeatdiscovery \
+        -lcentralrepository \
+        -lesock \
+        -lbluetooth \
+        -lhal \
+        -lhttp \
+        -linetprotutil
+    TARGET.CAPABILITY = swevent \
+        ReadUserData \
+        WriteUserData \
+        NetworkServices \
+        UserEnvironment \
+        CAP_APPLICATION \
+        AllFiles
+    TARGET.UID2 = 0x100039CE
+    TARGET.UID3 = 0x20011384
+    // TARGET.SID = 0x20011384
+    TARGET.VID = 0x101FB657 \
+        // \
+        Nokia
+    TARGET.EPOCHEAPSIZE = 0x10000 \
+        0x1000000 \
+        // \
+        Min \
+        64Kb, \
+        Max \
+        16Mb
+    ICON = ../../icons/LoadGen_application_icon_svgt.svg
+}
+else:error("Only Symbian supported!")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/hb_.mmp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,95 @@
+// ==============================================================================
+// Generated by qmake (2.01a) (Qt 4.7.0) on: 2010-08-17T10:36:03
+// This file is generated by qmake and should not be modified by the
+// user.
+//  Name        : hb.mmp
+// ==============================================================================
+
+TARGET		LoadGen.exe
+TARGETTYPE		EXE
+
+UID		 
+SECUREID		0
+
+
+SOURCEPATH			. 
+LANG SC 
+START RESOURCE		LoadGen.rss
+HEADER
+TARGETPATH			/resource/apps
+END
+
+SOURCEPATH			.
+START RESOURCE		LoadGen_reg.rss
+DEPENDS LoadGen.rsg
+TARGETPATH		/private/10003a3f/import/apps
+END
+
+
+// Qt Macros
+MACRO		UNICODE
+MACRO		QT_KEYPAD_NAVIGATION
+MACRO		QT_SOFTKEYS_ENABLED
+MACRO		QT_USE_MATH_H_FLOATS
+MACRO		HB_HAVE_QT_MOBILITY
+MACRO		HB_HAVE_PROTECTED_CHUNK
+MACRO		HB_TOUCHFEEDBACK_TYPE_IS_LONGPRESS
+MACRO		HB_GESTURE_FW
+MACRO		HB_EFFECTS
+MACRO		HB_TEXT_MEASUREMENT_UTILITY
+MACRO		HB_HAVE_QT_MOBILITY
+MACRO		HB_HAVE_PROTECTED_CHUNK
+MACRO		HB_TOUCHFEEDBACK_TYPE_IS_LONGPRESS
+MACRO		HB_GESTURE_FW
+MACRO		HB_EFFECTS
+MACRO		HB_TEXT_MEASUREMENT_UTILITY
+
+SYSTEMINCLUDE		../../../sf/mw/qt/mkspecs/common/symbian/stl-off
+SYSTEMINCLUDE		../../../sf/mw/qt/mkspecs/common/symbian
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/stdapis
+SYSTEMINCLUDE		/epoc32/include/stdapis/sys
+SYSTEMINCLUDE		/epoc32/include/mw
+SYSTEMINCLUDE		/epoc32/include/platform/mw
+SYSTEMINCLUDE		/epoc32/include/platform
+SYSTEMINCLUDE		/epoc32/include/platform/loc
+SYSTEMINCLUDE		/epoc32/include/platform/mw/loc
+SYSTEMINCLUDE		/epoc32/include/platform/loc/sc
+SYSTEMINCLUDE		/epoc32/include/platform/mw/loc/sc
+SYSTEMINCLUDE		.
+SYSTEMINCLUDE		../../../inc
+SYSTEMINCLUDE		inc
+SYSTEMINCLUDE		../../engine/inc
+SYSTEMINCLUDE		/epoc32/include/mw/hb/hbcore
+SYSTEMINCLUDE		/epoc32/include/mw/hb/hbwidgets
+SYSTEMINCLUDE		/epoc32/include/mw/hb/hbutils
+
+
+LIBRARY		HbCore.lib
+LIBRARY		HbWidgets.lib
+LIBRARY		HbUtils.lib
+LIBRARY		libc.lib
+LIBRARY		libm.lib
+LIBRARY		euser.lib
+LIBRARY		libdl.lib
+
+CAPABILITY		None
+
+OPTION CW -cwd include
+OPTION ARMCC --visibility_inlines_hidden
+#if defined(ARMCC_4_0)
+OPTION ARMCC --import_all_vtbl
+#endif
+OPTION GCCE -fvisibility-inlines-hidden
+
+VERSION 10.0
+
+ARMFPU softvfp
+
+PAGED
+
+BYTEPAIRCOMPRESSTARGET
+
+OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl
+
+USERINCLUDE .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/inc/engine.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,169 @@
+/*
+* 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 LOADGEN_MODEL_H
+#define LOADGEN_MODEL_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <apgcli.h>
+
+#include "loadgen_loadattributes.h"
+#include "loadgen_loadbase.h"
+
+// FORWARD DECLARATIONS
+class EngineWrapper;
+class MainView;
+class CLoadGenGraphsContainer;
+class CEikonEnv;
+//class CLoadBase;
+
+
+typedef CArrayFixSeg<CLoadBase*> CLoadItemList;
+
+const TUint KMaxCPUs = 4;
+
+// CLASS DECLARATIONS
+
+class TLoadGenSettings
+    {
+public:
+    };
+
+class CEngine : public CActive
+    {
+private:
+	enum TLoadOperation
+		{
+		EEditLoad = 0,
+		ESuspResLoad,
+		EStopLoad
+		};
+	
+    enum TContainerDrawState
+        {
+        EDrawStateInvalid = -1,
+        EDrawStateMain
+        };
+
+public:
+    static CEngine* NewL(EngineWrapper *aEngineWrapper);
+    ~CEngine();
+    void ActivateEngineL();
+    void DeActivateEngineL();
+	void LaunchPerfMonL();
+    void EditLoadL(TInt aIndex);
+	void ExistingLoadEditedL();
+	void ExistingLoadEditCancelled();
+	
+private:
+    void RunL();
+    void DoCancel();
+        
+private:
+    CEngine();
+    void ConstructL(EngineWrapper *aEngineWrapper);
+    void LoadSettingsL();
+    void AppendToLoadItemListL(CLoadBase* aItem);
+    void DeleteFromLoadItemListL(TInt aIndex);
+    void SuspendOrResumeFromLoadItemListL(TInt aIndex);
+    void DeleteAllLoadItems();
+    void RefreshViewL(TBool aClearSelection=ETrue);
+    CDesCArray* ListOfAllAppsL();    
+    
+    static TInt AsyncRunLoadOperation( TAny* aObject );
+    
+public:
+    void AsyncRunLoadOperationL();
+    void AsyncSuspRes();
+    void AsyncStopLoad( const CArrayFix<TInt>* aSelectionIndexes );
+    void AsyncEditLoad();
+    
+    void StopAllLoadItemsL();
+    void SuspendAllLoadItemsL();
+    void ResumeAllLoadItemsL();
+            
+    TInt LoadItemCount() const;
+    void StopSelectedOrHighlightedItemsL(const CArrayFix<TInt>* aSelectionIndexes);
+    void SuspendOrResumeSelectedOrHighlightedItemsL();
+
+    CDesCArray* GenerateListBoxItemTextArrayL();
+    void StartNewLoadL(TInt aCommand);
+	void DoStartNewLoadL(TInt aCommand);
+    void SaveSettingsL();
+    TInt LaunchSettingsDialogL();
+	TCPULoadAttributes GetCPULoadAttributes();
+	TMemoryEatAttributes GetMemoryEatAttributes();
+	TPhoneCallAttributes GetPhoneCallAttributes();
+	TNetConnAttributes GetNetConnAttributes();
+	TKeyPressAttributes GetKeyPressAttributes();
+	TMessageAttributes GetMessageAttributes();
+	TApplicationsAttributes GetApplicationsAttributes();
+	TPhotoCaptureAttributes GetPhotoCaptureAttributes();
+	TBluetoothAttributes    GetBluetoothAttributes();
+	TPointerEventAttributes GetPointerEventAttributes();
+	void ChangeCPULoadAttributes(const TCPULoadAttributes& aAttributes); 
+	void ChangeMemoryEatAttributes(const TMemoryEatAttributes& aAttributes);
+	void ChangePhoneCallAttributes(const TPhoneCallAttributes& aAttributes);
+	void ChangeNetConnAttributes(const TNetConnAttributes& aAttributes);
+	void ChangeKeyPressAttributes(const TKeyPressAttributes& aAttributes);
+	void ChangeMessageAttributes(const TMessageAttributes& aAttributes);
+	void ChangeApplicationsAttributes(const TApplicationsAttributes& aAttributes);
+	void ChangePhotoCaptureAttributes(const TPhotoCaptureAttributes& aAttributes);
+	void ChangeBluetoothAttributes(const TBluetoothAttributes& aAttributes);
+	void ChangePointerEventAttributes(const TPointerEventAttributes& aAttributes);
+	
+    inline TLoadGenSettings& Settings() { return iSettings; }
+    inline CEikonEnv* EikonEnv() 		{ return iEnv; }
+    inline RApaLsSession& LsSession() 	{ return iLs; }
+    inline TBool LoadItemsExists() 		{ return iLoadItemList->Count() > 0; } 
+
+
+private:
+    RTimer                  iTimer;
+    CEikonEnv*              iEnv;
+    TLoadGenSettings        iSettings;
+    RApaLsSession           iLs;
+    CLoadItemList*          iLoadItemList;
+    TInt                    iReferenceNumber;
+    TCPULoadAttributes      iCpuLoadAttributes;
+    TMemoryEatAttributes    iMemoryEatAttributes;
+    TPhoneCallAttributes    iPhoneCallAttributes;
+    TNetConnAttributes      iNetConnAttributes;
+    TKeyPressAttributes     iKeyPressAttributes;
+    TMessageAttributes      iMessageAttributes;
+    TApplicationsAttributes	iApplicationsAttributes;
+    TPhotoCaptureAttributes iPhotoCaptureAttributes;
+    TBluetoothAttributes    iBluetoothAttributes;
+    TPointerEventAttributes iPointerEventAttributes;
+	EngineWrapper*          iEngineWrapper; // used for communicating between QT and Symbian
+	TInt 					iCurrentItemIndex;
+	TBool                   iEditExistingLoad;
+	CLoadBase::TLoadState   iLoadStatusBeforeEdit;
+	
+	CAsyncCallBack iAsyncRunLoadOperation;
+
+	TInt iLoadOperation;
+	const CArrayFix<TInt>* iSelectionIndexes;
+	
+    };
+ 
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/inc/enginewrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,293 @@
+/*
+* 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 ENGINEWRAPPER_H
+#define ENGINEWRAPPER_H
+
+#include <e32std.h>
+#include <e32base.h>
+#include <badesca.h>
+#include <engine.h>
+#include "loadgen.hrh"
+
+#include <QObject>
+
+class HbMainWindow;
+class HbAction;
+class MainView; 
+class SettingsView;
+class CPULoadAttributes;
+class MemoryEatAttributes;
+class PhoneCallAttributes;
+class NetConnAttributes;
+class KeyPressAttributes;
+class PointerEventAttributes;
+class MessageAttributes;
+class ApplicationsAttributes;
+class PhotoCaptureAttributes;
+class BluetoothAttributes;
+
+/**
+ * class that is used for communicating between Symbian and Qt code.
+ */
+class EngineWrapper : public QObject
+ { 
+	Q_OBJECT
+
+public:
+    
+    /**
+     * Constructor
+     */
+    EngineWrapper(HbMainWindow &mainWindow, MainView &mainView);
+    
+    /**
+     * Destructor
+     */
+    ~EngineWrapper();
+    
+    /**
+     * Initializes Engine Wrapper
+     * @return true if engine was started successfully
+     */
+    bool init();
+		
+public slots:
+    void StopLoadYesNoDialogClosed(HbAction *action);
+    void StopAllLoadsYesNoDialogClosed(HbAction *action);
+	void loadAddedOrEdited(TLoadGenCommandIds cmdId);
+	void loadSettingsCanclled();	
+
+public:
+
+	/* Functions that are called from UI: */
+    
+	/**
+	* Start new load
+	*/
+	bool startNewLoad(int commandId);
+
+	/**
+	* Launch Performance Monitor application.
+	*/
+	void launchPerfMonApp();
+	
+	/**
+	* Edit operation for load settings
+	*/
+	void loadEdit(int rowIndex);
+	
+	/**
+	* CPU load attributes
+	*/
+	CPULoadAttributes getCpuLoadAttributes();
+	
+	/**
+	* Memory eat attributes
+	*/
+	MemoryEatAttributes getMemoryEatAttributes();
+
+	/**
+	* Phone call attributes
+	*/
+	PhoneCallAttributes getPhoneCallAttributes();
+	
+	/**
+	* Network connection attributes
+	*/
+	NetConnAttributes getNetConnAttributes();
+	
+	/**
+	* Key presses attributes
+	*/
+	KeyPressAttributes getKeyPressAttributes();
+
+	/**
+	* Pointer event attributes
+	*/
+	PointerEventAttributes getPointerEventAttributes();
+	
+	/**
+	* Message attributes
+	*/
+	MessageAttributes getMessageAttributes();
+	
+	/**
+	* Applications attributes
+	*/
+	ApplicationsAttributes getApplicationsAttributes();
+	
+	/**
+	* Photo capture attributes
+	*/
+	PhotoCaptureAttributes getPhotoCaptureAttributes();
+	
+	/**
+	* BT attributes
+	*/
+	BluetoothAttributes getBluetoothAttributes();
+	
+	/**
+	* Set attributes for CPU load
+	*/
+	void setCpuLoadAttributes(const CPULoadAttributes& attributes);
+	
+	/**
+	* Set attributes for memory eat
+	*/
+	void setMemoryEatAttributes(const MemoryEatAttributes& attributes);
+
+	/**
+	* Set attributes for phone call
+	*/	
+	void setPhoneCallAttributes(const PhoneCallAttributes& attributes);
+
+	/**
+	* Set attributes for network connection
+	*/		
+	void setNetConnAttributes(const NetConnAttributes& attributes);
+	
+	/**
+	* Set attributes for key presses
+	*/
+	void setKeyPressAttributes(const KeyPressAttributes& attributes);
+	
+	/**
+	* Set pointer event for messages
+	*/
+	void setPointerEventAttributes(const PointerEventAttributes& attributes);
+
+	/**
+	* Set message attributes
+	*/
+	void setMessageAttributes(const MessageAttributes& attributes);
+	
+	/**
+	* Set applications attributes
+	*/
+	void setApplicationsAttributes(const ApplicationsAttributes& attributes);
+	
+	/**
+	* Set photo capture attributes
+	*/
+	void setPhotoCaptureAttributes(const PhotoCaptureAttributes& attributes);
+	
+	/**
+	* Set BT attributes
+	*/	
+	void setBluetoothAttributes(const BluetoothAttributes& attributes);
+	
+	/**
+	* Stop load
+	*/
+	bool stopLoad(bool stopAll);
+	
+	/**
+	* Resume all loads
+	*/ 
+	void resumeAllLoadItems();
+
+	/**
+	* Suspend all loads
+	*/ 	
+	void suspendAllLoadItems();
+	
+	/**
+	 * asynchronous call of suspend or resume selected/highlighted item from load list.
+	 */
+	void asyncSuspendOrResumeSelectedOrHighlightedItems();
+	
+	/**
+	 * asynchronous call stop load.
+	 */
+	void asyncStopLoad();
+	
+	/**
+	* Suspend or resume selected/highlighted item from load list.
+	*/
+	void suspendOrResumeSelectedOrHighlightedItems();
+    
+public:
+
+    /* Functions that are called from engine: */
+    
+	/** 
+     * uses Notifications class to show error message 
+     */
+    void ShowErrorMessage(const TDesC& aErrorMessage);
+
+    /**
+	* uses Notifications class to show user note
+	*/
+	void ShowNote(const TDesC& aNoteMessage);
+	
+	/**
+	* Query item index
+	* @return selected row in load list view
+	*/
+	TInt QueryCurrentItemIndex();
+	
+	/**
+	* selected indexes
+	*/
+	const CArrayFix<TInt>*  QueryListSelectedIndexesOrCurrentItemL();
+
+	/**
+	* Open settings for load.
+	*/
+	void OpenLoadSettings(TInt loadType, bool editExistingLoad);
+	
+	void ReFreshView(CDesCArray* aTextArray);
+	/**
+	* Clear load list selection(s) in Ui
+	*/
+	void ClearSelection();
+	
+	/**
+	* Set current index in load list
+	*/
+	void SetCurrentItemIndex(TInt aIndex);
+	
+public: 
+	inline MainView& ViewReference() { return mMainView; };	
+	inline HbMainWindow& WindowReference() { return mMainWindow; };
+	
+private:
+
+	enum LoadTypes {
+		Cpu,
+		EatMemory,
+		PhoneCalls,
+		Messages,
+		NWConnections,
+		KeyPresses,
+		Apps,
+		Photos,
+		BTAct,
+		PointerEvents
+	};
+    
+    
+    /* LoadGen engine */
+    CEngine* mEngine;
+    
+	MainView &mMainView;
+	HbMainWindow &mMainWindow;
+	bool mEditExistingLoad;
+};
+
+#endif //ENGINEWRAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/inc/loadgenlistitem.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,70 @@
+/*
+ * LoadGenListItem.h
+ *
+ *  Created on: Jul 29, 2010
+ *      Author: sopirbo
+ */
+
+#ifndef LOADGENLISTITEM_H_
+#define LOADGENLISTITEM_H_
+
+#include "enginewrapper.h"
+
+#include <hblistview.h>
+#include <HbListViewItem>
+
+#include <QGraphicsWidget>
+#include <QtGlobal>
+
+class HbAbstractViewItem;
+class HbLabel;
+class HbPushButton;
+class HbWidget;
+
+class QGraphicsLinearLayout;
+class QModelIndex;
+class QGraphicsItem;
+class EngineWrapper;
+
+class LoadGenListItem : public HbListViewItem
+	{
+	Q_OBJECT
+public:
+	LoadGenListItem( EngineWrapper& engWrapp , QGraphicsItem *parent = 0 );
+	
+	//from HbListViewItem
+	virtual HbAbstractViewItem* createItem();
+	virtual void updateChildItems();
+	virtual ~LoadGenListItem();
+	
+	void LoadGenListItem::setTransientState(const QHash<QString, QVariant> &state);
+	QHash<QString, QVariant> LoadGenListItem::transientState() const;
+
+	void ChangeExpandedState();
+	
+signals:
+	
+	
+public slots:
+	void EditButtonClicked();
+	void StopButtonClicked();
+	void SuspendButtonClicked();
+private:
+	void init();
+	void initButtonLayout();
+	void initLayoutShort();
+
+private:
+	QGraphicsLinearLayout *hLayout;
+	QGraphicsLinearLayout *hButtonLayout;
+	QGraphicsLinearLayout *vLayout;
+	HbLabel *mItemText;
+	HbLabel *mIcon;
+	HbPushButton *mEditButton;
+	HbPushButton *mSuspendButton;
+	HbPushButton *mStopButton;
+	EngineWrapper& mEngineWrapper;
+	bool mExpanded;
+	};
+
+#endif /* LOADGENLISTITEM_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/inc/loadgenloaditem.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,34 @@
+/*
+ * LoadGenLoadItem.h
+ *
+ *  Created on: Aug 5, 2010
+ *      Author: sopirbo
+ */
+
+#ifndef LOADGENLOADITEM_H_
+#define LOADGENLOADITEM_H_
+
+#include <qstandarditemmodel.h>
+
+class LoadGenLoadItem : public QStandardItem
+	{
+public:
+	LoadGenLoadItem();
+	virtual ~LoadGenLoadItem();
+	
+	int type () const;
+	QVariant data(int role = Qt::UserRole + 1) const;
+	void setData(const QVariant &value, int role = Qt::UserRole + 1);
+	
+	bool getExpandedState();
+	void setExpanded( bool state );
+	
+	bool getSuspendedState();
+	void setSuspended( bool state );
+	
+private:
+	bool mExpanded;
+	bool mSuspended;
+	};
+
+#endif /* LOADGENLOADITEM_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/inc/mainview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MAINVIEW_H
+#define MAINVIEW_H
+
+#include "loadgenlistitem.h"
+#include "loadgenloaditem.h"
+#include <hbview.h>
+
+class EngineWrapper;
+class HbMainWindow;
+class HbApplication;
+class HbAction;
+class HbLabel;
+class HbProgressNote;
+class HbListView;
+class HbAbstractViewItem;
+
+class QStandardItemModel;
+class QSignalMapper;
+class QPointF;
+class LoadGenListItem;
+class LoadGenLoadItem;
+
+class MainView : public HbView
+{
+    Q_OBJECT
+    
+public:
+
+    MainView(HbMainWindow &mainWindow);
+	~MainView();
+	void init(HbApplication &app);
+	int currentItemIndex();
+	void setCurrentItemIndex(int index);
+	void clearListSelection();
+	void setLoadListData(QStringList& items);
+	QList<int> listSelectionIndexes();
+	
+private:
+    void createMenu(HbApplication &app);
+	void loadListIinit();
+	bool showItemActionPopup(int &index);
+	void loadListDelete();
+	bool stopLoad(bool stopAll /*, int selectedLoad = 0*/);
+   
+private slots:
+    void handleLoadListEvent(HbAbstractViewItem */*listViewItem*/, const QPointF &/*coords*/);
+    void ItemActionPopupClosed(HbAction* action );
+    void loadActionPopupClosed( HbAction* action );
+	void showAboutPopup();
+	void stopAllLoads();
+	void updateMenu();
+	void launchPerfMon();
+	void suspendAllLoads();
+	void resumeAllLoads();
+	void activated( const QModelIndex& );
+	void LoadEdit();
+	void NewLoad();
+	
+	/**
+	* calls engine wrapper to complete service request, specified by cmd.
+	*/
+	void executeMenuCommand(int cmd);
+    
+private:
+    HbMainWindow &mMainWindow;
+    EngineWrapper *mEngineWrapper;
+	HbListView *mListView;
+	QStandardItemModel *mListModel;
+	QSignalMapper *mSm;
+	bool mIsLoadListEmpty;
+	LoadGenListItem* mListItem;
+	LoadGenLoadItem* mLoadItem;
+	
+	HbAction *mActionAbout;
+	HbMenu   *mLoadSubMenu1;
+	HbMenu   *mLoadSubMenu2;
+	HbAction *mActionExit;
+	HbAction *mStopAll;
+	HbAction *mSuspendAll;	
+	HbAction *mResumeAll;	
+	HbAction *mActionPerfMon;
+	HbAction *mCpuLoadAction;
+	HbAction *mMemoryEatLoadAction;
+	HbAction *mPhoneCallLoadAction;
+	HbAction *mMessagesLoadAction;
+	HbAction *mNetConnLoadAction;
+	HbAction *mAppsLoadAction;
+	HbAction *mKeyPressLoadAction;
+	HbAction *mPhotoCapturesLoadAction;
+	HbAction *mBtActionsLoadAction;
+	HbAction *mPointerEventsLoadAction;
+	
+	QList<bool> mListItemExpanded;
+	int mPrevExpandedItem;
+};
+
+#endif // MAINVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/inc/notifications.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* 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 NOTIFICATIONS_H_
+#define NOTIFICATIONS_H_
+
+#include <hbmessagebox.h>
+
+
+class Notifications : public HbPopup
+    {
+
+	Q_OBJECT 	
+	
+public:
+    
+    /**
+     * shows about box
+     */
+    static void about();
+    
+    /** 
+     * shows error message 
+     */
+    static void error(const QString& errorMessage);
+	
+    /**
+     * shows global HbGlobalCommonNote type note
+     */
+	static void showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, HbPopup::DefaultTimeout timeout = HbPopup::ConfirmationNoteTimeout);
+    };
+
+
+
+#endif // NOTIFICATIONS_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/inc/settingsview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,253 @@
+/*
+* 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 SETTINGSVIEW_H
+#define SETTINGSVIEW_H
+
+#include <hbmainwindow.h>
+#include <hbview.h>
+#include "loadgen.hrh"
+
+class EngineWrapper;
+class HbDataFormModelItem;
+class HbDataFormModel;
+class HbDataForm;
+class HbDataFormViewItem;
+class HbRadioButtonList;
+
+class CPULoadAttributes
+    {
+public:
+    uint mId;        
+    uint mPriority;        
+    uint mMode;        
+    uint mType;        
+    uint mLength;        
+    uint mIdle;        
+    uint mRandomVariance;
+    int  mCpu;
+    uint mCpuCount;
+    };
+
+class MemoryEatAttributes
+    {
+public:
+    uint    mId;        
+    uint    mPriority;        
+    uint    mSource;        
+    uint    mType;
+    uint    mBuffer;
+    uint    mIdle;
+    qint64  mAmount;
+    qint64  mRandomMin;
+    qint64  mRandomMax;
+    QString mAmountDes;
+    QString mRandomMinDes;
+    QString mRandomMaxDes;
+    uint    mRandomVariance;        
+    }; 
+
+class PhoneCallAttributes
+    {
+public:
+    uint    mId;        
+    uint    mPriority;        
+    QString mDestination;
+    uint    mLength;        
+    uint    mIdle;        
+    uint    mRandomVariance;        
+    };
+	
+class NetConnAttributes
+    {
+public:
+    uint    mId;        
+    uint    mPriority;        
+    QString mDestination;
+    uint    mIdle;        
+    uint    mRandomVariance;        
+    };
+	
+class KeyPressAttributes
+    {
+public:
+    uint mId;        
+    uint mPriority;        
+    uint mHeartBeat;        
+    uint mRandomVariance;        
+    };	
+	
+class PointerEventAttributes
+    {
+public:
+    uint mId;        
+    uint mPriority;        
+    uint mHeartBeat;        
+    uint mRandomVariance;        
+    };
+
+class MessageAttributes
+    {
+public:
+    uint    mId;
+    int     mMessageType;
+    QString mDestination;
+    uint    mPriority; 
+    uint    mAmount;
+    int     mLength;    
+    uint    mIdle;    
+    uint    mRandomVariance;        
+    };
+
+class ApplicationsAttributes
+    {
+public:
+    uint        mId;        
+    uint        mPriority;
+    uint        mLaunchingInterval;
+    uint        mKeyPressType;
+    uint        mMaxOpen;
+    uint        mHeartBeat;
+    uint        mRandomVariance;
+    QStringList mAppsArray;
+
+    };
+
+
+class PhotoCaptureAttributes
+    {
+public:
+    uint mId;    
+    int  mPriority;
+    int  mCameraCount;
+    int  mCamera;
+    uint mIdle;    
+    uint mRandomVariance;        
+    };
+
+class BluetoothAttributes
+    {
+public:
+    uint mId;    
+    int mPriority;    
+    uint mIdle;    
+    uint mRandomVariance;        
+    bool mBluetoothSupported;
+    };
+	
+
+class SettingsView : public HbView
+{
+    Q_OBJECT
+    
+public:
+    SettingsView(HbView &mainView, HbMainWindow &parent, EngineWrapper &engine);
+    ~SettingsView();
+    void open(const QString &settingsName, TLoadGenCommandIds cmdId);
+
+signals:
+	void loadCompleted(TLoadGenCommandIds cmdId);
+	void loadCanclled();
+	
+private slots:
+   void backButtonPressed();
+   void okExit();
+   void cancelled();
+   void selectionChanged(int index);
+   void dataItemDisplayed(const QModelIndex &index);
+   
+private:
+    void createItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createCpuLoadItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createEatMemoryItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createPhoneCallItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createNetConnItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createKeyOrPointerItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createMessageItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createAppsItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createPhotoItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+	void createBtItems(HbDataFormModel *model, HbDataFormModelItem *parent);
+    void loadAttributes();
+    void saveSettings();
+	void saveCpuLoadSettings();
+	void saveEatMemorySettings();
+	void savePhoneCallSettings();
+	void saveNetConnSettings();
+	void saveKeyPressSettings();
+	void saveMessageSettings();
+	void savePointerEventSettings();
+	void saveApplicationsSettings();
+	void savePhotoSettings();
+	void saveBtSettings();
+    void exit();
+    void setDefaultSettings();
+	void setLoadAttributes();
+    
+private:
+    HbMainWindow &mMainWindow;
+    HbView &mMainView;
+    EngineWrapper &mEngineWrapper;
+	TLoadGenCommandIds mCmdId;
+
+    /* Setting form */
+    HbDataForm *mSettingForm;
+    
+    /* Model for Setting form */
+    HbDataFormModel *mModel;
+    
+    /* Components for the model: */   
+
+    /* grouped load settings */
+    HbDataFormModelItem *mLoadSettings;
+    
+    HbDataFormModelItem *mPriority;
+    HbDataFormModelItem *mLoadMode;
+	HbDataFormModelItem *mSource;
+    HbDataFormModelItem *mType;
+	HbDataFormModelItem *mAmount;
+	HbDataFormModelItem *mMinAmountToBeLeft;
+	HbDataFormModelItem *mMaxAmountToBeLeft;
+	HbDataFormModelItem *mBuffer;
+    HbDataFormModelItem *mLength;
+	HbDataFormModelItem *mDestination;
+	HbDataFormModelItem *mIdle;
+	HbDataFormModelItem *mHeartBeat;
+	HbDataFormModelItem *mRandomVar;
+	HbDataFormModelItem *mMaxParallelApps;
+	HbDataFormModelItem *mLaunchingInterval;
+	HbDataFormModelItem *mKeyPressType;
+	HbDataFormModelItem *mCamera;
+	HbDataFormModelItem *mCpu;
+	
+	HbRadioButtonList *mModes;
+	HbRadioButtonList *mTypes;
+	
+	/* load attributes for each load type*/
+	CPULoadAttributes      mCPULoadAttributes;
+	MemoryEatAttributes    mMemoryEatAttributes;
+	PhoneCallAttributes	   mPhoneCallAttributes;
+	NetConnAttributes	   mNetConnAttributes;
+	KeyPressAttributes     mKeyPressAttributes;
+	PointerEventAttributes mPointerEventAttributes;
+	MessageAttributes      mMessageAttributes;
+	ApplicationsAttributes mApplicationsAttributes;
+	PhotoCaptureAttributes mPhotoCaptureAttributes;
+	BluetoothAttributes    mBluetoothAttributes;
+};
+
+#endif // SETTINGSVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/loadgen.qrc	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,11 @@
+<RCC>
+    <qresource prefix="/" >
+        <file alias="loadgen.svg" >../../icons/qgn_menu_loadgen.svg</file>
+        <file alias="active.svg" >../../icons/qgn_prob_status_green.svg</file>
+        <file alias="paused.svg" >../../icons/qgn_prob_status_red.svg</file>
+        <file alias="cross.svg" >../../icons/mono_stop_all.svg</file>
+        <file alias="pause.svg" >../../icons/mono_suspend_all.svg</file>
+        <file alias="play.svg" >../../icons/mono_resume_all.svg</file>
+        <file alias="newload.svg" >../../icons/mono_new_load.svg</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/rom/loadgen.iby	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* 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 __LOADGEN_IBY__
+#define __LOADGEN_IBY__
+
+S60_APP_EXE(LoadGen)
+S60_APP_AIF_ICONS(LoadGen)
+S60_APP_RESOURCE(LoadGen)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,LoadGen_ExtraIcons)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,LoadGen)
+
+//#ifdef S60_UPGRADABLE_APP_REG_RSC
+//  S60_UPGRADABLE_APP_REG_RSC(LoadGen)
+//#else
+//  S60_APP_AIF_RSC(LoadGen)
+//#endif
+
+data=ZPRIVATE\10003a3f\import\APPS\LoadGen_reg.RSC Private\10003a3f\import\Apps\LoadGen_reg.rsc
+
+data=ZPRIVATE\20011384\backup_registration.xml        	private\20011384\backup_registration.xml
+data=ZSYSTEM\Install\LoadGen_stub.sis                   \system\install\LoadGen_stub.sis
+
+#endif // __LOADGEN_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/engine.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1282 @@
+/*
+* 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 FILES
+#include "engine.h"
+#include "enginewrapper.h"
+#include "settingsview.h"
+#include "loadgen_utils.h"
+#include "loadgen_cpuload.h"
+#include "loadgen_memoryeat.h"
+#include "loadgen_phonecall.h"
+#include "loadgen_netconn.h"
+#include "loadgen_keypress.h"
+#include "loadgen_pointerevent.h"
+#include "loadgen_messages.h"
+#include "loadgen_applications.h"
+#include "loadgen_photocapture.h"
+#include "loadgen_bluetooth.h"
+#include "loadgen_traces.h"
+#include "loadgen_loadattributes.h"
+#include "loadgen.hrh"
+
+//#include "loadgen_editors.h"
+//#include "loadgen_app.h"
+//#include "loadgen_settingsviewdlg.h"
+//#include "loadgen_maincontainer.h"
+
+//#include <loadgen.rsg>
+
+#include <coeutils.h>
+#include <bautils.h>
+#include <eikenv.h>
+//#include <AknQueryDialog.h>
+#include <e32math.h> 
+#include <u32hal.h>
+#include <hal.h> 
+#include <hal_data.h>
+
+#include <ecam.h>
+//#include <aknnotewrappers.h>
+#include <featdiscovery.h>
+
+const TInt KZeroIndex = 0;
+
+// ===================================== MEMBER FUNCTIONS =====================================
+
+CEngine* CEngine::NewL(EngineWrapper *aEngineWrapper)
+    {
+    CEngine* self = new(ELeave) CEngine;
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngineWrapper);
+    CleanupStack::Pop();
+    return self;
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CEngine::CEngine() : CActive( EPriorityStandard ),
+		iAsyncRunLoadOperation( CActive::EPriorityStandard )
+    {
+	TCallBack asyncRunSuspRes( AsyncRunLoadOperation, this );
+	iAsyncRunLoadOperation.Set(asyncRunSuspRes);
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CEngine::ConstructL(EngineWrapper *aEngineWrapper)
+    {
+	iEngineWrapper = aEngineWrapper;
+
+    iReferenceNumber = 0;
+	iCurrentItemIndex = 0;
+	iEditExistingLoad = EFalse;
+    
+    iEnv = CEikonEnv::Static();
+    User::LeaveIfError(iLs.Connect());
+    
+    iLoadItemList = new(ELeave) CLoadItemList(64);
+
+    User::LeaveIfError(iTimer.CreateLocal());
+    CActiveScheduler::Add(this);
+  
+  }
+
+// --------------------------------------------------------------------------------------------
+TInt CEngine::AsyncRunLoadOperation( TAny* aObject )
+	{
+	TRAPD( err, static_cast<CEngine*>( aObject )->AsyncRunLoadOperationL() );
+	return err;
+	}
+
+void CEngine::AsyncRunLoadOperationL()
+	{
+	switch(iLoadOperation)
+		{
+		case EEditLoad:
+			break;
+		case ESuspResLoad:
+			SuspendOrResumeSelectedOrHighlightedItemsL();
+			break;
+		case EStopLoad:
+			if(iSelectionIndexes)
+				{
+				StopSelectedOrHighlightedItemsL(iSelectionIndexes);
+				}
+			break;
+		}
+	}
+void CEngine::AsyncSuspRes()
+	{
+	iLoadOperation = ESuspResLoad;
+	iAsyncRunLoadOperation.CallBack();
+	}
+void CEngine::AsyncStopLoad( const CArrayFix<TInt>* aSelectionIndexes )
+	{
+	iSelectionIndexes = aSelectionIndexes;
+	iLoadOperation = EStopLoad;
+	iAsyncRunLoadOperation.CallBack();
+	}
+void CEngine::AsyncEditLoad()
+	{
+	iLoadOperation = EEditLoad;
+	iAsyncRunLoadOperation.CallBack();
+	}
+// --------------------------------------------------------------------------------------------
+void CEngine::ActivateEngineL()
+    {
+    // load settings
+    //TRAP_IGNORE(LoadSettingsL());
+
+	// RAM
+	TMemoryInfoV1Buf ramMemory;
+	UserHal::MemoryInfo(ramMemory);
+	                
+	TInt freeRam = ramMemory().iFreeRamInBytes;
+
+	
+    // set defaults to attributes
+    iCpuLoadAttributes.iId = 0;
+    iCpuLoadAttributes.iPriority = EThreadPriorityTypeNormal;
+    iCpuLoadAttributes.iMode = ECpuLoadModeYielding;
+    iCpuLoadAttributes.iType = ECpuLoadTypePeriodic;
+    iCpuLoadAttributes.iLength = 4000;
+    iCpuLoadAttributes.iIdle = 2000;
+    iCpuLoadAttributes.iRandomVariance = 0;
+    iCpuLoadAttributes.iCpu = KCPUSelection_FreeScheduling; // set CPU as "undefined" (can be >= 0 only in SMP environments)
+    iCpuLoadAttributes.iCpuCount = UserSvr::HalFunction(EHalGroupKernel, KHalFunction_EKernelHalNumLogicalCpus, 0, 0);
+    if( iCpuLoadAttributes.iCpuCount < 1 || iCpuLoadAttributes.iCpuCount > KMaxCPUs )
+        {
+        // HAL may not support this function, so let's use CPU count 1:
+        iCpuLoadAttributes.iCpuCount = 1;
+        }
+    iMemoryEatAttributes.iId = 0;
+    iMemoryEatAttributes.iPriority = EThreadPriorityTypeNormal;
+    iMemoryEatAttributes.iSource = 0;
+    iMemoryEatAttributes.iType = EMemoryEatTypeMemoryToBeLeft;
+    iMemoryEatAttributes.iBuffer = 16*1024;
+    iMemoryEatAttributes.iIdle = 0;
+    iMemoryEatAttributes.iAmount = freeRam;//0;
+    iMemoryEatAttributes.iRandomMin = 1000000;
+    iMemoryEatAttributes.iRandomMax = 1500000;
+    iMemoryEatAttributes.iAmountDes.Copy(KNullDesC);
+    iMemoryEatAttributes.iRandomMinDes.Copy(KNullDesC);
+    iMemoryEatAttributes.iRandomMaxDes.Copy(KNullDesC);
+    iMemoryEatAttributes.iRandomVariance = 0;
+
+    iPhoneCallAttributes.iId = 0;
+    iPhoneCallAttributes.iPriority = EThreadPriorityTypeNormal;
+    iPhoneCallAttributes.iDestination.Copy(_L("+358"));
+    iPhoneCallAttributes.iLength = 60000;
+    iPhoneCallAttributes.iIdle = 10000;
+    iPhoneCallAttributes.iRandomVariance = 0;
+
+    iNetConnAttributes.iId = 0;
+    iNetConnAttributes.iPriority = EThreadPriorityTypeNormal;
+    iNetConnAttributes.iDestination.Copy(_L("http://www.nokia.com"));
+    iNetConnAttributes.iIdle = 10000;
+    iNetConnAttributes.iRandomVariance = 0;
+
+    iKeyPressAttributes.iId = 0;
+    iKeyPressAttributes.iPriority = EThreadPriorityTypeNormal;
+    iKeyPressAttributes.iHeartBeat = 100;
+    iKeyPressAttributes.iRandomVariance = 0;
+    
+    iPointerEventAttributes.iId = 0;
+    iPointerEventAttributes.iPriority = EThreadPriorityTypeNormal;
+    iPointerEventAttributes.iHeartBeat = 1000;
+    iPointerEventAttributes.iRandomVariance = 0;
+
+    iMessageAttributes.iId = 0;
+    iMessageAttributes.iPriority = EThreadPriorityTypeNormal;
+    iMessageAttributes.iMessageType = EMessageTypeSMS;
+    iMessageAttributes.iDestination.Copy(_L("+358"));
+    iMessageAttributes.iAmount = 5;
+    iMessageAttributes.iLength = 160;
+    iMessageAttributes.iIdle = 15000;
+    iMessageAttributes.iRandomVariance = 0;
+    
+    iApplicationsAttributes.iId = 0;
+    iApplicationsAttributes.iLaunchingInterval = 2000;
+    iApplicationsAttributes.iPriority = EThreadPriorityTypeNormal;
+    iApplicationsAttributes.iKeyPressType = EApplicationsKeyPressTypeNone;
+    iApplicationsAttributes.iMaxOpen = 20;
+    iApplicationsAttributes.iHeartBeat = 50;
+    iApplicationsAttributes.iRandomVariance = 0;
+    
+    iPhotoCaptureAttributes.iId = 0;
+    iPhotoCaptureAttributes.iPriority = EThreadPriorityTypeNormal;
+    iPhotoCaptureAttributes.iIdle = 10000;
+    iPhotoCaptureAttributes.iRandomVariance = 0;        
+    iPhotoCaptureAttributes.iCameraCount = CCamera::CamerasAvailable();
+    if(iPhotoCaptureAttributes.iCameraCount > 0)
+        {
+        iPhotoCaptureAttributes.iCamera = 0; // Main camera
+        }
+    else
+        {
+        iPhotoCaptureAttributes.iCamera = -1;
+        }
+    
+    iBluetoothAttributes.iId = 0;
+    iBluetoothAttributes.iPriority = EThreadPriorityTypeNormal;
+    iBluetoothAttributes.iIdle = 10000;
+    iBluetoothAttributes.iRandomVariance = 0;
+    iBluetoothAttributes.iBluetoothSupported = CFeatureDiscovery::IsFeatureSupportedL(KFeatureIdBt);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::DeActivateEngineL()
+    {
+    Cancel();
+    
+    // for a faster exit, send the application to background
+    TApaTask selfTask(iEnv->WsSession());
+    selfTask.SetWgId(iEnv->RootWin().Identifier());
+    selfTask.SendToBackground();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+CEngine::~CEngine()
+    {
+    if (iLoadItemList)
+        {
+        DeleteAllLoadItems();
+        delete iLoadItemList;
+        }
+    if ( iApplicationsAttributes.iAppsArray )
+        {
+        delete iApplicationsAttributes.iAppsArray;
+        }
+    iTimer.Close();
+    iLs.Close();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::DoCancel()
+    {
+    iTimer.Cancel();
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::RunL()
+    {
+    // continue    
+    //iTimer.After(iStatus, 400000);
+    //SetActive();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CEngine::StartNewLoadL(TInt aCommand)
+    {
+    // show new load query
+	//CLoadGenLoadTypeEditorBase* dlg = NULL;
+	
+	if(aCommand == ELoadGenCmdNewLoadPhotoCaptures && 
+	   iPhotoCaptureAttributes.iCameraCount == 0)
+		{
+		_LIT(message, "Cameras not available");
+		iEngineWrapper->ShowNote(message);
+		return;
+		}
+	if(aCommand == ELoadGenCmdNewLoadBluetooth &&
+	   iBluetoothAttributes.iBluetoothSupported == EFalse)
+		{
+		_LIT(message, "Bluetooth device not available");
+		iEngineWrapper->ShowNote(message); 
+		return;
+		}
+	/*
+    switch ( aCommand )
+        {
+        case ELoadGenCmdNewLoadCPULoad:
+            {
+            //dlg = CLoadGenCPULoadEditor::NewL(iCpuLoadAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadEatMemory:
+            {
+            //dlg = CLoadGenMemoryEatEditor::NewL(iMemoryEatAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadPhoneCall:
+            {
+            //dlg = CLoadGenPhoneCallEditor::NewL(iPhoneCallAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadNetConn:
+            {
+            //dlg = CLoadGenNetConnEditor::NewL(iNetConnAttributes);
+            break;
+            }
+        case ELoadGenCmdNewLoadKeyPress:
+            {
+            //dlg = CLoadGenKeyPressEditor::NewL(iKeyPressAttributes);
+            break;
+            }               
+        case ELoadGenCmdNewLoadMessages:
+            {
+            //dlg = CLoadGenMessagesEditor::NewL( iMessageAttributes );
+            break;
+            }
+        case ELoadGenCmdNewLoadApplications:
+            {
+            //dlg = CLoadGenApplicationsEditor::NewL( iApplicationsAttributes );
+            break;
+            }
+        case ELoadGenCmdNewLoadPhotoCaptures:
+            {
+            if( iPhotoCaptureAttributes.iCameraCount > 0 )
+                {
+                //dlg = CLoadGenPhotoCaptureEditor::NewL( iPhotoCaptureAttributes );
+                }
+            else
+                {
+                _LIT(message, "Cameras not available");
+				iEngineWrapper->ShowNote(message); 
+                //CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
+                //errorNote->ExecuteLD(message);
+				return;
+                }
+            break;
+            }
+        case ELoadGenCmdNewLoadBluetooth:
+            {
+            if( iBluetoothAttributes.iBluetoothSupported )
+                {
+                //dlg = CLoadGenBluetoothEditor::NewL(iBluetoothAttributes);                
+                }
+            else
+                {
+                _LIT(message, "Bluetooth device not available");
+				iEngineWrapper->ShowNote(message); 
+                //CAknErrorNote* errorNote = new(ELeave) CAknErrorNote;
+                //errorNote->ExecuteLD(message);
+                return;
+                }
+            break;
+            }
+        case ELoadGenCmdNewLoadPointerEvent:
+            {
+            //dlg = CLoadGenPointerEventEditor::NewL(iPointerEventAttributes);
+            break;
+            } 
+
+        default:
+            {
+            User::Panic(_L("Wrong new load"), 111);
+            break;
+            }
+        }
+	*/
+	iEditExistingLoad = EFalse;
+    iEngineWrapper->OpenLoadSettings(aCommand, EFalse); // = dlg->RunQueryLD();
+
+    // set back title
+    
+	//if (iMainContainer) 
+    //    iMainContainer->SetDefaultTitlePaneTextL();
+
+    // start creating new load if dialog accepted
+    //if (dlgResult)
+    //    {
+    //    DoStartNewLoadL(aCommand);
+    //    }
+	// DoStartNewLoadL() called from engine wrapper slot function newLoadAdded() after
+	// load settings closed by user select: ok.
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::EditLoadL(TInt aIndex)
+    {
+	CLoadBase* aItem = iLoadItemList->At(aIndex);
+	iCurrentItemIndex = aIndex;
+	iEditExistingLoad = ETrue;
+    // suspend current
+	if (aItem->State() == CLoadBase::ELoadStateRunning)
+		{
+		iLoadStatusBeforeEdit = CLoadBase::ELoadStateRunning;
+		aItem->Suspend();
+		}
+    
+    // show new load query
+
+	/* CLoadGenLoadTypeEditorBase* dlg = NULL;
+	
+
+    switch ( aItem->Type() )
+        {
+        case ELoadGenCmdNewLoadCPULoad:
+            {
+            //dlg = CLoadGenCPULoadEditor::NewL(static_cast<CCPULoad*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadEatMemory:
+            {
+            //dlg = CLoadGenMemoryEatEditor::NewL(static_cast<CMemoryEat*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadPhoneCall:
+            {
+            //dlg = CLoadGenPhoneCallEditor::NewL(static_cast<CPhoneCall*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadNetConn:
+            {
+            //dlg = CLoadGenNetConnEditor::NewL(static_cast<CNetConn*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadKeyPress:
+            {
+            //dlg = CLoadGenKeyPressEditor::NewL(static_cast<CKeyPress*>(aItem)->Attributes(), ETrue);
+            break;
+            }       
+        case ELoadGenCmdNewLoadMessages:
+            {
+            //dlg = CLoadGenMessagesEditor::NewL(static_cast<CMessages*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        case ELoadGenCmdNewLoadApplications:
+            {
+            //dlg = CLoadGenApplicationsEditor::NewL( static_cast<CAppLauncher*>(aItem)->Attributes(), ETrue );
+            break;
+            }
+        case ELoadGenCmdNewLoadPhotoCaptures:
+            {
+            //dlg = CLoadGenPhotoCaptureEditor::NewL( static_cast<CPhotoCapture*>(aItem)->Attributes(), ETrue );
+            break;
+            }
+        case ELoadGenCmdNewLoadBluetooth:
+            {
+            //dlg = CLoadGenBluetoothEditor::NewL( static_cast<CBluetooth*>(aItem)->Attributes(), ETrue );
+            break;
+            }
+        case ELoadGenCmdNewLoadPointerEvent:
+            {
+            //dlg = CLoadGenPointerEventEditor::NewL(static_cast<CPointerEvent*>(aItem)->Attributes(), ETrue);
+            break;
+            }
+        default:
+            {
+            User::Panic(_L("Wrong edit load"), 114);
+            break;
+            }
+        }
+		*/
+	iEngineWrapper->OpenLoadSettings(aItem->Type(), iEditExistingLoad);
+    // ExistingLoadEditedL method called from engine wrapper when load settings view close signal received.
+    
+	//TBool dlgResult = ETrue; //dlg->RunQueryLD();
+
+    // set back title
+	// TODO: check this.
+    //if (iMainContainer)
+    //    iMainContainer->SetDefaultTitlePaneTextL();
+    
+    // change priority of the load item
+    //aItem->SetPriority();
+
+    // resume execution the item
+    //aItem->Resume();
+    
+    //if (dlgResult)
+    //    RefreshViewL(EFalse);
+    }
+
+// --------------------------------------------------------------------------------------------    
+	
+void CEngine::ExistingLoadEditedL()
+	{
+	CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+	// change priority of the load item
+    aItem->SetPriority();
+	if (iLoadStatusBeforeEdit == CLoadBase::ELoadStateRunning)
+		{
+		// resume execution the item
+		aItem->Resume();
+		RefreshViewL(EFalse);
+		}
+	// cancel:
+	
+	}
+	
+// --------------------------------------------------------------------------------------------    
+	
+void CEngine::ExistingLoadEditCancelled()
+	{
+	if (iLoadStatusBeforeEdit == CLoadBase::ELoadStateRunning)
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		// resume execution due to suspend action before edit started:
+		aItem->Resume();
+		}	
+	RefreshViewL(EFalse);
+	}
+	
+// --------------------------------------------------------------------------------------------
+
+void CEngine::DoStartNewLoadL(TInt aCommand)
+    {
+    CLoadBase* item = NULL;
+    
+    switch ( aCommand )
+        {
+        case ELoadGenCmdNewLoadCPULoad:
+            {
+            if( iCpuLoadAttributes.iCpu == KCPUSelection_AllCPUs )
+                {
+                // Call this function recursively for all CPUs:
+                for( TUint i = 0; i < iCpuLoadAttributes.iCpuCount; ++i )
+                    {                    
+                    iCpuLoadAttributes.iCpu = i;
+                    DoStartNewLoadL(aCommand);
+                    }
+                // And finally set user selection back to "All CPUs"
+                iCpuLoadAttributes.iCpu = KCPUSelection_AllCPUs;
+                return;
+                }
+            else
+                {
+                item = CCPULoad::NewL(iCpuLoadAttributes, iReferenceNumber);
+                }
+            break;
+            }
+        case ELoadGenCmdNewLoadEatMemory:
+            {
+            item = CMemoryEat::NewL(iMemoryEatAttributes, iReferenceNumber);
+            break;
+            }
+        case ELoadGenCmdNewLoadPhoneCall:
+            {
+            item = CPhoneCall::NewL(iPhoneCallAttributes, iReferenceNumber);
+            break;
+            }
+        case ELoadGenCmdNewLoadNetConn:
+            {
+            item = CNetConn::NewL(iNetConnAttributes, iReferenceNumber);
+            break;
+            }
+            
+        case ELoadGenCmdNewLoadKeyPress:
+            {
+            item = CKeyPress::NewL(iKeyPressAttributes, iReferenceNumber);
+            break;
+            }        
+        case ELoadGenCmdNewLoadMessages:
+            {
+            item = CMessages::NewL( iMessageAttributes, iReferenceNumber );
+            break;
+            }
+        case ELoadGenCmdNewLoadApplications:
+            {
+            iApplicationsAttributes.iAppsArray = ListOfAllAppsL();
+            item = CAppLauncher::NewL( iApplicationsAttributes, iReferenceNumber );            
+            break;
+            }
+        case ELoadGenCmdNewLoadPhotoCaptures:
+            {
+            item = CPhotoCapture::NewL( iPhotoCaptureAttributes, iReferenceNumber);
+            break;
+            }
+        case ELoadGenCmdNewLoadBluetooth:
+            {
+            item = CBluetooth::NewL( iBluetoothAttributes, iReferenceNumber);            
+            break;
+            }
+        case ELoadGenCmdNewLoadPointerEvent:
+            {
+            item = CPointerEvent::NewL(iPointerEventAttributes, iReferenceNumber);
+            break;
+            }
+            
+        default:
+            {
+            User::Panic(_L("Wrong new load"), 112);
+            break;
+            }
+        }
+    
+    iReferenceNumber++;
+
+    // add item to the array
+    AppendToLoadItemListL(item);
+
+    // update the listbox
+    RefreshViewL(EFalse);
+
+    // set item index to the end
+	// Check this feature to be done in Orbit UI.
+    // iMainContainer->ListBox()->SetCurrentItemIndexAndDraw( iMainContainer->ListBox()->Model()->NumberOfItems()-1 );
+
+    // start the load
+    item->Resume();
+        
+    // refresh again
+    RefreshViewL(EFalse);    
+    }
+
+// --------------------------------------------------------------------------------------------
+
+
+void CEngine::StopAllLoadItemsL()
+    {
+    DeleteAllLoadItems();
+    
+    RefreshViewL();
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CEngine::SuspendAllLoadItemsL()
+    {
+    for (TInt i=0; i<LoadItemCount(); i++)
+        {
+        if ( iLoadItemList->At(i) )
+            {
+            iLoadItemList->At(i)->Suspend();
+            }
+        }
+        
+    RefreshViewL();    
+    }
+// --------------------------------------------------------------------------------------------
+
+void CEngine::ResumeAllLoadItemsL()
+    {
+    for (TInt i=0; i<LoadItemCount(); i++)
+        {
+        if ( iLoadItemList->At(i) )
+            {
+            iLoadItemList->At(i)->Resume();
+            }
+        }
+
+    RefreshViewL();    
+    }    
+    
+// --------------------------------------------------------------------------------------------
+
+void CEngine::RefreshViewL(TBool aClearSelection)
+    {
+	// clear selections if any
+	iEngineWrapper->ClearSelection();
+	if (aClearSelection) 
+		{
+		iEngineWrapper->SetCurrentItemIndex(KZeroIndex);
+		}
+	iEngineWrapper->ReFreshView(GenerateListBoxItemTextArrayL());
+    }
+
+// --------------------------------------------------------------------------------------------
+
+CDesCArray* CEngine::GenerateListBoxItemTextArrayL()
+    {
+    CDesCArray* textArray = new(ELeave) CDesCArrayFlat(64);
+    CleanupStack::PushL(textArray);
+
+    _LIT(KEntryTemplateRedIcon,   "1\t%S\t\t");
+    _LIT(KEntryTemplateGreenIcon, "2\t%S\t\t");
+    TInt cnt = LoadItemCount();
+    for (TInt i=0; i< cnt; i++)
+        {
+        // add description from each entry
+        TBuf<256> textEntry;
+        TBuf<256> description = iLoadItemList->At(i)->Description();
+        
+        if (iLoadItemList->At(i)->State() == CLoadBase::ELoadStateRunning)
+            textEntry.Format(KEntryTemplateGreenIcon, &description);
+        else
+            textEntry.Format(KEntryTemplateRedIcon, &description);
+        
+        textArray->AppendL(textEntry);
+        }    
+    
+    CleanupStack::Pop(); //textArray
+    return textArray;
+    }
+	
+// --------------------------------------------------------------------------------------------
+
+void CEngine::AppendToLoadItemListL(CLoadBase* aItem)
+    {
+    if (iLoadItemList)
+        iLoadItemList->AppendL( aItem );
+    else
+        User::Leave(KErrNotReady);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::DeleteFromLoadItemListL(TInt aIndex)
+    {
+    if (iLoadItemList)
+        {
+        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
+            {
+            // first call delete on the item
+            if (iLoadItemList->At(aIndex))
+                {                                
+                delete iLoadItemList->At(aIndex);
+                iLoadItemList->At(aIndex) = NULL;
+                }
+            
+            // and them remove the array entry
+            iLoadItemList->Delete(aIndex);
+            iLoadItemList->Compress();
+            }
+        else
+            User::Leave(KErrNotFound);
+        }
+    else
+        User::Leave(KErrNotReady);
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::SuspendOrResumeFromLoadItemListL(TInt aIndex)
+    {
+    if (iLoadItemList)
+        {
+        if (iLoadItemList->Count() > aIndex && aIndex >= 0)
+            {
+            if (iLoadItemList->At(aIndex))
+                {
+                if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateRunning)
+                    {
+                    iLoadItemList->At(aIndex)->Suspend();
+                    }
+                else if (iLoadItemList->At(aIndex)->State() == CLoadBase::ELoadStateSuspended)
+                    {
+                    iLoadItemList->At(aIndex)->Resume();
+                    }
+                }
+            }
+        else
+            User::Leave(KErrNotFound);
+        }
+    else
+        User::Leave(KErrNotReady);
+    }
+            
+// --------------------------------------------------------------------------------------------
+
+TInt CEngine::LoadItemCount() const
+    {
+    TInt count(0);
+    
+    if (iLoadItemList)
+        count = iLoadItemList->Count();
+    
+    return count;
+    }
+    
+// --------------------------------------------------------------------------------------------
+
+void CEngine::DeleteAllLoadItems()
+    {
+    // call delete for each entry and free memory allocated for the array
+    for (TInt i=0; i<LoadItemCount(); i++)
+        {
+        if ( iLoadItemList->At(i) )
+            {            
+            delete iLoadItemList->At(i);
+            iLoadItemList->At(i) = NULL;
+            }
+        }
+        
+    iLoadItemList->Reset();    
+    }  
+          
+// --------------------------------------------------------------------------------------------
+
+void CEngine::StopSelectedOrHighlightedItemsL(const CArrayFix<TInt>* aSelectionIndexes)
+    {
+    TInt err(KErrNone);
+
+    // by default use selected items
+    if (aSelectionIndexes && aSelectionIndexes->Count() > 0)
+        {
+        TInt deleteIndexCounter(0);
+        TInt ref(0);
+        TKeyArrayFix key(0, ECmpTUint16);
+        TInt index(0);
+        
+        TInt loadCount = LoadItemCount();
+
+        for (TInt i=0; i<loadCount; i++)
+            {
+            ref = i;
+
+            if (aSelectionIndexes->Find(ref, key, index) == 0)  
+                {
+                TRAP(err, DeleteFromLoadItemListL(i-deleteIndexCounter));
+                deleteIndexCounter++; // amount of indexes decreases after each delete
+                }
+            }
+            
+            RefreshViewL();
+            User::LeaveIfError(err);
+        }
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::SuspendOrResumeSelectedOrHighlightedItemsL()
+    {
+    const CArrayFix<TInt>* selectionIndexes = iEngineWrapper->QueryListSelectedIndexesOrCurrentItemL(); //iMainContainer->ListBoxSelectionIndexes();
+
+    // by default use selected items
+    if (selectionIndexes && selectionIndexes->Count() > 0)
+        {
+        TInt ref(0);
+        TKeyArrayFix key(0, ECmpTUint16);
+        TInt index(0);
+
+        for (TInt i=0; i<LoadItemCount(); i++)
+            {
+            ref = i;
+
+            if (selectionIndexes->Find(ref, key, index) == 0)  
+                {
+                SuspendOrResumeFromLoadItemListL(i);
+                }
+            }
+        
+        RefreshViewL(EFalse);
+        }  
+    }                                
+// --------------------------------------------------------------------------------------------
+
+void CEngine::LoadSettingsL()
+    {
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::SaveSettingsL()
+    {
+    }
+        
+// --------------------------------------------------------------------------------------------
+
+TInt CEngine::LaunchSettingsDialogL()
+    {
+    return 0;
+    }
+    
+// --------------------------------------------------------------------------------------------
+CDesCArray* CEngine::ListOfAllAppsL()
+    {
+    const TInt KMaxAppsArraySize=250;
+    RApaLsSession ls;
+    CleanupClosePushL(ls);
+
+    User::LeaveIfError( ls.Connect() );
+    CDesCArray* allAppsArray = new(ELeave) CDesCArrayFlat( KMaxAppsArraySize );
+    CleanupStack::PushL( allAppsArray );
+    // reset the apps list
+    allAppsArray->Reset();
+
+    // search all apps
+    TApaAppInfo appInfo;
+    User::LeaveIfError(ls.GetAllApps());
+
+
+    while ( ls.GetNextApp( appInfo ) == KErrNone )
+        {
+        allAppsArray->AppendL( appInfo.iFullName );      
+        }
+    CleanupStack::Pop( allAppsArray );
+    CleanupStack::PopAndDestroy( &ls );
+   
+
+    // remove loadgen.* from the list
+    for ( TInt i = 0; i < allAppsArray->MdcaCount(); i++ )
+        {
+        if ( allAppsArray->MdcaPoint(i).FindF( _L("\\loadgen.") ) != KErrNotFound )
+            {
+            allAppsArray->Delete(i);
+            allAppsArray->Compress();
+            break;
+            }
+        }
+
+    // sort the elements
+    allAppsArray->Sort();
+
+    return allAppsArray; // ownership transferred
+    }
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::LaunchPerfMonL()
+	{
+	// launch Performance Monitor
+	const TUid KUidPerfMon = { 0x20011385 };
+	
+	RWsSession ws;
+	User::LeaveIfError( ws.Connect() );
+	CleanupClosePushL(ws);
+	
+	RApaLsSession ls;
+	User::LeaveIfError( ls.Connect() );
+	CleanupClosePushL(ls);
+	
+	
+	// try to find the task of PerfMon
+	TApaTaskList tasklist(ws);
+	TApaTask task = tasklist.FindApp(KUidPerfMon);
+
+	if (task.Exists())
+		{
+		// task exists, bring it to foreground
+		task.BringToForeground();
+		}
+	else
+		{
+		TApaAppInfo appInfo;
+		User::LeaveIfError(ls.GetAppInfo(appInfo, KUidPerfMon));
+		
+		CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
+		cmdLine->SetExecutableNameL(appInfo.iFullName);
+		cmdLine->SetCommandL(EApaCommandBackground);
+
+		// start the app
+		User::LeaveIfError(ls.StartApp(*cmdLine));
+		
+		CleanupStack::PopAndDestroy(); //cmdLine                
+		}
+	
+	CleanupStack::PopAndDestroy(2); //ws,ls
+	}
+
+// --------------------------------------------------------------------------------------------
+	
+TCPULoadAttributes CEngine::GetCPULoadAttributes()
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		return iCpuLoadAttributes;
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CCPULoad*>(aItem)->Attributes());
+		}
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::ChangeCPULoadAttributes(const TCPULoadAttributes& aAttributes) 
+	{ 
+	if (iEditExistingLoad == EFalse) 
+		{
+		iCpuLoadAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CCPULoad*>(aItem)->SetAttributes(aAttributes);
+		}
+	}
+
+// --------------------------------------------------------------------------------------------
+
+TMemoryEatAttributes CEngine::GetMemoryEatAttributes()
+	{ 
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iMemoryEatAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CMemoryEat*>(aItem)->Attributes());
+		}
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void CEngine::ChangeMemoryEatAttributes(const TMemoryEatAttributes& aAttributes) 
+	{ 
+	if (iEditExistingLoad == EFalse) 
+		{
+		iMemoryEatAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CMemoryEat*>(aItem)->SetAttributes(aAttributes);
+		}
+	}	
+	
+// --------------------------------------------------------------------------------------------
+
+TPhoneCallAttributes CEngine::GetPhoneCallAttributes()
+	{ 
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iPhoneCallAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CPhoneCall*>(aItem)->Attributes());
+		}
+	}
+
+// --------------------------------------------------------------------------------------------	
+
+void CEngine::ChangePhoneCallAttributes(const TPhoneCallAttributes& aAttributes)
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		iPhoneCallAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CPhoneCall*>(aItem)->SetAttributes(aAttributes);
+		}	
+	}
+	
+// --------------------------------------------------------------------------------------------	
+
+TNetConnAttributes CEngine::GetNetConnAttributes()
+	{ 
+  
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iNetConnAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CNetConn*>(aItem)->Attributes());
+		}
+	
+	}
+
+// --------------------------------------------------------------------------------------------		
+	
+void CEngine::ChangeNetConnAttributes(const TNetConnAttributes& aAttributes)
+	{
+    
+	if (iEditExistingLoad == EFalse) 
+		{
+		iNetConnAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CNetConn*>(aItem)->SetAttributes(aAttributes);
+		}
+			
+	}
+	
+// --------------------------------------------------------------------------------------------	
+
+TKeyPressAttributes CEngine::GetKeyPressAttributes()
+	{ 
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iKeyPressAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CKeyPress*>(aItem)->Attributes());
+		}
+	}	
+
+	
+// --------------------------------------------------------------------------------------------		
+	
+void CEngine::ChangeKeyPressAttributes(const TKeyPressAttributes& aAttributes)
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		iKeyPressAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CKeyPress*>(aItem)->SetAttributes(aAttributes);
+		}	
+	}	
+	
+// --------------------------------------------------------------------------------------------	
+
+TMessageAttributes CEngine::GetMessageAttributes()
+	{ 
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iMessageAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CMessages*>(aItem)->Attributes());
+		}
+	}	
+	
+// --------------------------------------------------------------------------------------------		
+	
+void CEngine::ChangeMessageAttributes(const TMessageAttributes& aAttributes)
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		iMessageAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CMessages*>(aItem)->SetAttributes(aAttributes);
+		}	
+	}
+
+// --------------------------------------------------------------------------------------------	
+
+TApplicationsAttributes CEngine::GetApplicationsAttributes()
+	{ 
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iApplicationsAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CAppLauncher*>(aItem)->Attributes());
+		}
+	}	
+
+// --------------------------------------------------------------------------------------------		
+	
+void CEngine::ChangeApplicationsAttributes(const TApplicationsAttributes& aAttributes)
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		iApplicationsAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CAppLauncher*>(aItem)->SetAttributes(aAttributes);
+		}	
+	}
+	
+// --------------------------------------------------------------------------------------------	
+
+TPhotoCaptureAttributes CEngine::GetPhotoCaptureAttributes()
+	{ 
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iPhotoCaptureAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CPhotoCapture*>(aItem)->Attributes());
+		}
+	}	
+
+// --------------------------------------------------------------------------------------------		
+	
+void CEngine::ChangePhotoCaptureAttributes(const TPhotoCaptureAttributes& aAttributes)
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		iPhotoCaptureAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CPhotoCapture*>(aItem)->SetAttributes(aAttributes);
+		}	
+	}	
+	
+// --------------------------------------------------------------------------------------------	
+	
+TBluetoothAttributes CEngine::GetBluetoothAttributes()
+	{ 
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iBluetoothAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CBluetooth*>(aItem)->Attributes());
+		}
+	}		
+
+	
+// --------------------------------------------------------------------------------------------		
+	
+void CEngine::ChangeBluetoothAttributes(const TBluetoothAttributes& aAttributes)
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		iBluetoothAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CBluetooth*>(aItem)->SetAttributes(aAttributes);
+		}	
+	} 	
+	
+// --------------------------------------------------------------------------------------------	
+	
+TPointerEventAttributes CEngine::GetPointerEventAttributes()
+	{
+	if (iEditExistingLoad == EFalse)
+		{	
+		return iPointerEventAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		return (static_cast<CPointerEvent*>(aItem)->Attributes());
+		}
+	}
+
+// --------------------------------------------------------------------------------------------		
+	
+void CEngine::ChangePointerEventAttributes(const TPointerEventAttributes& aAttributes)
+	{
+	if (iEditExistingLoad == EFalse) 
+		{
+		iPointerEventAttributes = aAttributes; 
+		}
+	else 
+		{
+		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
+		static_cast<CPointerEvent*>(aItem)->SetAttributes(aAttributes);
+		}	
+	} 
+	
+// --------------------------------------------------------------------------------------------
+	
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/enginewrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,771 @@
+/*
+* 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 <hbmainwindow.h>
+//#include <hbcommonnote.h>
+#include <hbpopup.h>
+#include <hbaction.h>
+
+#include <QString>
+ #include <QStringList>
+ 
+#include <e32std.h>
+#include <e32base.h>
+
+#include "notifications.h"
+#include "enginewrapper.h"
+#include "settingsview.h"
+#include "engine.h"
+#include "mainview.h"
+
+QStringList LOADTYPES = (QStringList() << "CPU load" << "Memory eat" << "Phone calls" << "Messages" 
+									   << "Network conn." << "Key presses" << "Applications" << "Photo captures" 
+									   << "Bluetooth actions" << "Pointer events");
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::EngineWrapper(HbMainWindow &mainWindow, MainView &mainView)
+: mEngine(0), 
+  mMainView(mainView),
+  mMainWindow(mainWindow),
+  mEditExistingLoad(false)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::~EngineWrapper()
+{
+    if (mEngine != 0) {
+		TRAP_IGNORE(mEngine->DeActivateEngineL());
+        delete mEngine;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::init()
+{
+	TInt err = KErrNone;
+    TRAP(err, mEngine = CEngine::NewL(this));
+    if(err != KErrNone) {
+        return false;
+    }
+    else {
+		TRAP(err, mEngine->ActivateEngineL());
+		if (err != KErrNone) {
+			return false;
+		}
+		else {
+			return true;
+		}
+    }
+}
+
+// ---------------------------------------------------------------------------	
+
+bool EngineWrapper::startNewLoad(int commandId)
+{
+	TRAPD(err, mEngine->StartNewLoadL(commandId));
+
+	// error handling
+    if(err != KErrNone) {
+        return false;
+    }
+    else {
+        return true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::launchPerfMonApp()
+{
+	TRAPD(err, mEngine->LaunchPerfMonL());
+	// error handling
+    if(err != KErrNone) {
+        Notifications::error("Perf Mon launch failed.");
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::loadAddedOrEdited(TLoadGenCommandIds cmdId)
+{
+	if (mEditExistingLoad == false) {
+		TRAP_IGNORE(mEngine->DoStartNewLoadL(cmdId));
+	}
+	else {
+		TRAP_IGNORE(mEngine->ExistingLoadEditedL());
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::loadSettingsCanclled()
+{
+	if (mEditExistingLoad == true) {
+		TRAP_IGNORE(mEngine->ExistingLoadEditCancelled());
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::loadEdit(int rowIndex)
+{
+	TRAPD(err, mEngine->EditLoadL(rowIndex));
+	// error handling
+    if(err != KErrNone) {
+        Notifications::error("Load edit failed.");
+    }
+}
+
+void EngineWrapper::StopAllLoadsYesNoDialogClosed(HbAction *action)
+{
+	TInt err = KErrNone;
+    if( action && !action->text().compare("yes", Qt::CaseInsensitive) ){
+        const CArrayFix<TInt>* selectionIndexes = NULL;
+        try{
+			TRAP(err, mEngine->StopAllLoadItemsL());
+        }
+        catch(...){
+            Notifications::error("Stop load failed.");
+        }
+    }
+}
+// ----------------------------------------------------------------------------
+void EngineWrapper::StopLoadYesNoDialogClosed(HbAction *action)
+{
+    if( action && !action->text().compare("yes", Qt::CaseInsensitive) ){
+        const CArrayFix<TInt>* selectionIndexes = NULL;
+        try{
+            QT_TRAP_THROWING( selectionIndexes = QueryListSelectedIndexesOrCurrentItemL() );
+            if(selectionIndexes)
+                QT_TRAP_THROWING( mEngine->StopSelectedOrHighlightedItemsL(selectionIndexes) );
+        }
+        catch(...){
+            Notifications::error("Stop load failed.");
+        }
+        if(selectionIndexes)
+            delete selectionIndexes;
+    }
+}
+
+// ---------------------------------------------------------------------------
+bool EngineWrapper::stopLoad(bool stopAll)
+{
+	
+	if (stopAll == true) {
+		QString message = QString("Stop all loads?");
+        HbMessageBox::question(message, this, SLOT(StopAllLoadsYesNoDialogClosed(HbAction *)), HbMessageBox::Yes|HbMessageBox::No);
+		//TRAP(err, mEngine->StopAllLoadItemsL());
+		// error handling
+        return true;
+	}
+	else {
+        // by default use selected items
+        QList<int> listIndices = mMainView.listSelectionIndexes();
+        if (listIndices.count() > 0)
+            {
+            QString message = QString("Stop %1 selections?").arg( listIndices.count() );
+            HbMessageBox::question(message, this, SLOT(StopLoadYesNoDialogClosed(HbAction *)), HbMessageBox::Yes|HbMessageBox::No);
+            }
+        else{
+             TInt currentItemIndex = mMainView.currentItemIndex();
+             if (mEngine->LoadItemCount() > currentItemIndex && currentItemIndex >= 0)
+                 {
+                 QString message("Stop highlighted selections?");
+                 HbMessageBox::question(message, this, SLOT(StopLoadYesNoDialogClosed(HbAction *)), HbMessageBox::Yes|HbMessageBox::No);
+                 }
+            }
+        return true;
+	}
+	
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::resumeAllLoadItems()
+{
+	TRAPD(err, mEngine->ResumeAllLoadItemsL());
+	// error handling
+    if(err != KErrNone) {
+        Notifications::error("Error in loads resume.");
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::suspendAllLoadItems()
+{
+	TRAPD(err, mEngine->SuspendAllLoadItemsL());
+	// error handling
+    if(err != KErrNone) {
+        Notifications::error("Error in loads resume.");
+    }
+}
+
+// ---------------------------------------------------------------------------
+void EngineWrapper::asyncSuspendOrResumeSelectedOrHighlightedItems()
+	{
+	TRAPD(err, mEngine->AsyncSuspRes() );
+		// error handling
+	    if(err != KErrNone) {
+	        Notifications::error("Error to show item action menu.");
+	    }
+	}
+
+void EngineWrapper::asyncStopLoad()
+	{
+	const CArrayFix<TInt>* selectionIndexes = NULL;
+	selectionIndexes = QueryListSelectedIndexesOrCurrentItemL();
+	if(selectionIndexes){
+		TRAPD(err, mEngine->AsyncStopLoad( selectionIndexes ) );
+		// error handling
+	    if(err != KErrNone) {
+	        Notifications::error("Error to show item action menu.");
+	    }
+	}
+	}
+
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::suspendOrResumeSelectedOrHighlightedItems()
+{
+	TRAPD(err, mEngine->SuspendOrResumeSelectedOrHighlightedItemsL());
+	// error handling
+    if(err != KErrNone) {
+        Notifications::error("Error to show item action menu.");
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowErrorMessage(const TDesC& aErrorMessage)
+{
+    QString errorMessage((QChar*)aErrorMessage.Ptr(),aErrorMessage.Length());
+    Notifications::error(errorMessage);
+ 
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowNote(const TDesC& aNoteMessage)
+{
+    QString note((QChar*)aNoteMessage.Ptr(),aNoteMessage.Length());
+    Notifications::showGlobalNote(note, HbMessageBox::MessageTypeInformation, HbPopup::StandardTimeout);
+}
+ 
+// ---------------------------------------------------------------------------
+
+TInt EngineWrapper::QueryCurrentItemIndex()
+{
+	return mMainView.currentItemIndex();
+}
+
+// ---------------------------------------------------------------------------
+
+const CArrayFix<TInt>*  EngineWrapper::QueryListSelectedIndexesOrCurrentItemL()
+{
+	QList<int> listIndices = mMainView.listSelectionIndexes();
+	TInt cnt = listIndices.count();
+    CArrayFix<TInt>* indices = new(ELeave)CArrayFixFlat<TInt>( cnt > 0 ? cnt : 1 );
+    CleanupDeletePushL(indices);
+    if(cnt > 0){
+        for (TInt i = 0; i < cnt; i++) {
+            indices->AppendL(listIndices.at(i));
+        }
+    }
+    else{
+        indices->AppendL(mMainView.currentItemIndex());
+    }
+    CleanupStack::Pop(indices);
+    return static_cast<const CArrayFix<TInt>*>(indices);	
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::OpenLoadSettings(TInt loadType, bool editExistingLoad)
+{
+	SettingsView* settings = new SettingsView((HbView&)ViewReference(), 
+											  WindowReference(), 
+											  *this);
+	mEditExistingLoad = editExistingLoad;
+
+	switch (loadType) {
+		case ELoadGenCmdNewLoadCPULoad: {
+			settings->open(LOADTYPES.at(Cpu), 
+			               (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadEatMemory: {
+			settings->open(LOADTYPES.at(EatMemory), 
+			               (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadPhoneCall: {
+			settings->open(LOADTYPES.at(PhoneCalls), 
+			               (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadNetConn: {
+			settings->open(LOADTYPES.at(NWConnections),
+                           (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadKeyPress: {
+			settings->open(LOADTYPES.at(KeyPresses), 
+			               (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadMessages: {
+			settings->open(LOADTYPES.at(Messages), 
+			               (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadApplications: {
+			settings->open(LOADTYPES.at(Apps), 
+			               (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadPhotoCaptures: {
+			settings->open(LOADTYPES.at(Photos), 
+			               (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadBluetooth: {
+			settings->open(LOADTYPES.at(BTAct), 
+						   (TLoadGenCommandIds)loadType);
+			break;
+		}
+		case ELoadGenCmdNewLoadPointerEvent: {
+			settings->open(LOADTYPES.at(PointerEvents),
+						   (TLoadGenCommandIds)loadType);
+			break;
+		}
+		default: {
+			User::Panic(_L("Wrong new load"), 111);
+			break;
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------	
+
+CPULoadAttributes EngineWrapper::getCpuLoadAttributes()
+{
+    TCPULoadAttributes tCpuLoadAttributes = mEngine->GetCPULoadAttributes();
+    CPULoadAttributes attributes;
+	
+	attributes.mId = tCpuLoadAttributes.iId;
+	attributes.mPriority = tCpuLoadAttributes.iPriority;
+	attributes.mMode = tCpuLoadAttributes.iMode;
+	attributes.mType = tCpuLoadAttributes.iType;
+	attributes.mLength = tCpuLoadAttributes.iLength;
+	attributes.mIdle = tCpuLoadAttributes.iIdle;
+	attributes.mRandomVariance = tCpuLoadAttributes.iRandomVariance;
+	attributes.mCpu = tCpuLoadAttributes.iCpu;
+	attributes.mCpuCount = tCpuLoadAttributes.iCpuCount;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setCpuLoadAttributes(const CPULoadAttributes& attributes)
+{
+    TCPULoadAttributes tCpuLoadAttributes;
+
+	tCpuLoadAttributes.iId = attributes.mId;
+	tCpuLoadAttributes.iPriority = attributes.mPriority;
+	tCpuLoadAttributes.iMode = attributes.mMode;
+	tCpuLoadAttributes.iType = attributes.mType;
+	tCpuLoadAttributes.iLength = attributes.mLength;
+	tCpuLoadAttributes.iIdle = attributes.mIdle;
+	tCpuLoadAttributes.iRandomVariance = attributes.mRandomVariance;
+	tCpuLoadAttributes.iCpu = attributes.mCpu;
+	tCpuLoadAttributes.iCpuCount = attributes.mCpuCount;	
+	
+	mEngine->ChangeCPULoadAttributes(tCpuLoadAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+MemoryEatAttributes EngineWrapper::getMemoryEatAttributes()
+{
+
+    TMemoryEatAttributes tMemoryEatAttributes = mEngine->GetMemoryEatAttributes();
+    MemoryEatAttributes attributes;
+
+    // Convert TMemoryEatAttributes to MemoryEatAttributes 
+    attributes.mId         = tMemoryEatAttributes.iId;
+    attributes.mPriority   = tMemoryEatAttributes.iPriority; 
+	attributes.mSource     = tMemoryEatAttributes.iSource;
+	attributes.mType       = tMemoryEatAttributes.iType;
+	attributes.mBuffer     = tMemoryEatAttributes.iBuffer;
+	attributes.mIdle       = tMemoryEatAttributes.iIdle;
+	attributes.mAmount     = tMemoryEatAttributes.iAmount;
+	attributes.mRandomMin  = tMemoryEatAttributes.iRandomMin;
+	attributes.mRandomMax  = tMemoryEatAttributes.iRandomMax;
+
+    TBuf<64> amount;
+    amount.Copy(tMemoryEatAttributes.iAmountDes);
+    attributes.mAmountDes = QString((QChar*)amount.Ptr(), amount.Length()); 
+
+    TBuf<64> min;
+    min.Copy(tMemoryEatAttributes.iRandomMinDes);
+    attributes.mAmountDes = QString((QChar*)min.Ptr(), min.Length()); 
+
+    TBuf<64> max;
+    max.Copy(tMemoryEatAttributes.iRandomMaxDes);
+    attributes.mAmountDes = QString((QChar*)max.Ptr(), max.Length());
+	
+	attributes.mRandomVariance  = tMemoryEatAttributes.iRandomVariance;
+    return attributes;
+}	
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setMemoryEatAttributes(const MemoryEatAttributes& attributes)
+{
+	TMemoryEatAttributes tMemoryEatAttributes = mEngine->GetMemoryEatAttributes();//TMemoryEatAttributes tMemoryEatAttributes;
+
+	tMemoryEatAttributes.iId = attributes.mId;
+	tMemoryEatAttributes.iPriority = attributes.mPriority;
+	tMemoryEatAttributes.iSource = attributes.mSource;
+	tMemoryEatAttributes.iType = attributes.mType;
+	tMemoryEatAttributes.iBuffer = attributes.mBuffer;
+	tMemoryEatAttributes.iIdle = attributes.mIdle;
+	tMemoryEatAttributes.iAmount = attributes.mAmount;
+	tMemoryEatAttributes.iRandomMin = attributes.mRandomMin;
+	tMemoryEatAttributes.iRandomMax = attributes.mRandomMax;
+
+    TBuf<64> amount = attributes.mAmountDes.utf16();
+    tMemoryEatAttributes.iAmountDes.Copy(amount);	
+	
+    TBuf<64> min = attributes.mRandomMinDes.utf16();
+    tMemoryEatAttributes.iRandomMinDes.Copy(min);
+      
+    TBuf<64> max = attributes.mRandomMaxDes.utf16();
+    tMemoryEatAttributes.iRandomMaxDes.Copy(max);
+	
+	tMemoryEatAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangeMemoryEatAttributes(tMemoryEatAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+PhoneCallAttributes EngineWrapper::getPhoneCallAttributes()
+{
+    TPhoneCallAttributes tPhoneCallAttributes = mEngine->GetPhoneCallAttributes();
+    PhoneCallAttributes attributes;
+	
+	attributes.mId = tPhoneCallAttributes.iId;
+	attributes.mPriority = tPhoneCallAttributes.iPriority;
+
+    TBuf<128> dest;
+    dest.Copy(tPhoneCallAttributes.iDestination);
+    attributes.mDestination = QString((QChar*)dest.Ptr(), dest.Length()); 	
+	
+	attributes.mLength = tPhoneCallAttributes.iLength;
+	attributes.mIdle = tPhoneCallAttributes.iIdle;
+	attributes.mRandomVariance = tPhoneCallAttributes.iRandomVariance;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setPhoneCallAttributes(const PhoneCallAttributes& attributes)
+{
+	TPhoneCallAttributes tPhoneCallAttributes = mEngine->GetPhoneCallAttributes(); //TPhoneCallAttributes tPhoneCallAttributes;
+
+	tPhoneCallAttributes.iId = attributes.mId;
+	tPhoneCallAttributes.iPriority = attributes.mPriority;
+
+    TBuf<128> dest = attributes.mDestination.utf16();
+    tPhoneCallAttributes.iDestination.Copy(dest);	
+
+	tPhoneCallAttributes.iLength = attributes.mLength;
+	tPhoneCallAttributes.iIdle = attributes.mIdle;
+	tPhoneCallAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangePhoneCallAttributes(tPhoneCallAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+NetConnAttributes EngineWrapper::getNetConnAttributes()
+{
+    TNetConnAttributes tNetConnAttributes = mEngine->GetNetConnAttributes();
+    NetConnAttributes attributes;
+	
+	attributes.mId = tNetConnAttributes.iId;
+	attributes.mPriority = tNetConnAttributes.iPriority;
+
+    attributes.mDestination = QString::fromUtf16(tNetConnAttributes.iDestination.Ptr(), tNetConnAttributes.iDestination.Length()); 	
+
+	attributes.mIdle = tNetConnAttributes.iIdle;
+	attributes.mRandomVariance = tNetConnAttributes.iRandomVariance;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setNetConnAttributes(const NetConnAttributes& attributes)
+{
+	TNetConnAttributes tNetConnAttributes = mEngine->GetNetConnAttributes(); //TNetConnAttributes tNetConnAttributes;
+
+	tNetConnAttributes.iId = attributes.mId;
+	tNetConnAttributes.iPriority = attributes.mPriority;
+
+    TBuf<128> dest = attributes.mDestination.utf16();
+    tNetConnAttributes.iDestination.Copy(dest);	
+
+	tNetConnAttributes.iIdle = attributes.mIdle;
+	tNetConnAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangeNetConnAttributes(tNetConnAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+KeyPressAttributes EngineWrapper::getKeyPressAttributes()
+{
+    TKeyPressAttributes tKeyPressAttributes = mEngine->GetKeyPressAttributes();
+    KeyPressAttributes attributes;
+	
+	attributes.mId = tKeyPressAttributes.iId;
+	attributes.mPriority = tKeyPressAttributes.iPriority;
+	attributes.mHeartBeat = tKeyPressAttributes.iHeartBeat;	
+	attributes.mRandomVariance = tKeyPressAttributes.iRandomVariance;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setKeyPressAttributes(const KeyPressAttributes& attributes)
+{
+	TKeyPressAttributes tKeyPressAttributes = mEngine->GetKeyPressAttributes(); //TKeyPressAttributes tKeyPressAttributes;
+
+	tKeyPressAttributes.iId = attributes.mId;
+	tKeyPressAttributes.iPriority = attributes.mPriority;
+	tKeyPressAttributes.iHeartBeat = attributes.mHeartBeat;
+	tKeyPressAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangeKeyPressAttributes(tKeyPressAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+PointerEventAttributes EngineWrapper::getPointerEventAttributes()
+{
+    TPointerEventAttributes tPointerEventAttributes = mEngine->GetPointerEventAttributes();
+    PointerEventAttributes attributes;
+	
+	attributes.mId = tPointerEventAttributes.iId;
+	attributes.mPriority = tPointerEventAttributes.iPriority;
+	attributes.mHeartBeat = tPointerEventAttributes.iHeartBeat;	
+	attributes.mRandomVariance = tPointerEventAttributes.iRandomVariance;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setPointerEventAttributes(const PointerEventAttributes& attributes)
+{
+	TPointerEventAttributes tPointerEventAttributes = mEngine->GetPointerEventAttributes();//TPointerEventAttributes tPointerEventAttributes;
+
+	tPointerEventAttributes.iId = attributes.mId;
+	tPointerEventAttributes.iPriority = attributes.mPriority;
+	tPointerEventAttributes.iHeartBeat = attributes.mHeartBeat;
+	tPointerEventAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangePointerEventAttributes(tPointerEventAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+MessageAttributes EngineWrapper::getMessageAttributes()
+{
+    TMessageAttributes tMessageAttributes = mEngine->GetMessageAttributes();
+    MessageAttributes attributes;
+	
+	attributes.mId = tMessageAttributes.iId;
+	attributes.mMessageType = tMessageAttributes.iMessageType;
+
+    TBuf<128> dest;
+    dest.Copy(tMessageAttributes.iDestination);
+    attributes.mDestination = QString((QChar*)dest.Ptr(), dest.Length()); 	
+	
+	attributes.mPriority = tMessageAttributes.iPriority;
+	attributes.mAmount = tMessageAttributes.iAmount;
+	attributes.mLength = tMessageAttributes.iLength;
+	attributes.mIdle = tMessageAttributes.iIdle;
+	attributes.mRandomVariance = tMessageAttributes.iRandomVariance;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setMessageAttributes(const MessageAttributes& attributes)
+{
+	TMessageAttributes tMessageAttributes = mEngine->GetMessageAttributes();//TMessageAttributes tMessageAttributes;
+
+	tMessageAttributes.iId = attributes.mId;
+	tMessageAttributes.iMessageType = attributes.mMessageType;
+    
+	TBuf<128> dest = attributes.mDestination.utf16();
+    tMessageAttributes.iDestination.Copy(dest);	
+	
+	tMessageAttributes.iPriority = attributes.mPriority;
+	tMessageAttributes.iAmount = attributes.mAmount;
+	tMessageAttributes.iLength = attributes.mLength;
+	tMessageAttributes.iIdle = attributes.mIdle;
+	tMessageAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangeMessageAttributes(tMessageAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+ApplicationsAttributes EngineWrapper::getApplicationsAttributes()
+{
+    TApplicationsAttributes tApplicationsAttributes = mEngine->GetApplicationsAttributes();
+    ApplicationsAttributes attributes;
+	
+	attributes.mId = tApplicationsAttributes.iId;
+	attributes.mPriority = tApplicationsAttributes.iPriority;
+	attributes.mLaunchingInterval = tApplicationsAttributes.iLaunchingInterval;
+	attributes.mKeyPressType = tApplicationsAttributes.iKeyPressType;
+	attributes.mMaxOpen = tApplicationsAttributes.iMaxOpen;
+	attributes.mHeartBeat = tApplicationsAttributes.iHeartBeat;
+	attributes.mRandomVariance = tApplicationsAttributes.iRandomVariance;
+
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setApplicationsAttributes(const ApplicationsAttributes& attributes)
+{
+	TApplicationsAttributes tApplicationsAttributes = mEngine->GetApplicationsAttributes(); //TApplicationsAttributes tApplicationsAttributes;
+
+	tApplicationsAttributes.iId = attributes.mId;
+	tApplicationsAttributes.iPriority = attributes.mPriority;
+	tApplicationsAttributes.iLaunchingInterval = attributes.mLaunchingInterval;
+	tApplicationsAttributes.iKeyPressType = attributes.mKeyPressType;
+	tApplicationsAttributes.iMaxOpen = attributes.mMaxOpen;
+	tApplicationsAttributes.iHeartBeat = attributes.mHeartBeat;	
+	tApplicationsAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangeApplicationsAttributes(tApplicationsAttributes);
+}
+
+    QStringList mAppsArray;
+
+// ---------------------------------------------------------------------------	
+
+PhotoCaptureAttributes EngineWrapper::getPhotoCaptureAttributes()
+{
+    TPhotoCaptureAttributes tPhotoCaptureAttributes = mEngine->GetPhotoCaptureAttributes();
+    PhotoCaptureAttributes attributes;
+	
+	attributes.mId = tPhotoCaptureAttributes.iId;
+	attributes.mPriority = tPhotoCaptureAttributes.iPriority;
+	attributes.mCameraCount = tPhotoCaptureAttributes.iCameraCount;	
+	attributes.mCamera = tPhotoCaptureAttributes.iCamera;
+	attributes.mIdle = tPhotoCaptureAttributes.iIdle;
+	attributes.mRandomVariance = tPhotoCaptureAttributes.iRandomVariance;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setPhotoCaptureAttributes(const PhotoCaptureAttributes& attributes)
+{
+	TPhotoCaptureAttributes tPhotoCaptureAttributes;
+
+	tPhotoCaptureAttributes.iId = attributes.mId;
+	tPhotoCaptureAttributes.iPriority = attributes.mPriority;
+	tPhotoCaptureAttributes.iCameraCount = attributes.mCameraCount;	
+	tPhotoCaptureAttributes.iCamera = attributes.mCamera;
+	tPhotoCaptureAttributes.iIdle = attributes.mIdle;
+	tPhotoCaptureAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangePhotoCaptureAttributes(tPhotoCaptureAttributes);
+}
+
+// ---------------------------------------------------------------------------	
+
+BluetoothAttributes EngineWrapper::getBluetoothAttributes()
+{
+    TBluetoothAttributes tBluetoothAttributes = mEngine->GetBluetoothAttributes();
+    BluetoothAttributes attributes;
+	
+	attributes.mId = tBluetoothAttributes.iId;
+	attributes.mPriority = tBluetoothAttributes.iPriority;
+	attributes.mIdle = tBluetoothAttributes.iIdle;
+	attributes.mRandomVariance = tBluetoothAttributes.iRandomVariance;
+	attributes.mBluetoothSupported = tBluetoothAttributes.iBluetoothSupported ? true : false;
+	return attributes;
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::setBluetoothAttributes(const BluetoothAttributes& attributes)
+{
+    TBluetoothAttributes tBluetoothAttributes;
+
+	tBluetoothAttributes.iId = attributes.mId;
+	tBluetoothAttributes.iPriority = attributes.mPriority;
+	tBluetoothAttributes.iIdle = attributes.mIdle;
+	tBluetoothAttributes.iRandomVariance = attributes.mRandomVariance;
+	
+	mEngine->ChangeBluetoothAttributes(tBluetoothAttributes);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ReFreshView(CDesCArray* aTextArray) 
+{
+	QStringList itemList;
+	TInt arrayCnt = aTextArray->Count();
+	for (int i = 0; i < arrayCnt; i++) {
+		itemList.append(QString::fromUtf16(
+				  aTextArray->MdcaPoint(i).Ptr(),
+				  aTextArray->MdcaPoint(i).Length()));
+	}
+	mMainView.setLoadListData(itemList);
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::ClearSelection()
+{
+	mMainView.clearListSelection();
+}
+
+// ---------------------------------------------------------------------------	
+
+void EngineWrapper::SetCurrentItemIndex(TInt aIndex) 
+{
+	mMainView.setCurrentItemIndex(aIndex); 
+}
+
+// ---------------------------------------------------------------------------	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/loadgenlistitem.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,232 @@
+/*
+ * LoadGenListItem.cpp
+ *
+ *  Created on: Jul 29, 2010
+ *      Author: sopirbo
+ */
+
+#include "loadgenlistitem.h"
+
+
+#include <hblabel.h>
+#include <hbpushbutton.h>
+#include <hbabstractitemview.h>
+
+#include <QGraphicsLinearLayout>
+#include <QRectF>
+#include <QPainter>
+
+
+LoadGenListItem::LoadGenListItem( EngineWrapper& engWrapp, QGraphicsItem *parent ) : HbListViewItem( parent ),
+		mEngineWrapper(engWrapp),
+		hLayout(0),
+		vLayout(0),
+		hButtonLayout(0),
+	    mItemText(0),
+		mEditButton(0),
+		mSuspendButton(0),
+		mStopButton(0),
+		mIcon(0),
+		mExpanded(false)
+	{
+
+		
+	// TODO Auto-generated constructor stub
+	
+	}
+
+
+LoadGenListItem::~LoadGenListItem()
+	{
+	// TODO Auto-generated destructor stub
+	}
+
+HbAbstractViewItem *LoadGenListItem::createItem()
+{
+    return new LoadGenListItem(*this);
+}
+
+QHash<QString, QVariant> LoadGenListItem::transientState() const
+		{
+
+		QHash<QString,QVariant> state;
+	
+/*		if ( mExpanded )
+			{
+			state.insert( "myexpanded", mExpanded );
+			}
+		else
+			{
+			state.insert( "myexpanded", false );
+			}*/
+		return state;
+		
+		}
+
+void LoadGenListItem::setTransientState(const QHash<QString, QVariant> &state)
+	{
+/*
+	mExpanded = state.value("myexpanded").toBool();*/
+	HbAbstractViewItem::setTransientState( state ); 
+	}
+
+
+void LoadGenListItem::EditButtonClicked()
+	{
+	mEngineWrapper.loadEdit(modelIndex().row());
+	
+	}
+
+void LoadGenListItem::StopButtonClicked()
+	{
+
+
+	mEngineWrapper.asyncStopLoad();
+	}
+
+void LoadGenListItem::SuspendButtonClicked()
+	{
+	mEngineWrapper.asyncSuspendOrResumeSelectedOrHighlightedItems();
+
+
+
+	}
+
+void LoadGenListItem::ChangeExpandedState()
+	{
+	/*
+	if( mExpanded ) 
+		{
+		mExpanded = false;
+		}
+	else
+		{
+		mExpanded=true;
+		}*/
+	}
+
+
+
+void LoadGenListItem::updateChildItems( )
+{
+	if(!hLayout)
+		{
+		init();
+		}
+
+	int userRole = Qt::UserRole + 1;
+	int userRole2 = Qt::UserRole + 2;
+    mExpanded = qvariant_cast<bool>( modelIndex().data( userRole ) );
+    
+    QVariant variant = modelIndex().data(Qt::DisplayRole);
+    
+    QString itemText = qvariant_cast<QString>( variant );
+    if(variant.isValid())
+    	{
+		itemText = qvariant_cast<QString>( variant );
+    	}
+    else
+    	{
+		itemText = "Text tTest";
+    	}
+    
+    QVariant decorationRole = modelIndex().data(Qt::DecorationRole);
+	if (decorationRole.isValid()) 
+	   	{
+	    QIcon icon = qvariant_cast<QIcon>(decorationRole);
+	    mIcon->setIcon( HbIcon(icon) );
+	   	}
+
+	bool suspended = qvariant_cast<bool>( modelIndex().data( userRole2 ) );
+    if( suspended )
+    	{
+		mSuspendButton->setText("Resume");
+    	}
+    else
+    	{
+		mSuspendButton->setText("Suspend");
+    	}
+    
+    if( !mExpanded )
+    	{
+		mItemText->setTextWrapping(Hb::TextNoWrap);
+		mItemText->setPlainText(itemText);
+		vLayout->removeItem(hButtonLayout);
+    	}
+    else
+    	{
+		mItemText->setTextWrapping(Hb::TextWordWrap);
+		mItemText->setPlainText(itemText);
+		//mItemText->setHtml( itemText );
+		vLayout->addItem(hButtonLayout);
+    	}
+    
+    
+}
+
+void LoadGenListItem::initButtonLayout()
+	{
+	    
+	    hButtonLayout = new QGraphicsLinearLayout();
+	    hButtonLayout->setOrientation( Qt::Horizontal );
+
+	    //edit button 
+	    mEditButton = new HbPushButton();
+	    mEditButton->setText("Edit");
+	    hButtonLayout->addItem( mEditButton );
+	    hButtonLayout->setAlignment( mEditButton, Qt::AlignLeft );
+
+	    //pause button 
+	    mSuspendButton = new HbPushButton();
+	    mSuspendButton->setText("SuspRes");
+	    hButtonLayout->addItem( mSuspendButton );
+	    hButtonLayout->setAlignment( mSuspendButton , Qt::AlignLeft );
+	    
+	    //pause button 
+	    mStopButton = new HbPushButton();
+	    mStopButton->setText("Stop");
+	    hButtonLayout->addItem( mStopButton );
+	    hButtonLayout->setAlignment( mStopButton , Qt::AlignLeft );
+	    
+	 
+	    connect( mEditButton, SIGNAL( clicked() ), this , SLOT( EditButtonClicked() ) );
+	    connect( mStopButton, SIGNAL( clicked() ), this , SLOT( StopButtonClicked() ) );
+	    connect( mSuspendButton, SIGNAL( clicked() ), this , SLOT( SuspendButtonClicked() ) );
+	}
+
+
+void LoadGenListItem::init()
+{
+	hLayout = new QGraphicsLinearLayout();
+	hLayout->setContentsMargins(0, 0, 0, 0);
+
+	hLayout->setOrientation( Qt::Horizontal );
+	//hLayout->addItem( layout() );
+
+	vLayout = new QGraphicsLinearLayout();
+	vLayout->setOrientation( Qt::Vertical );
+
+	//icon
+	mIcon = new HbLabel();
+	hLayout->addItem( mIcon );
+	hLayout->setAlignment( mIcon, Qt::AlignLeft );
+	//hLayout->setStretchFactor( mIcon, 1 );
+	
+    //text
+    mItemText = new HbLabel();
+    HbFontSpec fontSpecPrimary( HbFontSpec::Primary );
+    mItemText->setFontSpec( fontSpecPrimary );
+    vLayout->addItem( mItemText );
+    vLayout->setAlignment( mItemText, Qt::AlignLeft );
+
+    
+    initButtonLayout();
+    
+
+	hLayout->addItem( vLayout );
+
+	hLayout->setStretchFactor( vLayout, 2 );
+	
+	setLayout(hLayout);
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/loadgenloaditem.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,88 @@
+/*
+ * LoadGenLoadItem.cpp
+ *
+ *  Created on: Aug 5, 2010
+ *      Author: sopirbo
+ */
+
+#include "LoadGenLoadItem.h"
+
+LoadGenLoadItem::LoadGenLoadItem()
+	{
+	mExpanded = false;
+	mSuspended = false;	
+	// TODO Auto-generated constructor stub
+
+	}
+
+bool LoadGenLoadItem::getExpandedState()
+	{
+	return mExpanded;
+	}
+
+void LoadGenLoadItem::setExpanded( bool state )
+	{
+	mExpanded = state;
+	QVariant variant = QVariant( mExpanded );
+	setData( variant );
+	}
+
+bool LoadGenLoadItem::getSuspendedState()
+	{
+	return mSuspended;
+	}
+
+void LoadGenLoadItem::setSuspended( bool state )
+	{
+	int role = Qt::UserRole + 2;
+	mSuspended = state;
+	QVariant variant = QVariant( mSuspended );
+	setData( variant, role );
+	}
+
+int LoadGenLoadItem::type () const
+	{
+	return QStandardItem::UserType;
+	}
+
+QVariant LoadGenLoadItem::data( int role ) const
+	{
+	QVariant variant;
+	if(role == Qt::UserRole + 1)
+		{
+		variant = QVariant(mExpanded);
+		}
+	if(role == Qt::UserRole + 2)
+		{
+		variant = QVariant(mSuspended);
+		}
+	else
+		{
+		return QStandardItem::data( role );
+		}
+	return variant; 
+	}
+
+void LoadGenLoadItem::setData( const QVariant &value, int role )
+{
+	QVariant variantvalue;
+    if (role == Qt::UserRole + 1)
+    	{
+		variantvalue = QVariant( mExpanded );
+        QStandardItem::setData( variantvalue , role );
+        return;
+    	}
+    if (role == Qt::UserRole + 2)
+    	{
+    	variantvalue = QVariant( mSuspended );
+        QStandardItem::setData( variantvalue , role );
+        return;
+    	}
+    QStandardItem::setData( value, role );
+}
+
+
+LoadGenLoadItem::~LoadGenLoadItem()
+	{
+	// TODO Auto-generated destructor stub
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/main.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <hbmainwindow.h>
+#include <hbapplication.h>
+#include <eikenv.h>
+#include "mainview.h"
+
+
+int main(int argc, char *argv[])
+{
+	HbApplication app(argc, argv);
+    HbMainWindow mainWindow;
+    
+    // set as system application to prevent getting shut down events 
+    CEikonEnv::Static()->SetSystem( ETrue );
+    
+    //Create main view
+    MainView* view = new MainView(mainWindow);
+
+    //initialize main view
+    view->init(app);
+	// Add Views to main window and reveal it.
+    mainWindow.addView(view);
+    mainWindow.show();
+
+    return app.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/mainview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,570 @@
+/*
+* 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 "mainview.h"
+#include "enginewrapper.h"
+#include "notifications.h"
+#include "loadgen.hrh"
+#include <hblabel.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbmessagebox.h>
+#include <hbmainwindow.h>
+#include <hbapplication.h>
+//#include <hbcommonnote.h>
+//#include <hbconfirmationquery.h>
+#include <hbprogressdialog.h>
+#include <hbtextedit.h>
+#include <hblistview.h>
+#include <hbselectiondialog.h>
+#include <hbtoolbar.h>
+
+#include <QGraphicsLinearLayout>
+#include <QStandardItemModel>
+#include <QStandardItem>
+#include <QSignalMapper>
+
+// ---------------------------------------------------------------------------
+
+MainView::MainView(HbMainWindow &mainWindow) :
+					  mMainWindow(mainWindow),
+					  mEngineWrapper(0),
+					  mIsLoadListEmpty(true),
+					  mStopAll(NULL),
+					  mSuspendAll(NULL),
+					  mResumeAll(NULL),
+					  mPrevExpandedItem(-1)
+					  
+{
+}
+
+// ---------------------------------------------------------------------------
+
+MainView::~MainView()
+{
+    if (mEngineWrapper != 0) {
+        delete mEngineWrapper;
+    }
+    delete mListModel;    
+    delete mListView;
+	delete mSm;	
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::init(HbApplication &app)
+{
+	//this->setTitle("Load Gener.");
+	this->setTitle("Load Generator");
+    mEngineWrapper = new EngineWrapper(mMainWindow, *this);
+    int error = mEngineWrapper->init();
+    Q_ASSERT_X(error == 1, "LoadGen", "Engine initialization failed");
+    createMenu(app);
+	loadListIinit();
+	
+	
+	//create toolbar showing launch popup
+	HbToolBar *toolBar = this->toolBar();
+	
+	
+	HbIcon newLoadIcon(QString(":/newload.svg"));
+	newLoadIcon.setFlags(newLoadIcon.flags() | HbIcon::Colorized );
+	HbIcon pauseIcon(QString(":/pause.svg"));
+	pauseIcon.setFlags(pauseIcon.flags() | HbIcon::Colorized );
+	HbIcon playIcon(QString(":/play.svg"));
+	playIcon.setFlags(playIcon.flags() | HbIcon::Colorized );
+	HbIcon stopIcon(QString(":/cross.svg"));
+	stopIcon.setFlags(stopIcon.flags() | HbIcon::Colorized );
+	
+	HbAction *actionNewLoad = new HbAction(newLoadIcon,"", toolBar);
+	HbAction *actionSuspendAll = new HbAction(pauseIcon,"", toolBar);
+	HbAction *actionResumeAll = new HbAction(playIcon,"", toolBar);
+	HbAction *actionStopAll = new HbAction(stopIcon,"", toolBar);
+	
+	toolBar->addAction( actionNewLoad );
+	toolBar->addAction( actionSuspendAll );
+	toolBar->addAction( actionResumeAll );
+	toolBar->addAction( actionStopAll );
+	
+	toolBar->adjustSize();
+	//toolBar->childrenBoundingRect(). //adjustSize();
+	connect(actionNewLoad, SIGNAL( triggered() ), this, SLOT( NewLoad() ));
+	connect(actionSuspendAll, SIGNAL( triggered() ), this, SLOT( suspendAllLoads() ));
+	connect(actionResumeAll, SIGNAL(triggered()), this, SLOT( resumeAllLoads() ));
+	connect(actionStopAll, SIGNAL(triggered()), this, SLOT( stopAllLoads() ));
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::createMenu(HbApplication &app)
+{
+    HbMenu *menu = this->menu();
+	
+    // signal mapper for identifying the different command actions  
+	// in executeCommand() handler function:
+    mSm = new QSignalMapper(this);
+    connect(mSm, SIGNAL(mapped(int)), this, SLOT(executeMenuCommand(int)));
+
+    if (menu != NULL) {
+		// Temp work-around for menu item bug in Orbit Wk38,
+		// sub menu cannot contain more than 6 functional action items!
+		// two sub menus created to fix this problem.
+		mLoadSubMenu1 = menu->addMenu("New loads");
+		//mLoadSubMenu2 = menu->addMenu("More new loads");
+		mCpuLoadAction = mLoadSubMenu1->addAction("CPU load");
+		connect(mCpuLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mCpuLoadAction, ELoadGenCmdNewLoadCPULoad);
+
+		mMemoryEatLoadAction = mLoadSubMenu1->addAction("Eat memory");
+		connect(mMemoryEatLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mMemoryEatLoadAction, ELoadGenCmdNewLoadEatMemory);
+
+		mPhoneCallLoadAction = mLoadSubMenu1->addAction("Phone calls");
+		connect(mPhoneCallLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mPhoneCallLoadAction, ELoadGenCmdNewLoadPhoneCall);
+
+		mMessagesLoadAction = mLoadSubMenu1->addAction("Messages");
+		connect(mMessagesLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mMessagesLoadAction, ELoadGenCmdNewLoadMessages);
+//TODO to be fixed using replacement for downloadmanager
+
+		mNetConnLoadAction = mLoadSubMenu1->addAction("Network conn.");
+		connect(mNetConnLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mNetConnLoadAction, ELoadGenCmdNewLoadNetConn);
+	
+		//mKeyPressLoadAction = mLoadSubMenu2->addAction("Key presses");
+		mKeyPressLoadAction = mLoadSubMenu1->addAction("Key presses");
+		connect(mKeyPressLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mKeyPressLoadAction, ELoadGenCmdNewLoadKeyPress);
+
+		//mAppsLoadAction = mLoadSubMenu2->addAction("Applications");
+		mAppsLoadAction = mLoadSubMenu1->addAction("Applications");
+		connect(mAppsLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mAppsLoadAction, ELoadGenCmdNewLoadApplications);
+		
+		//mPhotoCapturesLoadAction = mLoadSubMenu2->addAction("Photo captures");
+		mPhotoCapturesLoadAction = mLoadSubMenu1->addAction("Photo captures");
+		connect(mPhotoCapturesLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mPhotoCapturesLoadAction, ELoadGenCmdNewLoadPhotoCaptures);
+
+		//mBtActionsLoadAction = mLoadSubMenu2->addAction("Bluetooth actions");
+		mBtActionsLoadAction = mLoadSubMenu1->addAction("Bluetooth actions");
+		connect(mBtActionsLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mBtActionsLoadAction, ELoadGenCmdNewLoadBluetooth);
+
+		//mPointerEventsLoadAction = mLoadSubMenu2->addAction("Pointer events");
+		mPointerEventsLoadAction = mLoadSubMenu1->addAction("Pointer events");
+		connect(mPointerEventsLoadAction, SIGNAL( triggered() ), mSm, SLOT(map()));
+		mSm->setMapping(mPointerEventsLoadAction, ELoadGenCmdNewLoadPointerEvent);
+		
+		mActionPerfMon = menu->addAction("Launch PerfMon");
+		connect(mActionPerfMon, SIGNAL(triggered()), this, SLOT( launchPerfMon()));
+		
+		mActionAbout = menu->addAction("About");
+		connect(mActionAbout, SIGNAL(triggered()), this, SLOT( showAboutPopup()));
+
+		mActionExit = menu->addAction("Exit");
+		connect(mActionExit, SIGNAL(triggered()), &app, SLOT(quit()));
+
+		// menu dynamic update
+		connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));        		
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::loadListIinit()
+{
+	if(mListItemExpanded.count())
+			{
+			mListItemExpanded.clear();
+			}
+    // Create list view and model for it
+    mListView = new HbListView(this);
+    mListView->setItemPrototype( new LoadGenListItem( *mEngineWrapper, mListView ) );
+    mListModel = new QStandardItemModel(this);
+    mListModel->setItemPrototype(new LoadGenLoadItem());
+	mListView->setModel(mListModel); 
+	mListView->setSelectionMode(HbListView::NoSelection);
+	mListView->setVisible( false ); //HighlightMode(HbItemHighlight::Hidden);
+
+    connect(mListView, 
+			SIGNAL(longPressed(HbAbstractViewItem*, QPointF)), 
+			this, 
+			SLOT(handleLoadListEvent(HbAbstractViewItem*, QPointF)));	
+
+    connect(mListView, SIGNAL( activated( const QModelIndex& ) ), this,	SLOT( activated( const QModelIndex& )));
+    
+	
+    // Create layout and add list view there:
+    QGraphicsLinearLayout *mainlayout = new QGraphicsLinearLayout(Qt::Vertical, this);
+    mainlayout->addItem(mListView);
+	mainlayout->setAlignment(mListView, Qt::AlignCenter);
+    setLayout(mainlayout);
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::showAboutPopup()
+{
+    Notifications::about();
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::executeMenuCommand(int cmd)
+{
+	mEngineWrapper->startNewLoad(cmd);
+}
+
+// ---------------------------------------------------------------------------
+
+
+
+void MainView::activated( const QModelIndex& index)
+	{
+	LoadGenListItem* listItem = qobject_cast<LoadGenListItem*>( mListView->viewItem( index.row() ) );
+
+	if( listItem )
+		{
+		if( mPrevExpandedItem == index.row() || mPrevExpandedItem == -1 )
+			{
+			LoadGenLoadItem* item = (LoadGenLoadItem*)(mListModel->item( index.row(), index.column() ));
+			item->setExpanded( !item->getExpandedState() );
+			mPrevExpandedItem = index.row();
+			}
+		else 
+			{
+			LoadGenLoadItem* item = (LoadGenLoadItem*)(mListModel->item( index.row(), index.column() ));
+			item->setExpanded( !item->getExpandedState() );
+			LoadGenLoadItem* prevItem = (LoadGenLoadItem*)(mListModel->item( mPrevExpandedItem, 0 ));
+			if( prevItem ) //in case the load was stopped
+				{
+				if(prevItem->getExpandedState())
+					{
+					prevItem->setExpanded( !prevItem->getExpandedState() );
+					}
+				mPrevExpandedItem = index.row();
+				}
+						
+			}
+		
+		mListView->reset();
+		}
+	}
+/*
+ LoadGenLoadItem* item = (LoadGenLoadItem*)(mListModel->item( index.row(), index.column() ));
+		item->setExpanded( !item->getExpandedState() );
+		//close previous expanded item 
+		if( mPrevExpandedItem == -1 )
+			{
+			mPrevExpandedItem = index.row();
+			}
+		else if( mPrevExpandedItem != index.row() )
+			{
+			LoadGenLoadItem* prevItem = (LoadGenLoadItem*)(mListModel->item( mPrevExpandedItem, 0 ));
+			if( prevItem ) //in case that was stopped
+				{
+				prevItem->setExpanded( !prevItem->getExpandedState() );
+				mPrevExpandedItem = index.row();
+				}
+			else
+				{
+				mPrevExpandedItem = -1;
+				}
+			}
+		mListView->reset();
+ */
+// ---------------------------------------------------------------------------
+
+void MainView::handleLoadListEvent(HbAbstractViewItem */*listViewItem*/, const QPointF &/*coords*/)
+{
+    const QStringList items = (QStringList() << "Stop" << "Resume/Suspend" << "Edit");
+    HbSelectionDialog *dlg = new HbSelectionDialog();
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->setStringItems(items);
+    dlg->setSelectionMode(HbAbstractItemView::SingleSelection);
+    dlg->open(this, SLOT(ItemActionPopupClosed(HbAction*)));
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::ItemActionPopupClosed(HbAction* action)
+{
+    HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
+    if(!action && dlg->selectedItems().count()){
+        int userSelectionIndex = dlg->selectedItems().at(0).toInt();   
+        // all operations for selected list item only. Query selected load list item index from model.
+        if (userSelectionIndex == 0) {
+            // stop selected load from the load list:
+            stopLoad(false);
+        }
+        else if (userSelectionIndex == 1) {
+            // Suspend or Resume
+            mEngineWrapper->suspendOrResumeSelectedOrHighlightedItems();
+        }
+        else {
+            // current selected row number from the load list. 
+            int selectedRow = mListView->selectionModel()->currentIndex().row();
+            // edit load setttings:
+            mEngineWrapper->loadEdit(selectedRow);
+        }
+    }
+}
+
+void MainView::LoadEdit()
+	{
+	int selectedRow = mListView->selectionModel()->currentIndex().row();
+	
+	mEngineWrapper->loadEdit(selectedRow);
+	}
+// --------------------------------------------------------------------------
+
+void MainView::stopAllLoads()
+{
+	stopLoad(true);
+}
+
+// ---------------------------------------------------------------------------
+
+bool MainView::stopLoad(bool stopAll)
+{
+	int success = false;
+	if (mListView != NULL) {
+		if (stopAll == true) {
+			success = mEngineWrapper->stopLoad(stopAll);
+			mIsLoadListEmpty = true;
+		}
+		else {
+			success = mEngineWrapper->stopLoad(stopAll);
+		}
+	}
+	return success;
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::updateMenu()
+{
+	if (mIsLoadListEmpty != true) {
+		if (mStopAll == NULL) {
+			mStopAll = new HbAction("Stop all", menu());
+			connect(mStopAll, SIGNAL(triggered()), this, SLOT(stopAllLoads()));
+			menu()->insertAction(mActionAbout, mStopAll);
+		}
+		else{
+            mStopAll->setVisible(true);
+		}
+		if (mSuspendAll == NULL) {
+			mSuspendAll = new HbAction("Suspend all", menu());
+			connect(mSuspendAll, SIGNAL(triggered()), this, SLOT(suspendAllLoads()));
+			menu()->insertAction(mActionAbout, mSuspendAll);
+		}
+		else{
+            mSuspendAll->setVisible(true);
+        }
+		if (mResumeAll == NULL) {
+			mResumeAll = new HbAction("Resume all", menu());
+			connect(mResumeAll, SIGNAL(triggered()), this, SLOT(resumeAllLoads()));
+			menu()->insertAction(mActionAbout, mResumeAll);
+		}
+		else{
+            mResumeAll->setVisible(true);
+        }
+	}
+	else if (mIsLoadListEmpty == true) {
+		if (mStopAll != NULL && mStopAll->text() == "Stop all") {
+            mStopAll->setVisible(false);
+		}
+		if (mSuspendAll != NULL && mSuspendAll->text() == "Suspend all") {
+            mSuspendAll->setVisible(false);
+		}
+		if (mResumeAll != NULL && mResumeAll->text() == "Resume all") {
+            mSuspendAll->setVisible(false);
+		}		
+	}
+}
+
+
+// ---------------------------------------------------------------------------
+
+int MainView::currentItemIndex()
+{
+	return mListView->selectionModel()->currentIndex().row();
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::setCurrentItemIndex(int index) 
+{
+    QModelIndex newIndex = mListView->model()->index(index, 0);
+    mListView->selectionModel()->setCurrentIndex(newIndex, 
+                                                QItemSelectionModel::SelectCurrent);
+	//mListView->setCurrentIndex( index ); //setCurrentRow(index);
+}	
+
+// ---------------------------------------------------------------------------
+
+void MainView::launchPerfMon()
+{
+	mEngineWrapper->launchPerfMonApp();
+}
+
+// ---------------------------------------------------------------------------
+
+QList<int> MainView::listSelectionIndexes()
+    {
+	QList<int> indices;
+    if (mListView != NULL) {
+		QItemSelectionModel *selectionModel = mListView->selectionModel();
+		if (selectionModel->hasSelection()) {
+			QModelIndexList modelIndexes = selectionModel->selectedIndexes();
+			QModelIndex index;
+			foreach (index, modelIndexes) {
+				indices.append(index.row());
+			}
+		}
+    }
+    return indices;
+	}
+
+// --------------------------------------------------------------------------------------------
+
+void MainView::NewLoad()
+	{
+	const QStringList items = (QStringList() << "CPU Load" << "Eat memory" << "Phone calls" << "Messages" << "Network conn." << "Key presses" << "Applications" << "Photo captures" << "Bluetooth actions" << "Pointer events" );
+    HbSelectionDialog *dlg = new HbSelectionDialog();
+    dlg->setAttribute(Qt::WA_DeleteOnClose);
+    dlg->setStringItems(items);
+    dlg->setSelectionMode(HbAbstractItemView::SingleSelection);
+    dlg->open(this, SLOT(loadActionPopupClosed(HbAction*)));
+	}
+
+
+void MainView::loadActionPopupClosed(HbAction* action)
+	{
+	HbSelectionDialog *dlg = static_cast<HbSelectionDialog*>(sender());
+	    if(!action && dlg->selectedItems().count()){
+	        int userSelectionIndex = dlg->selectedItems().at(0).toInt();   
+	        // all operations for selected list item only. Query selected load list item index from model.
+	        if (userSelectionIndex == 0) {
+				mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadCPULoad);
+	        }
+	        if (userSelectionIndex == 1) {
+				mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadEatMemory);
+	        }
+	        if (userSelectionIndex == 2) {
+	        	mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadPhoneCall);
+	        }
+	        if (userSelectionIndex == 3) {
+	           	mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadMessages);
+	        }
+	        if (userSelectionIndex == 4) {
+	        	mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadNetConn);
+	        }
+	        if (userSelectionIndex == 5) {
+	        	mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadKeyPress);
+	        }
+	        if (userSelectionIndex == 6) {
+	        	mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadApplications);
+	        }
+	        if (userSelectionIndex == 7) {
+	        	mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadPhotoCaptures);
+	        }
+	        if (userSelectionIndex == 8) {
+	        	mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadBluetooth);
+	        }
+	        if (userSelectionIndex == 9) {
+	       	    mEngineWrapper->startNewLoad(ELoadGenCmdNewLoadPointerEvent);
+	       	}
+	        	        
+	    }
+	}
+ 
+// --------------------------------------------------------------------------------------------
+void MainView::suspendAllLoads()
+{
+	mEngineWrapper->suspendAllLoadItems();
+}
+
+// ---------------------------------------------------------------------------
+	
+void MainView::resumeAllLoads()
+{
+	mEngineWrapper->resumeAllLoadItems();
+}
+
+void MainView::clearListSelection()
+{
+    if (mListView != NULL) {
+		mListView->clearSelection();
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::setLoadListData(QStringList& items)
+{
+	QString loadItem;
+	QString iconName;
+	mListItemExpanded.clear();
+	
+	if (mListView) {
+	mListView->setSelectionMode(HbListView::MultiSelection);
+	mListView->setVisible(true); //setHighlightMode(HbItemHighlight::AlwaysVisible);
+	mListModel->clear();
+	}
+	if (items.count() > 0) {
+		mIsLoadListEmpty = false;
+	}
+	else if (items.count() == 0) {
+		mIsLoadListEmpty = true;
+	}
+	for (int i = 0; i < items.count(); i++) {
+		 
+		LoadGenLoadItem *item = new LoadGenLoadItem();
+		//QStandardItem *item = new QStandardItem();
+		
+		loadItem = items.at(i);
+		if (loadItem.startsWith("1")) {
+			iconName = ":/paused.svg";
+			item->setSuspended(true);
+		}
+		else {
+			iconName = ":/active.svg";
+			item->setSuspended(false);
+		}
+		// remove icon indicator info from string
+		// to show in load in load list
+		loadItem.remove(0,2);
+		item->setText(loadItem);
+		item->setIcon(QIcon(iconName));
+		if(i == mPrevExpandedItem)
+			{
+			item->setExpanded(false);
+			//item->setExpanded(true);
+			}
+		else 
+			{
+			item->setExpanded(false);
+			}
+		// set new load to correct row in load list
+		mListModel->appendRow(item); //insertRow(i, item);
+	}
+}	
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/notifications.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <hbmessagebox.h>
+#include <hblabel.h>
+#include <QString>
+
+#include "notifications.h"
+
+
+// ---------------------------------------------------------------------------
+
+void Notifications::about()
+{
+    HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+    messageBox->setText("Version 1.6.0 - October 8th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.");
+    HbLabel *header = new HbLabel("About LoadGen", messageBox);
+    messageBox->setHeadingWidget(header);
+    messageBox->setAttribute(Qt::WA_DeleteOnClose);
+    messageBox->setTimeout(HbPopup::NoTimeout);
+    messageBox->open();
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::error(const QString& errorMessage)
+{
+	showGlobalNote(errorMessage, HbMessageBox::MessageTypeWarning );
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type, HbPopup::DefaultTimeout timeout)
+{
+    HbMessageBox *messageBox = new HbMessageBox(type);
+    messageBox->setText(text);
+    messageBox->setTimeout(timeout);
+    messageBox->setAttribute(Qt::WA_DeleteOnClose);
+    messageBox->open();
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/loadgen/ui/hb/src/settingsview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1271 @@
+/*
+* 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 "settingsview.h"
+#include "enginewrapper.h"
+#include "loadgen.hrh"
+#include "loadgen_loadattributes.h"
+#include <hbmainwindow.h>
+#include <hbview.h>
+//#include <hbformitem.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbmessagebox.h>
+//#include <hbcommonnote.h>
+#include <hbtoolbar.h>
+#include <hbdataform.h>
+#include <hbdataformmodelitem.h>
+#include <hbdataformmodel.h>
+#include <hbdataformviewitem.h>
+#include <hbabstractviewitem.h>
+#include <hbradiobuttonlist.h>
+
+
+#include <QStringList>
+
+QStringList PRIORITIES = (QStringList() << "Much less (-20)" << "Less (-10)" << "Normal (0)" << "More (10)" 
+						 << "Much more (20)" << "Real time (30)" << "Abs. very low (100)" << "Abs. low (200)" 
+						 << "Abs. backgr. (300)" << "Abs. foregr. (400)" << "Abs. high (500)");
+QStringList LOADMODES = (QStringList() << "Yielding" << "Blocking");
+QStringList CPULOADTYPES = (QStringList() << "Continuous" << "Periodic");		   
+QStringList MEMSOURCES = (QStringList() << "RAM" << "C:" << "D:" << "E:" << "F:" << "G:" << "H:" << "J:" << "K:" 
+										<< "L:" << "M:" << "N:");
+QStringList MEMEATTYPES = (QStringList() << "Memory to eat" << "Memory to be left" << "Alternate min/max");
+QStringList KEYPRESSTYPES = (QStringList() << "None" << "Arrow keys");
+QStringList MESSAGETYPES = (QStringList() << "SMS" << "MMS");
+
+		   
+SettingsView::SettingsView(HbView &mainView, HbMainWindow &parent, EngineWrapper &engine)
+                          
+    : mMainWindow(parent),
+      mMainView(mainView),
+      mEngineWrapper(engine),
+	  mAmount(NULL),
+	  mMinAmountToBeLeft(NULL),
+	  mMaxAmountToBeLeft(NULL),
+	  mLength(NULL),
+	  mIdle(NULL),
+	  mRandomVar(NULL)
+{
+}
+
+SettingsView::~SettingsView()
+{
+
+}
+
+// TODO HbDataFormModelItem data operations does not work correctly with WK38.
+// Item data does not get updated correctly as set by initial settings(HbDataFormModelItem::RadioButtonListItem) 
+// or user settings.(HbDataFormModelItem::TextItem)
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::open(const QString &settingsName, TLoadGenCommandIds cmdId)
+{
+	mCmdId = cmdId;
+    // Remove main view from main window and add this view to main window
+    mMainWindow.addView(this);
+    mMainWindow.setCurrentView(this);
+    setTitle(settingsName);
+
+    //create toolbar showing launch popup
+    HbToolBar *toolBar = this->toolBar();
+    HbAction *actionOk = new HbAction("Ok", toolBar);
+    HbAction *actionCancel = new HbAction("Cancel", toolBar);
+    toolBar->addAction( actionOk );
+    toolBar->addAction( actionCancel );	
+
+    //create setting form
+    mSettingForm = new HbDataForm();
+    
+    //create a model class
+    mModel = new HbDataFormModel(this);
+	createItems(mModel, 0);
+    // Set created model to form
+	
+    mSettingForm->setModel(mModel);
+    setWidget(mSettingForm);
+	loadAttributes();	
+	
+    connect(actionOk, SIGNAL(triggered()), this, SLOT(okExit()));
+	connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelled()));
+	connect(this, SIGNAL(aboutToClose()), this, SLOT(backButtonPressed()));
+	//connect(mSettingForm, SIGNAL(activated(const QModelIndex)), this, SLOT(dataItemDisplayed(const QModelIndex)));
+	
+	show();
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createItems(HbDataFormModel *model, 
+							   HbDataFormModelItem *parent)
+{
+	switch (mCmdId) {
+		case ELoadGenCmdNewLoadCPULoad: {
+			createCpuLoadItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadEatMemory: {
+			createEatMemoryItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadPhoneCall: {
+			createPhoneCallItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadNetConn: {
+			createNetConnItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadKeyPress:
+		case ELoadGenCmdNewLoadPointerEvent: {
+			createKeyOrPointerItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadMessages: {
+			createMessageItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadApplications: {
+			createAppsItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadPhotoCaptures: {
+			createPhotoItems(model, parent);
+			break;
+		}
+		case ELoadGenCmdNewLoadBluetooth: {
+			createBtItems(model, parent);
+			break;
+		}
+		default: {
+			break;
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createCpuLoadItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+
+	mLoadSettings = parent;
+	//mLoadSettings = model->appendDataFormGroup(QString("CPU load settings"), parent);
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"),
+										  mLoadSettings);
+										  
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	// DataFormItem for load mode selection
+	mLoadMode = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Load mode"),
+										  mLoadSettings);
+	mLoadMode->setContentWidgetData(QString("items"), LOADMODES);		
+
+	// DataFormItem for load type selection
+	mType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+									  QString("Type"),
+								      mLoadSettings);
+	mType->setContentWidgetData(QString("items"), CPULOADTYPES);
+
+	mSettingForm->addConnection(mType,SIGNAL(itemSelected(int)),this,SLOT(selectionChanged(int)));
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createEatMemoryItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+	mLoadSettings = parent;
+	//mLoadSettings = model->appendDataFormGroup(QString("Eat memory settings"), parent);
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	// DataFormItem for memory eat type selection
+	mSource = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+									  QString("Source"), 
+									  mLoadSettings);
+	mSource->setContentWidgetData(QString("items"), MEMSOURCES);
+
+	
+	// DataFormItem for memory eat type selection
+	mType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+									  QString("Type"), 
+									  mLoadSettings);
+	mType->setContentWidgetData(QString("items"), MEMEATTYPES);
+
+	// DataFormItem for idle length selection
+	mBuffer = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Buffer (B)"), 
+									  mLoadSettings);
+	mBuffer->setContentWidgetData("maximum" , 999999999);
+	mBuffer->setContentWidgetData("minimum", 0);	
+	
+	// DataFormItem for idle length selection
+	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Idle after buffer (ms)"), 
+									  mLoadSettings);
+	mIdle->setContentWidgetData("maximum" , 999999999);
+	mIdle->setContentWidgetData("minimum", 0);			
+
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+	
+	mSettingForm->addConnection(mType,SIGNAL(itemSelected(int)),this,SLOT(selectionChanged(int)));
+}	
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createPhoneCallItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+
+	mLoadSettings = parent;
+	//mLoadSettings = model->appendDataFormGroup(QString("Phone calls settings"), parent);
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	mDestination = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										QString("Phone number:"), 
+										mLoadSettings);
+	mDestination->setContentWidgetData("maximum" , 99999999999999999999.0 );
+	mDestination->setContentWidgetData("minimum", 0);
+
+	mLength = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										QString("Length (ms)"), 
+										mLoadSettings);
+	mLength->setContentWidgetData("maximum" , 999999999);
+	mLength->setContentWidgetData("minimum", 0);
+	
+	// DataFormItem for idle length selection
+	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Idle (ms)"), 
+									  mLoadSettings);
+	mIdle->setContentWidgetData("maximum" , 999999999);
+	mIdle->setContentWidgetData("minimum", 0);			
+
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createNetConnItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+
+	//mLoadSettings = model->appendDataFormGroup(QString("Network conn. settings"), parent);
+	mLoadSettings = parent;
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	mDestination = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										QString("Destination URL:"), 
+										mLoadSettings);
+	
+	// DataFormItem for idle length selection
+	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Idle (ms)"), 
+									  mLoadSettings);
+	mIdle->setContentWidgetData("maximum" , 999999999);
+	mIdle->setContentWidgetData("minimum", 0);			
+
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createKeyOrPointerItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+	QString settingsName;
+	if (mCmdId == ELoadGenCmdNewLoadPointerEvent) {
+		settingsName = "Pointer events settings";
+	}
+	else {
+		settingsName = "Key presses settings";
+	}
+	//mLoadSettings = model->appendDataFormGroup(settingsName, parent);
+	mLoadSettings = parent;
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	
+	// DataFormItem for heartbeat length selection
+	mHeartBeat = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Heartbeat (ms)"), 
+									  mLoadSettings);
+	mHeartBeat->setContentWidgetData("maximum" , 999999999);
+	mHeartBeat->setContentWidgetData("minimum", 0);		
+	
+	// Random variance
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createMessageItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+	mLoadSettings = parent;
+	//mLoadSettings = model->appendDataFormGroup(QString("Messages settings"), parent);
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	
+	mType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+									  QString("Type"), 
+									  mLoadSettings);
+	mType->setContentWidgetData(QString("items"), MESSAGETYPES);	
+
+
+	mDestination = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										QString("Phone number:"), 
+										mLoadSettings);
+	mDestination->setContentWidgetData("maximum" , 99999999999999999999.0 );
+	mDestination->setContentWidgetData("minimum", 0);
+	
+	mAmount	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
+									  QString("Maximum amount of messages"), 
+									  mLoadSettings);
+	mAmount->setContentWidgetData("maximum" , 1000);
+	mAmount->setContentWidgetData("minimum", 0);
+
+	mLength = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										QString("Message length"), 
+										mLoadSettings);
+	mLength->setContentWidgetData("maximum" , 999999999);
+	mLength->setContentWidgetData("minimum", 0);
+
+	// DataFormItem for idle length selection
+	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Idle (ms)"), 
+									  mLoadSettings);
+	mIdle->setContentWidgetData("maximum" , 999999999);
+	mIdle->setContentWidgetData("minimum", 0);			
+
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createAppsItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+	//mLoadSettings = model->appendDataFormGroup(QString("Applications settings"), parent);
+	mLoadSettings = parent;
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	mMaxParallelApps = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Max parallel applications"), 
+									  mLoadSettings);
+	mMaxParallelApps->setContentWidgetData("maximum" , 100);
+	mMaxParallelApps->setContentWidgetData("minimum", 0);	
+
+
+	// DataFormItem for launching interval length selection
+	mLaunchingInterval = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Launching interval (ms)"), 
+									  mLoadSettings);
+	mLaunchingInterval->setContentWidgetData("maximum" , 999999999);
+	mLaunchingInterval->setContentWidgetData("minimum", 0);	
+	
+	// DataFormItem for key press type selection
+	mKeyPressType = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Key press type"), 
+										  mLoadSettings);
+	mKeyPressType->setContentWidgetData(QString("items"), KEYPRESSTYPES);	
+
+	// DataFormItem for heartbeat length selection
+	mHeartBeat = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Key press interval (ms)"), 
+									  mLoadSettings);
+	mHeartBeat->setContentWidgetData("maximum" , 999999999);
+	mHeartBeat->setContentWidgetData("minimum", 0);		
+	
+	// Random variance
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createPhotoItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+	//mLoadSettings = model->appendDataFormGroup(QString("Camera settings"), parent);
+	mLoadSettings = parent;
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	
+	// DataFormItem for idle length selection
+	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Idle (ms)"), 
+									  mLoadSettings);
+	mIdle->setContentWidgetData("maximum" , 999999999);
+	mIdle->setContentWidgetData("minimum", 0);		
+	
+	// Random variance
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createBtItems(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+	//mLoadSettings = model->appendDataFormGroup(QString("Bluetooth settings"), parent);
+	mLoadSettings = parent;
+	
+	// DataFormItem for priority selection
+	mPriority = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+										  QString("Priority"), 
+										  mLoadSettings);
+	mPriority->setContentWidgetData(QString("items"), PRIORITIES);
+
+	
+	// DataFormItem for idle length selection
+	mIdle = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+									  QString("Idle (ms)"), 
+									  mLoadSettings);
+	mIdle->setContentWidgetData("maximum" , 999999999);
+	mIdle->setContentWidgetData("minimum", 0);		
+	
+	// Random variance
+	mRandomVar = model->appendDataFormItem(HbDataFormModelItem::TextItem, 
+										   QString("Random variance (%)"), 
+										   mLoadSettings);
+	mRandomVar->setContentWidgetData("maximum" , 100);
+	mRandomVar->setContentWidgetData("minimum", 0);	
+}
+
+// ---------------------------------------------------------------------------
+// Load attributes from engine & set the data into each form model item:
+
+void SettingsView::loadAttributes()
+{
+	switch (mCmdId)
+	{
+		case ELoadGenCmdNewLoadCPULoad: {
+			mCPULoadAttributes = mEngineWrapper.getCpuLoadAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mCPULoadAttributes.mPriority);
+			mLoadMode->setContentWidgetData(QString("selected"), mCPULoadAttributes.mMode);
+			mType->setContentWidgetData(QString("selected"), mCPULoadAttributes.mType);
+			
+			if (mCPULoadAttributes.mType == ECpuLoadTypePeriodic) {	//if (mCPULoadAttributes.mMode == ECpuLoadTypePeriodic) {
+			// Create and append to model these items: Length, Idle, Random variance, if load type is peridodic.
+				
+				// DataFormItem for load length selection
+				mLength = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+													QString("Length (ms)"), 
+													mLoadSettings);
+				mLength->setContentWidgetData("maximum" , 999999999);
+				mLength->setContentWidgetData("minimum", 0);
+				
+				
+				// DataFormItem for load length selection
+				mIdle = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+												  QString("Idle (ms)"), 
+												  mLoadSettings);
+				mIdle->setContentWidgetData("maximum" , 999999999);
+				mIdle->setContentWidgetData("minimum", 0);			
+
+				mRandomVar = mModel->appendDataFormItem(HbDataFormModelItem::TextItem, 
+													   QString("Random variance (%)"), 
+													   mLoadSettings);
+				mRandomVar->setContentWidgetData("maximum" , 100);
+				mRandomVar->setContentWidgetData("minimum", 0);	
+			
+				mLength->setContentWidgetData(QString("text"), mCPULoadAttributes.mLength);
+				mIdle->setContentWidgetData(QString("text"), mCPULoadAttributes.mIdle);
+				mRandomVar->setContentWidgetData(QString("text"), mCPULoadAttributes.mRandomVariance);
+			}
+
+			// if there's more than one cpu available in the system, 
+			// insert possibility to select which cpu the load is generated to
+			if (mCPULoadAttributes.mCpuCount > 1)
+            {
+				QStringList cpuArray;
+				cpuArray.append("Free scheduling");
+				// add cpus to list:
+				for (int i = 0; i < mCPULoadAttributes.mCpuCount; i++) 
+					{
+					QString cpu = QString("CPU%1").arg(i);
+					cpuArray.append(cpu);
+					}    
+				// "All CPUs" means that one thread is started for each CPU.	
+				cpuArray.append("All CPUs");
+
+				mCpu = mModel->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, 
+													 QString("CPU"), 
+													 mLoadSettings);
+				mCpu->setContentWidgetData(QString("items"), cpuArray);				
+
+				if (mCPULoadAttributes.mCpu < 0) {
+					mCpu->setContentWidgetData(QString("selected"), 0);
+				}				
+
+				else if (mCPULoadAttributes.mCpu == KCPUSelection_AllCPUs) {
+					mCpu->setContentWidgetData(QString("selected"), cpuArray.count()-1);
+				}
+				// CPU is defined, set the correct CPU as default selection in query list
+				else {
+				// mCpu starts from zero (i.e. CPU0 is first CPU), but index zero
+				// in settings Ui form item is reserved for "Free scheduling", hence iCpu+1.
+					mCpu->setContentWidgetData(QString("selected"), mCPULoadAttributes.mCpu+1);
+				}
+            }
+			break;
+		}
+		case ELoadGenCmdNewLoadEatMemory: {
+			mMemoryEatAttributes = mEngineWrapper.getMemoryEatAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mMemoryEatAttributes.mPriority);
+			mSource->setContentWidgetData(QString("selected"), mMemoryEatAttributes.mSource);
+			mType->setContentWidgetData(QString("selected"), mMemoryEatAttributes.mType);
+			
+			if (mMemoryEatAttributes.mType == EMemoryEatTypeWavy) {
+				mMinAmountToBeLeft	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
+												  QString("Min to be left (B)"), 
+												  mLoadSettings);
+				mMinAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
+				mMinAmountToBeLeft->setContentWidgetData("minimum", 0);
+				
+				mMaxAmountToBeLeft	= mModel->insertDataFormItem(4, HbDataFormModelItem::TextItem, 
+												  QString("Max to be left (B)"), 
+												  mLoadSettings);
+				mMaxAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
+				mMaxAmountToBeLeft->setContentWidgetData("minimum", 0);
+
+				mMinAmountToBeLeft->setContentWidgetData(QString("text"), mMemoryEatAttributes.mRandomMinDes);
+				mMaxAmountToBeLeft->setContentWidgetData(QString("text"), mMemoryEatAttributes.mRandomMaxDes);
+			}
+			else if (mMemoryEatAttributes.mType == EMemoryEatTypeMemoryToEat ||
+			         mMemoryEatAttributes.mType == EMemoryEatTypeMemoryToBeLeft ) {
+				mAmount	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
+												  QString("Amout(B)"), 
+												  mLoadSettings);
+				mAmount->setContentWidgetData("maximum" , 999999999999999);
+				mAmount->setContentWidgetData("minimum", 0);
+				
+				mAmount->setContentWidgetData(QString("text"), mMemoryEatAttributes.mAmount);	 
+			}
+			mBuffer->setContentWidgetData(QString("text"), mMemoryEatAttributes.mBuffer);
+			mIdle->setContentWidgetData(QString("text"), mMemoryEatAttributes.mIdle);
+			mRandomVar->setContentWidgetData(QString("text"), mMemoryEatAttributes.mRandomVariance);
+			break;
+		}
+		case ELoadGenCmdNewLoadPhoneCall: {
+			mPhoneCallAttributes = mEngineWrapper.getPhoneCallAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mPhoneCallAttributes.mPriority);
+			mDestination->setContentWidgetData(QString("text"), mPhoneCallAttributes.mDestination);
+			mLength->setContentWidgetData(QString("text"), mPhoneCallAttributes.mLength);
+			mIdle->setContentWidgetData(QString("text"), mPhoneCallAttributes.mIdle);
+			mRandomVar->setContentWidgetData(QString("text"), mPhoneCallAttributes.mRandomVariance);
+			break;
+		}
+		case ELoadGenCmdNewLoadNetConn: {
+			mNetConnAttributes = mEngineWrapper.getNetConnAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mNetConnAttributes.mPriority);
+			mDestination->setContentWidgetData(QString("text"), mNetConnAttributes.mDestination);
+			mIdle->setContentWidgetData(QString("text"), mNetConnAttributes.mIdle);
+			mRandomVar->setContentWidgetData(QString("text"), mNetConnAttributes.mRandomVariance);
+			break;
+		}
+		case ELoadGenCmdNewLoadKeyPress: {
+			mKeyPressAttributes = mEngineWrapper.getKeyPressAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mKeyPressAttributes.mPriority);
+			mHeartBeat->setContentWidgetData(QString("text"), mKeyPressAttributes.mHeartBeat);
+			mRandomVar->setContentWidgetData(QString("text"), mKeyPressAttributes.mRandomVariance);			
+			break;
+		}
+		case ELoadGenCmdNewLoadPointerEvent: { 
+			mPointerEventAttributes = mEngineWrapper.getPointerEventAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mPointerEventAttributes.mPriority);
+			mHeartBeat->setContentWidgetData(QString("text"), mPointerEventAttributes.mHeartBeat);
+			mRandomVar->setContentWidgetData(QString("text"), mPointerEventAttributes.mRandomVariance);				
+			break;
+		}
+		case ELoadGenCmdNewLoadMessages: {
+			mMessageAttributes = mEngineWrapper.getMessageAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mMessageAttributes.mPriority);
+			mType->setContentWidgetData(QString("selected"), mMessageAttributes.mMessageType);
+			mDestination->setContentWidgetData(QString("text"), mMessageAttributes.mDestination);
+			mAmount->setContentWidgetData(QString("text"), mMessageAttributes.mAmount);	 
+			mLength->setContentWidgetData(QString("text"), mMessageAttributes.mLength);
+			mIdle->setContentWidgetData(QString("text"), mMessageAttributes.mIdle);
+			mRandomVar->setContentWidgetData(QString("text"), mMessageAttributes.mRandomVariance);
+			break;
+		}
+		case ELoadGenCmdNewLoadApplications: {
+			mApplicationsAttributes = mEngineWrapper.getApplicationsAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mApplicationsAttributes.mPriority);
+			mMaxParallelApps->setContentWidgetData(QString("text"), mApplicationsAttributes.mMaxOpen);
+			mHeartBeat->setContentWidgetData(QString("text"), mApplicationsAttributes.mHeartBeat);
+			mLaunchingInterval->setContentWidgetData(QString("text"), mApplicationsAttributes.mLaunchingInterval);
+			mKeyPressType->setContentWidgetData(QString("selected"), mApplicationsAttributes.mKeyPressType);
+			mRandomVar->setContentWidgetData(QString("text"), mApplicationsAttributes.mRandomVariance);						
+			break;
+		}
+		case ELoadGenCmdNewLoadPhotoCaptures: {
+			mPhotoCaptureAttributes = mEngineWrapper.getPhotoCaptureAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mPhotoCaptureAttributes.mPriority);
+			mIdle->setContentWidgetData(QString("text"), mPhotoCaptureAttributes.mIdle);
+			mRandomVar->setContentWidgetData(QString("text"), mPhotoCaptureAttributes.mRandomVariance);
+			
+			// if there's any cameras avaialable in system, construct form item for it/them:
+			if (mPhotoCaptureAttributes.mCameraCount > 0)
+            {
+				QStringList devices;
+				// add cameras to list:
+				for (int i = 0; i < mPhotoCaptureAttributes.mCameraCount; i++) 
+					{
+					QString cam = QString("Camera %1").arg(i);
+					devices.append(cam);
+					}    
+				mCamera = mModel->insertDataFormItem(1, HbDataFormModelItem::RadioButtonListItem, 
+													 QString("Device"), 
+													 mLoadSettings);
+				mCamera->setContentWidgetData(QString("items"), devices);
+				mCamera->setContentWidgetData(QString("selected"), mPhotoCaptureAttributes.mCamera);
+            }
+			break;
+		}
+		case ELoadGenCmdNewLoadBluetooth: {
+			mBluetoothAttributes = mEngineWrapper.getBluetoothAttributes();
+			mPriority->setContentWidgetData(QString("selected"), mBluetoothAttributes.mPriority);
+			mIdle->setContentWidgetData(QString("text"), mBluetoothAttributes.mIdle);
+			mRandomVar->setContentWidgetData(QString("text"), mBluetoothAttributes.mRandomVariance);	
+			break;
+		}
+		
+		default: {
+			break;
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::setDefaultSettings()
+{
+
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::backButtonPressed()
+{
+	okExit();	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::saveSettings()
+{
+	switch (mCmdId) {
+		case ELoadGenCmdNewLoadCPULoad: {
+			saveCpuLoadSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadEatMemory: {
+			saveEatMemorySettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadPhoneCall: {
+			savePhoneCallSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadNetConn: {
+			saveNetConnSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadKeyPress: {
+			saveKeyPressSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadPointerEvent: {
+			savePointerEventSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadMessages: {
+			saveMessageSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadApplications: {
+			saveApplicationsSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadPhotoCaptures: {
+			savePhotoSettings();
+			break;
+		}
+		case ELoadGenCmdNewLoadBluetooth: {
+			saveBtSettings();
+			break;
+		}
+		default: {
+			break;
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------	
+	
+void SettingsView::saveCpuLoadSettings()
+{
+	mCPULoadAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
+	mCPULoadAttributes.mMode = mLoadMode->contentWidgetData("selected").toInt();
+	mCPULoadAttributes.mType = mType->contentWidgetData("selected").toInt();
+	if (mType->contentWidgetData("selected").toInt() == ECpuLoadTypePeriodic) {
+		// TODO: remove temp checks if (mLength != NULL) etc. when HbDataFormModelItem bugs fixed.
+		if (mLength != NULL) {
+			mCPULoadAttributes.mLength = mLength->contentWidgetData("text").toInt();
+		}
+		if (mIdle != NULL) {			
+			mCPULoadAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
+		}
+		if (mRandomVar != NULL) {
+			int randVar = mRandomVar->contentWidgetData("text").toInt();
+			if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+				{
+				mCPULoadAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+				}
+			else
+				{
+				mCPULoadAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
+				}
+		}
+	}
+
+	// we are running in SMP environment
+	if (mCPULoadAttributes.mCpuCount > 1)
+		{
+		TInt currentValueIndex = mCpu->contentWidgetData("selected").toInt();
+		// user selected a specific CPU in which the load thread should be run in.
+		if (currentValueIndex == 0)
+			{
+			// User selected "Free scheduling"
+			mCPULoadAttributes.mCpu = KCPUSelection_FreeScheduling;
+			}            
+		else if( currentValueIndex == (mCpu->childCount()-1) )
+			{
+			// User selected "All CPUs", which is the last item in the form radio button selection list
+			mCPULoadAttributes.mCpu = KCPUSelection_AllCPUs;
+			}
+		else
+			{                
+			// mCpu should start from zero (CPU0 is the first cpu)
+			// but zero in Ui form item index means "Free scheduling". CPU0 in
+			// index of form radio button list is at index 1, hence -1.
+			mCPULoadAttributes.mCpu = currentValueIndex - 1;
+			}
+		}
+
+	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::saveEatMemorySettings()
+{
+	mMemoryEatAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
+	mMemoryEatAttributes.mSource = mSource->contentWidgetData("selected").toInt();
+	mMemoryEatAttributes.mType = mType->contentWidgetData("selected").toInt();
+	
+	if (mType->contentWidgetData("selected").toInt() == EMemoryEatTypeWavy) {
+		// TODO: remove temp checks if (mLength != NULL) etc. when HbDataFormModelItem bugs fixed.
+		if (mMinAmountToBeLeft != NULL) {
+			mMemoryEatAttributes.mRandomMin = 
+				mMinAmountToBeLeft->contentWidgetData("text").toInt();
+		}
+		if (mMaxAmountToBeLeft != NULL) {
+			mMemoryEatAttributes.mRandomMax = 
+				mMaxAmountToBeLeft->contentWidgetData("text").toInt();
+		}
+	}
+	else if (mType->contentWidgetData("selected").toInt() == EMemoryEatTypeMemoryToEat ||
+	         mType->contentWidgetData("selected").toInt() == EMemoryEatTypeMemoryToBeLeft) {
+		if (mAmount != NULL) {
+			//mMemoryEatAttributes.mAmount = mAmount->contentWidgetData("text").toInt();
+		mMemoryEatAttributes.mAmount = mAmount->contentWidgetData("text").toDouble();
+		}
+	}
+	mMemoryEatAttributes.mBuffer = mBuffer->contentWidgetData("text").toInt();
+	mMemoryEatAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
+	
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mMemoryEatAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mMemoryEatAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
+		}
+	
+    // swap min- & max values if they are in wrong order
+	if (mMemoryEatAttributes.mRandomMin > mMemoryEatAttributes.mRandomMax)
+		{
+		qint64 temp(mMemoryEatAttributes.mRandomMin);
+		mMemoryEatAttributes.mRandomMin = mMemoryEatAttributes.mRandomMax;
+		mMemoryEatAttributes.mRandomMax = temp; 
+		}	
+}
+
+// ---------------------------------------------------------------------------	
+	
+void SettingsView::savePhoneCallSettings()
+{
+	mPhoneCallAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
+	mPhoneCallAttributes.mLength   = mLength->contentWidgetData("text").toInt();
+	mPhoneCallAttributes.mIdle     = mIdle->contentWidgetData("text").toInt();
+	
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
+		}
+	
+	
+	mPhoneCallAttributes.mDestination    = mDestination->contentWidgetData("text").toString();
+}
+
+// ---------------------------------------------------------------------------	
+	
+void SettingsView::saveNetConnSettings()
+{
+	mPhoneCallAttributes.mPriority = mPriority->contentWidgetData("selected").toInt();
+	mPhoneCallAttributes.mIdle     = mIdle->contentWidgetData("text").toInt();
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mPhoneCallAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
+		}
+	mPhoneCallAttributes.mDestination    = mDestination->contentWidgetData("text").toString();
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::saveKeyPressSettings()
+{
+	mKeyPressAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
+	mKeyPressAttributes.mHeartBeat = mHeartBeat->contentWidgetData("text").toInt();
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mKeyPressAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mKeyPressAttributes.mRandomVariance =  mRandomVar->contentWidgetData("maximum").toInt();
+		}
+	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::savePointerEventSettings()
+{
+	mPointerEventAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
+	mPointerEventAttributes.mHeartBeat = mHeartBeat->contentWidgetData("text").toInt();
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mPointerEventAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mPointerEventAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
+		}
+	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::saveMessageSettings()
+{
+	mMessageAttributes.mPriority    = mPriority->contentWidgetData("selected").toInt();
+	mMessageAttributes.mMessageType = mType->contentWidgetData("selected").toInt();
+	mMessageAttributes.mDestination = mDestination->contentWidgetData("text").toString();
+	int amount = mAmount->contentWidgetData("text").toInt();
+	if( amount  >=0 && amount <= mAmount->contentWidgetData("maximum").toInt() )
+		{
+		mMessageAttributes.mAmount = mAmount->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mMessageAttributes.mAmount = mAmount->contentWidgetData("maximum").toInt();
+		}
+	mMessageAttributes.mLength = mLength->contentWidgetData("text").toInt();
+	mMessageAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mMessageAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mMessageAttributes.mRandomVariance =  mRandomVar->contentWidgetData("maximum").toInt();
+		}
+
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::saveApplicationsSettings()
+{
+	mApplicationsAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
+	int maxApps = mMaxParallelApps->contentWidgetData("text").toInt();
+	if( maxApps >=0 && maxApps <= mMaxParallelApps->contentWidgetData("maximum").toInt() )
+		{
+		mApplicationsAttributes.mMaxOpen   = mMaxParallelApps->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mApplicationsAttributes.mMaxOpen   = mMaxParallelApps->contentWidgetData("maximum").toInt();
+		}
+	mApplicationsAttributes.mLaunchingInterval   = mLaunchingInterval->contentWidgetData("text").toInt();
+	mApplicationsAttributes.mKeyPressType  = mKeyPressType->contentWidgetData("selected").toInt();
+	mPointerEventAttributes.mHeartBeat = mHeartBeat->contentWidgetData("text").toInt();
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mApplicationsAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mApplicationsAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
+		}
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::savePhotoSettings()
+{
+	mPhotoCaptureAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
+	mPhotoCaptureAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mPhotoCaptureAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mPhotoCaptureAttributes.mRandomVariance = mRandomVar->contentWidgetData("maximum").toInt();
+		}
+	
+	// update only if there's more than one camera device available in the system, 
+	// for use case of one camera available, the selection cannot be changed by user.
+	if (mPhotoCaptureAttributes.mCameraCount > 1)
+	{
+	mPhotoCaptureAttributes.mCamera = mCamera->contentWidgetData("selected").toInt();
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::saveBtSettings()
+{
+	mBluetoothAttributes.mPriority  = mPriority->contentWidgetData("selected").toInt();
+	mBluetoothAttributes.mIdle = mIdle->contentWidgetData("text").toInt();
+	int randVar = mRandomVar->contentWidgetData("text").toInt();
+	if( randVar >=0 && randVar <= mRandomVar->contentWidgetData("maximum").toInt() )
+		{
+		mBluetoothAttributes.mRandomVariance = mRandomVar->contentWidgetData("text").toInt();
+		}
+	else
+		{
+		mBluetoothAttributes.mRandomVariance =  mRandomVar->contentWidgetData("maximum").toInt();
+		}
+	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::cancelled()
+{
+	connect(this, 
+		SIGNAL(loadCanclled()), 
+		&mEngineWrapper, 
+		SLOT(loadSettingsCanclled()));
+	emit loadCanclled();
+	
+    mMainWindow.removeView(this);
+    mMainWindow.setCurrentView(&mMainView, true);
+    deleteLater();
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::okExit()
+{
+	saveSettings();
+	setLoadAttributes();
+    connect(this, 
+			SIGNAL(loadCompleted(TLoadGenCommandIds)), 
+			&mEngineWrapper, 
+			SLOT(loadAddedOrEdited(TLoadGenCommandIds)));
+	emit loadCompleted(mCmdId);
+			
+    mMainWindow.removeView(this);
+    mMainWindow.setCurrentView(&mMainView, true);
+    deleteLater();
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::setLoadAttributes()
+{
+	switch (mCmdId) {
+		case ELoadGenCmdNewLoadCPULoad: {
+			mEngineWrapper.setCpuLoadAttributes(mCPULoadAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadEatMemory: {
+			mEngineWrapper.setMemoryEatAttributes(mMemoryEatAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadPhoneCall: {
+			mEngineWrapper.setPhoneCallAttributes(mPhoneCallAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadNetConn: {
+			mEngineWrapper.setNetConnAttributes(mNetConnAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadKeyPress: {
+			mEngineWrapper.setKeyPressAttributes(mKeyPressAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadPointerEvent: {
+			mEngineWrapper.setPointerEventAttributes(mPointerEventAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadMessages: {
+			mEngineWrapper.setMessageAttributes(mMessageAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadApplications: {
+			mEngineWrapper.setApplicationsAttributes(mApplicationsAttributes);
+			break;
+		}
+		case ELoadGenCmdNewLoadPhotoCaptures: {
+			mEngineWrapper.setPhotoCaptureAttributes(mPhotoCaptureAttributes); 
+			break;		
+		}
+		case ELoadGenCmdNewLoadBluetooth: {
+			mEngineWrapper.setBluetoothAttributes(mBluetoothAttributes);
+			break;
+		}
+		default: {
+			break;
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::dataItemDisplayed(const QModelIndex &index)
+{
+	HbDataFormViewItem *item = static_cast<HbDataFormViewItem*>(mSettingForm->itemByIndex(index)); 
+	HbWidget *contentWidget = static_cast<HbWidget*>(item->dataItemContentWidget());
+	switch(mCmdId){
+		case ELoadGenCmdNewLoadCPULoad: {
+			if (index.row() == 2) { // Cpu load type selection is in this row: periodic vs. continuous
+				mModes = static_cast<HbRadioButtonList*>(contentWidget);
+				connect(mModes , SIGNAL(itemSelected(int)), this, SLOT(selectionChanged(int)));
+			}
+			break;
+		}
+		case ELoadGenCmdNewLoadEatMemory: {
+				// Memory eat type is in this row: mem to eat/ mem to be left vs. alternate min/max
+				if (index.row() == 2) { 
+				mTypes = static_cast<HbRadioButtonList*>(contentWidget );
+				connect(mTypes ,SIGNAL(itemSelected(int)), this,SLOT(selectionChanged(int)));
+				}
+			break;
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::selectionChanged(int index)
+{
+	switch (mCmdId) {
+		case ELoadGenCmdNewLoadCPULoad: {
+			if (index == ECpuLoadTypePeriodic) {
+			// if periodic selected, add Length, Idle and Random variance to settings,
+			// if they does not exist yet.
+				if (mLength == NULL) {
+					mLength = mModel->insertDataFormItem(3, 
+														 HbDataFormModelItem::TextItem, 
+														 QString("Length (ms)"), 
+														 mLoadSettings);
+					mLength->setContentWidgetData("maximum" , 999999999);
+					mLength->setContentWidgetData("minimum", 0);
+					mLength->setContentWidgetData(QString("text"), mCPULoadAttributes.mLength);
+					}
+				if (mIdle == NULL) {
+					// DataFormItem for load length selection
+					mIdle = mModel->insertDataFormItem(4,
+					                                   HbDataFormModelItem::TextItem, 
+													   QString("Idle (ms)"), 
+													   mLoadSettings);
+					mIdle->setContentWidgetData("maximum" , 999999999);
+					mIdle->setContentWidgetData("minimum", 0);			
+					mIdle->setContentWidgetData(QString("text"), mCPULoadAttributes.mIdle);
+					}
+				if (mRandomVar == NULL) {
+					mRandomVar = mModel->insertDataFormItem(5,
+					                                        HbDataFormModelItem::TextItem,  
+														    QString("Random variance (%)"), 
+														    mLoadSettings);
+					mRandomVar->setContentWidgetData("maximum" , 100);
+					mRandomVar->setContentWidgetData("minimum", 0);	
+					mRandomVar->setContentWidgetData(QString("text"), mCPULoadAttributes.mRandomVariance);
+				}
+			}
+			else if (index == ECpuLoadTypeContinuous) {
+				// if continuous selected, remove existing Length, Idle and Random variance from settings view:
+				// if they does not exist do nothing.
+				if (mLength != NULL) {
+					mModel->removeItem(mLength);
+					mLength = NULL;
+				}
+				if (mIdle != NULL) {
+					mModel->removeItem(mIdle);
+					mIdle = NULL;
+				}
+				if (mRandomVar != NULL) {
+					mModel->removeItem(mRandomVar);
+					mRandomVar = NULL;
+				}	
+			}
+			break;
+		}
+		case ELoadGenCmdNewLoadEatMemory: {
+			if (index == EMemoryEatTypeWavy) {
+				// remove one item, if exists. 
+				if (mAmount != NULL) {
+					mModel->removeItem(mAmount);
+					mAmount = NULL;
+				}
+				// insert two new item rows, if not exists.
+				if (mMinAmountToBeLeft == NULL) {
+					mMinAmountToBeLeft	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
+													  QString("Min to be left (B)"), 
+													  mLoadSettings);
+					mMinAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
+					mMinAmountToBeLeft->setContentWidgetData("minimum", 0);
+					mMinAmountToBeLeft->setContentWidgetData( QString("text"),mMemoryEatAttributes.mRandomMin );
+				}
+				if (mMaxAmountToBeLeft == NULL) {
+					mMaxAmountToBeLeft	= mModel->insertDataFormItem(4, HbDataFormModelItem::TextItem, 
+													  QString("Max to be left (B)"), 
+													  mLoadSettings);
+					mMaxAmountToBeLeft->setContentWidgetData("maximum" , 99999999999999);
+					mMaxAmountToBeLeft->setContentWidgetData("minimum", 0);				
+					mMaxAmountToBeLeft->setContentWidgetData( QString("text"),mMemoryEatAttributes.mRandomMax );
+				}
+			}
+			else if (index == EMemoryEatTypeMemoryToEat || index == EMemoryEatTypeMemoryToBeLeft) {
+				// remove two item rows, if exists.
+				if (mMinAmountToBeLeft != NULL) {
+					mModel->removeItem(mMinAmountToBeLeft);
+					mMinAmountToBeLeft = NULL;
+				}
+				if (mMaxAmountToBeLeft != NULL) {
+					mModel->removeItem(mMaxAmountToBeLeft);
+					mMaxAmountToBeLeft = NULL;
+				}
+				// insert one item, if not exists.
+				if (mAmount == NULL) {
+					mAmount	= mModel->insertDataFormItem(3, HbDataFormModelItem::TextItem, 
+													  QString("Amout(B)"), 
+													  mLoadSettings);
+					mAmount->setContentWidgetData("maximum" , 99999999999999);
+					mAmount->setContentWidgetData("minimum", 0);
+					mAmount->setContentWidgetData( QString("text"),mMemoryEatAttributes.mAmount );
+				}				
+			}
+		}
+		default: {
+			break;
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/ReleaseNotes_ScreenGrabber.txt	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,144 @@
+===============================================================================
+
+RELEASE NOTES - SCREENGRABBER v5.0.0
+RELEASED 10th March 2010 
+
+SUPPORTS S60 3.0+
+
+===============================================================================
+
+Product Description:
+====================
+ScreenGrabber tool is used to capture images and video of the visible screen
+area in S60 platform. Captures can be handled with the Media Gallery
+application or with PC when the device is connected via PC suite.
+
+Main Features:
+==============
+- Image capture in single or in sequential mode supporting PNG, JPEG and BMP
+  formats
+- Video capture in animated GIF format
+- Configurable saving format, hotkey, time delta in sequential mode, target
+  memory and default filename
+- Ability to change the screen mode to one of the supported more by the device
+
+===============================================================================
+
+What's New in v5.0.0
+====================
+- Orbit UI
+
+===============================================================================
+
+Installation Notes:
+===================
+ScreenGrabber is typically preinstalled on ROM. If not, it can be added to the
+ROM with the .iby file. Alternatively, the .sis file can be found under the sis-
+directory, but the user need to sign it with their own developer certificate.
+In Nokia R&D environment, you can use directly the R&D-signed .sis file under the
+internal\sis directory.
+
+When signing with own developer certificate, the following capabilities are
+needed:
+  WriteDeviceData
+  SwEvent
+
+When builing ScreenGrabber against S60 3.0 or 3.1, you may need to patch your
+SDK environment first with some fixes. For more information, please refer to
+the instructions under the "envpatcher" directory.
+
+===============================================================================
+
+System Requirements:
+====================
+Basic Requirements:
+- Any S60 3.x device or emulator environment
+
+===============================================================================
+
+Compatibility Issues:
+=====================
+N/A
+
+===============================================================================
+
+Known Issues:
+=============
+
+Sluggish UI when capturing video
+--------------------------------
+- Video capturing requires huge amount of processing power and thus may cause
+  the UI to become sluggish. If supported by the device, try to decrease the
+  screen resolution.
+
+===============================================================================
+
+Version History:
+================
+Version 4.2.0 - 14th May 2009
+------------------------------
+- Feature: Added a new SIS file for S60 3.2 devices and newer to support the
+  features in newer platforms
+- Feature: Added multidrive support in the settings dialog
+
+Version 4.1.3 - 8th March 2009
+------------------------------
+- Fix: ScreenGrabber does not work in devices which do not have Media Gallery
+  (Media Gallery File Manager API dependency changed from static to dynamic)
+    
+Version 4.1.2 - 8th February 2008
+---------------------------------
+- Fix: Transparency errors in GIF animations (hopefully) finally fixed
+  
+Version 4.1.1 - 28th January 2008
+---------------------------------
+- Feature: Added hash+* and alternative camera key into selection of capture
+  keys
+- Change: Reimplemented settings handling so that AllFiles and WriteUserData
+  capabilities are no longer needed
+    
+Version 4.1.0 - 14th January 2008
+---------------------------------
+- Feature: Added support for GIF and MBM formats although it is always
+  recommended to capture screens in PNG format
+- Feature: JPEG format can now be selected as high quality (97%) or low quality
+  (60%) 
+- Feature: Added POC key under capturing key options
+- Change: Dimensions of a video will be grown if the screen resolution of the
+  device will grow during capturing
+- Change: Capturing is now done always from current focus screen which allows to
+  support secondary displays
+- Change: Send key is now the default key
+- Fix: Black color didn't always work correctly in GIF animation optimization
+  with transparency  
+- Fix: Capturing to JPEG format leaked memory
+
+Version 4.0.3 - 16th November 2007
+----------------------------------
+- Fix: Scroll bar in the main view can be scrolled on a touch UI
+- Fix: Application closes automatically when closed via open applications menu
+
+Version 4.0.2 - 9th October 2007
+--------------------------------
+- Fix: Main screen layout in mirrored mode
+  
+Version 4.0.1 - 14th February 2007
+----------------------------------
+- Fix: Help screen on larger displays
+  
+Version 4.0.0 - 25th October 2006
+---------------------------------
+- Feature: Support for sequential capture mode
+- Feature: Support for capturing video in animated GIF format
+- Feature: Ability to change screen mode to one of the supported more by the
+  device
+
+===============================================================================
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+This component and the accompanying materials are made available
+under the terms of "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/icons/ScreenGrabber_application_icon_final_svgt.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,235 @@
+<?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 version="1.1" baseProfile="tiny" id="Layer_1"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height="200px"
+	 viewBox="0 0 200 200" xml:space="preserve">
+<path fill="#D9D673" d="M98.655,195.824c-4.962,0-9.314-2.269-12.018-6.445c-1.253-1.935-4.843-10.271-5.774-12.326
+	c-2.423-5.354-11.796-28.881-12.389-30.572c-0.217-0.621-1.067-2.482-1.067-2.482c-12.817-4.386-21.575-15.666-27.378-27.416
+	c-3.543-7.176-6.216-14.785-8.224-22.525c-0.935-3.605-3.951-15.407-4.612-17.697c6.474-0.917,12.949-1.829,19.423-2.747
+	c0.211,1.052,0.423,2.103,0.633,3.153l20.569-4.311c0.06-1.05,0.122-2.1,0.183-3.149c5.43-1.079,10.859-2.162,16.288-3.244
+	c-7.6-9.377-16.117-17.88-24.605-26.434L81.904,29.4l3.229,4.267l34.274-15.562l-2.595-4.777l19.877-9.152
+	c0,0,5.076,8.803,6.924,13.577c4.802,12.413,8.47,25.341,10.806,38.443c2.663,14.93,3.587,30.573,0.188,45.468
+	c-1.389,6.08-3.531,12.008-6.618,17.437c-1.448,2.549-3.103,4.979-4.954,7.253c-0.229,0.279-1.889,1.902-1.799,2.15
+	c0.092,0.246,10.422,28.213,11.472,31.058c2.104,5.696,1.09,11.383-3.118,15.774c-1.847,1.928-4.531,2.773-6.947,3.781
+	c-3.531,1.473-25.131,10.475-32.399,13.504C106.482,194.191,102.846,195.824,98.655,195.824L98.655,195.824 M87.728,70.434
+	c-0.696,2.876-1.488,5.75-2,8.665l6.988-1.731C91.185,75.103,89.522,72.791,87.728,70.434L87.728,70.434"/>
+<path fill="#FFFFFF" d="M98.655,193.162c-5.151,0-9.079-2.988-11.083-7.613c-1.606-3.707-3.294-7.379-4.95-11.069
+	c-2.799-6.242-12.539-31.499-12.811-32.31c-0.109-0.326-1.543-0.69-1.543-0.69c-13.122-4.487-21.625-16.677-27.137-28.784
+	c-3.162-6.945-5.569-14.245-7.338-21.666c-0.726-3.044-3.192-12.466-3.192-12.466l13.902-1.965l0.67,3.32l25.184-5.277l0.181-3.127
+	l14.911-2.972l-3.011,14.114l14.567-3.611C87.742,64.78,76.191,52.476,64.253,40.451l16.821-7.741l3.227,4.256l38.815-17.622
+	l-2.604-4.787l15.053-6.934c0,0,2.996,4.867,4.088,7.415c1.154,2.688,2.178,5.433,3.162,8.185
+	c5.024,14.042,8.789,28.687,10.469,43.521c2.392,21.139,0.312,45-15.129,61.087c2.178,5.928,4.377,11.85,6.564,17.772
+	c1.426,3.856,2.852,7.715,4.274,11.571c0.961,2.602,2.043,5.125,2.179,7.939c0.229,4.756-2.804,8.732-7.027,10.493
+	c-2.737,1.142-5.476,2.282-8.213,3.425c-7.896,3.291-15.795,6.582-23.691,9.873C107.908,190.714,103.423,193.162,98.655,193.162
+	L98.655,193.162"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="54.9058" y1="106.2729" x2="54.9058" y2="39.7283" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#00BDBB"/>
+	<stop  offset="0.216" style="stop-color:#00B3B1"/>
+	<stop  offset="1" style="stop-color:#00918F"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M55.405,90.083l11.91-3.006c0,0,7.018-1.74,10.527-2.61c0.622-3.947,1.398-7.858,2.339-11.741
+	l-6.773,1.349c-0.051,0.858-0.225,2.284-0.253,3.115l-31.339,6.564c-0.262-0.651-0.267-1.708-0.64-3.558L34.63,81.12
+	c0.784,2.719,1.334,5.416,1.977,8.169c1.638,7.012,3.867,13.917,6.773,20.507c5.125,11.623,13.165,23.873,25.839,28.047
+	c-2.964-8.971-5.514-18.079-7.799-27.245c-0.757-3.037-1.483-6.081-2.172-9.136c-0.201-0.889-0.399-1.779-0.592-2.671L55.405,90.083
+	z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="40.0601" y1="86.2544" x2="70.3789" y2="86.2544" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#6CC6E6"/>
+</linearGradient>
+<path fill="url(#SVGID_2_)" d="M56.667,89.646l14.043-3.458l1.587-0.346c0.2-2.156,0.422-3.906,0.582-5.053L42.56,87.293
+	c1.15,6.673,2.618,12.43,4.301,17.408l12.335-3.474C59.05,100.582,56.667,89.646,56.667,89.646z"/>
+<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="42.0688" y1="86.2095" x2="68.3398" y2="86.2095" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#9EE2FB"/>
+	<stop  offset="1" style="stop-color:#D6F5FF"/>
+</linearGradient>
+<path fill="url(#SVGID_3_)" d="M58.084,95.803l0.732,3.723l-10.821,3.045c-1.354-4.254-2.504-8.926-3.426-13.927l26.271-5.636
+	c-0.036,0.86-0.071,1.72-0.106,2.58c-0.031,0.736-0.089,0.616-0.803,0.795c-1.938,0.487-3.876,0.975-5.815,1.461
+	C60.439,88.768,57.844,91.946,58.084,95.803"/>
+<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="45.3628" y1="67.2021" x2="62.3063" y2="67.2021" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#6CC6E6"/>
+</linearGradient>
+<path fill="url(#SVGID_4_)" d="M59.814,103.93l-11.951,3.579c1.815,4.816,3.839,8.822,5.961,12.154l9.124-3.115L59.814,103.93z"/>
+<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="46.896" y1="67.3335" x2="62.0152" y2="67.3335" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#9EE2FB"/>
+	<stop  offset="1" style="stop-color:#D6F5FF"/>
+</linearGradient>
+<path fill="url(#SVGID_5_)" d="M54.32,118.269l8.333-2.846c-1.037-3.971-1.901-7.508-2.574-10.361l-10.683,3.199
+	C50.851,111.938,52.502,115.296,54.32,118.269"/>
+<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="53.0371" y1="54.2231" x2="65.7134" y2="54.2231" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#6CC6E6"/>
+</linearGradient>
+<path fill="url(#SVGID_6_)" d="M63.674,119.267l-8.137,2.918c2.551,3.514,5.196,6.133,7.761,8.1L66.443,129L63.674,119.267z"/>
+<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="54.9131" y1="54.3271" x2="65.3865" y2="54.3271" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#9EE2FB"/>
+	<stop  offset="1" style="stop-color:#D6F5FF"/>
+</linearGradient>
+<path fill="url(#SVGID_7_)" d="M63.483,128.955l2.628-1.072c-0.759-2.572-1.471-5.086-2.131-7.493l-6.567,2.358
+	C59.286,125.141,61.32,127.223,63.483,128.955"/>
+<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="58.5688" y1="43.6646" x2="144.7949" y2="43.6646" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#ADE8FF"/>
+	<stop  offset="1" style="stop-color:#00A5E3"/>
+</linearGradient>
+<path fill="url(#SVGID_8_)" d="M101.881,81.231c0,0-7.801,1.934-11.701,2.901c-7.351,1.822-14.701,3.646-22.052,5.468
+	c-3.238,0.803-6.321,2.385-6.963,6.062c-0.462,2.647,0.862,5.653,1.459,8.197c0.63,2.686,1.251,5.37,1.914,8.047
+	c4.055,16.371,9.074,32.438,15.466,48.051c2.692,6.574,5.556,13.08,8.569,19.515c0.896,1.913,1.558,4.022,2.608,5.853
+	c1.534,2.67,4.067,4.114,7.152,4.114c3.965,0,7.785-2.136,11.401-3.644c7.816-3.258,15.634-6.518,23.451-9.775
+	c2.95-1.229,5.9-2.46,8.853-3.689c0.452-0.188,0.912-0.365,1.358-0.565c1.53-0.554,2.847-2.327,3.431-3.786
+	c0.7-1.75,0.519-3.65,0.077-5.439c-0.836-3.4-2.465-6.754-3.676-10.031c-2.776-7.521-5.557-15.043-8.334-22.563
+	c-0.444-1.204-1.336-3.614-1.336-3.614L101.881,81.231z"/>
+<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="72.8145" y1="36.2852" x2="128.0979" y2="56.4067" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#ADE8FF"/>
+	<stop  offset="1" style="stop-color:#00ADEE"/>
+</linearGradient>
+<path fill="url(#SVGID_9_)" d="M109.846,89.819l-7.068-7.016c0,0-9.02,2.236-13.529,3.354c-7.073,1.753-14.146,3.507-21.219,5.261
+	c-0.412,0.103-0.85,0.173-1.252,0.311c-3.185,0.794-3.928,3.901-3.384,7.492l0.278,1.022l21.627,59.818l3.183,15.056
+	c0,0,2.493,5.76,3.816,8.582c3.657,7.797,13.465,1.866,19.152-0.505c7.992-3.331,15.984-6.663,23.977-9.995
+	c2.094-0.871,4.188-1.744,6.279-2.617c2.701-1.125,4.675-3.812,3.568-6.873c0.084-1.082-0.642-2.396-1.006-3.381
+	c-0.846-2.289-1.69-4.58-2.537-6.869c-2.758-7.467-5.516-14.936-8.273-22.401c-0.428-1.156-0.854-2.313-1.282-3.47L109.846,89.819z"
+	/>
+<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="65.5396" y1="48.126" x2="108.7365" y2="91.3229" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#C9F0FF"/>
+	<stop  offset="1" style="stop-color:#6BCAEE"/>
+</linearGradient>
+<path fill="url(#SVGID_10_)" d="M87.362,135.339c-4.277-11.555-7.726-23.459-11.108-35.302c-1.08-2.711,3.858-3.046,5.511-3.457
+	c4.209-1.044,8.417-2.087,12.626-3.13c3.946-0.979,7.891-1.957,11.835-2.935c0.104-0.025,0.215-0.057,0.33-0.09
+	c-0.23-0.539-0.469-1.074-0.714-1.607c-3.599,0.892-7.198,1.783-10.798,2.676c-4.439,1.101-8.878,2.2-13.317,3.301
+	c-2.369,0.587-7.736,1.466-7.378,3.919s1.111,5.677,0.735,4.065s5.502,18.6,9.386,29.676c0.649,1.854,1.328,3.694,2.024,5.53
+	c0.563-0.151,1.124-0.321,1.684-0.502C87.908,136.769,87.627,136.057,87.362,135.339z"/>
+<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="92.0908" y1="21.5747" x2="135.2868" y2="64.7707" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#C9F0FF"/>
+	<stop  offset="1" style="stop-color:#6BCAEE"/>
+</linearGradient>
+<path fill="url(#SVGID_11_)" d="M131.275,144.312c0.518,1.409-0.655,1.955-1.734,2.322c-9.936,3.385-19.868,6.769-29.802,10.152
+	c-0.63,0.215-1.451,0.635-2.136,0.58c-1.434-0.105-1.983-2.135-2.485-3.24c-2.441-5.383-4.725-10.842-6.833-16.365
+	c-0.592,0.088-1.184,0.175-1.775,0.262c1.927,5.072,4.02,10.083,6.223,15.039c0.646,1.452,1.198,3.206,2.108,4.525
+	c1.105,1.602,2.904,1.719,4.569,1.15c10.793-3.678,21.586-7.354,32.379-11.031l-0.045-0.123c1.242-0.859,1.68-2.467,1.166-3.873
+	c-1.57-4.271-3.141-8.541-4.71-12.812c-0.478,0.385-0.954,0.768-1.433,1.152C128.27,136.136,129.773,140.225,131.275,144.312z"/>
+<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="73.6021" y1="83.7661" x2="130.673" y2="83.7661" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_12_)" d="M108.342,94.329l-1.783-3.902c0,0-8.222,2.046-12.167,3.025c-4.208,1.043-8.417,2.086-12.626,3.13
+	c-1.653,0.411-6.591,0.746-5.511,3.457C76.335,100.019,108.342,94.329,108.342,94.329z"/>
+<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="65.583" y1="39.6567" x2="128.9024" y2="39.6567" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_13_)" d="M123.497,132.522l6.043,14.112c1.079-0.367,2.252-0.913,1.735-2.322
+	c-1.504-4.087-4.508-12.262-4.508-12.262L123.497,132.522z"/>
+<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="73.7539" y1="61.106" x2="130.4023" y2="61.106" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="0.1776" style="stop-color:#EDFAFE"/>
+	<stop  offset="0.5357" style="stop-color:#BDECFD"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_14_)" d="M110.615,104.281c-0.293-2.02-0.729-4.013-1.27-5.979l-33.092,1.735
+	c3.383,11.843,6.831,23.748,11.108,35.302c0.266,0.718,0.546,1.43,0.818,2.146c5.284-1.713,10.386-4.663,14.401-8.396
+	C109.581,122.583,111.959,113.554,110.615,104.281z"/>
+<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="86.2524" y1="43.8799" x2="128.3443" y2="36.458" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="0.4073" style="stop-color:#C2EDFD"/>
+	<stop  offset="0.8069" style="stop-color:#8BDEFC"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_15_)" d="M108.368,129.164l-20.082,8.596c0,0,4.392,10.982,6.833,16.367c0.501,1.104,1.051,3.135,2.485,3.238
+	c0.685,0.057,1.506-0.365,2.136-0.578c9.934-3.386,29.802-10.154,29.802-10.154l-5.181-14.094l10.021-10.067L108.368,129.164z"/>
+<linearGradient id="SVGID_16_" gradientUnits="userSpaceOnUse" x1="61.1104" y1="38.938" x2="90.146" y2="38.938" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_16_)" d="M90.821,180.154c0.458-0.224,1.089-0.421,1.456-0.785c1.214-1.236-0.909-4.434-1.411-5.603
+	c-1.945-4.532-3.786-9.108-5.571-13.706c-5.229-13.459-9.866-27.037-13.646-40.975c-1.306-4.816-2.554-9.648-3.748-14.494
+	c-0.274-1.111-0.546-2.225-0.812-3.34c-0.415-1.741-2.138-1.301-3.421-1.009c0.744,2.71,1.182,5.571,1.834,8.289
+	c3.833,15.957,8.524,31.692,14.58,46.955c2.614,6.59,5.414,13.104,8.359,19.553c0.608,1.326,1.219,2.651,1.839,3.973
+	C90.461,179.393,90.641,179.773,90.821,180.154z"/>
+<linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="90.2993" y1="49.3877" x2="90.2993" y2="105.9383" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#76D8FB"/>
+	<stop  offset="1" style="stop-color:#E4F5FB"/>
+</linearGradient>
+<path fill="url(#SVGID_17_)" d="M109.346,98.303c-0.555-2.018-1.229-4.004-2-5.96c-0.125,0.023-30.564,7.564-31.093,7.695
+	c2.832,9.915,5.816,19.795,9.083,29.574C86.594,115.148,96.221,103.102,109.346,98.303z"/>
+<linearGradient id="SVGID_18_" gradientUnits="userSpaceOnUse" x1="112.0566" y1="19.5874" x2="124.7578" y2="12.2544" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#C9F0FF"/>
+	<stop  offset="1" style="stop-color:#6BCAEE"/>
+</linearGradient>
+<path fill="url(#SVGID_18_)" d="M121.208,170.636c-3.158,0-6.051-2.279-7.028-5.541c-1.205-4.016,0.834-8.188,4.543-9.301
+	c0.61-0.184,1.245-0.275,1.883-0.275c3.16,0,6.051,2.279,7.028,5.54c1.206,4.017-0.833,8.187-4.543,9.302
+	C122.479,170.542,121.846,170.636,121.208,170.636L121.208,170.636z"/>
+<linearGradient id="SVGID_19_" gradientUnits="userSpaceOnUse" x1="113.6201" y1="14.1353" x2="123.3685" y2="17.6834" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#3AA5DE"/>
+	<stop  offset="1" style="stop-color:#A2D8EB"/>
+</linearGradient>
+<path fill="url(#SVGID_19_)" d="M119.326,157.531c-2.944,0.885-4.131,4.281-3.299,7.049c0.828,2.769,3.689,4.955,6.635,4.07
+	c2.945-0.884,4.13-4.281,3.3-7.051C125.13,158.832,122.27,156.647,119.326,157.531z"/>
+<linearGradient id="SVGID_20_" gradientUnits="userSpaceOnUse" x1="107.209" y1="40.8896" x2="107.209" y2="166.9102" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#CBEEFB"/>
+	<stop  offset="0.1436" style="stop-color:#97DBE4"/>
+	<stop  offset="0.2898" style="stop-color:#69CAD0"/>
+	<stop  offset="0.4368" style="stop-color:#43BCBF"/>
+	<stop  offset="0.5823" style="stop-color:#26B1B2"/>
+	<stop  offset="0.7256" style="stop-color:#11A9A8"/>
+	<stop  offset="0.866" style="stop-color:#04A5A3"/>
+	<stop  offset="1" style="stop-color:#00A3A1"/>
+</linearGradient>
+<path fill="url(#SVGID_20_)" d="M148.214,61.172c-1.845-12.006-4.952-23.83-8.946-35.295c-1.016-2.915-2.088-5.812-3.262-8.668
+	c-0.734-1.786-1.775-3.434-2.711-5.12l-8.622,3.97c1.942,3.573,2.29,3.83,2.504,4.857L82.404,41.245
+	c-0.535-0.782-1.419-1.9-3.202-4.253l-9.619,4.429c9.631,9.7,18.879,19.827,26.668,31.093c6.562,9.489,12.665,20.226,14.345,31.813
+	c1.344,9.272-1.035,18.303-8.035,24.81c-4.504,4.187-10.375,7.399-16.338,8.973c3.412-0.503,6.823-1.007,10.234-1.51
+	c1.686-0.249,2.808-0.322,4.257-1.235c1.631-1.027,3.2-2.156,4.674-3.4c0.686-0.577,1.35-1.18,1.987-1.809
+	c0.233-0.23,0.653-0.869,0.976-0.945c7.026-1.668,14.057-3.336,21.084-5.006c0.979-0.231,1.959-0.465,2.938-0.697
+	c-3.014,4.318-10.206,8.445-12.357,9.619c1.728-0.215,3.452-0.432,5.178-0.646c0.356-0.045,1.066,0.014,1.358-0.223
+	c0.757-0.608,1.513-1.217,2.269-1.823c3.988-3.208,7.627-6.476,10.601-10.688c7.058-10.004,9.826-22.373,10.326-34.44
+	C150.081,77.237,149.438,69.145,148.214,61.172"/>
+<linearGradient id="SVGID_21_" gradientUnits="userSpaceOnUse" x1="110.7832" y1="152.603" x2="110.7832" y2="110.3638" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_21_)" d="M130.579,26.397L86.176,46.286c3.026,3.575,9.82,11.913,16.153,22.35l38.063-14.08
+	C138.166,46.074,134.979,36.717,130.579,26.397"/>
+<linearGradient id="SVGID_22_" gradientUnits="userSpaceOnUse" x1="88.959" y1="131.3022" x2="133.9268" y2="131.3022" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_22_)" d="M103.709,64.617c-4.393-6.963-8.917-12.95-12.25-17.095l37.387-16.745
+	c3.08,7.515,5.623,14.803,7.581,21.738L103.709,64.617L103.709,64.617"/>
+<linearGradient id="SVGID_23_" gradientUnits="userSpaceOnUse" x1="121.9639" y1="119.605" x2="121.9639" y2="87.5024" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_23_)" d="M141.584,59.394l-37.32,13.057c3.573,6.21,6.639,12.111,8.846,19.046l31.557-9.621
+	C144.443,75.246,143.502,67.78,141.584,59.394"/>
+<linearGradient id="SVGID_24_" gradientUnits="userSpaceOnUse" x1="105.6055" y1="103.4526" x2="139.4473" y2="103.4526" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_24_)" d="M114.784,88.234c-1.894-5.278-4.263-9.991-6.679-14.341l31.539-11.034
+	c1.232,5.958,2.004,11.688,2.303,17.095L114.784,88.234L114.784,88.234"/>
+<linearGradient id="SVGID_25_" gradientUnits="userSpaceOnUse" x1="127.0215" y1="92.0049" x2="127.0215" y2="67.29" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_25_)" d="M144.695,86.994l-30.346,8.702c1.494,5.498,2.199,10.892,1.748,16.013l25.816-6.127
+	C143.456,100.42,144.527,94.278,144.695,86.994"/>
+<linearGradient id="SVGID_26_" gradientUnits="userSpaceOnUse" x1="114.2383" y1="79.5854" x2="140.1162" y2="79.5854" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_26_)" d="M118.198,109.181c0.057-3.77-0.435-7.826-1.46-12.115l25.878-7.42
+	c-0.286,5.063-1.052,9.853-2.279,14.279L118.198,109.181L118.198,109.181"/>
+<linearGradient id="SVGID_27_" gradientUnits="userSpaceOnUse" x1="123.2969" y1="70.4854" x2="123.2969" y2="52.583" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_27_)" d="M140.955,108.513l-25.23,5.988c-0.752,4.222-2.367,8.229-5.084,11.914l23.938-5.685
+	C136.811,117.669,139.109,113.651,140.955,108.513"/>
+<linearGradient id="SVGID_28_" gradientUnits="userSpaceOnUse" x1="111.042" y1="61.6265" x2="136.3291" y2="61.6265" gradientTransform="matrix(1 0 0 -1 2.5 178.999)">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#76D8FB"/>
+</linearGradient>
+<path fill="url(#SVGID_28_)" d="M113.542,124.375c1.558-2.713,2.666-5.654,3.313-8.789l21.974-5.215
+	c-1.024,2.484-2.246,4.894-3.677,7.17c-0.603,0.957-0.905,1.92-2.002,2.18c-2.178,0.518-4.356,1.033-6.534,1.552
+	C122.258,122.306,117.9,123.339,113.542,124.375L113.542,124.375"/>
+<rect fill="none" width="200" height="200"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/icons/qgn_menu_screengrabber.svg	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   baseProfile="tiny"
+   width="100%"
+   height="100%"
+   viewBox="0 0 88 88"
+   id="svg1926"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   sodipodi:docname="qgn_menu_screengrabber.svg"
+   sodipodi:docbase="X:\ScreenGrabber\aif">
+  <metadata
+     id="metadata1942">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     inkscape:window-height="1110"
+     inkscape:window-width="1600"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="10.0"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="8.4442735"
+     inkscape:cx="43.997928"
+     inkscape:cy="45.030743"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     inkscape:current-layer="svg1926" />
+  <defs
+     id="defs6909">
+    <linearGradient
+       id="linearGradient14494">
+      <stop
+         style="stop-color:#0000bc;stop-opacity:1;"
+         offset="0"
+         id="stop14496" />
+      <stop
+         style="stop-color:#0000bc;stop-opacity:0.71134019;"
+         offset="1"
+         id="stop14498" />
+    </linearGradient>
+  </defs>
+  <g
+     id="g16387"
+     transform="matrix(0.933931,0,0,0.93923,36.62697,-3.375516)">
+    <g
+       id="g14545"
+       transform="matrix(1.00237,0,0,1.019616,-19.44104,89.03461)">
+      <rect
+         style="fill:white;fill-opacity:1;stroke:black;stroke-width:0.2788493;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         id="rect11835"
+         width="38.227215"
+         height="46.111416"
+         x="-12.352481"
+         y="-76.984528" />
+      <rect
+         style="fill:#0000c8;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         id="rect12722"
+         width="37.948029"
+         height="4.0790625"
+         x="-12.204596"
+         y="-67.491203" />
+    </g>
+    <rect
+       y="-76.984528"
+       x="-12.352481"
+       height="46.111416"
+       width="38.227215"
+       id="rect14551"
+       style="fill:white;fill-opacity:1;stroke:black;stroke-width:0.2788493;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       transform="matrix(1.00237,0,0,1.019616,-12.79656,94.92987)" />
+    <rect
+       y="-67.491203"
+       x="-12.204596"
+       height="4.0790625"
+       width="37.948029"
+       id="rect14553"
+       style="fill:#0000c8;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       transform="matrix(1.00237,0,0,1.019616,-12.79656,94.92987)" />
+    <rect
+       y="22.592644"
+       x="-17.854233"
+       height="47.015938"
+       width="38.317814"
+       id="rect14559"
+       style="fill:white;fill-opacity:1;stroke:black;stroke-width:0.28190443;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <rect
+       y="32.27219"
+       x="-17.705997"
+       height="4.1590772"
+       width="38.037964"
+       id="rect14561"
+       style="fill:#0000c8;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+  </g>
+  <g
+     id="g25295"
+     transform="matrix(1,0,0,0.980624,0,1.576279)">
+    <rect
+       y="37.726677"
+       x="41.746223"
+       height="38.990337"
+       width="34.248974"
+       id="rect2069"
+       style="fill:#d03543;fill-opacity:1;stroke:#d03543;stroke-width:9.26854134;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <path
+       id="rect2956"
+       d="M 39.728418,36.017758 L 40.699485,36.017758 L 40.699485,36.980375 L 39.728418,36.980375 L 39.728418,36.017758 z "
+       style="fill:white;fill-opacity:1;stroke:white;stroke-width:0.66800833;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <path
+       id="path6507"
+       d="M 77.303471,35.71407 L 78.274536,35.71407 L 78.274536,36.676685 L 77.303471,36.676685 L 77.303471,35.71407 z "
+       style="fill:white;fill-opacity:1;stroke:white;stroke-width:0.66800821;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <rect
+       y="33.132401"
+       x="43.185398"
+       height="23.865932"
+       width="31.864567"
+       id="rect8279"
+       style="fill:#f7f7ee;fill-opacity:1;stroke:black;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <rect
+       y="63.044537"
+       x="49.107658"
+       height="16.862577"
+       width="20.374096"
+       id="rect9166"
+       style="fill:#d5d5d5;fill-opacity:1;stroke:#d5d5d5;stroke-width:2.6285944;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <rect
+       y="62.877068"
+       x="51.151539"
+       height="16.583315"
+       width="6.6384521"
+       id="rect10053"
+       style="fill:#d03543;fill-opacity:1;stroke:#d5d5d5;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+  </g>
+  <g
+     transform="matrix(1.00237,0,0,1.019616,-12.79656,94.92987)"
+     id="g14549" />
+  <g
+     id="g27079"
+     transform="translate(-0.273712,-5.897703)">
+    <path
+       id="path19082"
+       d="M 12.524583,46.800016 L 12.524583,63.174645 L 30.994672,63.174645"
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:4.24823713;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       id="path21741"
+       d="M 23.698213,53.535845 L 32.738803,63.153749 L 24.300919,72.504489"
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:4.24823713;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/inc/application.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef SGAPPLICATION_H
+#define SGAPPLICATION_H
+
+#include <e32keys.h>
+#include <w32std.h>
+
+#include <hbapplication.h>
+class EngineWrapper;
+
+class SGApplication : public HbApplication
+{
+public:
+    SGApplication(int argc, char *argv[]);//, EngineWrapper &engine);
+    ~SGApplication();
+#if defined(Q_WS_S60)
+
+#if defined(HB_QT_S60_EVENT_FILTER)
+    virtual bool s60EventFilter(TWsEvent *aEvent);
+#else
+    virtual bool symbianEventFilter(const QSymbianEvent *event);
+#endif // (HB_QT_S60_EVENT_FILTER)
+#endif//(Q_WS_S60)    
+    inline void SetEngineWrapper(EngineWrapper *aEngine){iEngine = aEngine;}
+private:
+	RWsSession    		iWsSession_a; 
+    RWindowGroup        iRootWin_a;  
+
+
+    EngineWrapper *iEngine;
+};
+
+#endif // SGAPPLICATION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/inc/enginewrapper.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* 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 ENGINEWRAPPER_H
+#define ENGINEWRAPPER_H
+
+#include <s32file.h>
+#include <hbapplication.h>
+
+
+class SGEngine;
+class GrabSettings;
+class MainView;
+class TWsEvent;
+class HbDeviceProgressDialog;
+
+/**
+ * class that is used for communicating between Symbian and Qt code.
+ */
+class EngineWrapper{
+public:
+    
+    /**
+     * Constructor
+     */
+    EngineWrapper();
+    
+    /**
+     * Destructor
+     */
+    ~EngineWrapper();
+    
+    /**
+     * Initializes Engine Wrapper
+     * @return true if engine was started successfully
+     */
+    bool init();
+
+public: 
+    
+    /* Functions that are called from UI */
+
+    /**
+     * Fetches settings from engine and converts Symbian data types to Qt's types.
+     */
+    GrabSettings getGrabSettings();
+    
+    /**
+     * Converts given parameters into Symbian data types and saves them into ScreenGrabber engine
+     * @param settings new settings
+     */
+    bool saveSettings(const GrabSettings& settings); 
+    
+       
+    /*
+     * Sends received s60 event to engine
+     */
+#if defined(HB_QT_S60_EVENT_FILTER)
+	bool handleCaptureCommands(const TWsEvent* aEvent);
+#else
+	bool handleCaptureCommands(const QSymbianEvent *aEvent);
+#endif
+    
+    
+    /**
+     * Sends UI to background
+     */
+    void sendUIToBackground();
+	void EnableRcpOfFoc(TBool aState);
+    void LoadSettings(void);
+public:
+
+    /* Functions that are called from engine: */
+
+    /**
+     * uses Notifications class to show image captured note 
+     */
+    void ShowImageCapturedNote();
+    
+    /**
+     * uses Notifications class to show video captured note 
+     */
+    void ShowVideoCapturedNote();
+    
+    /** 
+     * uses Notifications class to show seguantial images captured note
+     */
+    void ShowSequantialImagesCapturedNote(TInt amount);
+    
+    /** 
+     * uses Notifications class to show error message 
+     */
+    void ShowErrorMessage(const TDesC16& aErrorMessage);
+
+    /**
+     * uses Notifications class to show progressbar
+     */
+    void ShowProgressBar(int max);
+    
+    /**
+     * increments shown progressbar's value
+     */
+    void IncrementProgressbarValue();
+    
+    /**
+     * closes progressbar
+     */
+    void CloseProgressbar();
+
+    
+private:
+    
+    bool convertTBoolToBool(TBool value);
+    
+private:
+    
+    
+    /* Screen grabber engine */
+    SGEngine *iSGEngine;
+    
+    /* progressnote that is shown */
+	HbDeviceProgressDialog *iProgressNote;
+    
+};
+
+#endif; 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/inc/gifanimator.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* 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 __GIFANIMATOR_H__
+#define __GIFANIMATOR_H__
+
+#include <e32std.h>
+#include <e32base.h>
+#include "sgengine.h"
+
+
+
+class CImageEncoder;
+
+class MDialogCallback
+    {
+public:
+    virtual void DialogDismissedL( TInt aButtonId ) = 0;
+    };
+
+
+class CGifAnimator : public CBase 
+	{
+public:
+	static int CreateGifAnimation(const TDesC& aFileName, TSize aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper);
+	~CGifAnimator();
+
+private:
+    CGifAnimator();
+    void StartL(const TDesC& aFileName, const TSize& aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper);
+    void WriteHeaderL(const TSize& aDimensions);
+    void WriteGraphicControlL(const TVideoFrame& aFrame);
+    void WriteImageDescriptorL(const TVideoFrame& aFrame);
+    CFbsBitmap* GetBitmapLC(TVideoFrame& aFrame, const TSize& aDimensions);
+    void WriteRasterDataL(CFbsBitmap* aBitmap);
+    void WriteFooterL();
+    void FinishL();
+    void WriteInt8L(TInt aValue);
+    void WriteInt16L(TInt aValue);
+    
+    
+    
+private:
+    RFs                         iFs;
+    RFile                       iOutFile;
+	CImageEncoder*              iImageEncoder;
+	HBufC8*                     iGIFImageData;
+    
+    };
+
+		
+	
+#endif // __GIFANIMATOR_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/inc/mainview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,119 @@
+/*
+* 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 MAINVIEW_H
+#define MAINVIEW_H
+
+#include <hbview.h>
+#include <hbmainwindow.h>
+
+class EngineWrapper;
+class HbMainWindow;
+class HbApplication;
+class SettingsView;
+class HbAction;
+
+
+
+/**
+ * Class that implements the main view of Screen Grabber
+ */
+class MainView : public HbView
+{
+    Q_OBJECT
+    
+public:
+    
+    /**
+     * Constructor
+     */
+    MainView(HbMainWindow &mainWindow, EngineWrapper &engineWrapper);
+    
+    /**
+     * Destructor
+     */
+	~MainView();
+
+	/**
+     * Initializes Engine Wrapper
+     * @param app application class of Screen Grabber
+     */
+    void init(HbApplication &app);
+    
+    inline void setSettingsView(SettingsView *aSettingsView){ mSettingsView = aSettingsView; }
+
+    
+private:
+    
+    /**
+     * Creates menu
+     */
+    void createMenu(HbApplication &app);
+    
+    /**
+     * Created info text ui components
+     */
+    void createInfoText();
+    
+    /**
+     * Creates toolbar components
+     */
+    void createToolbar();
+
+public slots:
+
+    
+    /**
+     * Shows about pop-up
+     */
+    void showAboutPopup();
+    
+    /**
+     * Sends UI to background
+     */
+    void sendToBackground();
+    
+    /**
+     * opens settings view
+     */
+    void showSettings();
+
+    void my_quit();
+    
+    void quitYesNoQuestionClosed(HbAction*);
+    
+
+public:
+    
+    /* Main windo of Screen Grabber */
+    HbMainWindow &mMainWindow;
+    
+    /* Settings view */
+    SettingsView *mSettingsView;
+    
+    /* Engine Wrapper */
+    EngineWrapper &mEngineWrapper;
+    
+    /* Actions that are used in toolbars and menus */
+    HbAction* actionSendToBg;
+    HbAction* actionSettings;
+    HbAction* actionAbout;
+    HbAction* actionExit;
+
+};
+
+#endif // MAINVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/inc/notifications.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* 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 NOTIFICATIONS_H_
+#define NOTIFICATIONS_H_
+
+#include <hbmessagebox.h> 
+#include <hbdeviceprogressdialog.h>
+
+
+
+class Notifications
+    {
+public:
+    
+    /**
+     * shows about box
+     */
+    static void about();
+    
+    /**
+     * shows image captured note 
+     */
+    static void imageCaptured();
+    
+    /**
+     * shows video captured note 
+     */
+    static void videoCaptured();
+    
+    /** 
+     * shows seguantial images captured note
+     */
+    static void sequantialImagesCaptured(int amount);
+    
+    /** 
+     * shows error message 
+     */
+    static void error(const QString& errorMessage);
+    
+    /**
+     * to shows progressbar
+     */
+    static HbDeviceProgressDialog* showProgressBar(int max);
+    
+    };
+
+
+
+#endif // NOTIFICATIONS_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/inc/settingsview.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,187 @@
+/*
+* 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 SETTINGS_H
+#define SETTINGS_H
+
+#include <f32file.h>
+#include <hbmainwindow.h>
+#include <hbview.h>
+
+class EngineWrapper;
+class HbDataFormModelItem;
+class HbDataFormModel;
+class HbDataForm;
+class HbDataFormViewItem;
+    
+const QStringList CAPTUREMODES = (QStringList() << "Single capture" << "Sequential capture" << "Video capture");
+const QStringList KEYS = (QStringList() << "Send key" << "Power key" << "Side key" << "Camera key");
+const QStringList VIDEOFORMATS = (QStringList() << "Animated GIF");
+const QStringList IMAGEFORMATS = (QStringList() << "PNG" << "JPEG high qual." << "JPEG low qual." << "BMP" << "GIF");
+const QStringList MEMORYMODES = (QStringList() << "Phone memory" << "Memory card");
+
+
+/**
+ * Settings class that is used for 
+ */
+class GrabSettings
+    {
+public:
+    int             mCaptureMode;
+    
+    int             mSingleCaptureHotkey;
+    int             mSingleCaptureImageFormat;
+    int             mSingleCaptureMemoryInUseMultiDrive;
+    QString         mSingleCaptureFileName;
+
+    int             mSequantialCaptureHotkey;
+    int             mSequantialCaptureImageFormat;
+    int             mSequantialCaptureDelay;
+    int             mSequantialCaptureMemoryInUseMultiDrive;
+    QString         mSequantialCaptureFileName;
+
+    int             mVideoCaptureHotkey;
+    int             mVideoCaptureVideoFormat;
+    int             mVideoCaptureMemoryInUseMultiDrive;
+    QString         mVideoCaptureFileName;
+    };
+
+/**
+ * Class that creates settings view of Screen Grabber
+ */
+class SettingsView : public HbView
+{
+    Q_OBJECT
+
+    enum CaptureMode{ SINGLE, SEQUENTIAL, VIDEO };
+
+public:
+     /**
+     * Constuctor
+     * @param mainView pointer to main view
+     * @param mainWindow pointer to main window
+     */
+    SettingsView(HbView &mainView, HbMainWindow &mainWindow, EngineWrapper &engineWrapper);
+
+    /**
+    * destructor
+    */
+    ~SettingsView();
+
+
+    /**
+     * Loads settings from engine and formats those settings into form items
+     */
+    void loadSettings();
+    
+    
+private slots:
+  
+    /**
+     * saves settings and closes view.
+     */
+    void saveAndClose();
+    
+    /**
+     * closes setting view
+     */
+    void close();
+
+    /**
+     * Slot that is called each time capture mode is changed
+     */
+//    void updateShownItems();
+private:
+    
+    /**
+     * Creates single capture related components
+     */
+    void createSingleCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent);
+    
+    /*
+     * Creates sequential capture related components.
+     */
+    void createSequentialCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent);
+    
+    /**
+     * creates video capture related components
+     */
+    void createVideoCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent);
+    
+    
+    
+    /**
+     * Reads form items and saves them into member variable mSettings
+     */
+    void readFormItems();
+
+private:
+    
+    /* Settings */
+    GrabSettings mSettings;
+    
+    /* EngineWrapper */
+    EngineWrapper &mEngineWrapper;
+    
+    /* Main Window of Screen Grabber */
+    HbMainWindow &mMainWindow;
+    
+    /* Main View of Screen Grabber */
+    HbView &mMainView;
+    
+    /* settingform */
+    HbDataForm *mSettingForm;
+    
+    /* model for settingform */
+    HbDataFormModel *mModel;
+    
+    /* model's components: */   
+    
+    /* mode selection item */
+    HbDataFormModelItem *mModeItem;
+    
+    /* groups that contain mode specific settings */
+    HbDataFormModelItem *mGroupImageCapture;
+    HbDataFormModelItem *mGroupSeguantialCapture;
+    HbDataFormModelItem *mGroupVideoCapture;
+    
+    /* Still image components */
+    HbDataFormModelItem *mImageHotKeyItem;
+    HbDataFormModelItem *mImageFormatItem;
+    HbDataFormModelItem *mImageMemoryInUseItem;
+    HbDataFormModelItem *mImageFileNameItem;
+       
+    /* Sequential image components */
+    HbDataFormModelItem *mSequantialHotKeyItem;
+    HbDataFormModelItem *mSequantialFormatItem;
+    HbDataFormModelItem *mSequantialDelayItem;
+    HbDataFormModelItem *mSequantialMemoryInUseItem;
+    HbDataFormModelItem *mSequantialFileNameItem;
+    
+    /* Video capture components */
+    HbDataFormModelItem *mVideoHotKeyItem;
+    HbDataFormModelItem *mVideoFormatItem;
+    HbDataFormModelItem *mVideoMemoryInUseItem;
+    HbDataFormModelItem *mVideoFileNameItem;
+    
+
+    
+    
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/inc/sgengine.h	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,271 @@
+/*
+* 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 SGENGINE_H
+#define SGENGINE_H
+
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <f32file.h>
+#include <w32std.h>
+#include <mdaaudiotoneplayer.h> 
+#include <qsymbianevent.h>
+
+
+class CFrameImageData;
+class CDictionaryFileStore;
+class CImageEncoder;
+class EngineWrapper;
+
+
+// setting keys (do not change uids of existing keys to maintain compatibility to older versions!)
+const TUid KSGSettingCaptureMode                            = { 0x00 };
+
+const TUid KSGSettingSingleCaptureHotkey                    = { 0x01 };
+const TUid KSGSettingSingleCaptureImageFormat               = { 0x02 };
+const TUid KSGSettingSingleCaptureMemoryInUseMultiDrive     = { 0x04 };
+const TUid KSGSettingSingleCaptureFileName                  = { 0x05 };
+
+const TUid KSGSettingSequantialCaptureHotkey                = { 0x06 };
+const TUid KSGSettingSequantialCaptureImageFormat           = { 0x07 };
+const TUid KSGSettingSequantialCaptureDelay                 = { 0x08 };
+const TUid KSGSettingSequantialCaptureMemoryInUseMultiDrive = { 0x0A };
+const TUid KSGSettingSequantialCaptureFileName              = { 0x0B };
+
+const TUid KSGSettingVideoCaptureHotkey                     = { 0x0C };
+const TUid KSGSettingVideoCaptureVideoFormat                = { 0x0D };
+const TUid KSGSettingVideoCaptureMemoryInUseMultiDrive      = { 0x0F };
+const TUid KSGSettingVideoCaptureFileName                   = { 0x10 };
+
+const TUid KUidScreenGrabber = { 0x101FB751 };
+
+
+#define TRANSPARENCY_INDEX 30
+#define TRANSPARENCY_ALTERNATIVE_INDEX 24
+
+enum TScreenGrabberSettingCaptureModes
+    {
+    ECaptureModeSingleCapture = 0,
+    ECaptureModeSequantialCapture,
+    ECaptureModeVideoCapture
+    };
+    
+enum TScreenGrabberSettingHotkeys
+    {
+    EHotkeySendKey = 0,
+    EHotkeyPowerKey,
+    EHotkeySideKey,
+    EHotkeyCameraKey1
+    };
+
+enum TScreenGrabberSettingImageFormats
+    {
+    EImageFormatPNG = 0,
+    EImageFormatJPGHQ,
+    EImageFormatJPGLQ,
+    EImageFormatBMP,
+    EImageFormatGIF,
+    EImageFormatMBM
+    };
+
+enum TScreenGrabberSettingVideoFormats
+    {
+    EVideoFormatAnimatedGIF = 0
+    };
+
+enum TScreenGrabberSettingMultiDrive
+	{
+	EPhoneMemory = 0,
+	EMemoryCard
+	};
+	
+
+class TGrabSettings
+    {
+public:
+    TInt            iCaptureMode;
+    
+    TInt            iSingleCaptureHotkey;
+    TInt            iSingleCaptureImageFormat;
+    TInt            iSingleCaptureMemoryInUseMultiDrive;
+    TFileName       iSingleCaptureFileName;
+
+    TInt            iSequantialCaptureHotkey;
+    TInt            iSequantialCaptureImageFormat;
+    TInt            iSequantialCaptureDelay;
+    TInt            iSequantialCaptureMemoryInUseMultiDrive;
+    TFileName       iSequantialCaptureFileName;
+
+    TInt            iVideoCaptureHotkey;
+    TInt            iVideoCaptureVideoFormat;
+    TInt		    iVideoCaptureMemoryInUseMultiDrive;
+    TFileName       iVideoCaptureFileName;
+    };
+
+class TVideoFrame
+    {
+public:
+    TUint       iWidth;
+    TUint       iHeight;
+    TUint       iXPos;
+    TUint       iYPos;
+    TUint       iDelay; // 1000 = 1 sec
+    TBool       iEnableTransparency;
+    TBool       iFillsWholeScreen;
+    TFileName   iFileStorePath;
+    };
+
+
+typedef CArrayFixSeg<TVideoFrame> CVideoFrameArray;
+
+/**
+ *  CEngine
+ * 
+ */
+class SGEngine : public CActive //, public MMdaAudioToneObserver
+    {
+    
+    // active object states
+
+    enum TState 
+        {
+        EIdle = 0,              // do nothing
+        EEncodingImage,         // ICL encoding of an image
+        ESequenceDelay,         // waiting till next capture
+        ECancelCapturing,       // asking to cancel capturing
+        ENextVideoFrame,        // get next frame for video
+        ECancelVideoCapturing,  // asking to cancel video capturing  
+        EQueryDelay             // waiting till to remove query
+        };
+    
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~SGEngine();
+
+    /**
+     * Two-phased constructor.
+     */
+    static SGEngine* NewL(EngineWrapper *aEngineWrapper);
+
+    /**
+     * Two-phased constructor.
+     */
+    static SGEngine* NewLC(EngineWrapper *aEngineWrapper);
+    
+    /**
+     * returns current settings
+     */
+    inline TGrabSettings GrabSettings(){ return iGrabSettings; };
+    
+    /**
+     * saves settings to engine
+     */
+    void SaveSettingsL(const TGrabSettings& aGrabSettings);
+    
+    /**
+     * takes one screen shot
+     */
+    bool TakeScreenShotAndSaveL();
+
+    TBool DriveOK(TDriveNumber aNumber);
+    
+    TBool IsDriveMMC(TDriveNumber aDrive);
+    
+#if defined(HB_QT_S60_EVENT_FILTER)
+    TBool HandleCaptureCommandsL(const TWsEvent* aEvent);
+#else
+    TBool HandleCaptureCommandsL(const QSymbianEvent *event);
+#endif
+	
+    
+    void ActivateModelL();
+    void DeActivateModelL();
+    void ActivateCaptureKeysL(TBool aChangeKey=EFalse);
+	void EnableRcpOfFoc(TBool aState);
+    void LoadSettingsL();
+	
+private:
+
+    void CapturingFinishedL(TInt aErr);
+
+    void RunL();
+    void DoCancel();
+    void SaveVideoL(TInt aErr);
+    void CleanTemporaryFilesL();
+    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue);
+    void LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue); 
+
+    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue);
+    void SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue);
+
+    void CancelCapturing();
+    void CaptureFrameForVideoL();
+	
+    
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    SGEngine();
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL(EngineWrapper *aEngineWrapper);
+    
+    
+private:
+	RFs 		  iFileSession;
+
+    CActiveScheduler* iActiveScheduler;
+	CActiveSchedulerWait* iWait;
+ 
+    TGrabSettings           iGrabSettings;              // a simple class to store the settings used in the screen capture
+    RWindowGroup            iRootWin;                   // application's window group
+    TInt                    iCapturedKey;               // a handle to the key which is captured
+    TInt                    iCapturedKeyUnD;            // a handle to the key which is captured, up and down
+    TInt                    iCapturedKeyHash;           // a handle to the hash key which is captured
+    TInt                    iCapturedKeyHashUnD;        // a handle to the hash key which is captured, up and down
+    TBool                   iHashKeyCapturingActivated; // captures hash key is activated    
+    CFbsBitmap*             iPreviouslyCapturedBitmap;  // a previously captured bitmap
+    TFileName               iSaveFileName;   
+    CImageEncoder*          iImageEncoder;              // engine from ICL to do the image conversion// target filename of the taken screen shot
+    CFrameImageData*        iFrameImageData;            // frame and image block data needed by ICL
+    TState                  iState;                     // state of this active object
+    TBool                   iHashKeyDown;               // stores state if hash key is currently down
+    TBool                   iCapturingInProgress;       // boolean to check if capturing is in progress
+    TBool                   iStopCapturing;             // boolean to specify if to ask capturing
+    TUint                   iNumberOfTakenShots;        // a number of the taken screen shots in the sequantial mode
+    RTimer                  iTimer;                     // a timer for async delays
+    TUint                   iCurrentFrameNumber;        // a number of taken frames in video mode
+    TTime                   iPreviousFrameTaken;        // time when the last frame was taken
+    TSize                   iVideoDimensions;           // dimension of the video
+    TSize                   iPreviousFrameScreenDimension; // dimension of the screen in previous frame
+    CVideoFrameArray*       iVideoFrameArray;           // the frames of the video
+    EngineWrapper*          iEngineWrapper;             // Eninewrapper that is used for communicating between QT and Symbian
+    };
+
+
+
+
+
+#endif // SGENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/rom/backup_registration.xml	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <passive_backup>
+    <include_directory name="\"/>
+  </passive_backup>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/rom/screengrabber.iby	Mon Oct 18 16:30:05 2010 +0300
@@ -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:  
+*
+*/
+
+
+#ifndef __SCREENGRABBER_IBY__
+#define __SCREENGRABBER_IBY__
+
+S60_APP_EXE(ScreenGrabber)
+S60_APP_RESOURCE(ScreenGrabber)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,ScreenGrabber)
+//#ifdef S60_UPGRADABLE_APP_REG_RSC
+//  S60_UPGRADABLE_APP_REG_RSC(ScreenGrabber)
+//#else
+//  S60_APP_AIF_RSC(ScreenGrabber)
+//#endif
+
+data=ZPRIVATE\10003a3f\import\APPS\ScreenGrabber_reg.RSC Private\10003a3f\import\Apps\ScreenGrabber_reg.rsc 
+data=ZPRIVATE\101FB751\backup_registration.xml        	private\101FB751\backup_registration.xml
+data=ZSYSTEM\Install\ScreenGrabber_stub.sis             \system\install\ScreenGrabber_stub.sis
+
+#endif // __SCREENGRABBER_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/screengrabber.pro	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,82 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+#
+
+
+TEMPLATE = app
+TARGET = ScreenGrabber
+DEPENDPATH += src
+INCLUDEPATH += inc
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+load(hb.prf)
+symbian:CONFIG -= symbian_i18n
+
+HEADERS += inc/mainview.h \
+					 inc/settingsview.h \
+					 inc/application.h \
+					 inc/notifications.h
+
+SOURCES += main.cpp \
+					 mainview.cpp \
+					 application.cpp \
+					 settingsview.cpp \
+					 notifications.cpp 
+
+symbian: {
+    BLD_INF_RULES.prj_exports += "./rom/screengrabber.iby CORE_IBY_EXPORT_PATH(tools,screengrabber.iby)
+    BLD_INF_RULES.prj_exports += "./rom/backup_registration.xml     Z:/private/101FB751/backup_registration.xml"
+    
+    screengrabber_buildstubsis_extension = \
+        "$${LITERAL_HASH}ifdef MARM" \
+        "    START EXTENSION app-services/buildstubsis" \
+        "    OPTION SRCDIR sis" \
+        "    OPTION SISNAME screengrabber_stub" \
+        "    END" \
+        "$${LITERAL_HASH}endif" 
+        
+    BLD_INF_RULES.prj_extensions += screengrabber_buildstubsis_extension
+        
+		LIBS += -lestor -lws32 -lPlatformEnv -limageconversion  -lapgrfx -lcommonengine  -lfbscli -lgdi -leikcore -lbafl -lefsrv -lapparc -lcone
+
+		HEADERS += inc/sgengine.h \
+   				   inc/enginewrapper.h \
+				   inc/gifanimator.h
+
+		SOURCES += sgengine.cpp \
+				   enginewrapper.cpp \
+				   gifanimator.cpp
+
+		RSS_RULES += "group_name = \"RnD Tools\"";
+
+    TARGET.CAPABILITY = WriteDeviceData SwEvent
+
+    TARGET.UID2 = 0x100039CE
+    TARGET.UID3 = 0x101FB751
+    TARGET.SID = 0x101FB751
+    TARGET.VID = 0x101FB657 // Nokia
+	
+	
+    TARGET.EPOCHEAPSIZE = 0x20000 0x1000000  // Min 128Kb, Max 16Mb
+
+    ICON = ./icons/ScreenGrabber_application_icon_final_svgt.svg 
+    
+    MMP_RULES -= PAGED
+  	MMP_RULES *= UNPAGEDDATA
+  	MMP_RULES += SMPSAFE
+
+} else {
+    error("Only Symbian supported!")
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/sis/ScreenGrabber_stub.pkg	Mon Oct 18 16:30:05 2010 +0300
@@ -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:
+;
+
+; Language - standard language definitions
+&EN
+
+; Standard SIS file header
+#{"ScreenGrabber"},(0x101FB751),1,0,0
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; normal stuff:
+""-"z:\sys\bin\ScreenGrabber.exe"
+""-"z:\Resource\Apps\ScreenGrabber.mif"
+""-"z:\Resource\Apps\ScreenGrabber.rsc"
+""-"z:\private\10003a3f\import\apps\ScreenGrabber_reg.rsc"
+""-"z:\private\101FB751\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/application.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* 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 <eikenv.h>
+#include "application.h"
+#include "enginewrapper.h"
+
+#define KEY_CAPTURE_PRIORITY 100
+
+SGApplication::SGApplication(int argc, char *argv[])  
+    : HbApplication(argc, argv) 
+     {
+	 
+	
+     }
+
+	 
+SGApplication::~SGApplication()  
+{
+		
+}	
+	 
+// ---------------------------------------------------------------------------
+
+#if defined(Q_WS_S60)
+#if defined(HB_QT_S60_EVENT_FILTER)
+bool SGApplication::s60EventFilter(TWsEvent *aEvent)
+#else
+bool SGApplication::symbianEventFilter(const QSymbianEvent *aEvent)
+#endif // (HB_QT_S60_EVENT_FILTER)
+{
+    // pass event to engine, if engine returns true(event was not handled),
+    // forward it.
+    if(!iEngine->handleCaptureCommands(aEvent)) 
+        {
+        return false;
+        }
+    else
+        {
+#if defined(HB_QT_S60_EVENT_FILTER)
+        return HbApplication::s60EventFilter(aEvent);
+#else
+		return HbApplication::symbianEventFilter(aEvent);
+#endif		
+        }
+    
+    }
+#endif
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/enginewrapper.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,250 @@
+/*
+* 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 <eikenv.h>
+#include <apgtask.h>
+#include <hbdeviceprogressdialog.h>
+#include "enginewrapper.h"
+
+#include "settingsview.h"
+#include "sgengine.h"
+#include "mainview.h"
+#include "notifications.h"
+
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::EngineWrapper()
+: iSGEngine(0), iProgressNote(0)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+EngineWrapper::~EngineWrapper()
+{
+    if (iSGEngine) {
+        iSGEngine->DeActivateModelL();
+        delete iSGEngine;
+    }
+    if(iProgressNote){
+        delete iProgressNote;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::init()
+{
+    TRAPD(error, iSGEngine = SGEngine::NewL(this));
+	
+    
+    if (error == KErrNone) {
+        TRAP(error, iSGEngine->ActivateModelL());
+    }
+    
+    if (error != KErrNone) {
+        return false;
+    }
+    else {
+        return true;
+    }
+	
+}
+
+// ---------------------------------------------------------------------------
+
+GrabSettings EngineWrapper::getGrabSettings()
+{
+    TGrabSettings tSettings = iSGEngine->GrabSettings();
+    GrabSettings settings;
+    
+    // Convert TGrabSettings to GrabSettings
+    settings.mCaptureMode = tSettings.iCaptureMode;
+    
+    // Single image settings
+    settings.mSingleCaptureHotkey = tSettings.iSingleCaptureHotkey;
+    settings.mSingleCaptureImageFormat = tSettings.iSingleCaptureImageFormat;
+	settings.mSingleCaptureMemoryInUseMultiDrive = tSettings.iSingleCaptureMemoryInUseMultiDrive;
+    settings.mSingleCaptureFileName = QString((QChar*)tSettings.iSingleCaptureFileName.Ptr(),tSettings.iSingleCaptureFileName.Length());
+    
+    //Seguantial image settings
+    settings.mSequantialCaptureDelay = tSettings.iSequantialCaptureDelay;
+    settings.mSequantialCaptureHotkey = tSettings.iSequantialCaptureHotkey;
+    settings.mSequantialCaptureImageFormat = tSettings.iSequantialCaptureImageFormat;
+	settings.mSequantialCaptureMemoryInUseMultiDrive = tSettings.iSequantialCaptureMemoryInUseMultiDrive;
+    settings.mSequantialCaptureDelay = tSettings.iSequantialCaptureDelay;
+    //convert TFilename to QString
+    settings.mSequantialCaptureFileName = QString((QChar*)tSettings.iSequantialCaptureFileName.Ptr(),tSettings.iSequantialCaptureFileName.Length());
+    
+    
+    // Video settings
+    settings.mVideoCaptureHotkey = tSettings.iVideoCaptureHotkey;
+    settings.mVideoCaptureVideoFormat = tSettings.iVideoCaptureVideoFormat;
+	settings.mVideoCaptureMemoryInUseMultiDrive = tSettings.iVideoCaptureMemoryInUseMultiDrive;
+    //convert TFilename to QString
+    settings.mVideoCaptureFileName = QString((QChar*)tSettings.iVideoCaptureFileName.Ptr(),tSettings.iVideoCaptureFileName.Length());
+    
+    return settings;
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::saveSettings(const GrabSettings& settings)
+{
+    TGrabSettings tSettings;
+    // Convert GrabSettings to TGrabSettings
+    tSettings.iCaptureMode = settings.mCaptureMode;
+    
+    tSettings.iSingleCaptureHotkey = settings.mSingleCaptureHotkey;
+    tSettings.iSingleCaptureImageFormat = settings.mSingleCaptureImageFormat;
+    tSettings.iSingleCaptureMemoryInUseMultiDrive = settings.mSingleCaptureMemoryInUseMultiDrive;
+    //convert TFilename to QString
+    tSettings.iSingleCaptureFileName = TFileName(settings.mSingleCaptureFileName.utf16());
+    tSettings.iSequantialCaptureDelay = settings.mSequantialCaptureDelay;
+    tSettings.iSequantialCaptureHotkey = settings.mSequantialCaptureHotkey;
+    tSettings.iSequantialCaptureImageFormat = settings.mSequantialCaptureImageFormat;
+    tSettings.iSequantialCaptureMemoryInUseMultiDrive = settings.mSequantialCaptureMemoryInUseMultiDrive; 
+    tSettings.iSequantialCaptureDelay = settings.mSequantialCaptureDelay;
+    //convert TFilename to QString
+    tSettings.iSequantialCaptureFileName = TFileName(settings.mSequantialCaptureFileName.utf16());
+    
+    tSettings.iVideoCaptureHotkey = settings.mVideoCaptureHotkey;
+    tSettings.iVideoCaptureVideoFormat = settings.mVideoCaptureVideoFormat;
+    tSettings.iVideoCaptureMemoryInUseMultiDrive = settings.mVideoCaptureMemoryInUseMultiDrive; 
+    //convert TFilename to QString
+    tSettings.iVideoCaptureFileName = TFileName(settings.mVideoCaptureFileName.utf16());
+    TRAPD(error, iSGEngine->SaveSettingsL(tSettings));
+    
+    if (error == KErrNone) {
+        TRAP(error, iSGEngine->ActivateCaptureKeysL(true));
+    }
+    
+    if (error == KErrNone) {
+        return true;
+    }
+    else {
+        return false;
+    }
+    
+    
+}
+
+// ---------------------------------------------------------------------------
+
+
+void EngineWrapper::ShowImageCapturedNote()
+{
+    Notifications::imageCaptured();
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowErrorMessage(const TDesC16& aErrorMessage)
+{
+    QString errorMessage((QChar*)aErrorMessage.Ptr(),aErrorMessage.Length());
+    Notifications::error(errorMessage);
+ 
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::sendUIToBackground()
+{
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+    TApaTask selfTask(coeEnv->WsSession());
+    selfTask.SetWgId(coeEnv->RootWin().Identifier());
+    selfTask.SendToBackground();
+}
+
+// ---------------------------------------------------------------------------
+
+
+#if defined(HB_QT_S60_EVENT_FILTER)
+bool EngineWrapper::handleCaptureCommands(const TWsEvent* aEvent)
+#else
+bool EngineWrapper::handleCaptureCommands(const QSymbianEvent *aEvent)
+#endif
+{
+    TBool retVal = ETrue;
+    TRAPD(errorCode, retVal = iSGEngine->HandleCaptureCommandsL(aEvent));
+    if (errorCode != KErrNone) {
+        Notifications::error("Error occured when capturing screen.");
+    }
+    
+    return convertTBoolToBool(retVal);
+    
+}
+
+// ---------------------------------------------------------------------------
+
+bool EngineWrapper::convertTBoolToBool(TBool value)
+{
+    if (value) {
+        return true;
+    }
+    else {
+        return false;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowSequantialImagesCapturedNote(TInt amount)
+{
+    Notifications::sequantialImagesCaptured(amount);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowVideoCapturedNote()
+{
+    Notifications::videoCaptured();
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::ShowProgressBar(int max)
+{
+    iProgressNote = Notifications::showProgressBar(max);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::IncrementProgressbarValue()
+{
+    iProgressNote->setProgressValue(iProgressNote->progressValue() + 1);
+}
+
+// ---------------------------------------------------------------------------
+
+void EngineWrapper::CloseProgressbar()
+{
+    delete iProgressNote;
+    iProgressNote = 0;
+}
+
+void EngineWrapper::EnableRcpOfFoc(TBool aState)
+{
+    iSGEngine->EnableRcpOfFoc(aState);
+}
+
+void EngineWrapper::LoadSettings(void)
+{
+	iSGEngine->LoadSettingsL();
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/gifanimator.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,308 @@
+/*
+* 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 "gifanimator.h"
+
+#include <s32file.h>
+#include <fbs.h>
+#include <gdi.h>
+#include <imageconversion.h>
+#include "enginewrapper.h"
+
+    
+// ---------------------------------------------------------------------------
+
+TInt CGifAnimator::CreateGifAnimation(const TDesC& aFileName, TSize aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper)
+    {
+	CGifAnimator* self = new(ELeave) CGifAnimator;
+	CleanupStack::PushL(self);
+	TRAPD(err, self->StartL(aFileName, aDimensions, aVideoFrameArray, aEngineWrapper));
+	CleanupStack::PopAndDestroy();
+	return err;
+    }
+
+// ---------------------------------------------------------------------------
+
+CGifAnimator::CGifAnimator()   
+    {
+    }
+
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::StartL(const TDesC& aFileName, const TSize& aDimensions, CVideoFrameArray* aVideoFrameArray, EngineWrapper& aEngineWrapper)
+    {
+    
+    __ASSERT_ALWAYS(aFileName.Length() > 0, User::Panic(_L("GifAnim"), 100));
+    __ASSERT_ALWAYS(aDimensions.iHeight > 0, User::Panic(_L("GifAnim"), 101));
+    __ASSERT_ALWAYS(aDimensions.iWidth > 0, User::Panic(_L("GifAnim"), 102));
+    __ASSERT_ALWAYS(aVideoFrameArray != NULL, User::Panic(_L("GifAnim"), 103));
+    
+    
+    // show a progress dialog
+    aEngineWrapper.ShowProgressBar(aVideoFrameArray->Count()-1);
+    
+    // open the file for writing
+    User::LeaveIfError(iFs.Connect());
+    User::LeaveIfError(iOutFile.Replace(iFs, aFileName, EFileWrite));
+    
+    // write header
+    WriteHeaderL(aDimensions);
+    
+    // process each frame of the animation
+    for (TInt i=0; i<aVideoFrameArray->Count(); i++)
+        {
+        // write headers and raster block
+        TVideoFrame frame = aVideoFrameArray->At(i);
+        WriteGraphicControlL(frame);
+        CFbsBitmap* bitmap = GetBitmapLC(frame, aDimensions);
+        WriteImageDescriptorL(frame);
+        WriteRasterDataL(bitmap);
+        CleanupStack::PopAndDestroy(); //bitmap
+
+        // update the progress bar
+        aEngineWrapper.IncrementProgressbarValue();
+        }
+
+    // write footer and finish
+    WriteFooterL();
+    FinishL();
+    
+    // remove the progress dialog from the screen
+    aEngineWrapper.CloseProgressbar();
+    }    
+
+// ---------------------------------------------------------------------------
+
+CGifAnimator::~CGifAnimator()
+    {
+    
+    if (iImageEncoder)
+        delete iImageEncoder;
+    
+    if (iGIFImageData)
+        delete iGIFImageData;
+    
+    }
+
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::WriteHeaderL(const TSize& aDimensions)
+    {
+    WriteInt8L('G');
+    WriteInt8L('I');
+    WriteInt8L('F');
+    WriteInt8L('8');
+    WriteInt8L('9');
+    WriteInt8L('a');
+
+    WriteInt16L(aDimensions.iWidth);  // width of animation
+    WriteInt16L(aDimensions.iHeight); // height of animation
+    
+    // logical screen descriptor
+    TUint8 packedFlags = 0;
+	packedFlags |= 8 - 1; // size of colour table is number of bits in each color table minus one (bits 0-2)
+	packedFlags |= (8 - 1) << 4; // colour resolution ie maximum size of the original colour palette (bits 4-6)
+	packedFlags |= 0x80; // use global colour table (bit 7)
+    
+    WriteInt8L(packedFlags);
+    
+    WriteInt8L(TRANSPARENCY_INDEX); // background color index
+    
+    WriteInt8L(0); // pixel aspect ratio, 0=not used
+    
+    // write the Symbian default palette since that's what is used
+    CPalette* palette = CPalette::NewDefaultL(EColor256);
+    CleanupStack::PushL(palette);
+    
+    for (TInt i=0; i<palette->Entries(); i++)
+        {
+        TRgb entry = palette->GetEntry(i);
+
+        WriteInt8L(entry.Red());
+        WriteInt8L(entry.Green());
+        WriteInt8L(entry.Blue());
+        }
+    
+    CleanupStack::PopAndDestroy(); //palette
+    }
+
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::WriteGraphicControlL(const TVideoFrame& aFrame)
+    {
+    TInt packedFlags(0);
+    
+    // enable transparency if needed
+    if (aFrame.iEnableTransparency)
+        packedFlags |= 0x01; 
+
+    // set disposal method:
+    // 0 = disposal method not specified, 1 = do not dispose of graphic,
+    // 2 = overwrite graphic with background color, 3 = overwrite graphic with previous graphic
+    TInt disposalMethod = 1;
+    packedFlags |= ((disposalMethod << 2) & 0x1c);
+    
+    WriteInt8L(0x21); // GIF extension
+    WriteInt8L(0xf9); // GIF graphic control block
+    WriteInt8L(0x04); // block size
+    WriteInt8L(packedFlags); // packed
+    WriteInt16L(aFrame.iDelay); // delay
+    WriteInt8L(TRANSPARENCY_INDEX); // transparent color index
+    WriteInt8L(0); // block terminator, always 0
+    }
+
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::WriteImageDescriptorL(const TVideoFrame& aFrame)
+    {
+    WriteInt8L(0x2c); // GIF image descriptor
+    WriteInt16L(aFrame.iXPos);
+    WriteInt16L(aFrame.iYPos);
+    WriteInt16L(aFrame.iWidth);
+    WriteInt16L(aFrame.iHeight);
+    WriteInt8L(0); // packed flags, none specified in this case
+    }
+    
+// ---------------------------------------------------------------------------
+
+CFbsBitmap* CGifAnimator::GetBitmapLC(TVideoFrame& aFrame, const TSize& aDimensions)
+    {
+    CFbsBitmap* bitmap = new(ELeave) CFbsBitmap;
+    CleanupStack::PushL(bitmap);
+    
+    // read the bitmap from the temporary file
+    RFile bitmapFile;
+    User::LeaveIfError( bitmapFile.Open(iFs, aFrame.iFileStorePath, EFileRead) );
+    RFileReadStream readStream(bitmapFile);
+    bitmap->InternalizeL(readStream);
+    readStream.Close();
+    bitmapFile.Close();
+
+    // delete the temporary file since it's not needed anymore
+    iFs.Delete(aFrame.iFileStorePath);
+    
+    // resize the bitmap to match the video dimensions if it is a full screen one
+    if (aFrame.iFillsWholeScreen && (aFrame.iWidth != aDimensions.iWidth || aFrame.iHeight != aDimensions.iHeight))
+        {
+        if (bitmap->Resize(aDimensions) == KErrNone)
+            {
+            // also update dimensions of this frame to match the dimensions of the video            
+            aFrame.iWidth = aDimensions.iWidth;
+            aFrame.iHeight = aDimensions.iHeight;
+            }
+        }
+    
+    return bitmap;
+    }
+    
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::WriteRasterDataL(CFbsBitmap* aBitmap)
+    {
+    // reset the encoder
+    if (iImageEncoder)
+        {
+	    delete iImageEncoder;
+        iImageEncoder = NULL;
+        }
+    
+    // make sure the buffer for conversion is empty    
+    if (iGIFImageData)
+        {
+	    delete iGIFImageData;
+        iGIFImageData = NULL;
+        }        
+
+    
+    TRequestStatus Stat = KRequestPending;
+    
+    // init & convert the bitmap to GIF format
+    iImageEncoder = CImageEncoder::DataNewL(iGIFImageData, CImageEncoder::EOptionAlwaysThread, KImageTypeGIFUid);
+    iImageEncoder->Convert( &Stat, *aBitmap );
+    User::WaitForRequest(Stat);
+   
+   
+    // check any erros in converting 
+    User::LeaveIfError( Stat.Int() );
+    
+    // check if we have valid data
+    if (iGIFImageData == NULL || iGIFImageData->Des().Length()<793)
+        User::Leave(KErrNoMemory);
+    
+    // in GIF files generated by Symbian, the raster data always starts at offset 791,
+    // initial code size in GIF encoding should be 8 since we have a 8bpp image,
+    // also check that the second last byte is the terminator 0,
+    // if this check fails in newer releases of S60, proper parsing of GIF format is probably needed
+    TUint8* imagePtr = &iGIFImageData->Des()[0];
+    if (imagePtr[791] != 8 || imagePtr[iGIFImageData->Des().Length()-2] != 0)
+        User::Leave(KErrNotSupported);
+    
+    // write the raster data block to the file
+    TUint writeLength = iGIFImageData->Des().Length() - 1 - 791;
+    imagePtr+=791;
+    TPtr8 writePtr(imagePtr, writeLength, writeLength);
+    User::LeaveIfError( iOutFile.Write(writePtr) );
+    }
+
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::WriteFooterL()
+    {
+    WriteInt8L(0x3b); // GIF trailer
+    }
+    
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::FinishL()
+    {
+    iOutFile.Close();
+    iFs.Close();
+    }
+
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::WriteInt8L(TInt aValue)
+    {
+    HBufC8* buf = HBufC8::NewMaxLC(1);
+
+    TUint8* ptr = &buf->Des()[0];
+    ptr[0] = TUint8(aValue);
+    
+    User::LeaveIfError( iOutFile.Write(buf->Des()) );
+    
+    CleanupStack::PopAndDestroy(); // buf
+    }
+
+// ---------------------------------------------------------------------------
+
+void CGifAnimator::WriteInt16L(TInt aValue)
+    {
+    HBufC8* buf = HBufC8::NewMaxLC(2);
+
+    TUint8* ptr = &buf->Des()[0];
+    ptr[0] = TUint8(aValue);
+    ptr[1] = TUint8(aValue>>8);
+        
+    User::LeaveIfError( iOutFile.Write(buf->Des()) );
+    
+    CleanupStack::PopAndDestroy(); // buf
+    }
+
+// ---------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/main.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <QtGui/QMessageBox>
+
+#include <hbmainwindow.h>
+#include <hbview.h>
+#include <hbmessagebox.h>
+#include <coecntrl.h>
+
+#include "mainview.h"
+#include "application.h"
+#include "enginewrapper.h"
+#include "settingsview.h"
+
+
+
+int main(int argc, char *argv[])
+{
+    
+    SGApplication app(argc, argv);
+	
+    EngineWrapper engineWrapper;
+	app.SetEngineWrapper(&engineWrapper);
+    if (!engineWrapper.init()) {
+      return EXIT_FAILURE;
+    }
+
+	
+	
+    HbMainWindow mainWindow;
+    
+    //Create main view
+    MainView* view = new MainView(mainWindow, engineWrapper);
+    //initialize main view
+    view->init(app);
+
+	
+    SettingsView* settingsView = new SettingsView(*view, mainWindow, engineWrapper);
+	
+	view->setSettingsView(settingsView);
+    
+	// Add Views to main window and reveal it.
+    mainWindow.addView(view);
+    mainWindow.addView(settingsView);
+
+    
+    mainWindow.show();
+     
+    int result = app.exec();
+   
+    return result;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/mainview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,173 @@
+/*
+* 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 <hbview.h>
+#include <hbmainwindow.h>
+#include <hbapplication.h>
+#include <hblabel.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbtextedit.h>
+#include <hbmessagebox.h>
+#include <qgraphicslinearlayout.h>
+#include "enginewrapper.h"
+#include "settingsview.h"
+#include "mainview.h"
+#include "notifications.h"
+#include "hbtoolbar.h"
+
+// ---------------------------------------------------------------------------
+
+MainView::MainView(HbMainWindow &mainWindow, EngineWrapper &engineWrapper):
+    mMainWindow(mainWindow),
+    mSettingsView(0),
+    mEngineWrapper(engineWrapper)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+MainView::~MainView()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::init(HbApplication &app)
+{
+    this->setTitle("Screen Grabber");
+    createMenu(app);
+    createInfoText();
+    createToolbar();
+
+}
+
+void MainView::createMenu(HbApplication& app)
+{
+    
+    HbMenu* menu = this->menu();
+   
+    if (menu != NULL) {
+    
+        actionSendToBg = menu->addAction("Send to background");
+        connect(actionSendToBg, SIGNAL( triggered() ), this, SLOT( sendToBackground() ) );
+        
+        actionSettings = menu->addAction("Settings");
+        connect(actionSettings, SIGNAL( triggered() ), this, SLOT( showSettings() ) );
+    
+        actionAbout = menu->addAction("About");
+        connect(actionAbout, SIGNAL( triggered() ), this, SLOT( showAboutPopup() ) );
+    
+        actionExit = menu->addAction("Exit");
+        connect(actionExit, SIGNAL(triggered()), this, SLOT( my_quit() ) );
+
+		HbAction *mDefaultNavigationAction = new HbAction(Hb::QuitNaviAction, this);
+		connect(mDefaultNavigationAction,SIGNAL(triggered()), this, SLOT(my_quit()));
+		setNavigationAction(mDefaultNavigationAction);
+        
+    	//setNavigationAction(actionExit);
+    }
+}
+
+
+void MainView::quitYesNoQuestionClosed(HbAction* action)
+    {
+    if( action && !action->text().compare("yes", Qt::CaseInsensitive) )
+        {
+        qApp->quit(); 
+        }
+    }
+
+void MainView::my_quit()
+    {
+	HbMessageBox::question("Do you really want to exit the Screen Grabber application?", 
+	    this, //receiver
+	    SLOT(quitYesNoQuestionClosed(HbAction *)), //member
+	    HbMessageBox::Yes | HbMessageBox::No,
+	    new HbLabel("Exit Screen grabber confirm", this)
+        );
+	}
+
+// ---------------------------------------------------------------------------
+
+void MainView::createInfoText()
+{
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical, this);
+    if (layout != NULL) {
+        HbTextEdit* edit = new HbTextEdit(this);
+        if(edit != NULL) {
+            edit->setPlainText("Please use the settings screen to define the "
+                               "capture mode and any other related settings "
+                               "such as capture hotkey and saving format. "
+                               "Using the PNG format for screen shots is "
+                               "recommended, since it is compressed but "
+                               "lossless. The captures can be managed with "
+                               "the Media Gallery application.\n\nYou may "
+                               "start taking screenshots or capturing video "
+                               "now. Please press the Applications key to go back "
+                               "to the Application menu or send this application "
+                               "to the background via the Options menu. To be "
+                               "able to take screenshots or capture video, this "
+                               "application needs to stay running in the "
+                               "background.");
+            edit->setReadOnly(true);
+            //TODO edit->setCursorHidden(true);
+            //TODO edit->setAttribute(Qt::WA_InputMethodEnabled, false);
+            layout->addItem(edit);
+            layout->setContentsMargins(5, 5, 5, 5);
+            this->setLayout(layout);
+        }
+        
+    }
+    
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::showSettings()
+{
+    mEngineWrapper.EnableRcpOfFoc(ETrue);
+	mEngineWrapper.LoadSettings();	
+	mSettingsView->loadSettings();
+	mMainWindow.setCurrentView(mSettingsView);
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::createToolbar()
+{
+    HbToolBar *toolbar = new HbToolBar(this); // main view takes the ownership
+    toolbar->addAction(actionSettings);
+    toolbar->addAction(actionSendToBg);
+    setToolBar(toolbar);
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::showAboutPopup()
+{
+    Notifications::about();
+}
+
+// ---------------------------------------------------------------------------
+
+void MainView::sendToBackground()
+    {
+    mEngineWrapper.sendUIToBackground();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/notifications.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <hbdevicemessagebox.h>
+#include <hblabel.h>
+#include <hbdeviceprogressdialog.h>
+
+#include "notifications.h"
+
+
+
+// ---------------------------------------------------------------------------
+
+void Notifications::imageCaptured()
+{
+    HbDeviceMessageBox::information("Screen shot saved to Media Gallery");
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::about()
+{
+    HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+    messageBox->setText("Version 5.0.0 - March 10th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.");
+    HbLabel *header = new HbLabel("About Screen Grabber", messageBox);
+    messageBox->setHeadingWidget(header);
+    messageBox->setAttribute(Qt::WA_DeleteOnClose);
+    messageBox->setTimeout(HbPopup::NoTimeout);
+    messageBox->open();
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::error(const QString& errorMessage)
+{
+    HbDeviceMessageBox::warning(errorMessage);
+
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::sequantialImagesCaptured(int amount){
+    // Code below launches a global note
+    QString text;
+    text.setNum(amount, 10);
+    text.append(" screen shots saved to Media Gallery");
+    
+    HbDeviceMessageBox::information(text);
+ 
+}
+
+// ---------------------------------------------------------------------------
+
+void Notifications::videoCaptured()
+{
+    HbDeviceMessageBox::information("Video saved to Media Gallery");
+
+}
+
+// ---------------------------------------------------------------------------
+
+HbDeviceProgressDialog* Notifications::showProgressBar(int max)
+{
+    HbDeviceProgressDialog *note = new HbDeviceProgressDialog(HbProgressDialog::ProgressDialog);
+    note->setText("Saving...");
+    note->setMaximum(max);
+    note->show();
+    return note;
+}
+
+// ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/settingsview.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,275 @@
+/*
+* 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 <hbdataform.h>
+#include <hbdataformmodelitem.h>
+#include <hbdataformmodel.h>
+#include <hbdataformviewitem.h>
+#include <hbaction.h>
+#include <hbmenu.h>
+#include <hbtoolbar.h>
+#include <hbabstractviewitem.h>
+#include <hbaction.h>
+
+
+#include "settingsview.h"
+#include "enginewrapper.h"
+#include "sgengine.h"
+#include "hbslider.h"
+#include "notifications.h"
+
+
+
+// ---------------------------------------------------------------------------
+
+SettingsView::SettingsView(HbView &mainView, HbMainWindow &mainWindow, EngineWrapper &engineWrapper): 
+    mEngineWrapper(engineWrapper), 
+    mMainWindow(mainWindow), 
+    mMainView(mainView)
+{
+    // Set title and add this view to main window
+    setTitle("Settings");
+    
+    HbAction *actionSaveSettings = menu()->addAction(QString("Save & close"));
+    HbAction *actionCancel = menu()->addAction("Cancel & close");
+    
+    toolBar()->addAction(actionSaveSettings);
+    toolBar()->addAction(actionCancel);
+  
+    
+    //create setting form
+    mSettingForm = new HbDataForm();
+    
+    //create a model class
+    mModel = new HbDataFormModel(this);
+    
+    // DataFormItem for mode selection
+    mModeItem = mModel->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Capture mode"), 0);
+    mModeItem->setContentWidgetData(QString("items"), CAPTUREMODES);
+    
+    // Create setting model
+     createSingleCaptureComponents(mModel, 0);
+     createSequentialCaptureComponents(mModel, 0);
+     createVideoCaptureComponents(mModel, 0);
+ 
+    // Set created model model to form
+    mSettingForm->setModel(mModel);
+    setWidget(mSettingForm);//takes ownership
+    
+    loadSettings();
+    
+    // Connect signals from item modifications and close with this form's slots
+    connect(actionSaveSettings, SIGNAL(triggered()), this, SLOT(saveAndClose()));
+    connect(actionCancel, SIGNAL(triggered()), this, SLOT(close()));
+	
+	HbAction *mDefaultNavigationAction = new HbAction(Hb::QuitNaviAction, this);
+	connect(mDefaultNavigationAction,SIGNAL(triggered()), this, SLOT(saveAndClose()));
+	setNavigationAction(mDefaultNavigationAction);
+	
+
+
+}
+
+
+// ---------------------------------------------------------------------------
+
+SettingsView::~SettingsView()
+{
+
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::loadSettings()
+{
+
+    // get settings from engine;
+    mSettings = mEngineWrapper.getGrabSettings();
+    
+    //Capture mode
+    mModeItem->setContentWidgetData("selected", mSettings.mCaptureMode);
+    
+    // Still image 
+    mImageHotKeyItem->setContentWidgetData("selected", mSettings.mSingleCaptureHotkey);
+    mImageFormatItem->setContentWidgetData("selected", mSettings.mSingleCaptureImageFormat);
+    mImageMemoryInUseItem->setContentWidgetData("selected", mSettings.mSingleCaptureMemoryInUseMultiDrive);
+    mImageFileNameItem->setContentWidgetData("text", mSettings.mSingleCaptureFileName);
+       
+    // Seguantial image components
+    mSequantialHotKeyItem->setContentWidgetData("selected", mSettings.mSequantialCaptureHotkey);
+    mSequantialFormatItem->setContentWidgetData("selected", mSettings.mSequantialCaptureImageFormat);
+    mSequantialDelayItem->setContentWidgetData("text", mSettings.mSequantialCaptureDelay);
+    mSequantialMemoryInUseItem->setContentWidgetData("selected", mSettings.mSequantialCaptureMemoryInUseMultiDrive);
+    mSequantialFileNameItem->setContentWidgetData("text", mSettings.mSequantialCaptureFileName);
+    
+    // Video capture components
+    mVideoHotKeyItem->setContentWidgetData("selected", mSettings.mVideoCaptureHotkey);
+    mVideoFormatItem->setContentWidgetData("selected", mSettings.mVideoCaptureVideoFormat);
+    mVideoMemoryInUseItem->setContentWidgetData("selected", mSettings.mVideoCaptureMemoryInUseMultiDrive);
+    mVideoFileNameItem->setContentWidgetData("text", mSettings.mVideoCaptureFileName);
+    
+	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createSingleCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+    
+    // Create Group for single image components
+    mGroupImageCapture = model->appendDataFormGroup(QString("Single image settings"), parent);
+
+    // DataFormItem for hotkey selection
+    mImageHotKeyItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Capture hotkey"), mGroupImageCapture);
+    mImageHotKeyItem->setContentWidgetData(QString("items"), KEYS);
+
+    // DataFormItem for image format selection
+    mImageFormatItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Image format"), mGroupImageCapture);
+    mImageFormatItem->setContentWidgetData(QString("items"), IMAGEFORMATS);
+    
+    // DataFormItem for memory in use selection
+    mImageMemoryInUseItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Memory in use"), mGroupImageCapture);
+    mImageMemoryInUseItem->setContentWidgetData(QString("items"), MEMORYMODES);
+    
+    // DataFormItem for file name
+    mImageFileNameItem = model->appendDataFormItem(
+            HbDataFormModelItem::TextItem, QString("File name"), mGroupImageCapture);
+    mImageFileNameItem->setContentWidgetData(QString("text"), QString("Shot"));
+    
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createSequentialCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+    
+    
+    // Create Group for sequential image components
+    mGroupSeguantialCapture = model->appendDataFormGroup(QString("Sequential image settings"), parent);
+    
+    // DataFormItem for hotkey selection
+    mSequantialHotKeyItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Capture hotkey"), mGroupSeguantialCapture);
+    mSequantialHotKeyItem->setContentWidgetData(QString("items"), KEYS);
+    
+    // DataFormItem for image format selection
+    mSequantialFormatItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Image format"), mGroupSeguantialCapture);
+    mSequantialFormatItem->setContentWidgetData(QString("items"), IMAGEFORMATS);
+    
+    // DataFormItem for delay between images selection
+    mSequantialDelayItem = model->appendDataFormItem(
+            HbDataFormModelItem::TextItem, QString("Delay between two images(ms)"), mGroupSeguantialCapture);
+    mSequantialDelayItem->setContentWidgetData(QString("text"), QString("Shot"));
+    
+    // DataFormItem for memory selection
+    mSequantialMemoryInUseItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Memory in use"), mGroupSeguantialCapture);
+    mSequantialMemoryInUseItem->setContentWidgetData(QString("items"), MEMORYMODES);
+    
+    // DataFormItem for file name
+    mSequantialFileNameItem = model->appendDataFormItem(
+            HbDataFormModelItem::TextItem, QString("File name"), mGroupSeguantialCapture);
+    mSequantialFileNameItem->setContentWidgetData(QString("text"), QString("Shot"));
+    
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::createVideoCaptureComponents(HbDataFormModel *model, HbDataFormModelItem *parent)
+{
+
+    // Create Group for video capturing components
+    mGroupVideoCapture = model->appendDataFormGroup(QString("Video settings"), parent);
+    
+    // DataFormItem for hotkey selection
+    mVideoHotKeyItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Start/Stop hotkey"), mGroupVideoCapture);
+    mVideoHotKeyItem->setContentWidgetData(QString("items"), KEYS);
+    
+    // DataFormItem for video format selection
+    mVideoFormatItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Video format"), mGroupVideoCapture);
+    mVideoFormatItem->setContentWidgetData(QString("items"), VIDEOFORMATS);
+    
+    // DataFormItem for memory selection
+    mVideoMemoryInUseItem = model->appendDataFormItem(
+            HbDataFormModelItem::RadioButtonListItem, QString("Memory in use"), mGroupVideoCapture);
+    mVideoMemoryInUseItem->setContentWidgetData(QString("items"), MEMORYMODES);
+    
+    // DataFormItem for file name
+    mVideoFileNameItem = model->appendDataFormItem(
+            HbDataFormModelItem::TextItem, QString("File name"), mGroupVideoCapture);
+    mVideoFileNameItem->setContentWidgetData(QString("text"), QString("Video"));
+    
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::saveAndClose()
+{
+
+    readFormItems();
+    if (!mEngineWrapper.saveSettings(mSettings)) {
+        Notifications::error("Unable to save settings");
+    }    
+    
+    mEngineWrapper.EnableRcpOfFoc(EFalse);
+    mMainWindow.setCurrentView(&mMainView);
+	
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::readFormItems()
+{
+    
+    //TODO this does not work correctly with WK38 ( Text box items )
+
+    mSettings.mCaptureMode = mModeItem->contentWidgetData("selected").toInt();
+
+    mSettings.mSingleCaptureImageFormat = mImageFormatItem->contentWidgetData("selected").toInt();
+    mSettings.mSingleCaptureHotkey = mImageHotKeyItem->contentWidgetData("selected").toInt();
+    mSettings.mSingleCaptureMemoryInUseMultiDrive = mImageMemoryInUseItem->contentWidgetData("selected").toInt(); 
+    mSettings.mSingleCaptureFileName = mImageFileNameItem->contentWidgetData("text").toString();
+    
+    mSettings.mSequantialCaptureImageFormat = mSequantialFormatItem->contentWidgetData("selected").toInt();
+    mSettings.mSequantialCaptureHotkey = mSequantialHotKeyItem ->contentWidgetData("selected").toInt();
+    mSettings.mSequantialCaptureMemoryInUseMultiDrive = mSequantialMemoryInUseItem ->contentWidgetData("selected").toInt();
+    mSettings.mSequantialCaptureFileName = mSequantialFileNameItem->contentWidgetData("text").toString();
+    mSettings.mSequantialCaptureDelay = mSequantialDelayItem->contentWidgetData("text").toInt();
+    
+
+    mSettings.mVideoCaptureVideoFormat = mVideoFormatItem->contentWidgetData("selected").toInt();
+    mSettings.mVideoCaptureHotkey = mVideoHotKeyItem ->contentWidgetData("selected").toInt();
+    mSettings.mVideoCaptureMemoryInUseMultiDrive = mVideoMemoryInUseItem ->contentWidgetData("selected").toInt();
+    mSettings.mVideoCaptureFileName = mVideoFileNameItem ->contentWidgetData("text").toString();
+	
+   
+}
+
+// ---------------------------------------------------------------------------
+
+void SettingsView::close()
+{
+    mEngineWrapper.EnableRcpOfFoc(EFalse);
+    mMainWindow.setCurrentView(&mMainView);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilityapps/screengrabber/src/sgengine.cpp	Mon Oct 18 16:30:05 2010 +0300
@@ -0,0 +1,1485 @@
+/*
+* 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 <s32file.h> 
+#include <bautils.h>
+#include <pathinfo.h>
+#include <apparc.h> 
+#include <imageconversion.h>
+#include <textresolver.h>
+#include <apgtask.h> 
+
+#include <hblabel.h>
+#include <hbmessagebox.h>
+
+#include "mainview.h"
+#include "sgengine.h"
+#include "enginewrapper.h"
+#include "gifanimator.h"
+
+
+#define SC_PRINTS
+
+    #ifdef SC_PRINTS
+     #define SC_DEBUG(a) RDebug::Print(a)
+     #define SC_DEBUG2(a,b) RDebug::Print(a,b)
+    #else
+     #define SC_DEBUG(a) 
+     #define SC_DEBUG2(a,b)
+    #endif
+
+
+
+
+_LIT(KDefaultImageFileName, "Shot");
+_LIT(KDefaultVideoFileName, "Video");
+
+#define HIGH_QUALITY_JPEG 97
+#define LOW_QUALITY_JPEG 60
+#define DEFAULT_SEQ_CAPTURE_DELAY_MS 5000   // 5.000 secs
+#define VIDEO_CAPTURE_DELAY 250             // 0.25 secs
+#define VIDEO_CAPTURE_MINIMUM_DELAY 200     // 0.20 secs
+const TInt KSettingsDrive = EDriveC;
+_LIT(KSettingsFileName, "screengrabber_settings.ini");
+_LIT(KScreenShotsSubDirectory, "Screen Shots\\");
+_LIT(KSGTemporaryDirectory, "\\system\\temp\\screengrabber\\");
+
+
+#define KEY_CAPTURE_PRIORITY 100            // do not change, this is for window server
+
+// ---------------------------------------------------------------------------
+
+SGEngine::SGEngine() : CActive(EPriorityStandard)
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+
+SGEngine::~SGEngine()
+    {
+ 
+    TRAP_IGNORE( CleanTemporaryFilesL() );
+
+
+    if (iFrameImageData)
+        delete iFrameImageData;
+
+    if (iPreviouslyCapturedBitmap)
+        delete iPreviouslyCapturedBitmap;
+
+    if (iImageEncoder)
+        delete iImageEncoder;
+     
+    delete iVideoFrameArray;
+
+    Cancel();
+    iTimer.Close();
+
+    iFileSession.Close(); 
+    
+    }
+
+// ---------------------------------------------------------------------------
+
+SGEngine* SGEngine::NewLC(EngineWrapper *aEngineWrapper)
+    {
+    SGEngine* self = new (ELeave) SGEngine();
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngineWrapper);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+SGEngine* SGEngine::NewL(EngineWrapper *aEngineWrapper)
+    {
+    SGEngine* self = SGEngine::NewLC(aEngineWrapper);
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::ConstructL(EngineWrapper *aEngineWrapper)
+    {
+
+    iEngineWrapper = aEngineWrapper;
+   
+    iHashKeyCapturingActivated = EFalse; // Check this
+   
+    User::LeaveIfError(iTimer.CreateLocal());
+
+    iVideoFrameArray = new(ELeave) CVideoFrameArray(10000);
+
+    iPreviouslyCapturedBitmap = new(ELeave) CFbsBitmap;
+
+    iCapturingInProgress = EFalse;
+    iStopCapturing = EFalse;
+    iNumberOfTakenShots = 0;
+    iCurrentFrameNumber = 0;
+    iHashKeyDown = EFalse;
+	
+
+	CActiveScheduler::Add(this);
+	User::LeaveIfError(iFileSession.Connect());  
+	
+	// create window group.
+    iRootWin = CEikonEnv::Static()->RootWin();
+	iRootWin.EnableReceiptOfFocus(EFalse);
+    
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::RunL(){
+
+
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- RunL begin"));
+    
+    switch (iState) 
+        {
+        // encoding of the image is now finished
+        case EEncodingImage: 
+            {
+            if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
+                {
+                // single shot done
+                CapturingFinishedL( iStatus.Int() );
+                }
+
+            else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
+                {
+                // increase the counter    
+                iNumberOfTakenShots++;
+                
+                // check if we can take more shots or just finish
+                if (!iStopCapturing && iStatus.Int()==KErrNone)
+                    {
+        
+                    // some delay before the next shot can be taken    
+                    iState = ESequenceDelay;
+                    
+                    // some checking that the value of delay is valid
+                    TInt delay(iGrabSettings.iSequantialCaptureDelay); //ms
+                    if (delay<0 || delay > 999999)
+                        delay = DEFAULT_SEQ_CAPTURE_DELAY_MS;
+                      
+                    iTimer.After(iStatus, delay*1000);
+                    SetActive();  
+                    }
+                else
+                    {
+                    // finished
+                    CapturingFinishedL( iStatus.Int() );
+                    }                       
+               }
+            else
+                User::Panic(_L("Wrong mode"), 32);            
+
+            break;
+            }
+
+        // delay finished, ready to take the next shot
+        case ESequenceDelay: 
+            {
+            TakeScreenShotAndSaveL();
+
+            break;
+            }
+            
+        // asked to cancel capturing    
+        case ECancelCapturing:
+            {
+            // finished
+            CapturingFinishedL( iStatus.Int() );
+
+            break;
+            }
+            
+        case ENextVideoFrame:
+            {
+            // increase the counter
+            iCurrentFrameNumber++;
+            
+            // check if we can take more frames or just finish
+            if (!iStopCapturing && iStatus.Int()==KErrNone)
+                {
+                // take next frame
+                CaptureFrameForVideoL();
+                }
+            else
+                {
+                // finished, save video
+                SaveVideoL( iStatus.Int() );
+                }               
+            }
+            break;
+
+        case ECancelVideoCapturing:
+            {
+            // finished, save video
+            SaveVideoL( iStatus.Int() );                
+            }
+            break;
+                                
+        default:
+            {
+            break;
+            }
+        }
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- RunL end"));
+    
+
+}
+
+
+void SGEngine::EnableRcpOfFoc(TBool aState)
+	{
+	iRootWin.EnableReceiptOfFocus(aState);
+	}
+
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::DoCancel(){
+    iTimer.Cancel();
+}
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue)
+    {
+    if (aDicFS->IsPresentL(aUid))
+        {
+        RDictionaryReadStream in;
+        in.OpenLC(*aDicFS, aUid);
+        aValue = in.ReadInt16L();
+        CleanupStack::PopAndDestroy(); // in        
+        }
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TDes& aValue)
+    {
+    if (aDicFS->IsPresentL(aUid))
+        {
+        RDictionaryReadStream in;
+        in.OpenLC(*aDicFS, aUid);
+        TInt bufLength = in.ReadInt16L();   // get length of descriptor
+        in.ReadL(aValue, bufLength);        // get the descriptor itself
+        CleanupStack::PopAndDestroy(); // in
+        }
+    }
+// ----------------------------------------------------------------------------
+
+void SGEngine::LoadSettingsL()
+    {
+	 
+    // set defaults
+    iGrabSettings.iCaptureMode = ECaptureModeSingleCapture;
+    
+    iGrabSettings.iSingleCaptureHotkey = EHotkeySendKey;
+    iGrabSettings.iSingleCaptureImageFormat = EImageFormatPNG;
+    iGrabSettings.iSingleCaptureMemoryInUseMultiDrive = EPhoneMemory;
+    iGrabSettings.iSingleCaptureFileName.Copy( KDefaultImageFileName );
+
+    iGrabSettings.iSequantialCaptureHotkey = EHotkeySendKey;
+    iGrabSettings.iSequantialCaptureImageFormat = EImageFormatPNG;
+    iGrabSettings.iSequantialCaptureDelay = DEFAULT_SEQ_CAPTURE_DELAY_MS;
+    iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive = EPhoneMemory;
+    iGrabSettings.iSequantialCaptureFileName.Copy( KDefaultImageFileName );
+
+    iGrabSettings.iVideoCaptureHotkey = EHotkeySendKey;
+    iGrabSettings.iVideoCaptureVideoFormat = EVideoFormatAnimatedGIF;
+    iGrabSettings.iVideoCaptureMemoryInUseMultiDrive = EPhoneMemory;    
+    iGrabSettings.iVideoCaptureFileName.Copy( KDefaultVideoFileName );
+       
+        
+    // make sure that the private path of this app in c-drive exists
+    
+	iFileSession.CreatePrivatePath( KSettingsDrive ); // c:\\private\\101fb751\\
+    
+    // handle settings always in the private directory 
+    
+	if (iFileSession.SetSessionToPrivate( KSettingsDrive ) == KErrNone)
+        {
+        // open or create a dictionary file store
+        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iFileSession, KSettingsFileName, KUidScreenGrabber);
+
+        LoadDFSValueL(settingsStore, KSGSettingCaptureMode,                             iGrabSettings.iCaptureMode);
+        
+        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureHotkey,                     iGrabSettings.iSingleCaptureHotkey);
+        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureImageFormat,                iGrabSettings.iSingleCaptureImageFormat);
+        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureMemoryInUseMultiDrive,      iGrabSettings.iSingleCaptureMemoryInUseMultiDrive);
+        LoadDFSValueL(settingsStore, KSGSettingSingleCaptureFileName,                   iGrabSettings.iSingleCaptureFileName);
+        
+        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureHotkey,                 iGrabSettings.iSequantialCaptureHotkey);
+        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureImageFormat,            iGrabSettings.iSequantialCaptureImageFormat);
+        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureDelay,                  iGrabSettings.iSequantialCaptureDelay);
+        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureMemoryInUseMultiDrive,  iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive);
+        LoadDFSValueL(settingsStore, KSGSettingSequantialCaptureFileName,               iGrabSettings.iSequantialCaptureFileName);
+
+        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureHotkey,                      iGrabSettings.iVideoCaptureHotkey);
+        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureVideoFormat,                 iGrabSettings.iVideoCaptureVideoFormat);
+        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureMemoryInUseMultiDrive,       iGrabSettings.iVideoCaptureMemoryInUseMultiDrive);
+        LoadDFSValueL(settingsStore, KSGSettingVideoCaptureFileName,                    iGrabSettings.iVideoCaptureFileName);
+
+        CleanupStack::PopAndDestroy(); // settingsStore         
+        }
+//chesk if all settings are in range - for safety reason, not to set some controls out of range - it causes the crash
+	if (!(iGrabSettings.iCaptureMode >= ECaptureModeSingleCapture && iGrabSettings.iCaptureMode <= ECaptureModeVideoCapture))
+	    { //give it default value
+        iGrabSettings.iCaptureMode = ECaptureModeSingleCapture;
+	    }
+	if (!(iGrabSettings.iSingleCaptureHotkey >= EHotkeySendKey && iGrabSettings.iSingleCaptureHotkey <= EHotkeyCameraKey1))
+	    {
+        iGrabSettings.iSingleCaptureHotkey = EHotkeySendKey;
+	    }
+	if (!(iGrabSettings.iSingleCaptureImageFormat >= EImageFormatPNG && iGrabSettings.iSingleCaptureImageFormat <= EImageFormatGIF))
+	    {
+        iGrabSettings.iSingleCaptureImageFormat = EImageFormatPNG;
+	    }
+	if (!(iGrabSettings.iSingleCaptureMemoryInUseMultiDrive >= EPhoneMemory && iGrabSettings.iSingleCaptureMemoryInUseMultiDrive <= EMemoryCard))
+	    {
+        iGrabSettings.iSingleCaptureMemoryInUseMultiDrive = EPhoneMemory;
+	    }
+	
+    if (!(iGrabSettings.iSequantialCaptureHotkey >= EHotkeySendKey && iGrabSettings.iSequantialCaptureHotkey <= EHotkeyCameraKey1))
+        {
+        iGrabSettings.iSequantialCaptureHotkey = EHotkeySendKey;
+        }
+    if (!(iGrabSettings.iSequantialCaptureImageFormat >= EImageFormatPNG && iGrabSettings.iSequantialCaptureImageFormat <= EImageFormatGIF))
+        {
+        iGrabSettings.iSequantialCaptureImageFormat = EImageFormatPNG;
+        }
+    if (!(iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive >= EPhoneMemory && iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive <= EMemoryCard))
+        {
+        iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive = EPhoneMemory;
+        }
+
+    if (!(iGrabSettings.iVideoCaptureHotkey >= EHotkeySendKey && iGrabSettings.iVideoCaptureHotkey <= EHotkeyCameraKey1))
+        {
+        iGrabSettings.iVideoCaptureHotkey = EHotkeySendKey;
+        }
+    if (iGrabSettings.iVideoCaptureVideoFormat != EVideoFormatAnimatedGIF)
+        {
+        iGrabSettings.iVideoCaptureVideoFormat = EVideoFormatAnimatedGIF;
+        }
+    if (!(iGrabSettings.iVideoCaptureMemoryInUseMultiDrive >= EPhoneMemory && iGrabSettings.iVideoCaptureMemoryInUseMultiDrive <= EMemoryCard))
+        {
+        iGrabSettings.iVideoCaptureMemoryInUseMultiDrive = EPhoneMemory;
+        }
+	
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TInt& aValue)
+    {
+    RDictionaryWriteStream out;
+    out.AssignLC(*aDicFS, aUid);
+    out.WriteInt16L(aValue);
+    out.CommitL();  
+    CleanupStack::PopAndDestroy(1);// out
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::SaveDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, const TDes& aValue)
+    {
+    RDictionaryWriteStream out;
+    out.AssignLC(*aDicFS, aUid);
+    out.WriteInt16L(aValue.Length());       // write length of the descriptor
+    out.WriteL(aValue, aValue.Length());    // write the descriptor itself
+    out.CommitL();  
+    CleanupStack::PopAndDestroy(1);// out
+    }
+    
+// ---------------------------------------------------------------------------
+void SGEngine::SaveSettingsL(const TGrabSettings& aGrabSettings)
+    {
+
+	
+    // set the new settings
+    iGrabSettings = aGrabSettings;
+
+    // handle settings always in c:\\private\\101fb751\\
+    if (iFileSession.SetSessionToPrivate( KSettingsDrive ) == KErrNone)
+        {
+        // delete existing store to make sure that it is clean and not eg corrupted
+        if (BaflUtils::FileExists(iFileSession, KSettingsFileName))
+            {
+            iFileSession.Delete(KSettingsFileName);
+            }
+        
+        // create a dictionary file store
+        CDictionaryFileStore* settingsStore = CDictionaryFileStore::OpenLC(iFileSession, KSettingsFileName, KUidScreenGrabber);
+
+        SaveDFSValueL(settingsStore, KSGSettingCaptureMode,                             iGrabSettings.iCaptureMode);
+        
+        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureHotkey,                     iGrabSettings.iSingleCaptureHotkey);
+        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureImageFormat,                iGrabSettings.iSingleCaptureImageFormat);
+        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureMemoryInUseMultiDrive,      iGrabSettings.iSingleCaptureMemoryInUseMultiDrive);
+        SaveDFSValueL(settingsStore, KSGSettingSingleCaptureFileName,                   iGrabSettings.iSingleCaptureFileName);
+        
+        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureHotkey,                 iGrabSettings.iSequantialCaptureHotkey);
+        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureImageFormat,            iGrabSettings.iSequantialCaptureImageFormat);
+        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureDelay,                  iGrabSettings.iSequantialCaptureDelay);
+        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureMemoryInUseMultiDrive,  iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive);
+        SaveDFSValueL(settingsStore, KSGSettingSequantialCaptureFileName,               iGrabSettings.iSequantialCaptureFileName);
+
+        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureHotkey,                      iGrabSettings.iVideoCaptureHotkey);
+        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureVideoFormat,                 iGrabSettings.iVideoCaptureVideoFormat);
+        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureMemoryInUseMultiDrive,       iGrabSettings.iVideoCaptureMemoryInUseMultiDrive);
+        SaveDFSValueL(settingsStore, KSGSettingVideoCaptureFileName,                    iGrabSettings.iVideoCaptureFileName);
+        
+        settingsStore->CommitL();
+        CleanupStack::PopAndDestroy(); // settingsStore             
+        }
+		
+    }
+        
+// ---------------------------------------------------------------------------
+
+void SGEngine::ActivateCaptureKeysL(TBool aChangeKey)
+    {
+	
+    // if changing the capture key, capturing needs to be cancelled first
+    if (aChangeKey)
+        {
+        CancelCapturing();
+        }
+
+    // get hotkey of the capture
+    TInt captureHotkey(0);
+    if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
+        captureHotkey = iGrabSettings.iSingleCaptureHotkey;
+    else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
+        captureHotkey = iGrabSettings.iSequantialCaptureHotkey;
+    else if (iGrabSettings.iCaptureMode == ECaptureModeVideoCapture)
+        captureHotkey = iGrabSettings.iVideoCaptureHotkey;
+    else
+        User::Panic(_L("Wrong mode"), 40);
+    
+    
+
+    // start capturing based on user selected key
+    switch (captureHotkey)
+        {
+        case EHotkeySendKey:
+            {
+            iCapturedKey    = iRootWin.CaptureKey(EStdKeyYes, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyYes, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            break;
+            }
+        case EHotkeyPowerKey:
+            {
+            iCapturedKey    = iRootWin.CaptureKey(EStdKeyDevice2, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyDevice2, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            break;
+            }
+        case EHotkeySideKey:
+            {
+            iCapturedKey    = iRootWin.CaptureKey(EStdKeyDevice6, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyDevice6, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            break;            
+            }
+        case EHotkeyCameraKey1:
+            {
+            iCapturedKey    = iRootWin.CaptureKey(EStdKeyDevice7, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            iCapturedKeyUnD = iRootWin.CaptureKeyUpAndDowns(EStdKeyDevice7, EModifierCtrl|EModifierShift|EModifierFunc, 0, KEY_CAPTURE_PRIORITY);
+            break;            
+            }
+        default:
+            {
+            User::Panic(_L("Key not supported"), 100);
+            break;
+            }
+        }
+		
+    }
+
+// ---------------------------------------------------------------------------
+
+
+void SGEngine::CancelCapturing()
+    {
+	
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CancelCapturing start"));
+    // cancel all captures
+    iRootWin.CancelCaptureKey(iCapturedKey);
+    iRootWin.CancelCaptureKeyUpAndDowns(iCapturedKeyUnD);
+    
+    if (iHashKeyCapturingActivated)
+        {
+        iRootWin.CancelCaptureKey(iCapturedKeyHash);
+        iRootWin.CancelCaptureKeyUpAndDowns(iCapturedKeyHashUnD);
+        
+        iHashKeyCapturingActivated = EFalse;
+        }
+    
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CancelCapturing end"));
+	
+    }
+
+// ---------------------------------------------------------------------------
+
+bool SGEngine::TakeScreenShotAndSaveL()
+    {
+	
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- TakeSsAndSave start"));
+    if ( IsActive() )
+        {
+        SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- TakeSsAndSave already active, ignored"));
+        return false;
+        }
+    
+    // take a screen shot
+    CWsScreenDevice* screenDevice = new( ELeave ) CWsScreenDevice(CEikonEnv::Static()->WsSession() );
+    CleanupStack::PushL( screenDevice );
+	
+    User::LeaveIfError( screenDevice->Construct( CEikonEnv::Static()->WsSession().GetFocusScreen() ) );
+
+	
+    User::LeaveIfError( iPreviouslyCapturedBitmap->Create(screenDevice->SizeInPixels(), screenDevice->DisplayMode()) );
+    User::LeaveIfError( screenDevice->CopyScreenToBitmap(iPreviouslyCapturedBitmap) );
+    CleanupStack::PopAndDestroy(); // screenDevice
+
+
+    // get memory in use & image format of the screen capture
+    TDriveNumber memoryInUse(EDriveC);
+    TInt intMemInUse(0);
+    TInt imageFormat(0);
+    TFileName fileName;
+    
+    if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
+        {        
+//        memoryInUse = iGrabSettings.iSingleCaptureMemoryInUseMultiDrive;
+        intMemInUse = iGrabSettings.iSingleCaptureMemoryInUseMultiDrive;
+        
+        imageFormat = iGrabSettings.iSingleCaptureImageFormat;
+        fileName = iGrabSettings.iSingleCaptureFileName;
+        }
+    else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
+        {          
+//        memoryInUse = iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive;
+        intMemInUse = iGrabSettings.iSequantialCaptureMemoryInUseMultiDrive;
+        
+        imageFormat = iGrabSettings.iSequantialCaptureImageFormat;
+        fileName = iGrabSettings.iSequantialCaptureFileName;
+        }
+    else
+        User::Panic(_L("Wrong mode"), 30);  
+
+
+    // init the path for saving the file
+	
+	iSaveFileName.Copy( PathInfo::PhoneMemoryRootPath() );
+	
+//    if (memoryInUse != EDriveC)//something different as PhoneMemory (memory card or mass memory)
+    if (intMemInUse != 0)//something different as PhoneMemory (memory card or mass memory)
+    	{
+		memoryInUse = EDriveY;	    
+		if (PathInfo::GetRootPath(iSaveFileName, memoryInUse) != KErrNone || !DriveOK(memoryInUse))
+			{
+			//we need to find first available memory card in EDriveE - EDriveY range
+			for (TInt i = EDriveY; i>=EDriveE; i--)
+				{
+				if ( DriveOK((TDriveNumber)(i)))
+					{
+					if (IsDriveMMC((TDriveNumber)(i)))
+						{
+						PathInfo::GetRootPath(iSaveFileName, (TDriveNumber)(i));
+						break;
+						}    
+					}
+				}
+			}
+    	}
+
+    iSaveFileName.Append( PathInfo::ImagesPath() );
+    iSaveFileName.Append( KScreenShotsSubDirectory );
+    
+    
+    // a quick check that filename is valid
+    if (fileName.Length() > 0 && fileName.Length() <= 255) 
+        iSaveFileName.Append( fileName );
+    else
+        iSaveFileName.Append( KDefaultImageFileName );
+
+    iSaveFileName.Append( _L(".") );
+
+
+    // reset the encoder
+    if (iImageEncoder)
+        {
+        delete iImageEncoder;
+        iImageEncoder = NULL;
+        }
+        
+    
+    switch (imageFormat)
+        {
+        case EImageFormatPNG:
+            {
+            // set filename
+            iSaveFileName.Append(_L("png"));
+            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
+
+            // init & convert
+            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypePNGUid);
+			
+            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
+            }
+            break;
+        
+        case EImageFormatJPGHQ:
+        case EImageFormatJPGLQ:
+            {
+            // reset frameimagedata
+            if (iFrameImageData)
+                {
+                delete iFrameImageData;
+                iFrameImageData = NULL;
+                }
+            
+            // set filename
+            iSaveFileName.Append(_L("jpg"));
+            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
+
+            // init 
+            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeJPGUid);
+
+            // JPEG properties
+            TJpegImageData* imageData = new(ELeave) TJpegImageData;
+            imageData->iSampleScheme = TJpegImageData::EColor444;
+            imageData->iQualityFactor = (imageFormat==EImageFormatJPGHQ) ? HIGH_QUALITY_JPEG : LOW_QUALITY_JPEG;
+            iFrameImageData = CFrameImageData::NewL();
+            User::LeaveIfError(iFrameImageData->AppendImageData(imageData));  //ownership of imageData is transferred
+
+            // convert
+            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap, iFrameImageData );
+            }
+            break;
+        
+        case EImageFormatBMP:
+            {
+            // set filename
+            iSaveFileName.Append(_L("bmp"));
+            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
+
+            // init & convert
+            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeBMPUid);
+            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
+            }
+            break;
+
+        case EImageFormatGIF:
+            {
+            // set filename
+            iSaveFileName.Append(_L("gif"));
+            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
+
+            // init & convert
+            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeGIFUid);
+            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
+            }
+            break;
+            
+        case EImageFormatMBM:
+            {
+            // set filename
+            iSaveFileName.Append(_L("mbm"));
+            CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
+
+            // init & convert
+            iImageEncoder = CImageEncoder::FileNewL(iFileSession, iSaveFileName, CImageEncoder::EOptionAlwaysThread, KImageTypeMBMUid);
+            iImageEncoder->Convert( &iStatus, *iPreviouslyCapturedBitmap );
+            }
+            break;
+            
+        default:
+            {
+            User::Panic(_L("Invalid Img Type"), 20);
+            }
+        }
+
+    // set the state of the active object
+    iState = EEncodingImage;
+
+    // indicate an outstanding request
+    SetActive();
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- TakeSsAndSave end"));
+	return true;
+    }
+    
+// ---------------------------------------------------------------------------
+
+
+TBool SGEngine::DriveOK(TDriveNumber aNumber)
+    {
+	
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- Driveok start"));
+    TBool isOK(EFalse);
+
+    TVolumeInfo vInfo;
+
+    // check if we can access the drive
+    if (iFileSession.Volume(vInfo, aNumber) == KErrNone)
+        isOK = ETrue;
+
+    // returns ETrue if memory card working properly
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- DriveOK end"));
+    return isOK;
+	
+    }
+// ---------------------------------------------------------------------------
+
+
+TBool SGEngine::IsDriveMMC(TDriveNumber aDrive)
+    {
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- IsDriveMMC start"));
+    TBool isOK(EFalse);
+
+    TDriveInfo ii;   
+    if (iFileSession.Drive(ii, aDrive)==KErrNone) 
+        {      
+            if (ii.iType!=EMediaNotPresent &&
+                ii.iType!=EMediaUnknown &&           
+                ii.iType!=EMediaCdRom &&         
+                ii.iType!=EMediaRom) 
+                {           // memory card          
+                    isOK=ETrue;      
+                }   
+        }    
+                
+    
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- IsDriveMMC end"));
+    return isOK;
+    }
+
+
+void SGEngine::CapturingFinishedL(TInt aErr)
+    {
+	
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CapturingFinished start"));
+    // display a global query to show the results
+    
+    if (aErr == KErrNone)
+        {
+        switch (iGrabSettings.iCaptureMode)
+            {
+            case ECaptureModeSingleCapture:
+                {
+                iEngineWrapper->ShowImageCapturedNote();
+                }
+                break;
+            
+            case ECaptureModeSequantialCapture:
+                {
+                iEngineWrapper->ShowSequantialImagesCapturedNote(iNumberOfTakenShots);
+                }
+                break;            
+    
+            case ECaptureModeVideoCapture:
+                {
+                iEngineWrapper->ShowVideoCapturedNote();
+                }
+                break;             
+    
+            default:
+                User::Panic(_L("Inv.capt.mode"), 51);
+                break;
+            }            
+       
+        }
+    else
+        {
+        
+        // Get error message with CTextResolver
+        CTextResolver* textResolver = CTextResolver::NewLC();
+        iEngineWrapper->ShowErrorMessage(textResolver->ResolveErrorString(aErr));
+
+        CleanupStack::PopAndDestroy();  //textResolver    
+        
+        }
+
+    // capturing can now be restarted
+    iState = EIdle;
+    iCapturingInProgress = EFalse;
+    iStopCapturing = EFalse;
+    
+    // reset values
+    iNumberOfTakenShots = 0;
+    iCurrentFrameNumber = 0;
+    iVideoFrameArray->Reset();
+    
+    
+    iState = EQueryDelay;
+    iTimer.After(iStatus, 2000000);
+    SetActive(); 
+    
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- capturingfinished end"));
+	
+    }
+
+
+#if defined(HB_QT_S60_EVENT_FILTER)
+    TBool SGEngine::HandleCaptureCommandsL(const TWsEvent* aEvent)
+	{
+#else
+    TBool SGEngine::HandleCaptureCommandsL(const QSymbianEvent *event)
+	{
+    if (event->type() != QSymbianEvent::WindowServerEvent) {
+        return ETrue; //continueEventLoop
+    }
+    const TWsEvent *aEvent = event->windowServerEvent();
+#endif
+	
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- HandleCaptureCommand start"));
+	
+	
+    TBool continueEventLoop(ETrue);
+    
+    // get hotkey of the capture
+    TInt captureHotkey(0);
+    if (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture)
+        captureHotkey = iGrabSettings.iSingleCaptureHotkey;
+    else if (iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture)
+        captureHotkey = iGrabSettings.iSequantialCaptureHotkey;
+    else if (iGrabSettings.iCaptureMode == ECaptureModeVideoCapture)
+        captureHotkey = iGrabSettings.iVideoCaptureHotkey;
+    else
+        User::Panic(_L("Wrong mode"), 41);
+    
+    // ignore any errors
+    if (aEvent->Type()==EEventErrorMessage)
+        {
+        // error
+        }
+    
+            
+    // handle captured keys, we are interested here only of the keydown events
+    else
+        
+        if (
+              ( captureHotkey == EHotkeySendKey &&
+                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyYes )
+            ||
+              ( captureHotkey == EHotkeyPowerKey &&
+                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyDevice2 )
+            ||
+              ( captureHotkey == EHotkeySideKey &&
+                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyDevice6 )
+            ||
+              ( captureHotkey == EHotkeyCameraKey1 &&
+                aEvent->Type()==EEventKeyDown && aEvent->Key()->iScanCode==EStdKeyDevice7 )
+            )
+        {
+        
+        // check if already capturing images in sequence
+        if ( iCapturingInProgress && !iStopCapturing && iNumberOfTakenShots!=0 && iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture )
+            {
+            // asking to stop capturing
+            iStopCapturing = ETrue; 
+            
+            // cancel the active object, this will cancel any timer delays and ICL stuff
+            Cancel();
+            
+            // set status
+            iState = ECancelCapturing; 
+            
+            // jump smoothly to RunL()
+            iTimer.After(iStatus, 50);
+            SetActive(); 
+
+            // do not continue the event loop in HandleWsEventL for these events
+            continueEventLoop = EFalse;
+            }
+
+        // check if already capturing video
+        else if ( iCapturingInProgress && !iStopCapturing && iGrabSettings.iCaptureMode == ECaptureModeVideoCapture )
+            {
+            // asking to stop capturing
+            iStopCapturing = ETrue;
+            
+            // cancel the active object, this will cancel any timer delays and ICL stuff
+            Cancel();
+
+            // set status
+            iState = ECancelVideoCapturing;
+            
+            // jump smoothly to RunL()
+            iTimer.After(iStatus, 50);
+            SetActive(); 
+
+            // do not continue the event loop in HandleWsEventL for these events
+            continueEventLoop = EFalse;
+            }        
+        else if (!iCapturingInProgress && (iGrabSettings.iCaptureMode == ECaptureModeSingleCapture || iGrabSettings.iCaptureMode == ECaptureModeSequantialCapture ))
+            {
+            
+            // take a screen shot and save it
+           if( TakeScreenShotAndSaveL())
+               {
+               // not capturing anything, so start doing that
+               iCapturingInProgress = ETrue;    
+               // do not continue the event loop in HandleWsEventL for these events
+               continueEventLoop = EFalse;
+               }
+            }
+        
+        else if (!iCapturingInProgress && iGrabSettings.iCaptureMode == ECaptureModeVideoCapture )
+            {
+            // not capturing anything, so start doing that
+            iCapturingInProgress = ETrue;
+            
+            // clean temporary files
+            TRAP_IGNORE( CleanTemporaryFilesL() );
+            
+            // get initial dimensions for the video
+            CWsScreenDevice* screenDevice = new(ELeave) CWsScreenDevice ( CEikonEnv::Static()->WsSession() );
+            CleanupStack::PushL(screenDevice);
+			
+            User::LeaveIfError( screenDevice->Construct( CEikonEnv::Static()->WsSession().GetFocusScreen() ) );
+			
+            iVideoDimensions = screenDevice->SizeInPixels();
+            iPreviousFrameScreenDimension = screenDevice->SizeInPixels();
+            CleanupStack::PopAndDestroy(); // screenDevice
+
+            // capture the first frame
+            CaptureFrameForVideoL();              
+
+            // do not continue the event loop in HandleWsEventL for these events
+            continueEventLoop = EFalse;
+            }
+
+        }
+
+    // catch other event types as well so that we can ignore them
+    else if (
+              ( captureHotkey == EHotkeySendKey &&
+                aEvent->Key()->iScanCode==EStdKeyYes )
+            ||
+              ( captureHotkey == EHotkeyPowerKey &&
+                aEvent->Key()->iScanCode==EStdKeyDevice2 )
+            ||
+              ( captureHotkey == EHotkeySideKey &&
+                aEvent->Key()->iScanCode==EStdKeyDevice6 )
+            ||
+              ( captureHotkey == EHotkeyCameraKey1 &&
+                aEvent->Key()->iScanCode==EStdKeyDevice7 )
+           )
+        {
+        // do not continue the event loop in HandleWsEventL for these events
+        continueEventLoop = EFalse;
+        }
+
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- HandleCapturcommand end"));
+
+    
+    return continueEventLoop;
+    
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::CleanTemporaryFilesL()
+    {
+	
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CleanTempFiles start"));
+    
+    // delete temporary files from C and D drives    
+    CFileMan* fileMan = CFileMan::NewL(iFileSession);
+
+    TFileName delFilesPath;
+        
+    for (TInt i=0; i<1; i++)
+        {
+        delFilesPath.Copy(KNullDesC);
+        delFilesPath.Append('C'+i);
+        delFilesPath.Append(_L(":"));
+        delFilesPath.Append(KSGTemporaryDirectory);
+        delFilesPath.Append(_L("*.$$$"));
+        
+        fileMan->Delete(delFilesPath);
+        }
+
+    delete fileMan;    
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CleanTempfile end"));
+	
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::ActivateModelL()
+    {
+    // clean temporary files
+    TRAP_IGNORE( CleanTemporaryFilesL() );
+            
+    // load settings
+    TRAP_IGNORE( LoadSettingsL() );
+
+    // start capturing
+    ActivateCaptureKeysL();
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::DeActivateModelL()
+    {
+	
+    CancelCapturing();
+
+    // for a faster exit, send the application to background
+    TApaTask selfTask(CEikonEnv::Static()->WsSession());
+    selfTask.SetWgId(iRootWin.Identifier());
+    selfTask.SendToBackground();
+	
+	
+    }
+    
+// ---------------------------------------------------------------------------
+
+
+void SGEngine::CaptureFrameForVideoL()
+    {
+    
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- CaptureFrameforvide start"));
+    // record time
+    TTime timeNow;
+    timeNow.HomeTime();
+    
+    // take a screen shot   
+    CFbsBitmap* currentCapturedBitmap = new(ELeave) CFbsBitmap;
+    CleanupStack::PushL(currentCapturedBitmap);
+
+    CWsScreenDevice* screenDevice = new(ELeave) CWsScreenDevice( CEikonEnv::Static()->WsSession() );
+    CleanupStack::PushL( screenDevice );
+    User::LeaveIfError( screenDevice->Construct( CEikonEnv::Static()->WsSession().GetFocusScreen() ) );
+    
+    TSize currentScreenSize = screenDevice->SizeInPixels();
+
+    User::LeaveIfError( currentCapturedBitmap->Create(currentScreenSize, EColor256) );
+    User::LeaveIfError( screenDevice->CopyScreenToBitmap(currentCapturedBitmap) );
+    CleanupStack::PopAndDestroy(); // screenDevice
+
+    // grow video's dimensions if the size has changed
+    if (currentScreenSize.iWidth > iVideoDimensions.iWidth)
+        {
+        iVideoDimensions.iWidth = currentScreenSize.iWidth;
+        }
+    if (currentScreenSize.iHeight > iVideoDimensions.iHeight)
+        {
+        iVideoDimensions.iHeight = currentScreenSize.iHeight;
+        }
+
+    TInt64 currentDelay(0);
+ 
+
+    // create a new frame
+    TVideoFrame frame;
+    frame.iDelay = 500; // use default delay 5.00 secs
+    
+    // get info of the RAM drive
+    TDriveNumber ramDrive = EDriveD;
+    TVolumeInfo ramDriveInfo;
+    iFileSession.Volume(ramDriveInfo, ramDrive);
+    
+    // init the directory for saving the file, preferably use ram drive if there is enough disk space, otherwise use always C drive
+    TFileName tempDirectory;
+    TFileName sessionPath;
+    
+    if (ramDriveInfo.iFree > (iVideoDimensions.iWidth*iVideoDimensions.iHeight+50000))
+        sessionPath.Copy( _L("D:") );
+    else
+        sessionPath.Copy( _L("C:") );
+    
+    sessionPath.Append(KSGTemporaryDirectory);
+    tempDirectory.Copy(KSGTemporaryDirectory);
+    
+    iFileSession.MkDirAll(sessionPath);
+    iFileSession.SetSessionPath(sessionPath);
+
+    // create a temp file, path to the bitmap is saved automatically to frame.iFileStorePath
+    RFile file;
+    User::LeaveIfError( file.Temp(iFileSession, tempDirectory, frame.iFileStorePath, EFileWrite) );
+    RFileWriteStream writeStream(file);
+    
+    TBool ignoreFrame(EFalse);
+    
+    // check if is this the first frame
+    if (iCurrentFrameNumber == 0)
+        {
+        // first frame is always the full one
+        frame.iWidth = currentScreenSize.iWidth;    
+        frame.iHeight = currentScreenSize.iHeight;  
+        frame.iXPos = 0;
+        frame.iYPos = 0;
+        frame.iEnableTransparency = EFalse;
+        frame.iFillsWholeScreen = ETrue;
+        
+        currentCapturedBitmap->ExternalizeL(writeStream);  
+
+        }
+    
+    else
+        {
+        // next frame is a difference between the previous one
+        currentDelay = timeNow.MicroSecondsFrom(iPreviousFrameTaken).Int64();
+        
+        // get reference to previos frame
+        TVideoFrame& prevFrame = iVideoFrameArray->At(iVideoFrameArray->Count()-1);
+        
+        
+        // check if video dimensions have changed
+        if (currentScreenSize.iWidth != iPreviousFrameScreenDimension.iWidth
+            || currentScreenSize.iHeight != iPreviousFrameScreenDimension.iHeight)
+            {
+            // dimensions have changed -> save a full bitmap
+            frame.iWidth = currentScreenSize.iWidth;    
+            frame.iHeight = currentScreenSize.iHeight;  
+            frame.iXPos = 0;
+            frame.iYPos = 0;
+            frame.iEnableTransparency = EFalse;
+            frame.iFillsWholeScreen = ETrue;
+            
+            currentCapturedBitmap->ExternalizeL(writeStream);            
+
+            // update the previous frame to contain the new delay value
+            prevFrame.iDelay = TUint( (double) currentDelay / 10000 );
+            }
+
+        else
+            {
+            // compare the bitmaps
+            TUint bufSize = currentScreenSize.iWidth*3;
+            HBufC8* curImgScanLineBuf = HBufC8::NewLC(bufSize);
+            TPtr8 curImgScanLinePtr = curImgScanLineBuf->Des();
+            HBufC8* prevImgScanLineBuf = HBufC8::NewLC(bufSize);
+            TPtr8 prevImgScanLinePtr = prevImgScanLineBuf->Des();
+            
+            TPoint pt(0,0);
+            TBool differenceFound(EFalse);
+            TPoint leftTopDifferencePoint(0,0);
+            TPoint rightBottomDifferencePoint(currentScreenSize.iWidth,currentScreenSize.iHeight);
+            
+            // scan the image from top to bottom
+            for (TInt i=0; i<currentScreenSize.iHeight; i++)
+                {
+                pt.iY = i;
+                
+                currentCapturedBitmap->GetScanLine(curImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
+                iPreviouslyCapturedBitmap->GetScanLine(prevImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
+                
+                if (curImgScanLinePtr != prevImgScanLinePtr)
+                    {
+                    differenceFound = ETrue;
+                    
+                    // get the y-coordinate
+                    leftTopDifferencePoint.iY = i;
+
+                    break;    
+                    }
+                }
+                
+            if (differenceFound)
+                {
+                // now we know that there is some difference between those two captured frames,
+                // get the bottom value by scaning from bottom to top
+                for (TInt i=currentScreenSize.iHeight-1; i>=0; i--)
+                    {
+                    pt.iY = i;
+                    
+                    currentCapturedBitmap->GetScanLine(curImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
+                    iPreviouslyCapturedBitmap->GetScanLine(prevImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
+                    
+                    if (curImgScanLinePtr != prevImgScanLinePtr)
+                        {
+                        // get the y-coordinate
+                        rightBottomDifferencePoint.iY = i+1;
+
+                        break;    
+                        }
+                    }
+                    
+                // check that the height of the cropped image will be at least 1
+                if (rightBottomDifferencePoint.iY <= leftTopDifferencePoint.iY)
+                    rightBottomDifferencePoint.iY = leftTopDifferencePoint.iY+1;  
+                
+                      
+                // get also the x-coordinates by scanning vertical scan lines
+                bufSize = currentScreenSize.iHeight*3;
+                HBufC8* curImgVerticalScanLineBuf = HBufC8::NewLC(bufSize);
+                TPtr8 curImgVerticalScanLinePtr = curImgVerticalScanLineBuf->Des();
+                HBufC8* prevImgVerticalScanLineBuf = HBufC8::NewLC(bufSize);
+                TPtr8 prevImgVerticalScanLinePtr = prevImgVerticalScanLineBuf->Des();
+                
+                // first scan by from left to right
+                for (TInt i=0; i<currentScreenSize.iWidth; i++)
+                    {
+                    currentCapturedBitmap->GetVerticalScanLine(curImgVerticalScanLinePtr, i, EColor256);
+                    iPreviouslyCapturedBitmap->GetVerticalScanLine(prevImgVerticalScanLinePtr, i, EColor256);
+                    
+                    if (curImgVerticalScanLinePtr != prevImgVerticalScanLinePtr)
+                        {
+                        leftTopDifferencePoint.iX = i;
+                        break;
+                        }
+                    }
+
+                // finally scan from right to left
+                for (TInt i=currentScreenSize.iWidth-1; i>=0; i--)
+                    {
+                    currentCapturedBitmap->GetVerticalScanLine(curImgVerticalScanLinePtr, i, EColor256);
+                    iPreviouslyCapturedBitmap->GetVerticalScanLine(prevImgVerticalScanLinePtr, i, EColor256);
+                    
+                    if (curImgVerticalScanLinePtr != prevImgVerticalScanLinePtr)
+                        {
+                        rightBottomDifferencePoint.iX = i+1;
+                        break;
+                        }
+                    }
+                    
+                CleanupStack::PopAndDestroy(2); //curImgVerticalScanLineBuf,prevImgVerticalScanLineBuf               
+
+                
+                // check that the width of the cropped image will be at least 1
+                if (rightBottomDifferencePoint.iX <= leftTopDifferencePoint.iX)
+                    rightBottomDifferencePoint.iX = leftTopDifferencePoint.iX+1;
+                   
+                
+                // record dimensions and position of the image           
+                frame.iWidth = rightBottomDifferencePoint.iX - leftTopDifferencePoint.iX;    
+                frame.iHeight = rightBottomDifferencePoint.iY - leftTopDifferencePoint.iY;  
+                frame.iXPos = leftTopDifferencePoint.iX;
+                frame.iYPos = leftTopDifferencePoint.iY;
+                frame.iEnableTransparency = ETrue;
+                frame.iFillsWholeScreen = EFalse;
+            
+            
+                // take a copy of the current frame
+                CFbsBitmap* workingBitmap = new(ELeave) CFbsBitmap;
+                CleanupStack::PushL(workingBitmap);
+                User::LeaveIfError( workingBitmap->Create(currentScreenSize, EColor256) );
+
+                bufSize = currentScreenSize.iWidth*3;
+                HBufC8* tempScanLineBuf = HBufC8::NewLC(bufSize);
+                TPtr8 tempScanLinePtr = tempScanLineBuf->Des();
+                
+                for (TInt i=0; i<currentScreenSize.iHeight; i++)
+                    {
+                    pt.iY = i;
+                    currentCapturedBitmap->GetScanLine(tempScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
+                    workingBitmap->SetScanLine(tempScanLinePtr, i);
+                    }
+                    
+                CleanupStack::PopAndDestroy(); //tempScanLineBuf
+                
+                
+                // mark the non-changed areas with transparency color
+                TUint8* curPtr = NULL;
+                TUint8* prevPtr = NULL;
+                for (TInt i=frame.iYPos; i<frame.iYPos+frame.iHeight; i++)
+                    {
+                    pt.iY = i;
+                    
+                    workingBitmap->GetScanLine(curImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
+                    iPreviouslyCapturedBitmap->GetScanLine(prevImgScanLinePtr, pt, currentScreenSize.iWidth, EColor256);
+                    
+                    // check single pixels in the scanline
+                    for (TInt j=frame.iXPos; j<frame.iXPos+frame.iWidth; j++)
+                        {
+                        curPtr = &curImgScanLinePtr[j];
+                        prevPtr = &prevImgScanLinePtr[j];
+                        
+                        // check that our transparency index isn't already in use
+                        if (curPtr[0] == TRANSPARENCY_INDEX)
+                            curPtr[0] = TRANSPARENCY_ALTERNATIVE_INDEX;
+                        
+                        // replace with transparency index if there is no change compared to the previous frame
+                        if (curPtr[0] == prevPtr[0])
+                            curPtr[0] = TRANSPARENCY_INDEX;
+                        }
+                        
+                    // set new scanline    
+                    workingBitmap->SetScanLine(curImgScanLinePtr, i);
+                    }
+
+
+                // externalize the bitmap
+                TRect changedRect(leftTopDifferencePoint, rightBottomDifferencePoint);
+                workingBitmap->ExternalizeRectangleL(writeStream, changedRect);
+                
+                CleanupStack::PopAndDestroy(); //workingBitmap
+ 
+                // update the previous frame to contain the new delay value
+                prevFrame.iDelay = TUint( (double) currentDelay / 10000 );
+                }
+
+            else
+                {
+                // frames are identical, we can just ignore this one
+                ignoreFrame = ETrue;     
+                }
+            
+            CleanupStack::PopAndDestroy(2); //curImgScanLineBuf,prevImgScanLineBuf
+
+            } // if (videoDimensionsHaveChanged)
+
+        } //if (iCurrentFrameNumber == 0)
+            
+    // close the stream
+    writeStream.CommitL();
+    writeStream.Close();
+    file.Close();
+    
+
+    if (ignoreFrame)
+        {
+        // delete the temp file since we don't need that
+            iFileSession.Delete(frame.iFileStorePath);
+        }
+    else
+        {
+        // remember for the next frame when this frame was taken
+        iPreviousFrameTaken = timeNow;
+
+        // take a copy of currentCapturedBitmap to iPreviouslyCapturedBitmap
+        User::LeaveIfError( iPreviouslyCapturedBitmap->Create(iVideoDimensions, EColor256) );
+
+        TPoint pt(0,0);
+        HBufC8* tempScanLineBuf = HBufC8::NewMaxLC(iVideoDimensions.iWidth);
+        TPtr8 tempScanLinePtr = tempScanLineBuf->Des();
+        
+        for (TInt i=0; i<iVideoDimensions.iHeight; i++)
+            {
+            pt.iY = i;
+            currentCapturedBitmap->GetScanLine(tempScanLinePtr, pt, iVideoDimensions.iWidth, EColor256);
+            iPreviouslyCapturedBitmap->SetScanLine(tempScanLinePtr, i);
+            }
+            
+        CleanupStack::PopAndDestroy(); //tempScanLineBuf
+        
+        // append frame information to the array
+        iVideoFrameArray->AppendL(frame);
+        
+        // remember screen size
+        iPreviousFrameScreenDimension = currentScreenSize;
+        }    
+
+    
+    CleanupStack::PopAndDestroy(); //currentCapturedBitmap
+    
+
+    // set the state of the active object
+    iState = ENextVideoFrame;
+    
+    // check time spent on the work above (probably this is not so important)
+    TTime timeNow2;
+    timeNow2.HomeTime();
+    TInt64 handlingDelay = timeNow2.MicroSecondsFrom(timeNow).Int64();
+    
+    // calculate delay till next frame
+    TUint idealDelay = VIDEO_CAPTURE_DELAY*1000;
+    TInt usedDelay; 
+    if (currentDelay > idealDelay)
+        usedDelay = idealDelay - (currentDelay - idealDelay) - handlingDelay;
+    else
+        usedDelay = idealDelay - handlingDelay;
+    
+    // check that the delay is atleast minimum delay anyway
+    if (usedDelay < VIDEO_CAPTURE_MINIMUM_DELAY*1000)
+        usedDelay = VIDEO_CAPTURE_MINIMUM_DELAY*1000;
+    
+    iTimer.After(iStatus, usedDelay);
+
+    // indicate an outstanding request
+    SetActive();
+    
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- Captureframeforvideo end"));
+	
+    }
+
+// ---------------------------------------------------------------------------
+
+void SGEngine::SaveVideoL(TInt aErr)
+    {
+
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- SaveVideo start"));
+    
+    if (aErr)
+        CapturingFinishedL(aErr);   
+   
+    else if (iGrabSettings.iVideoCaptureVideoFormat == EVideoFormatAnimatedGIF)
+        {
+        TInt err(KErrNone);
+
+        
+			iSaveFileName.Copy( PathInfo::PhoneMemoryRootPath() );
+            if (iGrabSettings.iVideoCaptureMemoryInUseMultiDrive != 0)//something different as PhoneMemory (memory card or mass memory)
+            	{
+        		if (PathInfo::GetRootPath(iSaveFileName,EDriveY) != KErrNone || !DriveOK(EDriveY))
+        			{
+        			//we need to find first available memory card in EDriveE - EDriveY range
+        			for (TInt i = EDriveY; i>=EDriveE; i--)
+        				{
+        				if ( DriveOK((TDriveNumber)(i)))
+        					{
+        					if (IsDriveMMC((TDriveNumber)(i)))
+        						{
+        						PathInfo::GetRootPath(iSaveFileName, (TDriveNumber)(i));
+        						break;
+        						}    
+        					}
+        				}
+        			}
+            	}
+
+        
+        iSaveFileName.Append( PathInfo::ImagesPath() );     // animated gif is actually an image, not a video
+        iSaveFileName.Append( KScreenShotsSubDirectory );
+        
+        // a quick check that filename is valid
+        if (iGrabSettings.iVideoCaptureFileName.Length() > 0 && iGrabSettings.iVideoCaptureFileName.Length() <= 255) 
+            iSaveFileName.Append( iGrabSettings.iVideoCaptureFileName );
+        else
+            iSaveFileName.Append( KDefaultVideoFileName );
+
+        iSaveFileName.Append( _L(".gif") );
+
+        CApaApplication::GenerateFileName(iFileSession, iSaveFileName );  // unique filename
+
+        // create and save the gif animation
+        err = CGifAnimator::CreateGifAnimation(iSaveFileName, iVideoDimensions, iVideoFrameArray, *iEngineWrapper);
+        
+        // remove the saved file in case of errors since it's likely corrupted
+        if (err != KErrNone)
+            iFileSession.Delete(iSaveFileName);
+        
+        CapturingFinishedL(err);   
+        }
+        
+    else
+        CapturingFinishedL(KErrNotSupported);
+    
+    SC_DEBUG(_L("SCREENGRABBER ------------------------------------------------------- SaveVideo end"));
+    }
+// ---------------------------------------------------------------------------
+